summaryrefslogtreecommitdiffstats
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)
Revert "Refactor mkFlag / shouldUsePkg into the nixpkgs libraries"
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 ca3dd4980da3..91a25055df29 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;
}