summary refs log tree commit diff
path: root/pkgs/development/libraries/readline/readline6.3.nix
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2014-09-12 11:10:02 +0200
committerEelco Dolstra <eelco.dolstra@logicblox.com>2014-09-12 11:15:13 +0200
commitd2143c73bbc4dc3e34f61f47be417c199bd83c48 (patch)
treec1cd373c7dda77ef1def5b63f75718be27f3768c /pkgs/development/libraries/readline/readline6.3.nix
parentdf4c114252051e8e3f21578d53c890b95456f784 (diff)
downloadnixpkgs-d2143c73bbc4dc3e34f61f47be417c199bd83c48.tar
nixpkgs-d2143c73bbc4dc3e34f61f47be417c199bd83c48.tar.gz
nixpkgs-d2143c73bbc4dc3e34f61f47be417c199bd83c48.tar.bz2
nixpkgs-d2143c73bbc4dc3e34f61f47be417c199bd83c48.tar.lz
nixpkgs-d2143c73bbc4dc3e34f61f47be417c199bd83c48.tar.xz
nixpkgs-d2143c73bbc4dc3e34f61f47be417c199bd83c48.tar.zst
nixpkgs-d2143c73bbc4dc3e34f61f47be417c199bd83c48.zip
readline-6.3: Fix building on Darwin
The zip file contains files named CHANGELOG and ChangeLog, so the
build fails on case-insensitive systems with:

  error: creating file `/nix/store/nix-4888-0/unpacked/ChangeLog': File exists

The official tar distribution does not have this problem.
Diffstat (limited to 'pkgs/development/libraries/readline/readline6.3.nix')
-rw-r--r--pkgs/development/libraries/readline/readline6.3.nix33
1 files changed, 18 insertions, 15 deletions
diff --git a/pkgs/development/libraries/readline/readline6.3.nix b/pkgs/development/libraries/readline/readline6.3.nix
index 04db1ffd446..38ecc034d89 100644
--- a/pkgs/development/libraries/readline/readline6.3.nix
+++ b/pkgs/development/libraries/readline/readline6.3.nix
@@ -1,13 +1,11 @@
-{ fetchzip, stdenv, ncurses }:
+{ fetchurl, stdenv, ncurses }:
 
-stdenv.mkDerivation (rec {
+stdenv.mkDerivation rec {
   name = "readline-6.3p08";
 
-  src = fetchzip {
-    #url = "mirror://gnu/readline/${name}.tar.gz";
-    url = "http://git.savannah.gnu.org/cgit/readline.git/snapshot/"
-      + "readline-a73b98f779b388a5d0624e02e8bb187246e3e396.tar.gz";
-    sha256 = "19ji3wrv4fs79fd0nkacjy9q94pvy2cm66yb3aqysahg0cbrz5l1";
+  src = fetchurl {
+    url = "mirror://gnu/readline/readline-6.3.tar.gz";
+    sha256 = "0hzxr9jxqqx5sxsv9vmlxdnvlr9vi4ih1avjb869hbs6p5qn1fjn";
   };
 
   propagatedBuildInputs = [ncurses];
@@ -17,7 +15,19 @@ stdenv.mkDerivation (rec {
   patches =
     [ ./link-against-ncurses.patch
       ./no-arch_only-6.3.patch
-    ];
+    ]
+    ++
+    (let
+       patch = nr: sha256:
+         fetchurl {
+           url = "mirror://gnu/readline/readline-6.3-patches/readline63-${nr}";
+           inherit sha256;
+         };
+     in
+       import ./readline-6.3-patches.nix patch);
+
+  # Don't run the native `strip' when cross-compiling.
+  dontStrip = stdenv ? cross;
 
   meta = with stdenv.lib; {
     description = "Library for interactive line editing";
@@ -46,10 +56,3 @@ stdenv.mkDerivation (rec {
     platforms = platforms.unix;
   };
 }
-
-//
-
-# Don't run the native `strip' when cross-compiling.
-(if (stdenv ? cross)
- then { dontStrip = true; }
- else { }))