commit
ed95b50a7b
@ -7,26 +7,25 @@
|
|||||||
, cmake
|
, cmake
|
||||||
, perl
|
, perl
|
||||||
, zstd
|
, zstd
|
||||||
|
, bashInteractive
|
||||||
, xcodebuild
|
, xcodebuild
|
||||||
, makeWrapper
|
, makeWrapper
|
||||||
}:
|
}:
|
||||||
|
|
||||||
let ccache = stdenv.mkDerivation rec {
|
let ccache = stdenv.mkDerivation rec {
|
||||||
pname = "ccache";
|
pname = "ccache";
|
||||||
version = "4.2.1";
|
version = "4.3";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = pname;
|
owner = pname;
|
||||||
repo = pname;
|
repo = pname;
|
||||||
rev = "v${version}";
|
rev = "v${version}";
|
||||||
hash = "sha256-AmgJpW7AGCSggbHp1fLO5yhXS9LIm7O77nQdDERJYAA=";
|
hash = "sha256-ZBxDTMUZiZJLIYbvACTFwvlss+IZiMjiL0khfM5hFCM=";
|
||||||
};
|
};
|
||||||
|
|
||||||
patches = [
|
outputs = [ "out" "man" ];
|
||||||
# test/run use compgen to get environment variable names, but
|
|
||||||
# compgen isn't available in non-interactive bash.
|
|
||||||
./env-instead-of-compgen.patch
|
|
||||||
|
|
||||||
|
patches = [
|
||||||
# When building for Darwin, test/run uses dwarfdump, whereas on
|
# When building for Darwin, test/run uses dwarfdump, whereas on
|
||||||
# Linux it uses objdump. We don't have dwarfdump packaged for
|
# Linux it uses objdump. We don't have dwarfdump packaged for
|
||||||
# Darwin, so this patch updates the test to also use objdump on
|
# Darwin, so this patch updates the test to also use objdump on
|
||||||
@ -38,18 +37,22 @@ let ccache = stdenv.mkDerivation rec {
|
|||||||
];
|
];
|
||||||
|
|
||||||
nativeBuildInputs = [ asciidoc cmake perl ];
|
nativeBuildInputs = [ asciidoc cmake perl ];
|
||||||
|
|
||||||
buildInputs = [ zstd ];
|
buildInputs = [ zstd ];
|
||||||
|
|
||||||
outputs = [ "out" "man" ];
|
|
||||||
|
|
||||||
doCheck = true;
|
doCheck = true;
|
||||||
checkInputs = lib.optional stdenv.isDarwin xcodebuild;
|
checkInputs = [
|
||||||
|
# test/run requires the compgen function which is available in
|
||||||
|
# bashInteractive, but not bash.
|
||||||
|
bashInteractive
|
||||||
|
] ++ lib.optional stdenv.isDarwin xcodebuild;
|
||||||
|
|
||||||
checkPhase = ''
|
checkPhase = ''
|
||||||
|
runHook preCheck
|
||||||
export HOME=$(mktemp -d)
|
export HOME=$(mktemp -d)
|
||||||
ctest --output-on-failure ${lib.optionalString stdenv.isDarwin ''
|
ctest --output-on-failure ${lib.optionalString stdenv.isDarwin ''
|
||||||
-E '^(test.nocpp2|test.basedir|test.multi_arch)$'
|
-E '^(test.nocpp2|test.basedir|test.multi_arch)$'
|
||||||
''}
|
''}
|
||||||
|
runHook postCheck
|
||||||
'';
|
'';
|
||||||
|
|
||||||
passthru = {
|
passthru = {
|
||||||
|
@ -1,18 +0,0 @@
|
|||||||
diff --git a/test/run b/test/run
|
|
||||||
index cbdd98f0..bc930200 100755
|
|
||||||
--- a/test/run
|
|
||||||
+++ b/test/run
|
|
||||||
@@ -346,11 +346,11 @@ expect_perm() {
|
|
||||||
}
|
|
||||||
|
|
||||||
reset_environment() {
|
|
||||||
- while IFS= read -r name; do
|
|
||||||
+ while IFS='=' read -r name value; do
|
|
||||||
if [[ $name =~ ^CCACHE_[A-Z0-9_]*$ ]]; then
|
|
||||||
unset $name
|
|
||||||
fi
|
|
||||||
- done < <(compgen -e)
|
|
||||||
+ done < <(env)
|
|
||||||
|
|
||||||
unset GCC_COLORS
|
|
||||||
unset TERM
|
|
@ -12759,12 +12759,12 @@ in
|
|||||||
inherit (stdenv) cc;
|
inherit (stdenv) cc;
|
||||||
};
|
};
|
||||||
|
|
||||||
ccacheStdenv = lowPrio (makeOverridable ({ extraConfig, stdenv }:
|
ccacheStdenv = lowPrio (makeOverridable ({ stdenv, ... } @ extraArgs:
|
||||||
overrideCC stdenv (buildPackages.ccacheWrapper.override {
|
overrideCC stdenv (buildPackages.ccacheWrapper.override ({
|
||||||
inherit extraConfig;
|
|
||||||
inherit (stdenv) cc;
|
inherit (stdenv) cc;
|
||||||
})) {
|
} // lib.optionalAttrs (builtins.hasAttr "extraConfig" extraArgs) {
|
||||||
extraConfig = "";
|
extraConfig = extraArgs.extraConfig;
|
||||||
|
}))) {
|
||||||
inherit stdenv;
|
inherit stdenv;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user