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