treewide: s_targetPlatform_hostPlatform_ in non-compiler packages
stdenv.targetPlatform really shouldn't be used by software that doesn't generate or manipulate binaries. I reviewed all uses of targetPlatform outside of pkgs/development/compilers and pkgs/stdenv and replaced those which weren't involved in something which fits these criteria.
This commit is contained in:
parent
6a689e72ef
commit
c7e0f6b905
|
@ -10,7 +10,7 @@ stdenv.mkDerivation (finalAttrs: {
|
||||||
};
|
};
|
||||||
|
|
||||||
buildInputs = [ sndio ]
|
buildInputs = [ sndio ]
|
||||||
++ lib.optional (!stdenv.isDarwin && !stdenv.targetPlatform.isBSD)
|
++ lib.optional (!stdenv.isDarwin && !stdenv.hostPlatform.isBSD)
|
||||||
libbsd;
|
libbsd;
|
||||||
|
|
||||||
outputs = [ "out" "man" ];
|
outputs = [ "out" "man" ];
|
||||||
|
@ -18,7 +18,7 @@ stdenv.mkDerivation (finalAttrs: {
|
||||||
preBuild = ''
|
preBuild = ''
|
||||||
makeFlagsArray+=("PREFIX=$out")
|
makeFlagsArray+=("PREFIX=$out")
|
||||||
'' + lib.optionalString
|
'' + lib.optionalString
|
||||||
(!stdenv.isDarwin && !stdenv.targetPlatform.isBSD) ''
|
(!stdenv.isDarwin && !stdenv.hostPlatform.isBSD) ''
|
||||||
makeFlagsArray+=(LDADD="-lsndio -lbsd")
|
makeFlagsArray+=(LDADD="-lsndio -lbsd")
|
||||||
|
|
||||||
# Fix warning about implicit declaration of function 'strlcpy'
|
# Fix warning about implicit declaration of function 'strlcpy'
|
||||||
|
|
|
@ -78,7 +78,7 @@ stdenv.mkDerivation rec {
|
||||||
'' + lib.optionalString stdenv.isLinux ''
|
'' + lib.optionalString stdenv.isLinux ''
|
||||||
substituteInPlace libraries/lib-files/FileNames.cpp \
|
substituteInPlace libraries/lib-files/FileNames.cpp \
|
||||||
--replace /usr/include/linux/magic.h ${linuxHeaders}/include/linux/magic.h
|
--replace /usr/include/linux/magic.h ${linuxHeaders}/include/linux/magic.h
|
||||||
'' + lib.optionalString (stdenv.isDarwin && lib.versionOlder stdenv.targetPlatform.darwinMinVersion "11.0") ''
|
'' + lib.optionalString (stdenv.isDarwin && lib.versionOlder stdenv.hostPlatform.darwinMinVersion "11.0") ''
|
||||||
sed -z -i "s/NSAppearanceName.*systemAppearance//" src/AudacityApp.mm
|
sed -z -i "s/NSAppearanceName.*systemAppearance//" src/AudacityApp.mm
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
|
|
@ -88,7 +88,7 @@ rustPlatform.buildRustPackage {
|
||||||
postBuild = ''
|
postBuild = ''
|
||||||
make -C docs \
|
make -C docs \
|
||||||
DEB_VERSION=${version} DEB_VERSION_UPSTREAM=${version} \
|
DEB_VERSION=${version} DEB_VERSION_UPSTREAM=${version} \
|
||||||
RUSTC_TARGET=${stdenv.targetPlatform.config} \
|
RUSTC_TARGET=${stdenv.hostPlatform.config} \
|
||||||
BUILD_MODE=release \
|
BUILD_MODE=release \
|
||||||
proxmox-backup-client.1 pxar.1
|
proxmox-backup-client.1 pxar.1
|
||||||
'';
|
'';
|
||||||
|
|
|
@ -65,7 +65,7 @@ self: let
|
||||||
});
|
});
|
||||||
|
|
||||||
xeft = super.xeft.overrideAttrs (old: let
|
xeft = super.xeft.overrideAttrs (old: let
|
||||||
libExt = pkgs.stdenv.targetPlatform.extensions.sharedLibrary;
|
libExt = pkgs.stdenv.hostPlatform.extensions.sharedLibrary;
|
||||||
in {
|
in {
|
||||||
dontUnpack = false;
|
dontUnpack = false;
|
||||||
|
|
||||||
|
|
|
@ -118,7 +118,7 @@ self: let
|
||||||
});
|
});
|
||||||
|
|
||||||
jinx = super.jinx.overrideAttrs (old: let
|
jinx = super.jinx.overrideAttrs (old: let
|
||||||
libExt = pkgs.stdenv.targetPlatform.extensions.sharedLibrary;
|
libExt = pkgs.stdenv.hostPlatform.extensions.sharedLibrary;
|
||||||
in {
|
in {
|
||||||
dontUnpack = false;
|
dontUnpack = false;
|
||||||
|
|
||||||
|
@ -159,7 +159,7 @@ self: let
|
||||||
);
|
);
|
||||||
|
|
||||||
xeft = super.xeft.overrideAttrs (old: let
|
xeft = super.xeft.overrideAttrs (old: let
|
||||||
libExt = pkgs.stdenv.targetPlatform.extensions.sharedLibrary;
|
libExt = pkgs.stdenv.hostPlatform.extensions.sharedLibrary;
|
||||||
in {
|
in {
|
||||||
dontUnpack = false;
|
dontUnpack = false;
|
||||||
|
|
||||||
|
|
|
@ -315,7 +315,7 @@ let
|
||||||
ivy-rtags = fix-rtags super.ivy-rtags;
|
ivy-rtags = fix-rtags super.ivy-rtags;
|
||||||
|
|
||||||
jinx = super.jinx.overrideAttrs (old: let
|
jinx = super.jinx.overrideAttrs (old: let
|
||||||
libExt = pkgs.stdenv.targetPlatform.extensions.sharedLibrary;
|
libExt = pkgs.stdenv.hostPlatform.extensions.sharedLibrary;
|
||||||
in {
|
in {
|
||||||
nativeBuildInputs = (old.nativeBuildInputs or [ ]) ++ [
|
nativeBuildInputs = (old.nativeBuildInputs or [ ]) ++ [
|
||||||
pkgs.pkg-config
|
pkgs.pkg-config
|
||||||
|
|
|
@ -104,7 +104,7 @@ stdenv.mkDerivation rec {
|
||||||
|
|
||||||
cmakeFlags = lib.optional (!withGUI) "-DSYNERGY_BUILD_LEGACY_GUI=OFF"
|
cmakeFlags = lib.optional (!withGUI) "-DSYNERGY_BUILD_LEGACY_GUI=OFF"
|
||||||
# NSFilenamesPboardType is deprecated in 10.14+
|
# NSFilenamesPboardType is deprecated in 10.14+
|
||||||
++ lib.optional stdenv.isDarwin "-DCMAKE_OSX_DEPLOYMENT_TARGET=${if stdenv.isAarch64 then "10.13" else stdenv.targetPlatform.darwinSdkVersion}";
|
++ lib.optional stdenv.isDarwin "-DCMAKE_OSX_DEPLOYMENT_TARGET=${if stdenv.isAarch64 then "10.13" else stdenv.hostPlatform.darwinSdkVersion}";
|
||||||
|
|
||||||
doCheck = true;
|
doCheck = true;
|
||||||
|
|
||||||
|
|
|
@ -51,7 +51,7 @@ rustPlatform.buildRustPackage rec {
|
||||||
|
|
||||||
# talpid-core wants libwg.a in build/lib/{triple}
|
# talpid-core wants libwg.a in build/lib/{triple}
|
||||||
preBuild = ''
|
preBuild = ''
|
||||||
dest=build/lib/${stdenv.targetPlatform.config}
|
dest=build/lib/${stdenv.hostPlatform.config}
|
||||||
mkdir -p $dest
|
mkdir -p $dest
|
||||||
ln -s ${libwg}/lib/libwg.a $dest
|
ln -s ${libwg}/lib/libwg.a $dest
|
||||||
'';
|
'';
|
||||||
|
|
|
@ -141,7 +141,7 @@ stdenv.mkDerivation (finalAttrs: {
|
||||||
];
|
];
|
||||||
|
|
||||||
postPhases = [ "installFirmware" "removeInstalledTests" ]
|
postPhases = [ "installFirmware" "removeInstalledTests" ]
|
||||||
++ optionals (enableUtils && stdenv.targetPlatform.isLinux) [ "moveUdevRules" ]
|
++ optionals (enableUtils && stdenv.hostPlatform.isLinux) [ "moveUdevRules" ]
|
||||||
;
|
;
|
||||||
|
|
||||||
# UHD expects images in `$CMAKE_INSTALL_PREFIX/share/uhd/images`
|
# UHD expects images in `$CMAKE_INSTALL_PREFIX/share/uhd/images`
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
}:
|
}:
|
||||||
|
|
||||||
let
|
let
|
||||||
inherit (stdenv.targetPlatform) system;
|
inherit (stdenv.hostPlatform) system;
|
||||||
throwSystem = throw "Unsupported system: ${system}";
|
throwSystem = throw "Unsupported system: ${system}";
|
||||||
|
|
||||||
os = {
|
os = {
|
||||||
|
|
|
@ -62,7 +62,7 @@ let
|
||||||
SITEURL = "https://www.blackmagicdesign.com/api/register/us/download/${DOWNLOADID}";
|
SITEURL = "https://www.blackmagicdesign.com/api/register/us/download/${DOWNLOADID}";
|
||||||
|
|
||||||
USERAGENT = builtins.concatStringsSep " " [
|
USERAGENT = builtins.concatStringsSep " " [
|
||||||
"User-Agent: Mozilla/5.0 (X11; Linux ${stdenv.targetPlatform.linuxArch})"
|
"User-Agent: Mozilla/5.0 (X11; Linux ${stdenv.hostPlatform.linuxArch})"
|
||||||
"AppleWebKit/537.36 (KHTML, like Gecko)"
|
"AppleWebKit/537.36 (KHTML, like Gecko)"
|
||||||
"Chrome/77.0.3865.75"
|
"Chrome/77.0.3865.75"
|
||||||
"Safari/537.36"
|
"Safari/537.36"
|
||||||
|
|
|
@ -1,14 +1,13 @@
|
||||||
{ lib
|
{ lib
|
||||||
, fetchFromGitHub
|
, fetchFromGitHub
|
||||||
, hostPlatform
|
, hostPlatform
|
||||||
, targetPlatform
|
|
||||||
, cargo
|
, cargo
|
||||||
, rustc
|
, rustc
|
||||||
, lld
|
, lld
|
||||||
}:
|
}:
|
||||||
|
|
||||||
let
|
let
|
||||||
arch = targetPlatform.qemuArch;
|
arch = hostPlatform.qemuArch;
|
||||||
|
|
||||||
target = ./. + "/${arch}-unknown-none.json";
|
target = ./. + "/${arch}-unknown-none.json";
|
||||||
|
|
||||||
|
|
|
@ -111,7 +111,7 @@ stdenv.mkDerivation (finalAttrs: {
|
||||||
maintainers = with lib.maintainers; [ thoughtpolice AndersonTorres ];
|
maintainers = with lib.maintainers; [ thoughtpolice AndersonTorres ];
|
||||||
platforms = lib.platforms.unix;
|
platforms = lib.platforms.unix;
|
||||||
# ofborg: x86_64-linux builds the musl package, aarch64-linux doesn't
|
# ofborg: x86_64-linux builds the musl package, aarch64-linux doesn't
|
||||||
broken = stdenv.targetPlatform.isMusl && stdenv.buildPlatform.isAarch64;
|
broken = stdenv.hostPlatform.isMusl && stdenv.buildPlatform.isAarch64;
|
||||||
};
|
};
|
||||||
})
|
})
|
||||||
# TODO: report the quirks and patches to bmake devteam (especially the Musl one)
|
# TODO: report the quirks and patches to bmake devteam (especially the Musl one)
|
||||||
|
|
|
@ -61,7 +61,7 @@ stdenv.mkDerivation rec {
|
||||||
cp -r . "$out/lib/node_modules/@mermaid-js/mermaid-cli"
|
cp -r . "$out/lib/node_modules/@mermaid-js/mermaid-cli"
|
||||||
|
|
||||||
makeWrapper "${nodejs}/bin/node" "$out/bin/mmdc" \
|
makeWrapper "${nodejs}/bin/node" "$out/bin/mmdc" \
|
||||||
'' + lib.optionalString (lib.meta.availableOn stdenv.targetPlatform chromium) ''
|
'' + lib.optionalString (lib.meta.availableOn stdenv.hostPlatform chromium) ''
|
||||||
--set PUPPETEER_EXECUTABLE_PATH '${lib.getExe chromium}' \
|
--set PUPPETEER_EXECUTABLE_PATH '${lib.getExe chromium}' \
|
||||||
'' + ''
|
'' + ''
|
||||||
--add-flags "$out/lib/node_modules/@mermaid-js/mermaid-cli/src/cli.js"
|
--add-flags "$out/lib/node_modules/@mermaid-js/mermaid-cli/src/cli.js"
|
||||||
|
|
|
@ -33,7 +33,7 @@ buildGoPackage rec {
|
||||||
buildPhase = ''
|
buildPhase = ''
|
||||||
runHook preBuild
|
runHook preBuild
|
||||||
addToSearchPath GOPATH "${go-lib}/share/gocode"
|
addToSearchPath GOPATH "${go-lib}/share/gocode"
|
||||||
make ARCH=${stdenv.targetPlatform.linuxArch} -C go/src/${goPackagePath}
|
make ARCH=${stdenv.hostPlatform.linuxArch} -C go/src/${goPackagePath}
|
||||||
runHook postBuild
|
runHook postBuild
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
|
|
@ -7,7 +7,7 @@ stdenv.mkDerivation rec {
|
||||||
# that as the version number, I guess.
|
# that as the version number, I guess.
|
||||||
version = "2017";
|
version = "2017";
|
||||||
|
|
||||||
libname = pname + stdenv.targetPlatform.extensions.sharedLibrary;
|
libname = pname + stdenv.hostPlatform.extensions.sharedLibrary;
|
||||||
|
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = "https://baldur.iti.kit.edu/sat-competition-2017/solvers/incremental/glucose-ipasir.zip";
|
url = "https://baldur.iti.kit.edu/sat-competition-2017/solvers/incremental/glucose-ipasir.zip";
|
||||||
|
|
|
@ -29,7 +29,7 @@ stdenv.mkDerivation rec {
|
||||||
# We want to have the makefile pick up $CC, etc. so that we don't have
|
# We want to have the makefile pick up $CC, etc. so that we don't have
|
||||||
# to unnecessarily tie this package to the GCC stdenv.
|
# to unnecessarily tie this package to the GCC stdenv.
|
||||||
./02-use-toolchain-env-vars.patch
|
./02-use-toolchain-env-vars.patch
|
||||||
] ++ lib.optionals stdenv.targetPlatform.isDarwin [
|
] ++ lib.optionals stdenv.hostPlatform.isDarwin [
|
||||||
# On macOS the library suffix is .dylib:
|
# On macOS the library suffix is .dylib:
|
||||||
./03-macOS-SOsuf.patch
|
./03-macOS-SOsuf.patch
|
||||||
];
|
];
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
, libGL
|
, libGL
|
||||||
, alsaSupport ? stdenv.isLinux && !stdenv.hostPlatform.isAndroid
|
, alsaSupport ? stdenv.isLinux && !stdenv.hostPlatform.isAndroid
|
||||||
, alsa-lib
|
, alsa-lib
|
||||||
, x11Support ? !stdenv.targetPlatform.isWindows && !stdenv.hostPlatform.isAndroid
|
, x11Support ? !stdenv.hostPlatform.isWindows && !stdenv.hostPlatform.isAndroid
|
||||||
, libX11
|
, libX11
|
||||||
, xorgproto
|
, xorgproto
|
||||||
, libICE
|
, libICE
|
||||||
|
@ -122,7 +122,7 @@ stdenv.mkDerivation (finalAttrs: {
|
||||||
"--disable-oss"
|
"--disable-oss"
|
||||||
] ++ lib.optional (!x11Support) "--without-x"
|
] ++ lib.optional (!x11Support) "--without-x"
|
||||||
++ lib.optional alsaSupport "--with-alsa-prefix=${alsa-lib.out}/lib"
|
++ lib.optional alsaSupport "--with-alsa-prefix=${alsa-lib.out}/lib"
|
||||||
++ lib.optional stdenv.targetPlatform.isWindows "--disable-video-opengles"
|
++ lib.optional stdenv.hostPlatform.isWindows "--disable-video-opengles"
|
||||||
++ lib.optional stdenv.isDarwin "--disable-sdltest";
|
++ lib.optional stdenv.isDarwin "--disable-sdltest";
|
||||||
|
|
||||||
# We remove libtool .la files when static libs are requested,
|
# We remove libtool .la files when static libs are requested,
|
||||||
|
|
|
@ -18,7 +18,7 @@ stdenv.mkDerivation rec {
|
||||||
cd source
|
cd source
|
||||||
substituteInPlace Makefile \
|
substituteInPlace Makefile \
|
||||||
--replace 'ldconfig' ""
|
--replace 'ldconfig' ""
|
||||||
'' + lib.optionalString (!stdenv.targetPlatform.isx86_64) ''
|
'' + lib.optionalString (!stdenv.hostPlatform.isx86_64) ''
|
||||||
substituteInPlace Makefile \
|
substituteInPlace Makefile \
|
||||||
--replace '-DENABLE_SSE2' ""
|
--replace '-DENABLE_SSE2' ""
|
||||||
'';
|
'';
|
||||||
|
|
|
@ -14,8 +14,8 @@ stdenv.mkDerivation ( finalAttrs: {
|
||||||
buildPhase = ''
|
buildPhase = ''
|
||||||
runHook preBuild
|
runHook preBuild
|
||||||
|
|
||||||
./build.sh ${lib.optionalString stdenv.targetPlatform.isWindows "flavour=mingw64"}
|
./build.sh ${lib.optionalString stdenv.hostPlatform.isWindows "flavour=mingw64"}
|
||||||
./build.sh -shared ${lib.optionalString stdenv.targetPlatform.isWindows "flavour=mingw64"}
|
./build.sh -shared ${lib.optionalString stdenv.hostPlatform.isWindows "flavour=mingw64"}
|
||||||
|
|
||||||
runHook postBuild
|
runHook postBuild
|
||||||
'';
|
'';
|
||||||
|
|
|
@ -16,8 +16,8 @@ stdenv.mkDerivation rec {
|
||||||
buildInputs = lib.optional stdenv.isDarwin Foundation;
|
buildInputs = lib.optional stdenv.isDarwin Foundation;
|
||||||
|
|
||||||
installTargets = [ "install_hdrs" ]
|
installTargets = [ "install_hdrs" ]
|
||||||
++ lib.optional (!stdenv.targetPlatform.isStatic) "install_shared_lib"
|
++ lib.optional (!stdenv.hostPlatform.isStatic) "install_shared_lib"
|
||||||
++ lib.optional stdenv.targetPlatform.isStatic "install_lib";
|
++ lib.optional stdenv.hostPlatform.isStatic "install_lib";
|
||||||
|
|
||||||
postInstall = lib.optionalString stdenv.isDarwin ''
|
postInstall = lib.optionalString stdenv.isDarwin ''
|
||||||
install_name_tool -id $out/lib/libcctz.so $out/lib/libcctz.so
|
install_name_tool -id $out/lib/libcctz.so $out/lib/libcctz.so
|
||||||
|
|
|
@ -52,7 +52,7 @@
|
||||||
, withLadspa ? withFullDeps # LADSPA audio filtering
|
, withLadspa ? withFullDeps # LADSPA audio filtering
|
||||||
, withLibplacebo ? withFullDeps && !stdenv.isDarwin # libplacebo video processing library
|
, withLibplacebo ? withFullDeps && !stdenv.isDarwin # libplacebo video processing library
|
||||||
, withLzma ? withHeadlessDeps # xz-utils
|
, withLzma ? withHeadlessDeps # xz-utils
|
||||||
, withMfx ? withFullDeps && (with stdenv.targetPlatform; isLinux && !isAarch) # Hardware acceleration via intel-media-sdk/libmfx
|
, withMfx ? withFullDeps && (with stdenv.hostPlatform; isLinux && !isAarch) # Hardware acceleration via intel-media-sdk/libmfx
|
||||||
, withModplug ? withFullDeps && !stdenv.isDarwin # ModPlug support
|
, withModplug ? withFullDeps && !stdenv.isDarwin # ModPlug support
|
||||||
, withMp3lame ? withHeadlessDeps # LAME MP3 encoder
|
, withMp3lame ? withHeadlessDeps # LAME MP3 encoder
|
||||||
, withMysofa ? withFullDeps # HRTF support via SOFAlizer
|
, withMysofa ? withFullDeps # HRTF support via SOFAlizer
|
||||||
|
@ -386,8 +386,8 @@ stdenv.mkDerivation (finalAttrs: {
|
||||||
(enableFeature withHardcodedTables "hardcoded-tables")
|
(enableFeature withHardcodedTables "hardcoded-tables")
|
||||||
(enableFeature withSafeBitstreamReader "safe-bitstream-reader")
|
(enableFeature withSafeBitstreamReader "safe-bitstream-reader")
|
||||||
|
|
||||||
(enableFeature (withMultithread && stdenv.targetPlatform.isUnix) "pthreads")
|
(enableFeature (withMultithread && stdenv.hostPlatform.isUnix) "pthreads")
|
||||||
(enableFeature (withMultithread && stdenv.targetPlatform.isWindows) "w32threads")
|
(enableFeature (withMultithread && stdenv.hostPlatform.isWindows) "w32threads")
|
||||||
"--disable-os2threads" # We don't support OS/2
|
"--disable-os2threads" # We don't support OS/2
|
||||||
|
|
||||||
(enableFeature withNetwork "network")
|
(enableFeature withNetwork "network")
|
||||||
|
|
|
@ -69,7 +69,7 @@ let
|
||||||
platforms."aarch64-linux".sha256 = "12sp58nxa3nv800badv62vpvc30hyb0ykywdaxgv9y8pswp9lq0z";
|
platforms."aarch64-linux".sha256 = "12sp58nxa3nv800badv62vpvc30hyb0ykywdaxgv9y8pswp9lq0z";
|
||||||
platforms."x86_64-linux".sha256 = "0vzzwq1k6bv9d209yg3samvfnfwj7s58y9r3p3pd98wxa9iyzf4j";
|
platforms."x86_64-linux".sha256 = "0vzzwq1k6bv9d209yg3samvfnfwj7s58y9r3p3pd98wxa9iyzf4j";
|
||||||
|
|
||||||
platformInfo = builtins.getAttr stdenv.targetPlatform.system platforms;
|
platformInfo = builtins.getAttr stdenv.hostPlatform.system platforms;
|
||||||
in
|
in
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
pname = "cef-binary";
|
pname = "cef-binary";
|
||||||
|
|
|
@ -13,18 +13,18 @@ stdenv.mkDerivation (finalAttrs: {
|
||||||
|
|
||||||
outputs = [ "out" "dev" ];
|
outputs = [ "out" "dev" ];
|
||||||
|
|
||||||
patches = lib.optional stdenv.targetPlatform.isMinGW ./mingw-no-fortify.patch;
|
patches = lib.optional stdenv.hostPlatform.isMinGW ./mingw-no-fortify.patch;
|
||||||
|
|
||||||
nativeBuildInputs = lib.optional stdenv.targetPlatform.isMinGW autoreconfHook;
|
nativeBuildInputs = lib.optional stdenv.hostPlatform.isMinGW autoreconfHook;
|
||||||
|
|
||||||
separateDebugInfo = stdenv.isLinux && stdenv.hostPlatform.libc != "musl";
|
separateDebugInfo = stdenv.isLinux && stdenv.hostPlatform.libc != "musl";
|
||||||
|
|
||||||
enableParallelBuilding = true;
|
enableParallelBuilding = true;
|
||||||
hardeningDisable = lib.optional (stdenv.targetPlatform.isMusl && stdenv.targetPlatform.isx86_32) "stackprotector";
|
hardeningDisable = lib.optional (stdenv.hostPlatform.isMusl && stdenv.hostPlatform.isx86_32) "stackprotector";
|
||||||
|
|
||||||
# FIXME: the hardeingDisable attr above does not seems effective, so
|
# FIXME: the hardeingDisable attr above does not seems effective, so
|
||||||
# the need to disable stackprotector via configureFlags
|
# the need to disable stackprotector via configureFlags
|
||||||
configureFlags = lib.optional (stdenv.targetPlatform.isMusl && stdenv.targetPlatform.isx86_32) "--disable-ssp";
|
configureFlags = lib.optional (stdenv.hostPlatform.isMusl && stdenv.hostPlatform.isx86_32) "--disable-ssp";
|
||||||
|
|
||||||
doCheck = true;
|
doCheck = true;
|
||||||
|
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
, fetchpatch
|
, fetchpatch
|
||||||
, autoreconfHook
|
, autoreconfHook
|
||||||
, pkg-config
|
, pkg-config
|
||||||
, enableUdev ? stdenv.isLinux && !stdenv.targetPlatform.isStatic
|
, enableUdev ? stdenv.isLinux && !stdenv.hostPlatform.isStatic
|
||||||
, udev
|
, udev
|
||||||
, libobjc
|
, libobjc
|
||||||
, IOKit
|
, IOKit
|
||||||
|
|
|
@ -61,6 +61,6 @@ stdenv.mkDerivation rec {
|
||||||
platforms = platforms.all;
|
platforms = platforms.all;
|
||||||
# Should be fixable if a higher clang version is used, see:
|
# Should be fixable if a higher clang version is used, see:
|
||||||
# https://github.com/NixOS/nixpkgs/pull/85922#issuecomment-619287177
|
# https://github.com/NixOS/nixpkgs/pull/85922#issuecomment-619287177
|
||||||
broken = stdenv.targetPlatform.isDarwin;
|
broken = stdenv.hostPlatform.isDarwin;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -19,7 +19,7 @@ stdenv.mkDerivation rec {
|
||||||
|
|
||||||
installPhase = ''
|
installPhase = ''
|
||||||
mkdir -p $out/lib
|
mkdir -p $out/lib
|
||||||
mv lib*${stdenv.targetPlatform.extensions.sharedLibrary} $out/lib/
|
mv lib*${stdenv.hostPlatform.extensions.sharedLibrary} $out/lib/
|
||||||
|
|
||||||
mkdir -p $out/include
|
mkdir -p $out/include
|
||||||
mv *.h $out/include/
|
mv *.h $out/include/
|
||||||
|
|
|
@ -48,7 +48,7 @@ stdenv.mkDerivation rec {
|
||||||
"TUNE=${
|
"TUNE=${
|
||||||
if tune then
|
if tune then
|
||||||
"auto"
|
"auto"
|
||||||
else if stdenv.targetPlatform.isx86 then
|
else if stdenv.hostPlatform.isx86 then
|
||||||
"x86" # "chooses options that should be well suited for most x86 platforms"
|
"x86" # "chooses options that should be well suited for most x86 platforms"
|
||||||
else
|
else
|
||||||
"generic" # "chooses options that should be OK for most platforms"
|
"generic" # "chooses options that should be OK for most platforms"
|
||||||
|
|
|
@ -76,7 +76,7 @@ stdenv.mkDerivation (finalAttrs: {
|
||||||
]
|
]
|
||||||
# Tests fail to build on 32-bit platforms; fixed in 22.x
|
# Tests fail to build on 32-bit platforms; fixed in 22.x
|
||||||
# https://github.com/protocolbuffers/protobuf/issues/10418
|
# https://github.com/protocolbuffers/protobuf/issues/10418
|
||||||
++ lib.optionals (stdenv.targetPlatform.is32bit && lib.versionOlder version "22") [
|
++ lib.optionals (stdenv.hostPlatform.is32bit && lib.versionOlder version "22") [
|
||||||
"-Dprotobuf_BUILD_TESTS=OFF"
|
"-Dprotobuf_BUILD_TESTS=OFF"
|
||||||
];
|
];
|
||||||
|
|
||||||
|
@ -85,7 +85,7 @@ stdenv.mkDerivation (finalAttrs: {
|
||||||
# https://hydra.nixos.org/build/235677717/nixlog/4/tail
|
# https://hydra.nixos.org/build/235677717/nixlog/4/tail
|
||||||
# Also AnyTest.TestPackFromSerializationExceedsSizeLimit fails on 32-bit platforms
|
# Also AnyTest.TestPackFromSerializationExceedsSizeLimit fails on 32-bit platforms
|
||||||
# https://github.com/protocolbuffers/protobuf/issues/8460
|
# https://github.com/protocolbuffers/protobuf/issues/8460
|
||||||
doCheck = !(stdenv.isDarwin && lib.versionAtLeast version "23") && !stdenv.targetPlatform.is32bit;
|
doCheck = !(stdenv.isDarwin && lib.versionAtLeast version "23") && !stdenv.hostPlatform.is32bit;
|
||||||
|
|
||||||
passthru = {
|
passthru = {
|
||||||
tests = {
|
tests = {
|
||||||
|
|
|
@ -63,8 +63,7 @@ redoxRustPlatform.buildRustPackage rec {
|
||||||
DESTDIR=$out make install
|
DESTDIR=$out make install
|
||||||
'';
|
'';
|
||||||
|
|
||||||
# TODO: should be hostPlatform
|
TARGET = stdenvNoCC.hostPlatform.rust.rustcTargetSpec;
|
||||||
TARGET = stdenvNoCC.targetPlatform.rust.rustcTargetSpec;
|
|
||||||
|
|
||||||
cargoLock = {
|
cargoLock = {
|
||||||
lockFile = ./Cargo.lock;
|
lockFile = ./Cargo.lock;
|
||||||
|
|
|
@ -26,7 +26,7 @@ in stdenv.mkDerivation {
|
||||||
inherit version;
|
inherit version;
|
||||||
pname = "libtorch";
|
pname = "libtorch";
|
||||||
|
|
||||||
src = fetchzip srcs."${stdenv.targetPlatform.system}-${device}" or unavailable;
|
src = fetchzip srcs."${stdenv.hostPlatform.system}-${device}" or unavailable;
|
||||||
|
|
||||||
nativeBuildInputs =
|
nativeBuildInputs =
|
||||||
if stdenv.isDarwin then [ fixDarwinDylibNames ]
|
if stdenv.isDarwin then [ fixDarwinDylibNames ]
|
||||||
|
|
|
@ -31,7 +31,7 @@ stdenv.mkDerivation rec {
|
||||||
|
|
||||||
# name of library file ("libzn_poly.so")
|
# name of library file ("libzn_poly.so")
|
||||||
libbasename = "libzn_poly";
|
libbasename = "libzn_poly";
|
||||||
libext = stdenv.targetPlatform.extensions.sharedLibrary;
|
libext = stdenv.hostPlatform.extensions.sharedLibrary;
|
||||||
|
|
||||||
makeFlags = [ "CC=${stdenv.cc.targetPrefix}cc" ];
|
makeFlags = [ "CC=${stdenv.cc.targetPrefix}cc" ];
|
||||||
|
|
||||||
|
|
|
@ -8,7 +8,7 @@ stdenv.mkDerivation rec {
|
||||||
sha256 = "3c391f7e930c583095045cd2d10eb73a64f085c7fde9d260f2652c7cb3cfbe4a";
|
sha256 = "3c391f7e930c583095045cd2d10eb73a64f085c7fde9d260f2652c7cb3cfbe4a";
|
||||||
};
|
};
|
||||||
|
|
||||||
configureFlags = lib.optionals (stdenv.buildPlatform != stdenv.targetPlatform) [
|
configureFlags = lib.optionals (stdenv.buildPlatform != stdenv.hostPlatform) [
|
||||||
"lf_cv_sane_realloc=yes"
|
"lf_cv_sane_realloc=yes"
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
|
@ -22,7 +22,7 @@ tcl.mkTclDerivation {
|
||||||
substituteInPlace $file --replace "exec wish" "exec $out/bin/wish"
|
substituteInPlace $file --replace "exec wish" "exec $out/bin/wish"
|
||||||
done
|
done
|
||||||
''
|
''
|
||||||
+ lib.optionalString (stdenv.isDarwin && lib.versionOlder stdenv.targetPlatform.darwinMinVersion "11") ''
|
+ lib.optionalString (stdenv.isDarwin && lib.versionOlder stdenv.hostPlatform.darwinMinVersion "11") ''
|
||||||
substituteInPlace unix/configure* \
|
substituteInPlace unix/configure* \
|
||||||
--replace " -framework UniformTypeIdentifiers" ""
|
--replace " -framework UniformTypeIdentifiers" ""
|
||||||
'';
|
'';
|
||||||
|
|
|
@ -136,7 +136,7 @@ stdenv.mkDerivation rec {
|
||||||
++ lib.optional stdenv.isDarwin ''use_lld=false'';
|
++ lib.optional stdenv.isDarwin ''use_lld=false'';
|
||||||
|
|
||||||
env.NIX_CFLAGS_COMPILE = "-O2";
|
env.NIX_CFLAGS_COMPILE = "-O2";
|
||||||
FORCE_MAC_SDK_MIN = stdenv.targetPlatform.sdkVer or "10.12";
|
FORCE_MAC_SDK_MIN = stdenv.hostPlatform.sdkVer or "10.12";
|
||||||
|
|
||||||
nativeBuildInputs = [
|
nativeBuildInputs = [
|
||||||
myGn
|
myGn
|
||||||
|
|
|
@ -36,7 +36,7 @@ plugins: let
|
||||||
$CC -shared -fPIC ${source} -o "$out/lib/libvapoursynth-nix-plugins${ext}"
|
$CC -shared -fPIC ${source} -o "$out/lib/libvapoursynth-nix-plugins${ext}"
|
||||||
'';
|
'';
|
||||||
|
|
||||||
ext = stdenv.targetPlatform.extensions.sharedLibrary;
|
ext = stdenv.hostPlatform.extensions.sharedLibrary;
|
||||||
in
|
in
|
||||||
runCommand "${vapoursynth.name}-with-plugins" {
|
runCommand "${vapoursynth.name}-with-plugins" {
|
||||||
nativeBuildInputs = [ makeWrapper ];
|
nativeBuildInputs = [ makeWrapper ];
|
||||||
|
|
|
@ -9,7 +9,7 @@ stdenv.mkDerivation rec {
|
||||||
version = "1.32";
|
version = "1.32";
|
||||||
|
|
||||||
# https://gitlab.freedesktop.org/wayland/wayland-protocols/-/issues/48
|
# https://gitlab.freedesktop.org/wayland/wayland-protocols/-/issues/48
|
||||||
doCheck = stdenv.hostPlatform == stdenv.buildPlatform && stdenv.targetPlatform.linker == "bfd" && wayland.withLibraries;
|
doCheck = stdenv.hostPlatform == stdenv.buildPlatform && stdenv.hostPlatform.linker == "bfd" && wayland.withLibraries;
|
||||||
|
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = "https://gitlab.freedesktop.org/wayland/${pname}/-/releases/${version}/downloads/${pname}-${version}.tar.xz";
|
url = "https://gitlab.freedesktop.org/wayland/${pname}/-/releases/${version}/downloads/${pname}-${version}.tar.xz";
|
||||||
|
|
|
@ -19,7 +19,7 @@ buildPythonPackage rec {
|
||||||
setuptools
|
setuptools
|
||||||
];
|
];
|
||||||
|
|
||||||
postFixup = lib.optionalString (!stdenv.targetPlatform.isWindows) ''
|
postFixup = lib.optionalString (!stdenv.hostPlatform.isWindows) ''
|
||||||
find $out -name '*.exe' -delete
|
find $out -name '*.exe' -delete
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
|
|
@ -136,8 +136,8 @@ let
|
||||||
|
|
||||||
arch =
|
arch =
|
||||||
# KeyError: ('Linux', 'arm64')
|
# KeyError: ('Linux', 'arm64')
|
||||||
if stdenv.targetPlatform.isLinux && stdenv.targetPlatform.linuxArch == "arm64" then "aarch64"
|
if stdenv.hostPlatform.isLinux && stdenv.hostPlatform.linuxArch == "arm64" then "aarch64"
|
||||||
else stdenv.targetPlatform.linuxArch;
|
else stdenv.hostPlatform.linuxArch;
|
||||||
|
|
||||||
bazel-build = buildBazelPackage rec {
|
bazel-build = buildBazelPackage rec {
|
||||||
name = "bazel-build-${pname}-${version}";
|
name = "bazel-build-${pname}-${version}";
|
||||||
|
@ -219,7 +219,7 @@ let
|
||||||
build --python_path="${python}/bin/python"
|
build --python_path="${python}/bin/python"
|
||||||
build --distinct_host_configuration=false
|
build --distinct_host_configuration=false
|
||||||
build --define PROTOBUF_INCLUDE_PATH="${pkgs.protobuf}/include"
|
build --define PROTOBUF_INCLUDE_PATH="${pkgs.protobuf}/include"
|
||||||
'' + lib.optionalString (stdenv.targetPlatform.avxSupport && stdenv.targetPlatform.isUnix) ''
|
'' + lib.optionalString (stdenv.hostPlatform.avxSupport && stdenv.hostPlatform.isUnix) ''
|
||||||
build --config=avx_posix
|
build --config=avx_posix
|
||||||
'' + lib.optionalString mklSupport ''
|
'' + lib.optionalString mklSupport ''
|
||||||
build --config=mkl_open_source_only
|
build --config=mkl_open_source_only
|
||||||
|
@ -298,13 +298,13 @@ let
|
||||||
inherit meta;
|
inherit meta;
|
||||||
};
|
};
|
||||||
platformTag =
|
platformTag =
|
||||||
if stdenv.targetPlatform.isLinux then
|
if stdenv.hostPlatform.isLinux then
|
||||||
"manylinux2014_${arch}"
|
"manylinux2014_${arch}"
|
||||||
else if stdenv.system == "x86_64-darwin" then
|
else if stdenv.system == "x86_64-darwin" then
|
||||||
"macosx_10_9_${arch}"
|
"macosx_10_9_${arch}"
|
||||||
else if stdenv.system == "aarch64-darwin" then
|
else if stdenv.system == "aarch64-darwin" then
|
||||||
"macosx_11_0_${arch}"
|
"macosx_11_0_${arch}"
|
||||||
else throw "Unsupported target platform: ${stdenv.targetPlatform}";
|
else throw "Unsupported target platform: ${stdenv.hostPlatform}";
|
||||||
|
|
||||||
in
|
in
|
||||||
buildPythonPackage {
|
buildPythonPackage {
|
||||||
|
|
|
@ -23,7 +23,7 @@ buildPythonPackage rec {
|
||||||
patches = [
|
patches = [
|
||||||
(substituteAll {
|
(substituteAll {
|
||||||
src = ./libportmidi-cdll.patch;
|
src = ./libportmidi-cdll.patch;
|
||||||
libportmidi = "${portmidi.out}/lib/libportmidi${stdenv.targetPlatform.extensions.sharedLibrary}";
|
libportmidi = "${portmidi.out}/lib/libportmidi${stdenv.hostPlatform.extensions.sharedLibrary}";
|
||||||
})
|
})
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
|
@ -27,7 +27,7 @@ buildPythonPackage rec {
|
||||||
postPatch = ''
|
postPatch = ''
|
||||||
substituteInPlace mpv.py \
|
substituteInPlace mpv.py \
|
||||||
--replace "sofile = ctypes.util.find_library('mpv')" \
|
--replace "sofile = ctypes.util.find_library('mpv')" \
|
||||||
'sofile = "${mpv}/lib/libmpv${stdenv.targetPlatform.extensions.sharedLibrary}"'
|
'sofile = "${mpv}/lib/libmpv${stdenv.hostPlatform.extensions.sharedLibrary}"'
|
||||||
'';
|
'';
|
||||||
|
|
||||||
# tests impure, will error if it can't load libmpv.so
|
# tests impure, will error if it can't load libmpv.so
|
||||||
|
|
|
@ -35,7 +35,7 @@ buildPythonPackage rec {
|
||||||
patches = [
|
patches = [
|
||||||
# mysql-connector overrides MACOSX_DEPLOYMENT_TARGET to 11.
|
# mysql-connector overrides MACOSX_DEPLOYMENT_TARGET to 11.
|
||||||
# This makes the installation with nixpkgs fail. I suspect, that's
|
# This makes the installation with nixpkgs fail. I suspect, that's
|
||||||
# because stdenv.targetPlatform.darwinSdkVersion is (currently) set to
|
# because stdenv.hostPlatform.darwinSdkVersion is (currently) set to
|
||||||
# 10.12. The patch reverts
|
# 10.12. The patch reverts
|
||||||
# https://github.com/mysql/mysql-connector-python/commit/d1e89fd3d7391084cdf35b0806cb5d2a4b413654
|
# https://github.com/mysql/mysql-connector-python/commit/d1e89fd3d7391084cdf35b0806cb5d2a4b413654
|
||||||
./0001-Revert-Fix-MacOS-wheels-platform-tag.patch
|
./0001-Revert-Fix-MacOS-wheels-platform-tag.patch
|
||||||
|
|
|
@ -26,7 +26,7 @@ buildPythonPackage rec {
|
||||||
|
|
||||||
# exe are only required when testpath is used on windows
|
# exe are only required when testpath is used on windows
|
||||||
# https://github.com/jupyter/testpath/blob/de8ca59539eb23b9781e55848b7d2646c8c61df9/testpath/commands.py#L128
|
# https://github.com/jupyter/testpath/blob/de8ca59539eb23b9781e55848b7d2646c8c61df9/testpath/commands.py#L128
|
||||||
preBuild = lib.optionalString (!stdenv.targetPlatform.isWindows) ''
|
preBuild = lib.optionalString (!stdenv.hostPlatform.isWindows) ''
|
||||||
rm testpath/cli-32.exe testpath/cli-64.exe
|
rm testpath/cli-32.exe testpath/cli-64.exe
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
|
|
@ -189,7 +189,7 @@ in buildPythonPackage rec {
|
||||||
''
|
''
|
||||||
# error: no member named 'aligned_alloc' in the global namespace; did you mean simply 'aligned_alloc'
|
# error: no member named 'aligned_alloc' in the global namespace; did you mean simply 'aligned_alloc'
|
||||||
# This lib overrided aligned_alloc hence the error message. Tltr: his function is linkable but not in header.
|
# This lib overrided aligned_alloc hence the error message. Tltr: his function is linkable but not in header.
|
||||||
+ lib.optionalString (stdenv.isDarwin && lib.versionOlder stdenv.targetPlatform.darwinSdkVersion "11.0") ''
|
+ lib.optionalString (stdenv.isDarwin && lib.versionOlder stdenv.hostPlatform.darwinSdkVersion "11.0") ''
|
||||||
substituteInPlace third_party/pocketfft/pocketfft_hdronly.h --replace '#if __cplusplus >= 201703L
|
substituteInPlace third_party/pocketfft/pocketfft_hdronly.h --replace '#if __cplusplus >= 201703L
|
||||||
inline void *aligned_alloc(size_t align, size_t size)' '#if __cplusplus >= 201703L && 0
|
inline void *aligned_alloc(size_t align, size_t size)' '#if __cplusplus >= 201703L && 0
|
||||||
inline void *aligned_alloc(size_t align, size_t size)'
|
inline void *aligned_alloc(size_t align, size_t size)'
|
||||||
|
|
|
@ -27,7 +27,7 @@
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
platformInfo = builtins.getAttr stdenv.targetPlatform.system platforms;
|
platformInfo = builtins.getAttr stdenv.hostPlatform.system platforms;
|
||||||
in
|
in
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
pname = "azure-functions-core-tools";
|
pname = "azure-functions-core-tools";
|
||||||
|
|
|
@ -28,7 +28,7 @@ stdenv.mkDerivation {
|
||||||
pname = "StaticSitesClient-${versionFlavor}";
|
pname = "StaticSitesClient-${versionFlavor}";
|
||||||
version = flavor.buildId;
|
version = flavor.buildId;
|
||||||
|
|
||||||
src = sources.${stdenv.targetPlatform.system} or (throw "Unsupported platform");
|
src = sources.${stdenv.hostPlatform.system} or (throw "Unsupported platform");
|
||||||
|
|
||||||
nativeBuildInputs = [
|
nativeBuildInputs = [
|
||||||
autoPatchelfHook
|
autoPatchelfHook
|
||||||
|
|
|
@ -37,7 +37,7 @@ buildGoModule rec {
|
||||||
"-s" "-w"
|
"-s" "-w"
|
||||||
"-X github.com/openfaas/faas-cli/version.GitCommit=ref/tags/${version}"
|
"-X github.com/openfaas/faas-cli/version.GitCommit=ref/tags/${version}"
|
||||||
"-X github.com/openfaas/faas-cli/version.Version=${version}"
|
"-X github.com/openfaas/faas-cli/version.Version=${version}"
|
||||||
"-X github.com/openfaas/faas-cli/commands.Platform=${faasPlatform stdenv.targetPlatform}"
|
"-X github.com/openfaas/faas-cli/commands.Platform=${faasPlatform stdenv.hostPlatform}"
|
||||||
];
|
];
|
||||||
|
|
||||||
nativeBuildInputs = [ makeWrapper installShellFiles ];
|
nativeBuildInputs = [ makeWrapper installShellFiles ];
|
||||||
|
|
|
@ -53,7 +53,7 @@ stdenv.mkDerivation {
|
||||||
] ++ optionals stdenv.isDarwin [
|
] ++ optionals stdenv.isDarwin [
|
||||||
"NATIVE=osx"
|
"NATIVE=osx"
|
||||||
"CLANG=1"
|
"CLANG=1"
|
||||||
"OSX_MIN=${stdenv.targetPlatform.darwinMinVersion}"
|
"OSX_MIN=${stdenv.hostPlatform.darwinMinVersion}"
|
||||||
];
|
];
|
||||||
|
|
||||||
postInstall = optionalString tiles
|
postInstall = optionalString tiles
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
let
|
let
|
||||||
platformSlug =
|
platformSlug =
|
||||||
if stdenv.targetPlatform.is32bit then
|
if stdenv.hostPlatform.is32bit then
|
||||||
"linux32" else "linux64";
|
"linux32" else "linux64";
|
||||||
inifile = "linux/v0.${dwarf-fortress.baseVersion}.${dwarf-fortress.patchVersion}_${platformSlug}.ini";
|
inifile = "linux/v0.${dwarf-fortress.baseVersion}.${dwarf-fortress.patchVersion}_${platformSlug}.ini";
|
||||||
|
|
||||||
|
|
|
@ -39,7 +39,7 @@ stdenv.mkDerivation rec {
|
||||||
description = "Puzzle game inspired by Oxyd on the Atari ST and Rock'n'Roll on the Amiga";
|
description = "Puzzle game inspired by Oxyd on the Atari ST and Rock'n'Roll on the Amiga";
|
||||||
license = with licenses; [ gpl2 free ]; # source + bundles libs + art
|
license = with licenses; [ gpl2 free ]; # source + bundles libs + art
|
||||||
platforms = platforms.unix;
|
platforms = platforms.unix;
|
||||||
broken = stdenv.targetPlatform.isDarwin;
|
broken = stdenv.hostPlatform.isDarwin;
|
||||||
maintainers = with maintainers; [ iblech ];
|
maintainers = with maintainers; [ iblech ];
|
||||||
homepage = "https://www.nongnu.org/enigma/";
|
homepage = "https://www.nongnu.org/enigma/";
|
||||||
};
|
};
|
||||||
|
|
|
@ -40,7 +40,7 @@ stdenv.mkDerivation rec {
|
||||||
# service would stop the socket and break subsequent socket activations.
|
# service would stop the socket and break subsequent socket activations.
|
||||||
# See https://github.com/apple/cups/issues/6005
|
# See https://github.com/apple/cups/issues/6005
|
||||||
sed -i '/PartOf=cups.service/d' scheduler/cups.socket.in
|
sed -i '/PartOf=cups.service/d' scheduler/cups.socket.in
|
||||||
'' + lib.optionalString (stdenv.isDarwin && lib.versionOlder stdenv.targetPlatform.darwinSdkVersion "12") ''
|
'' + lib.optionalString (stdenv.hostPlatform.isDarwin && lib.versionOlder stdenv.hostPlatform.darwinSdkVersion "12") ''
|
||||||
substituteInPlace backend/usb-darwin.c \
|
substituteInPlace backend/usb-darwin.c \
|
||||||
--replace "kIOMainPortDefault" "kIOMasterPortDefault"
|
--replace "kIOMainPortDefault" "kIOMasterPortDefault"
|
||||||
'';
|
'';
|
||||||
|
|
|
@ -26,9 +26,9 @@
|
||||||
|
|
||||||
let
|
let
|
||||||
system =
|
system =
|
||||||
if stdenv.targetPlatform.system == "x86_64-linux" then "intel"
|
if stdenv.hostPlatform.system == "x86_64-linux" then "intel"
|
||||||
else if stdenv.targetPlatform.system == "aarch64-linux" then "arm"
|
else if stdenv.hostPlatform.system == "aarch64-linux" then "arm"
|
||||||
else throw "Unsupported platform for Canon UFR2 Drivers: ${stdenv.targetPlatform.system}";
|
else throw "Unsupported platform for Canon UFR2 Drivers: ${stdenv.hostPlatform.system}";
|
||||||
ld64 = "${stdenv.cc}/nix-support/dynamic-linker";
|
ld64 = "${stdenv.cc}/nix-support/dynamic-linker";
|
||||||
libs = pkgs: lib.makeLibraryPath buildInputs;
|
libs = pkgs: lib.makeLibraryPath buildInputs;
|
||||||
|
|
||||||
|
|
|
@ -109,7 +109,7 @@ stdenv.mkDerivation (finalAttrs: {
|
||||||
-configuration Release \
|
-configuration Release \
|
||||||
-project MoltenVKShaderConverter.xcodeproj \
|
-project MoltenVKShaderConverter.xcodeproj \
|
||||||
-scheme MoltenVKShaderConverter \
|
-scheme MoltenVKShaderConverter \
|
||||||
-arch ${stdenv.targetPlatform.darwinArch}
|
-arch ${stdenv.hostPlatform.darwinArch}
|
||||||
declare -A products=( [MoltenVKShaderConverter]=bin [libMoltenVKShaderConverter.a]=lib )
|
declare -A products=( [MoltenVKShaderConverter]=bin [libMoltenVKShaderConverter.a]=lib )
|
||||||
for product in "''${!products[@]}"; do
|
for product in "''${!products[@]}"; do
|
||||||
cp MoltenVKShaderConverter-*/Build/Products/Release/$product "$build/''${products[$product]}/$product"
|
cp MoltenVKShaderConverter-*/Build/Products/Release/$product "$build/''${products[$product]}/$product"
|
||||||
|
@ -127,7 +127,7 @@ stdenv.mkDerivation (finalAttrs: {
|
||||||
-configuration Release \
|
-configuration Release \
|
||||||
-project MoltenVK.xcodeproj \
|
-project MoltenVK.xcodeproj \
|
||||||
-scheme MoltenVK-macOS \
|
-scheme MoltenVK-macOS \
|
||||||
-arch ${stdenv.targetPlatform.darwinArch}
|
-arch ${stdenv.hostPlatform.darwinArch}
|
||||||
cp MoltenVK-*/Build/Products/Release/dynamic/libMoltenVK.dylib "$build/lib/libMoltenVK.dylib"
|
cp MoltenVK-*/Build/Products/Release/dynamic/libMoltenVK.dylib "$build/lib/libMoltenVK.dylib"
|
||||||
popd
|
popd
|
||||||
'';
|
'';
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
let
|
let
|
||||||
|
|
||||||
choosePlatform =
|
choosePlatform =
|
||||||
let pname = stdenv.targetPlatform.parsed.cpu.name; in
|
let pname = stdenv.hostPlatform.parsed.cpu.name; in
|
||||||
pset: pset.${pname} or (throw "bionic-prebuilt: unsupported platform ${pname}");
|
pset: pset.${pname} or (throw "bionic-prebuilt: unsupported platform ${pname}");
|
||||||
|
|
||||||
prebuilt_crt = choosePlatform {
|
prebuilt_crt = choosePlatform {
|
||||||
|
@ -66,7 +66,7 @@ in
|
||||||
stdenvNoCC.mkDerivation rec {
|
stdenvNoCC.mkDerivation rec {
|
||||||
pname = "bionic-prebuilt";
|
pname = "bionic-prebuilt";
|
||||||
version = "ndk-release-r23";
|
version = "ndk-release-r23";
|
||||||
name = "${stdenv.targetPlatform.parsed.cpu.name}-${pname}-${version}";
|
name = "${stdenv.hostPlatform.parsed.cpu.name}-${pname}-${version}";
|
||||||
|
|
||||||
src = fetchzip {
|
src = fetchzip {
|
||||||
url = "https://android.googlesource.com/platform/bionic/+archive/00e8ce1142d8823b0d2fc8a98b40119b0f1f02cd.tar.gz";
|
url = "https://android.googlesource.com/platform/bionic/+archive/00e8ce1142d8823b0d2fc8a98b40119b0f1f02cd.tar.gz";
|
||||||
|
|
|
@ -88,9 +88,9 @@ stdenv.mkDerivation rec {
|
||||||
"PREFIX=$(out)"
|
"PREFIX=$(out)"
|
||||||
"ASCIIDOC=${buildPackages.asciidoc}/bin/asciidoc"
|
"ASCIIDOC=${buildPackages.asciidoc}/bin/asciidoc"
|
||||||
"XMLTO=${buildPackages.xmlto}/bin/xmlto"
|
"XMLTO=${buildPackages.xmlto}/bin/xmlto"
|
||||||
] ++ (lib.optionals (stdenv.buildPlatform != stdenv.targetPlatform) [
|
] ++ (lib.optionals (stdenv.buildPlatform != stdenv.hostPlatform) [
|
||||||
"ARCH=${linuxArchMapping."${stdenv.targetPlatform.linuxArch}"}"
|
"ARCH=${linuxArchMapping."${stdenv.hostPlatform.linuxArch}"}"
|
||||||
"CROSS_COMPILE=${stdenv.targetPlatform.config}-"
|
"CROSS_COMPILE=${stdenv.hostPlatform.config}-"
|
||||||
]);
|
]);
|
||||||
|
|
||||||
outputs = [ "out" "dev" "man" ];
|
outputs = [ "out" "dev" "man" ];
|
||||||
|
|
|
@ -12,7 +12,7 @@ stdenv.mkDerivation rec {
|
||||||
buildInputs = [ ncurses ];
|
buildInputs = [ ncurses ];
|
||||||
dontUnpack = true;
|
dontUnpack = true;
|
||||||
buildPhase = "${stdenv.cc.targetPrefix}cc -o nmon ${src} -g -O2 -D JFS -D GETUSER -Wall -D LARGEMEM -lncurses -lm -g -D ${
|
buildPhase = "${stdenv.cc.targetPrefix}cc -o nmon ${src} -g -O2 -D JFS -D GETUSER -Wall -D LARGEMEM -lncurses -lm -g -D ${
|
||||||
with stdenv.targetPlatform;
|
with stdenv.hostPlatform;
|
||||||
if isx86 then "X86"
|
if isx86 then "X86"
|
||||||
else if isAarch then "ARM"
|
else if isAarch then "ARM"
|
||||||
else if isPower then "POWER"
|
else if isPower then "POWER"
|
||||||
|
|
|
@ -18,7 +18,7 @@ stdenv.mkDerivation rec {
|
||||||
|
|
||||||
configureFlags = if !stdenv.isDarwin
|
configureFlags = if !stdenv.isDarwin
|
||||||
then [ "--with-libc=libc.so.6" ]
|
then [ "--with-libc=libc.so.6" ]
|
||||||
else [ "--with-libc=libc${stdenv.targetPlatform.extensions.sharedLibrary}" ];
|
else [ "--with-libc=libc${stdenv.hostPlatform.extensions.sharedLibrary}" ];
|
||||||
|
|
||||||
dontAddDisableDepTrack = stdenv.isDarwin;
|
dontAddDisableDepTrack = stdenv.isDarwin;
|
||||||
|
|
||||||
|
|
|
@ -83,7 +83,7 @@ unwrapped = stdenv.mkDerivation rec {
|
||||||
postInstall = ''
|
postInstall = ''
|
||||||
rm "$out"/lib/libkres.a
|
rm "$out"/lib/libkres.a
|
||||||
rm "$out"/lib/knot-resolver/upgrade-4-to-5.lua # not meaningful on NixOS
|
rm "$out"/lib/knot-resolver/upgrade-4-to-5.lua # not meaningful on NixOS
|
||||||
'' + optionalString stdenv.targetPlatform.isLinux ''
|
'' + optionalString stdenv.hostPlatform.isLinux ''
|
||||||
rm -r "$out"/lib/sysusers.d/ # ATM more likely to harm than help
|
rm -r "$out"/lib/sysusers.d/ # ATM more likely to harm than help
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
|
|
@ -59,7 +59,7 @@ mkYarnPackage rec {
|
||||||
buildPhase = ''
|
buildPhase = ''
|
||||||
runHook preBuild
|
runHook preBuild
|
||||||
cd deps/${pname}
|
cd deps/${pname}
|
||||||
napi build --target ${stdenv.targetPlatform.rust.rustcTargetSpec} --dts ../src/libRs.d.ts --release ./lib
|
napi build --target ${stdenv.hostPlatform.rust.rustcTargetSpec} --dts ../src/libRs.d.ts --release ./lib
|
||||||
yarn run build:app:fix-defs
|
yarn run build:app:fix-defs
|
||||||
yarn run build:app
|
yarn run build:app
|
||||||
yarn run build:web
|
yarn run build:web
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
{ stdenvNoCC, fetchurl, unzip, lib }:
|
{ stdenvNoCC, fetchurl, unzip, lib }:
|
||||||
|
|
||||||
{ pname, version, zipHash, meta ? {}, passthru ? {}, ... }@args:
|
{ pname, version, zipHash, meta ? {}, passthru ? {}, ... }@args:
|
||||||
let plat = stdenvNoCC.targetPlatform.system; in stdenvNoCC.mkDerivation ({
|
let plat = stdenvNoCC.hostPlatform.system; in stdenvNoCC.mkDerivation ({
|
||||||
inherit pname version;
|
inherit pname version;
|
||||||
|
|
||||||
src = if lib.isAttrs zipHash then
|
src = if lib.isAttrs zipHash then
|
||||||
|
|
|
@ -148,7 +148,7 @@ let
|
||||||
|
|
||||||
depsBuildBuild = [ buildPackages.stdenv.cc ];
|
depsBuildBuild = [ buildPackages.stdenv.cc ];
|
||||||
|
|
||||||
postPatch = lib.optionalString (stdenv.isDarwin && lib.versionOlder stdenv.targetPlatform.darwinSdkVersion "12.0") ''
|
postPatch = lib.optionalString (stdenv.isDarwin && lib.versionOlder stdenv.hostPlatform.darwinSdkVersion "12.0") ''
|
||||||
substituteInPlace src/output/plugins/OSXOutputPlugin.cxx \
|
substituteInPlace src/output/plugins/OSXOutputPlugin.cxx \
|
||||||
--replace kAudioObjectPropertyElement{Main,Master} \
|
--replace kAudioObjectPropertyElement{Main,Master} \
|
||||||
--replace kAudioHardwareServiceDeviceProperty_Virtual{Main,Master}Volume
|
--replace kAudioHardwareServiceDeviceProperty_Virtual{Main,Master}Volume
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
, alsa-lib
|
, alsa-lib
|
||||||
}:
|
}:
|
||||||
let
|
let
|
||||||
inherit (stdenv.targetPlatform) system;
|
inherit (stdenv.hostPlatform) system;
|
||||||
throwSystem = throw "Unsupported system: ${system}";
|
throwSystem = throw "Unsupported system: ${system}";
|
||||||
in
|
in
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
|
|
|
@ -15,12 +15,12 @@
|
||||||
, lzo
|
, lzo
|
||||||
, which
|
, which
|
||||||
, targetArchitecture ? null
|
, targetArchitecture ? null
|
||||||
, asmOptimizations ? gcc10Stdenv.targetPlatform.isx86
|
, asmOptimizations ? gcc10Stdenv.hostPlatform.isx86
|
||||||
}:
|
}:
|
||||||
|
|
||||||
let
|
let
|
||||||
defaultTargetArchitecture =
|
defaultTargetArchitecture =
|
||||||
if gcc10Stdenv.targetPlatform.isx86
|
if gcc10Stdenv.hostPlatform.isx86
|
||||||
then "haswell"
|
then "haswell"
|
||||||
else "core";
|
else "core";
|
||||||
|
|
||||||
|
@ -72,7 +72,7 @@ gcc10Stdenv.mkDerivation rec {
|
||||||
"-DTARGET_ARCHITECTURE=${targetArch}"
|
"-DTARGET_ARCHITECTURE=${targetArch}"
|
||||||
] ++ lib.optionals asmOptimizations [
|
] ++ lib.optionals asmOptimizations [
|
||||||
"-DASM_OPTIMIZATIONS=ON"
|
"-DASM_OPTIMIZATIONS=ON"
|
||||||
"-DHAVE_SSE42=${if gcc10Stdenv.targetPlatform.sse4_2Support then "ON" else "OFF"}"
|
"-DHAVE_SSE42=${if gcc10Stdenv.hostPlatform.sse4_2Support then "ON" else "OFF"}"
|
||||||
];
|
];
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
, config
|
, config
|
||||||
, enableCfp ? true
|
, enableCfp ? true
|
||||||
, enableCuda ? config.cudaSupport
|
, enableCuda ? config.cudaSupport
|
||||||
, enableFortran ? builtins.elem stdenv.targetPlatform.system gfortran.meta.platforms
|
, enableFortran ? builtins.elem stdenv.hostPlatform.system gfortran.meta.platforms
|
||||||
, enableOpenMP ? true
|
, enableOpenMP ? true
|
||||||
, enablePython ? true
|
, enablePython ? true
|
||||||
, enableUtilities ? true }:
|
, enableUtilities ? true }:
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
, dotnetCorePackages ? pkgs.dotnetCorePackages
|
, dotnetCorePackages ? pkgs.dotnetCorePackages
|
||||||
, openssl ? pkgs.openssl
|
, openssl ? pkgs.openssl
|
||||||
, zlib ? pkgs.zlib
|
, zlib ? pkgs.zlib
|
||||||
, targetPlatform ? pkgs.targetPlatform
|
, hostPlatform ? stdenv.hostPlatform
|
||||||
}:
|
}:
|
||||||
|
|
||||||
buildDotnetModule rec {
|
buildDotnetModule rec {
|
||||||
|
@ -30,7 +30,7 @@ buildDotnetModule rec {
|
||||||
patches = [ ./add-runtime-identifier.patch ];
|
patches = [ ./add-runtime-identifier.patch ];
|
||||||
postPatch = ''
|
postPatch = ''
|
||||||
substituteInPlace pocket_updater.csproj \
|
substituteInPlace pocket_updater.csproj \
|
||||||
--replace @RuntimeIdentifier@ "${dotnetCorePackages.systemToDotnetRid targetPlatform.system}"
|
--replace @RuntimeIdentifier@ "${dotnetCorePackages.systemToDotnetRid hostPlatform.system}"
|
||||||
'';
|
'';
|
||||||
|
|
||||||
projectFile = "pocket_updater.csproj";
|
projectFile = "pocket_updater.csproj";
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
|
|
||||||
let
|
let
|
||||||
|
|
||||||
inherit (stdenv.targetPlatform) system;
|
inherit (stdenv.hostPlatform) system;
|
||||||
throwSystem = throw "Unsupported system: ${system}";
|
throwSystem = throw "Unsupported system: ${system}";
|
||||||
|
|
||||||
target = {
|
target = {
|
||||||
|
|
|
@ -27,7 +27,7 @@
|
||||||
# the second feature flag is passed to the rdkafka dependency
|
# the second feature flag is passed to the rdkafka dependency
|
||||||
# building on linux fails without this feature flag (both x86_64 and AArch64)
|
# building on linux fails without this feature flag (both x86_64 and AArch64)
|
||||||
++ lib.optionals enableKafka [ "rdkafka?/gssapi-vendored" ]
|
++ lib.optionals enableKafka [ "rdkafka?/gssapi-vendored" ]
|
||||||
++ lib.optional stdenv.targetPlatform.isUnix "unix")
|
++ lib.optional stdenv.hostPlatform.isUnix "unix")
|
||||||
, nixosTests
|
, nixosTests
|
||||||
, nix-update-script
|
, nix-update-script
|
||||||
}:
|
}:
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
, fetchFromGitHub
|
, fetchFromGitHub
|
||||||
, nixosTests
|
, nixosTests
|
||||||
, rustPlatform
|
, rustPlatform
|
||||||
, targetPlatform
|
, hostPlatform
|
||||||
, installShellFiles
|
, installShellFiles
|
||||||
, cmake
|
, cmake
|
||||||
, libsodium
|
, libsodium
|
||||||
|
@ -32,7 +32,7 @@ rustPlatform.buildRustPackage rec {
|
||||||
|
|
||||||
# nix defaults to building for aarch64 _without_ the armv8-a
|
# nix defaults to building for aarch64 _without_ the armv8-a
|
||||||
# crypto extensions, but liboqs depends on these
|
# crypto extensions, but liboqs depends on these
|
||||||
preBuild = lib.optionalString targetPlatform.isAarch64 ''
|
preBuild = lib.optionalString hostPlatform.isAarch64 ''
|
||||||
NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -march=armv8-a+crypto"
|
NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -march=armv8-a+crypto"
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
|
|
@ -44,7 +44,7 @@ stdenv.mkDerivation rec {
|
||||||
SITEURL = "https://www.blackmagicdesign.com/api/register/us/download/${DOWNLOADID}";
|
SITEURL = "https://www.blackmagicdesign.com/api/register/us/download/${DOWNLOADID}";
|
||||||
|
|
||||||
USERAGENT = builtins.concatStringsSep " " [
|
USERAGENT = builtins.concatStringsSep " " [
|
||||||
"User-Agent: Mozilla/5.0 (X11; Linux ${stdenv.targetPlatform.linuxArch})"
|
"User-Agent: Mozilla/5.0 (X11; Linux ${stdenv.hostPlatform.linuxArch})"
|
||||||
"AppleWebKit/537.36 (KHTML, like Gecko)"
|
"AppleWebKit/537.36 (KHTML, like Gecko)"
|
||||||
"Chrome/77.0.3865.75"
|
"Chrome/77.0.3865.75"
|
||||||
"Safari/537.36"
|
"Safari/537.36"
|
||||||
|
|
Loading…
Reference in New Issue
Block a user