diff options
author | Michael Raskin <7c6f434c@mail.ru> | 2007-11-22 20:26:00 +0000 |
---|---|---|
committer | Michael Raskin <7c6f434c@mail.ru> | 2007-11-22 20:26:00 +0000 |
commit | 2b5369552cc33e4767a4f8275dbbd903cbdd681c (patch) | |
tree | 66d202f74e607c9edd2e2d50c3fadd4a77eca747 /pkgs/top-level/builder-defs.nix | |
parent | ebfbf03a250a213e541fbeeaaae185f07d1d42bf (diff) | |
download | nixlib-2b5369552cc33e4767a4f8275dbbd903cbdd681c.tar nixlib-2b5369552cc33e4767a4f8275dbbd903cbdd681c.tar.gz nixlib-2b5369552cc33e4767a4f8275dbbd903cbdd681c.tar.bz2 nixlib-2b5369552cc33e4767a4f8275dbbd903cbdd681c.tar.lz nixlib-2b5369552cc33e4767a4f8275dbbd903cbdd681c.tar.xz nixlib-2b5369552cc33e4767a4f8275dbbd903cbdd681c.tar.zst nixlib-2b5369552cc33e4767a4f8275dbbd903cbdd681c.zip |
Added XScreensaver; also changed version-stub.nix (now it does sumArgs itself, and requires builderDefs to be used) and added a merge of composing-builder and declarative flag processing.
svn path=/nixpkgs/trunk/; revision=9776
Diffstat (limited to 'pkgs/top-level/builder-defs.nix')
-rw-r--r-- | pkgs/top-level/builder-defs.nix | 28 |
1 files changed, 26 insertions, 2 deletions
diff --git a/pkgs/top-level/builder-defs.nix b/pkgs/top-level/builder-defs.nix index ae5224f71011..01940499d610 100644 --- a/pkgs/top-level/builder-defs.nix +++ b/pkgs/top-level/builder-defs.nix @@ -186,7 +186,7 @@ args: with args; with stringsWithDeps; with lib; ) [minInit]; doConfigure = FullDepEntry (" - ./configure --prefix=\"\$prefix\" ${toString (getAttr ["configureFlags"] "" args)} + ./configure --prefix=\"\$prefix\" ${toString configureFlags} ") [minInit addInputs doUnpack]; doAutotools = FullDepEntry (" @@ -200,7 +200,7 @@ args: with args; with stringsWithDeps; with lib; ")[minInit addInputs doUnpack]; doMake = FullDepEntry (" - make ${toString (getAttr ["makeFlags"] "" args)} + make ${toString makeFlags} ") [minInit addInputs doUnpack]; doUnpack = toSrcDir (toString src); @@ -269,4 +269,28 @@ args: with args; with stringsWithDeps; with lib; textClosure = textClosureMap makeNest; inherit noDepEntry FullDepEntry PackEntry; + + defList = (getAttr ["defList"] [] args); + getVal = getValue args defList; + check = checkFlag args; + reqsList = getAttr ["reqsList"] [] args; + buildInputsNames = filter (x: (null != getVal x)) + (uniqList {inputList = + (concatLists (map + (x:(if (x==[]) then [] else builtins.tail x)) + reqsList));}); + configFlags = getAttr ["configFlags"] [] args; + buildFlags = getAttr ["buildFlags"] [] args; + nameSuffixes = getAttr ["nameSuffixes"] [] args; + autoBuildInputs = assert (checkReqs args defList reqsList); + filter (x: x!=null) (map getVal buildInputsNames); + autoConfigureFlags = condConcat "" configFlags check; + autoMakeFlags = condConcat "" buildFlags check; + useConfig = getAttr ["useConfig"] false args; + buildInputs = if useConfig then autoBuildInputs else getAttr ["buildInputs"] [] args; + configureFlags = if useConfig then autoConfigureFlags else + getAttr ["configureFlags"] "" args; + makeFlags = if useConfig then autoMakeFlags else getAttr ["makeFlags"] "" args; + + inherit lib; }) // args |