From 4f680c2bf76e59a75562d42c4f95c14b25667871 Mon Sep 17 00:00:00 2001 From: Mitchell Pleune Date: Sun, 2 Feb 2025 18:30:38 +0000 Subject: [PATCH] glog: patch /usr/bin/true in tests Tests appear to use `/usr/bin/true` as a fake mailer, which causes an error in the check phase. This does not cause the tests to fail, and this is why the replace is a warn and not fail. Patching it nonetheless. --- pkgs/by-name/gl/glog/package.nix | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/pkgs/by-name/gl/glog/package.nix b/pkgs/by-name/gl/glog/package.nix index ed30b55a60f4..e6b0ff6c7795 100644 --- a/pkgs/by-name/gl/glog/package.nix +++ b/pkgs/by-name/gl/glog/package.nix @@ -6,9 +6,10 @@ gflags, gtest, perl, + pkgsBuildHost, }: -stdenv.mkDerivation rec { +stdenv.mkDerivation (finalAttrs: rec { pname = "glog"; version = "0.7.1"; @@ -19,6 +20,11 @@ stdenv.mkDerivation rec { sha256 = "sha256-+nwWP6VBmhgU7GCPSEGUzvUSCc48wXME181WpJ5ABP4="; }; + postPatch = lib.optionalString finalAttrs.doCheck '' + substituteInPlace src/logging_unittest.cc \ + --replace-warn "/usr/bin/true" "${pkgsBuildHost.coreutils}/bin/true" + ''; + nativeBuildInputs = [ cmake ]; buildInputs = [ gtest ]; @@ -90,4 +96,4 @@ stdenv.mkDerivation rec { r-burns ]; }; -} +})