summary refs log tree commit diff
path: root/lib
diff options
context:
space:
mode:
authorVladimír Čunát <vcunat@gmail.com>2017-04-14 10:32:13 +0200
committerVladimír Čunát <vcunat@gmail.com>2017-04-14 10:32:13 +0200
commit24444513fb5cc0cf1f56c6b3b87bcdd36db8b101 (patch)
treeb856f7236de8e12ef201ababecb22e9b32a0e493 /lib
parent3085e95a20349f957c793f22547363231fa471a8 (diff)
parent304d30ce3f22ca8b275236de6e2c2e7f6e0b1934 (diff)
downloadnixpkgs-24444513fb5cc0cf1f56c6b3b87bcdd36db8b101.tar
nixpkgs-24444513fb5cc0cf1f56c6b3b87bcdd36db8b101.tar.gz
nixpkgs-24444513fb5cc0cf1f56c6b3b87bcdd36db8b101.tar.bz2
nixpkgs-24444513fb5cc0cf1f56c6b3b87bcdd36db8b101.tar.lz
nixpkgs-24444513fb5cc0cf1f56c6b3b87bcdd36db8b101.tar.xz
nixpkgs-24444513fb5cc0cf1f56c6b3b87bcdd36db8b101.tar.zst
nixpkgs-24444513fb5cc0cf1f56c6b3b87bcdd36db8b101.zip
Merge branch 'staging'
Diffstat (limited to 'lib')
-rw-r--r--lib/default.nix5
-rw-r--r--lib/tests.nix10
-rw-r--r--lib/trivial.nix9
3 files changed, 0 insertions, 24 deletions
diff --git a/lib/default.nix b/lib/default.nix
index 632b12510e8..09a64f754d8 100644
--- a/lib/default.nix
+++ b/lib/default.nix
@@ -1,8 +1,3 @@
-/* Library of low-level helper functions for nix expressions.
- *
- * Please implement (mostly) exhaustive unit tests
- * for new functions in `./tests.nix'.
- */
 let
 
   # trivial, often used functions
diff --git a/lib/tests.nix b/lib/tests.nix
index d93cadf2533..1a9a5accd1c 100644
--- a/lib/tests.nix
+++ b/lib/tests.nix
@@ -277,14 +277,4 @@ runTests {
     expected = [ "2001" "db8" "0" "0042" "" "8a2e" "370" "" ];
   };
 
-  testComposeExtensions = {
-    expr = let obj = makeExtensible (self: { foo = self.bar; });
-               f = self: super: { bar = false; baz = true; };
-               g = self: super: { bar = super.baz or false; };
-               f_o_g = composeExtensions f g;
-               composed = obj.extend f_o_g;
-           in composed.foo;
-    expected = true;
-  };
-
 }
diff --git a/lib/trivial.nix b/lib/trivial.nix
index 62906339e60..6cdc869b300 100644
--- a/lib/trivial.nix
+++ b/lib/trivial.nix
@@ -85,15 +85,6 @@ rec {
   # argument, but it's nice this way if several uses of `extends` are cascaded.
   extends = f: rattrs: self: let super = rattrs self; in super // f self super;
 
-  # Compose two extending functions of the type expected by 'extends'
-  # into one where changes made in the first are available in the
-  # 'super' of the second
-  composeExtensions =
-    f: g: self: super:
-      let fApplied = f self super;
-          super' = super // fApplied;
-      in fApplied // g self super';
-
   # Create an overridable, recursive attribute set. For example:
   #
   #     nix-repl> obj = makeExtensible (self: { })