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