mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-06-09 17:46:29 +09:00
treewide: replace stdenv.is
with stdenv.hostPlatform.is
(#413977)
This commit is contained in:
commit
0861217ca8
44 changed files with 65 additions and 60 deletions
|
@ -569,7 +569,7 @@ import ../make-test-python.nix (
|
||||||
shutdown_queue.task_done()
|
shutdown_queue.task_done()
|
||||||
threading.Thread(target=shutdown_worker, daemon=True).start()
|
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.
|
# Only run the MySQL tests on x86_64 so we don't have to debug MySQL ARM issues.
|
||||||
run_mattermost_tests(
|
run_mattermost_tests(
|
||||||
shutdown_queue,
|
shutdown_queue,
|
||||||
|
|
|
@ -208,7 +208,7 @@ stdenv.mkDerivation {
|
||||||
mainProgram = "actual-server";
|
mainProgram = "actual-server";
|
||||||
license = lib.licenses.mit;
|
license = lib.licenses.mit;
|
||||||
# https://github.com/NixOS/nixpkgs/issues/403846
|
# https://github.com/NixOS/nixpkgs/issues/403846
|
||||||
broken = stdenv.isDarwin;
|
broken = stdenv.hostPlatform.isDarwin;
|
||||||
maintainers = [
|
maintainers = [
|
||||||
lib.maintainers.oddlama
|
lib.maintainers.oddlama
|
||||||
lib.maintainers.patrickdag
|
lib.maintainers.patrickdag
|
||||||
|
|
|
@ -26,7 +26,7 @@ stdenv.mkDerivation (finalAttrs: {
|
||||||
];
|
];
|
||||||
|
|
||||||
# Can't find libdispatch without this on NixOS. (swift 5.8)
|
# 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 =
|
postPatch =
|
||||||
let
|
let
|
||||||
|
|
|
@ -41,7 +41,7 @@ stdenv.mkDerivation (finalAttrs: {
|
||||||
python3
|
python3
|
||||||
git
|
git
|
||||||
libsass
|
libsass
|
||||||
] ++ lib.optional stdenv.isDarwin xcbuild;
|
] ++ lib.optional stdenv.hostPlatform.isDarwin xcbuild;
|
||||||
|
|
||||||
configurePhase = ''
|
configurePhase = ''
|
||||||
runHook preConfigure
|
runHook preConfigure
|
||||||
|
|
|
@ -37,6 +37,6 @@ rustPlatform.buildRustPackage rec {
|
||||||
license = licenses.mit;
|
license = licenses.mit;
|
||||||
maintainers = with maintainers; [ fab ];
|
maintainers = with maintainers; [ fab ];
|
||||||
mainProgram = "ares";
|
mainProgram = "ares";
|
||||||
broken = stdenv.isDarwin;
|
broken = stdenv.hostPlatform.isDarwin;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -45,6 +45,6 @@ rustPlatform.buildRustPackage rec {
|
||||||
license = lib.licenses.agpl3Only;
|
license = lib.licenses.agpl3Only;
|
||||||
maintainers = with lib.maintainers; [ fab ];
|
maintainers = with lib.maintainers; [ fab ];
|
||||||
mainProgram = "arp-scan";
|
mainProgram = "arp-scan";
|
||||||
broken = stdenv.isDarwin;
|
broken = stdenv.hostPlatform.isDarwin;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -34,16 +34,16 @@ buildDotnetModule rec {
|
||||||
dotnet-sdk = dotnetCorePackages.sdk_8_0;
|
dotnet-sdk = dotnetCorePackages.sdk_8_0;
|
||||||
dotnet-runtime = dotnetCorePackages.runtime_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
|
icu
|
||||||
libkrb5
|
libkrb5
|
||||||
openssl
|
openssl
|
||||||
stdenv.cc.cc.lib
|
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 = {
|
meta = {
|
||||||
description = "Domain Specific Language (DSL) for deploying Azure resources declaratively";
|
description = "Domain Specific Language (DSL) for deploying Azure resources declaratively";
|
||||||
|
|
|
@ -37,7 +37,7 @@ rustPlatform.buildRustPackage (finalAttrs: {
|
||||||
buildInputs = [
|
buildInputs = [
|
||||||
libpulseaudio
|
libpulseaudio
|
||||||
openssl
|
openssl
|
||||||
] ++ lib.optionals stdenv.isLinux [ alsa-lib ];
|
] ++ lib.optionals stdenv.hostPlatform.isLinux [ alsa-lib ];
|
||||||
|
|
||||||
passthru.updateScript = nix-update-script { extraArgs = [ "--generate-lockfile" ]; };
|
passthru.updateScript = nix-update-script { extraArgs = [ "--generate-lockfile" ]; };
|
||||||
|
|
||||||
|
|
|
@ -15,7 +15,7 @@ rustPlatform.buildRustPackage rec {
|
||||||
hash = "sha256-FS1WFlK0YNq1QCi3S3f5tMN+Bdcfx2dxhDKRLXLcios=";
|
hash = "sha256-FS1WFlK0YNq1QCi3S3f5tMN+Bdcfx2dxhDKRLXLcios=";
|
||||||
};
|
};
|
||||||
|
|
||||||
buildInputs = lib.optional stdenv.isDarwin libz;
|
buildInputs = lib.optional stdenv.hostPlatform.isDarwin libz;
|
||||||
|
|
||||||
useFetchCargoVendor = true;
|
useFetchCargoVendor = true;
|
||||||
cargoHash = "sha256-E/yF42Vx9tv8Ik1j23El3+fI19ZGzq6nikVMATY7m3E=";
|
cargoHash = "sha256-E/yF42Vx9tv8Ik1j23El3+fI19ZGzq6nikVMATY7m3E=";
|
||||||
|
|
|
@ -19,7 +19,7 @@ buildGoModule rec {
|
||||||
|
|
||||||
vendorHash = null;
|
vendorHash = null;
|
||||||
|
|
||||||
checkFlags = lib.optional stdenv.isDarwin "-skip=^Test_firstSuccessfulProbe$";
|
checkFlags = lib.optional stdenv.hostPlatform.isDarwin "-skip=^Test_firstSuccessfulProbe$";
|
||||||
|
|
||||||
meta = {
|
meta = {
|
||||||
description = "Load Balancer implementation for Kubernetes-in-Docker";
|
description = "Load Balancer implementation for Kubernetes-in-Docker";
|
||||||
|
|
|
@ -118,7 +118,7 @@ stdenv.mkDerivation (finalAttrs: {
|
||||||
versionCheckProgramArg = "--version";
|
versionCheckProgramArg = "--version";
|
||||||
|
|
||||||
passthru = {
|
passthru = {
|
||||||
tests = lib.optionalAttrs stdenv.isLinux {
|
tests = lib.optionalAttrs stdenv.hostPlatform.isLinux {
|
||||||
inherit (nixosTests) fluent-bit;
|
inherit (nixosTests) fluent-bit;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -42,7 +42,7 @@ stdenv.mkDerivation rec {
|
||||||
./info-fix.patch
|
./info-fix.patch
|
||||||
];
|
];
|
||||||
|
|
||||||
nativeBuildInputs = lib.optionals (stdenv.isDarwin && stdenv.isx86_64) [
|
nativeBuildInputs = lib.optionals (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isx86_64) [
|
||||||
makeBinaryWrapper
|
makeBinaryWrapper
|
||||||
darwin.sigtool
|
darwin.sigtool
|
||||||
];
|
];
|
||||||
|
@ -60,7 +60,7 @@ stdenv.mkDerivation rec {
|
||||||
'';
|
'';
|
||||||
|
|
||||||
preFixup =
|
preFixup =
|
||||||
lib.optionalString stdenv.isLinux ''
|
lib.optionalString stdenv.hostPlatform.isLinux ''
|
||||||
find $out -type f | while read f; do
|
find $out -type f | while read f; do
|
||||||
patchelf "$f" > /dev/null 2>&1 || continue
|
patchelf "$f" > /dev/null 2>&1 || continue
|
||||||
patchelf --set-interpreter $(cat ${stdenv.cc}/nix-support/dynamic-linker) "$f" || true
|
patchelf --set-interpreter $(cat ${stdenv.cc}/nix-support/dynamic-linker) "$f" || true
|
||||||
|
@ -74,7 +74,7 @@ stdenv.mkDerivation rec {
|
||||||
} "$f" || true
|
} "$f" || true
|
||||||
done
|
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
|
find "$out" -executable -type f | while read executable; do
|
||||||
( \
|
( \
|
||||||
install_name_tool \
|
install_name_tool \
|
||||||
|
|
|
@ -36,7 +36,7 @@ stdenv.mkDerivation rec {
|
||||||
.${stdenv.hostPlatform.system} or (throw "Unsupported system: ${stdenv.hostPlatform.system}");
|
.${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
|
makeBinaryWrapper
|
||||||
darwin.sigtool
|
darwin.sigtool
|
||||||
];
|
];
|
||||||
|
@ -60,7 +60,7 @@ stdenv.mkDerivation rec {
|
||||||
'';
|
'';
|
||||||
|
|
||||||
preFixup =
|
preFixup =
|
||||||
lib.optionalString stdenv.isLinux ''
|
lib.optionalString stdenv.hostPlatform.isLinux ''
|
||||||
find $out -type f | while read f; do
|
find $out -type f | while read f; do
|
||||||
patchelf "$f" > /dev/null 2>&1 || continue
|
patchelf "$f" > /dev/null 2>&1 || continue
|
||||||
patchelf --set-interpreter $(cat ${stdenv.cc}/nix-support/dynamic-linker) "$f" || true
|
patchelf --set-interpreter $(cat ${stdenv.cc}/nix-support/dynamic-linker) "$f" || true
|
||||||
|
@ -76,7 +76,7 @@ stdenv.mkDerivation rec {
|
||||||
} "$f" || true
|
} "$f" || true
|
||||||
done
|
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
|
find "$out" -executable -type f | while read executable; do
|
||||||
( \
|
( \
|
||||||
install_name_tool \
|
install_name_tool \
|
||||||
|
|
|
@ -27,7 +27,7 @@ stdenv.mkDerivation (finalAttrs: {
|
||||||
postPatch = ''
|
postPatch = ''
|
||||||
patchShebangs examples/test_c_child_requires_c_no_deps.bash
|
patchShebangs examples/test_c_child_requires_c_no_deps.bash
|
||||||
substituteInPlace examples/CMakeLists.txt --replace-fail \
|
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 = [
|
nativeBuildInputs = [
|
||||||
|
|
|
@ -31,6 +31,6 @@ buildGoModule rec {
|
||||||
license = lib.licenses.mit;
|
license = lib.licenses.mit;
|
||||||
maintainers = with lib.maintainers; [ fab ];
|
maintainers = with lib.maintainers; [ fab ];
|
||||||
mainProgram = "http-scanner";
|
mainProgram = "http-scanner";
|
||||||
broken = stdenv.isDarwin;
|
broken = stdenv.hostPlatform.isDarwin;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -37,7 +37,7 @@ let
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
in
|
in
|
||||||
if stdenv.isLinux then
|
if stdenv.hostPlatform.isLinux then
|
||||||
buildFHSEnv {
|
buildFHSEnv {
|
||||||
inherit meta pname version;
|
inherit meta pname version;
|
||||||
targetPkgs = pkgs: [ pkgs.zlib ];
|
targetPkgs = pkgs: [ pkgs.zlib ];
|
||||||
|
|
|
@ -25,7 +25,7 @@ stdenv.mkDerivation (finalAttrs: {
|
||||||
hash = "sha256-izjZk2kz9PkLm9+INUdl1e7jMz3nUsQKdplKI9Io+CM=";
|
hash = "sha256-izjZk2kz9PkLm9+INUdl1e7jMz3nUsQKdplKI9Io+CM=";
|
||||||
};
|
};
|
||||||
|
|
||||||
env = lib.optionalAttrs stdenv.is32bit {
|
env = lib.optionalAttrs stdenv.hostPlatform.is32bit {
|
||||||
NIX_CFLAGS_COMPILE = "-D_LARGEFILE64_SOURCE";
|
NIX_CFLAGS_COMPILE = "-D_LARGEFILE64_SOURCE";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -18,9 +18,9 @@ stdenv.mkDerivation rec {
|
||||||
hash = "sha256-sMgYgV4/vV1x5xSICXRpW6K8uCdVlJrS7iEg6XzQRo8=";
|
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"
|
"CC=cc"
|
||||||
"LD=clang"
|
"LD=clang"
|
||||||
];
|
];
|
||||||
|
|
|
@ -17,7 +17,7 @@ stdenv.mkDerivation rec {
|
||||||
sha256 = "sha256-oydS7FubUniMHAUWfg84OH9+CZ0JCrTXy7jzwOyJzC8=";
|
sha256 = "sha256-oydS7FubUniMHAUWfg84OH9+CZ0JCrTXy7jzwOyJzC8=";
|
||||||
};
|
};
|
||||||
|
|
||||||
patches = lib.optionals stdenv.isDarwin [
|
patches = lib.optionals stdenv.hostPlatform.isDarwin [
|
||||||
./0001-ignore-obstack_free-alias-on-darwin.patch
|
./0001-ignore-obstack_free-alias-on-darwin.patch
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
|
@ -39,7 +39,7 @@ let
|
||||||
dhcpcd
|
dhcpcd
|
||||||
passt
|
passt
|
||||||
(placeholder "out")
|
(placeholder "out")
|
||||||
] ++ lib.optionals stdenv.isAarch64 [ fex ];
|
] ++ lib.optionals stdenv.hostPlatform.isAarch64 [ fex ];
|
||||||
wrapArgs = lib.escapeShellArgs [
|
wrapArgs = lib.escapeShellArgs [
|
||||||
"--prefix"
|
"--prefix"
|
||||||
"PATH"
|
"PATH"
|
||||||
|
@ -72,7 +72,7 @@ rustPlatform.buildRustPackage rec {
|
||||||
--replace-fail "/sbin/sysctl" "${lib.getExe' procps "sysctl"}"
|
--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
|
# 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 \
|
substituteInPlace crates/muvm/src/guest/mount.rs \
|
||||||
--replace-fail "/usr/share/fex-emu" "${fex}/share/fex-emu"
|
--replace-fail "/usr/share/fex-emu" "${fex}/share/fex-emu"
|
||||||
'';
|
'';
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
bash,
|
bash,
|
||||||
makeWrapper,
|
makeWrapper,
|
||||||
pciutils,
|
pciutils,
|
||||||
x11Support ? !stdenvNoCC.isOpenBSD,
|
x11Support ? !stdenvNoCC.hostPlatform.isOpenBSD,
|
||||||
ueberzug,
|
ueberzug,
|
||||||
fetchpatch,
|
fetchpatch,
|
||||||
}:
|
}:
|
||||||
|
@ -56,7 +56,9 @@ stdenvNoCC.mkDerivation {
|
||||||
postInstall = ''
|
postInstall = ''
|
||||||
wrapProgram $out/bin/neofetch \
|
wrapProgram $out/bin/neofetch \
|
||||||
--prefix PATH : ${
|
--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
|
||||||
|
)
|
||||||
}
|
}
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
|
|
@ -55,7 +55,7 @@ let
|
||||||
|
|
||||||
passthru.updateScript = ./update.sh;
|
passthru.updateScript = ./update.sh;
|
||||||
in
|
in
|
||||||
if stdenvNoCC.isDarwin then
|
if stdenvNoCC.hostPlatform.isDarwin then
|
||||||
stdenvNoCC.mkDerivation {
|
stdenvNoCC.mkDerivation {
|
||||||
inherit
|
inherit
|
||||||
pname
|
pname
|
||||||
|
|
|
@ -341,7 +341,7 @@ stdenv.mkDerivation (final: {
|
||||||
];
|
];
|
||||||
platforms = builtins.attrNames ovftoolSystems;
|
platforms = builtins.attrNames ovftoolSystems;
|
||||||
mainProgram = "ovftool";
|
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."
|
"The bundled version of openssl 1.0.2zj in ovftool for Darwin has open vulnerabilities."
|
||||||
"https://openssl-library.org/news/vulnerabilities-1.0.2/"
|
"https://openssl-library.org/news/vulnerabilities-1.0.2/"
|
||||||
"CVE-2024-0727"
|
"CVE-2024-0727"
|
||||||
|
|
|
@ -13,7 +13,7 @@ stdenv.mkDerivation rec {
|
||||||
cmake
|
cmake
|
||||||
ninja
|
ninja
|
||||||
];
|
];
|
||||||
buildInputs = lib.optionals (stdenv.isLinux) [ stdenv.cc.libc.static ];
|
buildInputs = lib.optionals (stdenv.hostPlatform.isLinux) [ stdenv.cc.libc.static ];
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "0vercl0k";
|
owner = "0vercl0k";
|
||||||
|
@ -25,7 +25,7 @@ stdenv.mkDerivation rec {
|
||||||
|
|
||||||
installPhase = ''
|
installPhase = ''
|
||||||
mkdir -p $out/bin
|
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; {
|
meta = with lib; {
|
||||||
|
|
|
@ -101,7 +101,7 @@ buildDotnetModule rec {
|
||||||
"--set SDL_VIDEODRIVER x11"
|
"--set SDL_VIDEODRIVER x11"
|
||||||
];
|
];
|
||||||
|
|
||||||
preInstall = lib.optionalString stdenv.isLinux ''
|
preInstall = lib.optionalString stdenv.hostPlatform.isLinux ''
|
||||||
# workaround for https://github.com/Ryujinx/Ryujinx/issues/2349
|
# workaround for https://github.com/Ryujinx/Ryujinx/issues/2349
|
||||||
mkdir -p $out/lib/sndio-6
|
mkdir -p $out/lib/sndio-6
|
||||||
ln -s ${sndio}/lib/libsndio.so $out/lib/sndio-6/libsndio.so.6
|
ln -s ${sndio}/lib/libsndio.so $out/lib/sndio-6/libsndio.so.6
|
||||||
|
|
|
@ -56,7 +56,7 @@ rustPlatform.buildRustPackage (finalAttrs: {
|
||||||
"--skip=pdl_is_fresh"
|
"--skip=pdl_is_fresh"
|
||||||
"--skip=verify_revision_available"
|
"--skip=verify_revision_available"
|
||||||
]
|
]
|
||||||
++ lib.optionals stdenv.isDarwin [
|
++ lib.optionals stdenv.hostPlatform.isDarwin [
|
||||||
# Sandbox limitation: attempted to create a NULL object
|
# Sandbox limitation: attempted to create a NULL object
|
||||||
"--skip=website::test_link_duplicates"
|
"--skip=website::test_link_duplicates"
|
||||||
"--skip=website::not_crawl_blacklist"
|
"--skip=website::not_crawl_blacklist"
|
||||||
|
|
|
@ -13,7 +13,7 @@ stdenv.mkDerivation (finalAttrs: {
|
||||||
hash = "sha256-7gioQ0r0LlUftIWKRwTqeZQl0GtskcRKaEE5z6A0S24=";
|
hash = "sha256-7gioQ0r0LlUftIWKRwTqeZQl0GtskcRKaEE5z6A0S24=";
|
||||||
};
|
};
|
||||||
|
|
||||||
postPatch = lib.optionalString stdenv.isDarwin ''
|
postPatch = lib.optionalString stdenv.hostPlatform.isDarwin ''
|
||||||
substituteInPlace Makefile --replace-fail "-Wl,-z,relro,-z,now" ""
|
substituteInPlace Makefile --replace-fail "-Wl,-z,relro,-z,now" ""
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
|
|
@ -57,8 +57,8 @@ let
|
||||||
in
|
in
|
||||||
"[${lib.concatStringsSep "," options}]";
|
"[${lib.concatStringsSep "," options}]";
|
||||||
|
|
||||||
LANG = if stdenv.isLinux then "C.UTF-8" else "C";
|
LANG = if stdenv.hostPlatform.isLinux then "C.UTF-8" else "C";
|
||||||
LC_CTYPE = if stdenv.isLinux then "C.UTF-8" else "UTF-8";
|
LC_CTYPE = if stdenv.hostPlatform.isLinux then "C.UTF-8" else "UTF-8";
|
||||||
|
|
||||||
# add to ERL_LIBS so other modules can find at runtime.
|
# add to ERL_LIBS so other modules can find at runtime.
|
||||||
# http://erlang.org/doc/man/code.html#code-path
|
# http://erlang.org/doc/man/code.html#code-path
|
||||||
|
|
|
@ -138,8 +138,8 @@ stdenv.mkDerivation (
|
||||||
in
|
in
|
||||||
"[${lib.concatStringsSep "," options}]";
|
"[${lib.concatStringsSep "," options}]";
|
||||||
|
|
||||||
LANG = if stdenv.isLinux then "C.UTF-8" else "C";
|
LANG = if stdenv.hostPlatform.isLinux then "C.UTF-8" else "C";
|
||||||
LC_CTYPE = if stdenv.isLinux then "C.UTF-8" else "UTF-8";
|
LC_CTYPE = if stdenv.hostPlatform.isLinux then "C.UTF-8" else "UTF-8";
|
||||||
|
|
||||||
postUnpack =
|
postUnpack =
|
||||||
''
|
''
|
||||||
|
|
|
@ -162,10 +162,13 @@ let
|
||||||
runHook postInstall
|
runHook postInstall
|
||||||
'';
|
'';
|
||||||
|
|
||||||
${if stdenvNoCC.isDarwin && lib.versionAtLeast version "10" then "postInstall" else null} = ''
|
${
|
||||||
mkdir -p "$out"/nix-support
|
if stdenvNoCC.hostPlatform.isDarwin && lib.versionAtLeast version "10" then "postInstall" else null
|
||||||
cp "$src"/nix-support/manual-sdk-deps "$out"/nix-support/manual-sdk-deps
|
} =
|
||||||
'';
|
''
|
||||||
|
mkdir -p "$out"/nix-support
|
||||||
|
cp "$src"/nix-support/manual-sdk-deps "$out"/nix-support/manual-sdk-deps
|
||||||
|
'';
|
||||||
|
|
||||||
passthru = {
|
passthru = {
|
||||||
inherit (vmr) icu targetRid hasILCompiler;
|
inherit (vmr) icu targetRid hasILCompiler;
|
||||||
|
|
|
@ -18,7 +18,7 @@ let
|
||||||
writeShellScript
|
writeShellScript
|
||||||
;
|
;
|
||||||
inherit pkgs nodejs;
|
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
|
in
|
||||||
import ./node-packages.nix {
|
import ./node-packages.nix {
|
||||||
|
|
|
@ -25,7 +25,7 @@ qtModule {
|
||||||
];
|
];
|
||||||
strictDeps = true;
|
strictDeps = true;
|
||||||
|
|
||||||
nativeBuildInputs = lib.optionals stdenv.isDarwin [
|
nativeBuildInputs = lib.optionals stdenv.hostPlatform.isDarwin [
|
||||||
darwin.sigtool
|
darwin.sigtool
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
|
@ -15922,7 +15922,7 @@ lib.makeScope pkgs.newScope (self: {
|
||||||
meta = {
|
meta = {
|
||||||
hydraPlatforms = [ ];
|
hydraPlatforms = [ ];
|
||||||
# darwin cannot find libpango.dylib
|
# darwin cannot find libpango.dylib
|
||||||
broken = stdenv.isDarwin;
|
broken = stdenv.hostPlatform.isDarwin;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
@ -39541,7 +39541,7 @@ lib.makeScope pkgs.newScope (self: {
|
||||||
meta = {
|
meta = {
|
||||||
hydraPlatforms = [ ];
|
hydraPlatforms = [ ];
|
||||||
# darwin cannot find libpango.dylib
|
# darwin cannot find libpango.dylib
|
||||||
broken = stdenv.isDarwin;
|
broken = stdenv.hostPlatform.isDarwin;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
|
@ -23,7 +23,7 @@ deployAndroidPackage {
|
||||||
pkgs.ncurses5
|
pkgs.ncurses5
|
||||||
pkgs.libcxx
|
pkgs.libcxx
|
||||||
]
|
]
|
||||||
++ lib.optionals (os == "linux" && stdenv.isx86_64) (
|
++ lib.optionals (os == "linux" && stdenv.hostPlatform.isx86_64) (
|
||||||
with pkgsi686Linux;
|
with pkgsi686Linux;
|
||||||
[
|
[
|
||||||
glibc
|
glibc
|
||||||
|
|
|
@ -29,7 +29,7 @@ stdenvNoCC.mkDerivation (finalAttrs: {
|
||||||
finalAttrs.passthru.sources.${stdenvNoCC.hostPlatform.system}
|
finalAttrs.passthru.sources.${stdenvNoCC.hostPlatform.system}
|
||||||
or (throw "Unsupported platform for tideways-php: ${stdenvNoCC.hostPlatform.system}");
|
or (throw "Unsupported platform for tideways-php: ${stdenvNoCC.hostPlatform.system}");
|
||||||
|
|
||||||
nativeBuildInputs = lib.optionals stdenvNoCC.isLinux [
|
nativeBuildInputs = lib.optionals stdenvNoCC.hostPlatform.isLinux [
|
||||||
autoPatchelfHook
|
autoPatchelfHook
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
|
@ -58,7 +58,7 @@ buildPythonPackage {
|
||||||
transformers
|
transformers
|
||||||
];
|
];
|
||||||
# `deepspeed` is not yet packaged in nixpkgs
|
# `deepspeed` is not yet packaged in nixpkgs
|
||||||
# ++ lib.optionals (!stdenv.isDarwin) [
|
# ++ lib.optionals (!stdenv.hostPlatform.isDarwin) [
|
||||||
# deepspeed
|
# deepspeed
|
||||||
# ];
|
# ];
|
||||||
};
|
};
|
||||||
|
|
|
@ -119,7 +119,7 @@ buildPythonPackage rec {
|
||||||
cmakeConfigurePhase
|
cmakeConfigurePhase
|
||||||
cmake --build native/src/build --config Release
|
cmake --build native/src/build --config Release
|
||||||
''
|
''
|
||||||
+ lib.optionalString (enableRemoting && stdenv.isLinux) ''
|
+ lib.optionalString (enableRemoting && stdenv.hostPlatform.isLinux) ''
|
||||||
# reimplementation of native/build_remoting.py
|
# reimplementation of native/build_remoting.py
|
||||||
cmakeFlags="-S native/remoting -B remoting/linux64 -D RPCLIB=${rpclib}"
|
cmakeFlags="-S native/remoting -B remoting/linux64 -D RPCLIB=${rpclib}"
|
||||||
cmakeConfigurePhase
|
cmakeConfigurePhase
|
||||||
|
|
|
@ -71,7 +71,7 @@ buildPythonPackage rec {
|
||||||
pytestFlagsArray = [ "tests" ];
|
pytestFlagsArray = [ "tests" ];
|
||||||
|
|
||||||
# These tests fail when MPS devices are detected
|
# These tests fail when MPS devices are detected
|
||||||
disabledTests = lib.optional stdenv.isDarwin [
|
disabledTests = lib.optional stdenv.hostPlatform.isDarwin [
|
||||||
"gpu"
|
"gpu"
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
|
@ -46,7 +46,7 @@ buildPythonPackage rec {
|
||||||
];
|
];
|
||||||
|
|
||||||
# numerous test failures on Darwin
|
# numerous test failures on Darwin
|
||||||
doCheck = stdenv.isLinux;
|
doCheck = stdenv.hostPlatform.isLinux;
|
||||||
|
|
||||||
pythonImportsCheck = [ "prometheus_fastapi_instrumentator" ];
|
pythonImportsCheck = [ "prometheus_fastapi_instrumentator" ];
|
||||||
|
|
||||||
|
|
|
@ -61,7 +61,7 @@ buildPythonPackage rec {
|
||||||
__impureHostDeps = [ "/System/Library/Fonts" ];
|
__impureHostDeps = [ "/System/Library/Fonts" ];
|
||||||
|
|
||||||
postCheck = ''
|
postCheck = ''
|
||||||
export LANG=${if stdenv.isDarwin then "en_US.UTF-8" else "C.UTF-8"}
|
export LANG=${if stdenv.hostPlatform.isDarwin then "en_US.UTF-8" else "C.UTF-8"}
|
||||||
'';
|
'';
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
|
|
|
@ -132,7 +132,7 @@ buildPythonPackage rec {
|
||||||
"test_visit_webpage"
|
"test_visit_webpage"
|
||||||
"test_wikipedia_search"
|
"test_wikipedia_search"
|
||||||
]
|
]
|
||||||
++ lib.optionals stdenv.isDarwin [
|
++ lib.optionals stdenv.hostPlatform.isDarwin [
|
||||||
# Missing dependencies
|
# Missing dependencies
|
||||||
"test_get_mlx"
|
"test_get_mlx"
|
||||||
|
|
||||||
|
|
|
@ -295,7 +295,7 @@ buildPythonPackage rec {
|
||||||
lib.optionals cpuSupport [
|
lib.optionals cpuSupport [
|
||||||
oneDNN
|
oneDNN
|
||||||
]
|
]
|
||||||
++ lib.optionals (cpuSupport && stdenv.isLinux) [
|
++ lib.optionals (cpuSupport && stdenv.hostPlatform.isLinux) [
|
||||||
numactl
|
numactl
|
||||||
]
|
]
|
||||||
++ lib.optionals cudaSupport (
|
++ lib.optionals cudaSupport (
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
ffmpeg-headless,
|
ffmpeg-headless,
|
||||||
|
|
||||||
# Current derivation only supports linux-x86_64 (contributions welcome, without libTensorflow builtin webassembly can be used)
|
# Current derivation only supports linux-x86_64 (contributions welcome, without libTensorflow builtin webassembly can be used)
|
||||||
useLibTensorflow ? stdenv.isx86_64 && stdenv.isLinux,
|
useLibTensorflow ? stdenv.hostPlatform.isx86_64 && stdenv.hostPlatform.isLinux,
|
||||||
|
|
||||||
ncVersion,
|
ncVersion,
|
||||||
}:
|
}:
|
||||||
|
|
|
@ -25,7 +25,7 @@ stdenv.mkDerivation (finalAttrs: {
|
||||||
zip
|
zip
|
||||||
wrapQtAppsHook
|
wrapQtAppsHook
|
||||||
];
|
];
|
||||||
patches = lib.optionals stdenv.isDarwin [ ./bundle-destination.patch ];
|
patches = lib.optionals stdenv.hostPlatform.isDarwin [ ./bundle-destination.patch ];
|
||||||
|
|
||||||
meta = {
|
meta = {
|
||||||
description = "UEFI firmware image viewer and editor";
|
description = "UEFI firmware image viewer and editor";
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue