diff --git a/pkgs/applications/editors/rstudio/default.nix b/pkgs/applications/editors/rstudio/default.nix index 84e07c350a9f..71e8e199968e 100644 --- a/pkgs/applications/editors/rstudio/default.nix +++ b/pkgs/applications/editors/rstudio/default.nix @@ -140,7 +140,7 @@ stdenv.mkDerivation rec { (lib.cmakeBool "QUARTO_ENABLED" true) (lib.cmakeBool "RSTUDIO_CRASHPAD_ENABLED" false) # This is a NOOP except on x86_64-darwin (lib.cmakeFeature "CMAKE_INSTALL_PREFIX" ( - (placeholder "out") + (if stdenv.isDarwin then "/Applications" else "/lib/rstudio") + (placeholder "out") + (if stdenv.hostPlatform.isDarwin then "/Applications" else "/lib/rstudio") )) ] ++ lib.optionals (!server) [ diff --git a/pkgs/applications/science/electronics/qucs-s/default.nix b/pkgs/applications/science/electronics/qucs-s/default.nix index be0d8c098827..cc573cd897b5 100644 --- a/pkgs/applications/science/electronics/qucs-s/default.nix +++ b/pkgs/applications/science/electronics/qucs-s/default.nix @@ -50,7 +50,7 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ flex bison wrapQtAppsHook cmake ]; buildInputs = [ qtbase qttools qtcharts qtsvg gperf adms ] - ++ lib.optionals stdenv.isLinux [ qtwayland libX11 ] + ++ lib.optionals stdenv.hostPlatform.isLinux [ qtwayland libX11 ] ++ kernels; cmakeFlags = [ diff --git a/pkgs/applications/video/jellyfin-media-player/default.nix b/pkgs/applications/video/jellyfin-media-player/default.nix index 174cb55de29d..cc6e6a307eb4 100644 --- a/pkgs/applications/video/jellyfin-media-player/default.nix +++ b/pkgs/applications/video/jellyfin-media-player/default.nix @@ -82,7 +82,7 @@ mkDerivation rec { ln -s ${jellyfin-web}/share/jellyfin-web . ''; - postInstall = lib.optionalString stdenv.isDarwin '' + postInstall = lib.optionalString stdenv.hostPlatform.isDarwin '' mkdir -p $out/bin $out/Applications mv "$out/Jellyfin Media Player.app" $out/Applications ln -s "$out/Applications/Jellyfin Media Player.app/Contents/MacOS/Jellyfin Media Player" $out/bin/jellyfinmediaplayer diff --git a/pkgs/by-name/am/amazon-cloudwatch-agent/package.nix b/pkgs/by-name/am/amazon-cloudwatch-agent/package.nix index ddc047ec3b9a..e648615f52fb 100644 --- a/pkgs/by-name/am/amazon-cloudwatch-agent/package.nix +++ b/pkgs/by-name/am/amazon-cloudwatch-agent/package.nix @@ -48,7 +48,7 @@ buildGoModule rec { versionCheckProgramArg = "-version"; passthru = { - tests = lib.optionalAttrs stdenv.isLinux { + tests = lib.optionalAttrs stdenv.hostPlatform.isLinux { inherit (nixosTests) amazon-cloudwatch-agent; }; diff --git a/pkgs/by-name/am/amneziawg-tools/package.nix b/pkgs/by-name/am/amneziawg-tools/package.nix index c9551fbc92bb..df1d7f2e6bcd 100644 --- a/pkgs/by-name/am/amneziawg-tools/package.nix +++ b/pkgs/by-name/am/amneziawg-tools/package.nix @@ -46,7 +46,7 @@ stdenv.mkDerivation (finalAttrs: { substituteInPlace $out/lib/systemd/system/awg-quick@.service \ --replace-fail /usr/bin $out/bin '' - + lib.optionalString stdenv.isLinux '' + + lib.optionalString stdenv.hostPlatform.isLinux '' for f in $out/bin/*; do # Which firewall and resolvconf implementations to use should be determined by the # environment, we provide the "default" ones as fallback. @@ -65,7 +65,7 @@ stdenv.mkDerivation (finalAttrs: { } done '' - + lib.optionalString stdenv.isDarwin '' + + lib.optionalString stdenv.hostPlatform.isDarwin '' for f in $out/bin/*; do wrapProgram $f \ --prefix PATH : ${lib.makeBinPath [ amneziawg-go ]} diff --git a/pkgs/by-name/cr/crusader/package.nix b/pkgs/by-name/cr/crusader/package.nix index 15dd1f4337e6..eb530cb6d32d 100644 --- a/pkgs/by-name/cr/crusader/package.nix +++ b/pkgs/by-name/cr/crusader/package.nix @@ -42,7 +42,7 @@ rustPlatform.buildRustPackage rec { makeWrapper pkg-config ] - ++ lib.optionals stdenv.isLinux [ + ++ lib.optionals stdenv.hostPlatform.isLinux [ autoPatchelfHook ]; @@ -52,7 +52,7 @@ rustPlatform.buildRustPackage rec { libgcc libxkbcommon ] - ++ lib.optionals stdenv.isLinux [ + ++ lib.optionals stdenv.hostPlatform.isLinux [ xorg.libX11 xorg.libXcursor xorg.libXi diff --git a/pkgs/by-name/dn/dnstap/package.nix b/pkgs/by-name/dn/dnstap/package.nix index ec767eb33c93..307693c36d94 100644 --- a/pkgs/by-name/dn/dnstap/package.nix +++ b/pkgs/by-name/dn/dnstap/package.nix @@ -40,7 +40,7 @@ buildGoModule rec { homepage = "https://dnstap.info"; changelog = "https://github.com/dnstap/golang-dnstap/releases/tag/${src.rev}"; license = lib.licenses.asl20; - broken = stdenv.isDarwin; + broken = stdenv.hostPlatform.isDarwin; maintainers = [ lib.maintainers.azahi ]; mainProgram = "dnstap"; }; diff --git a/pkgs/by-name/ex/excalidraw_export/package.nix b/pkgs/by-name/ex/excalidraw_export/package.nix index e265af7ed94b..dae78f1e389f 100644 --- a/pkgs/by-name/ex/excalidraw_export/package.nix +++ b/pkgs/by-name/ex/excalidraw_export/package.nix @@ -35,6 +35,6 @@ buildNpmPackage rec { license = lib.licenses.mit; maintainers = with lib.maintainers; [ venikx ]; mainProgram = "excalidraw_export"; - broken = stdenv.isDarwin; + broken = stdenv.hostPlatform.isDarwin; }; } diff --git a/pkgs/by-name/fl/flexget/package.nix b/pkgs/by-name/fl/flexget/package.nix index 53bcb35c44d0..2c775deed674 100644 --- a/pkgs/by-name/fl/flexget/package.nix +++ b/pkgs/by-name/fl/flexget/package.nix @@ -105,7 +105,7 @@ python3Packages.buildPythonApplication rec { python3Packages.paramiko ]; - doCheck = !stdenv.isDarwin; + doCheck = !stdenv.hostPlatform.isDarwin; disabledTests = [ # reach the Internet diff --git a/pkgs/by-name/fo/foundry/package.nix b/pkgs/by-name/fo/foundry/package.nix index ff494616db3c..1a4217ac9050 100644 --- a/pkgs/by-name/fo/foundry/package.nix +++ b/pkgs/by-name/fo/foundry/package.nix @@ -25,9 +25,11 @@ rustPlatform.buildRustPackage rec { useFetchCargoVendor = true; cargoHash = "sha256-vVRFS7o0zV+ek9ho+URks6peOryMpFCE1sDzN9g7uH0="; - nativeBuildInputs = [ pkg-config ] ++ lib.optionals stdenv.isDarwin [ darwin.DarwinTools ]; + nativeBuildInputs = [ + pkg-config + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ darwin.DarwinTools ]; - buildInputs = [ solc ] ++ lib.optionals stdenv.isDarwin [ libusb1 ]; + buildInputs = [ solc ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ libusb1 ]; # Tests are run upstream, and many perform I/O # incompatible with the nix build sandbox. @@ -44,7 +46,7 @@ rustPlatform.buildRustPackage rec { env = { SVM_RELEASES_LIST_JSON = - if stdenv.isDarwin then + if stdenv.hostPlatform.isDarwin then # Confusingly, these are universal binaries, not amd64. # See: https://github.com/ethereum/solidity/issues/12291#issuecomment-1974771433 "${./svm-lists/macosx-amd64.json}" diff --git a/pkgs/by-name/g3/g3proxy/package.nix b/pkgs/by-name/g3/g3proxy/package.nix index 638806304fce..f32e62aae86a 100644 --- a/pkgs/by-name/g3/g3proxy/package.nix +++ b/pkgs/by-name/g3/g3proxy/package.nix @@ -48,7 +48,7 @@ rustPlatform.buildRustPackage rec { c-ares lua5_4 ] - ++ lib.optionals stdenv.isDarwin [ + ++ lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.Security ]; diff --git a/pkgs/by-name/go/golden-cheetah/package.nix b/pkgs/by-name/go/golden-cheetah/package.nix index 4d65093d2762..dd33b079b74d 100644 --- a/pkgs/by-name/go/golden-cheetah/package.nix +++ b/pkgs/by-name/go/golden-cheetah/package.nix @@ -90,7 +90,7 @@ stdenv.mkDerivation (finalAttrs: { ''; installPhase = - if stdenv.isLinux then + if stdenv.hostPlatform.isLinux then '' runHook preInstall @@ -101,7 +101,7 @@ stdenv.mkDerivation (finalAttrs: { runHook postInstall '' - else if stdenv.isDarwin then + else if stdenv.hostPlatform.isDarwin then '' runHook preInstall mkdir -p $out/Applications diff --git a/pkgs/by-name/ia/iamb/package.nix b/pkgs/by-name/ia/iamb/package.nix index 8ae9bc6787bf..ef59f9efd7a1 100644 --- a/pkgs/by-name/ia/iamb/package.nix +++ b/pkgs/by-name/ia/iamb/package.nix @@ -28,7 +28,7 @@ rustPlatform.buildRustPackage rec { export HOME=$(mktemp -d) ''; - checkFlags = lib.optionals stdenv.isDarwin [ + checkFlags = lib.optionals stdenv.hostPlatform.isDarwin [ # Attempted to create a NULL object. "--skip=base::tests::test_complete_cmdbar" "--skip=base::tests::test_complete_msgbar" diff --git a/pkgs/by-name/ki/kikoplay/package.nix b/pkgs/by-name/ki/kikoplay/package.nix index c26d1dd29aad..d56f8004a0bd 100644 --- a/pkgs/by-name/ki/kikoplay/package.nix +++ b/pkgs/by-name/ki/kikoplay/package.nix @@ -92,6 +92,6 @@ stdenv.mkDerivation rec { homepage = "https://kikoplay.fun"; license = lib.licenses.gpl3Only; # See https://github.com/NixOS/nixpkgs/pull/354929 - broken = stdenv.isDarwin; + broken = stdenv.hostPlatform.isDarwin; }; } diff --git a/pkgs/by-name/li/libcosmicAppHook/package.nix b/pkgs/by-name/li/libcosmicAppHook/package.nix index d7e177c42cf3..6bd2012495cf 100644 --- a/pkgs/by-name/li/libcosmicAppHook/package.nix +++ b/pkgs/by-name/li/libcosmicAppHook/package.nix @@ -38,7 +38,7 @@ makeSetupHook { xorg.libXi xorg.libxcb ] - ++ lib.optionals (!stdenv.isDarwin) [ + ++ lib.optionals (!stdenv.hostPlatform.isDarwin) [ wayland vulkan-loader ]; @@ -64,7 +64,7 @@ makeSetupHook { # for x11rb "xcb" ] - ++ lib.optionals (!stdenv.isDarwin) [ + ++ lib.optionals (!stdenv.hostPlatform.isDarwin) [ # for wgpu-hal, wayland-sys "wayland-client" # for wgpu-hal diff --git a/pkgs/by-name/li/librist/package.nix b/pkgs/by-name/li/librist/package.nix index 8e19eb061555..f1174833ab29 100644 --- a/pkgs/by-name/li/librist/package.nix +++ b/pkgs/by-name/li/librist/package.nix @@ -23,7 +23,7 @@ stdenv.mkDerivation rec { }; # avoid rebuild on Linux for now - patches = lib.optionals stdenv.isDarwin [ + patches = lib.optionals stdenv.hostPlatform.isDarwin [ # https://code.videolan.org/rist/librist/-/issues/192 ./no-brew-darwin.diff ]; diff --git a/pkgs/by-name/li/livekit-libwebrtc/package.nix b/pkgs/by-name/li/livekit-libwebrtc/package.nix index d452bc54e5e1..6e26db659732 100644 --- a/pkgs/by-name/li/livekit-libwebrtc/package.nix +++ b/pkgs/by-name/li/livekit-libwebrtc/package.nix @@ -166,7 +166,7 @@ stdenv.mkDerivation { cpio pkg-config ] - ++ lib.optionals stdenv.isDarwin [ xcbuild ]; + ++ lib.optionals stdenv.hostPlatform.isDarwin [ xcbuild ]; buildInputs = [ nasm ] diff --git a/pkgs/by-name/ln/lnav/package.nix b/pkgs/by-name/ln/lnav/package.nix index 2d2378e9df5b..9af958ac6723 100644 --- a/pkgs/by-name/ln/lnav/package.nix +++ b/pkgs/by-name/ln/lnav/package.nix @@ -57,7 +57,7 @@ stdenv.mkDerivation rec { curl libarchive ] - ++ lib.optionals (!stdenv.isDarwin) [ + ++ lib.optionals (!stdenv.hostPlatform.isDarwin) [ gpm ]; diff --git a/pkgs/by-name/lo/logrotate/package.nix b/pkgs/by-name/lo/logrotate/package.nix index 4eb443134ab0..3f454af211ab 100644 --- a/pkgs/by-name/lo/logrotate/package.nix +++ b/pkgs/by-name/lo/logrotate/package.nix @@ -5,7 +5,7 @@ gzip, popt, autoreconfHook, - aclSupport ? stdenv.isLinux, + aclSupport ? stdenv.hostPlatform.isLinux, acl, nixosTests, }: diff --git a/pkgs/by-name/ma/mattermost/tests.nix b/pkgs/by-name/ma/mattermost/tests.nix index 3e70be5e5ade..0eaf1c8966a9 100644 --- a/pkgs/by-name/ma/mattermost/tests.nix +++ b/pkgs/by-name/ma/mattermost/tests.nix @@ -143,7 +143,7 @@ mattermost.overrideAttrs ( "TestSessionStore/MySQL/SessionGetWithDeviceId" "TestSessionStore/MySQL/GetMobileSessionMetadata" ] - ++ optionals (!stdenv.isx86_64) [ + ++ optionals (!stdenv.hostPlatform.isx86_64) [ # aarch64: invalid operating system or processor architecture "TestCanIUpgradeToE0" ]; diff --git a/pkgs/by-name/mc/mcpelauncher-client/package.nix b/pkgs/by-name/mc/mcpelauncher-client/package.nix index dba7dc1539e9..4fbc69f8b30a 100644 --- a/pkgs/by-name/mc/mcpelauncher-client/package.nix +++ b/pkgs/by-name/mc/mcpelauncher-client/package.nix @@ -55,7 +55,7 @@ clangStdenv.mkDerivation (finalAttrs: { ]; # Path hard-coded paths. - postPatch = lib.optionalString stdenv.isLinux '' + postPatch = lib.optionalString stdenv.hostPlatform.isLinux '' substituteInPlace mcpelauncher-client/src/jni/main_activity.cpp \ --replace-fail /usr/bin/xdg-open ${xdg-utils}/bin/xdg-open \ --replace-fail /usr/bin/zenity ${zenity}/bin/zenity diff --git a/pkgs/by-name/me/megacmd/package.nix b/pkgs/by-name/me/megacmd/package.nix index ea68f8fa84ce..cf98f886d1a0 100644 --- a/pkgs/by-name/me/megacmd/package.nix +++ b/pkgs/by-name/me/megacmd/package.nix @@ -26,7 +26,7 @@ let pname = "megacmd"; version = "1.7.0"; srcOptions = - if stdenv.isLinux then + if stdenv.hostPlatform.isLinux then { tag = "${version}_Linux"; hash = "sha256-UlSqwM8GQKeG8/K0t5DbM034NQOeBg+ujNi/MMsVCuM="; @@ -56,7 +56,7 @@ stdenv.mkDerivation { ]; buildInputs = - lib.optionals stdenv.isLinux [ gcc-unwrapped ] # fix: ld: cannot find lib64/libstdc++fs.a + lib.optionals stdenv.hostPlatform.isLinux [ gcc-unwrapped ] # fix: ld: cannot find lib64/libstdc++fs.a ++ [ c-ares cryptopp diff --git a/pkgs/by-name/my/mydumper/package.nix b/pkgs/by-name/my/mydumper/package.nix index 68e8fda87c6f..e0e79ac707bc 100644 --- a/pkgs/by-name/my/mydumper/package.nix +++ b/pkgs/by-name/my/mydumper/package.nix @@ -62,7 +62,7 @@ stdenv.mkDerivation rec { zlib zstd ] - ++ lib.optionals stdenv.isLinux [ + ++ lib.optionals stdenv.hostPlatform.isLinux [ libselinux libsepol ]; @@ -73,7 +73,7 @@ stdenv.mkDerivation rec { ]; env.NIX_CFLAGS_COMPILE = ( - if stdenv.isDarwin then + if stdenv.hostPlatform.isDarwin then toString [ "-Wno-error=deprecated-non-prototype" "-Wno-error=format" diff --git a/pkgs/by-name/ox/oxide-rs/package.nix b/pkgs/by-name/ox/oxide-rs/package.nix index 0ceb63fab621..ee681901bfa1 100644 --- a/pkgs/by-name/ox/oxide-rs/package.nix +++ b/pkgs/by-name/ox/oxide-rs/package.nix @@ -59,7 +59,7 @@ rustPlatform.buildRustPackage rec { openssl zlib ] - ++ lib.optionals stdenv.isDarwin [ + ++ lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.Security darwin.apple_sdk.frameworks.SystemConfiguration ]; diff --git a/pkgs/by-name/pr/proxychains-ng/package.nix b/pkgs/by-name/pr/proxychains-ng/package.nix index f6e666058e96..20a7bb0e13d1 100644 --- a/pkgs/by-name/pr/proxychains-ng/package.nix +++ b/pkgs/by-name/pr/proxychains-ng/package.nix @@ -29,7 +29,7 @@ stdenv.mkDerivation rec { }) ]; - configureFlags = lib.optionals stdenv.isDarwin [ + configureFlags = lib.optionals stdenv.hostPlatform.isDarwin [ "--hookmethod=${darwinHookMethod}" ]; diff --git a/pkgs/by-name/qo/qownnotes/package.nix b/pkgs/by-name/qo/qownnotes/package.nix index 54207ab349bc..0c0d9ac88eaf 100644 --- a/pkgs/by-name/qo/qownnotes/package.nix +++ b/pkgs/by-name/qo/qownnotes/package.nix @@ -59,7 +59,7 @@ stdenv.mkDerivation (finalAttrs: { --fish <(xvfb-run $out/bin/${finalAttrs.appname} --completion fish) '' # Install shell completion on macOS - + lib.optionalString stdenv.isDarwin '' + + lib.optionalString stdenv.hostPlatform.isDarwin '' installShellCompletion --cmd ${finalAttrs.pname} \ --bash <($out/bin/${finalAttrs.appname} --completion bash) \ --fish <($out/bin/${finalAttrs.appname} --completion fish) diff --git a/pkgs/by-name/ry/ryubing/package.nix b/pkgs/by-name/ry/ryubing/package.nix index 5a9b762224ef..17a272ed55a6 100644 --- a/pkgs/by-name/ry/ryubing/package.nix +++ b/pkgs/by-name/ry/ryubing/package.nix @@ -39,7 +39,7 @@ buildDotnetModule rec { hash = "sha256-pLzmfrdjpn2DTg2AJF1yyTJJPxHScQTX+yq9MbuzMHk="; }; - nativeBuildInputs = lib.optional stdenv.isDarwin [ + nativeBuildInputs = lib.optional stdenv.hostPlatform.isDarwin [ cctools darwin.sigtool ]; @@ -75,17 +75,17 @@ buildDotnetModule rec { libGL SDL2 ] - ++ lib.optional (!stdenv.isDarwin) [ + ++ lib.optional (!stdenv.hostPlatform.isDarwin) [ udev pulseaudio ] - ++ lib.optional stdenv.isDarwin [ moltenvk ]; + ++ lib.optional stdenv.hostPlatform.isDarwin [ moltenvk ]; projectFile = "Ryujinx.sln"; testProjectFile = "src/Ryujinx.Tests/Ryujinx.Tests.csproj"; # Tests on Darwin currently fail because of Ryujinx.Tests.Unicorn - doCheck = !stdenv.isDarwin; + doCheck = !stdenv.hostPlatform.isDarwin; dotnetFlags = [ "/p:ExtraDefineConstants=DISABLE_UPDATER%2CFORCE_EXTERNAL_BASE_DIR" @@ -107,7 +107,7 @@ buildDotnetModule rec { ''; preFixup = '' - ${lib.optionalString stdenv.isLinux '' + ${lib.optionalString stdenv.hostPlatform.isLinux '' mkdir -p $out/share/{applications,icons/hicolor/scalable/apps,mime/packages} pushd ${src}/distribution/linux @@ -121,7 +121,7 @@ buildDotnetModule rec { ''} # Don't make a softlink on OSX because of its case insensitivity - ${lib.optionalString (!stdenv.isDarwin) "ln -s $out/bin/Ryujinx $out/bin/ryujinx"} + ${lib.optionalString (!stdenv.hostPlatform.isDarwin) "ln -s $out/bin/Ryujinx $out/bin/ryujinx"} ''; passthru.updateScript = ./updater.sh; diff --git a/pkgs/by-name/sd/sdl3/package.nix b/pkgs/by-name/sd/sdl3/package.nix index 6f7f818984aa..934d5673acbb 100644 --- a/pkgs/by-name/sd/sdl3/package.nix +++ b/pkgs/by-name/sd/sdl3/package.nix @@ -47,7 +47,7 @@ libudevSupport ? stdenv.hostPlatform.isLinux && !stdenv.hostPlatform.isAndroid, sndioSupport ? false, testSupport ? true, - waylandSupport ? stdenv.isLinux && !stdenv.hostPlatform.isAndroid, + waylandSupport ? stdenv.hostPlatform.isLinux && !stdenv.hostPlatform.isAndroid, x11Support ? !stdenv.hostPlatform.isAndroid && !stdenv.hostPlatform.isWindows, }: diff --git a/pkgs/by-name/so/sov/package.nix b/pkgs/by-name/so/sov/package.nix index 747c39e7cadb..e7a27e8372a3 100644 --- a/pkgs/by-name/so/sov/package.nix +++ b/pkgs/by-name/so/sov/package.nix @@ -64,6 +64,6 @@ stdenv.mkDerivation (finalAttrs: { maintainers = with lib.maintainers; [ ]; inherit (wayland.meta) platforms; # sys/timerfd.h header inexistent - broken = stdenv.isDarwin; + broken = stdenv.hostPlatform.isDarwin; }; }) diff --git a/pkgs/by-name/st/stegseek/package.nix b/pkgs/by-name/st/stegseek/package.nix index 12416129daa6..2aa6b6a82a90 100644 --- a/pkgs/by-name/st/stegseek/package.nix +++ b/pkgs/by-name/st/stegseek/package.nix @@ -32,10 +32,10 @@ stdenv.mkDerivation rec { ]; # tests get stuck on aarch64-linux - doCheck = stdenv.isx86_64 && stdenv.isLinux; + doCheck = stdenv.hostPlatform.isx86_64 && stdenv.hostPlatform.isLinux; meta = with lib; { - broken = stdenv.isDarwin; + broken = stdenv.hostPlatform.isDarwin; description = "Tool to crack steganography"; longDescription = '' Stegseek is a lightning fast steghide cracker that can be diff --git a/pkgs/by-name/tr/tracy/package.nix b/pkgs/by-name/tr/tracy/package.nix index 71e3378ab9df..5916ac4cca4f 100644 --- a/pkgs/by-name/tr/tracy/package.nix +++ b/pkgs/by-name/tr/tracy/package.nix @@ -25,8 +25,8 @@ wayland-protocols, }: -assert withGtkFileSelector -> stdenv.isLinux; -assert withWayland -> stdenv.isLinux; +assert withGtkFileSelector -> stdenv.hostPlatform.isLinux; +assert withWayland -> stdenv.hostPlatform.isLinux; stdenv.mkDerivation rec { pname = if withWayland then "tracy-wayland" else "tracy-glfw"; @@ -49,7 +49,7 @@ stdenv.mkDerivation rec { ninja pkg-config ] - ++ lib.optionals stdenv.isLinux [ wayland-scanner ] + ++ lib.optionals stdenv.hostPlatform.isLinux [ wayland-scanner ] ++ lib.optionals stdenv.cc.isClang [ stdenv.cc.cc.libllvm ]; buildInputs = @@ -79,8 +79,8 @@ stdenv.mkDerivation rec { "-DDOWNLOAD_CAPSTONE=off" "-DTRACY_STATIC=off" ] - ++ lib.optional (stdenv.isLinux && withGtkFileSelector) "-DGTK_FILESELECTOR=ON" - ++ lib.optional (stdenv.isLinux && !withWayland) "-DLEGACY=on"; + ++ lib.optional (stdenv.hostPlatform.isLinux && withGtkFileSelector) "-DGTK_FILESELECTOR=ON" + ++ lib.optional (stdenv.hostPlatform.isLinux && !withWayland) "-DLEGACY=on"; env.NIX_CFLAGS_COMPILE = toString ( [ ] diff --git a/pkgs/by-name/tw/twitch-hls-client/package.nix b/pkgs/by-name/tw/twitch-hls-client/package.nix index d1ba72addbcc..190a8e94b5b7 100644 --- a/pkgs/by-name/tw/twitch-hls-client/package.nix +++ b/pkgs/by-name/tw/twitch-hls-client/package.nix @@ -20,7 +20,7 @@ rustPlatform.buildRustPackage rec { useFetchCargoVendor = true; cargoHash = "sha256-sqhB2Lj3RK1OyXy87Be9aOkfcksqz+5VfRTlKuswerU="; - buildInputs = lib.optionals stdenv.isDarwin [ + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.Security ]; diff --git a/pkgs/by-name/ua/uasm/package.nix b/pkgs/by-name/ua/uasm/package.nix index 24450ee9ccd2..920603457e5a 100644 --- a/pkgs/by-name/ua/uasm/package.nix +++ b/pkgs/by-name/ua/uasm/package.nix @@ -52,6 +52,6 @@ stdenv.mkDerivation rec { platforms = platforms.unix; maintainers = with maintainers; [ thiagokokada ]; license = licenses.watcom; - broken = stdenv.isDarwin; + broken = stdenv.hostPlatform.isDarwin; }; } diff --git a/pkgs/by-name/va/vanillatd/package.nix b/pkgs/by-name/va/vanillatd/package.nix index 73754e32c14c..3864e687d3cf 100644 --- a/pkgs/by-name/va/vanillatd/package.nix +++ b/pkgs/by-name/va/vanillatd/package.nix @@ -82,7 +82,7 @@ stdenv.mkDerivation (finalAttrs: { ''; installPhase = - if stdenv.isDarwin then + if stdenv.hostPlatform.isDarwin then '' runHook preInstall @@ -146,7 +146,7 @@ stdenv.mkDerivation (finalAttrs: { buildPhase = let Default_Data_Path = - if stdenv.isDarwin then + if stdenv.hostPlatform.isDarwin then "$out/Applications/${appName}.app/Contents/share/${appName}" else "$out/share/${appName}"; diff --git a/pkgs/by-name/vs/vsmartcard-pcsc-relay/package.nix b/pkgs/by-name/vs/vsmartcard-pcsc-relay/package.nix index a277b2c63fa8..275eda2983ba 100644 --- a/pkgs/by-name/vs/vsmartcard-pcsc-relay/package.nix +++ b/pkgs/by-name/vs/vsmartcard-pcsc-relay/package.nix @@ -43,7 +43,7 @@ stdenv.mkDerivation (finalAttrs: { ] )) ] - ++ lib.optionals stdenv.isDarwin [ + ++ lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.PCSC ]; @@ -52,7 +52,7 @@ stdenv.mkDerivation (finalAttrs: { homepage = "https://frankmorgner.github.io/vsmartcard/pcsc-relay/README.html"; license = lib.licenses.gpl3Only; platforms = lib.platforms.all; - broken = stdenv.isDarwin; + broken = stdenv.hostPlatform.isDarwin; maintainers = with lib.maintainers; [ stargate01 ]; }; }) diff --git a/pkgs/by-name/vs/vsmartcard-vpcd/package.nix b/pkgs/by-name/vs/vsmartcard-vpcd/package.nix index d4fcf0d63f18..490115a6ce8b 100644 --- a/pkgs/by-name/vs/vsmartcard-vpcd/package.nix +++ b/pkgs/by-name/vs/vsmartcard-vpcd/package.nix @@ -46,18 +46,18 @@ stdenv.mkDerivation (finalAttrs: { ] )) ] - ++ lib.optionals stdenv.isDarwin [ + ++ lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.PCSC ]; - configureFlags = lib.optional stdenv.isDarwin "--enable-infoplist"; + configureFlags = lib.optional stdenv.hostPlatform.isDarwin "--enable-infoplist"; meta = { description = "Emulates a smart card and makes it accessible through PC/SC"; homepage = "http://frankmorgner.github.io/vsmartcard/virtualsmartcard/README.html"; license = lib.licenses.gpl3Only; platforms = lib.platforms.all; - broken = stdenv.isDarwin; + broken = stdenv.hostPlatform.isDarwin; maintainers = with lib.maintainers; [ stargate01 ]; }; }) diff --git a/pkgs/by-name/zf/zfs-replicate/package.nix b/pkgs/by-name/zf/zfs-replicate/package.nix index 130d6e813c04..451a2cf6c5bc 100644 --- a/pkgs/by-name/zf/zfs-replicate/package.nix +++ b/pkgs/by-name/zf/zfs-replicate/package.nix @@ -44,7 +44,7 @@ python3Packages.buildPythonApplication rec { doCheck = true; - disabledTestPaths = lib.optionals stdenv.isDarwin [ + disabledTestPaths = lib.optionals stdenv.hostPlatform.isDarwin [ # AssertionError: Expected SystemExit or FileNotFoundError "zfs_test/replicate_test/cli_test/main_test.py" ]; diff --git a/pkgs/development/compilers/binaryen/default.nix b/pkgs/development/compilers/binaryen/default.nix index a06bd43ed3c6..f2329b275173 100644 --- a/pkgs/development/compilers/binaryen/default.nix +++ b/pkgs/development/compilers/binaryen/default.nix @@ -77,7 +77,7 @@ stdenv.mkDerivation rec { "lit" "gtest" ]; - doCheck = stdenv.isLinux; + doCheck = stdenv.hostPlatform.isLinux; meta = with lib; { homepage = "https://github.com/WebAssembly/binaryen"; diff --git a/pkgs/development/libraries/librsvg/default.nix b/pkgs/development/libraries/librsvg/default.nix index 5a9d1a9a6121..3d20ceb0a4db 100644 --- a/pkgs/development/libraries/librsvg/default.nix +++ b/pkgs/development/libraries/librsvg/default.nix @@ -143,7 +143,7 @@ stdenv.mkDerivation (finalAttrs: { # Probably broken MIME type detection on Darwin. # Tests fail with imprecise rendering on i686. - doCheck = !stdenv.isDarwin && !stdenv.hostPlatform.isi686; + doCheck = !stdenv.hostPlatform.isDarwin && !stdenv.hostPlatform.isi686; env = { PKG_CONFIG_GDK_PIXBUF_2_0_GDK_PIXBUF_QUERY_LOADERS = writeShellScript "gdk-pixbuf-loader-loaders-wrapped" '' diff --git a/pkgs/development/libraries/qtspell/default.nix b/pkgs/development/libraries/qtspell/default.nix index 1e5069d8b5d8..fafa13d11457 100644 --- a/pkgs/development/libraries/qtspell/default.nix +++ b/pkgs/development/libraries/qtspell/default.nix @@ -35,7 +35,7 @@ stdenv.mkDerivation rec { enchant qtbase ] - ++ lib.optionals stdenv.isDarwin [ + ++ lib.optionals stdenv.hostPlatform.isDarwin [ glib llvmPackages.clang ]; diff --git a/pkgs/development/python-modules/distutils/default.nix b/pkgs/development/python-modules/distutils/default.nix index f0264209b887..b98ef0113e08 100644 --- a/pkgs/development/python-modules/distutils/default.nix +++ b/pkgs/development/python-modules/distutils/default.nix @@ -59,7 +59,7 @@ buildPythonPackage rec { ]; # jaraco-path depends ob pyobjc - doCheck = !stdenv.isDarwin; + doCheck = !stdenv.hostPlatform.isDarwin; meta = { description = "Distutils as found in cpython"; diff --git a/pkgs/development/python-modules/kaleido/default.nix b/pkgs/development/python-modules/kaleido/default.nix index 5932fd4a8172..54e523c12454 100644 --- a/pkgs/development/python-modules/kaleido/default.nix +++ b/pkgs/development/python-modules/kaleido/default.nix @@ -93,7 +93,7 @@ buildPythonPackage rec { #ln -s ${dejavu_fonts}/share/fonts/truetype/* $out/${python.sitePackages}/kaleido/executable/xdg/fonts/truetype/dejavu/ #ln -s ${lato}/share/fonts/lato/* $out/${python.sitePackages}/kaleido/executable/xdg/fonts/truetype/lato/ '' - + lib.optionalString (!stdenv.isDarwin) '' + + lib.optionalString (!stdenv.hostPlatform.isDarwin) '' # Replace bundled swiftshader with libGL rm -rf $out/${python.sitePackages}/kaleido/executable/bin/swiftshader ln -s ${libGL}/lib $out/${python.sitePackages}/kaleido/executable/bin/swiftshader diff --git a/pkgs/development/python-modules/libuuu/default.nix b/pkgs/development/python-modules/libuuu/default.nix index bdb5ad84f38d..05396c577018 100644 --- a/pkgs/development/python-modules/libuuu/default.nix +++ b/pkgs/development/python-modules/libuuu/default.nix @@ -25,11 +25,11 @@ buildPythonPackage rec { setuptools-scm ]; - nativeBuildInputs = lib.optionals stdenv.isLinux [ + nativeBuildInputs = lib.optionals stdenv.hostPlatform.isLinux [ autoPatchelfHook ]; - buildInputs = lib.optionals stdenv.isLinux [ + buildInputs = lib.optionals stdenv.hostPlatform.isLinux [ udev ]; diff --git a/pkgs/development/python-modules/nidaqmx/default.nix b/pkgs/development/python-modules/nidaqmx/default.nix index 239b2b6f6e46..b054bc1a21d7 100644 --- a/pkgs/development/python-modules/nidaqmx/default.nix +++ b/pkgs/development/python-modules/nidaqmx/default.nix @@ -54,7 +54,7 @@ buildPythonPackage rec { click requests ] - ++ lib.optionals stdenv.isLinux [ + ++ lib.optionals stdenv.hostPlatform.isLinux [ distro ]; diff --git a/pkgs/development/python-modules/primp/default.nix b/pkgs/development/python-modules/primp/default.nix index 8c8e94229551..4191072efa6e 100644 --- a/pkgs/development/python-modules/primp/default.nix +++ b/pkgs/development/python-modules/primp/default.nix @@ -38,7 +38,7 @@ let # Remove bazel specific build file to make way for build directory # This is a problem on Darwin because of case-insensitive filesystem preBuild = - (lib.optionalString stdenv.isDarwin '' + (lib.optionalString stdenv.hostPlatform.isDarwin '' rm ../BUILD '') + oa.preBuild; diff --git a/pkgs/development/python-modules/waitress/default.nix b/pkgs/development/python-modules/waitress/default.nix index 77e044a67af6..42751f8fec90 100644 --- a/pkgs/development/python-modules/waitress/default.nix +++ b/pkgs/development/python-modules/waitress/default.nix @@ -27,7 +27,7 @@ buildPythonPackage rec { pytest-cov-stub ]; - doCheck = !stdenv.isDarwin; + doCheck = !stdenv.hostPlatform.isDarwin; disabledTests = [ # access to socket "test_service_port" diff --git a/pkgs/development/python-modules/zenoh/default.nix b/pkgs/development/python-modules/zenoh/default.nix index 0bae4d17d929..56dde703451e 100644 --- a/pkgs/development/python-modules/zenoh/default.nix +++ b/pkgs/development/python-modules/zenoh/default.nix @@ -33,7 +33,7 @@ buildPythonPackage rec { rustc ]; - buildInputs = lib.optional stdenv.isDarwin darwin.apple_sdk.frameworks.Security; + buildInputs = lib.optional stdenv.hostPlatform.isDarwin darwin.apple_sdk.frameworks.Security; pythonImportsCheck = [ "zenoh" diff --git a/pkgs/tools/backup/monolith/default.nix b/pkgs/tools/backup/monolith/default.nix index 950e03c175b9..42bcc9335198 100644 --- a/pkgs/tools/backup/monolith/default.nix +++ b/pkgs/tools/backup/monolith/default.nix @@ -46,7 +46,7 @@ rustPlatform.buildRustPackage rec { homepage = "https://github.com/Y2Z/monolith"; license = licenses.cc0; platforms = lib.platforms.unix; - broken = stdenv.isDarwin; + broken = stdenv.hostPlatform.isDarwin; maintainers = with maintainers; [ Br1ght0ne ]; }; } diff --git a/pkgs/tools/networking/dd-agent/datadog-agent.nix b/pkgs/tools/networking/dd-agent/datadog-agent.nix index 027986a408f4..2e3e19bcd798 100644 --- a/pkgs/tools/networking/dd-agent/datadog-agent.nix +++ b/pkgs/tools/networking/dd-agent/datadog-agent.nix @@ -44,7 +44,7 @@ in buildGo122Module rec { doCheck = false; - vendorHash = if stdenv.isDarwin + vendorHash = if stdenv.hostPlatform.isDarwin then "sha256-3Piq5DPMTZUEjqNkw5HZY25An2kATX6Jac9unQfZnZc=" else "sha256-FR0Et3DvjJhbYUPy9mpN0QCJ7QDU4VRZFUTL0J1FSXw="; diff --git a/pkgs/tools/system/nvtop/build-nvtop.nix b/pkgs/tools/system/nvtop/build-nvtop.nix index 01635fef66b4..c63e4d9a18d6 100644 --- a/pkgs/tools/system/nvtop/build-nvtop.nix +++ b/pkgs/tools/system/nvtop/build-nvtop.nix @@ -66,8 +66,8 @@ stdenv.mkDerivation (finalAttrs: { buildInputs = [ ncurses ] - ++ lib.optional stdenv.isLinux udev - ++ lib.optional stdenv.isDarwin apple-sdk_12 + ++ lib.optional stdenv.hostPlatform.isLinux udev + ++ lib.optional stdenv.hostPlatform.isDarwin apple-sdk_12 ++ lib.optional nvidia cudatoolkit ++ lib.optional needDrm libdrm; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 30a56d60470e..7493738f9073 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -3132,7 +3132,7 @@ with pkgs; tsm-client-withGui = callPackage ../by-name/ts/tsm-client/package.nix { enableGui = true; }; - tracy = callPackage ../by-name/tr/tracy/package.nix { withWayland = stdenv.isLinux; }; + tracy = callPackage ../by-name/tr/tracy/package.nix { withWayland = stdenv.hostPlatform.isLinux; }; tracy-glfw = callPackage ../by-name/tr/tracy/package.nix { withWayland = false; }; tracy-wayland = callPackage ../by-name/tr/tracy/package.nix { withWayland = true; };