mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-22 06:53:01 +00:00
treewide: use stdenv.buildPlatform.canExecute (#350195)
This commit is contained in:
commit
4dbb808a7d
@ -116,7 +116,7 @@ buildPythonApplication rec {
|
||||
];
|
||||
|
||||
# check phase uses the output bin, which is not possible when cross-compiling
|
||||
doCheck = stdenv.buildPlatform == stdenv.hostPlatform;
|
||||
doCheck = stdenv.buildPlatform.canExecute stdenv.hostPlatform;
|
||||
|
||||
checkPhase = ''
|
||||
runHook preCheck
|
||||
|
@ -29,7 +29,7 @@ buildGoModule rec {
|
||||
|
||||
doCheck = false; # requires docker, container-diff (unpackaged yet)
|
||||
|
||||
postInstall = lib.optionalString (stdenv.hostPlatform == stdenv.buildPlatform) ''
|
||||
postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
|
||||
for shell in bash fish zsh; do
|
||||
$out/bin/executor completion $shell > executor.$shell
|
||||
installShellCompletion executor.$shell
|
||||
|
@ -29,7 +29,7 @@ buildGoModule rec {
|
||||
'';
|
||||
doCheck = true;
|
||||
|
||||
postInstall = lib.optionalString (stdenv.hostPlatform == stdenv.buildPlatform) ''
|
||||
postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
|
||||
installShellCompletion --cmd kubeshark \
|
||||
--bash <($out/bin/kubeshark completion bash) \
|
||||
--fish <($out/bin/kubeshark completion fish) \
|
||||
|
@ -40,7 +40,7 @@ buildGoModule rec {
|
||||
'';
|
||||
|
||||
nativeBuildInputs = [ installShellFiles ];
|
||||
postInstall = lib.optionalString (stdenv.hostPlatform == stdenv.buildPlatform) ''
|
||||
postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
|
||||
installShellCompletion --cmd vela \
|
||||
--bash <($out/bin/vela completion bash) \
|
||||
--zsh <($out/bin/vela completion zsh)
|
||||
|
@ -117,7 +117,7 @@ let
|
||||
--prefix GST_PLUGIN_SYSTEM_PATH_1_0 : "$GST_PLUGIN_SYSTEM_PATH_1_0"
|
||||
'';
|
||||
|
||||
doInstallCheck = stdenv.hostPlatform == stdenv.buildPlatform;
|
||||
doInstallCheck = stdenv.buildPlatform.canExecute stdenv.hostPlatform;
|
||||
# In particular, this detects missing python imports in some of the tools.
|
||||
postFixup = let
|
||||
# TODO: python is a script, so it doesn't work as interpreter on darwin
|
||||
|
@ -30,7 +30,7 @@ stdenv.mkDerivation rec {
|
||||
"-DENABLE_TESTS=${if doCheck then "ON" else "OFF"}"
|
||||
];
|
||||
|
||||
doCheck = stdenv.hostPlatform == stdenv.buildPlatform;
|
||||
doCheck = stdenv.buildPlatform.canExecute stdenv.hostPlatform;
|
||||
nativeCheckInputs = [ check ];
|
||||
|
||||
meta = with lib; {
|
||||
|
@ -59,7 +59,7 @@ stdenv.mkDerivation rec {
|
||||
"kmymoney/plugins/woob/interface/kmymoneywoob.py"
|
||||
'';
|
||||
|
||||
doInstallCheck = stdenv.hostPlatform == stdenv.buildPlatform;
|
||||
doInstallCheck = stdenv.buildPlatform.canExecute stdenv.hostPlatform;
|
||||
nativeInstallCheckInputs = [ xvfb-run ];
|
||||
installCheckPhase =
|
||||
lib.optionalString doInstallCheck ''
|
||||
|
@ -36,7 +36,7 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
doCheck = stdenv.hostPlatform == stdenv.buildPlatform;
|
||||
doCheck = stdenv.buildPlatform.canExecute stdenv.hostPlatform;
|
||||
|
||||
configureFlags =
|
||||
lib.optional (!withInternalSqlite) "--disable-internal-sqlite"
|
||||
|
@ -54,7 +54,7 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
enableParallelBuilding = true;
|
||||
|
||||
# override this to false if you don't want to build python3
|
||||
doCheck = stdenv.hostPlatform == stdenv.buildPlatform;
|
||||
doCheck = stdenv.buildPlatform.canExecute stdenv.hostPlatform;
|
||||
|
||||
# prevent the `install-data-local` Makefile rule from running;
|
||||
# all it does is attempt to `mkdir` the `localstatedir`.
|
||||
|
@ -28,7 +28,7 @@ buildGo123Module rec {
|
||||
|
||||
nativeBuildInputs = [ installShellFiles ];
|
||||
|
||||
postInstall = lib.optionalString (stdenv.hostPlatform == stdenv.buildPlatform) ''
|
||||
postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
|
||||
make manpage
|
||||
installManPage share/man/man1/*
|
||||
installShellCompletion --cmd glab \
|
||||
|
@ -26,7 +26,7 @@ buildGoModule rec {
|
||||
|
||||
nativeBuildInputs = [ installShellFiles ];
|
||||
|
||||
postInstall = lib.optionalString (stdenv.hostPlatform == stdenv.buildPlatform) ''
|
||||
postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
|
||||
# Mangal creates a config file in the folder ~/.config/mangal and fails if not possible
|
||||
export HOME=$(mktemp -d)
|
||||
installShellCompletion --cmd mangal \
|
||||
|
@ -50,7 +50,7 @@ stdenv.mkDerivation rec {
|
||||
|
||||
makeFlags = [ "AR:=$(AR)" ];
|
||||
|
||||
doCheck = stdenv.hostPlatform == stdenv.buildPlatform;
|
||||
doCheck = stdenv.buildPlatform.canExecute stdenv.hostPlatform;
|
||||
|
||||
outputs = [
|
||||
"out"
|
||||
|
@ -31,7 +31,7 @@ buildGoModule rec {
|
||||
'';
|
||||
|
||||
nativeBuildInputs = [ installShellFiles ];
|
||||
postInstall = lib.optionalString (stdenv.hostPlatform == stdenv.buildPlatform) ''
|
||||
postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
|
||||
$out/bin/velero completion bash > velero.bash
|
||||
$out/bin/velero completion zsh > velero.zsh
|
||||
installShellCompletion velero.{bash,zsh}
|
||||
|
@ -115,7 +115,7 @@ in stdenv.mkDerivation {
|
||||
|
||||
buildFlags = [ "all" "selftest" ];
|
||||
|
||||
doCheck = stdenv.hostPlatform == stdenv.buildPlatform;
|
||||
doCheck = stdenv.buildPlatform.canExecute stdenv.hostPlatform;
|
||||
checkPhase = ''
|
||||
runHook preCheck
|
||||
./zerotier-selftest
|
||||
|
@ -29,7 +29,7 @@ stdenv.mkDerivation {
|
||||
];
|
||||
|
||||
# installCheck instead of check due to -install_name'd library on Darwin
|
||||
doInstallCheck = stdenv.buildPlatform == stdenv.hostPlatform;
|
||||
doInstallCheck = stdenv.buildPlatform.canExecute stdenv.hostPlatform;
|
||||
installCheckTarget = "check";
|
||||
|
||||
meta = with lib; {
|
||||
|
@ -840,7 +840,7 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
];
|
||||
};
|
||||
|
||||
doCheck = stdenv.hostPlatform == stdenv.buildPlatform;
|
||||
doCheck = stdenv.buildPlatform.canExecute stdenv.hostPlatform;
|
||||
|
||||
# Fails with SIGABRT otherwise FIXME: Why?
|
||||
checkPhase = let
|
||||
|
@ -27,7 +27,7 @@ stdenv.mkDerivation rec {
|
||||
"-DFLATBUFFERS_OSX_BUILD_UNIVERSAL=OFF"
|
||||
];
|
||||
|
||||
doCheck = stdenv.hostPlatform == stdenv.buildPlatform;
|
||||
doCheck = stdenv.buildPlatform.canExecute stdenv.hostPlatform;
|
||||
checkTarget = "test";
|
||||
|
||||
meta = with lib; {
|
||||
|
@ -23,7 +23,7 @@ stdenv.mkDerivation rec {
|
||||
"-DFLATBUFFERS_OSX_BUILD_UNIVERSAL=OFF"
|
||||
];
|
||||
|
||||
doCheck = stdenv.hostPlatform == stdenv.buildPlatform;
|
||||
doCheck = stdenv.buildPlatform.canExecute stdenv.hostPlatform;
|
||||
checkTarget = "test";
|
||||
|
||||
meta = with lib; {
|
||||
|
@ -48,7 +48,7 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
fi
|
||||
'';
|
||||
|
||||
doCheck = stdenv.buildPlatform == stdenv.hostPlatform;
|
||||
doCheck = stdenv.buildPlatform.canExecute stdenv.hostPlatform;
|
||||
nativeCheckInputs = [ gtest ];
|
||||
enableParallelChecking = false;
|
||||
|
||||
|
@ -29,7 +29,7 @@ in stdenv.mkDerivation (finalAttrs: {
|
||||
"-DJSON_MultipleHeaders=ON"
|
||||
] ++ lib.optional finalAttrs.finalPackage.doCheck "-DJSON_TestDataDirectory=${testData}";
|
||||
|
||||
doCheck = stdenv.hostPlatform == stdenv.buildPlatform;
|
||||
doCheck = stdenv.buildPlatform.canExecute stdenv.hostPlatform;
|
||||
|
||||
# skip tests that require git or modify “installed files”
|
||||
preCheck = ''
|
||||
|
@ -87,7 +87,7 @@ stdenv.mkDerivation rec {
|
||||
'';
|
||||
|
||||
doCheck = false;
|
||||
doInstallCheck = stdenv.buildPlatform == stdenv.hostPlatform;
|
||||
doInstallCheck = stdenv.buildPlatform.canExecute stdenv.hostPlatform;
|
||||
# Since we rewrote the load path in the dynamic loader for the TCTI
|
||||
# The various tcti implementation should be placed in their target directory
|
||||
# before we could run tests, so we make turn checkPhase into installCheckPhase
|
||||
|
@ -17,7 +17,7 @@ stdenv.mkDerivation rec {
|
||||
] ++ lib.optional (!doCheck) "-DURIPARSER_BUILD_TESTS=OFF";
|
||||
|
||||
nativeCheckInputs = [ gtest ];
|
||||
doCheck = stdenv.buildPlatform == stdenv.hostPlatform;
|
||||
doCheck = stdenv.buildPlatform.canExecute stdenv.hostPlatform;
|
||||
|
||||
meta = with lib; {
|
||||
changelog = "https://github.com/uriparser/uriparser/blob/uriparser-${version}/ChangeLog";
|
||||
|
@ -22,7 +22,7 @@ buildGoModule rec {
|
||||
$out/bin/k6 version | grep ${version} > /dev/null
|
||||
'';
|
||||
|
||||
postInstall = lib.optionalString (stdenv.hostPlatform == stdenv.buildPlatform) ''
|
||||
postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
|
||||
installShellCompletion --cmd k6 \
|
||||
--bash <($out/bin/k6 completion bash) \
|
||||
--fish <($out/bin/k6 completion fish) \
|
||||
|
Loading…
Reference in New Issue
Block a user