about summary refs log tree commit diff
path: root/nixpkgs/pkgs/shells/rc/default.nix
blob: a8a7d4f6e7775026916a79446fc6e58732883e2b (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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
{ stdenv, fetchurl, autoreconfHook
, ncurses #acinclude.m4 wants headers for tgetent().
, historySupport ? false
, readline ? null
}:

stdenv.mkDerivation rec {
  pname = "rc";
  version = "1.7.4";

  src = fetchurl {
    url = "http://static.tobold.org/rc/rc-${version}.tar.gz";
    sha256 = "1n5zz6d6z4z6s3fwa0pscqqawy561k4xfnmi91i626hcvls67ljy";
  };

  nativeBuildInputs = [ autoreconfHook ];
  buildInputs = [ ncurses ]
    ++ stdenv.lib.optionals (readline != null) [ readline ];

  configureFlags = [
    "--enable-def-interp=${stdenv.shell}" #183
    ] ++ stdenv.lib.optionals historySupport [ "--with-history" ]
    ++ stdenv.lib.optionals (readline != null) [ "--with-edit=readline" ];

  prePatch = ''
    substituteInPlace configure.ac \
      --replace "date -I" "echo 2015-05-13" #reproducible-build
  '';

  passthru = {
    shellPath = "/bin/rc";
  };

  meta = with stdenv.lib; {
    description = "The Plan 9 shell";
    longDescription = "Byron Rakitzis' UNIX reimplementation of Tom Duff's Plan 9 shell.";
    homepage = http://tobold.org/article/rc;
    license = with licenses; zlib;
    maintainers = with maintainers; [ ramkromberg ];
    platforms = with platforms; all;
  };
}