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

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

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

  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/;
    license = stdenv.lib.licenses.gpl2Plus;
    platforms = stdenv.lib.platforms.unix;
    maintainers = with stdenv.lib.maintainers; [ fuuzetsu ];
  };
}