2021-05-20 23:08:51 +00:00
|
|
|
{ fetchurl, stdenv, lib, ncurses
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "readline";
|
2023-01-20 10:41:00 +00:00
|
|
|
version = "8.2p${toString (builtins.length upstreamPatches)}";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "mirror://gnu/readline/readline-${meta.branch}.tar.gz";
|
2023-01-20 10:41:00 +00:00
|
|
|
sha256 = "sha256-P+txcfFqhO6CyhijbXub4QmlLAT0kqBTMx19EJUAfDU=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
outputs = [ "out" "dev" "man" "doc" "info" ];
|
|
|
|
|
2023-03-27 19:17:25 +00:00
|
|
|
strictDeps = true;
|
|
|
|
propagatedBuildInputs = [ ncurses ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
patchFlags = [ "-p0" ];
|
|
|
|
|
|
|
|
upstreamPatches =
|
|
|
|
(let
|
|
|
|
patch = nr: sha256:
|
|
|
|
fetchurl {
|
2023-01-20 10:41:00 +00:00
|
|
|
url = "mirror://gnu/readline/readline-${meta.branch}-patches/readline82-${nr}";
|
2020-04-24 23:36:52 +00:00
|
|
|
inherit sha256;
|
|
|
|
};
|
|
|
|
in
|
2023-01-20 10:41:00 +00:00
|
|
|
import ./readline-8.2-patches.nix patch);
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
patches =
|
|
|
|
[ ./link-against-ncurses.patch
|
2023-01-20 10:41:00 +00:00
|
|
|
./no-arch_only-8.2.patch
|
2020-04-24 23:36:52 +00:00
|
|
|
]
|
|
|
|
++ upstreamPatches;
|
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Library for interactive line editing";
|
|
|
|
|
|
|
|
longDescription = ''
|
|
|
|
The GNU Readline library provides a set of functions for use by
|
|
|
|
applications that allow users to edit command lines as they are
|
|
|
|
typed in. Both Emacs and vi editing modes are available. The
|
|
|
|
Readline library includes additional functions to maintain a
|
|
|
|
list of previously-entered command lines, to recall and perhaps
|
|
|
|
reedit those lines, and perform csh-like history expansion on
|
|
|
|
previous commands.
|
|
|
|
|
|
|
|
The history facilities are also placed into a separate library,
|
|
|
|
the History library, as part of the build process. The History
|
|
|
|
library may be used without Readline in applications which
|
|
|
|
desire its capabilities.
|
|
|
|
'';
|
|
|
|
|
|
|
|
homepage = "https://savannah.gnu.org/projects/readline/";
|
|
|
|
|
|
|
|
license = licenses.gpl3Plus;
|
|
|
|
|
|
|
|
maintainers = with maintainers; [ dtzWill ];
|
|
|
|
|
|
|
|
platforms = platforms.unix;
|
2023-01-20 10:41:00 +00:00
|
|
|
branch = "8.2";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|