summaryrefslogtreecommitdiffstats
path: root/krebs/4lib
diff options
context:
space:
mode:
Diffstat (limited to 'krebs/4lib')
-rw-r--r--krebs/4lib/default.nix2
-rw-r--r--krebs/4lib/dns.nix31
-rw-r--r--krebs/4lib/listset.nix11
3 files changed, 0 insertions, 44 deletions
diff --git a/krebs/4lib/default.nix b/krebs/4lib/default.nix
index e23e42b19..deac02bb7 100644
--- a/krebs/4lib/default.nix
+++ b/krebs/4lib/default.nix
@@ -22,10 +22,8 @@ let out = rec {
dir.has-default-nix = path: pathExists (path + "/default.nix");
- dns = import ./dns.nix { inherit lib; };
genid = import ./genid.nix { lib = lib // out; };
git = import ./git.nix { lib = lib // out; };
- listset = import ./listset.nix { inherit lib; };
shell = import ./shell.nix { inherit lib; };
tree = import ./tree.nix { inherit lib; };
diff --git a/krebs/4lib/dns.nix b/krebs/4lib/dns.nix
deleted file mode 100644
index b2cf3c24c..000000000
--- a/krebs/4lib/dns.nix
+++ /dev/null
@@ -1,31 +0,0 @@
-{ lib, ... }:
-
-let
- listset = import ./listset.nix { inherit lib; };
-in
-
-with builtins;
-with lib;
-
-rec {
- # label = string
-
- # TODO does it make sense to have alias = list label?
-
- # split-by-provider :
- # [[label]] -> tree label provider -> listset provider alias
- split-by-provider = as: providers:
- foldl (m: a: listset.insert (provider-of a providers) a m) {} as;
-
- # provider-of : alias -> tree label provider -> provider
- # Note that we cannot use tree.get here, because path can be longer
- # than the tree depth.
- provider-of = a:
- let
- go = path: tree:
- if typeOf tree == "string"
- then tree
- else go (tail path) tree.${head path};
- in
- go (reverseList (splitString "." a));
-}
diff --git a/krebs/4lib/listset.nix b/krebs/4lib/listset.nix
deleted file mode 100644
index 3aae22f20..000000000
--- a/krebs/4lib/listset.nix
+++ /dev/null
@@ -1,11 +0,0 @@
-{ lib, ... }:
-
-with lib;
-
-rec {
- # listset k v = set k [v]
-
- # insert : k -> v -> listset k v -> listset k v
- insert = name: value: set:
- set // { ${name} = set.${name} or [] ++ [value]; };
-}