diff options
author | Ludovic Courtès <ludo@gnu.org> | 2010-07-22 12:20:11 +0000 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2010-07-22 12:20:11 +0000 |
commit | 8115040c08396d99bc2b781f1c639b505278c8dd (patch) | |
tree | 145c592e7e15baf5c7f345ba5421e493b438575c /pkgs/tools/archivers | |
parent | ed3640e9de88e07824935cb0d76291588464e067 (diff) |
GNU cpio: Add fix for Darwin.
svn path=/nixpkgs/trunk/; revision=22705
Diffstat (limited to 'pkgs/tools/archivers')
-rw-r--r-- | pkgs/tools/archivers/cpio/darwin-fix.patch | 15 | ||||
-rw-r--r-- | pkgs/tools/archivers/cpio/default.nix | 8 |
2 files changed, 22 insertions, 1 deletions
diff --git a/pkgs/tools/archivers/cpio/darwin-fix.patch b/pkgs/tools/archivers/cpio/darwin-fix.patch new file mode 100644 index 0000000000000..0e8ff168c526d --- /dev/null +++ b/pkgs/tools/archivers/cpio/darwin-fix.patch @@ -0,0 +1,15 @@ +Fix Darwin builds. + +From <http://git.savannah.gnu.org/cgit/cpio.git/commit/?id=3a7a1820d4cecbd77c7b74c785af5942510bf080>. +See also <http://lists.gnu.org/archive/html/bug-cpio/2010-07/msg00001.html>. + +diff --git a/src/filetypes.h b/src/filetypes.h +index f80faab..81f0c32 100644 +--- a/src/filetypes.h ++++ b/src/filetypes.h +@@ -81,5 +81,3 @@ + #ifndef S_ISLNK + #define lstat stat + #endif +-int lstat (); +-int stat (); diff --git a/pkgs/tools/archivers/cpio/default.nix b/pkgs/tools/archivers/cpio/default.nix index 25777e8431118..4fa99a0ea42bb 100644 --- a/pkgs/tools/archivers/cpio/default.nix +++ b/pkgs/tools/archivers/cpio/default.nix @@ -1,6 +1,6 @@ {stdenv, fetchurl}: -stdenv.mkDerivation { +stdenv.mkDerivation ({ name = "cpio-2.11"; src = fetchurl { @@ -34,3 +34,9 @@ stdenv.mkDerivation { platforms = stdenv.lib.platforms.all; }; } + +// + +(if stdenv.isLinux + then {} + else { patches = [ ./darwin-fix.patch ]; })) |