about summary refs log tree commit diff
path: root/pkgs/tools/archivers
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2010-07-22 12:20:11 +0000
committerLudovic Courtès <ludo@gnu.org>2010-07-22 12:20:11 +0000
commit8115040c08396d99bc2b781f1c639b505278c8dd (patch)
tree145c592e7e15baf5c7f345ba5421e493b438575c /pkgs/tools/archivers
parented3640e9de88e07824935cb0d76291588464e067 (diff)
downloadnixlib-8115040c08396d99bc2b781f1c639b505278c8dd.tar
nixlib-8115040c08396d99bc2b781f1c639b505278c8dd.tar.gz
nixlib-8115040c08396d99bc2b781f1c639b505278c8dd.tar.bz2
nixlib-8115040c08396d99bc2b781f1c639b505278c8dd.tar.lz
nixlib-8115040c08396d99bc2b781f1c639b505278c8dd.tar.xz
nixlib-8115040c08396d99bc2b781f1c639b505278c8dd.tar.zst
nixlib-8115040c08396d99bc2b781f1c639b505278c8dd.zip
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.patch15
-rw-r--r--pkgs/tools/archivers/cpio/default.nix8
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 000000000000..0e8ff168c526
--- /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 25777e843111..4fa99a0ea42b 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 ]; }))