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";
|
2023-07-15 17:15:38 +00:00
|
|
|
version = "0.46.1";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-02-17 17:02:09 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "hanslub42";
|
|
|
|
repo = "rlwrap";
|
2023-07-15 17:15:38 +00:00
|
|
|
rev = version;
|
|
|
|
sha256 = "sha256-yKJXfdxfaCsmPtI0KmTzfFKY+evUuytomVrLsSCYDGo=";
|
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 ];
|
|
|
|
|
2024-01-02 11:29:13 +00:00
|
|
|
env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.isDarwin "-Wno-error=implicit-function-declaration";
|
|
|
|
|
2021-02-17 17:02:09 +00:00
|
|
|
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;
|
2023-11-16 04:20:00 +00:00
|
|
|
maintainers = with maintainers; [ jlesquembre ];
|
2024-01-02 11:29:13 +00:00
|
|
|
mainProgram = "rlwrap";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|