nixpkgs/pkgs/tools/misc/rlwrap/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

34 lines
920 B
Nix
Raw Normal View History

2021-02-11 22:36:47 +00:00
{ lib, stdenv, fetchFromGitHub, autoreconfHook, perl, readline }:
stdenv.mkDerivation rec {
pname = "rlwrap";
2023-07-03 10:38:10 +01:00
version = "0.46.1";
2021-02-11 22:36:47 +00:00
src = fetchFromGitHub {
owner = "hanslub42";
repo = "rlwrap";
2023-07-03 10:38:10 +01:00
rev = version;
sha256 = "sha256-yKJXfdxfaCsmPtI0KmTzfFKY+evUuytomVrLsSCYDGo=";
};
2021-02-11 22:36:47 +00:00
postPatch = ''
substituteInPlace src/readline.c \
--replace "if(*p >= 0 && *p < ' ')" "if(*p >= 0 && (*p >= 0) && (*p < ' '))"
'';
2021-02-11 22:36:47 +00:00
nativeBuildInputs = [ autoreconfHook perl ];
buildInputs = [ readline ];
2023-11-17 04:20:00 +00:00
env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.isDarwin "-Wno-error=implicit-function-declaration";
2021-02-11 22:36:47 +00:00
meta = with lib; {
description = "Readline wrapper for console programs";
homepage = "https://github.com/hanslub42/rlwrap";
2021-02-11 22:36:47 +00:00
license = licenses.gpl2Plus;
platforms = platforms.unix;
2023-11-03 16:52:06 +00:00
maintainers = with maintainers; [ jlesquembre ];
2023-11-27 01:17:53 +00:00
mainProgram = "rlwrap";
};
}