Skip to content

Commit db93a10

Browse files
committed
rc: update 1.7.4 -> unstable-2021-08-03
1 parent 750a514 commit db93a10

1 file changed

Lines changed: 21 additions & 19 deletions

File tree

pkgs/shells/rc/default.nix

Lines changed: 21 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,42 +1,44 @@
1-
{ lib, stdenv, fetchurl, autoreconfHook
2-
, ncurses #acinclude.m4 wants headers for tgetent().
3-
, historySupport ? false
4-
, readline ? null
5-
}:
1+
{ lib, stdenv, fetchFromGitHub, autoreconfHook, byacc
2+
, ncurses, readline
3+
, historySupport ? false, readlineSupport ? true }:
64

75
stdenv.mkDerivation rec {
86
pname = "rc";
9-
version = "1.7.4";
7+
version = "unstable-2021-08-03";
108

11-
src = fetchurl {
12-
url = "http://static.tobold.org/rc/rc-${version}.tar.gz";
13-
sha256 = "1n5zz6d6z4z6s3fwa0pscqqawy561k4xfnmi91i626hcvls67ljy";
9+
src = fetchFromGitHub {
10+
owner = "rakitzis";
11+
repo = "rc";
12+
rev = "8ca9ab1305c3e30cd064290081d6e5a1fa841d26";
13+
sha256 = "0744ars6y9zzsjr9xazms91qy6bi7msg2gg87526waziahfh4s4z";
1414
};
1515

1616
nativeBuildInputs = [ autoreconfHook ];
17-
buildInputs = [ ncurses ]
18-
++ lib.optionals (readline != null) [ readline ];
17+
18+
# acinclude.m4 wants headers for tgetent().
19+
buildInputs = [ byacc ncurses ]
20+
++ lib.optionals readlineSupport [ readline ];
1921

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

25-
prePatch = ''
27+
#reproducible-build
28+
postPatch = ''
2629
substituteInPlace configure.ac \
27-
--replace "date -I" "echo 2015-05-13" #reproducible-build
30+
--replace "$(git describe || echo '(git description unavailable)')" "${builtins.substring 0 7 src.rev}"
2831
'';
2932

30-
passthru = {
31-
shellPath = "/bin/rc";
32-
};
33+
passthru.shellPath = "/bin/rc";
3334

3435
meta = with lib; {
3536
description = "The Plan 9 shell";
36-
longDescription = "Byron Rakitzis' UNIX reimplementation of Tom Duff's Plan 9 shell.";
37-
homepage = "http://tobold.org/article/rc";
37+
longDescription = "Byron Rakitzis' UNIX reimplementation of Tom Duff's Plan 9 shell";
38+
homepage = "https://web.archive.org/web/20180820053030/tobold.org/article/rc";
3839
license = with licenses; zlib;
3940
maintainers = with maintainers; [ ramkromberg ];
41+
mainProgram = "rc";
4042
platforms = with platforms; all;
4143
};
4244
}

0 commit comments

Comments
 (0)