summary refs log tree commit diff
path: root/pkgs/lib
diff options
context:
space:
mode:
authorVladimír Čunát <vcunat@gmail.com>2013-05-29 23:24:20 +0200
committerVladimír Čunát <vcunat@gmail.com>2013-05-29 23:25:02 +0200
commitb7703655749df57dd5cbc84b89cc3be4bc7358bc (patch)
treea3a84870d2fff43f9cce6abfc6f0961f0a5a156d /pkgs/lib
parent971337a119d708d78a152f4d918694e7b5a2b7e8 (diff)
downloadnixpkgs-b7703655749df57dd5cbc84b89cc3be4bc7358bc.tar
nixpkgs-b7703655749df57dd5cbc84b89cc3be4bc7358bc.tar.gz
nixpkgs-b7703655749df57dd5cbc84b89cc3be4bc7358bc.tar.bz2
nixpkgs-b7703655749df57dd5cbc84b89cc3be4bc7358bc.tar.lz
nixpkgs-b7703655749df57dd5cbc84b89cc3be4bc7358bc.tar.xz
nixpkgs-b7703655749df57dd5cbc84b89cc3be4bc7358bc.tar.zst
nixpkgs-b7703655749df57dd5cbc84b89cc3be4bc7358bc.zip
ReRevert Merge x-updates into master
This reverts commit ec3965d8d0b5594a9db11e6c9cd1c28d36e91cde.

Conflicts (taken x-updates):
	pkgs/development/libraries/libgcrypt/default.nix
	pkgs/development/libraries/libgpg-error/default.nix
	pkgs/development/libraries/poppler/default.nix
Diffstat (limited to 'pkgs/lib')
-rw-r--r--pkgs/lib/misc.nix5
-rw-r--r--pkgs/lib/strings.nix7
2 files changed, 11 insertions, 1 deletions
diff --git a/pkgs/lib/misc.nix b/pkgs/lib/misc.nix
index 0f4c0d0de95..19e5081009d 100644
--- a/pkgs/lib/misc.nix
+++ b/pkgs/lib/misc.nix
@@ -315,6 +315,8 @@ rec {
       )
     ];
   mergeAttrsByFuncDefaults = foldl mergeAttrByFunc { inherit mergeAttrBy; };
+  mergeAttrsByFuncDefaultsClean = list: removeAttrs (mergeAttrsByFuncDefaults list) ["mergeAttrBy"];
+
   # merge attrs based on version key into mkDerivation args, see mergeAttrBy to learn about smart merge defaults
   #
   # This function is best explained by an example:
@@ -356,7 +358,8 @@ rec {
 
   # sane defaults (same name as attr name so that inherit can be used)
   mergeAttrBy = # { buildInputs = concatList; [...]; passthru = mergeAttr; [..]; }
-    listToAttrs (map (n : nameValuePair n lib.concat) [ "nativeBuildInputs" "buildInputs" "propagatedBuildInputs" "configureFlags" "prePhases" "postAll" ])
+    listToAttrs (map (n : nameValuePair n lib.concat)
+      [ "nativeBuildInputs" "buildInputs" "propagatedBuildInputs" "configureFlags" "prePhases" "postAll" "patches" ])
     // listToAttrs (map (n : nameValuePair n lib.mergeAttrs) [ "passthru" "meta" "cfg" "flags" ])
     // listToAttrs (map (n : nameValuePair n (a: b: "${a}\n${b}") ) [ "preConfigure" "postInstall" ])
   ;
diff --git a/pkgs/lib/strings.nix b/pkgs/lib/strings.nix
index 6c4adfaa1a7..ed668e2b927 100644
--- a/pkgs/lib/strings.nix
+++ b/pkgs/lib/strings.nix
@@ -109,6 +109,13 @@ rec {
       stringAsChars subst s;
 
 
+  # Case conversion utilities
+  lowerChars = stringToCharacters "abcdefghijklmnopqrstuvwxyz";
+  upperChars = stringToCharacters "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
+  toLower = replaceChars upperChars lowerChars;
+  toUpper = replaceChars lowerChars upperChars;
+
+
   # Compares strings not requiring context equality
   # Obviously, a workaround but works on all Nix versions
   eqStrings = a: b: (a+(substring 0 0 b)) == ((substring 0 0 a)+b);