depot/third_party/nixpkgs/pkgs/tools/misc/rlwrap/default.nix
Default email 9c6ee729d6 Project import generated by Copybara.
GitOrigin-RevId: 6cee3b5893090b0f5f0a06b4cf42ca4e60e5d222
2023-07-15 19:15:38 +02:00

30 lines
794 B
Nix

{ lib, stdenv, fetchFromGitHub, autoreconfHook, perl, readline }:
stdenv.mkDerivation rec {
pname = "rlwrap";
version = "0.46.1";
src = fetchFromGitHub {
owner = "hanslub42";
repo = "rlwrap";
rev = version;
sha256 = "sha256-yKJXfdxfaCsmPtI0KmTzfFKY+evUuytomVrLsSCYDGo=";
};
postPatch = ''
substituteInPlace src/readline.c \
--replace "if(*p >= 0 && *p < ' ')" "if(*p >= 0 && (*p >= 0) && (*p < ' '))"
'';
nativeBuildInputs = [ autoreconfHook perl ];
buildInputs = [ readline ];
meta = with lib; {
description = "Readline wrapper for console programs";
homepage = "https://github.com/hanslub42/rlwrap";
license = licenses.gpl2Plus;
platforms = platforms.unix;
maintainers = with maintainers; [ srapenne jlesquembre ];
};
}