From 7cc066df68d53f7683391beb8f19fca8f500dbc0 Mon Sep 17 00:00:00 2001 From: Michael Raskin <7c6f434c@mail.ru> Date: Wed, 21 May 2008 13:27:41 +0000 Subject: [PATCH] LZMA support in builderDefs; gpm added svn path=/nixpkgs/trunk/; revision=11874 --- pkgs/top-level/all-packages.nix | 6 ++++++ pkgs/top-level/builder-defs.nix | 4 ++++ 2 files changed, 10 insertions(+) diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 0c0a08283ba..e780867e36e 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -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 diff --git a/pkgs/top-level/builder-defs.nix b/pkgs/top-level/builder-defs.nix index b6f1a07f824..8f2a2b0d0b2 100644 --- a/pkgs/top-level/builder-defs.nix +++ b/pkgs/top-level/builder-defs.nix @@ -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 |