LZMA support in builderDefs; gpm added

svn path=/nixpkgs/trunk/; revision=11874
This commit is contained in:
Michael Raskin 2008-05-21 13:27:41 +00:00
parent ad848d5a01
commit 7cc066df68
2 changed files with 10 additions and 0 deletions

View File

@ -4078,6 +4078,12 @@ let pkgs = rec {
inherit fetchurl stdenv;
};
gpm = builderDefsPackage (selectVersion ../servers/gpm "1.20.3pre6") {
inherit lzma ncurses;
bison = bison23;
flex = flex2535;
} null;
hal = import ../os-specific/linux/hal {
inherit fetchurl stdenv pkgconfig python pciutils usbutils expat
libusb dbus dbus_glib libvolume_id perl perlXMLParser

View File

@ -13,6 +13,7 @@ args: with args; with stringsWithDeps; with lib;
(if hasSuffixHack ".tar" s then "tar"
else if (hasSuffixHack ".tar.gz" s) || (hasSuffixHack ".tgz" s) then "tgz"
else if (hasSuffixHack ".tar.bz2" s) || (hasSuffixHack ".tbz2" s) then "tbz2"
else if (hasSuffixHack ".tar.lzma" s) then "tar.lzma"
else if (hasSuffixHack ".zip" s) || (hasSuffixHack ".ZIP" s) then "zip"
else if (hasSuffixHack "-cvs-export" s) then "cvs-dir"
else if (hasSuffixHack ".nar.bz2" s) then "narbz2"
@ -190,6 +191,9 @@ args: with args; with stringsWithDeps; with lib;
" else if (archiveType s) == "tbz2" then "
tar xvjf '${s}'
cd \"\$(tar tjf '${s}' | head -1 | sed -e 's@/.*@@' )\"
" else if (archiveType s) == "tar.lzma" then "
unlzma -d -c <'${s}' | tar xv
cd \"\$(unlzma -d -c <'${s}' | tar t | head -1 | sed -e 's@/.*@@' )\"
" else if (archiveType s) == "zip" then "
unzip '${s}'
cd \"$( unzip -lqq '${s}' | tail -1 |