summary refs log tree commit diff
path: root/pkgs/development/libraries/libedit
diff options
context:
space:
mode:
authorVladimír Čunát <vcunat@gmail.com>2016-01-19 09:55:31 +0100
committerVladimír Čunát <vcunat@gmail.com>2016-01-19 09:55:31 +0100
commit716aac2519a7571e7f5fd984a886d579a4a051c5 (patch)
tree53cf89cf764d787f4dc8f08474479892b9733177 /pkgs/development/libraries/libedit
parentf8472457a440de3c44f6f604142d678b6ae2a762 (diff)
parent53b389327e34de319dc0dbda2b6bcab1a69db69d (diff)
downloadnixlib-716aac2519a7571e7f5fd984a886d579a4a051c5.tar
nixlib-716aac2519a7571e7f5fd984a886d579a4a051c5.tar.gz
nixlib-716aac2519a7571e7f5fd984a886d579a4a051c5.tar.bz2
nixlib-716aac2519a7571e7f5fd984a886d579a4a051c5.tar.lz
nixlib-716aac2519a7571e7f5fd984a886d579a4a051c5.tar.xz
nixlib-716aac2519a7571e7f5fd984a886d579a4a051c5.tar.zst
nixlib-716aac2519a7571e7f5fd984a886d579a4a051c5.zip
Merge branch 'staging' into closure-size
Diffstat (limited to 'pkgs/development/libraries/libedit')
-rw-r--r--pkgs/development/libraries/libedit/default.nix14
-rw-r--r--pkgs/development/libraries/libedit/freebsd-wchar.patch13
2 files changed, 19 insertions, 8 deletions
diff --git a/pkgs/development/libraries/libedit/default.nix b/pkgs/development/libraries/libedit/default.nix
index 23b26e343db6..abd04849beb1 100644
--- a/pkgs/development/libraries/libedit/default.nix
+++ b/pkgs/development/libraries/libedit/default.nix
@@ -11,23 +11,21 @@ stdenv.mkDerivation rec {
   # Have `configure' avoid `/usr/bin/nroff' in non-chroot builds.
   NROFF = "${groff}/bin/nroff";
 
-  patches = if stdenv.isCygwin then [
-    ./01-cygwin.patch
-  ] else null;
+  patches = [ ./01-cygwin.patch ./freebsd-wchar.patch ];
+
+  propagatedBuildInputs = [ ncurses ];
+
+  configureFlags = [ "--enable-widec" ];
 
   postInstall = ''
     find $out/lib -type f | grep '\.\(la\|pc\)''$' | xargs sed -i \
       -e 's,-lncurses[a-z]*,-L${ncurses.lib}/lib -lncursesw,g'
   '';
 
-  configureFlags = [ "--enable-widec" ];
-
-  propagatedBuildInputs = [ ncurses ];
-
   meta = with stdenv.lib; {
     homepage = "http://www.thrysoee.dk/editline/";
     description = "A port of the NetBSD Editline library (libedit)";
-    license = licenses.bsd3; 
+    license = licenses.bsd3;
     platforms = platforms.all;
   };
 }
diff --git a/pkgs/development/libraries/libedit/freebsd-wchar.patch b/pkgs/development/libraries/libedit/freebsd-wchar.patch
new file mode 100644
index 000000000000..6bf7fb0ef69a
--- /dev/null
+++ b/pkgs/development/libraries/libedit/freebsd-wchar.patch
@@ -0,0 +1,13 @@
+diff --git a/src/chartype.h b/src/chartype.h
+index 0beee17..4ac86f3 100644
+--- a/src/chartype.h
++++ b/src/chartype.h
+@@ -44,7 +44,7 @@
+  * supports non-BMP code points without requiring UTF-16, but nothing
+  * seems to actually advertise this properly, despite Unicode 3.1 having
+  * been around since 2001... */
+-#if !defined(__NetBSD__) && !defined(__sun) && !(defined(__APPLE__) && defined(__MACH__)) && !defined(__OpenBSD__)
++#if !defined(__FreeBSD__) && !defined(__NetBSD__) && !defined(__sun) && !(defined(__APPLE__) && defined(__MACH__)) && !defined(__OpenBSD__)
+ #ifndef __STDC_ISO_10646__
+ /* In many places it is assumed that the first 127 code points are ASCII
+  * compatible, so ensure wchar_t indeed does ISO 10646 and not some other