treewide: replace stdenv.is* with stdenv.hostPlatform.is* (#511765)

This commit is contained in:
Ben Siraphob
2026-05-10 17:11:52 +00:00
committed by GitHub
109 changed files with 188 additions and 182 deletions
@@ -34,7 +34,7 @@ let
};
makeCacheWritable = true;
buildInputs = lib.optionals stdenv.isLinux [
buildInputs = lib.optionals stdenv.hostPlatform.isLinux [
libsecret
];
nativeBuildInputs = [
@@ -42,10 +42,10 @@ let
nodejs-slim.python
npmHooks.npmConfigHook
]
++ lib.optionals stdenv.isLinux [
++ lib.optionals stdenv.hostPlatform.isLinux [
pkg-config
]
++ lib.optionals stdenv.isDarwin [
++ lib.optionals stdenv.hostPlatform.isDarwin [
cctools.libtool
clang_20 # clang_21 breaks @vscode/vsce's optional dependency keytar
];
@@ -32,7 +32,7 @@ let
hash = "sha256-vktxhQA2a+D9Nr4vhbmGCnNdGzt0U89K50g0SgiV5SE=";
};
buildInputs = lib.optionals stdenv.isLinux [
buildInputs = lib.optionals stdenv.hostPlatform.isLinux [
libsecret
];
@@ -41,10 +41,10 @@ let
nodejs-slim.python
npmHooks.npmConfigHook
]
++ lib.optionals stdenv.isLinux [
++ lib.optionals stdenv.hostPlatform.isLinux [
pkg-config
]
++ lib.optionals stdenv.isDarwin [
++ lib.optionals stdenv.hostPlatform.isDarwin [
clang_20 # clang_21 breaks @vscode/vsce's optional dependency keytar
];
@@ -47,7 +47,7 @@ let
pkg-config
]
++ lib.optionals stdenv.isDarwin [ clang_20 ]; # clang_21 breaks keytar
++ lib.optionals stdenv.hostPlatform.isDarwin [ clang_20 ]; # clang_21 breaks keytar
# Follows https://github.com/rust-lang/rust-analyzer/blob/41949748a6123fd6061eb984a47f4fe780525e63/xtask/src/dist.rs#L39-L65
installPhase = ''
@@ -22,7 +22,7 @@ buildNpmPackage {
python3
pkg-config
]
++ lib.optionals stdenv.isDarwin [ clang_20 ]; # clang_21 breaks keytar
++ lib.optionals stdenv.hostPlatform.isDarwin [ clang_20 ]; # clang_21 breaks keytar
buildInputs = [ libsecret ];
+1 -1
View File
@@ -43,7 +43,7 @@ stdenv.mkDerivation rec {
'';
installPhase =
if stdenv.isDarwin then
if stdenv.hostPlatform.isDarwin then
''
mkdir -p "$out"
mv diffpdf.app "$out"/
+5 -5
View File
@@ -27,7 +27,7 @@
passthru.tests = {
test = tests.rust-hooks.cargoBuildHook;
}
// lib.optionalAttrs (stdenv.isLinux) {
// lib.optionalAttrs (stdenv.hostPlatform.isLinux) {
testCross = pkgsCross.riscv64.tests.rust-hooks.cargoBuildHook;
};
} ./cargo-build-hook.sh;
@@ -41,7 +41,7 @@
passthru.tests = {
test = tests.rust-hooks.cargoCheckHook;
}
// lib.optionalAttrs (stdenv.isLinux) {
// lib.optionalAttrs (stdenv.hostPlatform.isLinux) {
testCross = pkgsCross.riscv64.tests.rust-hooks.cargoCheckHook;
};
} ./cargo-check-hook.sh;
@@ -54,7 +54,7 @@
passthru.tests = {
test = tests.rust-hooks.cargoInstallHook;
}
// lib.optionalAttrs (stdenv.isLinux) {
// lib.optionalAttrs (stdenv.hostPlatform.isLinux) {
testCross = pkgsCross.riscv64.tests.rust-hooks.cargoInstallHook;
};
} ./cargo-install-hook.sh;
@@ -68,7 +68,7 @@
passthru.tests = {
test = tests.rust-hooks.cargoNextestHook;
}
// lib.optionalAttrs (stdenv.isLinux) {
// lib.optionalAttrs (stdenv.hostPlatform.isLinux) {
testCross = pkgsCross.riscv64.tests.rust-hooks.cargoNextestHook;
};
} ./cargo-nextest-hook.sh;
@@ -107,7 +107,7 @@
passthru.tests = {
test = tests.rust-hooks.cargoSetupHook;
}
// lib.optionalAttrs (stdenv.isLinux) {
// lib.optionalAttrs (stdenv.hostPlatform.isLinux) {
testCross = pkgsCross.riscv64.tests.rust-hooks.cargoSetupHook;
};
} ./cargo-setup-hook.sh;
+2 -2
View File
@@ -28,11 +28,11 @@ stdenv.mkDerivation (finalAttrs: {
"PREFIX=${placeholder "out"}"
"DESTDIR="
]
++ lib.optional stdenv.isDarwin "PLATFORM=mac";
++ lib.optional stdenv.hostPlatform.isDarwin "PLATFORM=mac";
# Even with PLATFORM=mac, the Makefile specifies some GCC-specific CFLAGS that
# are not supported by modern Clang on macOS
postPatch = lib.optionalString stdenv.isDarwin ''
postPatch = lib.optionalString stdenv.hostPlatform.isDarwin ''
substituteInPlace Makefile \
--replace-fail "-funswitch-loops" "" \
--replace-fail "-fgcse-after-reload" ""
+2 -2
View File
@@ -60,10 +60,10 @@ stdenv.mkDerivation {
makeWrapper
patchelf
]
++ lib.optionals stdenv.isLinux [
++ lib.optionals stdenv.hostPlatform.isLinux [
autoPatchelfHook
]
++ lib.optionals stdenv.isDarwin [
++ lib.optionals stdenv.hostPlatform.isDarwin [
fixDarwinDylibNames
];
+4 -4
View File
@@ -35,7 +35,7 @@ let
llvmPackages.clang
];
postBuild =
if stdenv.isDarwin then
if stdenv.hostPlatform.isDarwin then
''
mkdir -p $out/lib/clang/${llvmMajorVersion}/lib/darwin
ln -s $out/resource-root/lib/darwin/libclang_rt.osx.a \
@@ -67,12 +67,12 @@ stdenv.mkDerivation (finalAttrs: {
python3
llvmPackages.bintools
]
++ lib.optionals stdenv.isDarwin [
++ lib.optionals stdenv.hostPlatform.isDarwin [
xcbuild
];
buildInputs =
lib.optionals stdenv.isLinux [
lib.optionals stdenv.hostPlatform.isLinux [
glib
libxcb.dev
libx11.dev
@@ -82,7 +82,7 @@ stdenv.mkDerivation (finalAttrs: {
pciutils
libGL
]
++ lib.optionals stdenv.isDarwin [
++ lib.optionals stdenv.hostPlatform.isDarwin [
apple-sdk_15
];
+1 -1
View File
@@ -66,7 +66,7 @@ stdenv.mkDerivation (finalAttrs: {
cmakeFlags = [
(lib.cmakeFeature "CMAKE_BUILD_TYPE" "Release")
(lib.cmakeBool "BUILD_JAVA" false)
(lib.cmakeBool "STOP_BUILD_ON_WARNING" stdenv.isLinux)
(lib.cmakeBool "STOP_BUILD_ON_WARNING" stdenv.hostPlatform.isLinux)
(lib.cmakeBool "INSTALL_VENDORED_LIBS" false)
]
++ lib.optional (stdenv.hostPlatform != stdenv.buildPlatform) [
+1 -1
View File
@@ -55,7 +55,7 @@ buildGoModule (finalAttrs: {
# skip tests on darwin due to some local networking failures
# `__darwinAllowLocalNetworking = true;` wasn't sufficient for
# aarch64 or x86_64
doCheck = !stdenv.isDarwin;
doCheck = !stdenv.hostPlatform.isDarwin;
preCheck = ''
# some test data include SOURCE_DATE_EPOCH (which is different from our default)
# and the default version info which we get by unsetting our ldflags
+1 -1
View File
@@ -153,7 +153,7 @@ rustPlatform.buildRustPackage (finalAttrs: {
"--skip=ui::viewport::tests::test_add_line_scrolling"
"--skip=ui::viewport::tests::test_line_wrapping"
];
doCheck = !stdenv.isDarwin;
doCheck = !stdenv.hostPlatform.isDarwin;
__structuredAttrs = true;
+2 -2
View File
@@ -161,7 +161,7 @@ stdenv.mkDerivation (finalAttrs: {
(cmakeBool "ENABLE_SSE42" enableSSE42)
];
installPhase = optionalString stdenv.isDarwin ''
installPhase = optionalString stdenv.hostPlatform.isDarwin ''
runHook preInstall
mkdir -p $out/Applications $out/bin
@@ -176,7 +176,7 @@ stdenv.mkDerivation (finalAttrs: {
qtWrapperArgs+=(
--prefix XDG_DATA_DIRS : "${gsettings-desktop-schemas}/share/gsettings-schemas/${gsettings-desktop-schemas.name}"
--prefix XDG_DATA_DIRS : "${gtk3}/share/gsettings-schemas/${gtk3.name}"
${optionalString stdenv.isDarwin "--prefix DYLD_LIBRARY_PATH : ${
${optionalString stdenv.hostPlatform.isDarwin "--prefix DYLD_LIBRARY_PATH : ${
lib.makeLibraryPath [ moltenvk ]
}"}
)
+1 -1
View File
@@ -40,7 +40,7 @@ buildNpmPackage rec {
docify
pkg-config
]
++ lib.optional stdenv.isDarwin [ clang_20 ]; # clang_21 breaks keytar
++ lib.optional stdenv.hostPlatform.isDarwin [ clang_20 ]; # clang_21 breaks keytar
buildInputs = [ libsecret ];
+1 -1
View File
@@ -19,7 +19,7 @@ let
{
enableJavaFX = true;
}
// lib.optionalAttrs stdenv.isLinux {
// lib.optionalAttrs stdenv.hostPlatform.isLinux {
openjfx_jdk = openjfx21.override { withWebKit = true; };
}
);
+3 -1
View File
@@ -62,7 +62,9 @@ stdenv.mkDerivation (finalAttrs: {
"varmod-localtime"
]
# TODO: drop the name-conditioning on stdenv rebuild
++ lib.optional (stdenv.isDarwin && lib.getName stdenv != "bootstrap-stage1-stdenv-darwin") "export"
++ lib.optional (
stdenv.hostPlatform.isDarwin && lib.getName stdenv != "bootstrap-stage1-stdenv-darwin"
) "export"
);
strictDeps = true;
+3 -3
View File
@@ -46,10 +46,10 @@ stdenv.mkDerivation (finalAttrs: {
"DATADIR=$(out)/opt/brogue-ce"
"TERMINAL=${if terminal then "YES" else "NO"}"
"GRAPHICS=${if graphics then "YES" else "NO"}"
"MAC_APP=${if stdenv.isDarwin then "YES" else "NO"}"
"MAC_APP=${if stdenv.hostPlatform.isDarwin then "YES" else "NO"}"
];
postBuild = lib.optionalString (stdenv.isDarwin && graphics) ''
postBuild = lib.optionalString (stdenv.hostPlatform.isDarwin && graphics) ''
make Brogue.app $makeFlags
'';
@@ -77,7 +77,7 @@ stdenv.mkDerivation (finalAttrs: {
runHook postInstall
'';
postInstall = lib.optionalString (stdenv.isDarwin && graphics) ''
postInstall = lib.optionalString (stdenv.hostPlatform.isDarwin && graphics) ''
mkdir -p $out/Applications
mv Brogue.app "$out/Applications/Brogue CE.app"
'';
+1 -1
View File
@@ -31,7 +31,7 @@ buildNpmPackage {
nativeBuildInputs = [
pkg-config
]
++ lib.optional stdenv.isDarwin clang_20; # clang_21 breaks gyp builds
++ lib.optional stdenv.hostPlatform.isDarwin clang_20; # clang_21 breaks gyp builds
buildInputs = [
pango
+1 -1
View File
@@ -42,7 +42,7 @@ buildNpmPackage rec {
nativeBuildInputs = [
pkg-config
]
++ lib.optional stdenv.isDarwin clang_20 # clang_21 breaks gyp builds
++ lib.optional stdenv.hostPlatform.isDarwin clang_20 # clang_21 breaks gyp builds
++ lib.optionals (!stdenv.hostPlatform.isDarwin) [
makeWrapper
copyDesktopItems
+1 -1
View File
@@ -48,7 +48,7 @@ rustPlatform.buildRustPackage (finalAttrs: {
vulkan-loader
zstd
]
++ lib.optionals stdenv.isLinux [
++ lib.optionals stdenv.hostPlatform.isLinux [
wayland
];
+3 -2
View File
@@ -35,9 +35,10 @@ stdenv.mkDerivation (finalAttrs: {
);
nativeBuildInputs =
lib.optionals stdenv.isLinux [ autoPatchelfHook ] ++ lib.optionals stdenv.isDarwin [ unzip ];
lib.optionals stdenv.hostPlatform.isLinux [ autoPatchelfHook ]
++ lib.optionals stdenv.hostPlatform.isDarwin [ unzip ];
buildInputs = lib.optionals stdenv.isLinux [ libgcc ];
buildInputs = lib.optionals stdenv.hostPlatform.isLinux [ libgcc ];
sourceRoot = ".";
+2 -2
View File
@@ -113,9 +113,9 @@ let
};
in
if stdenv.isLinux then
if stdenv.hostPlatform.isLinux then
linux
else if stdenv.isDarwin then
else if stdenv.hostPlatform.isDarwin then
darwin
else
throw "caido-desktop: unsupported platform ${stdenv.hostPlatform.system}"
+1 -1
View File
@@ -18,7 +18,7 @@ rustPlatform.buildRustPackage (finalAttrs: {
};
# FIXME: we don't support dtrace probe generation on macOS until we have a dtrace build: https://github.com/NixOS/nixpkgs/pull/392918
patches = lib.optionals stdenv.isDarwin [
patches = lib.optionals stdenv.hostPlatform.isDarwin [
./no-dtrace-macos.patch
];
+5 -3
View File
@@ -147,9 +147,11 @@ stdenv.mkDerivation (finalAttrs: {
'NOPLUGIN_LDFLAGS="-undefined dynamic_lookup"'
'';
preBuild = lib.optionalString (lib.strings.versionOlder version "2.4" && stdenv.isDarwin) ''
export NIX_LDFLAGS="$NIX_LDFLAGS -undefined dynamic_lookup"
'';
preBuild =
lib.optionalString (lib.strings.versionOlder version "2.4" && stdenv.hostPlatform.isDarwin)
''
export NIX_LDFLAGS="$NIX_LDFLAGS -undefined dynamic_lookup"
'';
# We need this for sysconfdir, see remark below.
installFlags = [ "DESTDIR=$(out)" ];
@@ -68,7 +68,7 @@ stdenv.mkDerivation (finalAttrs: {
]
++ lib.optional withLDAP "--with-ldap";
preBuild = lib.optionalString (!isCurrent && stdenv.isDarwin) ''
preBuild = lib.optionalString (!isCurrent && stdenv.hostPlatform.isDarwin) ''
export NIX_LDFLAGS="$NIX_LDFLAGS -undefined dynamic_lookup"
'';
+3 -3
View File
@@ -54,7 +54,7 @@ stdenv.mkDerivation (finalAttrs: {
++ lib.optionals enableNFD [
nativefiledialog-extended
]
++ lib.optionals (enableNFD && stdenv.isLinux) [
++ lib.optionals (enableNFD && stdenv.hostPlatform.isLinux) [
gtk3
]
++ lib.optionals enablePython [
@@ -75,7 +75,7 @@ stdenv.mkDerivation (finalAttrs: {
doCheck = enableTests;
nativeCheckInputs = lib.optionals (enableTests && stdenv.isLinux) [
nativeCheckInputs = lib.optionals (enableTests && stdenv.hostPlatform.isLinux) [
xvfb-run
];
@@ -83,7 +83,7 @@ stdenv.mkDerivation (finalAttrs: {
runHook preCheck
cd feather-tk/src/feather-tk-build
${if stdenv.isLinux then "xvfb-run" else ""} ctest --verbose -C Release
${if stdenv.hostPlatform.isLinux then "xvfb-run" else ""} ctest --verbose -C Release
runHook postCheck
'';
+1 -1
View File
@@ -63,7 +63,7 @@ buildNpmPackage {
electron
makeWrapper
]
++ lib.optionals stdenv.isDarwin [
++ lib.optionals stdenv.hostPlatform.isDarwin [
desktopToDarwinBundle
];
+1 -1
View File
@@ -43,7 +43,7 @@ stdenv.mkDerivation (finalAttrs: {
fontconfig
freetype
]
++ lib.optionals stdenv.isLinux [
++ lib.optionals stdenv.hostPlatform.isLinux [
alsa-lib
libx11
libxcomposite
+1 -1
View File
@@ -45,7 +45,7 @@ let
# Timeouts
"TestRunJob_WithConnectionFromCommandOptions"
]
++ lib.optionals stdenv.isDarwin [
++ lib.optionals stdenv.hostPlatform.isDarwin [
# Uses docker-specific options, unsupported on Darwin
"TestMergeJobOptions"
];
+1 -1
View File
@@ -34,6 +34,6 @@ stdenv.mkDerivation {
platforms = lib.platforms.unix;
# clang++: error: unsupported option '-mfpu=' for target 'arm64-apple-darwin'
# clang++: error: unsupported option '-mfloat-abi=' for target 'arm64-apple-darwin'
broken = stdenv.isDarwin && stdenv.isAarch64;
broken = stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isAarch64;
};
}
+1 -1
View File
@@ -43,7 +43,7 @@ stdenv.mkDerivation (finalAttrs: {
fontconfig
freetype
]
++ lib.optionals stdenv.isLinux [
++ lib.optionals stdenv.hostPlatform.isLinux [
alsa-lib
libx11
libxcomposite
+2 -2
View File
@@ -28,14 +28,14 @@ buildNpmPackage (finalAttrs: {
npmDepsHash = "sha256-4znN1YR3AX2SKeCJjUS8cm6WGcOGPXI27xrQCotBjgQ=";
dontPatchElf = stdenv.isDarwin;
dontPatchElf = stdenv.hostPlatform.isDarwin;
nativeBuildInputs = [
jq
pkg-config
makeWrapper
]
++ lib.optionals stdenv.isDarwin [ clang_20 ]; # clang_21 breaks @vscode/vsce's optionalDependencies keytar
++ lib.optionals stdenv.hostPlatform.isDarwin [ clang_20 ]; # clang_21 breaks @vscode/vsce's optionalDependencies keytar
buildInputs = [
ripgrep
+1 -1
View File
@@ -65,7 +65,7 @@ stdenv.mkDerivation (finalAttrs: {
# required to support pthread_cancel()
NIX_LDFLAGS =
lib.optionalString (stdenv.cc.isGNU && stdenv.hostPlatform.libc == "glibc") "-lgcc_s"
+ lib.optionalString stdenv.isFreeBSD "-lthr";
+ lib.optionalString stdenv.hostPlatform.isFreeBSD "-lthr";
# The build phase already installs it all
GIT_PREFIX = placeholder "out";
+1 -1
View File
@@ -106,7 +106,7 @@ buildGoModule (finalAttrs: {
"Test_dpkgUseCPEsForEOLEnvVar"
"Test_rpmUseCPEsForEOLEnvVar"
]
++ lib.optionals stdenv.isDarwin [
++ lib.optionals stdenv.hostPlatform.isDarwin [
# fails to generate x509 certificate
# cat: /etc/ssl/openssl.cnf: Operation not permitted
"Test_defaultHTTPClientHasCert"
+1 -1
View File
@@ -32,7 +32,7 @@ stdenv.mkDerivation (finalAttrs: {
buildInputs = [ gettext ];
propagatedBuildInputs = [ glib ];
env = lib.optionalAttrs stdenv.isDarwin {
env = lib.optionalAttrs stdenv.hostPlatform.isDarwin {
# Doesn't build on Darwin with -std=gnu23.
NIX_CFLAGS_COMPILE = "-std=gnu17";
};
+1 -1
View File
@@ -32,7 +32,7 @@ rustPlatform.buildRustPackage (finalAttrs: {
## Skipping this test due to the high variability of its outcome
## When the package was merged the test was passing but on hydra its not
## Look at PR #448907
++ (if pkgs.stdenv.isDarwin then [ "--skip=test_stdin_processing" ] else [ ]);
++ (if pkgs.stdenv.hostPlatform.isDarwin then [ "--skip=test_stdin_processing" ] else [ ]);
doInstallCheck = true;
nativeInstallCheckInputs = [ versionCheckHook ];
+1 -1
View File
@@ -17,7 +17,7 @@ stdenv.mkDerivation (finalAttrs: {
makeFlags = [
"PREFIX=${placeholder "out"}"
]
++ lib.optional stdenv.isDarwin "OS=";
++ lib.optional stdenv.hostPlatform.isDarwin "OS=";
buildFlags = [ "support" ];
+2 -2
View File
@@ -30,7 +30,7 @@ stdenv.mkDerivation (finalAttrs: {
# https://git.congatec.com/yocto/meta-openembedded/commit/3402bfac6b595c622e4590a8ff5eaaa854e2a2a3
./inetutils-1_9-PATH_PROCNET_DEV.patch
(if stdenv.isDarwin then ./tests-libls-2.sh.patch else ./tests-libls.sh.patch)
(if stdenv.hostPlatform.isDarwin then ./tests-libls-2.sh.patch else ./tests-libls.sh.patch)
(fetchpatch {
name = "CVE-2026-24061_1.patch";
@@ -92,7 +92,7 @@ stdenv.mkDerivation (finalAttrs: {
]
++ lib.optional stdenv.hostPlatform.isDarwin "--disable-servers";
${if stdenv.isDarwin then "hardeningDisable" else null} = [ "format" ];
${if stdenv.hostPlatform.isDarwin then "hardeningDisable" else null} = [ "format" ];
doCheck = true;
+1 -1
View File
@@ -47,7 +47,7 @@ stdenv.mkDerivation (finalAttrs: {
fetchSubmodules = true;
};
postPatch = lib.optionalString stdenv.isDarwin ''
postPatch = lib.optionalString stdenv.hostPlatform.isDarwin ''
substituteInPlace packaging/macos/CMakeLists.txt \
--replace-fail "fixup_bundle" "#fixup_bundle"
'';
+2 -2
View File
@@ -173,8 +173,8 @@ stdenv.mkDerivation rec {
zip -d $out/lib/javafx-web-*-*.jar "*.so"
# Use postgresql from nixpkgs since the bundled binary doesn't work on NixOS
ARCH1=${if stdenv.isAarch64 then "arm64v8" else "amd64"}
ARCH2=${if stdenv.isAarch64 then "arm_64" else "x86_64"}
ARCH1=${if stdenv.hostPlatform.isAarch64 then "arm64v8" else "amd64"}
ARCH2=${if stdenv.hostPlatform.isAarch64 then "arm_64" else "x86_64"}
mkdir postgresql
cd postgresql
ln -s ${postgresql}/{lib,share} ./
@@ -75,7 +75,7 @@ python3Packages.buildPythonPackage {
echo -e 'quit()' | env -i ./kresd -a 127.0.0.1#53535 -c test-http.lua
'';
doCheck = python3Packages.stdenv.isLinux; # maybe in future
doCheck = python3Packages.stdenv.hostPlatform.isLinux; # maybe in future
nativeCheckInputs = with python3Packages; [
augeas
dnspython
+2 -2
View File
@@ -52,7 +52,7 @@ stdenv.mkDerivation (finalAttrs: {
bison
doxygen
]
++ lib.optional stdenv.isLinux xvfb
++ lib.optional stdenv.hostPlatform.isLinux xvfb
++ lib.optional withWaylandTools wayland-scanner;
buildInputs = [
@@ -74,7 +74,7 @@ stdenv.mkDerivation (finalAttrs: {
"-Denable-wayland=${lib.boolToString withWaylandTools}"
];
doCheck = stdenv.isLinux; # TODO: disable just a part of the tests
doCheck = stdenv.hostPlatform.isLinux; # TODO: disable just a part of the tests
preCheck = ''
patchShebangs ../test/
'';
+1 -1
View File
@@ -81,7 +81,7 @@ buildGoModule (finalAttrs: {
checkFlags =
let
skippedTests = lib.optionals (stdenv.isDarwin) [
skippedTests = lib.optionals (stdenv.hostPlatform.isDarwin) [
# Fail only on *-darwin intermittently
# https://github.com/mostlygeek/llama-swap/issues/320
"TestProcess_AutomaticallyStartsUpstream"
+1 -1
View File
@@ -34,7 +34,7 @@ buildGoModule {
tags = [
"sqlite_omit_load_extension"
]
++ lib.optionals stdenv.isLinux [
++ lib.optionals stdenv.hostPlatform.isLinux [
"netgo"
"osusergo"
];
+1 -1
View File
@@ -20,7 +20,7 @@ rustPlatform.buildRustPackage (finalAttrs: {
cargoHash = "sha256-vGvpjRJr4ez322JWUwboVml22vnRVRlwpZ9W4F5wATA=";
nativeBuildInputs = lib.optionals stdenv.isLinux [ mold ];
nativeBuildInputs = lib.optionals stdenv.hostPlatform.isLinux [ mold ];
passthru.updateScript = nix-update-script { };
+1 -1
View File
@@ -26,7 +26,7 @@ stdenv.mkDerivation (finalAttrs: {
throw "only linux and mac x86_64 are currently supported"
);
nativeBuildInputs = lib.optionals stdenv.isLinux [ autoPatchelfHook ];
nativeBuildInputs = lib.optionals stdenv.hostPlatform.isLinux [ autoPatchelfHook ];
installPhase = ''
install -m755 -D bin/NuSMV $out/bin/NuSMV
+2 -2
View File
@@ -83,10 +83,10 @@ stdenv.mkDerivation (finalAttrs: {
gnutls
libnghttp2.dev
]
++ lib.optionals stdenv.isLinux [
++ lib.optionals stdenv.hostPlatform.isLinux [
lksctp-tools
]
++ lib.optionals (!stdenv.isLinux) [
++ lib.optionals (!stdenv.hostPlatform.isLinux) [
usrsctp
];
+3 -3
View File
@@ -39,11 +39,11 @@ stdenv.mkDerivation (finalAttrs: {
nativeBuildInputs = [
makeBinaryWrapper
]
++ lib.optionals stdenv.isLinux [
++ lib.optionals stdenv.hostPlatform.isLinux [
autoPatchelfHook
];
buildInputs = lib.optionals stdenv.isLinux [
buildInputs = lib.optionals stdenv.hostPlatform.isLinux [
libxcrypt-legacy
(lib.getLib stdenv.cc.cc)
];
@@ -59,7 +59,7 @@ stdenv.mkDerivation (finalAttrs: {
cp -r _internal $out/lib/pgsql-tools/
makeBinaryWrapper $out/lib/pgsql-tools/ossdbtoolsservice_main $out/bin/ossdbtoolsservice_main \
${lib.optionalString stdenv.isLinux ''--prefix LD_LIBRARY_PATH : "${
${lib.optionalString stdenv.hostPlatform.isLinux ''--prefix LD_LIBRARY_PATH : "${
lib.makeLibraryPath [
libxcrypt-legacy
(lib.getLib stdenv.cc.cc)
+4 -4
View File
@@ -47,7 +47,7 @@ buildDotnetModule rec {
glib
libadwaita
]
++ lib.optionals stdenv.isDarwin [
++ lib.optionals stdenv.hostPlatform.isDarwin [
# Transitive dylib deps that Pinta's NativeImportResolver dlopen's by bare name.
# These are not pulled in by wrapGAppsHook4's LD_LIBRARY_PATH on Darwin, so symlink is needed.
graphene
@@ -73,7 +73,7 @@ buildDotnetModule rec {
projectFile = "Pinta";
env = lib.optionalAttrs (!stdenv.isDarwin) {
env = lib.optionalAttrs (!stdenv.hostPlatform.isDarwin) {
LOCALE_ARCHIVE = "${glibcLocales}/lib/locale/locale-archive";
};
@@ -93,7 +93,7 @@ buildDotnetModule rec {
mkdir -p "$out/share/icons"
cp -r "$out/lib/Pinta/icons/." "$out/share/icons/"
''
+ lib.optionalString (!stdenv.isDarwin) ''
+ lib.optionalString (!stdenv.hostPlatform.isDarwin) ''
dotnet build installer/linux/install.proj \
-target:Install \
-p:ContinuousIntegrationBuild=true \
@@ -102,7 +102,7 @@ buildDotnetModule rec {
-p:PublishDir="$out/lib/Pinta" \
-p:InstallPrefix="$out"
''
+ lib.optionalString stdenv.isDarwin ''
+ lib.optionalString stdenv.hostPlatform.isDarwin ''
# Symlink all dylibs from runtimeDeps into the assembly dir.
# GirCore and Pinta's own NativeImportResolver both search here by bare name.
for dir in ${lib.concatMapStringsSep " " (d: "${lib.getLib d}/lib") runtimeDeps}; do
+1 -1
View File
@@ -33,7 +33,7 @@ buildGo125Module (finalAttrs: {
# mount: fusermount: exec: "fusermount": executable file not found in $PATH
"TestExecuteCmdMountDefault"
]
++ lib.optionals stdenv.isDarwin [
++ lib.optionals stdenv.hostPlatform.isDarwin [
"TestBTreeScanMemory"
"TestBTreeScanPebble"
"TestExecuteCmdServerDefault"
+2 -2
View File
@@ -18,7 +18,7 @@
writableTmpDirAsHomeHook,
buildVST3 ? true,
buildLV2 ? stdenv.isLinux,
buildLV2 ? stdenv.hostPlatform.isLinux,
}:
stdenv.mkDerivation (finalAttrs: {
@@ -43,7 +43,7 @@ stdenv.mkDerivation (finalAttrs: {
fontconfig
freetype
]
++ lib.optionals stdenv.isLinux [
++ lib.optionals stdenv.hostPlatform.isLinux [
alsa-lib
libx11
libxcomposite
+1 -1
View File
@@ -42,7 +42,7 @@ rustPlatform.buildRustPackage (finalAttrs: {
nativeBuildInputs = [ makeBinaryWrapper ];
buildInputs = lib.optionals stdenv.isDarwin [
buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [
libiconv
zlib
];
+1 -1
View File
@@ -43,7 +43,7 @@ stdenv.mkDerivation (finalAttrs: {
fontconfig
freetype
]
++ lib.optionals stdenv.isLinux [
++ lib.optionals stdenv.hostPlatform.isLinux [
alsa-lib
libx11
libxcomposite
+1 -1
View File
@@ -28,7 +28,7 @@ stdenv.mkDerivation {
# main.cpp:1568:36: error: '%s' directive output may be truncated writing up to 557 bytes into a region of size 5
env.CPPFLAGS = toString (
lib.optionals stdenv.cc.isGNU [ "-Wno-error=format-truncation" ]
++ lib.optionals stdenv.isDarwin [ "-Wno-error=vla-cxx-extension" ]
++ lib.optionals stdenv.hostPlatform.isDarwin [ "-Wno-error=vla-cxx-extension" ]
);
meta = {
+6 -6
View File
@@ -39,7 +39,7 @@ rustPlatform.buildRustPackage {
cmake
zig_0_13
]
++ lib.optionals stdenv.isLinux [
++ lib.optionals stdenv.hostPlatform.isLinux [
autoPatchelfHook
];
@@ -50,7 +50,7 @@ rustPlatform.buildRustPackage {
llvmPackages.llvm.dev
makeBinaryWrapper
]
++ lib.optionals stdenv.isLinux [
++ lib.optionals stdenv.hostPlatform.isLinux [
glibc
stdenv.cc.cc.lib
];
@@ -67,13 +67,13 @@ rustPlatform.buildRustPackage {
'';
postInstall =
lib.optionalString stdenv.isLinux ''
lib.optionalString stdenv.hostPlatform.isLinux ''
wrapProgram $out/bin/roc \
--set NIX_GLIBC_PATH ${glibc.out}/lib \
--set NIX_LIBGCC_S_PATH ${stdenv.cc.cc.lib}/lib \
--prefix PATH : ${lib.makeBinPath [ stdenv.cc ]}
''
+ lib.optionalString (!stdenv.isLinux) ''
+ lib.optionalString (!stdenv.hostPlatform.isLinux) ''
wrapProgram $out/bin/roc --prefix PATH : ${lib.makeBinPath [ stdenv.cc ]}
'';
@@ -84,12 +84,12 @@ rustPlatform.buildRustPackage {
];
checkPhase =
lib.optionalString stdenv.isLinux ''
lib.optionalString stdenv.hostPlatform.isLinux ''
runHook preCheck
NIX_GLIBC_PATH=${glibc.out}/lib NIX_LIBGCC_S_PATH=${stdenv.cc.cc.lib}/lib cargo test --release --workspace --exclude test_mono --exclude uitest -- --skip=glue_cli_tests --skip=test_snapshots
runHook postCheck
''
+ lib.optionalString (!stdenv.isLinux) ''
+ lib.optionalString (!stdenv.hostPlatform.isLinux) ''
runHook preCheck
cargo test --release --workspace --exclude test_mono --exclude uitest -- --skip=glue_cli_tests --skip=test_snapshots
runHook postCheck
+1 -1
View File
@@ -46,7 +46,7 @@ stdenv.mkDerivation (finalAttrs: {
meta = {
maintainers = with lib.maintainers; [ pmeinhold ];
platforms = lib.platforms.linux;
broken = stdenv.isDarwin;
broken = stdenv.hostPlatform.isDarwin;
changelog = "https://zimpl.zib.de/download/CHANGELOG.txt";
description = "Zuse Institute Mathematical Programming Language";
longDescription = ''
+1 -1
View File
@@ -50,7 +50,7 @@ stdenv.mkDerivation (finalAttrs: {
"out"
"doc"
]
++ lib.optionals (!stdenv.isDarwin) [
++ lib.optionals (!stdenv.hostPlatform.isDarwin) [
"man"
];
+2 -2
View File
@@ -199,9 +199,9 @@ let
};
buildAttrs =
if stdenv.isLinux then
if stdenv.hostPlatform.isLinux then
buildAttrsLinux
else if stdenv.isDarwin then
else if stdenv.hostPlatform.isDarwin then
buildAttrsDarwin
else
throw "platform not supported";
+1 -1
View File
@@ -38,7 +38,7 @@ stdenv.mkDerivation (finalAttrs: {
fontconfig
freetype
]
++ lib.optionals stdenv.isLinux [
++ lib.optionals stdenv.hostPlatform.isLinux [
alsa-lib
libx11
libxcomposite
+9 -9
View File
@@ -53,7 +53,7 @@ stdenv.mkDerivation (finalAttrs: {
# Chromium's Darwin toolchain defines _LIBCPP_HARDENING_MODE itself; keep
# cc-wrapper from injecting a conflicting default.
hardeningDisable = lib.optionals stdenv.isDarwin [
hardeningDisable = lib.optionals stdenv.hostPlatform.isDarwin [
"libcxxhardeningfast"
"libcxxhardeningextensive"
];
@@ -69,7 +69,7 @@ stdenv.mkDerivation (finalAttrs: {
pkg-config
gclient2nix.gclientUnpackHook
]
++ lib.optionals stdenv.isDarwin [
++ lib.optionals stdenv.hostPlatform.isDarwin [
apple-sdk
xcodebuild
];
@@ -78,10 +78,10 @@ stdenv.mkDerivation (finalAttrs: {
glib
pulseaudio
]
++ lib.optionals stdenv.isDarwin [
++ lib.optionals stdenv.hostPlatform.isDarwin [
llvmPackages.compiler-rt
]
++ lib.optionals stdenv.isLinux [
++ lib.optionals stdenv.hostPlatform.isLinux [
alsa-lib
];
@@ -92,7 +92,7 @@ stdenv.mkDerivation (finalAttrs: {
substituteInPlace modules/audio_device/linux/pulseaudiosymboltable_linux.cc \
--replace-fail "libpulse.so.0" "${pulseaudio}/lib/libpulse.so.0"
''
+ lib.optionalString stdenv.isDarwin ''
+ lib.optionalString stdenv.hostPlatform.isDarwin ''
# Fix Darwin Python script shebangs for sandbox builds
patchShebangs build/mac/should_use_hermetic_xcode.py build/toolchain/apple/linker_driver.py
@@ -105,7 +105,7 @@ stdenv.mkDerivation (finalAttrs: {
substituteInPlace build/config/mac/BUILD.gn \
--replace-fail "apple-macos" "apple-darwin"
''
+ lib.optionalString stdenv.isLinux ''
+ lib.optionalString stdenv.hostPlatform.isLinux ''
substituteInPlace modules/audio_device/linux/alsasymboltable_linux.cc \
--replace-fail "libasound.so.2" "${alsa-lib}/lib/libasound.so.2"
'';
@@ -116,7 +116,7 @@ stdenv.mkDerivation (finalAttrs: {
'';
gnFlags =
lib.optionals stdenv.isLinux [
lib.optionals stdenv.hostPlatform.isLinux [
# webrtc uses chromium's `src/build/BUILDCONFIG.gn`. many of these flags
# are copied from pkgs/applications/networking/browsers/chromium/common.nix.
''target_os="linux"''
@@ -133,7 +133,7 @@ stdenv.mkDerivation (finalAttrs: {
''custom_toolchain="//build/toolchain/linux/unbundle:default"''
''host_toolchain="//build/toolchain/linux/unbundle:default"''
]
++ lib.optionals stdenv.isDarwin [
++ lib.optionals stdenv.hostPlatform.isDarwin [
''target_os="mac"''
''mac_deployment_target="${stdenv.hostPlatform.darwinMinVersion}"''
"use_sysroot=true"
@@ -164,7 +164,7 @@ stdenv.mkDerivation (finalAttrs: {
"use_custom_libcxx=false"
''rust_sysroot_absolute="${buildPackages.rustc}"''
]
++ lib.optionals (stdenv.isLinux && stdenv.buildPlatform != stdenv.hostPlatform) [
++ lib.optionals (stdenv.hostPlatform.isLinux && stdenv.buildPlatform != stdenv.hostPlatform) [
''host_toolchain="//build/toolchain/linux/unbundle:host"''
''v8_snapshot_toolchain="//build/toolchain/linux/unbundle:host"''
];
+2 -2
View File
@@ -18,7 +18,7 @@
writableTmpDirAsHomeHook,
buildVST3 ? true,
buildLV2 ? stdenv.isLinux,
buildLV2 ? stdenv.hostPlatform.isLinux,
}:
stdenv.mkDerivation (finalAttrs: {
@@ -43,7 +43,7 @@ stdenv.mkDerivation (finalAttrs: {
fontconfig
freetype
]
++ lib.optionals stdenv.isLinux [
++ lib.optionals stdenv.hostPlatform.isLinux [
alsa-lib
libx11
libxcomposite
+1 -1
View File
@@ -48,7 +48,7 @@ rustPlatform.buildRustPackage (finalAttrs: {
"--skip=codegen"
"--skip=publish"
]
++ lib.optionals stdenv.isDarwin [
++ lib.optionals stdenv.hostPlatform.isDarwin [
# flakes on darwin in nix build sandbox, timing out waiting for listen addr
"--skip=cli_can_ping_spacetimedb_on_disk"
"--skip=cli_can_publish_spacetimedb_on_disk"
+5 -5
View File
@@ -39,7 +39,7 @@
}:
let
glLibs = lib.optionals stdenv.isLinux [
glLibs = lib.optionals stdenv.hostPlatform.isLinux [
libGL
libGLU
libglut
@@ -73,7 +73,7 @@ let
stdenv.cc.cc.lib
];
runtimeLibPath = lib.makeLibraryPath runtimeLibs;
libPathVar = if stdenv.isDarwin then "DYLD_LIBRARY_PATH" else "LD_LIBRARY_PATH";
libPathVar = if stdenv.hostPlatform.isDarwin then "DYLD_LIBRARY_PATH" else "LD_LIBRARY_PATH";
in
stdenv.mkDerivation (finalAttrs: {
version = "2.4.2";
@@ -101,7 +101,7 @@ stdenv.mkDerivation (finalAttrs: {
postInstall = ''
substituteInPlace "$out/share/applications/speed-dreams.desktop" \
--replace-fail "Exec=$out/games/speed-dreams-2" "Exec=speed-dreams"
${lib.optionalString stdenv.isLinux ''
${lib.optionalString stdenv.hostPlatform.isLinux ''
# Symlink for desktop icon
mkdir -p $out/share/icons/hicolor/{96x96,scalable}/apps
ln -s "$out/share/games/speed-dreams-2/data/icons/icon.png" "$out/share/icons/hicolor/96x96/apps/speed-dreams-2.png"
@@ -116,7 +116,7 @@ stdenv.mkDerivation (finalAttrs: {
makeWrapperArgs=(
--prefix ${libPathVar} : "$out/lib/games/speed-dreams-2/lib:$out/lib:${runtimeLibPath}"
)
${lib.optionalString stdenv.isLinux "makeWrapperArgs+=(--set SDL_VIDEODRIVER x11)"}
${lib.optionalString stdenv.hostPlatform.isLinux "makeWrapperArgs+=(--set SDL_VIDEODRIVER x11)"}
makeWrapper "$out/games/speed-dreams-2" "$out/bin/speed-dreams" "''${makeWrapperArgs[@]}"
'';
@@ -161,7 +161,7 @@ stdenv.mkDerivation (finalAttrs: {
minizip
rhash
]
++ lib.optionals stdenv.isLinux [
++ lib.optionals stdenv.hostPlatform.isLinux [
libGL
libGLU
libglut
+2 -2
View File
@@ -28,13 +28,13 @@ stdenv.mkDerivation (finalAttrs: {
nativeBuildInputs = [ xxd ];
buildInputs = [ zlib ] ++ lib.optionals stdenv.isDarwin [ llvmPackages.openmp ];
buildInputs = [ zlib ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ llvmPackages.openmp ];
enableParallelBuilding = true;
makeFlags = lib.optionals stdenv.hostPlatform.isAarch64 [ "CXXFLAGS_SIMD=" ];
preBuild = lib.optionalString stdenv.isDarwin ''
preBuild = lib.optionalString stdenv.hostPlatform.isDarwin ''
export CXXFLAGS="$CXXFLAGS -DSHM_NORESERVE=0"
'';
+1 -1
View File
@@ -50,7 +50,7 @@ buildGoModule (finalAttrs: {
preCheck = ''
# Remove test that requires networking
rm pkg/plugin/aqua/client/client_integration_test.go
${lib.optionalString (stdenv.isDarwin && stdenv.isx86_64) ''
${lib.optionalString (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isx86_64) ''
# Remove "[It] should make a request to fetch registries" test that fails on x86_64-darwin
rm pkg/plugin/aqua/client/client_test.go
''}
+1 -1
View File
@@ -37,7 +37,7 @@ buildGoModule {
checkFlags = [
"-skip=^TestReturnDirElement/Sort_by_Date$"
]
++ lib.optionals stdenv.isDarwin [
++ lib.optionals stdenv.hostPlatform.isDarwin [
# Only failing on nix darwin. I suspect this is due to the way
# darwin handles file permissions.
"-skip=^TestCompressSelectedFiles"
+1 -1
View File
@@ -43,7 +43,7 @@ stdenv.mkDerivation (finalAttrs: {
fontconfig
freetype
]
++ lib.optionals stdenv.isLinux [
++ lib.optionals stdenv.hostPlatform.isLinux [
alsa-lib
libx11
libxcomposite
+2 -2
View File
@@ -28,10 +28,10 @@ rustPlatform.buildRustPackage (finalAttrs: {
# Enable upstream "sound" feature when requested
buildFeatures = lib.optionals enableSound [ "sound" ];
nativeBuildInputs = lib.optionals (enableSound && stdenv.isLinux) [ pkg-config ];
nativeBuildInputs = lib.optionals (enableSound && stdenv.hostPlatform.isLinux) [ pkg-config ];
# Runtime/FFI deps for the sound feature (Linux)
buildInputs = lib.optionals (enableSound && stdenv.isLinux) [
buildInputs = lib.optionals (enableSound && stdenv.hostPlatform.isLinux) [
(alsa-lib-with-plugins.override {
plugins = [
alsa-plugins
+1 -1
View File
@@ -74,6 +74,6 @@ buildGoModule (finalAttrs: {
maintainers = [ lib.maintainers.McSinyx ];
mainProgram = "transito";
platforms = lib.platforms.unix;
broken = stdenv.isDarwin;
broken = stdenv.hostPlatform.isDarwin;
};
})
+3 -3
View File
@@ -22,7 +22,7 @@
}:
let
turingstdenv = if stdenv.isDarwin then llvmPackages_20.stdenv else stdenv;
turingstdenv = if stdenv.hostPlatform.isDarwin then llvmPackages_20.stdenv else stdenv;
in
turingstdenv.mkDerivation (finalAttrs: {
pname = "turingdb";
@@ -71,7 +71,7 @@ turingstdenv.mkDerivation (finalAttrs: {
zlib
]
++ lib.optionals turingstdenv.isDarwin [ llvmPackages_20.openmp ]
++ lib.optionals stdenv.isLinux [ stdenv.cc.cc.lib ];
++ lib.optionals stdenv.hostPlatform.isLinux [ stdenv.cc.cc.lib ];
cmakeFlags = [
(lib.cmakeBool "NIX_BUILD" true)
@@ -80,7 +80,7 @@ turingstdenv.mkDerivation (finalAttrs: {
(lib.cmakeFeature "CMAKE_EXE_LINKER_FLAGS" "-lgomp")
(lib.cmakeFeature "FLEX_INCLUDE_DIR" "${lib.getDev flex}/include")
]
++ lib.optionals stdenv.isDarwin [
++ lib.optionals stdenv.hostPlatform.isDarwin [
(lib.cmakeFeature "OpenMP_CXX_FLAGS" "-fopenmp")
(lib.cmakeFeature "OpenMP_CXX_LIB_NAMES" "omp")
(lib.cmakeFeature "OpenMP_omp_LIBRARY" "${lib.getLib llvmPackages_20.openmp}/lib/libomp.dylib")
+1 -1
View File
@@ -5,7 +5,7 @@
fetchFromGitHub,
installShellFiles,
pkg-config,
withBubblewrap ? stdenv.isLinux,
withBubblewrap ? stdenv.hostPlatform.isLinux,
makeBinaryWrapper,
xz,
zstd,
+3 -3
View File
@@ -249,13 +249,13 @@ stdenv.mkDerivation (finalAttrs: {
pkg-config
zstd
]
++ lib.optionals stdenv.isLinux [
++ lib.optionals stdenv.hostPlatform.isLinux [
copyDesktopItems
imagemagick
libicns
wrapGAppsHook3
]
++ lib.optionals stdenv.isDarwin [ rsync ];
++ lib.optionals stdenv.hostPlatform.isDarwin [ rsync ];
buildInputs = [
curl
@@ -320,7 +320,7 @@ stdenv.mkDerivation (finalAttrs: {
install -Dm644 icon_"$size"x"$size"x32.png $out/share/icons/hicolor/"$size"x"$size"/apps/Rack.png
done;
''
+ lib.optionalString stdenv.isDarwin ''
+ lib.optionalString stdenv.hostPlatform.isDarwin ''
mkdir -p $out/{bin,Applications}
mv dist/'VCV Rack ${lib.versions.major finalAttrs.version} Free.app' \
$out/Applications
+1 -1
View File
@@ -133,6 +133,6 @@ stdenv.mkDerivation (finalAttrs: {
maintainers = with lib.maintainers; [ fgaz ];
platforms = lib.platforms.all;
# Segfaults when building shaders
broken = stdenv.isLinux;
broken = stdenv.hostPlatform.isLinux;
};
})
+1 -1
View File
@@ -49,7 +49,7 @@
withDevDoc ?
!stdenv.hostPlatform.isDarwin
&& !stdenv.hostPlatform.isFreeBSD
&& !(stdenv.hostPlatform.isRiscV && stdenv.isLinux),
&& !(stdenv.hostPlatform.isRiscV && stdenv.hostPlatform.isLinux),
# passthru
testers,
+1 -1
View File
@@ -32,7 +32,7 @@ buildNpmPackage (finalAttrs: {
pkg-config
nodejs-slim.python
]
++ lib.optionals stdenv.isDarwin [ clang_20 ]; # clang_21 breaks @vscode/vsce's optional dependency keytar
++ lib.optionals stdenv.hostPlatform.isDarwin [ clang_20 ]; # clang_21 breaks @vscode/vsce's optional dependency keytar
buildInputs = [ libsecret ];
@@ -21,7 +21,7 @@ buildNpmPackage {
npmDepsHash = "sha256-zXhWtPuiu+CRk712KskuHP4vglogJmFoCak6qWczPFM=";
nativeBuildInputs = [ pkg-config ] ++ lib.optionals stdenv.isDarwin [ clang_20 ]; # clang_21 breaks keytar
nativeBuildInputs = [ pkg-config ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ clang_20 ]; # clang_21 breaks keytar
buildInputs = [ libsecret ];
+3 -3
View File
@@ -46,7 +46,7 @@ stdenv.mkDerivation (finalAttrs: {
copyDesktopItems
makeBinaryWrapper
]
++ lib.optional stdenv.isDarwin unzip;
++ lib.optional stdenv.hostPlatform.isDarwin unzip;
desktopItems = [
(makeDesktopItem {
@@ -80,7 +80,7 @@ stdenv.mkDerivation (finalAttrs: {
installPhase = ''
runHook preInstall
''
+ lib.optionalString stdenv.isLinux ''
+ lib.optionalString stdenv.hostPlatform.isLinux ''
mkdir -p $out/{bin,opt/Weasis,share/{applications,icons/hicolor/64x64/apps}}
mv weasis-${platform}-jdk${lib.versions.major jdk25.version}-${finalAttrs.version}/Weasis/* $out/opt/Weasis
@@ -91,7 +91,7 @@ stdenv.mkDerivation (finalAttrs: {
--prefix LD_LIBRARY_PATH : ${lib.makeLibraryPath runtimeDeps}
done
''
+ lib.optionalString stdenv.isDarwin ''
+ lib.optionalString stdenv.hostPlatform.isDarwin ''
mkdir -p $out/Applications
mv weasis-${platform}-jdk${lib.versions.major jdk25.version}-${finalAttrs.version}/Weasis.app $out/Applications/
''
+1 -1
View File
@@ -100,7 +100,7 @@ effectiveStdenv.mkDerivation (finalAttrs: {
for target in examples/{bench,command,cli,quantize,server,stream,talk-llama}/CMakeLists.txt; do
if ! grep -q -F 'install('; then
echo 'install(TARGETS ''${TARGET} RUNTIME)' >> $target
${lib.optionalString stdenv.isDarwin "echo 'install(TARGETS whisper.coreml LIBRARY)' >> src/CMakeLists.txt"}
${lib.optionalString stdenv.hostPlatform.isDarwin "echo 'install(TARGETS whisper.coreml LIBRARY)' >> src/CMakeLists.txt"}
fi
done
'';
+1 -1
View File
@@ -60,7 +60,7 @@ stdenv.mkDerivation {
bzip2
SDL2
]
++ lib.optionals (!buildServer && stdenv.isLinux) [
++ lib.optionals (!buildServer && stdenv.hostPlatform.isLinux) [
libx11
];
+2 -2
View File
@@ -23,7 +23,7 @@ rustPlatform.buildRustPackage (finalAttrs: {
nativeBuildInputs = [ installShellFiles ];
checkInputs = lib.optionals stdenv.isLinux [ acl ];
checkInputs = lib.optionals stdenv.hostPlatform.isLinux [ acl ];
# disable tests depending on special filesystem features
checkNoDefaultFeatures = true;
@@ -38,7 +38,7 @@ rustPlatform.buildRustPackage (finalAttrs: {
# had concurrency issues on 64 cores, also tests are quite fast compared to build
dontUseCargoParallelTests = true;
checkFlags = lib.optionals stdenv.isDarwin [
checkFlags = lib.optionals stdenv.hostPlatform.isDarwin [
# ---- test_socket_file::test_with_parallel_file_driver stdout ----
# STDOUT: 12:20:56 [WARN] Socket copy not supported by this OS: /private/tmp/nix-build-xcp-0.24.1.drv-0/source/targ>
#
+1 -1
View File
@@ -43,7 +43,7 @@ stdenv.mkDerivation (finalAttrs: {
libintl
];
env = lib.optionalAttrs stdenv.isDarwin {
env = lib.optionalAttrs stdenv.hostPlatform.isDarwin {
NIX_LDFLAGS = "-liconv";
};
+2 -2
View File
@@ -73,7 +73,7 @@ buildPythonPackage rec {
# required by test_xonsh_activator
virtualenv
]
++ lib.optionals (!stdenv.isDarwin) [
++ lib.optionals (!stdenv.hostPlatform.isDarwin) [
# required by test_man_completion
man
util-linux
@@ -110,7 +110,7 @@ buildPythonPackage rec {
"test_vc_get_branch"
"test_dirty_working_directory"
]
++ lib.optionals stdenv.isDarwin [
++ lib.optionals stdenv.hostPlatform.isDarwin [
# fails on Darwin
"test_bash_and_is_alias_is_only_functional_alias"
"test_complete_command"
@@ -508,10 +508,11 @@ stdenv.mkDerivation {
runHook postInstall
'';
${if stdenv.isDarwin && lib.versionAtLeast version "10" then "postInstall" else null} = ''
mkdir -p "$out"/nix-support
echo ${sigtool} > "$out"/nix-support/manual-sdk-deps
'';
${if stdenv.hostPlatform.isDarwin && lib.versionAtLeast version "10" then "postInstall" else null} =
''
mkdir -p "$out"/nix-support
echo ${sigtool} > "$out"/nix-support/manual-sdk-deps
'';
# stripping dlls results in:
# Failed to load System.Private.CoreLib.dll (error code 0x8007000B)
+1 -1
View File
@@ -99,7 +99,7 @@ stdenv.mkDerivation (finalAttrs: {
runHook postInstall
'';
postFixup = lib.optionalString stdenv.isDarwin ''
postFixup = lib.optionalString stdenv.hostPlatform.isDarwin ''
# Fix rpath so love binary can find libliblove.dylib
install_name_tool -change "@rpath/libliblove.dylib" "$out/lib/libliblove.dylib" "$out/bin/love"
'';
@@ -55,7 +55,7 @@ deployAndroidPackage {
libxkbfile
libxshmfence
])
++ lib.optional (os == "linux" && stdenv.isx86_64) pkgsi686Linux.glibc;
++ lib.optional (os == "linux" && stdenv.hostPlatform.isx86_64) pkgsi686Linux.glibc;
patchInstructions =
(lib.optionalString (os == "linux") ''
addAutoPatchelfSearchPath $packageBaseDir/lib
+1 -1
View File
@@ -28,7 +28,7 @@ deployAndroidPackage {
libxrender
libxext
])
++ lib.optionals (os == "linux" && stdenv.isx86_64) (
++ lib.optionals (os == "linux" && stdenv.hostPlatform.isx86_64) (
with pkgsi686Linux;
[
glibc
@@ -48,7 +48,7 @@ buildPythonPackage (finalAttrs: {
pytestCheckHook
];
disabledTests = lib.optionals stdenv.isDarwin [
disabledTests = lib.optionals stdenv.hostPlatform.isDarwin [
# Output is slightly different on macOS
"test_cast_format_locale"
];
@@ -77,7 +77,7 @@ buildPythonPackage {
passthru.updateScript = ./update.py;
meta = {
broken = stdenv.isDarwin; # elftools.common.exceptions.ELFError: Magic number does not match
broken = stdenv.hostPlatform.isDarwin; # elftools.common.exceptions.ELFError: Magic number does not match
changelog = "https://github.com/google-ai-edge/LiteRT/releases/tag/v${release.version}";
description = "LiteRT is for mobile and embedded devices";
downloadPage = "https://github.com/google-ai-edge/LiteRT";
@@ -126,7 +126,7 @@ buildPythonPackage rec {
# Tests that are seemingly broken. See https://github.com/scverse/anndata/issues/2017.
"test_concat_dask_sparse_matches_memory"
]
++ lib.optionals (stdenv.isAarch64 && stdenv.isDarwin) [
++ lib.optionals (stdenv.hostPlatform.isAarch64 && stdenv.hostPlatform.isDarwin) [
# RuntimeError: Cluster failed to start: [Errno 1] Operation not permitted
"test_dask_distributed_write"
"test_read_lazy_h5_cluster"
@@ -32,7 +32,7 @@ buildPythonPackage rec {
pythonImportsCheck = [ "ar" ];
disabledTests = lib.optionals stdenv.isDarwin [
disabledTests = lib.optionals stdenv.hostPlatform.isDarwin [
"test_list"
"test_read_content"
"test_read_binary"
@@ -40,7 +40,7 @@ buildPythonPackage rec {
pythonImportsCheckHook
];
disabledTests = lib.optionals stdenv.isDarwin [
disabledTests = lib.optionals stdenv.hostPlatform.isDarwin [
# Fails on macOS with Trace/BPT trap: 5 - something to do with recursion depth
"test_cubic_cubic"
];
@@ -36,7 +36,7 @@ buildPythonPackage rec {
pytestCheckHook
pyvirtualdisplay
]
++ lib.optionals stdenv.isLinux [
++ lib.optionals stdenv.hostPlatform.isLinux [
xvfb
];
@@ -56,7 +56,7 @@ buildPythonPackage (finalAttrs: {
# Tests crash with Abort trap: 6 on Darwin due to tokio runtime
# initialization in PyInit_pyo3_async_runtimes being blocked by the sandbox.
doCheck = !stdenv.isDarwin;
doCheck = !stdenv.hostPlatform.isDarwin;
pythonImportsCheck = [ "primp" ];
@@ -46,7 +46,7 @@ buildPythonPackage rec {
let
ext = stdenv.hostPlatform.extensions.sharedLibrary;
in
lib.optionalString stdenv.isLinux ''
lib.optionalString stdenv.hostPlatform.isLinux ''
cat > pyglet/lib.py <<EOF
import ctypes
def load_library(*names, **kwargs):
@@ -95,7 +95,7 @@ buildPythonPackage rec {
raise Exception("Could not load library {}".format(names))
EOF
''
+ lib.optionalString stdenv.isDarwin ''
+ lib.optionalString stdenv.hostPlatform.isDarwin ''
cat > pyglet/lib.py <<EOF
import os
import ctypes
@@ -133,7 +133,7 @@ buildPythonPackage rec {
nativeCheckInputs = [ pytestCheckHook ];
preCheck = # libEGL only available on Linux (despite meta.platforms on libGL)
lib.optionalString stdenv.isLinux ''
lib.optionalString stdenv.hostPlatform.isLinux ''
export PYGLET_HEADLESS=True
'';
@@ -58,7 +58,7 @@ buildPythonPackage rec {
xlib
libayatana-appindicator
]
++ lib.optionals stdenv.isDarwin [ pyobjc-framework-Quartz ];
++ lib.optionals stdenv.hostPlatform.isDarwin [ pyobjc-framework-Quartz ];
nativeCheckInputs = [ pytest ] ++ lib.optionals stdenv.hostPlatform.isLinux [ xvfb-run ];
@@ -77,7 +77,7 @@ buildPythonPackage rec {
meta = {
description = "High performance simulators for Qiskit";
# broken on darwin for unknown reasons
broken = stdenv.isDarwin;
broken = stdenv.hostPlatform.isDarwin;
homepage = "https://qiskit.github.io/qiskit-aer/";
downloadPage = "https://github.com/QISKit/qiskit-aer/releases";
changelog = "https://qiskit.github.io/qiskit-aer/release_notes.html";
@@ -36,7 +36,7 @@ buildPythonPackage (finalAttrs: {
pytest
pyperclip
]
++ lib.optionals stdenv.isLinux [
++ lib.optionals stdenv.hostPlatform.isLinux [
xclip
xvfb-run
];
@@ -26,12 +26,12 @@ buildPythonPackage rec {
build-system = [ poetry-core ];
dependencies = lib.optionals (stdenv.isDarwin) [
dependencies = lib.optionals (stdenv.hostPlatform.isDarwin) [
pyobjc-framework-Cocoa
cython
];
postPatch = lib.optionalString (stdenv.isLinux) ''
postPatch = lib.optionalString (stdenv.hostPlatform.isLinux) ''
substituteInPlace screeninfo/enumerators/xinerama.py \
--replace 'load_library("X11")' 'ctypes.cdll.LoadLibrary("${libx11}/lib/libX11.so")' \
--replace 'load_library("Xinerama")' 'ctypes.cdll.LoadLibrary("${libxinerama}/lib/libXinerama.so")'
@@ -69,7 +69,7 @@ buildPythonPackage rec {
# otherwise it cannot be imported because extension modules are not compiled in sources
checkPhase = ''
pushd "$TMPDIR"
${python.interpreter} -m pytest --pyargs tiledb${lib.optionalString stdenv.isDarwin " -k 'not test_ctx_thread_cleanup and not test_array'"}
${python.interpreter} -m pytest --pyargs tiledb${lib.optionalString stdenv.hostPlatform.isDarwin " -k 'not test_ctx_thread_cleanup and not test_array'"}
popd
'';
@@ -50,7 +50,7 @@ stdenv.mkDerivation (finalAttrs: {
# gettext gets pulled in via autoreconfHook because strictDeps is not set,
# and is linked against. Without this, it doesn't end up in HOST_PATH.
# TODO: enable strictDeps, and either make this dependency explicit, or remove it
++ lib.optional stdenv.isCygwin gettext;
++ lib.optional stdenv.hostPlatform.isCygwin gettext;
configureFlags =
lib.optional guileEnabled "--with-guile"

Some files were not shown because too many files have changed in this diff Show More