|
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 }: |
6 | 4 |
|
7 | 5 | stdenv.mkDerivation rec { |
8 | 6 | pname = "rc"; |
9 | | - version = "1.7.4"; |
| 7 | + version = "unstable-2021-08-03"; |
10 | 8 |
|
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"; |
14 | 14 | }; |
15 | 15 |
|
16 | 16 | 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 ]; |
19 | 21 |
|
20 | 22 | configureFlags = [ |
21 | 23 | "--enable-def-interp=${stdenv.shell}" #183 |
22 | 24 | ] ++ lib.optionals historySupport [ "--with-history" ] |
23 | | - ++ lib.optionals (readline != null) [ "--with-edit=readline" ]; |
| 25 | + ++ lib.optionals readlineSupport [ "--with-edit=readline" ]; |
24 | 26 |
|
25 | | - prePatch = '' |
| 27 | + #reproducible-build |
| 28 | + postPatch = '' |
26 | 29 | 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}" |
28 | 31 | ''; |
29 | 32 |
|
30 | | - passthru = { |
31 | | - shellPath = "/bin/rc"; |
32 | | - }; |
| 33 | + passthru.shellPath = "/bin/rc"; |
33 | 34 |
|
34 | 35 | meta = with lib; { |
35 | 36 | 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"; |
38 | 39 | license = with licenses; zlib; |
39 | 40 | maintainers = with maintainers; [ ramkromberg ]; |
| 41 | + mainProgram = "rc"; |
40 | 42 | platforms = with platforms; all; |
41 | 43 | }; |
42 | 44 | } |
0 commit comments