Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion nixos/tests/mattermost/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -569,7 +569,7 @@ import ../make-test-python.nix (
shutdown_queue.task_done()
threading.Thread(target=shutdown_worker, daemon=True).start()

${pkgs.lib.optionalString pkgs.stdenv.isx86_64 ''
${pkgs.lib.optionalString pkgs.stdenv.hostPlatform.isx86_64 ''
# Only run the MySQL tests on x86_64 so we don't have to debug MySQL ARM issues.
run_mattermost_tests(
shutdown_queue,
Expand Down
2 changes: 1 addition & 1 deletion pkgs/by-name/ac/actual-server/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ stdenv.mkDerivation {
mainProgram = "actual-server";
license = lib.licenses.mit;
# https://github.com/NixOS/nixpkgs/issues/403846
broken = stdenv.isDarwin;
broken = stdenv.hostPlatform.isDarwin;
maintainers = [
lib.maintainers.oddlama
lib.maintainers.patrickdag
Expand Down
2 changes: 1 addition & 1 deletion pkgs/by-name/ag/age-plugin-se/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ stdenv.mkDerivation (finalAttrs: {
];

# Can't find libdispatch without this on NixOS. (swift 5.8)
LD_LIBRARY_PATH = lib.optionalString stdenv.isLinux "${swiftPackages.Dispatch}/lib";
LD_LIBRARY_PATH = lib.optionalString stdenv.hostPlatform.isLinux "${swiftPackages.Dispatch}/lib";

postPatch =
let
Expand Down
2 changes: 1 addition & 1 deletion pkgs/by-name/ak/akkoma-admin-fe/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ stdenv.mkDerivation (finalAttrs: {
python3
git
libsass
] ++ lib.optional stdenv.isDarwin xcbuild;
] ++ lib.optional stdenv.hostPlatform.isDarwin xcbuild;

configurePhase = ''
runHook preConfigure
Expand Down
2 changes: 1 addition & 1 deletion pkgs/by-name/ar/ares-rs/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,6 @@ rustPlatform.buildRustPackage rec {
license = licenses.mit;
maintainers = with maintainers; [ fab ];
mainProgram = "ares";
broken = stdenv.isDarwin;
broken = stdenv.hostPlatform.isDarwin;
};
}
2 changes: 1 addition & 1 deletion pkgs/by-name/ar/arp-scan-rs/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,6 @@ rustPlatform.buildRustPackage rec {
license = lib.licenses.agpl3Only;
maintainers = with lib.maintainers; [ fab ];
mainProgram = "arp-scan";
broken = stdenv.isDarwin;
broken = stdenv.hostPlatform.isDarwin;
};
}
6 changes: 3 additions & 3 deletions pkgs/by-name/bi/bicep-lsp/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -34,16 +34,16 @@ buildDotnetModule rec {
dotnet-sdk = dotnetCorePackages.sdk_8_0;
dotnet-runtime = dotnetCorePackages.runtime_8_0;

nativeBuildInputs = lib.optionals stdenv.isLinux [ autoPatchelfHook ];
nativeBuildInputs = lib.optionals stdenv.hostPlatform.isLinux [ autoPatchelfHook ];

buildInputs = lib.optionals stdenv.isLinux [
buildInputs = lib.optionals stdenv.hostPlatform.isLinux [
icu
libkrb5
openssl
stdenv.cc.cc.lib
];

doCheck = !(stdenv.isDarwin && stdenv.isAarch64); # mono is not available on aarch64-darwin
doCheck = !(stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isAarch64); # mono is not available on aarch64-darwin

meta = {
description = "Domain Specific Language (DSL) for deploying Azure resources declaratively";
Expand Down
2 changes: 1 addition & 1 deletion pkgs/by-name/ca/camilladsp/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ rustPlatform.buildRustPackage (finalAttrs: {
buildInputs = [
libpulseaudio
openssl
] ++ lib.optionals stdenv.isLinux [ alsa-lib ];
] ++ lib.optionals stdenv.hostPlatform.isLinux [ alsa-lib ];

passthru.updateScript = nix-update-script { extraArgs = [ "--generate-lockfile" ]; };

Expand Down
2 changes: 1 addition & 1 deletion pkgs/by-name/ca/cargo-bazel/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ rustPlatform.buildRustPackage rec {
hash = "sha256-FS1WFlK0YNq1QCi3S3f5tMN+Bdcfx2dxhDKRLXLcios=";
};

buildInputs = lib.optional stdenv.isDarwin libz;
buildInputs = lib.optional stdenv.hostPlatform.isDarwin libz;

useFetchCargoVendor = true;
cargoHash = "sha256-E/yF42Vx9tv8Ik1j23El3+fI19ZGzq6nikVMATY7m3E=";
Expand Down
2 changes: 1 addition & 1 deletion pkgs/by-name/cl/cloud-provider-kind/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ buildGoModule rec {

vendorHash = null;

checkFlags = lib.optional stdenv.isDarwin "-skip=^Test_firstSuccessfulProbe$";
checkFlags = lib.optional stdenv.hostPlatform.isDarwin "-skip=^Test_firstSuccessfulProbe$";

meta = {
description = "Load Balancer implementation for Kubernetes-in-Docker";
Expand Down
2 changes: 1 addition & 1 deletion pkgs/by-name/fl/fluent-bit/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ stdenv.mkDerivation (finalAttrs: {
versionCheckProgramArg = "--version";

passthru = {
tests = lib.optionalAttrs stdenv.isLinux {
tests = lib.optionalAttrs stdenv.hostPlatform.isLinux {
inherit (nixosTests) fluent-bit;
};

Expand Down
6 changes: 3 additions & 3 deletions pkgs/by-name/gc/gcc-arm-embedded-13/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ stdenv.mkDerivation rec {
./info-fix.patch
];

nativeBuildInputs = lib.optionals (stdenv.isDarwin && stdenv.isx86_64) [
nativeBuildInputs = lib.optionals (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isx86_64) [
makeBinaryWrapper
darwin.sigtool
];
Expand All @@ -60,7 +60,7 @@ stdenv.mkDerivation rec {
'';

preFixup =
lib.optionalString stdenv.isLinux ''
lib.optionalString stdenv.hostPlatform.isLinux ''
find $out -type f | while read f; do
patchelf "$f" > /dev/null 2>&1 || continue
patchelf --set-interpreter $(cat ${stdenv.cc}/nix-support/dynamic-linker) "$f" || true
Expand All @@ -74,7 +74,7 @@ stdenv.mkDerivation rec {
} "$f" || true
done
''
+ lib.optionalString (stdenv.isDarwin && stdenv.isx86_64) ''
+ lib.optionalString (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isx86_64) ''
find "$out" -executable -type f | while read executable; do
( \
install_name_tool \
Expand Down
6 changes: 3 additions & 3 deletions pkgs/by-name/gc/gcc-arm-embedded-14/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ stdenv.mkDerivation rec {
.${stdenv.hostPlatform.system} or (throw "Unsupported system: ${stdenv.hostPlatform.system}");
};

nativeBuildInputs = lib.optionals (stdenv.isDarwin && stdenv.isx86_64) [
nativeBuildInputs = lib.optionals (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isx86_64) [
makeBinaryWrapper
darwin.sigtool
];
Expand All @@ -60,7 +60,7 @@ stdenv.mkDerivation rec {
'';

preFixup =
lib.optionalString stdenv.isLinux ''
lib.optionalString stdenv.hostPlatform.isLinux ''
find $out -type f | while read f; do
patchelf "$f" > /dev/null 2>&1 || continue
patchelf --set-interpreter $(cat ${stdenv.cc}/nix-support/dynamic-linker) "$f" || true
Expand All @@ -76,7 +76,7 @@ stdenv.mkDerivation rec {
} "$f" || true
done
''
+ lib.optionalString (stdenv.isDarwin && stdenv.isx86_64) ''
+ lib.optionalString (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isx86_64) ''
find "$out" -executable -type f | while read executable; do
( \
install_name_tool \
Expand Down
2 changes: 1 addition & 1 deletion pkgs/by-name/gz/gz-cmake/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ stdenv.mkDerivation (finalAttrs: {
postPatch = ''
patchShebangs examples/test_c_child_requires_c_no_deps.bash
substituteInPlace examples/CMakeLists.txt --replace-fail \
"$""{CMAKE_INSTALL_LIBDIR}" "${if stdenv.isDarwin then "lib" else "lib64"}"
"$""{CMAKE_INSTALL_LIBDIR}" "${if stdenv.hostPlatform.isDarwin then "lib" else "lib64"}"
'';

nativeBuildInputs = [
Expand Down
2 changes: 1 addition & 1 deletion pkgs/by-name/ht/http-scanner/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,6 @@ buildGoModule rec {
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ fab ];
mainProgram = "http-scanner";
broken = stdenv.isDarwin;
broken = stdenv.hostPlatform.isDarwin;
};
}
2 changes: 1 addition & 1 deletion pkgs/by-name/ja/jai/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ let
];
};
in
if stdenv.isLinux then
if stdenv.hostPlatform.isLinux then
buildFHSEnv {
inherit meta pname version;
targetPkgs = pkgs: [ pkgs.zlib ];
Expand Down
2 changes: 1 addition & 1 deletion pkgs/by-name/li/libcdio/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ stdenv.mkDerivation (finalAttrs: {
hash = "sha256-izjZk2kz9PkLm9+INUdl1e7jMz3nUsQKdplKI9Io+CM=";
};

env = lib.optionalAttrs stdenv.is32bit {
env = lib.optionalAttrs stdenv.hostPlatform.is32bit {
NIX_CFLAGS_COMPILE = "-D_LARGEFILE64_SOURCE";
};

Expand Down
4 changes: 2 additions & 2 deletions pkgs/by-name/ma/matrix-brandy/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ stdenv.mkDerivation rec {
hash = "sha256-sMgYgV4/vV1x5xSICXRpW6K8uCdVlJrS7iEg6XzQRo8=";
};

patches = lib.optionals stdenv.isDarwin [ ./no-lrt.patch ];
patches = lib.optionals stdenv.hostPlatform.isDarwin [ ./no-lrt.patch ];

makeFlags = lib.optionals stdenv.isDarwin [
makeFlags = lib.optionals stdenv.hostPlatform.isDarwin [
"CC=cc"
"LD=clang"
];
Expand Down
2 changes: 1 addition & 1 deletion pkgs/by-name/mu/musl-obstack/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ stdenv.mkDerivation rec {
sha256 = "sha256-oydS7FubUniMHAUWfg84OH9+CZ0JCrTXy7jzwOyJzC8=";
};

patches = lib.optionals stdenv.isDarwin [
patches = lib.optionals stdenv.hostPlatform.isDarwin [
./0001-ignore-obstack_free-alias-on-darwin.patch
];

Expand Down
4 changes: 2 additions & 2 deletions pkgs/by-name/mu/muvm/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ let
dhcpcd
passt
(placeholder "out")
] ++ lib.optionals stdenv.isAarch64 [ fex ];
] ++ lib.optionals stdenv.hostPlatform.isAarch64 [ fex ];
wrapArgs = lib.escapeShellArgs [
"--prefix"
"PATH"
Expand Down Expand Up @@ -72,7 +72,7 @@ rustPlatform.buildRustPackage rec {
--replace-fail "/sbin/sysctl" "${lib.getExe' procps "sysctl"}"
''
# Only patch FEX path if we're aarch64, otherwise we don't want the derivation to pull in FEX in any way
+ lib.optionalString stdenv.isAarch64 ''
+ lib.optionalString stdenv.hostPlatform.isAarch64 ''
substituteInPlace crates/muvm/src/guest/mount.rs \
--replace-fail "/usr/share/fex-emu" "${fex}/share/fex-emu"
'';
Expand Down
6 changes: 4 additions & 2 deletions pkgs/by-name/ne/neofetch/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
bash,
makeWrapper,
pciutils,
x11Support ? !stdenvNoCC.isOpenBSD,
x11Support ? !stdenvNoCC.hostPlatform.isOpenBSD,
ueberzug,
fetchpatch,
}:
Expand Down Expand Up @@ -56,7 +56,9 @@ stdenvNoCC.mkDerivation {
postInstall = ''
wrapProgram $out/bin/neofetch \
--prefix PATH : ${
lib.makeBinPath (lib.optional (!stdenvNoCC.isOpenBSD) pciutils ++ lib.optional x11Support ueberzug)
lib.makeBinPath (
lib.optional (!stdenvNoCC.hostPlatform.isOpenBSD) pciutils ++ lib.optional x11Support ueberzug
)
}
'';

Expand Down
2 changes: 1 addition & 1 deletion pkgs/by-name/os/osu-lazer-bin/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ let

passthru.updateScript = ./update.sh;
in
if stdenvNoCC.isDarwin then
if stdenvNoCC.hostPlatform.isDarwin then
stdenvNoCC.mkDerivation {
inherit
pname
Expand Down
2 changes: 1 addition & 1 deletion pkgs/by-name/ov/ovftool/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,7 @@ stdenv.mkDerivation (final: {
];
platforms = builtins.attrNames ovftoolSystems;
mainProgram = "ovftool";
knownVulnerabilities = lib.optionals (stdenv.isDarwin) [
knownVulnerabilities = lib.optionals (stdenv.hostPlatform.isDarwin) [
"The bundled version of openssl 1.0.2zj in ovftool for Darwin has open vulnerabilities."
"https://openssl-library.org/news/vulnerabilities-1.0.2/"
"CVE-2024-0727"
Expand Down
4 changes: 2 additions & 2 deletions pkgs/by-name/rp/rp/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ stdenv.mkDerivation rec {
cmake
ninja
];
buildInputs = lib.optionals (stdenv.isLinux) [ stdenv.cc.libc.static ];
buildInputs = lib.optionals (stdenv.hostPlatform.isLinux) [ stdenv.cc.libc.static ];

src = fetchFromGitHub {
owner = "0vercl0k";
Expand All @@ -25,7 +25,7 @@ stdenv.mkDerivation rec {

installPhase = ''
mkdir -p $out/bin
cp rp-${if stdenv.isDarwin then "osx" else "lin"} $out/bin/rp
cp rp-${if stdenv.hostPlatform.isDarwin then "osx" else "lin"} $out/bin/rp
'';

meta = with lib; {
Expand Down
2 changes: 1 addition & 1 deletion pkgs/by-name/ry/ryubing/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ buildDotnetModule rec {
"--set SDL_VIDEODRIVER x11"
];

preInstall = lib.optionalString stdenv.isLinux ''
preInstall = lib.optionalString stdenv.hostPlatform.isLinux ''
# workaround for https://github.com/Ryujinx/Ryujinx/issues/2349
mkdir -p $out/lib/sndio-6
ln -s ${sndio}/lib/libsndio.so $out/lib/sndio-6/libsndio.so.6
Expand Down
2 changes: 1 addition & 1 deletion pkgs/by-name/sp/spider/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ rustPlatform.buildRustPackage (finalAttrs: {
"--skip=pdl_is_fresh"
"--skip=verify_revision_available"
]
++ lib.optionals stdenv.isDarwin [
++ lib.optionals stdenv.hostPlatform.isDarwin [
# Sandbox limitation: attempted to create a NULL object
"--skip=website::test_link_duplicates"
"--skip=website::not_crawl_blacklist"
Expand Down
2 changes: 1 addition & 1 deletion pkgs/by-name/yn/ynetd/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ stdenv.mkDerivation (finalAttrs: {
hash = "sha256-7gioQ0r0LlUftIWKRwTqeZQl0GtskcRKaEE5z6A0S24=";
};

postPatch = lib.optionalString stdenv.isDarwin ''
postPatch = lib.optionalString stdenv.hostPlatform.isDarwin ''
substituteInPlace Makefile --replace-fail "-Wl,-z,relro,-z,now" ""
'';

Expand Down
4 changes: 2 additions & 2 deletions pkgs/development/beam-modules/build-mix.nix
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@ let
in
"[${lib.concatStringsSep "," options}]";

LANG = if stdenv.isLinux then "C.UTF-8" else "C";
LC_CTYPE = if stdenv.isLinux then "C.UTF-8" else "UTF-8";
LANG = if stdenv.hostPlatform.isLinux then "C.UTF-8" else "C";
LC_CTYPE = if stdenv.hostPlatform.isLinux then "C.UTF-8" else "UTF-8";

# add to ERL_LIBS so other modules can find at runtime.
# http://erlang.org/doc/man/code.html#code-path
Expand Down
4 changes: 2 additions & 2 deletions pkgs/development/beam-modules/mix-release.nix
Original file line number Diff line number Diff line change
Expand Up @@ -138,8 +138,8 @@ stdenv.mkDerivation (
in
"[${lib.concatStringsSep "," options}]";

LANG = if stdenv.isLinux then "C.UTF-8" else "C";
LC_CTYPE = if stdenv.isLinux then "C.UTF-8" else "UTF-8";
LANG = if stdenv.hostPlatform.isLinux then "C.UTF-8" else "C";
LC_CTYPE = if stdenv.hostPlatform.isLinux then "C.UTF-8" else "UTF-8";

postUnpack =
''
Expand Down
11 changes: 7 additions & 4 deletions pkgs/development/compilers/dotnet/packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -162,10 +162,13 @@ let
runHook postInstall
'';

${if stdenvNoCC.isDarwin && lib.versionAtLeast version "10" then "postInstall" else null} = ''
mkdir -p "$out"/nix-support
cp "$src"/nix-support/manual-sdk-deps "$out"/nix-support/manual-sdk-deps
'';
${
if stdenvNoCC.hostPlatform.isDarwin && lib.versionAtLeast version "10" then "postInstall" else null
} =
''
mkdir -p "$out"/nix-support
cp "$src"/nix-support/manual-sdk-deps "$out"/nix-support/manual-sdk-deps
'';

passthru = {
inherit (vmr) icu targetRid hasILCompiler;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ let
writeShellScript
;
inherit pkgs nodejs;
libtool = if pkgs.stdenv.isDarwin then pkgs.cctools or pkgs.darwin.cctools else null;
libtool = if pkgs.stdenv.hostPlatform.isDarwin then pkgs.cctools or pkgs.darwin.cctools else null;
};
in
import ./node-packages.nix {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ qtModule {
];
strictDeps = true;

nativeBuildInputs = lib.optionals stdenv.isDarwin [
nativeBuildInputs = lib.optionals stdenv.hostPlatform.isDarwin [
darwin.sigtool
];

Expand Down
4 changes: 2 additions & 2 deletions pkgs/development/lisp-modules/imported.nix
Original file line number Diff line number Diff line change
Expand Up @@ -15922,7 +15922,7 @@ lib.makeScope pkgs.newScope (self: {
meta = {
hydraPlatforms = [ ];
# darwin cannot find libpango.dylib
broken = stdenv.isDarwin;
broken = stdenv.hostPlatform.isDarwin;
};
}
);
Expand Down Expand Up @@ -39541,7 +39541,7 @@ lib.makeScope pkgs.newScope (self: {
meta = {
hydraPlatforms = [ ];
# darwin cannot find libpango.dylib
broken = stdenv.isDarwin;
broken = stdenv.hostPlatform.isDarwin;
};
}
);
Expand Down
Loading