···1-{ lib, stdenv, fetchurl, fetchpatch, ed }:
23stdenv.mkDerivation rec {
4- name = "rcs-5.9.4";
056 src = fetchurl {
7- url = "mirror://gnu/rcs/${name}.tar.xz";
8- sha256 = "1zsx7bb0rgvvvisiy4zlixf56ay8wbd9qqqcp1a1g0m1gl6mlg86";
9 };
1011- buildInputs = [ ed ];
12-13- patches = lib.optionals stdenv.isDarwin [
14- # This failure appears unrelated to the subject of the test. This
15- # test seems to rely on a bash bug where `test $x -nt $y` ignores
16- # subsecond values in timetamps. This bug has been fixed in Bash
17- # 5, and seemingly doesn't affect Darwin.
18- ./disable-t810.patch
19-20- (fetchpatch {
21- url = "https://raw.githubusercontent.com/macports/macports-ports/b76d1e48dac/editors/nano/files/secure_snprintf.patch";
22- extraPrefix = "";
23- sha256 = "1wy9pjw3vvp8fv8a7pmkqmiapgacfx54qj9fvsc5gwry0vv7vnc3";
24- })
25-26- # Expected to appear in the next release
27- (fetchpatch {
28- url = "https://raw.githubusercontent.com/Homebrew/formula-patches/3fff7c990b8df4174045834b9c1210e7736ff5a4/rcs/noreturn.patch";
29- sha256 = "10zniqrd6xagf3q03i1vksl0vd9nla3qcj0840n3m8z6jd4aypcx";
30- })
31- ];
32-33- doCheck = true;
34-35- checkFlags = [ "VERBOSE=1" ];
36-37- checkPhase = ''
38- # If neither LOGNAME or USER are set, rcs will default to
39- # getlogin(), which is unreliable on macOS. It will often return
40- # things like `_spotlight`, or `_mbsetupuser`. macOS sets both
41- # environment variables in user sessions, so this is unlikely to
42- # affect regular usage.
43-44- export LOGNAME=$(id -un)
45-46- print_logs_and_fail() {
47- grep -nH -e . -r tests/*.d/{out,err}
48- return 1
49- }
5051- make $checkFlags check || print_logs_and_fail
52- '';
05354 NIX_CFLAGS_COMPILE = "-std=c99";
55