Unverified Commit 11fc1f22 authored by Weijia Wang's avatar Weijia Wang Committed by GitHub
Browse files

Merge pull request #230348 from risicle/ris-git-installcheck-darwin-sysctl

git: fix installCheck on darwin
parents b9fd71fa dd4c9eec
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -19,6 +19,7 @@
, pkg-config, glib, libsecret
, gzip # needed at runtime by gitweb.cgi
, withSsh ? false
, sysctl
, doInstallCheck ? !stdenv.isDarwin  # extremely slow on darwin
, tests
}:
@@ -294,6 +295,8 @@ stdenv.mkDerivation (finalAttrs: {
    "PERL_PATH=${buildPackages.perl}/bin/perl"
  ];

  nativeInstallCheckInputs = lib.optional stdenv.isDarwin sysctl;

  preInstallCheck = ''
    installCheckFlagsArray+=(
      GIT_PROVE_OPTS="--jobs $NIX_BUILD_CORES --failures --state=failed,save"