summary refs log tree commit diff
path: root/lib/customisation.nix
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2015-06-01 20:52:03 +0200
committerEelco Dolstra <eelco.dolstra@logicblox.com>2015-06-04 14:54:48 +0200
commit3096d03435bb177af8c4868a8efa637b393f2715 (patch)
treeb5353e40eb18bba0e86b04a176879f3e635f48e7 /lib/customisation.nix
parent4f60156afbb8d61d8d28db8ab594ec9328946d71 (diff)
downloadnixpkgs-3096d03435bb177af8c4868a8efa637b393f2715.tar
nixpkgs-3096d03435bb177af8c4868a8efa637b393f2715.tar.gz
nixpkgs-3096d03435bb177af8c4868a8efa637b393f2715.tar.bz2
nixpkgs-3096d03435bb177af8c4868a8efa637b393f2715.tar.lz
nixpkgs-3096d03435bb177af8c4868a8efa637b393f2715.tar.xz
nixpkgs-3096d03435bb177af8c4868a8efa637b393f2715.tar.zst
nixpkgs-3096d03435bb177af8c4868a8efa637b393f2715.zip
Revert "Refactor mkFlag / shouldUsePkg into the nixpkgs libraries"
This reverts commit 25a148fa196b944b3f134527da87e43d88c066f9.
Diffstat (limited to 'lib/customisation.nix')
-rw-r--r--lib/customisation.nix23
1 files changed, 0 insertions, 23 deletions
diff --git a/lib/customisation.nix b/lib/customisation.nix
index ca3dd4980da..91a25055df2 100644
--- a/lib/customisation.nix
+++ b/lib/customisation.nix
@@ -158,27 +158,4 @@ rec {
       drv' = (lib.head outputsList).value;
     in lib.deepSeq drv' drv';
 
-
-  /* Tests whether a derivation can be used by the current platform
-     Returns the derivation if true, otherwise null. */
-  shouldUsePkgSystem = system: pkg_: let pkg = (builtins.tryEval pkg_).value;
-    in if lib.any (x: x == system) (pkg.meta.platforms or [])
-      then pkg
-      else null;
-
-  /* Returns a configure flag string in an autotools format
-     trueStr: Prepended when cond is true
-     falseStr: Prepended when cond is false
-     cond: The condition for the prepended string type and value
-     name: The flag name
-     val: The value of the flag only set when cond is true */
-  mkFlag = trueStr: falseStr: cond: name: val:
-    if cond == null then null else
-      "--${if cond != false then trueStr else falseStr}${name}"
-      + "${if val != null && cond != false then "=${val}" else ""}";
-
-  /* Flag setting helpers for autotools like packages */
-  mkEnable = mkFlag "enable-" "disable-";
-  mkWith = mkFlag "with-" "without-";
-  mkOther = mkFlag "" "" true;
 }