2007-08-11 11:34:07 +01:00
|
|
|
args:
|
|
|
|
let
|
|
|
|
defList = [
|
|
|
|
(assert false) - correct it; List element is of form ["name" default]
|
|
|
|
];
|
|
|
|
#stdenv and fetchurl are added automatically
|
|
|
|
getVal = (args.lib.getValue args defList);
|
|
|
|
check = args.lib.checkFlag args;
|
|
|
|
reqsList = [
|
|
|
|
(assert false) - correct it; List element is of form ["name" "requirement-name" ... ]
|
2007-08-11 12:14:36 +01:00
|
|
|
["true"]
|
|
|
|
["false"]
|
2007-08-11 11:34:07 +01:00
|
|
|
];
|
2007-08-11 12:14:36 +01:00
|
|
|
buildInputsNames = args.lib.filter (x: (null!=getVal x))
|
|
|
|
(args.lib.uniqList {inputList =
|
|
|
|
(args.lib.concatLists (map
|
|
|
|
(x:(if (x==[]) then [] else builtins.tail x))
|
|
|
|
reqsList));});
|
2007-08-15 22:17:11 +01:00
|
|
|
configFlags = [
|
|
|
|
"true" ""
|
|
|
|
(assert false) - fill it; list consists of pairs "condition" "flags". "True" means always.
|
|
|
|
];
|
|
|
|
nameSuffixes = [
|
|
|
|
(assert false) - fill it if needed, or blank it.
|
|
|
|
];
|
2007-08-11 11:34:07 +01:00
|
|
|
in
|
|
|
|
assert args.lib.checkReqs args defList reqsList;
|
|
|
|
with args;
|
|
|
|
args.stdenv.mkDerivation {
|
2007-08-15 22:17:11 +01:00
|
|
|
name = args.lib.condConcat "
|
|
|
|
#Fill the name //
|
|
|
|
" nameSuffixes check;
|
2007-08-11 11:34:07 +01:00
|
|
|
|
|
|
|
src = args.
|
|
|
|
#Put fetcher here
|
|
|
|
|
|
|
|
buildInputs = args.lib.filter (x: x!=null) (map getVal buildInputsNames);
|
2007-08-15 22:17:11 +01:00
|
|
|
configureFlags = args.lib.condConcat "" configFlags check;
|
2007-08-11 11:34:07 +01:00
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "
|
|
|
|
#Fill description here
|
|
|
|
";
|
|
|
|
};
|
|
|
|
}
|