about summary refs log tree commit diff
path: root/pkgs/tools/misc/rlwrap/default.nix
blob: 5c53d885e6f72ae08bf874872541d4fef050e910 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
{ stdenv, fetchurl, readline }:

stdenv.mkDerivation rec {
  name = "rlwrap-0.37";

  src = fetchurl {
    url = "http://utopia.knoware.nl/~hlub/uck/rlwrap/${name}.tar.gz";
    sha256 = "1gcb95i839pwn9a3phs2wq7bwz9f6v8sydq6lf9y4gm3hk0s40w4";
  };

  buildInputs = [ readline ];

  # Be high-bit-friendly
  preBuild = ''
    sed -i src/readline.c -e "s@[*]p [<] ' '@(*p >= 0) \\&\\& (*p < ' ')@"
  '';

  meta = {
    description = "Readline wrapper for console programs";
    homepage = http://utopia.knoware.nl/~hlub/uck/rlwrap/;
  };
}