about summary refs log tree commit diff
path: root/nixpkgs/pkgs/applications/version-management/rcs/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/applications/version-management/rcs/default.nix')
-rw-r--r--nixpkgs/pkgs/applications/version-management/rcs/default.nix56
1 files changed, 11 insertions, 45 deletions
diff --git a/nixpkgs/pkgs/applications/version-management/rcs/default.nix b/nixpkgs/pkgs/applications/version-management/rcs/default.nix
index f8143711318c..d814e0ca0a52 100644
--- a/nixpkgs/pkgs/applications/version-management/rcs/default.nix
+++ b/nixpkgs/pkgs/applications/version-management/rcs/default.nix
@@ -1,55 +1,21 @@
-{ lib, stdenv, fetchurl, fetchpatch, ed }:
+{ lib, stdenv, fetchurl, fetchpatch, buildPackages, diffutils, ed }:
 
 stdenv.mkDerivation rec {
-  name = "rcs-5.9.4";
+  pname = "rcs";
+  version = "5.10.0";
 
   src = fetchurl {
-    url = "mirror://gnu/rcs/${name}.tar.xz";
-    sha256 = "1zsx7bb0rgvvvisiy4zlixf56ay8wbd9qqqcp1a1g0m1gl6mlg86";
+    url = "mirror://gnu/rcs/${pname}-${version}.tar.xz";
+    sha256 = "sha256-Og2flYx60wPkdehjRlSXTtvm3rOkVEkfOFfcGIm6xcU";
   };
 
-  buildInputs = [ ed ];
+  ac_cv_path_ED = "${ed}/bin/ed";
+  DIFF = "${diffutils}/bin/diff";
+  DIFF3 = "${diffutils}/bin/diff3";
 
-  patches = lib.optionals stdenv.isDarwin [
-    # This failure appears unrelated to the subject of the test. This
-    # test seems to rely on a bash bug where `test $x -nt $y` ignores
-    # subsecond values in timetamps. This bug has been fixed in Bash
-    # 5, and seemingly doesn't affect Darwin.
-    ./disable-t810.patch
-
-    (fetchpatch {
-      url = "https://raw.githubusercontent.com/macports/macports-ports/b76d1e48dac/editors/nano/files/secure_snprintf.patch";
-      extraPrefix = "";
-      sha256 = "1wy9pjw3vvp8fv8a7pmkqmiapgacfx54qj9fvsc5gwry0vv7vnc3";
-    })
-
-    # Expected to appear in the next release
-    (fetchpatch {
-      url = "https://raw.githubusercontent.com/Homebrew/formula-patches/3fff7c990b8df4174045834b9c1210e7736ff5a4/rcs/noreturn.patch";
-      sha256 = "10zniqrd6xagf3q03i1vksl0vd9nla3qcj0840n3m8z6jd4aypcx";
-    })
-  ];
-
-  doCheck = true;
-
-  checkFlags = [ "VERBOSE=1" ];
-
-  checkPhase = ''
-    # If neither LOGNAME or USER are set, rcs will default to
-    # getlogin(), which is unreliable on macOS. It will often return
-    # things like `_spotlight`, or `_mbsetupuser`. macOS sets both
-    # environment variables in user sessions, so this is unlikely to
-    # affect regular usage.
-
-    export LOGNAME=$(id -un)
-
-    print_logs_and_fail() {
-      grep -nH -e . -r tests/*.d/{out,err}
-      return 1
-    }
-
-    make $checkFlags check || print_logs_and_fail
-  '';
+  disallowedReferences =
+    lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform)
+      [ buildPackages.diffutils buildPackages.ed ];
 
   NIX_CFLAGS_COMPILE = "-std=c99";