2021-02-17 17:02:09 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, autoreconfHook, perl, readline }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "rlwrap";
|
2021-08-18 13:19:15 +00:00
|
|
|
version = "0.45.2";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-02-17 17:02:09 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "hanslub42";
|
|
|
|
repo = "rlwrap";
|
|
|
|
rev = "v${version}";
|
2021-08-18 13:19:15 +00:00
|
|
|
sha256 = "sha256-ubhAOyswdDG0mFKpnSDDq5f7umyCHsW/m721IHdjNMc=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2021-02-17 17:02:09 +00:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace src/readline.c \
|
|
|
|
--replace "if(*p >= 0 && *p < ' ')" "if(*p >= 0 && (*p >= 0) && (*p < ' '))"
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
2021-02-17 17:02:09 +00:00
|
|
|
nativeBuildInputs = [ autoreconfHook perl ];
|
|
|
|
|
|
|
|
buildInputs = [ readline ];
|
|
|
|
|
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Readline wrapper for console programs";
|
|
|
|
homepage = "https://github.com/hanslub42/rlwrap";
|
2021-02-17 17:02:09 +00:00
|
|
|
license = licenses.gpl2Plus;
|
|
|
|
platforms = platforms.unix;
|
2022-10-21 18:38:19 +00:00
|
|
|
maintainers = with maintainers; [ SuperSandro2000 srapenne ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|