1{ lib, stdenv, fetchFromGitHub, autoreconfHook, nix-update-script, fetchpatch }:
2
3stdenv.mkDerivation rec {
4 pname = "editline";
5 version = "1.17.1";
6 src = fetchFromGitHub {
7 owner = "troglobit";
8 repo = "editline";
9 rev = version;
10 sha256 = "sha256-0FeDUVCUahbweH24nfaZwa7j7lSfZh1TnQK7KYqO+3g=";
11 };
12
13 patches = [
14 (fetchpatch {
15 name = "fix-for-home-end-in-tmux.patch";
16 url = "https://github.com/troglobit/editline/commit/265c1fb6a0b99bedb157dc7c320f2c9629136518.patch";
17 sha256 = "sha256-9fhQH0hT8BcykGzOUoT18HBtWjjoXnePSGDJQp8GH30=";
18 })
19 ];
20
21 nativeBuildInputs = [ autoreconfHook ];
22
23 outputs = [ "out" "dev" "man" "doc" ];
24
25 passthru.updateScript = nix-update-script { };
26
27 meta = with lib; {
28 homepage = "https://troglobit.com/projects/editline/";
29 description = "A readline() replacement for UNIX without termcap (ncurses)";
30 license = licenses.bsdOriginal;
31 maintainers = with maintainers; [ dtzWill oxalica ];
32 platforms = platforms.all;
33 };
34}