1{ stdenv, fetchurl, ncurses, groff }: 2 3stdenv.mkDerivation rec { 4 name = "libedit-20150325-3.1"; 5 6 src = fetchurl { 7 url = "http://www.thrysoee.dk/editline/${name}.tar.gz"; 8 sha256 = "1if8zi9h52m80ck796an28rrqfljk2n8cn25m3fl0prwz155x2n8"; 9 }; 10 11 # Have `configure' avoid `/usr/bin/nroff' in non-chroot builds. 12 NROFF = "${groff}/bin/nroff"; 13 14 patches = [ ./01-cygwin.patch ./freebsd-wchar.patch ]; 15 16 propagatedBuildInputs = [ ncurses ]; 17 18 configureFlags = [ "--enable-widec" ]; 19 20 postInstall = '' 21 find $out/lib -type f | grep '\.\(la\|pc\)''$' | xargs sed -i \ 22 -e 's,-lncurses[a-z]*,-L${ncurses}/lib -lncursesw,g' 23 ''; 24 25 meta = with stdenv.lib; { 26 homepage = "http://www.thrysoee.dk/editline/"; 27 description = "A port of the NetBSD Editline library (libedit)"; 28 license = licenses.bsd3; 29 platforms = platforms.all; 30 }; 31}