2021-02-11 22:36:47 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, autoreconfHook, perl, readline }:
|
2008-01-23 23:39:06 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 13:41:18 +01:00
|
|
|
pname = "rlwrap";
|
2021-02-11 22:36:47 +00:00
|
|
|
version = "0.45";
|
2010-07-29 19:55:16 +01:00
|
|
|
|
2021-02-11 22:36:47 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "hanslub42";
|
|
|
|
repo = "rlwrap";
|
|
|
|
rev = "v${version}";
|
|
|
|
sha256 = "1ppkjdnxrxh99g4xaiaglm5bmp24006rfahci0cn1g7zwilkjy8s";
|
2010-07-29 19:55:16 +01:00
|
|
|
};
|
|
|
|
|
2021-02-11 22:36:47 +00:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace src/readline.c \
|
|
|
|
--replace "if(*p >= 0 && *p < ' ')" "if(*p >= 0 && (*p >= 0) && (*p < ' '))"
|
2010-12-17 10:56:35 +00:00
|
|
|
'';
|
|
|
|
|
2021-02-11 22:36:47 +00:00
|
|
|
nativeBuildInputs = [ autoreconfHook perl ];
|
|
|
|
|
|
|
|
buildInputs = [ readline ];
|
|
|
|
|
|
|
|
meta = with lib; {
|
2010-07-29 19:55:16 +01:00
|
|
|
description = "Readline wrapper for console programs";
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "https://github.com/hanslub42/rlwrap";
|
2021-02-11 22:36:47 +00:00
|
|
|
license = licenses.gpl2Plus;
|
|
|
|
platforms = platforms.unix;
|
|
|
|
maintainers = with maintainers; [ SuperSandro2000 ];
|
2010-07-29 19:55:16 +01:00
|
|
|
};
|
2008-01-23 23:39:06 +00:00
|
|
|
}
|