2007-08-11 14:34:07 +04: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 15:14:36 +04:00
|
|
|
["true"]
|
|
|
|
["false"]
|
2007-08-11 14:34:07 +04:00
|
|
|
];
|
2007-08-11 15:14:36 +04: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-16 01:17:11 +04: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 14:34:07 +04:00
|
|
|
in
|
|
|
|
assert args.lib.checkReqs args defList reqsList;
|
|
|
|
with args;
|
|
|
|
args.stdenv.mkDerivation {
|
2007-08-16 01:17:11 +04:00
|
|
|
name = args.lib.condConcat "
|
|
|
|
#Fill the name //
|
|
|
|
" nameSuffixes check;
|
2007-08-11 14:34:07 +04:00
|
|
|
|
|
|
|
src = args.
|
|
|
|
#Put fetcher here
|
|
|
|
|
|
|
|
buildInputs = args.lib.filter (x: x!=null) (map getVal buildInputsNames);
|
2007-08-16 01:17:11 +04:00
|
|
|
configureFlags = args.lib.condConcat "" configFlags check;
|
2007-08-11 14:34:07 +04:00
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "
|
|
|
|
#Fill description here
|
|
|
|
";
|
|
|
|
};
|
|
|
|
}
|