summary refs log tree commit diff
path: root/pkgs/top-level/builder-defs.nix
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2009-02-09 16:51:03 +0000
committerEelco Dolstra <eelco.dolstra@logicblox.com>2009-02-09 16:51:03 +0000
commit599015e8b071bc8d38779fbfc37961db1ac0f464 (patch)
tree12cfb8ef316f4021ef81d135a5c331804a817809 /pkgs/top-level/builder-defs.nix
parenteebb6f106c445c5661975a60a55b07ad91c6fa47 (diff)
downloadnixlib-599015e8b071bc8d38779fbfc37961db1ac0f464.tar
nixlib-599015e8b071bc8d38779fbfc37961db1ac0f464.tar.gz
nixlib-599015e8b071bc8d38779fbfc37961db1ac0f464.tar.bz2
nixlib-599015e8b071bc8d38779fbfc37961db1ac0f464.tar.lz
nixlib-599015e8b071bc8d38779fbfc37961db1ac0f464.tar.xz
nixlib-599015e8b071bc8d38779fbfc37961db1ac0f464.tar.zst
nixlib-599015e8b071bc8d38779fbfc37961db1ac0f464.zip
* 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
Diffstat (limited to 'pkgs/top-level/builder-defs.nix')
-rw-r--r--pkgs/top-level/builder-defs.nix2
1 files changed, 2 insertions, 0 deletions
diff --git a/pkgs/top-level/builder-defs.nix b/pkgs/top-level/builder-defs.nix
index 4efed47f6d0b..2012278ffd7b 100644
--- a/pkgs/top-level/builder-defs.nix
+++ b/pkgs/top-level/builder-defs.nix
@@ -12,6 +12,8 @@ args: with args; with stringsWithDeps; with lib;
           "README" "AUTHORS" "ChangeLog" "CHANGES" "LICENCE" "COPYRIGHT"] ++ 
           (optional (getAttr ["forceCopyDoc"] true args) "doc"); 
 
+        hasSuffixHack = a: b: hasSuffix (a+(substring 0 0 b)) ((substring 0 0 a)+b);
+        
         archiveType = s: 
                 (if hasSuffixHack ".tar" s then "tar"
                 else if (hasSuffixHack ".tar.gz" s) || (hasSuffixHack ".tgz" s) then "tgz"