mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-25 00:12:56 +00:00
treewide: stdenv.is -> stdenv.hostPlatform.is (#356363)
* treewide: stdenv.is -> stdenv.hostPlatform.is * treewide: nixfmt due to ci error
This commit is contained in:
parent
0fdc9185d8
commit
e13831335f
@ -57,7 +57,7 @@ rec {
|
|||||||
throwUnsupportedGuestSystem = guestMap:
|
throwUnsupportedGuestSystem = guestMap:
|
||||||
throw "Unsupported guest system ${guestSystem} for host ${hostSystem}, supported: ${lib.concatStringsSep ", " (lib.attrNames guestMap)}";
|
throw "Unsupported guest system ${guestSystem} for host ${hostSystem}, supported: ${lib.concatStringsSep ", " (lib.attrNames guestMap)}";
|
||||||
in
|
in
|
||||||
if hostStdenv.isLinux then
|
if hostStdenv.hostPlatform.isLinux then
|
||||||
linuxHostGuestMatrix.${guestSystem} or "${qemuPkg}/bin/qemu-kvm"
|
linuxHostGuestMatrix.${guestSystem} or "${qemuPkg}/bin/qemu-kvm"
|
||||||
else
|
else
|
||||||
let
|
let
|
||||||
|
@ -69,48 +69,50 @@ stdenv.mkDerivation (finalAttrs: {
|
|||||||
wrapQtAppsHook
|
wrapQtAppsHook
|
||||||
];
|
];
|
||||||
|
|
||||||
buildInputs = [
|
buildInputs =
|
||||||
airspy
|
[
|
||||||
airspyhf
|
airspy
|
||||||
aptdec
|
airspyhf
|
||||||
boost
|
aptdec
|
||||||
cm256cc
|
boost
|
||||||
codec2
|
cm256cc
|
||||||
dab_lib
|
codec2
|
||||||
dsdcc
|
dab_lib
|
||||||
faad2
|
dsdcc
|
||||||
ffmpeg
|
faad2
|
||||||
fftwFloat
|
ffmpeg
|
||||||
flac
|
fftwFloat
|
||||||
glew
|
flac
|
||||||
hackrf
|
glew
|
||||||
hidapi
|
hackrf
|
||||||
libbladeRF
|
hidapi
|
||||||
libiio
|
libbladeRF
|
||||||
libopus
|
libiio
|
||||||
libpulseaudio
|
libopus
|
||||||
libusb1
|
libpulseaudio
|
||||||
limesuite
|
libusb1
|
||||||
mbelib
|
limesuite
|
||||||
opencv4
|
mbelib
|
||||||
qt5compat
|
opencv4
|
||||||
qtcharts
|
qt5compat
|
||||||
qtdeclarative
|
qtcharts
|
||||||
qtlocation
|
qtdeclarative
|
||||||
qtmultimedia
|
qtlocation
|
||||||
qtscxml
|
qtmultimedia
|
||||||
qtserialport
|
qtscxml
|
||||||
qtspeech
|
qtserialport
|
||||||
qttools
|
qtspeech
|
||||||
qtwebsockets
|
qttools
|
||||||
qtwebengine
|
qtwebsockets
|
||||||
rtl-sdr
|
qtwebengine
|
||||||
serialdv
|
rtl-sdr
|
||||||
sgp4
|
serialdv
|
||||||
soapysdr-with-plugins
|
sgp4
|
||||||
uhd
|
soapysdr-with-plugins
|
||||||
zlib
|
uhd
|
||||||
] ++ lib.optionals stdenv.isLinux [ qtwayland ] ++ lib.optionals withSDRplay [ sdrplay ];
|
zlib
|
||||||
|
]
|
||||||
|
++ lib.optionals stdenv.hostPlatform.isLinux [ qtwayland ] ++ lib.optionals withSDRplay [ sdrplay ];
|
||||||
|
|
||||||
cmakeFlags = [
|
cmakeFlags = [
|
||||||
"-DAPT_DIR=${aptdec}"
|
"-DAPT_DIR=${aptdec}"
|
||||||
|
@ -230,7 +230,7 @@ stdenv.mkDerivation rec {
|
|||||||
|
|
||||||
# workaround for
|
# workaround for
|
||||||
# https://github.com/root-project/root/issues/14778
|
# https://github.com/root-project/root/issues/14778
|
||||||
env.NIX_LDFLAGS = lib.optionalString (!stdenv.isDarwin) "--version-script,${writeText "version.map" "ROOT { global: *; };"}";
|
env.NIX_LDFLAGS = lib.optionalString (!stdenv.hostPlatform.isDarwin) "--version-script,${writeText "version.map" "ROOT { global: *; };"}";
|
||||||
|
|
||||||
# To use the debug information on the fly (without installation)
|
# To use the debug information on the fly (without installation)
|
||||||
# add the outPath of root.debug into NIX_DEBUG_INFO_DIRS (in PATH-like format)
|
# add the outPath of root.debug into NIX_DEBUG_INFO_DIRS (in PATH-like format)
|
||||||
|
@ -104,7 +104,7 @@ assert useSysroot -> !(args.doCheck or true);
|
|||||||
|
|
||||||
stdenv.mkDerivation ((removeAttrs args [ "depsExtraArgs" "cargoUpdateHook" "cargoLock" ]) // lib.optionalAttrs useSysroot {
|
stdenv.mkDerivation ((removeAttrs args [ "depsExtraArgs" "cargoUpdateHook" "cargoLock" ]) // lib.optionalAttrs useSysroot {
|
||||||
RUSTFLAGS = "--sysroot ${sysroot} " + (args.RUSTFLAGS or "");
|
RUSTFLAGS = "--sysroot ${sysroot} " + (args.RUSTFLAGS or "");
|
||||||
} // lib.optionalAttrs (stdenv.isDarwin && buildType == "debug") {
|
} // lib.optionalAttrs (stdenv.hostPlatform.isDarwin && buildType == "debug") {
|
||||||
RUSTFLAGS =
|
RUSTFLAGS =
|
||||||
"-C split-debuginfo=packed "
|
"-C split-debuginfo=packed "
|
||||||
+ lib.optionalString useSysroot "--sysroot ${sysroot} "
|
+ lib.optionalString useSysroot "--sysroot ${sysroot} "
|
||||||
|
@ -27,7 +27,7 @@ stdenv.mkDerivation {
|
|||||||
makeFlags = [ "all" ];
|
makeFlags = [ "all" ];
|
||||||
|
|
||||||
# remove darwin-only linker flag on linux
|
# remove darwin-only linker flag on linux
|
||||||
postPatch = lib.optionalString (!stdenv.isDarwin) ''
|
postPatch = lib.optionalString (!stdenv.hostPlatform.isDarwin) ''
|
||||||
substituteInPlace scripts/pybind.sh \
|
substituteInPlace scripts/pybind.sh \
|
||||||
--replace-fail " -undefined dynamic_lookup" ""
|
--replace-fail " -undefined dynamic_lookup" ""
|
||||||
'';
|
'';
|
||||||
|
@ -28,8 +28,8 @@ rustPlatform.buildRustPackage rec {
|
|||||||
|
|
||||||
buildInputs =
|
buildInputs =
|
||||||
[ sqlite ]
|
[ sqlite ]
|
||||||
++ lib.optionals stdenv.isLinux [ openssl ]
|
++ lib.optionals stdenv.hostPlatform.isLinux [ openssl ]
|
||||||
++ lib.optionals stdenv.isDarwin (
|
++ lib.optionals stdenv.hostPlatform.isDarwin (
|
||||||
with darwin.apple_sdk.frameworks;
|
with darwin.apple_sdk.frameworks;
|
||||||
[
|
[
|
||||||
CoreServices
|
CoreServices
|
||||||
|
@ -51,7 +51,7 @@ buildGoModule {
|
|||||||
[
|
[
|
||||||
"TestServeIndex" # Fails with handler returned wrong content encoding
|
"TestServeIndex" # Fails with handler returned wrong content encoding
|
||||||
]
|
]
|
||||||
++ lib.optionals stdenv.isDarwin [
|
++ lib.optionals stdenv.hostPlatform.isDarwin [
|
||||||
"TestBackup" # relies on ionice
|
"TestBackup" # relies on ionice
|
||||||
];
|
];
|
||||||
in
|
in
|
||||||
|
@ -18,9 +18,9 @@ rustPlatform.buildRustPackage rec {
|
|||||||
|
|
||||||
cargoHash = "sha256-EGqoHMkBPIhKV/PozArQ62bH/Gqc92S6ZabTjmIbQeE=";
|
cargoHash = "sha256-EGqoHMkBPIhKV/PozArQ62bH/Gqc92S6ZabTjmIbQeE=";
|
||||||
|
|
||||||
buildNoDefaultFeatures = !stdenv.isLinux;
|
buildNoDefaultFeatures = !stdenv.hostPlatform.isLinux;
|
||||||
|
|
||||||
buildInputs = lib.optionals stdenv.isDarwin (
|
buildInputs = lib.optionals stdenv.hostPlatform.isDarwin (
|
||||||
with darwin.apple_sdk.frameworks;
|
with darwin.apple_sdk.frameworks;
|
||||||
[
|
[
|
||||||
AppKit
|
AppKit
|
||||||
|
@ -167,7 +167,7 @@ in buildNpmPackage rec {
|
|||||||
|
|
||||||
mkdir $out
|
mkdir $out
|
||||||
|
|
||||||
pushd apps/desktop/dist/linux-${lib.optionalString stdenv.isAarch64 "arm64-"}unpacked
|
pushd apps/desktop/dist/linux-${lib.optionalString stdenv.hostPlatform.isAarch64 "arm64-"}unpacked
|
||||||
mkdir -p $out/opt/Bitwarden
|
mkdir -p $out/opt/Bitwarden
|
||||||
cp -r locales resources{,.pak} $out/opt/Bitwarden
|
cp -r locales resources{,.pak} $out/opt/Bitwarden
|
||||||
popd
|
popd
|
||||||
|
@ -50,7 +50,7 @@ stdenv.mkDerivation (finalAttrs: {
|
|||||||
|
|
||||||
buildInputs =
|
buildInputs =
|
||||||
[ openssl ]
|
[ openssl ]
|
||||||
++ lib.optionals stdenv.isLinux [
|
++ lib.optionals stdenv.hostPlatform.isLinux [
|
||||||
glib-networking
|
glib-networking
|
||||||
libayatana-appindicator
|
libayatana-appindicator
|
||||||
webkitgtk_4_1
|
webkitgtk_4_1
|
||||||
|
@ -34,7 +34,7 @@ buildNpmPackage rec {
|
|||||||
makeWrapper
|
makeWrapper
|
||||||
electron
|
electron
|
||||||
pkg-config
|
pkg-config
|
||||||
] ++ lib.optional stdenv.isLinux autoPatchelfHook; # for onnx libs
|
] ++ lib.optional stdenv.hostPlatform.isLinux autoPatchelfHook; # for onnx libs
|
||||||
|
|
||||||
buildInputs = [
|
buildInputs = [
|
||||||
(lib.getLib stdenv.cc.cc) # for libstdc++.so, required by onnxruntime
|
(lib.getLib stdenv.cc.cc) # for libstdc++.so, required by onnxruntime
|
||||||
|
@ -19,7 +19,7 @@ rustPlatform.buildRustPackage rec {
|
|||||||
|
|
||||||
cargoHash = "sha256-IP9x3n5RdI+TKOhMBWEfw9P2CROcC0SmEsmMVaXjiDE=";
|
cargoHash = "sha256-IP9x3n5RdI+TKOhMBWEfw9P2CROcC0SmEsmMVaXjiDE=";
|
||||||
|
|
||||||
buildInputs = lib.optionals (stdenv.isDarwin) [
|
buildInputs = lib.optionals (stdenv.hostPlatform.isDarwin) [
|
||||||
darwin.apple_sdk.frameworks.Security
|
darwin.apple_sdk.frameworks.Security
|
||||||
];
|
];
|
||||||
|
|
||||||
|
@ -19,7 +19,7 @@ rustPlatform.buildRustPackage rec {
|
|||||||
|
|
||||||
cargoHash = "sha256-oNX1MUpOjRG02FHOU7zpktLAYKu/1+R2d96jC/VA0co=";
|
cargoHash = "sha256-oNX1MUpOjRG02FHOU7zpktLAYKu/1+R2d96jC/VA0co=";
|
||||||
|
|
||||||
buildInputs = lib.optionals (stdenv.isDarwin) [
|
buildInputs = lib.optionals (stdenv.hostPlatform.isDarwin) [
|
||||||
darwin.apple_sdk_11_0.frameworks.AppKit
|
darwin.apple_sdk_11_0.frameworks.AppKit
|
||||||
];
|
];
|
||||||
|
|
||||||
|
@ -100,7 +100,7 @@ stdenv.mkDerivation (finalAttrs: {
|
|||||||
bison
|
bison
|
||||||
libsrs2
|
libsrs2
|
||||||
]
|
]
|
||||||
++ lib.optionals stdenv.isLinux [ libcap ]
|
++ lib.optionals stdenv.hostPlatform.isLinux [ libcap ]
|
||||||
++ lib.optionals (enableHttp || enableCalalarmd || enableJMAP) [
|
++ lib.optionals (enableHttp || enableCalalarmd || enableJMAP) [
|
||||||
brotli.dev
|
brotli.dev
|
||||||
libical.dev
|
libical.dev
|
||||||
@ -130,7 +130,7 @@ stdenv.mkDerivation (finalAttrs: {
|
|||||||
cyrus_sasl
|
cyrus_sasl
|
||||||
]
|
]
|
||||||
# Darwin doesn't have libuuid, try to build without it
|
# Darwin doesn't have libuuid, try to build without it
|
||||||
++ lib.optional (!stdenv.isDarwin) libuuid;
|
++ lib.optional (!stdenv.hostPlatform.isDarwin) libuuid;
|
||||||
imapLibs = managesieveLibs ++ [ pcre2 ];
|
imapLibs = managesieveLibs ++ [ pcre2 ];
|
||||||
mkLibsString = lib.strings.concatMapStringsSep " " (l: "-L${lib.getLib l}/lib");
|
mkLibsString = lib.strings.concatMapStringsSep " " (l: "-L${lib.getLib l}/lib");
|
||||||
in
|
in
|
||||||
|
@ -23,7 +23,7 @@ stdenv.mkDerivation {
|
|||||||
|
|
||||||
meta = {
|
meta = {
|
||||||
platforms = lib.platforms.all;
|
platforms = lib.platforms.all;
|
||||||
broken = stdenv.isDarwin;
|
broken = stdenv.hostPlatform.isDarwin;
|
||||||
description = "A disk usage calculator for Linux";
|
description = "A disk usage calculator for Linux";
|
||||||
homepage = "https://codeberg.org/201984/dut";
|
homepage = "https://codeberg.org/201984/dut";
|
||||||
license = lib.licenses.gpl3;
|
license = lib.licenses.gpl3;
|
||||||
|
@ -62,7 +62,7 @@ buildGoModule {
|
|||||||
|
|
||||||
passthru = {
|
passthru = {
|
||||||
# only works on linux, see comment above about ENTE_CLI_SECRETS_PATH on darwin
|
# only works on linux, see comment above about ENTE_CLI_SECRETS_PATH on darwin
|
||||||
tests.version = lib.optionalAttrs stdenv.isLinux (
|
tests.version = lib.optionalAttrs stdenv.hostPlatform.isLinux (
|
||||||
testers.testVersion {
|
testers.testVersion {
|
||||||
package = ente-cli;
|
package = ente-cli;
|
||||||
command = ''
|
command = ''
|
||||||
|
@ -5,9 +5,12 @@
|
|||||||
autoPatchelfHook,
|
autoPatchelfHook,
|
||||||
}:
|
}:
|
||||||
let
|
let
|
||||||
arch = if stdenv.isAarch64 then "aarch64" else "x86_64";
|
arch = if stdenv.hostPlatform.isAarch64 then "aarch64" else "x86_64";
|
||||||
release =
|
release =
|
||||||
if stdenv.isDarwin then "macos-${arch}-apple-darwin" else "linux-${arch}-unknown-linux-gnu";
|
if stdenv.hostPlatform.isDarwin then
|
||||||
|
"macos-${arch}-apple-darwin"
|
||||||
|
else
|
||||||
|
"linux-${arch}-unknown-linux-gnu";
|
||||||
|
|
||||||
hashes = {
|
hashes = {
|
||||||
linux-aarch64-unknown-linux-gnu = "sha256-vWMrq/uFU/uyuDnsxZK0ZyvtraVCZwvGjzO1a5QjR8g=";
|
linux-aarch64-unknown-linux-gnu = "sha256-vWMrq/uFU/uyuDnsxZK0ZyvtraVCZwvGjzO1a5QjR8g=";
|
||||||
|
@ -63,7 +63,7 @@ python3Packages.buildPythonApplication {
|
|||||||
];
|
];
|
||||||
|
|
||||||
# Tests require `mlx` which is not supported on linux.
|
# Tests require `mlx` which is not supported on linux.
|
||||||
doCheck = stdenv.isDarwin;
|
doCheck = stdenv.hostPlatform.isDarwin;
|
||||||
|
|
||||||
passthru = {
|
passthru = {
|
||||||
updateScript = unstableGitUpdater {
|
updateScript = unstableGitUpdater {
|
||||||
|
@ -49,7 +49,7 @@ stdenv.mkDerivation rec {
|
|||||||
pkg-config
|
pkg-config
|
||||||
cmake
|
cmake
|
||||||
]
|
]
|
||||||
++ lib.optionals stdenv.isLinux [
|
++ lib.optionals stdenv.hostPlatform.isLinux [
|
||||||
copyDesktopItems
|
copyDesktopItems
|
||||||
imagemagick
|
imagemagick
|
||||||
];
|
];
|
||||||
@ -60,12 +60,12 @@ stdenv.mkDerivation rec {
|
|||||||
openssl
|
openssl
|
||||||
zlib
|
zlib
|
||||||
]
|
]
|
||||||
++ lib.optionals stdenv.isLinux [
|
++ lib.optionals stdenv.hostPlatform.isLinux [
|
||||||
xterm
|
xterm
|
||||||
udev
|
udev
|
||||||
pcsclite
|
pcsclite
|
||||||
]
|
]
|
||||||
++ lib.optionals stdenv.isDarwin [
|
++ lib.optionals stdenv.hostPlatform.isDarwin [
|
||||||
libuv
|
libuv
|
||||||
libsolv
|
libsolv
|
||||||
libcouchbase
|
libcouchbase
|
||||||
@ -80,23 +80,23 @@ stdenv.mkDerivation rec {
|
|||||||
substituteInPlace ./src/libfido2.pc.in \
|
substituteInPlace ./src/libfido2.pc.in \
|
||||||
--replace-fail "\''${prefix}/@CMAKE_INSTALL_LIBDIR@" "@CMAKE_INSTALL_FULL_LIBDIR@"
|
--replace-fail "\''${prefix}/@CMAKE_INSTALL_LIBDIR@" "@CMAKE_INSTALL_FULL_LIBDIR@"
|
||||||
''
|
''
|
||||||
+ lib.optionalString stdenv.isDarwin ''
|
+ lib.optionalString stdenv.hostPlatform.isDarwin ''
|
||||||
substituteInPlace ./CMakeLists.txt \
|
substituteInPlace ./CMakeLists.txt \
|
||||||
--replace-fail "/\''${CMAKE_INSTALL_LIBDIR}" "/lib"
|
--replace-fail "/\''${CMAKE_INSTALL_LIBDIR}" "/lib"
|
||||||
'';
|
'';
|
||||||
|
|
||||||
postInstall =
|
postInstall =
|
||||||
lib.optionalString stdenv.isLinux ''
|
lib.optionalString stdenv.hostPlatform.isLinux ''
|
||||||
install $src/fido2-manage.sh $out/bin/fido2-manage
|
install $src/fido2-manage.sh $out/bin/fido2-manage
|
||||||
magick ${icon} -background none -gravity center -extent 512x512 token2.png
|
magick ${icon} -background none -gravity center -extent 512x512 token2.png
|
||||||
install -Dm444 token2.png $out/share/icons/hicolor/512x512/apps/token2.png
|
install -Dm444 token2.png $out/share/icons/hicolor/512x512/apps/token2.png
|
||||||
install $src/gui.py $out/bin/fido2-manage-gui
|
install $src/gui.py $out/bin/fido2-manage-gui
|
||||||
''
|
''
|
||||||
+ lib.optionalString stdenv.isDarwin ''
|
+ lib.optionalString stdenv.hostPlatform.isDarwin ''
|
||||||
install $src/fido2-manage-mac.sh $out/bin/fido2-manage
|
install $src/fido2-manage-mac.sh $out/bin/fido2-manage
|
||||||
'';
|
'';
|
||||||
|
|
||||||
desktopItems = lib.optionals stdenv.isLinux [
|
desktopItems = lib.optionals stdenv.hostPlatform.isLinux [
|
||||||
(makeDesktopItem rec {
|
(makeDesktopItem rec {
|
||||||
desktopName = "Fido2 Manager";
|
desktopName = "Fido2 Manager";
|
||||||
name = "fido2-manage";
|
name = "fido2-manage";
|
||||||
@ -116,7 +116,7 @@ stdenv.mkDerivation rec {
|
|||||||
--replace-fail "./fido2-manage.sh" "fido2-manage" \
|
--replace-fail "./fido2-manage.sh" "fido2-manage" \
|
||||||
--replace-fail "awk" "${gawk}/bin/awk"
|
--replace-fail "awk" "${gawk}/bin/awk"
|
||||||
''
|
''
|
||||||
+ lib.optionalString stdenv.isLinux ''
|
+ lib.optionalString stdenv.hostPlatform.isLinux ''
|
||||||
substituteInPlace $out/bin/fido2-manage-gui \
|
substituteInPlace $out/bin/fido2-manage-gui \
|
||||||
--replace-fail "./fido2-manage.sh" "$out/bin/fido2-manage" \
|
--replace-fail "./fido2-manage.sh" "$out/bin/fido2-manage" \
|
||||||
--replace-fail "x-terminal-emulator" "${xterm}/bin/xterm" \
|
--replace-fail "x-terminal-emulator" "${xterm}/bin/xterm" \
|
||||||
@ -128,7 +128,7 @@ stdenv.mkDerivation rec {
|
|||||||
|
|
||||||
sed -i '1i #!${pythonEnv.interpreter}' $out/bin/fido2-manage-gui
|
sed -i '1i #!${pythonEnv.interpreter}' $out/bin/fido2-manage-gui
|
||||||
''
|
''
|
||||||
+ lib.optionalString stdenv.isDarwin ''
|
+ lib.optionalString stdenv.hostPlatform.isDarwin ''
|
||||||
substituteInPlace $out/bin/fido2-manage \
|
substituteInPlace $out/bin/fido2-manage \
|
||||||
--replace-fail "ggrep" "${gnugrep}/bin/grep"
|
--replace-fail "ggrep" "${gnugrep}/bin/grep"
|
||||||
'';
|
'';
|
||||||
|
@ -37,6 +37,6 @@ buildGoModule rec {
|
|||||||
license = lib.licenses.gpl2Only;
|
license = lib.licenses.gpl2Only;
|
||||||
maintainers = with lib.maintainers; [ fab ];
|
maintainers = with lib.maintainers; [ fab ];
|
||||||
mainProgram = "gapcast";
|
mainProgram = "gapcast";
|
||||||
broken = stdenv.isDarwin;
|
broken = stdenv.hostPlatform.isDarwin;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -34,7 +34,7 @@ stdenv.mkDerivation (finalAttrs: {
|
|||||||
NIX_CFLAGS_COMPILE =
|
NIX_CFLAGS_COMPILE =
|
||||||
lib.optionalString stdenv.cc.isClang "-Wno-implicit-function-declaration "
|
lib.optionalString stdenv.cc.isClang "-Wno-implicit-function-declaration "
|
||||||
+ lib.optionalString (
|
+ lib.optionalString (
|
||||||
stdenv.isDarwin
|
stdenv.hostPlatform.isDarwin
|
||||||
&& lib.versionOlder (darwin.apple_sdk.MacOSX-SDK.version or darwin.apple_sdk.sdk.version) "13.3"
|
&& lib.versionOlder (darwin.apple_sdk.MacOSX-SDK.version or darwin.apple_sdk.sdk.version) "13.3"
|
||||||
) "-D__LAPACK_int=int";
|
) "-D__LAPACK_int=int";
|
||||||
};
|
};
|
||||||
@ -49,7 +49,7 @@ stdenv.mkDerivation (finalAttrs: {
|
|||||||
gshhg-gmt
|
gshhg-gmt
|
||||||
]
|
]
|
||||||
++ (
|
++ (
|
||||||
if stdenv.isDarwin then
|
if stdenv.hostPlatform.isDarwin then
|
||||||
with darwin.apple_sdk.frameworks;
|
with darwin.apple_sdk.frameworks;
|
||||||
[
|
[
|
||||||
Accelerate
|
Accelerate
|
||||||
@ -83,7 +83,7 @@ stdenv.mkDerivation (finalAttrs: {
|
|||||||
(lib.cmakeBool "GMT_INSTALL_MODULE_LINKS" false)
|
(lib.cmakeBool "GMT_INSTALL_MODULE_LINKS" false)
|
||||||
(lib.cmakeFeature "LICENSE_RESTRICTED" "LGPL")
|
(lib.cmakeFeature "LICENSE_RESTRICTED" "LGPL")
|
||||||
]
|
]
|
||||||
++ (lib.optionals (!stdenv.isDarwin) [
|
++ (lib.optionals (!stdenv.hostPlatform.isDarwin) [
|
||||||
(lib.cmakeFeature "FFTW3_ROOT" "${fftwSinglePrec.dev}")
|
(lib.cmakeFeature "FFTW3_ROOT" "${fftwSinglePrec.dev}")
|
||||||
(lib.cmakeFeature "LAPACK_LIBRARY" "${lib.getLib lapack}/lib/liblapack.so")
|
(lib.cmakeFeature "LAPACK_LIBRARY" "${lib.getLib lapack}/lib/liblapack.so")
|
||||||
(lib.cmakeFeature "BLAS_LIBRARY" "${lib.getLib blas}/lib/libblas.so")
|
(lib.cmakeFeature "BLAS_LIBRARY" "${lib.getLib blas}/lib/libblas.so")
|
||||||
|
@ -23,8 +23,8 @@ buildGoModule {
|
|||||||
vendorHash = "sha256-M/jfQWCBrv7hZm450yLBmcjWtNSCziKOpfipxI6U9ak=";
|
vendorHash = "sha256-M/jfQWCBrv7hZm450yLBmcjWtNSCziKOpfipxI6U9ak=";
|
||||||
|
|
||||||
buildInputs =
|
buildInputs =
|
||||||
lib.optionals stdenv.isDarwin [ darwin.apple_sdk.frameworks.Cocoa ]
|
lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.Cocoa ]
|
||||||
++ lib.optionals stdenv.isLinux [ xorg.libX11 ];
|
++ lib.optionals stdenv.hostPlatform.isLinux [ xorg.libX11 ];
|
||||||
|
|
||||||
ldflags = [
|
ldflags = [
|
||||||
"-s"
|
"-s"
|
||||||
|
@ -39,7 +39,7 @@ let
|
|||||||
let
|
let
|
||||||
baseStdenv = if stdenv.cc.isClang then llvmPackages.stdenv else stdenv;
|
baseStdenv = if stdenv.cc.isClang then llvmPackages.stdenv else stdenv;
|
||||||
in
|
in
|
||||||
if stdenv.isDarwin then overrideSDK baseStdenv "11.0" else baseStdenv;
|
if stdenv.hostPlatform.isDarwin then overrideSDK baseStdenv "11.0" else baseStdenv;
|
||||||
|
|
||||||
patterns_src = fetchFromGitHub {
|
patterns_src = fetchFromGitHub {
|
||||||
name = "ImHex-Patterns-source-${patterns_version}";
|
name = "ImHex-Patterns-source-${patterns_version}";
|
||||||
@ -75,7 +75,7 @@ stdenv'.mkDerivation (finalAttrs: {
|
|||||||
];
|
];
|
||||||
|
|
||||||
# Comment out fixup_bundle in PostprocessBundle.cmake as we are not building a standalone application
|
# Comment out fixup_bundle in PostprocessBundle.cmake as we are not building a standalone application
|
||||||
postPatch = lib.optionalString stdenv.isDarwin ''
|
postPatch = lib.optionalString stdenv.hostPlatform.isDarwin ''
|
||||||
substituteInPlace cmake/modules/PostprocessBundle.cmake \
|
substituteInPlace cmake/modules/PostprocessBundle.cmake \
|
||||||
--replace-fail "fixup_bundle" "#fixup_bundle"
|
--replace-fail "fixup_bundle" "#fixup_bundle"
|
||||||
'';
|
'';
|
||||||
@ -89,28 +89,32 @@ stdenv'.mkDerivation (finalAttrs: {
|
|||||||
pkg-config
|
pkg-config
|
||||||
rsync
|
rsync
|
||||||
]
|
]
|
||||||
++ lib.optionals stdenv.isLinux [ autoPatchelfHook ]
|
++ lib.optionals stdenv.hostPlatform.isLinux [ autoPatchelfHook ]
|
||||||
++ lib.optionals stdenv.isDarwin [ makeWrapper ];
|
++ lib.optionals stdenv.hostPlatform.isDarwin [ makeWrapper ];
|
||||||
|
|
||||||
buildInputs = [
|
buildInputs =
|
||||||
capstone
|
[
|
||||||
curl
|
capstone
|
||||||
dbus
|
curl
|
||||||
file
|
dbus
|
||||||
fmt
|
file
|
||||||
glfw3
|
fmt
|
||||||
gtk3
|
glfw3
|
||||||
jansson
|
gtk3
|
||||||
libGLU
|
jansson
|
||||||
mbedtls
|
libGLU
|
||||||
nlohmann_json
|
mbedtls
|
||||||
yara
|
nlohmann_json
|
||||||
] ++ lib.optionals stdenv.isDarwin [ darwin.apple_sdk_11_0.frameworks.UniformTypeIdentifiers ];
|
yara
|
||||||
|
]
|
||||||
|
++ lib.optionals stdenv.hostPlatform.isDarwin [
|
||||||
|
darwin.apple_sdk_11_0.frameworks.UniformTypeIdentifiers
|
||||||
|
];
|
||||||
|
|
||||||
# autoPatchelfHook only searches for *.so and *.so.*, and won't find *.hexpluglib
|
# autoPatchelfHook only searches for *.so and *.so.*, and won't find *.hexpluglib
|
||||||
# however, we will append to RUNPATH ourselves
|
# however, we will append to RUNPATH ourselves
|
||||||
autoPatchelfIgnoreMissingDeps = lib.optionals stdenv.isLinux [ "*.hexpluglib" ];
|
autoPatchelfIgnoreMissingDeps = lib.optionals stdenv.hostPlatform.isLinux [ "*.hexpluglib" ];
|
||||||
appendRunpaths = lib.optionals stdenv.isLinux [
|
appendRunpaths = lib.optionals stdenv.hostPlatform.isLinux [
|
||||||
(lib.makeLibraryPath [ libGL ])
|
(lib.makeLibraryPath [ libGL ])
|
||||||
"${placeholder "out"}/lib/imhex/plugins"
|
"${placeholder "out"}/lib/imhex/plugins"
|
||||||
];
|
];
|
||||||
@ -118,7 +122,7 @@ stdenv'.mkDerivation (finalAttrs: {
|
|||||||
cmakeFlags = [
|
cmakeFlags = [
|
||||||
(lib.cmakeBool "IMHEX_OFFLINE_BUILD" true)
|
(lib.cmakeBool "IMHEX_OFFLINE_BUILD" true)
|
||||||
(lib.cmakeBool "IMHEX_COMPRESS_DEBUG_INFO" false) # avoids error: cannot compress debug sections (zstd not enabled)
|
(lib.cmakeBool "IMHEX_COMPRESS_DEBUG_INFO" false) # avoids error: cannot compress debug sections (zstd not enabled)
|
||||||
(lib.cmakeBool "IMHEX_GENERATE_PACKAGE" stdenv.isDarwin)
|
(lib.cmakeBool "IMHEX_GENERATE_PACKAGE" stdenv.hostPlatform.isDarwin)
|
||||||
(lib.cmakeBool "USE_SYSTEM_CAPSTONE" true)
|
(lib.cmakeBool "USE_SYSTEM_CAPSTONE" true)
|
||||||
(lib.cmakeBool "USE_SYSTEM_CURL" true)
|
(lib.cmakeBool "USE_SYSTEM_CURL" true)
|
||||||
(lib.cmakeBool "USE_SYSTEM_FMT" true)
|
(lib.cmakeBool "USE_SYSTEM_FMT" true)
|
||||||
@ -129,12 +133,12 @@ stdenv'.mkDerivation (finalAttrs: {
|
|||||||
|
|
||||||
# rsync is used here so we can not copy the _schema.json files
|
# rsync is used here so we can not copy the _schema.json files
|
||||||
postInstall =
|
postInstall =
|
||||||
if stdenv.isLinux then
|
if stdenv.hostPlatform.isLinux then
|
||||||
''
|
''
|
||||||
mkdir -p $out/share/imhex
|
mkdir -p $out/share/imhex
|
||||||
rsync -av --exclude="*_schema.json" ${patterns_src}/{constants,encodings,includes,magic,nodes,patterns} $out/share/imhex
|
rsync -av --exclude="*_schema.json" ${patterns_src}/{constants,encodings,includes,magic,nodes,patterns} $out/share/imhex
|
||||||
''
|
''
|
||||||
else if stdenv.isDarwin then
|
else if stdenv.hostPlatform.isDarwin then
|
||||||
''
|
''
|
||||||
mkdir -p $out/Applications
|
mkdir -p $out/Applications
|
||||||
mv $out/imhex.app $out/Applications
|
mv $out/imhex.app $out/Applications
|
||||||
|
@ -32,7 +32,7 @@ rustPlatform.buildRustPackage rec {
|
|||||||
openssl
|
openssl
|
||||||
sqlite
|
sqlite
|
||||||
zlib
|
zlib
|
||||||
] ++ lib.optionals stdenv.isDarwin [
|
] ++ lib.optionals stdenv.hostPlatform.isDarwin [
|
||||||
darwin.apple_sdk.frameworks.Security
|
darwin.apple_sdk.frameworks.Security
|
||||||
];
|
];
|
||||||
|
|
||||||
|
@ -45,20 +45,20 @@ buildNpmPackage rec {
|
|||||||
zip
|
zip
|
||||||
makeWrapper
|
makeWrapper
|
||||||
]
|
]
|
||||||
++ lib.optionals stdenv.isLinux [
|
++ lib.optionals stdenv.hostPlatform.isLinux [
|
||||||
wayland-scanner
|
wayland-scanner
|
||||||
copyDesktopItems
|
copyDesktopItems
|
||||||
];
|
];
|
||||||
|
|
||||||
buildInputs =
|
buildInputs =
|
||||||
lib.optionals stdenv.isLinux [
|
lib.optionals stdenv.hostPlatform.isLinux [
|
||||||
libxkbcommon
|
libxkbcommon
|
||||||
libX11
|
libX11
|
||||||
libXtst
|
libXtst
|
||||||
libXi
|
libXi
|
||||||
wayland
|
wayland
|
||||||
]
|
]
|
||||||
++ lib.optionals stdenv.isDarwin [
|
++ lib.optionals stdenv.hostPlatform.isDarwin [
|
||||||
apple-sdk_11
|
apple-sdk_11
|
||||||
];
|
];
|
||||||
|
|
||||||
@ -69,7 +69,7 @@ buildNpmPackage rec {
|
|||||||
# use our own node headers since we skip downloading them
|
# use our own node headers since we skip downloading them
|
||||||
NIX_CFLAGS_COMPILE = "-I${nodejs}/include/node";
|
NIX_CFLAGS_COMPILE = "-I${nodejs}/include/node";
|
||||||
# disable code signing on Darwin
|
# disable code signing on Darwin
|
||||||
CSC_IDENTITY_AUTO_DISCOVERY = lib.optionalString stdenv.isDarwin "false";
|
CSC_IDENTITY_AUTO_DISCOVERY = lib.optionalString stdenv.hostPlatform.isDarwin "false";
|
||||||
};
|
};
|
||||||
|
|
||||||
postConfigure = ''
|
postConfigure = ''
|
||||||
@ -103,7 +103,7 @@ buildNpmPackage rec {
|
|||||||
installPhase = ''
|
installPhase = ''
|
||||||
runHook preInstall
|
runHook preInstall
|
||||||
|
|
||||||
${lib.optionalString stdenv.isLinux ''
|
${lib.optionalString stdenv.hostPlatform.isLinux ''
|
||||||
mkdir -p $out/share/kando
|
mkdir -p $out/share/kando
|
||||||
cp -r out/*/{locales,resources{,.pak}} $out/share/kando
|
cp -r out/*/{locales,resources{,.pak}} $out/share/kando
|
||||||
|
|
||||||
@ -115,7 +115,7 @@ buildNpmPackage rec {
|
|||||||
--inherit-argv0
|
--inherit-argv0
|
||||||
''}
|
''}
|
||||||
|
|
||||||
${lib.optionalString stdenv.isDarwin ''
|
${lib.optionalString stdenv.hostPlatform.isDarwin ''
|
||||||
mkdir -p $out/Applications
|
mkdir -p $out/Applications
|
||||||
cp -r out/*/Kando.app $out/Applications
|
cp -r out/*/Kando.app $out/Applications
|
||||||
makeWrapper $out/Applications/Kando.app/Contents/MacOS/Kando $out/bin/kando
|
makeWrapper $out/Applications/Kando.app/Contents/MacOS/Kando $out/bin/kando
|
||||||
|
@ -31,7 +31,7 @@ rustPlatform.buildRustPackage rec {
|
|||||||
[
|
[
|
||||||
openssl
|
openssl
|
||||||
]
|
]
|
||||||
++ lib.optionals stdenv.isDarwin (
|
++ lib.optionals stdenv.hostPlatform.isDarwin (
|
||||||
with darwin.apple_sdk;
|
with darwin.apple_sdk;
|
||||||
[
|
[
|
||||||
frameworks.SystemConfiguration
|
frameworks.SystemConfiguration
|
||||||
|
@ -21,7 +21,7 @@ rustPlatform.buildRustPackage rec {
|
|||||||
"--skip=workers::kube::store::tests::kubeconfigからstateを生成"
|
"--skip=workers::kube::store::tests::kubeconfigからstateを生成"
|
||||||
];
|
];
|
||||||
|
|
||||||
buildInputs = lib.optionals (stdenv.isDarwin) (
|
buildInputs = lib.optionals (stdenv.hostPlatform.isDarwin) (
|
||||||
with darwin.apple_sdk;
|
with darwin.apple_sdk;
|
||||||
[
|
[
|
||||||
frameworks.CoreGraphics
|
frameworks.CoreGraphics
|
||||||
|
@ -24,7 +24,7 @@ stdenv.mkDerivation rec {
|
|||||||
"format"
|
"format"
|
||||||
];
|
];
|
||||||
|
|
||||||
env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.isAarch64 "-Wno-narrowing";
|
env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.hostPlatform.isAarch64 "-Wno-narrowing";
|
||||||
|
|
||||||
nativeBuildInputs = [
|
nativeBuildInputs = [
|
||||||
cmake
|
cmake
|
||||||
|
@ -37,12 +37,12 @@ stdenv.mkDerivation rec {
|
|||||||
(lib.mesonEnable "tests" (!stdenv.hostPlatform.isStatic))
|
(lib.mesonEnable "tests" (!stdenv.hostPlatform.isStatic))
|
||||||
] # Add nix and NixOS specific lv2 paths
|
] # Add nix and NixOS specific lv2 paths
|
||||||
# The default values are from: https://github.com/lv2/lilv/blob/master/src/lilv_config.h
|
# The default values are from: https://github.com/lv2/lilv/blob/master/src/lilv_config.h
|
||||||
++ lib.optional stdenv.isDarwin (lib.mesonOption "default_lv2_path"
|
++ lib.optional stdenv.hostPlatform.isDarwin (lib.mesonOption "default_lv2_path"
|
||||||
"~/.lv2:~/Library/Audio/Plug-Ins/LV2:"
|
"~/.lv2:~/Library/Audio/Plug-Ins/LV2:"
|
||||||
+ "/usr/local/lib/lv2:/usr/lib/lv2:"
|
+ "/usr/local/lib/lv2:/usr/lib/lv2:"
|
||||||
+ "/Library/Audio/Plug-Ins/LV2:"
|
+ "/Library/Audio/Plug-Ins/LV2:"
|
||||||
+ "~/.nix-profile/lib/lv2")
|
+ "~/.nix-profile/lib/lv2")
|
||||||
++ lib.optional stdenv.isLinux (lib.mesonOption "default_lv2_path"
|
++ lib.optional stdenv.hostPlatform.isLinux (lib.mesonOption "default_lv2_path"
|
||||||
"~/.lv2:/usr/local/lib/lv2:/usr/lib/lv2:"
|
"~/.lv2:/usr/local/lib/lv2:/usr/lib/lv2:"
|
||||||
+ "~/.nix-profile/lib/lv2:/run/current-system/sw/lib/lv2");
|
+ "~/.nix-profile/lib/lv2:/run/current-system/sw/lib/lv2");
|
||||||
|
|
||||||
|
@ -35,8 +35,8 @@ stdenv.mkDerivation rec {
|
|||||||
# Stop build scripts from searching global include paths
|
# Stop build scripts from searching global include paths
|
||||||
LSOF_INCLUDE = "${lib.getDev stdenv.cc.libc}/include";
|
LSOF_INCLUDE = "${lib.getDev stdenv.cc.libc}/include";
|
||||||
configurePhase = let genericFlags = "LSOF_CC=$CC LSOF_AR=\"$AR cr\" LSOF_RANLIB=$RANLIB";
|
configurePhase = let genericFlags = "LSOF_CC=$CC LSOF_AR=\"$AR cr\" LSOF_RANLIB=$RANLIB";
|
||||||
linuxFlags = lib.optionalString stdenv.isLinux "LINUX_CONF_CC=$CC_FOR_BUILD";
|
linuxFlags = lib.optionalString stdenv.hostPlatform.isLinux "LINUX_CONF_CC=$CC_FOR_BUILD";
|
||||||
freebsdFlags = lib.optionalString stdenv.isFreeBSD "FREEBSD_SYS=${freebsd.sys.src}/sys";
|
freebsdFlags = lib.optionalString stdenv.hostPlatform.isFreeBSD "FREEBSD_SYS=${freebsd.sys.src}/sys";
|
||||||
in "${genericFlags} ${linuxFlags} ${freebsdFlags} ./Configure -n ${dialect}";
|
in "${genericFlags} ${linuxFlags} ${freebsdFlags} ./Configure -n ${dialect}";
|
||||||
|
|
||||||
preBuild = ''
|
preBuild = ''
|
||||||
|
@ -40,7 +40,7 @@ stdenv.mkDerivation rec {
|
|||||||
];
|
];
|
||||||
|
|
||||||
env.NIX_CFLAGS_COMPILE = lib.optionalString (
|
env.NIX_CFLAGS_COMPILE = lib.optionalString (
|
||||||
stdenv.isDarwin && stdenv.isx86_64
|
stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isx86_64
|
||||||
) "-D_LIBCPP_HAS_NO_LIBRARY_ALIGNED_ALLOCATION=1";
|
) "-D_LIBCPP_HAS_NO_LIBRARY_ALIGNED_ALLOCATION=1";
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
|
@ -47,7 +47,7 @@ rustPlatform.buildRustPackage rec {
|
|||||||
npmHooks.npmConfigHook
|
npmHooks.npmConfigHook
|
||||||
nodejs
|
nodejs
|
||||||
(python3.withPackages (ps: [ ps.setuptools ])) # Used by gyp
|
(python3.withPackages (ps: [ ps.setuptools ])) # Used by gyp
|
||||||
] ++ lib.optional stdenv.isDarwin cctools; # libtool used by gyp;
|
] ++ lib.optional stdenv.hostPlatform.isDarwin cctools; # libtool used by gyp;
|
||||||
|
|
||||||
buildInputs =
|
buildInputs =
|
||||||
[
|
[
|
||||||
|
@ -33,7 +33,7 @@ stdenv.mkDerivation (finalAttrs: {
|
|||||||
pnpm.configHook
|
pnpm.configHook
|
||||||
makeWrapper
|
makeWrapper
|
||||||
python3
|
python3
|
||||||
] ++ lib.optionals stdenv.isDarwin [ xcbuild.xcrun ];
|
] ++ lib.optionals stdenv.hostPlatform.isDarwin [ xcbuild.xcrun ];
|
||||||
|
|
||||||
# https://nixos.org/manual/nixpkgs/unstable/#javascript-pnpm
|
# https://nixos.org/manual/nixpkgs/unstable/#javascript-pnpm
|
||||||
pnpmDeps = pnpm.fetchDeps {
|
pnpmDeps = pnpm.fetchDeps {
|
||||||
|
@ -35,7 +35,7 @@ buildGoModule {
|
|||||||
# Notice that due to some legacy/bug in buildGoModule, the build isn't
|
# Notice that due to some legacy/bug in buildGoModule, the build isn't
|
||||||
# failing even the tests are, as we get a false-positive the output
|
# failing even the tests are, as we get a false-positive the output
|
||||||
# filtering: https://github.com/NixOS/nixpkgs/issues/349468
|
# filtering: https://github.com/NixOS/nixpkgs/issues/349468
|
||||||
doCheck = stdenv.isLinux;
|
doCheck = stdenv.hostPlatform.isLinux;
|
||||||
|
|
||||||
# The tests want to copy /bin/bash and /bin/ls, but we don't have those.
|
# The tests want to copy /bin/bash and /bin/ls, but we don't have those.
|
||||||
# As these are interesting e2e tests to check if things work, we substitute
|
# As these are interesting e2e tests to check if things work, we substitute
|
||||||
|
@ -45,7 +45,7 @@ stdenv.mkDerivation rec {
|
|||||||
sqlite
|
sqlite
|
||||||
zlib
|
zlib
|
||||||
]
|
]
|
||||||
++ lib.optionals stdenv.isDarwin (
|
++ lib.optionals stdenv.hostPlatform.isDarwin (
|
||||||
with darwin.apple_sdk.frameworks;
|
with darwin.apple_sdk.frameworks;
|
||||||
[
|
[
|
||||||
AppKit
|
AppKit
|
||||||
|
@ -67,7 +67,7 @@ stdenv.mkDerivation rec {
|
|||||||
''
|
''
|
||||||
./autogen.sh
|
./autogen.sh
|
||||||
''
|
''
|
||||||
+ lib.optionalString stdenv.isDarwin ''
|
+ lib.optionalString stdenv.hostPlatform.isDarwin ''
|
||||||
# std::result_of was removed in c++20 and unusable for clang16
|
# std::result_of was removed in c++20 and unusable for clang16
|
||||||
substituteInPlace ./configure \
|
substituteInPlace ./configure \
|
||||||
--replace-fail "std=c++20" "std=c++17"
|
--replace-fail "std=c++20" "std=c++17"
|
||||||
|
@ -59,7 +59,7 @@ stdenv.mkDerivation {
|
|||||||
maintainers = [ maintainers.eelco ];
|
maintainers = [ maintainers.eelco ];
|
||||||
license = licenses.lgpl21;
|
license = licenses.lgpl21;
|
||||||
# See https://github.com/edolstra/nix-serve/issues/57
|
# See https://github.com/edolstra/nix-serve/issues/57
|
||||||
broken = stdenv.isDarwin;
|
broken = stdenv.hostPlatform.isDarwin;
|
||||||
platforms = nix.meta.platforms;
|
platforms = nix.meta.platforms;
|
||||||
mainProgram = "nix-serve";
|
mainProgram = "nix-serve";
|
||||||
};
|
};
|
||||||
|
@ -62,6 +62,6 @@ rustPlatform.buildRustPackage rec {
|
|||||||
atemu
|
atemu
|
||||||
];
|
];
|
||||||
# Failing tests on Darwin.
|
# Failing tests on Darwin.
|
||||||
broken = stdenv.isDarwin;
|
broken = stdenv.hostPlatform.isDarwin;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -21,7 +21,7 @@ stdenv.mkDerivation rec {
|
|||||||
buildInputs = [
|
buildInputs = [
|
||||||
ncurses
|
ncurses
|
||||||
perl
|
perl
|
||||||
] ++ lib.optionals stdenv.isDarwin [ apple-sdk_11 ];
|
] ++ lib.optionals stdenv.hostPlatform.isDarwin [ apple-sdk_11 ];
|
||||||
|
|
||||||
makeFlags = [
|
makeFlags = [
|
||||||
"PREFIX=$(out)"
|
"PREFIX=$(out)"
|
||||||
|
@ -27,7 +27,7 @@ buildGoModule rec {
|
|||||||
|
|
||||||
ldflags = [ "-s" "-w" ];
|
ldflags = [ "-s" "-w" ];
|
||||||
|
|
||||||
buildInputs = lib.optional stdenv.isDarwin apple-sdk_12;
|
buildInputs = lib.optional stdenv.hostPlatform.isDarwin apple-sdk_12;
|
||||||
|
|
||||||
passthru.tests.version = testers.testVersion {
|
passthru.tests.version = testers.testVersion {
|
||||||
inherit version;
|
inherit version;
|
||||||
|
@ -34,7 +34,7 @@ rustPlatform.buildRustPackage rec {
|
|||||||
gtk4
|
gtk4
|
||||||
pango
|
pango
|
||||||
]
|
]
|
||||||
++ lib.optionals stdenv.isDarwin [
|
++ lib.optionals stdenv.hostPlatform.isDarwin [
|
||||||
apple-sdk_11
|
apple-sdk_11
|
||||||
];
|
];
|
||||||
|
|
||||||
|
@ -22,9 +22,9 @@ python3Packages.buildPythonApplication rec {
|
|||||||
hash = "sha256-94qziqJaKW8/L/6+U1yojxdG8BmeAStn+qbfGemTrVA=";
|
hash = "sha256-94qziqJaKW8/L/6+U1yojxdG8BmeAStn+qbfGemTrVA=";
|
||||||
};
|
};
|
||||||
|
|
||||||
nativeBuildInputs = [ wrapGAppsHook3 ] ++ lib.optionals stdenv.isDarwin [ gettext ];
|
nativeBuildInputs = [ wrapGAppsHook3 ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ gettext ];
|
||||||
|
|
||||||
postPatch = lib.optionalString stdenv.isDarwin ''
|
postPatch = lib.optionalString stdenv.hostPlatform.isDarwin ''
|
||||||
LINTL="${lib.getLib gettext}/lib/libintl.8.dylib"
|
LINTL="${lib.getLib gettext}/lib/libintl.8.dylib"
|
||||||
substituteInPlace pdfarranger/pdfarranger.py --replace-fail \
|
substituteInPlace pdfarranger/pdfarranger.py --replace-fail \
|
||||||
"return 'libintl.8.dylib'" \
|
"return 'libintl.8.dylib'" \
|
||||||
|
@ -26,7 +26,7 @@ stdenv.mkDerivation {
|
|||||||
inherit version pname;
|
inherit version pname;
|
||||||
|
|
||||||
src =
|
src =
|
||||||
if stdenv.isDarwin then
|
if stdenv.hostPlatform.isDarwin then
|
||||||
fetchurl {
|
fetchurl {
|
||||||
url = "https://github.com/posit-dev/positron/releases/download/${version}/Positron-${version}.dmg";
|
url = "https://github.com/posit-dev/positron/releases/download/${version}/Positron-${version}.dmg";
|
||||||
hash = "sha256-5Ym42InDgFLGdZk0LYV1H0eC5WzmsYToG1KLdiGgTto=";
|
hash = "sha256-5Ym42InDgFLGdZk0LYV1H0eC5WzmsYToG1KLdiGgTto=";
|
||||||
|
@ -21,8 +21,8 @@
|
|||||||
wayland-scanner,
|
wayland-scanner,
|
||||||
makeWrapper,
|
makeWrapper,
|
||||||
versionCheckHook,
|
versionCheckHook,
|
||||||
x11Support ? stdenv.isLinux,
|
x11Support ? stdenv.hostPlatform.isLinux,
|
||||||
waylandSupport ? stdenv.isLinux,
|
waylandSupport ? stdenv.hostPlatform.isLinux,
|
||||||
}:
|
}:
|
||||||
|
|
||||||
stdenv.mkDerivation (finalAttrs: rec {
|
stdenv.mkDerivation (finalAttrs: rec {
|
||||||
@ -75,7 +75,7 @@ stdenv.mkDerivation (finalAttrs: rec {
|
|||||||
(lib.mesonBool "variable-fps" true)
|
(lib.mesonBool "variable-fps" true)
|
||||||
(lib.mesonEnable "wayland" waylandSupport)
|
(lib.mesonEnable "wayland" waylandSupport)
|
||||||
(lib.mesonEnable "x11" x11Support)
|
(lib.mesonEnable "x11" x11Support)
|
||||||
(lib.mesonEnable "icmp-errors" stdenv.isLinux)
|
(lib.mesonEnable "icmp-errors" stdenv.hostPlatform.isLinux)
|
||||||
(lib.mesonEnable "windows-crash-dumps" false)
|
(lib.mesonEnable "windows-crash-dumps" false)
|
||||||
];
|
];
|
||||||
|
|
||||||
|
@ -22,7 +22,7 @@ rustPlatform.buildRustPackage {
|
|||||||
|
|
||||||
cargoHash = "sha256-L0gXxV/3+5oRV/Ipm4sRqr9dh9AEChWhtILO3PaNxYY=";
|
cargoHash = "sha256-L0gXxV/3+5oRV/Ipm4sRqr9dh9AEChWhtILO3PaNxYY=";
|
||||||
|
|
||||||
buildInputs = lib.optionals stdenv.isDarwin (
|
buildInputs = lib.optionals stdenv.hostPlatform.isDarwin (
|
||||||
with darwin.apple_sdk.frameworks;
|
with darwin.apple_sdk.frameworks;
|
||||||
[
|
[
|
||||||
AppKit
|
AppKit
|
||||||
|
@ -47,13 +47,13 @@ rustPlatform.buildRustPackage {
|
|||||||
|
|
||||||
cargoHash = "sha256-esDUzzVm5J8fKftBfk5StJzN1YzLa1p0t7BsoxzrowI=";
|
cargoHash = "sha256-esDUzzVm5J8fKftBfk5StJzN1YzLa1p0t7BsoxzrowI=";
|
||||||
|
|
||||||
nativeBuildInputs = lib.optionals stdenv.isLinux [
|
nativeBuildInputs = lib.optionals stdenv.hostPlatform.isLinux [
|
||||||
pkg-config
|
pkg-config
|
||||||
];
|
];
|
||||||
|
|
||||||
buildInputs =
|
buildInputs =
|
||||||
lib.optionals stdenv.isLinux [ openssl ]
|
lib.optionals stdenv.hostPlatform.isLinux [ openssl ]
|
||||||
++ lib.optionals stdenv.isDarwin [ darwin.apple_sdk.frameworks.SystemConfiguration ];
|
++ lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.SystemConfiguration ];
|
||||||
|
|
||||||
preConfigure = ''
|
preConfigure = ''
|
||||||
mkdir -p crates/librqbit/webui/dist
|
mkdir -p crates/librqbit/webui/dist
|
||||||
|
@ -23,7 +23,7 @@ let
|
|||||||
hash = "sha256-0itva+j5WMKvueiUaO253UQ1S6W29xgtFvV4i3yvMtU=";
|
hash = "sha256-0itva+j5WMKvueiUaO253UQ1S6W29xgtFvV4i3yvMtU=";
|
||||||
};
|
};
|
||||||
|
|
||||||
patches = lib.optional stdenv.isDarwin ./darwin.patch;
|
patches = lib.optional stdenv.hostPlatform.isDarwin ./darwin.patch;
|
||||||
|
|
||||||
strictDeps = true;
|
strictDeps = true;
|
||||||
nativeBuildInputs = [ which ];
|
nativeBuildInputs = [ which ];
|
||||||
|
@ -48,7 +48,7 @@ stdenv.mkDerivation {
|
|||||||
shaderc
|
shaderc
|
||||||
spirv-tools
|
spirv-tools
|
||||||
]
|
]
|
||||||
++ lib.optionals stdenv.isLinux [
|
++ lib.optionals stdenv.hostPlatform.isLinux [
|
||||||
wrapGAppsHook4
|
wrapGAppsHook4
|
||||||
];
|
];
|
||||||
|
|
||||||
@ -66,13 +66,13 @@ stdenv.mkDerivation {
|
|||||||
yaml-cpp
|
yaml-cpp
|
||||||
zstd
|
zstd
|
||||||
]
|
]
|
||||||
++ lib.optionals stdenv.isLinux [
|
++ lib.optionals stdenv.hostPlatform.isLinux [
|
||||||
ffts
|
ffts
|
||||||
gtkmm3
|
gtkmm3
|
||||||
libtirpc
|
libtirpc
|
||||||
]
|
]
|
||||||
++ lib.optionals stdenv.cc.isClang [ llvmPackages.openmp ]
|
++ lib.optionals stdenv.cc.isClang [ llvmPackages.openmp ]
|
||||||
++ lib.optionals stdenv.isDarwin [
|
++ lib.optionals stdenv.hostPlatform.isDarwin [
|
||||||
apple-sdk_11
|
apple-sdk_11
|
||||||
(darwinMinVersionHook "10.15")
|
(darwinMinVersionHook "10.15")
|
||||||
moltenvk
|
moltenvk
|
||||||
@ -84,7 +84,7 @@ stdenv.mkDerivation {
|
|||||||
--replace-fail '"/share/' '"/../share/'
|
--replace-fail '"/share/' '"/../share/'
|
||||||
'';
|
'';
|
||||||
|
|
||||||
cmakeFlags = lib.optionals stdenv.isDarwin [
|
cmakeFlags = lib.optionals stdenv.hostPlatform.isDarwin [
|
||||||
"-DCMAKE_INSTALL_RPATH=${lib.strings.makeLibraryPath [ vulkan-loader ]}"
|
"-DCMAKE_INSTALL_RPATH=${lib.strings.makeLibraryPath [ vulkan-loader ]}"
|
||||||
];
|
];
|
||||||
|
|
||||||
|
@ -57,7 +57,7 @@ stdenv.mkDerivation (finalAttrs: {
|
|||||||
'';
|
'';
|
||||||
|
|
||||||
postInstall =
|
postInstall =
|
||||||
if stdenv.isDarwin then
|
if stdenv.hostPlatform.isDarwin then
|
||||||
''
|
''
|
||||||
cp -r pdf_viewer/shaders sioyek.app/Contents/MacOS/shaders
|
cp -r pdf_viewer/shaders sioyek.app/Contents/MacOS/shaders
|
||||||
cp pdf_viewer/{prefs,prefs_user,keys,key_user}.config tutorial.pdf sioyek.app/Contents/MacOS/
|
cp pdf_viewer/{prefs,prefs_user,keys,key_user}.config tutorial.pdf sioyek.app/Contents/MacOS/
|
||||||
|
@ -121,7 +121,7 @@ python3Packages.buildPythonApplication rec {
|
|||||||
"test_output_file_cache_storage"
|
"test_output_file_cache_storage"
|
||||||
"test_storage"
|
"test_storage"
|
||||||
]
|
]
|
||||||
++ lib.optionals stdenv.isDarwin [
|
++ lib.optionals stdenv.hostPlatform.isDarwin [
|
||||||
# Unclear failure:
|
# Unclear failure:
|
||||||
# AssertionError: expected successful execution
|
# AssertionError: expected successful execution
|
||||||
# `__darwinAllowLocalNetworking` doesn't help
|
# `__darwinAllowLocalNetworking` doesn't help
|
||||||
|
@ -42,6 +42,6 @@ rustPlatform.buildRustPackage {
|
|||||||
license = lib.licenses.mit;
|
license = lib.licenses.mit;
|
||||||
maintainers = [ lib.maintainers.frectonz ];
|
maintainers = [ lib.maintainers.frectonz ];
|
||||||
platforms = lib.platforms.all;
|
platforms = lib.platforms.all;
|
||||||
broken = stdenv.isDarwin;
|
broken = stdenv.hostPlatform.isDarwin;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -23,7 +23,7 @@ rustPlatform.buildRustPackage rec {
|
|||||||
|
|
||||||
buildInputs = [
|
buildInputs = [
|
||||||
rust-jemalloc-sys
|
rust-jemalloc-sys
|
||||||
] ++ lib.optionals stdenv.isDarwin [ darwin.apple_sdk.frameworks.CoreServices ];
|
] ++ lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.CoreServices ];
|
||||||
|
|
||||||
# Patch the tests to find the binary
|
# Patch the tests to find the binary
|
||||||
postPatch = ''
|
postPatch = ''
|
||||||
|
@ -102,7 +102,7 @@ stdenv.mkDerivation (finalAttrs: {
|
|||||||
atemu
|
atemu
|
||||||
];
|
];
|
||||||
platforms = with lib.platforms; linux ++ darwin ++ windows;
|
platforms = with lib.platforms; linux ++ darwin ++ windows;
|
||||||
broken = !stdenv.isLinux;
|
broken = !stdenv.hostPlatform.isLinux;
|
||||||
mainProgram = "Write";
|
mainProgram = "Write";
|
||||||
};
|
};
|
||||||
})
|
})
|
||||||
|
@ -38,7 +38,7 @@ rustPlatform.buildRustPackage rec {
|
|||||||
[
|
[
|
||||||
openssl
|
openssl
|
||||||
]
|
]
|
||||||
++ lib.optionals stdenv.isDarwin [
|
++ lib.optionals stdenv.hostPlatform.isDarwin [
|
||||||
darwin.apple_sdk.frameworks.Security
|
darwin.apple_sdk.frameworks.Security
|
||||||
darwin.apple_sdk.frameworks.SystemConfiguration
|
darwin.apple_sdk.frameworks.SystemConfiguration
|
||||||
];
|
];
|
||||||
|
@ -50,7 +50,7 @@ rustPlatform.buildRustPackage rec {
|
|||||||
"--skip=cli::remote::test::test_should_make_remote_args_from_two_bookmarks_and_local_dir"
|
"--skip=cli::remote::test::test_should_make_remote_args_from_two_bookmarks_and_local_dir"
|
||||||
"--skip=cli::remote::test::test_should_make_remote_args_from_two_remotes_and_local_dir"
|
"--skip=cli::remote::test::test_should_make_remote_args_from_two_remotes_and_local_dir"
|
||||||
]
|
]
|
||||||
++ lib.optionals stdenvNoCC.isDarwin [
|
++ lib.optionals stdenvNoCC.hostPlatform.isDarwin [
|
||||||
"--skip=system::watcher::test::should_poll_file_removed"
|
"--skip=system::watcher::test::should_poll_file_removed"
|
||||||
"--skip=system::watcher::test::should_poll_file_update"
|
"--skip=system::watcher::test::should_poll_file_update"
|
||||||
];
|
];
|
||||||
|
@ -32,7 +32,7 @@ rustPlatform.buildRustPackage rec {
|
|||||||
[
|
[
|
||||||
dbus
|
dbus
|
||||||
]
|
]
|
||||||
++ lib.optionals stdenv.isDarwin [
|
++ lib.optionals stdenv.hostPlatform.isDarwin [
|
||||||
darwin.apple_sdk.frameworks.CoreFoundation
|
darwin.apple_sdk.frameworks.CoreFoundation
|
||||||
darwin.apple_sdk.frameworks.CoreServices
|
darwin.apple_sdk.frameworks.CoreServices
|
||||||
darwin.apple_sdk.frameworks.Security
|
darwin.apple_sdk.frameworks.Security
|
||||||
|
@ -32,7 +32,7 @@ stdenv.mkDerivation (finalAttrs: {
|
|||||||
llvmPackages.libcxx
|
llvmPackages.libcxx
|
||||||
llvmPackages.libunwind
|
llvmPackages.libunwind
|
||||||
]
|
]
|
||||||
++ lib.optionals (stdenv.isLinux) [
|
++ lib.optionals (stdenv.hostPlatform.isLinux) [
|
||||||
musl # not used, but requires extra work to remove
|
musl # not used, but requires extra work to remove
|
||||||
xorg.libX11 # for the clipboardy package
|
xorg.libX11 # for the clipboardy package
|
||||||
];
|
];
|
||||||
@ -43,7 +43,7 @@ stdenv.mkDerivation (finalAttrs: {
|
|||||||
nodejs
|
nodejs
|
||||||
pnpm_9.configHook
|
pnpm_9.configHook
|
||||||
]
|
]
|
||||||
++ lib.optionals (stdenv.isLinux) [
|
++ lib.optionals (stdenv.hostPlatform.isLinux) [
|
||||||
autoPatchelfHook
|
autoPatchelfHook
|
||||||
];
|
];
|
||||||
|
|
||||||
|
@ -31,7 +31,7 @@ rustPlatform.buildRustPackage rec {
|
|||||||
openssl
|
openssl
|
||||||
zlib
|
zlib
|
||||||
]
|
]
|
||||||
++ lib.optionals stdenv.isDarwin [
|
++ lib.optionals stdenv.hostPlatform.isDarwin [
|
||||||
darwin.apple_sdk.frameworks.Security
|
darwin.apple_sdk.frameworks.Security
|
||||||
];
|
];
|
||||||
|
|
||||||
|
@ -25,7 +25,7 @@ stdenv.mkDerivation (finalAttrs: {
|
|||||||
validatePkgConfig
|
validatePkgConfig
|
||||||
];
|
];
|
||||||
|
|
||||||
buildInputs = lib.optional stdenv.isDarwin libiconv;
|
buildInputs = lib.optional stdenv.hostPlatform.isDarwin libiconv;
|
||||||
|
|
||||||
outputs = [
|
outputs = [
|
||||||
"out"
|
"out"
|
||||||
|
@ -8,7 +8,7 @@ let
|
|||||||
nodeEnv = import ../../../../node-packages/node-env.nix {
|
nodeEnv = import ../../../../node-packages/node-env.nix {
|
||||||
inherit (pkgs) stdenv lib python2 runCommand writeTextFile writeShellScript;
|
inherit (pkgs) stdenv lib python2 runCommand writeTextFile 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 {
|
||||||
|
@ -58,7 +58,7 @@ in stdenv.mkDerivation {
|
|||||||
patchPhase = ''
|
patchPhase = ''
|
||||||
sed -i '/^PATH=/d' config/_arch-n-opsys base/runtime/config/gen-posix-names.sh
|
sed -i '/^PATH=/d' config/_arch-n-opsys base/runtime/config/gen-posix-names.sh
|
||||||
echo SRCARCHIVEURL="file:/$TMP" > config/srcarchiveurl
|
echo SRCARCHIVEURL="file:/$TMP" > config/srcarchiveurl
|
||||||
'' + lib.optionalString stdenv.isDarwin ''
|
'' + lib.optionalString stdenv.hostPlatform.isDarwin ''
|
||||||
# Locate standard headers like <unistd.h>
|
# Locate standard headers like <unistd.h>
|
||||||
substituteInPlace base/runtime/config/gen-posix-names.sh \
|
substituteInPlace base/runtime/config/gen-posix-names.sh \
|
||||||
--replace "\$SDK_PATH/usr" "${Libsystem}"
|
--replace "\$SDK_PATH/usr" "${Libsystem}"
|
||||||
|
@ -356,7 +356,7 @@ let
|
|||||||
swift-driver
|
swift-driver
|
||||||
swift-system
|
swift-system
|
||||||
swift-tools-support-core
|
swift-tools-support-core
|
||||||
] ++ lib.optionals stdenv.isDarwin [ (darwinMinVersionHook "10.15.4") ];
|
] ++ lib.optionals stdenv.hostPlatform.isDarwin [ (darwinMinVersionHook "10.15.4") ];
|
||||||
|
|
||||||
cmakeFlags = [
|
cmakeFlags = [
|
||||||
"-DUSE_CMAKE_INSTALL=ON"
|
"-DUSE_CMAKE_INSTALL=ON"
|
||||||
@ -386,7 +386,7 @@ in stdenv.mkDerivation (commonAttrs // {
|
|||||||
++ lib.optionals stdenv.hostPlatform.isDarwin [
|
++ lib.optionals stdenv.hostPlatform.isDarwin [
|
||||||
CryptoKit
|
CryptoKit
|
||||||
LocalAuthentication
|
LocalAuthentication
|
||||||
] ++ lib.optionals stdenv.isDarwin [ (darwinMinVersionHook "10.15.4") ];
|
] ++ lib.optionals stdenv.hostPlatform.isDarwin [ (darwinMinVersionHook "10.15.4") ];
|
||||||
|
|
||||||
configurePhase = generated.configure + ''
|
configurePhase = generated.configure + ''
|
||||||
# Functionality provided by Xcode XCTest, but not available in
|
# Functionality provided by Xcode XCTest, but not available in
|
||||||
|
@ -38,7 +38,7 @@ stdenv.mkDerivation rec {
|
|||||||
mbedtls
|
mbedtls
|
||||||
cacert
|
cacert
|
||||||
]
|
]
|
||||||
++ lib.optionals (stdenv.isDarwin) [
|
++ lib.optionals (stdenv.hostPlatform.isDarwin) [
|
||||||
darwin.apple_sdk_11_0.frameworks.CoreServices
|
darwin.apple_sdk_11_0.frameworks.CoreServices
|
||||||
];
|
];
|
||||||
|
|
||||||
|
@ -18,7 +18,7 @@ stdenv.mkDerivation rec {
|
|||||||
|
|
||||||
cmakeFlags = [
|
cmakeFlags = [
|
||||||
(lib.cmakeBool "BUILD_SHARED_LIBS" true)
|
(lib.cmakeBool "BUILD_SHARED_LIBS" true)
|
||||||
] ++ lib.optionals stdenv.isDarwin [ (lib.cmakeBool "CAPSTONE_BUILD_MACOS_THIN" true) ];
|
] ++ lib.optionals stdenv.hostPlatform.isDarwin [ (lib.cmakeBool "CAPSTONE_BUILD_MACOS_THIN" true) ];
|
||||||
|
|
||||||
nativeBuildInputs = [
|
nativeBuildInputs = [
|
||||||
cmake
|
cmake
|
||||||
|
@ -71,7 +71,7 @@ stdenv.mkDerivation rec {
|
|||||||
proj
|
proj
|
||||||
sqlite
|
sqlite
|
||||||
zstd
|
zstd
|
||||||
] ++ lib.optional stdenv.isDarwin ApplicationServices;
|
] ++ lib.optional stdenv.hostPlatform.isDarwin ApplicationServices;
|
||||||
|
|
||||||
enableParallelBuilding = true;
|
enableParallelBuilding = true;
|
||||||
|
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
, enableQt ? enableQT
|
, enableQt ? enableQT
|
||||||
, enableXM ? false
|
, enableXM ? false
|
||||||
, libGLX
|
, libGLX
|
||||||
, enableOpenGLX11 ? !stdenv.isDarwin
|
, enableOpenGLX11 ? !stdenv.hostPlatform.isDarwin
|
||||||
, enablePython ? false
|
, enablePython ? false
|
||||||
, enableRaytracerX11 ? false
|
, enableRaytracerX11 ? false
|
||||||
|
|
||||||
|
@ -83,7 +83,7 @@ stdenv.mkDerivation (finalAttrs: ({
|
|||||||
[ libinput ]
|
[ libinput ]
|
||||||
++ lib.optional withGtk3 gtk3
|
++ lib.optional withGtk3 gtk3
|
||||||
)
|
)
|
||||||
++ lib.optional stdenv.isDarwin darwinVersionInputs
|
++ lib.optional stdenv.hostPlatform.isDarwin darwinVersionInputs
|
||||||
++ lib.optional developerBuild gdb
|
++ lib.optional developerBuild gdb
|
||||||
++ lib.optional (cups != null) cups
|
++ lib.optional (cups != null) cups
|
||||||
++ lib.optional (mysqlSupport) libmysqlclient
|
++ lib.optional (mysqlSupport) libmysqlclient
|
||||||
|
@ -28,7 +28,7 @@ mkDerivation (args // {
|
|||||||
buildInputs =
|
buildInputs =
|
||||||
args.buildInputs or [ ]
|
args.buildInputs or [ ]
|
||||||
# Per https://doc.qt.io/qt-5/macos.html#supported-versions
|
# Per https://doc.qt.io/qt-5/macos.html#supported-versions
|
||||||
++ lib.optionals stdenv.isDarwin [
|
++ lib.optionals stdenv.hostPlatform.isDarwin [
|
||||||
apple-sdk_13
|
apple-sdk_13
|
||||||
(darwinMinVersionHook "10.13")
|
(darwinMinVersionHook "10.13")
|
||||||
];
|
];
|
||||||
|
@ -24,7 +24,7 @@ stdenv.mkDerivation rec {
|
|||||||
cmake
|
cmake
|
||||||
pkg-config
|
pkg-config
|
||||||
]
|
]
|
||||||
++ lib.optionals stdenv.isDarwin [
|
++ lib.optionals stdenv.hostPlatform.isDarwin [
|
||||||
cctools
|
cctools
|
||||||
];
|
];
|
||||||
|
|
||||||
|
@ -561,7 +561,7 @@ in
|
|||||||
});
|
});
|
||||||
|
|
||||||
neotest = prev.neotest.overrideAttrs(oa: {
|
neotest = prev.neotest.overrideAttrs(oa: {
|
||||||
doCheck = stdenv.isLinux;
|
doCheck = stdenv.hostPlatform.isLinux;
|
||||||
nativeCheckInputs = oa.nativeCheckInputs ++ [
|
nativeCheckInputs = oa.nativeCheckInputs ++ [
|
||||||
final.nlua final.busted neovim-unwrapped
|
final.nlua final.busted neovim-unwrapped
|
||||||
];
|
];
|
||||||
|
@ -101,7 +101,7 @@ buildPythonPackage rec {
|
|||||||
];
|
];
|
||||||
|
|
||||||
# Tests segfault on darwin
|
# Tests segfault on darwin
|
||||||
doCheck = !stdenv.isDarwin;
|
doCheck = !stdenv.hostPlatform.isDarwin;
|
||||||
|
|
||||||
pythonImportsCheck = [ "arviz" ];
|
pythonImportsCheck = [ "arviz" ];
|
||||||
|
|
||||||
|
@ -22,7 +22,7 @@ buildPythonPackage rec {
|
|||||||
|
|
||||||
# Every test currently fails with:
|
# Every test currently fails with:
|
||||||
# berkeleydb.db.DBRunRecoveryError: (-30973, 'BDB0087 DB_RUNRECOVERY: Fatal error, run database recovery -- BDB1546 unable to join the environment')
|
# berkeleydb.db.DBRunRecoveryError: (-30973, 'BDB0087 DB_RUNRECOVERY: Fatal error, run database recovery -- BDB1546 unable to join the environment')
|
||||||
doCheck = !stdenv.isDarwin;
|
doCheck = !stdenv.hostPlatform.isDarwin;
|
||||||
|
|
||||||
checkPhase = ''
|
checkPhase = ''
|
||||||
${python.interpreter} test.py
|
${python.interpreter} test.py
|
||||||
|
@ -59,7 +59,7 @@ buildPythonPackage rec {
|
|||||||
# stuck tests on hydra
|
# stuck tests on hydra
|
||||||
"test_moo_predictive_entropy_search"
|
"test_moo_predictive_entropy_search"
|
||||||
]
|
]
|
||||||
++ lib.optionals (stdenv.hostPlatform.isDarwin && stdenv.isAarch64) [
|
++ lib.optionals (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isAarch64) [
|
||||||
# Numerical error slightly above threshold
|
# Numerical error slightly above threshold
|
||||||
# AssertionError: Tensor-likes are not close!
|
# AssertionError: Tensor-likes are not close!
|
||||||
"test_model_list_gpytorch_model"
|
"test_model_list_gpytorch_model"
|
||||||
|
@ -74,6 +74,6 @@ buildPythonPackage rec {
|
|||||||
license = lib.licenses.agpl3Only;
|
license = lib.licenses.agpl3Only;
|
||||||
maintainers = with lib.maintainers; [ GaetanLepage ];
|
maintainers = with lib.maintainers; [ GaetanLepage ];
|
||||||
# Fatal Python error: Aborted
|
# Fatal Python error: Aborted
|
||||||
broken = stdenv.isDarwin;
|
broken = stdenv.hostPlatform.isDarwin;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -20,7 +20,7 @@ buildPythonPackage rec {
|
|||||||
};
|
};
|
||||||
|
|
||||||
# Workaround for https://github.com/ethanfurman/dbf/issues/48
|
# Workaround for https://github.com/ethanfurman/dbf/issues/48
|
||||||
patches = lib.optional python.stdenv.isDarwin ./darwin.patch;
|
patches = lib.optional python.stdenv.hostPlatform.isDarwin ./darwin.patch;
|
||||||
|
|
||||||
propagatedBuildInputs = [ aenum ];
|
propagatedBuildInputs = [ aenum ];
|
||||||
|
|
||||||
|
@ -46,7 +46,7 @@ buildPythonPackage rec {
|
|||||||
[
|
[
|
||||||
openssl
|
openssl
|
||||||
]
|
]
|
||||||
++ lib.optionals stdenv.isDarwin [
|
++ lib.optionals stdenv.hostPlatform.isDarwin [
|
||||||
darwin.apple_sdk.frameworks.Security
|
darwin.apple_sdk.frameworks.Security
|
||||||
darwin.apple_sdk.frameworks.SystemConfiguration
|
darwin.apple_sdk.frameworks.SystemConfiguration
|
||||||
libiconv
|
libiconv
|
||||||
|
@ -37,7 +37,7 @@ buildPythonPackage rec {
|
|||||||
];
|
];
|
||||||
|
|
||||||
# test is flaky on darwin
|
# test is flaky on darwin
|
||||||
disabledTests = if stdenv.isDarwin then [ "test_function_throttled" ] else null;
|
disabledTests = if stdenv.hostPlatform.isDarwin then [ "test_function_throttled" ] else null;
|
||||||
|
|
||||||
pythonNamespaces = [ "jaraco" ];
|
pythonNamespaces = [ "jaraco" ];
|
||||||
|
|
||||||
|
@ -33,7 +33,7 @@ buildPythonPackage rec {
|
|||||||
hash = "sha256-yWpOxzIk2n2yK8B+88+qGPi4aQDRhy4pETu87wCToh4=";
|
hash = "sha256-yWpOxzIk2n2yK8B+88+qGPi4aQDRhy4pETu87wCToh4=";
|
||||||
};
|
};
|
||||||
|
|
||||||
patches = lib.optionals stdenv.isLinux [
|
patches = lib.optionals stdenv.hostPlatform.isLinux [
|
||||||
(substituteAll {
|
(substituteAll {
|
||||||
src = ./linux-paths.patch;
|
src = ./linux-paths.patch;
|
||||||
x11 = "${xorg.libX11}/lib/libX11.so";
|
x11 = "${xorg.libX11}/lib/libX11.so";
|
||||||
@ -44,7 +44,7 @@ buildPythonPackage rec {
|
|||||||
|
|
||||||
build-system = [ hatchling ];
|
build-system = [ hatchling ];
|
||||||
|
|
||||||
doCheck = stdenv.isLinux;
|
doCheck = stdenv.hostPlatform.isLinux;
|
||||||
|
|
||||||
nativeCheckInputs = [
|
nativeCheckInputs = [
|
||||||
lsof
|
lsof
|
||||||
|
@ -117,7 +117,7 @@ buildPythonPackage rec {
|
|||||||
"test_save"
|
"test_save"
|
||||||
];
|
];
|
||||||
|
|
||||||
disabledTestPaths = lib.optionals stdenv.isDarwin [
|
disabledTestPaths = lib.optionals stdenv.hostPlatform.isDarwin [
|
||||||
# Crashes the interpreter
|
# Crashes the interpreter
|
||||||
"Tests/test_imagetk.py"
|
"Tests/test_imagetk.py"
|
||||||
];
|
];
|
||||||
|
@ -93,7 +93,7 @@ buildPythonPackage {
|
|||||||
polarsMemoryAllocator
|
polarsMemoryAllocator
|
||||||
(pkgs.__splicedPackages.zstd or pkgs.zstd)
|
(pkgs.__splicedPackages.zstd or pkgs.zstd)
|
||||||
]
|
]
|
||||||
++ lib.optionals stdenv.isDarwin [
|
++ lib.optionals stdenv.hostPlatform.isDarwin [
|
||||||
darwin.apple_sdk.frameworks.AppKit
|
darwin.apple_sdk.frameworks.AppKit
|
||||||
darwin.apple_sdk.frameworks.IOKit
|
darwin.apple_sdk.frameworks.IOKit
|
||||||
darwin.apple_sdk.frameworks.Security
|
darwin.apple_sdk.frameworks.Security
|
||||||
|
@ -53,7 +53,7 @@ buildPythonPackage rec {
|
|||||||
];
|
];
|
||||||
|
|
||||||
# PermissionError accessing '/etc/localtime'
|
# PermissionError accessing '/etc/localtime'
|
||||||
disabledTestPaths = lib.optionals stdenv.isDarwin [ "tests/test_pendulum_dt.py" ];
|
disabledTestPaths = lib.optionals stdenv.hostPlatform.isDarwin [ "tests/test_pendulum_dt.py" ];
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
changelog = "https://github.com/pydantic/pydantic-extra-types/blob/${src.rev}/HISTORY.md";
|
changelog = "https://github.com/pydantic/pydantic-extra-types/blob/${src.rev}/HISTORY.md";
|
||||||
|
@ -30,7 +30,7 @@ buildPythonPackage rec {
|
|||||||
hash = "sha256-CXVbw86263JfsH7KVCX0PyNY078I4A0qm3kqGu3RYVk=";
|
hash = "sha256-CXVbw86263JfsH7KVCX0PyNY078I4A0qm3kqGu3RYVk=";
|
||||||
};
|
};
|
||||||
|
|
||||||
patches = lib.optionals stdenv.isLinux [
|
patches = lib.optionals stdenv.hostPlatform.isLinux [
|
||||||
(substituteAll {
|
(substituteAll {
|
||||||
src = ./paths.patch;
|
src = ./paths.patch;
|
||||||
xauth = lib.getExe xorg.xauth;
|
xauth = lib.getExe xorg.xauth;
|
||||||
@ -40,7 +40,7 @@ buildPythonPackage rec {
|
|||||||
|
|
||||||
build-system = [ setuptools ];
|
build-system = [ setuptools ];
|
||||||
|
|
||||||
doCheck = stdenv.isLinux;
|
doCheck = stdenv.hostPlatform.isLinux;
|
||||||
|
|
||||||
nativeCheckInputs = [
|
nativeCheckInputs = [
|
||||||
easyprocess
|
easyprocess
|
||||||
|
@ -40,7 +40,7 @@ in stdenv.mkDerivation rec {
|
|||||||
src = fetchzip {
|
src = fetchzip {
|
||||||
url = "https://cdn.cypress.io/desktop/${version}/${platform}/cypress.zip";
|
url = "https://cdn.cypress.io/desktop/${version}/${platform}/cypress.zip";
|
||||||
sha256 = checksum;
|
sha256 = checksum;
|
||||||
stripRoot = !stdenv.isDarwin;
|
stripRoot = !stdenv.hostPlatform.isDarwin;
|
||||||
};
|
};
|
||||||
|
|
||||||
# don't remove runtime deps
|
# don't remove runtime deps
|
||||||
@ -51,7 +51,7 @@ in stdenv.mkDerivation rec {
|
|||||||
unzip
|
unzip
|
||||||
makeShellWrapper
|
makeShellWrapper
|
||||||
]
|
]
|
||||||
++ lib.optionals stdenv.isLinux [
|
++ lib.optionals stdenv.hostPlatform.isLinux [
|
||||||
autoPatchelfHook
|
autoPatchelfHook
|
||||||
# override doesn't preserve splicing https://github.com/NixOS/nixpkgs/issues/132651
|
# override doesn't preserve splicing https://github.com/NixOS/nixpkgs/issues/132651
|
||||||
# Has to use `makeShellWrapper` from `buildPackages` even though `makeShellWrapper` from the inputs is spliced because `propagatedBuildInputs` would pick the wrong one because of a different offset.
|
# Has to use `makeShellWrapper` from `buildPackages` even though `makeShellWrapper` from the inputs is spliced because `propagatedBuildInputs` would pick the wrong one because of a different offset.
|
||||||
@ -59,7 +59,7 @@ in stdenv.mkDerivation rec {
|
|||||||
];
|
];
|
||||||
|
|
||||||
|
|
||||||
buildInputs = lib.optionals stdenv.isLinux (with xorg; [
|
buildInputs = lib.optionals stdenv.hostPlatform.isLinux (with xorg; [
|
||||||
libXScrnSaver
|
libXScrnSaver
|
||||||
libXdamage
|
libXdamage
|
||||||
libXtst
|
libXtst
|
||||||
@ -69,7 +69,7 @@ in stdenv.mkDerivation rec {
|
|||||||
alsa-lib
|
alsa-lib
|
||||||
gtk3
|
gtk3
|
||||||
mesa # for libgbm
|
mesa # for libgbm
|
||||||
]) ++ lib.optionals stdenv.isDarwin (with darwin.apple_sdk.frameworks; [
|
]) ++ lib.optionals stdenv.hostPlatform.isDarwin (with darwin.apple_sdk.frameworks; [
|
||||||
Cocoa
|
Cocoa
|
||||||
CoreServices
|
CoreServices
|
||||||
CoreMedia
|
CoreMedia
|
||||||
@ -80,7 +80,7 @@ in stdenv.mkDerivation rec {
|
|||||||
ApplicationServices
|
ApplicationServices
|
||||||
]);
|
]);
|
||||||
|
|
||||||
runtimeDependencies = lib.optional stdenv.isLinux (lib.getLib udev);
|
runtimeDependencies = lib.optional stdenv.hostPlatform.isLinux (lib.getLib udev);
|
||||||
|
|
||||||
installPhase = ''
|
installPhase = ''
|
||||||
runHook preInstall
|
runHook preInstall
|
||||||
@ -93,7 +93,7 @@ in stdenv.mkDerivation rec {
|
|||||||
printf '{"version":"%b"}' $version > $out/bin/resources/app/package.json
|
printf '{"version":"%b"}' $version > $out/bin/resources/app/package.json
|
||||||
# Cypress now looks for binary_state.json in bin
|
# Cypress now looks for binary_state.json in bin
|
||||||
echo '{"verified": true}' > $out/binary_state.json
|
echo '{"verified": true}' > $out/binary_state.json
|
||||||
${if stdenv.isDarwin then ''
|
${if stdenv.hostPlatform.isDarwin then ''
|
||||||
ln -s $out/opt/cypress/Cypress.app/Contents/MacOS/Cypress $out/bin/cypress
|
ln -s $out/opt/cypress/Cypress.app/Contents/MacOS/Cypress $out/bin/cypress
|
||||||
'' else ''
|
'' else ''
|
||||||
ln -s $out/opt/cypress/Cypress $out/bin/cypress
|
ln -s $out/opt/cypress/Cypress $out/bin/cypress
|
||||||
@ -101,7 +101,7 @@ in stdenv.mkDerivation rec {
|
|||||||
runHook postInstall
|
runHook postInstall
|
||||||
'';
|
'';
|
||||||
|
|
||||||
postFixup = lib.optionalString (!stdenv.isDarwin) ''
|
postFixup = lib.optionalString (!stdenv.hostPlatform.isDarwin) ''
|
||||||
# exit with 1 after 25.05
|
# exit with 1 after 25.05
|
||||||
makeWrapper $out/opt/cypress/Cypress $out/bin/Cypress \
|
makeWrapper $out/opt/cypress/Cypress $out/bin/Cypress \
|
||||||
--run 'echo "Warning: Use the lowercase cypress executable instead of the capitalized one."'
|
--run 'echo "Warning: Use the lowercase cypress executable instead of the capitalized one."'
|
||||||
|
@ -98,7 +98,7 @@ beamPackages.mixRelease rec {
|
|||||||
vips
|
vips
|
||||||
glib.dev
|
glib.dev
|
||||||
]
|
]
|
||||||
++ lib.optionals stdenv.isDarwin [
|
++ lib.optionals stdenv.hostPlatform.isDarwin [
|
||||||
darwin.apple_sdk.frameworks.Foundation
|
darwin.apple_sdk.frameworks.Foundation
|
||||||
darwin.apple_sdk.frameworks.AppKit
|
darwin.apple_sdk.frameworks.AppKit
|
||||||
darwin.apple_sdk.frameworks.Kerberos
|
darwin.apple_sdk.frameworks.Kerberos
|
||||||
|
@ -19,7 +19,7 @@ stdenv.mkDerivation rec {
|
|||||||
'';
|
'';
|
||||||
|
|
||||||
# Test requires running Jitsi Videobridge and Jicofo which are Linux-only
|
# Test requires running Jitsi Videobridge and Jicofo which are Linux-only
|
||||||
passthru.tests = lib.optionalAttrs stdenv.isLinux {
|
passthru.tests = lib.optionalAttrs stdenv.hostPlatform.isLinux {
|
||||||
single-host-smoke-test = nixosTests.jitsi-meet;
|
single-host-smoke-test = nixosTests.jitsi-meet;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -34,7 +34,7 @@ stdenv.mkDerivation rec {
|
|||||||
"--with-working-dir=/var/lib/bacula"
|
"--with-working-dir=/var/lib/bacula"
|
||||||
"--mandir=\${out}/share/man"
|
"--mandir=\${out}/share/man"
|
||||||
] ++ lib.optional (stdenv.buildPlatform != stdenv.hostPlatform) "ac_cv_func_setpgrp_void=yes"
|
] ++ lib.optional (stdenv.buildPlatform != stdenv.hostPlatform) "ac_cv_func_setpgrp_void=yes"
|
||||||
++ lib.optionals stdenv.isDarwin [
|
++ lib.optionals stdenv.hostPlatform.isDarwin [
|
||||||
# bacula’s `configure` script fails to detect CoreFoundation correctly,
|
# bacula’s `configure` script fails to detect CoreFoundation correctly,
|
||||||
# but these symbols are available in the nixpkgs CoreFoundation framework.
|
# but these symbols are available in the nixpkgs CoreFoundation framework.
|
||||||
"gt_cv_func_CFLocaleCopyCurrent=yes"
|
"gt_cv_func_CFLocaleCopyCurrent=yes"
|
||||||
|
@ -25,7 +25,7 @@ buildGoModule rec {
|
|||||||
|
|
||||||
nativeCheckInputs = [ python3 ];
|
nativeCheckInputs = [ python3 ];
|
||||||
|
|
||||||
passthru.tests = lib.optionalAttrs stdenv.isLinux {
|
passthru.tests = lib.optionalAttrs stdenv.hostPlatform.isLinux {
|
||||||
restic = nixosTests.restic;
|
restic = nixosTests.restic;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -23,7 +23,7 @@ rustPlatform.buildRustPackage rec {
|
|||||||
|
|
||||||
nativeBuildInputs = [ pkg-config ];
|
nativeBuildInputs = [ pkg-config ];
|
||||||
|
|
||||||
buildInputs = [ dbus ] ++ lib.optionals stdenv.isDarwin [ AppKit ];
|
buildInputs = [ dbus ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ AppKit ];
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
description = "VR Lighthouse power state management";
|
description = "VR Lighthouse power state management";
|
||||||
|
@ -267,7 +267,7 @@ core-big = stdenv.mkDerivation {
|
|||||||
''
|
''
|
||||||
# force XeTeX to use fontconfig instead of Core Text, so that fonts can be made available via FONTCONFIG_FILE,
|
# force XeTeX to use fontconfig instead of Core Text, so that fonts can be made available via FONTCONFIG_FILE,
|
||||||
# by tricking configure into thinking that the relevant test result is already in the config cache
|
# by tricking configure into thinking that the relevant test result is already in the config cache
|
||||||
+ lib.optionalString stdenv.isDarwin ''
|
+ lib.optionalString stdenv.hostPlatform.isDarwin ''
|
||||||
export kpse_cv_have_ApplicationServices=no
|
export kpse_cv_have_ApplicationServices=no
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
@ -9511,7 +9511,7 @@ with pkgs;
|
|||||||
|
|
||||||
gst_all_1 = recurseIntoAttrs (callPackage ../development/libraries/gstreamer {
|
gst_all_1 = recurseIntoAttrs (callPackage ../development/libraries/gstreamer {
|
||||||
callPackage = newScope gst_all_1;
|
callPackage = newScope gst_all_1;
|
||||||
stdenv = if stdenv.isDarwin then overrideSDK stdenv "12.3" else stdenv;
|
stdenv = if stdenv.hostPlatform.isDarwin then overrideSDK stdenv "12.3" else stdenv;
|
||||||
inherit (darwin.apple_sdk_12_3.frameworks) AudioToolbox AVFoundation Cocoa CoreFoundation CoreMedia CoreServices CoreVideo DiskArbitration Foundation IOKit MediaToolbox OpenGL Security SystemConfiguration VideoToolbox;
|
inherit (darwin.apple_sdk_12_3.frameworks) AudioToolbox AVFoundation Cocoa CoreFoundation CoreMedia CoreServices CoreVideo DiskArbitration Foundation IOKit MediaToolbox OpenGL Security SystemConfiguration VideoToolbox;
|
||||||
inherit (darwin.apple_sdk_12_3.libs) xpc;
|
inherit (darwin.apple_sdk_12_3.libs) xpc;
|
||||||
});
|
});
|
||||||
@ -10490,7 +10490,7 @@ with pkgs;
|
|||||||
else callPackage ../development/libraries/ncurses {
|
else callPackage ../development/libraries/ncurses {
|
||||||
# ncurses is included in the SDK. Avoid an infinite recursion by using a bootstrap stdenv.
|
# ncurses is included in the SDK. Avoid an infinite recursion by using a bootstrap stdenv.
|
||||||
stdenv =
|
stdenv =
|
||||||
if stdenv.isDarwin then
|
if stdenv.hostPlatform.isDarwin then
|
||||||
darwin.bootstrapStdenv
|
darwin.bootstrapStdenv
|
||||||
else
|
else
|
||||||
stdenv;
|
stdenv;
|
||||||
|
Loading…
Reference in New Issue
Block a user