Refactor mkFlag out of old packages

This commit is contained in:
William A. Kennington III
2015-05-22 13:54:52 -07:00
parent 25a148fa19
commit 3117e0c897
12 changed files with 173 additions and 215 deletions
-7
View File
@@ -28,13 +28,6 @@ assert cryptopp != null || (nss != null && nspr != null);
with stdenv.lib;
let
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 ""}";
mkEnable = mkFlag "enable-" "disable-";
mkWith = mkFlag "with-" "without-";
mkOther = mkFlag "" "" true;
hasServer = snappy != null && leveldb != null;
hasMon = hasServer;
hasMds = hasServer;