* Split lib/default.nix into several files, as it had become a big

mess.  Also cleaned up some functions:

  - foldl appeared broken (it recursively called fold).
  - Renamed logicalAND/logicalOR to and/or.
  - Removed listOfListsToAttrs, eqStrings: obsolete.
  - Removed isInList, which does the same thing as elem.
  - stringToCharacters: don't return a "" at the end of the list.
  - Renamed concatList to concat, as concatList (singular) is a
    misnomer: it takes two lists.  Likewise, renamed mergeAttr to
    mergeAttrs.

  misc.nix still contains a lot of stuff that should be refactored and
  moved to other files.

svn path=/nixpkgs/trunk/; revision=14013
This commit is contained in:
Eelco Dolstra
2009-02-09 16:51:03 +00:00
parent eebb6f106c
commit 599015e8b0
14 changed files with 982 additions and 902 deletions

View File

@@ -1,7 +1,8 @@
args:
args.stdenv.lib.listOfListsToAttrs [
[ "3.08.0" (import ./3.08.0.nix args) ]
[ "3.09.1" (import ./3.09.1.nix args) ]
[ "3.10.0" (import ./3.10.0.nix args) ]
[ "default" (import ./3.09.1.nix args) ]
builtins.listToAttrs [
{ name = "3.08.0"; value = import ./3.08.0.nix args; }
{ name = "3.09.1"; value = import ./3.09.1.nix args; }
{ name = "3.10.0"; value = import ./3.10.0.nix args; }
{ name = "default"; value = import ./3.09.1.nix args; }
]

View File

@@ -124,7 +124,7 @@ in
buildPhase = ''python setup.py $setupFlags build'';
installPhase = ''python setup.py $setupFlags install --prefix=$out'';
mergeAttrBy = {
setupFlags = lib.concatList;
setupFlags = lib.concat;
};
};
@@ -219,8 +219,8 @@ in
done
'';
mergeAttrBy = {
phases = lib.concatList;
pySrcs = lib.concatList;
phases = lib.concat;
pySrcs = lib.concat;
pyCheck = x : y : "${x}\n${y}";
};
}