Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ 2 fetchurl, 3 lib, 4 stdenv, 5 ncurses, 6}: 7 8stdenv.mkDerivation rec { 9 pname = "readline"; 10 version = "7.0p${toString (builtins.length upstreamPatches)}"; 11 12 src = fetchurl { 13 url = "mirror://gnu/readline/readline-${meta.branch}.tar.gz"; 14 sha256 = "0d13sg9ksf982rrrmv5mb6a2p4ys9rvg9r71d6il0vr8hmql63bm"; 15 }; 16 17 outputs = [ 18 "out" 19 "dev" 20 "man" 21 "doc" 22 "info" 23 ]; 24 25 strictDeps = true; 26 propagatedBuildInputs = [ ncurses ]; 27 28 patchFlags = [ "-p0" ]; 29 30 upstreamPatches = ( 31 let 32 patch = 33 nr: sha256: 34 fetchurl { 35 url = "mirror://gnu/readline/readline-${meta.branch}-patches/readline70-${nr}"; 36 inherit sha256; 37 }; 38 in 39 import ./readline-7.0-patches.nix patch 40 ); 41 42 patches = [ 43 ./link-against-ncurses.patch 44 ./no-arch_only-6.3.patch 45 ] 46 ++ upstreamPatches; 47 48 meta = with lib; { 49 description = "Library for interactive line editing"; 50 51 longDescription = '' 52 The GNU Readline library provides a set of functions for use by 53 applications that allow users to edit command lines as they are 54 typed in. Both Emacs and vi editing modes are available. The 55 Readline library includes additional functions to maintain a 56 list of previously-entered command lines, to recall and perhaps 57 reedit those lines, and perform csh-like history expansion on 58 previous commands. 59 60 The history facilities are also placed into a separate library, 61 the History library, as part of the build process. The History 62 library may be used without Readline in applications which 63 desire its capabilities. 64 ''; 65 66 homepage = "https://savannah.gnu.org/projects/readline/"; 67 68 license = licenses.gpl3Plus; 69 70 maintainers = [ ]; 71 72 platforms = platforms.unix; 73 branch = "7.0"; 74 }; 75}