From e0464e47880a69896f0fb1810f00e0de469f770a Mon Sep 17 00:00:00 2001 From: Artturin Date: Tue, 24 Sep 2024 18:50:49 +0300 Subject: [PATCH] treewide: replace `stdenv.is` with `stdenv.hostPlatform.is` In preparation for the deprecation of `stdenv.isX`. These shorthands are not conducive to cross-compilation because they hide the platforms. Darwin might get cross-compilation for which the continued usage of `stdenv.isDarwin` will get in the way One example of why this is bad and especially affects compiler packages https://www.github.com/NixOS/nixpkgs/pull/343059 There are too many files to go through manually but a treewide should get users thinking when they see a `hostPlatform.isX` in a place where it doesn't make sense. ``` fd --type f "\.nix" | xargs sd --fixed-strings "stdenv.is" "stdenv.hostPlatform.is" fd --type f "\.nix" | xargs sd --fixed-strings "stdenv'.is" "stdenv'.hostPlatform.is" fd --type f "\.nix" | xargs sd --fixed-strings "clangStdenv.is" "clangStdenv.hostPlatform.is" fd --type f "\.nix" | xargs sd --fixed-strings "gccStdenv.is" "gccStdenv.hostPlatform.is" fd --type f "\.nix" | xargs sd --fixed-strings "stdenvNoCC.is" "stdenvNoCC.hostPlatform.is" fd --type f "\.nix" | xargs sd --fixed-strings "inherit (stdenv) is" "inherit (stdenv.hostPlatform) is" fd --type f "\.nix" | xargs sd --fixed-strings "buildStdenv.is" "buildStdenv.hostPlatform.is" fd --type f "\.nix" | xargs sd --fixed-strings "effectiveStdenv.is" "effectiveStdenv.hostPlatform.is" fd --type f "\.nix" | xargs sd --fixed-strings "originalStdenv.is" "originalStdenv.hostPlatform.is" ``` --- flake.nix | 2 +- lib/tests/test-with-nix.nix | 2 +- .../convert-to-import-cargo-lock/shell.nix | 2 +- nixos/modules/config/fonts/fontconfig.nix | 2 +- nixos/modules/config/ldso.nix | 4 +- nixos/modules/config/pulseaudio.nix | 2 +- nixos/modules/config/stub-ld.nix | 2 +- nixos/modules/hardware/graphics.nix | 4 +- nixos/modules/profiles/all-hardware.nix | 4 +- nixos/modules/services/audio/jack.nix | 2 +- .../services/desktops/pipewire/pipewire.nix | 2 +- nixos/modules/services/logging/promtail.nix | 2 +- nixos/modules/services/misc/mame.nix | 2 +- nixos/modules/services/misc/tabby.nix | 2 +- nixos/modules/services/networking/cjdns.nix | 2 +- nixos/modules/services/networking/nsd.nix | 4 +- nixos/modules/services/video/frigate.nix | 2 +- nixos/modules/system/boot/stage-1.nix | 2 +- nixos/modules/system/boot/systemd.nix | 2 +- nixos/modules/tasks/network-interfaces.nix | 2 +- nixos/modules/virtualisation/docker.nix | 2 +- nixos/modules/virtualisation/xen-dom0.nix | 2 +- nixos/tests/filesender.nix | 2 +- nixos/tests/freetube.nix | 2 +- nixos/tests/installed-tests/gdk-pixbuf.nix | 2 +- nixos/tests/k3s/multi-node.nix | 2 +- nixos/tests/libvirtd.nix | 2 +- nixos/tests/pulseaudio.nix | 4 +- nixos/tests/stub-ld.nix | 2 +- nixos/tests/sunshine.nix | 2 +- nixos/tests/wine.nix | 2 +- pkgs/applications/audio/ario/default.nix | 2 +- pkgs/applications/audio/ashuffle/default.nix | 2 +- pkgs/applications/audio/aucatctl/default.nix | 4 +- pkgs/applications/audio/audacity/default.nix | 14 +- pkgs/applications/audio/cardinal/default.nix | 2 +- pkgs/applications/audio/cd-discid/default.nix | 2 +- .../applications/audio/cdparanoia/default.nix | 4 +- pkgs/applications/audio/chuck/default.nix | 8 +- pkgs/applications/audio/cmus/default.nix | 8 +- pkgs/applications/audio/cmusfm/default.nix | 2 +- pkgs/applications/audio/csound/default.nix | 8 +- pkgs/applications/audio/eartag/default.nix | 2 +- .../audio/easyaudiosync/default.nix | 6 +- pkgs/applications/audio/eq10q/default.nix | 2 +- pkgs/applications/audio/espeak-ng/default.nix | 6 +- .../applications/audio/fluidsynth/default.nix | 4 +- pkgs/applications/audio/ft2-clone/default.nix | 4 +- .../applications/audio/glicol-cli/default.nix | 4 +- .../audio/gnome-podcasts/default.nix | 2 +- .../audio/go-musicfox/default.nix | 2 +- .../applications/audio/grandorgue/default.nix | 8 +- pkgs/applications/audio/gst123/default.nix | 2 +- .../audio/hivelytracker/default.nix | 2 +- pkgs/applications/audio/jamesdsp/default.nix | 2 +- pkgs/applications/audio/jellycli/default.nix | 2 +- pkgs/applications/audio/librespot/default.nix | 4 +- .../audio/listenbrainz-mpd/default.nix | 4 +- .../audio/littlegptracker/default.nix | 14 +- pkgs/applications/audio/master_me/default.nix | 6 +- .../audio/mellowplayer/default.nix | 2 +- .../audio/midivisualizer/default.nix | 6 +- .../audio/miniaudicle/default.nix | 2 +- pkgs/applications/audio/minidsp/default.nix | 6 +- pkgs/applications/audio/mixxx/default.nix | 2 +- pkgs/applications/audio/moc/default.nix | 4 +- pkgs/applications/audio/mopidy/mopidy.nix | 2 +- .../applications/audio/mp3blaster/default.nix | 2 +- pkgs/applications/audio/mpc/default.nix | 2 +- pkgs/applications/audio/musescore/default.nix | 22 +- pkgs/applications/audio/muso/default.nix | 4 +- pkgs/applications/audio/ncspot/default.nix | 6 +- .../audio/open-music-kontrollers/generic.nix | 2 +- pkgs/applications/audio/openutau/default.nix | 8 +- pkgs/applications/audio/opustags/default.nix | 4 +- pkgs/applications/audio/parrot/default.nix | 2 +- .../audio/pd-plugins/helmholtz/default.nix | 2 +- pkgs/applications/audio/pithos/default.nix | 2 +- .../audio/plugin-torture/default.nix | 2 +- pkgs/applications/audio/polyphone/default.nix | 2 +- pkgs/applications/audio/pt2-clone/default.nix | 2 +- pkgs/applications/audio/puredata/default.nix | 8 +- .../applications/audio/quadrafuzz/default.nix | 2 +- .../audio/radiotray-ng/default.nix | 2 +- pkgs/applications/audio/reaper/default.nix | 20 +- pkgs/applications/audio/rkrlv2/default.nix | 2 +- .../audio/schismtracker/default.nix | 8 +- pkgs/applications/audio/scream/default.nix | 4 +- pkgs/applications/audio/sfxr/default.nix | 2 +- pkgs/applications/audio/snapcast/default.nix | 6 +- pkgs/applications/audio/snd/default.nix | 4 +- pkgs/applications/audio/sonobus/default.nix | 6 +- pkgs/applications/audio/sorcer/default.nix | 2 +- .../audio/soundtracker/default.nix | 2 +- .../audio/speech-denoiser/default.nix | 2 +- .../audio/spotify-player/default.nix | 10 +- .../applications/audio/spotify-qt/default.nix | 2 +- pkgs/applications/audio/spotify/darwin.nix | 2 +- pkgs/applications/audio/spotify/default.nix | 2 +- .../audio/stone-phaser/default.nix | 2 +- .../applications/audio/strawberry/default.nix | 4 +- pkgs/applications/audio/tauon/default.nix | 2 +- pkgs/applications/audio/tenacity/default.nix | 4 +- pkgs/applications/audio/termusic/default.nix | 4 +- .../audio/virtual-ans/default.nix | 10 +- .../audio/vorbis-tools/default.nix | 2 +- pkgs/applications/audio/wavegain/default.nix | 2 +- .../audio/x42-avldrums/default.nix | 2 +- .../audio/x42-gmsynth/default.nix | 2 +- pkgs/applications/audio/xmp/default.nix | 4 +- .../audio/youtube-music/default.nix | 12 +- pkgs/applications/audio/zrythm/default.nix | 2 +- .../audio/zynaddsubfx/default.nix | 8 +- pkgs/applications/backup/vorta/default.nix | 2 +- .../blockchains/alfis/default.nix | 10 +- .../applications/blockchains/besu/default.nix | 4 +- .../blockchains/bitcoin-abc/default.nix | 2 +- .../blockchains/bitcoin-knots/default.nix | 8 +- .../blockchains/bitcoin/default.nix | 10 +- .../blockchains/clightning/default.nix | 6 +- .../blockchains/electrs/default.nix | 2 +- .../blockchains/elements/default.nix | 8 +- .../blockchains/groestlcoin/default.nix | 8 +- .../blockchains/haven-cli/default.nix | 4 +- .../blockchains/lighthouse/default.nix | 4 +- .../blockchains/litecoin/default.nix | 4 +- .../blockchains/miniscript/default.nix | 2 +- .../blockchains/monero-cli/default.nix | 6 +- .../blockchains/monero-gui/default.nix | 4 +- .../blockchains/optimism/geth.nix | 2 +- .../blockchains/particl-core/default.nix | 2 +- .../blockchains/polkadot/default.nix | 4 +- .../blockchains/snarkos/default.nix | 6 +- .../blockchains/solana-validator/default.nix | 6 +- .../applications/blockchains/teos/default.nix | 4 +- pkgs/applications/blockchains/ton/default.nix | 2 +- .../blockchains/wownero/default.nix | 2 +- .../blockchains/zcash/default.nix | 4 +- .../display-managers/emptty/default.nix | 2 +- .../editors/codeblocks/default.nix | 6 +- pkgs/applications/editors/dit/default.nix | 2 +- .../emacs/elisp-packages/melpa-packages.nix | 6 +- .../applications/editors/emacs/make-emacs.nix | 30 +-- pkgs/applications/editors/gedit/default.nix | 2 +- pkgs/applications/editors/heh/default.nix | 2 +- .../editors/jetbrains/default.nix | 30 +-- .../jetbrains/plugins/specialPlugins.nix | 2 +- pkgs/applications/editors/lapce/default.nix | 10 +- .../editors/libresprite/default.nix | 6 +- pkgs/applications/editors/lite-xl/default.nix | 2 +- .../editors/mindforger/default.nix | 2 +- pkgs/applications/editors/nedit/default.nix | 2 +- .../editors/neovim/gnvim/wrapper.nix | 2 +- pkgs/applications/editors/neovim/wrapper.nix | 2 +- .../editors/notepad-next/default.nix | 4 +- pkgs/applications/editors/nvi/default.nix | 2 +- .../applications/editors/qxmledit/default.nix | 2 +- pkgs/applications/editors/rehex/default.nix | 8 +- pkgs/applications/editors/rstudio/default.nix | 2 +- .../editors/sublime/2/default.nix | 2 +- .../applications/editors/sublime/3/common.nix | 6 +- .../applications/editors/sublime/4/common.nix | 2 +- pkgs/applications/editors/texmacs/default.nix | 8 +- .../editors/texstudio/default.nix | 4 +- .../applications/editors/texworks/default.nix | 2 +- pkgs/applications/editors/tijolo/default.nix | 2 +- pkgs/applications/editors/vim/full.nix | 8 +- .../vim/plugins/avante-nvim/default.nix | 2 +- .../editors/vim/plugins/overrides.nix | 18 +- .../editors/vim/plugins/vim-clap/default.nix | 2 +- pkgs/applications/editors/vim/vimacs.nix | 2 +- .../chenglou92.rescript-vscode/default.nix | 4 +- .../editors/vscode/extensions/default.nix | 4 +- .../ms-dotnettools.csdevkit/default.nix | 2 +- .../ms-dotnettools.csharp/default.nix | 2 +- .../rust-lang.rust-analyzer/default.nix | 2 +- .../extensions/sourcery.sourcery/default.nix | 4 +- .../vadimcn.vscode-lldb/default.nix | 12 +- pkgs/applications/editors/vscode/generic.nix | 16 +- pkgs/applications/editors/vscode/vscode.nix | 8 +- pkgs/applications/editors/vscode/vscodium.nix | 6 +- .../editors/vscode/with-extensions.nix | 2 +- .../editors/wxhexeditor/default.nix | 2 +- pkgs/applications/editors/xedit/default.nix | 4 +- .../editors/xmlcopyeditor/default.nix | 2 +- pkgs/applications/editors/zee/default.nix | 2 +- pkgs/applications/emulators/86box/default.nix | 12 +- .../emulators/bsnes/ares/default.nix | 14 +- .../emulators/bsnes/bsnes-hd/default.nix | 16 +- .../emulators/bsnes/higan/default.nix | 20 +- .../emulators/dolphin-emu/default.nix | 10 +- .../emulators/dolphin-emu/primehack.nix | 14 +- .../applications/emulators/dosbox/default.nix | 2 +- .../emulators/goldberg-emu/default.nix | 2 +- pkgs/applications/emulators/mame/default.nix | 6 +- .../emulators/retroarch/cores.nix | 2 +- .../emulators/retroarch/default.nix | 12 +- pkgs/applications/emulators/ripes/default.nix | 4 +- .../applications/emulators/ruffle/default.nix | 12 +- .../emulators/tamatool/default.nix | 2 +- pkgs/applications/emulators/wine/base.nix | 18 +- pkgs/applications/emulators/wine/default.nix | 2 +- pkgs/applications/emulators/wine/staging.nix | 2 +- .../applications/file-managers/lf/default.nix | 2 +- .../applications/file-managers/mc/default.nix | 4 +- .../file-managers/projectable/default.nix | 2 +- pkgs/applications/gis/gmt/default.nix | 2 +- pkgs/applications/gis/grass/default.nix | 8 +- .../gis/spatialite-gui/default.nix | 6 +- pkgs/applications/gis/udig/default.nix | 2 +- .../gis/whitebox-tools/default.nix | 2 +- .../applications/graphics/ImageMagick/6.x.nix | 2 +- .../graphics/ImageMagick/default.nix | 2 +- .../graphics/antimony/default.nix | 2 +- pkgs/applications/graphics/artem/default.nix | 2 +- .../graphics/autotrace/default.nix | 2 +- .../graphics/azpainter/default.nix | 2 +- pkgs/applications/graphics/c3d/default.nix | 4 +- .../applications/graphics/comical/default.nix | 2 +- pkgs/applications/graphics/curv/default.nix | 4 +- pkgs/applications/graphics/dia/default.nix | 2 +- pkgs/applications/graphics/djview/default.nix | 6 +- pkgs/applications/graphics/drawio/default.nix | 14 +- .../graphics/drawpile/default.nix | 2 +- pkgs/applications/graphics/emblem/default.nix | 4 +- .../graphics/emulsion/default.nix | 6 +- pkgs/applications/graphics/epick/default.nix | 8 +- .../graphics/evilpixie/default.nix | 4 +- pkgs/applications/graphics/f3d/default.nix | 4 +- pkgs/applications/graphics/feh/default.nix | 2 +- pkgs/applications/graphics/fstl/default.nix | 2 +- pkgs/applications/graphics/gimp/default.nix | 8 +- .../graphics/gnome-obfuscate/default.nix | 4 +- .../graphics/icon-library/default.nix | 4 +- pkgs/applications/graphics/imagej/default.nix | 4 +- pkgs/applications/graphics/imv/default.nix | 2 +- .../graphics/inkscape/default.nix | 8 +- pkgs/applications/graphics/lorien/default.nix | 4 +- .../applications/graphics/menyoki/default.nix | 6 +- .../graphics/oculante/default.nix | 6 +- .../graphics/openscad/default.nix | 8 +- pkgs/applications/graphics/ovito/default.nix | 4 +- .../graphics/panotools/default.nix | 2 +- pkgs/applications/graphics/qosmic/default.nix | 4 +- pkgs/applications/graphics/qvge/default.nix | 2 +- .../graphics/rawtherapee/default.nix | 10 +- pkgs/applications/graphics/rx/default.nix | 4 +- .../sane/backends/brscan4/default.nix | 4 +- .../sane/backends/brscan5/default.nix | 2 +- .../graphics/sane/backends/default.nix | 2 +- .../graphics/symbolic-preview/default.nix | 2 +- .../graphics/synfigstudio/default.nix | 2 +- .../graphics/tesseract/tesseract5.nix | 2 +- pkgs/applications/graphics/tev/default.nix | 2 +- .../graphics/vengi-tools/default.nix | 12 +- .../graphics/vimiv-qt/default.nix | 2 +- pkgs/applications/graphics/vpv/default.nix | 2 +- pkgs/applications/graphics/weylus/default.nix | 10 +- .../graphics/xournalpp/default.nix | 2 +- pkgs/applications/kde/falkon.nix | 2 +- .../misc/1password-gui/default.nix | 4 +- pkgs/applications/misc/1password/default.nix | 8 +- pkgs/applications/misc/anup/default.nix | 2 +- pkgs/applications/misc/audio/sox/default.nix | 6 +- .../misc/bambu-studio/default.nix | 2 +- pkgs/applications/misc/bb/default.nix | 6 +- pkgs/applications/misc/binocle/default.nix | 4 +- pkgs/applications/misc/blender/default.nix | 30 +-- pkgs/applications/misc/boatswain/default.nix | 2 +- pkgs/applications/misc/calibre/default.nix | 2 +- pkgs/applications/misc/cardpeek/default.nix | 6 +- pkgs/applications/misc/citations/default.nix | 2 +- pkgs/applications/misc/clipqr/default.nix | 2 +- pkgs/applications/misc/cloak/default.nix | 2 +- pkgs/applications/misc/cobalt/default.nix | 2 +- pkgs/applications/misc/collision/default.nix | 2 +- pkgs/applications/misc/conceal/default.nix | 2 +- pkgs/applications/misc/coolreader/default.nix | 2 +- pkgs/applications/misc/cotp/default.nix | 4 +- .../misc/cubiomes-viewer/default.nix | 2 +- pkgs/applications/misc/diebahn/default.nix | 4 +- pkgs/applications/misc/diff-pdf/default.nix | 2 +- pkgs/applications/misc/dmenu-rs/default.nix | 2 +- pkgs/applications/misc/doctave/default.nix | 2 +- pkgs/applications/misc/done/default.nix | 4 +- pkgs/applications/misc/dupeguru/default.nix | 2 +- .../misc/electron-cash/default.nix | 4 +- pkgs/applications/misc/electrum/default.nix | 12 +- pkgs/applications/misc/electrum/grs.nix | 12 +- pkgs/applications/misc/electrum/ltc.nix | 12 +- .../applications/misc/etesync-dav/default.nix | 2 +- .../misc/eureka-ideas/default.nix | 2 +- pkgs/applications/misc/faircamp/default.nix | 2 +- pkgs/applications/misc/far2l/default.nix | 4 +- .../applications/misc/firestarter/default.nix | 2 +- pkgs/applications/misc/flavours/default.nix | 2 +- pkgs/applications/misc/gcal/default.nix | 2 +- pkgs/applications/misc/gcalcli/default.nix | 2 +- pkgs/applications/misc/gcfflasher/default.nix | 2 +- .../applications/misc/get_iplayer/default.nix | 4 +- pkgs/applications/misc/gimoji/default.nix | 2 +- pkgs/applications/misc/girara/default.nix | 4 +- pkgs/applications/misc/gkrellm/default.nix | 2 +- .../misc/golden-cheetah-bin/default.nix | 2 +- pkgs/applications/misc/goldendict/default.nix | 6 +- pkgs/applications/misc/gpsbabel/default.nix | 8 +- pkgs/applications/misc/gpxlab/default.nix | 2 +- pkgs/applications/misc/gpxsee/default.nix | 4 +- pkgs/applications/misc/gsctl/default.nix | 2 +- pkgs/applications/misc/gv/default.nix | 4 +- pkgs/applications/misc/health/default.nix | 2 +- .../misc/inherd-quake/default.nix | 2 +- pkgs/applications/misc/inlyne/default.nix | 10 +- pkgs/applications/misc/inochi2d/default.nix | 4 +- .../misc/joplin-desktop/default.nix | 2 +- pkgs/applications/misc/jp2a/default.nix | 2 +- pkgs/applications/misc/kbt/default.nix | 6 +- pkgs/applications/misc/keepassxc/default.nix | 20 +- pkgs/applications/misc/kemai/default.nix | 2 +- pkgs/applications/misc/khal/default.nix | 2 +- .../misc/klipper-estimator/default.nix | 2 +- pkgs/applications/misc/kord/default.nix | 8 +- .../misc/leetcode-cli/default.nix | 2 +- pkgs/applications/misc/lenmus/default.nix | 6 +- pkgs/applications/misc/llpp/default.nix | 6 +- pkgs/applications/misc/mdzk/default.nix | 2 +- pkgs/applications/misc/mob/default.nix | 2 +- pkgs/applications/misc/mupdf/default.nix | 12 +- .../misc/mysql-workbench/default.nix | 2 +- pkgs/applications/misc/navi/default.nix | 2 +- pkgs/applications/misc/notesnook/default.nix | 2 +- pkgs/applications/misc/obsidian/default.nix | 6 +- pkgs/applications/misc/octoprint/default.nix | 6 +- pkgs/applications/misc/ola/default.nix | 2 +- .../misc/openbangla-keyboard/default.nix | 2 +- .../misc/openbox-menu/default.nix | 2 +- pkgs/applications/misc/opencpn/default.nix | 14 +- pkgs/applications/misc/oranda/default.nix | 4 +- .../applications/misc/organicmaps/default.nix | 2 +- pkgs/applications/misc/p2pool/default.nix | 4 +- pkgs/applications/misc/pastel/default.nix | 2 +- pkgs/applications/misc/pdfpc/default.nix | 2 +- pkgs/applications/misc/pgmodeler/default.nix | 10 +- pkgs/applications/misc/plover/default.nix | 2 +- pkgs/applications/misc/pomodoro/default.nix | 4 +- pkgs/applications/misc/porsmo/default.nix | 2 +- .../misc/process-viewer/default.nix | 2 +- .../misc/prusa-slicer/default.nix | 4 +- pkgs/applications/misc/pueue/default.nix | 4 +- pkgs/applications/misc/pwsafe/default.nix | 8 +- .../misc/qMasterPassword/default.nix | 2 +- pkgs/applications/misc/qcad/default.nix | 10 +- .../misc/qelectrotech/default.nix | 2 +- pkgs/applications/misc/qolibri/default.nix | 2 +- .../misc/qsyncthingtray/default.nix | 6 +- pkgs/applications/misc/reddsaver/default.nix | 2 +- pkgs/applications/misc/redshift/default.nix | 14 +- pkgs/applications/misc/rtfm/default.nix | 2 +- .../misc/rust-traverse/default.nix | 2 +- pkgs/applications/misc/safecloset/default.nix | 4 +- pkgs/applications/misc/sampler/default.nix | 4 +- pkgs/applications/misc/senv/default.nix | 2 +- pkgs/applications/misc/sigal/default.nix | 2 +- pkgs/applications/misc/sioyek/default.nix | 6 +- pkgs/applications/misc/slippy/default.nix | 2 +- pkgs/applications/misc/snagboot/default.nix | 2 +- pkgs/applications/misc/stork/default.nix | 2 +- pkgs/applications/misc/stw/default.nix | 2 +- pkgs/applications/misc/survex/default.nix | 2 +- .../misc/syncthingtray/default.nix | 14 +- pkgs/applications/misc/synergy/default.nix | 16 +- pkgs/applications/misc/taizen/default.nix | 2 +- .../misc/terminal-typeracer/default.nix | 2 +- pkgs/applications/misc/tickrs/default.nix | 2 +- .../misc/translatelocally/default.nix | 2 +- pkgs/applications/misc/tthsum/default.nix | 4 +- .../applications/misc/tui-journal/default.nix | 2 +- pkgs/applications/misc/ubpm/default.nix | 2 +- pkgs/applications/misc/udict/default.nix | 2 +- pkgs/applications/misc/usb-reset/default.nix | 2 +- pkgs/applications/misc/vhs/default.nix | 2 +- pkgs/applications/misc/viking/default.nix | 4 +- pkgs/applications/misc/visidata/default.nix | 2 +- pkgs/applications/misc/wordnet/default.nix | 2 +- pkgs/applications/misc/workrave/default.nix | 2 +- pkgs/applications/misc/wthrr/default.nix | 2 +- pkgs/applications/misc/xmrig/default.nix | 2 +- pkgs/applications/misc/xmrig/proxy.nix | 2 +- pkgs/applications/misc/xpdf/default.nix | 4 +- pkgs/applications/misc/xygrib/default.nix | 4 +- .../misc/zathura/core/default.nix | 4 +- .../misc/zathura/pdf-mupdf/default.nix | 2 +- pkgs/applications/misc/zine/default.nix | 2 +- .../networking/adguardian/default.nix | 2 +- .../networking/avalanchego/default.nix | 2 +- .../networking/browsers/asuka/default.nix | 2 +- .../networking/browsers/brave/default.nix | 4 +- .../networking/browsers/brave/make-brave.nix | 4 +- .../networking/browsers/chromium/default.nix | 2 +- .../networking/browsers/elinks/default.nix | 4 +- .../networking/browsers/firefox/common.nix | 22 +- .../networking/browsers/firefox/wrapper.nix | 2 +- .../networking/browsers/kristall/default.nix | 2 +- .../networking/browsers/ladybird/default.nix | 12 +- .../networking/browsers/lagrange/default.nix | 4 +- .../networking/browsers/links2/default.nix | 6 +- .../networking/browsers/netsurf/browser.nix | 2 +- .../browsers/qutebrowser/default.nix | 4 +- .../networking/browsers/vivaldi/default.nix | 4 +- .../networking/browsers/w3m/default.nix | 6 +- .../networking/cloudflared/default.nix | 2 +- .../networking/cluster/click/default.nix | 6 +- .../networking/cluster/cmctl/default.nix | 2 +- .../networking/cluster/hadoop/default.nix | 10 +- .../networking/cluster/jx/default.nix | 2 +- .../networking/cluster/k3s/builder.nix | 4 +- .../networking/cluster/k9s/default.nix | 2 +- .../networking/cluster/kpt/default.nix | 2 +- .../kubectl-view-allocations/default.nix | 2 +- .../networking/cluster/lens/default.nix | 2 +- .../networking/cluster/minikube/default.nix | 6 +- .../cluster/node-problem-detector/default.nix | 8 +- .../networking/cluster/ocm/default.nix | 2 +- .../networking/cluster/rke2/builder.nix | 2 +- .../cluster/temporal-cli/default.nix | 2 +- .../networking/compactor/default.nix | 2 +- .../networking/diswall/default.nix | 2 +- .../networking/dyndns/dyndnsc/default.nix | 2 +- .../feedreaders/newsboat/default.nix | 8 +- .../feedreaders/rsstail/default.nix | 2 +- .../networking/feedreaders/russ/default.nix | 2 +- .../feedreaders/tuifeed/default.nix | 2 +- .../networking/ftp/filezilla/default.nix | 4 +- .../networking/gdrive3/default.nix | 2 +- .../networking/gopher/phetch/default.nix | 2 +- .../networking/gopher/sacc/default.nix | 2 +- .../networking/ids/suricata/default.nix | 2 +- .../networking/ids/zeek/broker/default.nix | 4 +- .../networking/ids/zeek/default.nix | 8 +- .../caprine-bin/default.nix | 2 +- .../chatterino2/default.nix | 4 +- .../instant-messengers/dino/default.nix | 4 +- .../instant-messengers/discord/default.nix | 10 +- .../element/element-desktop.nix | 4 +- .../element/keytar/default.nix | 6 +- .../element/seshat/default.nix | 2 +- .../instant-messengers/freetalk/default.nix | 4 +- .../instant-messengers/go-neb/default.nix | 2 +- .../instant-messengers/gomuks/default.nix | 2 +- .../instant-messengers/gurk-rs/default.nix | 4 +- .../instant-messengers/iamb/default.nix | 2 +- .../instant-messengers/jami/default.nix | 2 +- .../jitsi-meet-electron/default.nix | 10 +- .../instant-messengers/mikutter/default.nix | 8 +- .../instant-messengers/nchat/default.nix | 2 +- .../pantalaimon/default.nix | 2 +- .../instant-messengers/pidgin/default.nix | 12 +- .../pidgin-plugins/tdlib-purple/default.nix | 2 +- .../instant-messengers/qtox/default.nix | 6 +- .../instant-messengers/quaternion/default.nix | 2 +- .../instant-messengers/signal-cli/default.nix | 6 +- .../signalbackup-tools/default.nix | 6 +- .../instant-messengers/slack/default.nix | 2 +- .../instant-messengers/teamspeak/server.nix | 4 +- .../telegram/kotatogram-desktop/default.nix | 22 +- .../telegram/kotatogram-desktop/tg_owt.nix | 6 +- .../telegram/telegram-desktop/default.nix | 20 +- .../telegram/tg/default.nix | 2 +- .../telepathy/logger/default.nix | 2 +- .../telepathy/mission-control/default.nix | 2 +- .../instant-messengers/tensor/default.nix | 2 +- .../instant-messengers/twitch-tui/default.nix | 2 +- .../vk-messenger/default.nix | 2 +- .../wire-desktop/default.nix | 2 +- .../networking/irc/communi/default.nix | 6 +- .../networking/irc/convos/default.nix | 4 +- .../networking/irc/epic5/default.nix | 2 +- .../networking/irc/thelounge/default.nix | 2 +- .../networking/irc/tiny/default.nix | 10 +- .../networking/irc/weechat/default.nix | 12 +- .../scripts/weechat-matrix-bridge/default.nix | 2 +- .../networking/irc/wraith/default.nix | 2 +- pkgs/applications/networking/iroh/default.nix | 2 +- .../kubo-migrator/all-migrations.nix | 2 +- .../mailreaders/claws-mail/default.nix | 2 +- .../networking/mailreaders/mmh/default.nix | 2 +- .../mailreaders/sylpheed/default.nix | 4 +- .../applications/networking/mhost/default.nix | 2 +- .../networking/mkchromecast/default.nix | 6 +- pkgs/applications/networking/mpop/default.nix | 4 +- .../applications/networking/msmtp/default.nix | 4 +- .../networking/mujmap/default.nix | 2 +- .../networking/mullvad/openvpn.nix | 4 +- .../applications/networking/nload/default.nix | 2 +- pkgs/applications/networking/nym/default.nix | 2 +- .../networking/offrss/default.nix | 4 +- .../networking/omping/default.nix | 2 +- .../networking/onionshare/default.nix | 4 +- .../networking/p2p/eiskaltdcpp/default.nix | 2 +- .../p2p/enhanced-ctorrent/default.nix | 2 +- .../networking/p2p/mldonkey/default.nix | 2 +- .../networking/p2p/pyrosimple/default.nix | 2 +- .../networking/p2p/qbittorrent/default.nix | 6 +- .../networking/p2p/synapse-bt/default.nix | 2 +- .../networking/p2p/transmission/4.nix | 8 +- .../networking/p2p/tremc/default.nix | 4 +- .../applications/networking/pjsip/default.nix | 8 +- .../networking/qv2ray/default.nix | 4 +- .../remote/citrix-workspace/generic.nix | 2 +- .../remote/citrix-workspace/sources.nix | 6 +- .../networking/remote/freerdp/3.nix | 10 +- .../networking/remote/freerdp/default.nix | 10 +- .../networking/remote/putty/default.nix | 2 +- .../networking/remote/rdesktop/default.nix | 4 +- .../networking/remote/remmina/default.nix | 14 +- .../networking/rymdport/default.nix | 2 +- .../sniffers/qtwirediff/default.nix | 6 +- .../networking/sniffers/wireshark/default.nix | 12 +- .../networking/sniffnet/default.nix | 6 +- .../networking/sync/celeste/default.nix | 4 +- .../networking/sync/lsyncd/default.nix | 2 +- .../networking/sync/rclone/default.nix | 6 +- .../networking/syncplay/default.nix | 4 +- .../networking/syncthing/default.nix | 6 +- .../synology-drive-client/default.nix | 2 +- .../networking/umurmur/default.nix | 2 +- pkgs/applications/networking/warp/default.nix | 4 +- pkgs/applications/networking/yaup/default.nix | 2 +- pkgs/applications/office/PageEdit/default.nix | 2 +- pkgs/applications/office/appflowy/default.nix | 12 +- .../office/beamerpresenter/default.nix | 2 +- pkgs/applications/office/espanso/default.nix | 22 +- pkgs/applications/office/jameica/default.nix | 6 +- pkgs/applications/office/kitsas/default.nix | 4 +- .../office/libreoffice/wrapper.nix | 2 +- pkgs/applications/office/micropad/default.nix | 2 +- pkgs/applications/office/mmex/default.nix | 10 +- .../office/paperless-ngx/default.nix | 6 +- pkgs/applications/office/pympress/default.nix | 4 +- pkgs/applications/office/qnotero/default.nix | 2 +- .../applications/office/qownnotes/default.nix | 8 +- .../office/roam-research/default.nix | 2 +- pkgs/applications/office/scribus/default.nix | 2 +- .../office/treesheets/default.nix | 4 +- pkgs/applications/office/trilium/desktop.nix | 2 +- .../office/wordgrinder/default.nix | 8 +- pkgs/applications/office/zim/default.nix | 2 +- pkgs/applications/printing/pappl/default.nix | 2 +- pkgs/applications/radio/airspy/default.nix | 2 +- pkgs/applications/radio/csdr/default.nix | 4 +- pkgs/applications/radio/cubicsdr/default.nix | 4 +- pkgs/applications/radio/direwolf/default.nix | 4 +- pkgs/applications/radio/dump1090/default.nix | 2 +- pkgs/applications/radio/fldigi/default.nix | 2 +- pkgs/applications/radio/flex-ndax/default.nix | 2 +- pkgs/applications/radio/freedv/default.nix | 12 +- pkgs/applications/radio/gnuradio/3.8.nix | 4 +- pkgs/applications/radio/gnuradio/default.nix | 4 +- pkgs/applications/radio/gnuradio/shared.nix | 4 +- pkgs/applications/radio/gnuradio/wrapper.nix | 4 +- pkgs/applications/radio/limesuite/default.nix | 2 +- .../radio/m17-cxx-demod/default.nix | 2 +- .../radio/multimon-ng/default.nix | 2 +- pkgs/applications/radio/pat/default.nix | 4 +- pkgs/applications/radio/qdmr/default.nix | 2 +- pkgs/applications/radio/qlog/default.nix | 2 +- pkgs/applications/radio/rtl-sdr/default.nix | 2 +- pkgs/applications/radio/sdrplay/default.nix | 6 +- pkgs/applications/radio/sdrpp/default.nix | 6 +- .../radio/soapyairspy/default.nix | 2 +- .../applications/radio/soapyaudio/default.nix | 4 +- .../radio/soapybladerf/default.nix | 2 +- .../radio/soapyhackrf/default.nix | 2 +- .../radio/soapyremote/default.nix | 2 +- .../radio/soapyrtlsdr/default.nix | 2 +- pkgs/applications/radio/soapyuhd/default.nix | 2 +- pkgs/applications/radio/splat/default.nix | 2 +- pkgs/applications/radio/ubertooth/default.nix | 2 +- pkgs/applications/radio/uhd/default.nix | 4 +- .../science/astronomy/gildas/default.nix | 8 +- .../science/astronomy/gravit/default.nix | 2 +- .../science/astronomy/stellarium/default.nix | 10 +- .../science/biology/ants/default.nix | 2 +- .../science/biology/blast/bin.nix | 4 +- .../science/biology/blast/default.nix | 2 +- .../science/biology/bwa-mem2/default.nix | 2 +- .../science/biology/cmtk/default.nix | 2 +- .../science/biology/delly/default.nix | 2 +- .../science/biology/iqtree/default.nix | 2 +- .../science/biology/iv/default.nix | 2 +- .../science/biology/migrate/default.nix | 2 +- .../science/biology/minimap2/default.nix | 2 +- .../science/biology/mrtrix/default.nix | 2 +- .../science/biology/muscle/default.nix | 2 +- .../science/biology/nest/default.nix | 2 +- .../science/biology/neuron/default.nix | 2 +- .../science/biology/obitools/obitools3.nix | 2 +- .../science/biology/paml/default.nix | 2 +- .../science/biology/plink-ng/default.nix | 4 +- .../science/biology/repseek/default.nix | 2 +- .../science/biology/sortmerna/default.nix | 2 +- .../science/biology/subread/default.nix | 4 +- .../science/biology/svaba/default.nix | 2 +- .../science/biology/whisper/default.nix | 2 +- .../science/chemistry/apbs/default.nix | 2 +- .../chemistry/autodock-vina/default.nix | 2 +- .../science/chemistry/element/default.nix | 2 +- .../science/chemistry/ergoscf/default.nix | 2 +- .../science/chemistry/gwyddion/default.nix | 4 +- .../timeloop/default.nix | 6 +- .../science/electronics/dsview/default.nix | 4 +- .../science/electronics/flopoco/default.nix | 2 +- .../science/electronics/fritzing/default.nix | 4 +- .../science/electronics/gtkwave/default.nix | 2 +- .../hal-hardware-analyzer/default.nix | 4 +- .../science/electronics/kicad/base.nix | 2 +- .../science/electronics/kicad/default.nix | 6 +- .../electronics/nanovna-saver/default.nix | 2 +- .../electronics/openboardview/default.nix | 6 +- .../science/electronics/pulseview/default.nix | 4 +- .../science/electronics/sv-lang/default.nix | 2 +- .../science/electronics/tkgate/1.x.nix | 4 +- .../science/electronics/verilator/default.nix | 2 +- .../science/electronics/xschem/default.nix | 2 +- .../science/electronics/xyce/default.nix | 2 +- .../science/logic/alt-ergo/default.nix | 2 +- .../science/logic/boolector/default.nix | 6 +- .../science/logic/btor2tools/default.nix | 2 +- .../science/logic/cbmc/default.nix | 2 +- .../science/logic/cvc4/default.nix | 4 +- .../science/logic/elan/default.nix | 4 +- .../science/logic/formula/default.nix | 4 +- .../science/logic/hol/default.nix | 2 +- .../science/logic/key/default.nix | 2 +- .../science/logic/lean/default.nix | 2 +- .../science/logic/lean2/default.nix | 2 +- .../logic/logisim-evolution/default.nix | 2 +- .../science/logic/logisim/default.nix | 2 +- .../science/logic/mcrl2/default.nix | 2 +- .../science/logic/nuXmv/default.nix | 8 +- .../science/logic/open-wbo/default.nix | 2 +- .../science/logic/opensmt/default.nix | 2 +- .../science/logic/picosat/default.nix | 2 +- .../science/logic/satallax/default.nix | 4 +- .../science/logic/tamarin-prover/default.nix | 2 +- .../finalfrontier/default.nix | 2 +- .../finalfusion-utils/default.nix | 2 +- pkgs/applications/science/math/R/default.nix | 6 +- .../science/math/caffe/default.nix | 2 +- .../science/math/cemu-ti/default.nix | 2 +- .../science/math/colpack/default.nix | 2 +- .../applications/science/math/ecm/default.nix | 2 +- .../science/math/geogebra/default.nix | 2 +- .../science/math/geogebra/geogebra6.nix | 2 +- .../science/math/giac/default.nix | 4 +- .../science/math/ginac/default.nix | 2 +- .../science/math/gmsh/default.nix | 2 +- .../science/math/lp_solve/default.nix | 8 +- .../science/math/palp/default.nix | 2 +- .../science/math/qalculate-gtk/default.nix | 2 +- .../science/math/qalculate-qt/default.nix | 4 +- .../science/math/ratpoints/default.nix | 2 +- .../science/math/scalp/default.nix | 2 +- .../science/math/scilab-bin/default.nix | 2 +- .../science/math/singular/default.nix | 4 +- .../science/math/speedcrunch/default.nix | 2 +- .../science/misc/gplates/default.nix | 2 +- .../science/misc/graphia/default.nix | 2 +- .../science/misc/openmvg/default.nix | 2 +- .../science/misc/openmvs/default.nix | 2 +- .../science/misc/openrefine/default.nix | 2 +- .../science/misc/reason-shell/default.nix | 2 +- .../science/misc/rink/default.nix | 2 +- pkgs/applications/science/misc/root/5.nix | 8 +- .../science/misc/root/default.nix | 10 +- .../science/misc/simgrid/default.nix | 2 +- .../science/misc/tulip/default.nix | 8 +- .../molecular-dynamics/gromacs/default.nix | 2 +- .../science/physics/crystfel/default.nix | 8 +- .../science/physics/fasthenry/default.nix | 2 +- .../science/physics/professor/default.nix | 2 +- .../science/physics/sacrifice/default.nix | 6 +- .../science/physics/sherpa/default.nix | 2 +- .../science/physics/xfitter/default.nix | 2 +- .../science/physics/xnec2c/default.nix | 2 +- .../science/robotics/mavproxy/default.nix | 2 +- pkgs/applications/search/recoll/default.nix | 10 +- pkgs/applications/system/glances/default.nix | 6 +- .../terminal-emulators/alacritty/default.nix | 8 +- .../terminal-emulators/contour/default.nix | 10 +- .../cool-retro-term/default.nix | 2 +- .../terminal-emulators/kitty/default.nix | 24 +- .../terminal-emulators/mlterm/default.nix | 16 +- .../terminal-emulators/rio/default.nix | 12 +- .../rxvt-unicode/default.nix | 2 +- .../terminal-emulators/st/default.nix | 2 +- .../terminal-emulators/syncterm/default.nix | 6 +- .../terminal-emulators/termite/default.nix | 2 +- .../terminal-emulators/wezterm/default.nix | 12 +- .../terminal-emulators/x3270/default.nix | 6 +- .../version-management/bcompare/default.nix | 2 +- .../version-management/blackbox/default.nix | 2 +- .../version-management/cvs/default.nix | 2 +- .../version-management/delta/default.nix | 4 +- .../version-management/fnc/default.nix | 2 +- .../version-management/fossil/default.nix | 2 +- .../version-management/gfold/default.nix | 2 +- .../version-management/git-absorb/default.nix | 2 +- .../git-branchless/default.nix | 2 +- .../git-cinnabar/default.nix | 2 +- .../version-management/git-cliff/default.nix | 2 +- .../version-management/git-cola/default.nix | 4 +- .../git-credential-keepassxc/default.nix | 2 +- .../version-management/git-dive/default.nix | 2 +- .../version-management/git-gone/default.nix | 2 +- .../version-management/git-graph/default.nix | 2 +- .../version-management/git-ignore/default.nix | 2 +- .../git-interactive-rebase-tool/default.nix | 2 +- .../version-management/git-mit/default.nix | 2 +- .../version-management/git-nomad/default.nix | 2 +- .../git-quickfix/default.nix | 2 +- .../version-management/git-radar/default.nix | 2 +- .../version-management/git-series/default.nix | 4 +- .../version-management/git-stack/default.nix | 2 +- .../version-management/git-sync/default.nix | 2 +- .../version-management/git-trim/default.nix | 2 +- .../git-workspace/default.nix | 2 +- .../version-management/git/default.nix | 26 +- .../version-management/gitkraken/default.nix | 2 +- .../version-management/gitnr/default.nix | 4 +- .../version-management/gitoxide/default.nix | 2 +- .../version-management/gittyup/default.nix | 4 +- .../version-management/guilt/default.nix | 2 +- .../lucky-commit/default.nix | 2 +- .../version-management/mercurial/default.nix | 2 +- .../version-management/p4/default.nix | 12 +- .../version-management/p4d/default.nix | 2 +- .../version-management/p4v/default.nix | 2 +- .../version-management/pijul/default.nix | 2 +- .../version-management/rapidsvn/default.nix | 2 +- .../version-management/sapling/default.nix | 6 +- .../silver-platter/default.nix | 6 +- .../version-management/stgit/default.nix | 2 +- .../sublime-merge/common.nix | 2 +- .../version-management/subversion/default.nix | 2 +- .../version-management/tig/default.nix | 2 +- .../version-management/yadm/default.nix | 2 +- pkgs/applications/video/dmlive/default.nix | 2 +- .../applications/video/glaxnimate/default.nix | 2 +- pkgs/applications/video/gnomecast/default.nix | 2 +- pkgs/applications/video/go2tv/default.nix | 2 +- pkgs/applications/video/gpac/default.nix | 4 +- .../video/hyperion-ng/default.nix | 4 +- .../video/jellyfin-media-player/default.nix | 8 +- pkgs/applications/video/lxdvdrip/default.nix | 2 +- pkgs/applications/video/mirakurun/default.nix | 2 +- .../applications/video/mkvtoolnix/default.nix | 4 +- pkgs/applications/video/mlv-app/default.nix | 2 +- pkgs/applications/video/motion/default.nix | 2 +- pkgs/applications/video/mpc-qt/default.nix | 2 +- pkgs/applications/video/mplayer/default.nix | 12 +- pkgs/applications/video/mpv/default.nix | 46 ++-- .../video/mpv/scripts/videoclip.nix | 2 +- pkgs/applications/video/mpv/wrapper.nix | 2 +- pkgs/applications/video/natron/default.nix | 2 +- .../applications/video/obs-studio/default.nix | 8 +- .../obs-studio/plugins/input-overlay.nix | 2 +- .../obs-studio/plugins/obs-vkcapture.nix | 4 +- .../video/olive-editor/default.nix | 4 +- .../video/openshot-qt/default.nix | 4 +- pkgs/applications/video/pyca/default.nix | 2 +- .../video/qmediathekview/default.nix | 2 +- .../video/qstopmotion/default.nix | 2 +- pkgs/applications/video/sub-batch/default.nix | 2 +- pkgs/applications/video/vcs/default.nix | 2 +- .../video/youtube-tui/default.nix | 4 +- .../virtualization/OVMF/default.nix | 2 +- .../cloud-hypervisor/default.nix | 2 +- .../virtualization/colima/default.nix | 4 +- .../virtualization/docker/default.nix | 16 +- .../virtualization/krunvm/default.nix | 6 +- pkgs/applications/virtualization/lima/bin.nix | 4 +- .../virtualization/lima/default.nix | 4 +- .../virtualization/lkl/default.nix | 2 +- .../virtualization/podman-desktop/default.nix | 2 +- .../virtualization/podman/default.nix | 18 +- .../virtualization/qemu/default.nix | 36 +-- .../virtualization/rvvm/default.nix | 2 +- .../virtualization/sail-riscv/default.nix | 2 +- .../virtualization/virt-manager/default.nix | 2 +- .../virtualization/virt-viewer/default.nix | 2 +- .../virtualization/virtualbox/default.nix | 2 +- .../virtualization/xhyve/default.nix | 2 +- .../window-managers/hyprwm/hypr/default.nix | 2 +- .../hyprwm/hyprpaper/default.nix | 2 +- .../window-managers/i3/default.nix | 2 +- .../window-managers/i3/lock-blur.nix | 2 +- .../window-managers/i3/lock-color.nix | 2 +- .../window-managers/owl/default.nix | 14 +- .../window-managers/spectrwm/default.nix | 2 +- .../add-driver-runpath/default.nix | 2 +- pkgs/build-support/agda/default.nix | 2 +- .../alternatives/lapack/default.nix | 2 +- .../build-bazel-package/default.nix | 2 +- .../build-fhsenv-bubblewrap/buildFHSEnv.nix | 2 +- .../build-graalvm-native-image/default.nix | 4 +- .../dart/build-dart-application/default.nix | 2 +- pkgs/build-support/docker/default.nix | 2 +- .../dotnet/fetch-nupkg/overrides.nix | 4 +- pkgs/build-support/libredirect/default.nix | 10 +- pkgs/build-support/mitm-cache/default.nix | 2 +- .../node/build-npm-package/default.nix | 2 +- .../rust/build-rust-crate/default.nix | 2 +- .../rust/build-rust-crate/test/default.nix | 4 +- .../rust/default-crate-overrides.nix | 6 +- pkgs/build-support/rust/lib/default.nix | 2 +- .../default.nix | 2 +- .../setup-hooks/wrap-gapps-hook/default.nix | 6 +- pkgs/build-support/writers/scripts.nix | 4 +- pkgs/by-name/_6/_64gram/package.nix | 2 +- pkgs/by-name/_9/_9base/package.nix | 2 +- pkgs/by-name/a5/a52dec/package.nix | 4 +- pkgs/by-name/ab/abctl/package.nix | 2 +- pkgs/by-name/ac/acpica-tools/package.nix | 2 +- pkgs/by-name/ae/aegisub/package.nix | 8 +- pkgs/by-name/ag/agate/package.nix | 2 +- .../ag/age-plugin-fido2-hmac/package.nix | 2 +- pkgs/by-name/ai/aiken/package.nix | 2 +- pkgs/by-name/al/aligator/package.nix | 2 +- pkgs/by-name/am/amazon-ssm-agent/package.nix | 4 +- pkgs/by-name/am/amfora/package.nix | 2 +- pkgs/by-name/am/amp/package.nix | 2 +- pkgs/by-name/an/anchor/package.nix | 2 +- .../an/android-studio-tools/package.nix | 2 +- pkgs/by-name/an/anyrun/package.nix | 4 +- pkgs/by-name/ar/arcan/package.nix | 2 +- pkgs/by-name/ar/arduino-cli/package.nix | 6 +- pkgs/by-name/ar/armitage/package.nix | 4 +- pkgs/by-name/ar/arrow-cpp/package.nix | 14 +- pkgs/by-name/as/asfa/package.nix | 2 +- pkgs/by-name/as/asl/package.nix | 2 +- pkgs/by-name/at/atac/package.nix | 2 +- pkgs/by-name/at/atf/package.nix | 4 +- pkgs/by-name/at/atlauncher/package.nix | 4 +- pkgs/by-name/at/attic-client/package.nix | 2 +- pkgs/by-name/at/attract-mode/package.nix | 6 +- pkgs/by-name/at/atuin/package.nix | 4 +- pkgs/by-name/au/autopsy/package.nix | 2 +- pkgs/by-name/av/avbroot/package.nix | 2 +- pkgs/by-name/aw/aws-sso-cli/package.nix | 2 +- pkgs/by-name/aw/aws-vault/package.nix | 2 +- pkgs/by-name/az/azure-cli/package.nix | 2 +- pkgs/by-name/az/azure-cli/python-packages.nix | 2 +- pkgs/by-name/az/azurite/package.nix | 4 +- pkgs/by-name/ba/barrage/package.nix | 2 +- pkgs/by-name/ba/bat/package.nix | 2 +- pkgs/by-name/ba/batmon/package.nix | 2 +- pkgs/by-name/bc/bcc/package.nix | 2 +- pkgs/by-name/bd/bdf2ttf/package.nix | 2 +- pkgs/by-name/bi/bicep/package.nix | 2 +- pkgs/by-name/bi/binsider/package.nix | 2 +- pkgs/by-name/bi/biome/package.nix | 2 +- pkgs/by-name/bi/bite/package.nix | 8 +- pkgs/by-name/bi/bitwarden-cli/package.nix | 2 +- pkgs/by-name/bl/blastem/package.nix | 2 +- pkgs/by-name/bl/bleep/package.nix | 4 +- pkgs/by-name/bl/blockattack/package.nix | 2 +- pkgs/by-name/bl/blockbench/package.nix | 8 +- pkgs/by-name/bo/bochs/package.nix | 8 +- pkgs/by-name/bo/boehmgc/package.nix | 4 +- pkgs/by-name/bo/boinctui/package.nix | 2 +- pkgs/by-name/br/bruno/package.nix | 10 +- pkgs/by-name/bs/bsc/package.nix | 2 +- pkgs/by-name/bu/buckle/package.nix | 2 +- pkgs/by-name/bu/bulk_extractor/package.nix | 2 +- pkgs/by-name/bu/bulloak/package.nix | 2 +- pkgs/by-name/bu/bunbun/package.nix | 2 +- pkgs/by-name/bu/bup/package.nix | 2 +- pkgs/by-name/bu/bustle/package.nix | 4 +- pkgs/by-name/c2/c2patool/package.nix | 2 +- pkgs/by-name/ca/cadzinho/package.nix | 4 +- pkgs/by-name/ca/caligula/package.nix | 2 +- pkgs/by-name/ca/caprine/package.nix | 4 +- pkgs/by-name/ca/cargo-bump/package.nix | 2 +- pkgs/by-name/ca/cargo-geiger/package.nix | 4 +- pkgs/by-name/ca/cargo-i18n/package.nix | 2 +- pkgs/by-name/ca/cargo-information/package.nix | 2 +- pkgs/by-name/ca/cargo-make/package.nix | 2 +- pkgs/by-name/ca/cargo-raze/package.nix | 4 +- pkgs/by-name/ca/cargo-rdme/package.nix | 2 +- pkgs/by-name/ca/cargo-unfmt/package.nix | 2 +- pkgs/by-name/ca/cargo-vibe/package.nix | 4 +- pkgs/by-name/ca/cargo-wasi/package.nix | 4 +- pkgs/by-name/ca/cargo-xwin/package.nix | 2 +- pkgs/by-name/ca/casadi/package.nix | 4 +- pkgs/by-name/ca/castxml/package.nix | 4 +- pkgs/by-name/cb/cbftp/package.nix | 2 +- pkgs/by-name/cc/ccache/package.nix | 4 +- pkgs/by-name/cc/cctools/package.nix | 4 +- pkgs/by-name/ce/centerpiece/package.nix | 2 +- pkgs/by-name/ch/chatd/package.nix | 8 +- pkgs/by-name/ch/chawan/package.nix | 2 +- pkgs/by-name/ch/chow-tape-model/package.nix | 2 +- pkgs/by-name/ci/cinny-unwrapped/package.nix | 4 +- pkgs/by-name/cl/clickable/package.nix | 2 +- pkgs/by-name/cl/clipcat/package.nix | 2 +- pkgs/by-name/cl/cloudlogoffline/package.nix | 10 +- pkgs/by-name/cm/cmake/package.nix | 16 +- pkgs/by-name/co/code2prompt/package.nix | 2 +- pkgs/by-name/co/codeberg-cli/package.nix | 2 +- pkgs/by-name/co/codeium/package.nix | 2 +- pkgs/by-name/co/comet-gog/package.nix | 2 +- pkgs/by-name/co/committed/package.nix | 2 +- pkgs/by-name/co/conduwuit/package.nix | 8 +- pkgs/by-name/co/construct/package.nix | 2 +- pkgs/by-name/co/convco/package.nix | 2 +- pkgs/by-name/co/convmv/package.nix | 2 +- pkgs/by-name/co/cook-cli/package.nix | 2 +- pkgs/by-name/co/costa/package.nix | 2 +- pkgs/by-name/co/coyim/package.nix | 2 +- pkgs/by-name/cp/cppcheck/package.nix | 2 +- pkgs/by-name/cp/cpuinfo/package.nix | 2 +- pkgs/by-name/cr/crabfit-api/package.nix | 2 +- pkgs/by-name/cr/cronutils/package.nix | 2 +- pkgs/by-name/cr/crunchy-cli/package.nix | 6 +- pkgs/by-name/cy/cyme/package.nix | 4 +- pkgs/by-name/cz/czkawka/package.nix | 2 +- pkgs/by-name/da/darklua/package.nix | 2 +- pkgs/by-name/da/darktable/package.nix | 10 +- pkgs/by-name/da/darling-dmg/package.nix | 2 +- pkgs/by-name/db/dbd/package.nix | 2 +- pkgs/by-name/db/dbeaver-bin/package.nix | 8 +- pkgs/by-name/db/dbgate/package.nix | 2 +- pkgs/by-name/db/dbqn/package.nix | 2 +- pkgs/by-name/de/debase/package.nix | 8 +- pkgs/by-name/de/deltachat-desktop/package.nix | 4 +- pkgs/by-name/de/deploy-rs/package.nix | 2 +- pkgs/by-name/de/devenv/package.nix | 2 +- pkgs/by-name/de/dezoomify-rs/package.nix | 2 +- pkgs/by-name/di/dialog/package.nix | 2 +- pkgs/by-name/di/diesel-cli/package.nix | 4 +- pkgs/by-name/di/dim/package.nix | 2 +- pkgs/by-name/di/disarchive/package.nix | 2 +- pkgs/by-name/di/discord-gamesdk/package.nix | 2 +- pkgs/by-name/dm/dmd/generic.nix | 10 +- pkgs/by-name/do/docfd/package.nix | 2 +- pkgs/by-name/do/docuum/package.nix | 2 +- pkgs/by-name/do/dogedns/package.nix | 6 +- pkgs/by-name/do/dosbox-staging/package.nix | 4 +- pkgs/by-name/do/dotter/package.nix | 2 +- pkgs/by-name/ds/dssat/package.nix | 4 +- pkgs/by-name/du/dub/package.nix | 2 +- pkgs/by-name/du/dublin-traceroute/package.nix | 2 +- pkgs/by-name/du/dumbpipe/package.nix | 2 +- pkgs/by-name/du/dummyhttp/package.nix | 2 +- pkgs/by-name/du/dune3d/package.nix | 6 +- pkgs/by-name/du/dust/package.nix | 2 +- pkgs/by-name/dx/dxvk/package.nix | 4 +- pkgs/by-name/ea/easytier/package.nix | 6 +- pkgs/by-name/ed/edk2/package.nix | 12 +- pkgs/by-name/ek/ekho/package.nix | 2 +- pkgs/by-name/en/en-croissant/package.nix | 18 +- pkgs/by-name/en/envio/package.nix | 2 +- pkgs/by-name/en/envoy/package.nix | 2 +- pkgs/by-name/ep/epoll-shim/package.nix | 2 +- pkgs/by-name/es/eslint/package.nix | 2 +- pkgs/by-name/es/espflash/package.nix | 4 +- pkgs/by-name/ev/evebox/package.nix | 2 +- .../ev/evolution-data-server/package.nix | 8 +- pkgs/by-name/ew/eww/package.nix | 2 +- pkgs/by-name/ex/ext4fuse/package.nix | 2 +- pkgs/by-name/ez/eza/package.nix | 2 +- pkgs/by-name/fa/facter/package.nix | 2 +- pkgs/by-name/fa/fail2ban/package.nix | 4 +- pkgs/by-name/fa/fastfetch/package.nix | 12 +- pkgs/by-name/fa/fastqc/package.nix | 4 +- pkgs/by-name/fa/fatrop/package.nix | 2 +- pkgs/by-name/fe/febio-studio/package.nix | 2 +- pkgs/by-name/fe/febio/package.nix | 4 +- pkgs/by-name/fe/fedimint/package.nix | 4 +- pkgs/by-name/fe/feishin/package.nix | 14 +- pkgs/by-name/fi/fim-rs/package.nix | 2 +- pkgs/by-name/fi/firefoxpwa/package.nix | 2 +- pkgs/by-name/fi/fittrackee/package.nix | 2 +- pkgs/by-name/fj/fjo/package.nix | 2 +- pkgs/by-name/fl/flake-checker/package.nix | 2 +- pkgs/by-name/fl/flake-edit/package.nix | 2 +- pkgs/by-name/fl/flameshot/package.nix | 16 +- pkgs/by-name/fl/flashgbx/package.nix | 2 +- pkgs/by-name/fl/flashprog/package.nix | 12 +- pkgs/by-name/fl/flatter/package.nix | 2 +- pkgs/by-name/fl/flawz/package.nix | 2 +- pkgs/by-name/fl/flip-link/package.nix | 2 +- pkgs/by-name/fl/flite/package.nix | 4 +- pkgs/by-name/fl/fluent-bit/package.nix | 10 +- pkgs/by-name/fo/forgejo-cli/package.nix | 2 +- pkgs/by-name/fo/forgejo/generic.nix | 2 +- pkgs/by-name/fo/formatjson5/package.nix | 2 +- pkgs/by-name/fo/fortune-kind/package.nix | 2 +- pkgs/by-name/fr/frankenphp/package.nix | 8 +- pkgs/by-name/fr/freecad/package.nix | 2 +- pkgs/by-name/fr/fretboard/package.nix | 4 +- pkgs/by-name/ft/ftgl/package.nix | 2 +- pkgs/by-name/fu/furmark/package.nix | 2 +- pkgs/by-name/fw/fwupd/package.nix | 2 +- pkgs/by-name/fy/fyne/package.nix | 2 +- pkgs/by-name/ga/gambit-project/package.nix | 2 +- pkgs/by-name/ga/gavin-bc/package.nix | 2 +- pkgs/by-name/gc/gcs/package.nix | 4 +- pkgs/by-name/gd/gdlv/package.nix | 4 +- pkgs/by-name/ge/gen-license/package.nix | 2 +- pkgs/by-name/ge/geoserver/package.nix | 2 +- pkgs/by-name/ge/gepetto-viewer/package.nix | 8 +- pkgs/by-name/ge/gex/package.nix | 2 +- pkgs/by-name/gf/gfal2/package.nix | 2 +- pkgs/by-name/gh/ghciwatch/package.nix | 2 +- pkgs/by-name/gh/ghex/package.nix | 2 +- pkgs/by-name/gi/girouette/package.nix | 2 +- pkgs/by-name/gi/git-agecrypt/package.nix | 2 +- pkgs/by-name/gi/git-gr/package.nix | 6 +- pkgs/by-name/gi/git-igitt/package.nix | 2 +- pkgs/by-name/gi/git-instafix/package.nix | 2 +- pkgs/by-name/gi/git-together/package.nix | 2 +- pkgs/by-name/gi/gitbutler/package.nix | 8 +- pkgs/by-name/gi/github-runner/package.nix | 6 +- pkgs/by-name/gi/gitlab-ci-ls/package.nix | 2 +- .../by-name/gi/gitlab-release-cli/package.nix | 2 +- pkgs/by-name/gi/gitlab-timelogs/package.nix | 2 +- pkgs/by-name/gi/gitu/package.nix | 2 +- pkgs/by-name/gi/gitui/package.nix | 4 +- pkgs/by-name/gl/glfw3/package.nix | 14 +- pkgs/by-name/gl/glrnvim/package.nix | 2 +- pkgs/by-name/gm/gmetronome/package.nix | 2 +- pkgs/by-name/gm/gmic/package.nix | 2 +- pkgs/by-name/gn/gnome-maps/package.nix | 2 +- pkgs/by-name/gn/gnucap/package.nix | 2 +- pkgs/by-name/gn/gnucobol/package.nix | 4 +- pkgs/by-name/go/go-ethereum/package.nix | 2 +- pkgs/by-name/go/gobang/package.nix | 2 +- pkgs/by-name/go/goofcord/package.nix | 2 +- pkgs/by-name/go/google-chrome/package.nix | 2 +- pkgs/by-name/go/goss/package.nix | 2 +- pkgs/by-name/go/gossip/package.nix | 8 +- pkgs/by-name/go/got/package.nix | 12 +- pkgs/by-name/gp/gpscorrelate/package.nix | 2 +- pkgs/by-name/gp/gptscript/package.nix | 2 +- pkgs/by-name/gr/grafana-alloy/package.nix | 4 +- pkgs/by-name/gu/guile-avahi/package.nix | 2 +- pkgs/by-name/gu/guile-chickadee/package.nix | 4 +- pkgs/by-name/gu/guile-goblins/package.nix | 2 +- pkgs/by-name/gu/guile-lzlib/package.nix | 2 +- pkgs/by-name/gu/guile-lzma/package.nix | 2 +- pkgs/by-name/gu/guile-quickcheck/package.nix | 2 +- pkgs/by-name/gu/guile-zstd/package.nix | 2 +- pkgs/by-name/ha/halloy/package.nix | 8 +- pkgs/by-name/ha/handbrake/package.nix | 14 +- pkgs/by-name/ha/harvid/package.nix | 4 +- pkgs/by-name/ha/hatch/package.nix | 8 +- pkgs/by-name/ha/havoc/package.nix | 2 +- pkgs/by-name/ha/haylxon/package.nix | 2 +- pkgs/by-name/he/hercules/package.nix | 2 +- pkgs/by-name/hi/hieroglyphic/package.nix | 2 +- pkgs/by-name/hi/himalaya/package.nix | 4 +- pkgs/by-name/ho/hoppscotch/package.nix | 2 +- pkgs/by-name/hp/hpipm/package.nix | 2 +- pkgs/by-name/ht/htb-toolkit/package.nix | 4 +- pkgs/by-name/ht/htcondor/package.nix | 2 +- pkgs/by-name/ht/httpdirfs/package.nix | 4 +- pkgs/by-name/ht/httptoolkit/package.nix | 6 +- pkgs/by-name/hu/hurl/package.nix | 2 +- pkgs/by-name/hy/hydra/package.nix | 2 +- pkgs/by-name/im/immersed-vr/package.nix | 2 +- pkgs/by-name/im/implot/demos/default.nix | 2 +- pkgs/by-name/in/inshellisense/package.nix | 4 +- pkgs/by-name/in/inv-sig-helper/package.nix | 2 +- pkgs/by-name/ip/ipxe/package.nix | 6 +- pkgs/by-name/ir/iredis/package.nix | 2 +- pkgs/by-name/is/isabelle/package.nix | 16 +- pkgs/by-name/iv/iverilog/package.nix | 4 +- pkgs/by-name/j/j/package.nix | 16 +- .../jd/jdt-language-server/package.nix | 2 +- pkgs/by-name/je/jellyfin-web/package.nix | 6 +- pkgs/by-name/ji/jikken/package.nix | 2 +- pkgs/by-name/jn/jnv/package.nix | 2 +- pkgs/by-name/jo/job-security/package.nix | 2 +- pkgs/by-name/jo/jogl/package.nix | 8 +- pkgs/by-name/jo/joshuto/package.nix | 2 +- pkgs/by-name/jo/josm/package.nix | 4 +- pkgs/by-name/jo/jove/package.nix | 2 +- pkgs/by-name/ju/just/package.nix | 2 +- pkgs/by-name/ju/justbuild/package.nix | 4 +- pkgs/by-name/jw/jwasm/package.nix | 2 +- pkgs/by-name/ka/kakoune-lsp/package.nix | 2 +- pkgs/by-name/ka/kana/package.nix | 2 +- pkgs/by-name/ka/kanha/package.nix | 2 +- pkgs/by-name/ka/kanidm/package.nix | 4 +- pkgs/by-name/kc/kcl/package.nix | 4 +- pkgs/by-name/kc/kclvm/package.nix | 4 +- pkgs/by-name/kc/kclvm_cli/package.nix | 2 +- pkgs/by-name/ke/keeweb/package.nix | 2 +- pkgs/by-name/ke/keycard-cli/package.nix | 2 +- pkgs/by-name/ke/keydb/package.nix | 8 +- pkgs/by-name/ki/kissfft/package.nix | 2 +- pkgs/by-name/kn/knxd/package.nix | 4 +- pkgs/by-name/ko/koboldcpp/package.nix | 12 +- pkgs/by-name/ko/kokkos/package.nix | 2 +- pkgs/by-name/ko/komac/package.nix | 2 +- pkgs/by-name/ko/koodo-reader/package.nix | 8 +- pkgs/by-name/ky/kyua/package.nix | 4 +- pkgs/by-name/la/lan-mouse/package.nix | 2 +- pkgs/by-name/la/lanraragi/package.nix | 2 +- pkgs/by-name/la/laszip/package.nix | 2 +- pkgs/by-name/la/lazymc/package.nix | 2 +- pkgs/by-name/la/lazysql/package.nix | 2 +- pkgs/by-name/lb/lbreakouthd/package.nix | 2 +- pkgs/by-name/ld/ld64/package.nix | 2 +- pkgs/by-name/le/leaf/package.nix | 2 +- pkgs/by-name/le/legba/package.nix | 2 +- pkgs/by-name/li/liana/package.nix | 2 +- pkgs/by-name/li/lianad/package.nix | 2 +- pkgs/by-name/li/lib25519/package.nix | 4 +- pkgs/by-name/li/libarchive/package.nix | 8 +- pkgs/by-name/li/libaribcaption/package.nix | 4 +- pkgs/by-name/li/libcaca/package.nix | 2 +- pkgs/by-name/li/libclipboard/package.nix | 2 +- pkgs/by-name/li/libcpucycles/package.nix | 2 +- pkgs/by-name/li/libdeltachat/package.nix | 4 +- pkgs/by-name/li/libetebase/package.nix | 2 +- pkgs/by-name/li/libewf-legacy/package.nix | 2 +- pkgs/by-name/li/libgedit-amtk/package.nix | 2 +- pkgs/by-name/li/libhttpserver/package.nix | 2 +- pkgs/by-name/li/libiconv-darwin/package.nix | 2 +- pkgs/by-name/li/libisoburn/package.nix | 4 +- pkgs/by-name/li/libisofs/package.nix | 4 +- pkgs/by-name/li/libmpd/package.nix | 2 +- pkgs/by-name/li/libmpdclient/package.nix | 2 +- pkgs/by-name/li/libopus/package.nix | 2 +- pkgs/by-name/li/libplacebo_5/package.nix | 2 +- pkgs/by-name/li/librandombytes/package.nix | 2 +- pkgs/by-name/li/librep/package.nix | 2 +- pkgs/by-name/li/librum/package.nix | 4 +- pkgs/by-name/li/libsignal-ffi/package.nix | 4 +- pkgs/by-name/li/libspatialindex/package.nix | 4 +- pkgs/by-name/li/libtapi/package.nix | 2 +- .../li/libtorrent-rasterbar-1_2_x/package.nix | 4 +- .../li/libtorrent-rasterbar-2_0_x/package.nix | 2 +- pkgs/by-name/li/libtoxcore/package.nix | 2 +- pkgs/by-name/li/libui-ng/package.nix | 6 +- pkgs/by-name/li/licensure/package.nix | 2 +- pkgs/by-name/li/lightning/package.nix | 2 +- pkgs/by-name/li/lightningcss/package.nix | 2 +- pkgs/by-name/li/littlefs-fuse/package.nix | 2 +- pkgs/by-name/li/live-server/package.nix | 2 +- pkgs/by-name/li/live555/package.nix | 6 +- pkgs/by-name/ll/llama-cpp/package.nix | 6 +- pkgs/by-name/ll/llm-ls/package.nix | 2 +- pkgs/by-name/lm/lmstudio/package.nix | 2 +- pkgs/by-name/lo/localsend/package.nix | 2 +- pkgs/by-name/lo/logseq/package.nix | 14 +- pkgs/by-name/lp/lpairs2/package.nix | 2 +- pkgs/by-name/lr/lrcget/package.nix | 4 +- pkgs/by-name/ls/lsd/package.nix | 2 +- pkgs/by-name/ls/lsd2dsl/package.nix | 2 +- pkgs/by-name/lt/ltris/package.nix | 2 +- pkgs/by-name/lz/lzlib/package.nix | 2 +- .../ma/maa-assistant-arknights/package.nix | 2 +- pkgs/by-name/ma/maa-cli/package.nix | 2 +- pkgs/by-name/ma/manga-tui/package.nix | 2 +- pkgs/by-name/ma/mapcache/package.nix | 2 +- pkgs/by-name/ma/mariadb-galera/package.nix | 2 +- pkgs/by-name/ma/markuplinkchecker/package.nix | 2 +- pkgs/by-name/ma/massdns/package.nix | 2 +- .../matrix-authentication-service/package.nix | 2 +- .../ma/matrix-commander-rs/package.nix | 2 +- pkgs/by-name/ma/matugen/package.nix | 2 +- pkgs/by-name/ma/maturin/package.nix | 2 +- pkgs/by-name/mc/mcumgr-client/package.nix | 4 +- pkgs/by-name/md/md-tui/package.nix | 2 +- pkgs/by-name/md/mdbook-alerts/package.nix | 2 +- pkgs/by-name/md/mdbook-d2/package.nix | 2 +- pkgs/by-name/md/mdbook/package.nix | 2 +- pkgs/by-name/me/mediainfo-gui/package.nix | 2 +- pkgs/by-name/me/megatools/package.nix | 2 +- pkgs/by-name/me/meli/package.nix | 2 +- pkgs/by-name/me/melonDS/package.nix | 6 +- pkgs/by-name/me/memtest_vulkan/package.nix | 2 +- pkgs/by-name/me/merkaartor/package.nix | 4 +- pkgs/by-name/me/meson/package.nix | 8 +- pkgs/by-name/me/mesonlsp/package.nix | 4 +- pkgs/by-name/me/metronome/package.nix | 2 +- pkgs/by-name/mi/miru/package.nix | 2 +- pkgs/by-name/mi/mistral-rs/package.nix | 8 +- pkgs/by-name/ml/mlx42/package.nix | 2 +- .../mo/modrinth-app-unwrapped/package.nix | 10 +- pkgs/by-name/mo/modrinth-app/package.nix | 4 +- pkgs/by-name/mo/mold/package.nix | 6 +- pkgs/by-name/mo/mollysocket/package.nix | 2 +- pkgs/by-name/mo/mongodb-ce/package.nix | 2 +- pkgs/by-name/mo/moonlight-qt/package.nix | 10 +- pkgs/by-name/mp/mpris-notifier/package.nix | 2 +- pkgs/by-name/mq/mqtt-explorer/package.nix | 8 +- pkgs/by-name/mq/mqttui/package.nix | 2 +- pkgs/by-name/mu/mujoco/package.nix | 2 +- pkgs/by-name/mu/mullvad-browser/package.nix | 4 +- pkgs/by-name/mu/mumps/package.nix | 6 +- pkgs/by-name/mu/muon/package.nix | 2 +- pkgs/by-name/mu/music-player/package.nix | 6 +- pkgs/by-name/mu/musikcube/package.nix | 6 +- pkgs/by-name/my/mycelium/package.nix | 2 +- pkgs/by-name/my/mysql84/package.nix | 6 +- pkgs/by-name/n8/n8n/package.nix | 2 +- pkgs/by-name/na/naja/package.nix | 2 +- pkgs/by-name/na/naps2/package.nix | 2 +- pkgs/by-name/na/navidrome/package.nix | 2 +- pkgs/by-name/ne/neovide/package.nix | 10 +- pkgs/by-name/ne/neovim-qt/package.nix | 2 +- pkgs/by-name/ne/neovim-remote/package.nix | 2 +- pkgs/by-name/ne/neovim-unwrapped/package.nix | 8 +- pkgs/by-name/ne/netclient/package.nix | 4 +- pkgs/by-name/ne/neverest/package.nix | 2 +- pkgs/by-name/ne/nextpnr/package.nix | 2 +- pkgs/by-name/ng/ngrok/package.nix | 14 +- pkgs/by-name/nh/nh/package.nix | 2 +- pkgs/by-name/ni/nicstat/package.nix | 2 +- pkgs/by-name/ni/nix-btm/package.nix | 2 +- pkgs/by-name/ni/nix-health/package.nix | 2 +- pkgs/by-name/ni/nix-top/package.nix | 2 +- pkgs/by-name/ni/nix-weather/package.nix | 2 +- pkgs/by-name/ni/nix-web/package.nix | 4 +- pkgs/by-name/ni/nixtract/package.nix | 2 +- pkgs/by-name/nm/nmap/package.nix | 4 +- pkgs/by-name/nn/nncp/package.nix | 2 +- pkgs/by-name/no/nomacs/package.nix | 4 +- pkgs/by-name/no/normcap/package.nix | 14 +- pkgs/by-name/no/nosql-workbench/package.nix | 2 +- pkgs/by-name/no/nostui/package.nix | 2 +- pkgs/by-name/no/notes/package.nix | 6 +- pkgs/by-name/no/novelwriter/package.nix | 4 +- pkgs/by-name/no/novops/package.nix | 2 +- pkgs/by-name/nr/nrr/package.nix | 2 +- pkgs/by-name/ns/nsxiv/package.nix | 4 +- pkgs/by-name/nt/ntpd-rs/package.nix | 6 +- pkgs/by-name/nu/nulloy/package.nix | 2 +- pkgs/by-name/nu/numbat/package.nix | 2 +- .../nv/nvidia-texture-tools/package.nix | 2 +- .../nw/nwjs-ffmpeg-prebuilt/package.nix | 2 +- pkgs/by-name/oa/oauth2l/package.nix | 2 +- pkgs/by-name/oc/ocis-bin/package.nix | 4 +- .../by-name/oc/ocsinventory-agent/package.nix | 10 +- pkgs/by-name/od/odin/package.nix | 4 +- pkgs/by-name/og/oguri/package.nix | 2 +- pkgs/by-name/ol/ollama/package.nix | 10 +- pkgs/by-name/on/onscripter-en/package.nix | 2 +- pkgs/by-name/op/open-scq30/package.nix | 2 +- .../op/openapi-python-client/package.nix | 2 +- pkgs/by-name/op/openctm/package.nix | 2 +- .../op/openorienteering-mapper/package.nix | 2 +- pkgs/by-name/op/openpgl/package.nix | 2 +- pkgs/by-name/op/openpgp-ca/package.nix | 2 +- .../by-name/op/openpgp-card-tools/package.nix | 2 +- pkgs/by-name/op/openscad-unstable/package.nix | 4 +- pkgs/by-name/op/opentelemetry-cpp/package.nix | 2 +- pkgs/by-name/op/openturns/package.nix | 2 +- pkgs/by-name/op/openvr/package.nix | 4 +- pkgs/by-name/op/ophcrack/package.nix | 4 +- pkgs/by-name/or/orbiton/package.nix | 2 +- pkgs/by-name/or/ord/package.nix | 2 +- pkgs/by-name/os/osqp-eigen/package.nix | 4 +- pkgs/by-name/ow/owmods-cli/package.nix | 4 +- pkgs/by-name/ow/owncloud-client/package.nix | 2 +- pkgs/by-name/pa/pablodraw/package.nix | 2 +- pkgs/by-name/pa/paper-plane/package.nix | 2 +- pkgs/by-name/pa/paperlib/package.nix | 2 +- pkgs/by-name/pa/papers/package.nix | 6 +- pkgs/by-name/pa/paru/package.nix | 2 +- pkgs/by-name/pa/passes/package.nix | 2 +- pkgs/by-name/pe/petsc/package.nix | 2 +- pkgs/by-name/pg/pgagroal/package.nix | 2 +- pkgs/by-name/pg/pgcopydb/package.nix | 2 +- pkgs/by-name/ph/photoqt/package.nix | 6 +- pkgs/by-name/pi/picocom/package.nix | 2 +- pkgs/by-name/pi/picocrypt/package.nix | 2 +- .../pi/pietrasanta-traceroute/package.nix | 2 +- pkgs/by-name/pi/pinocchio/package.nix | 2 +- pkgs/by-name/pi/pinokio/package.nix | 2 +- pkgs/by-name/pi/pio/package.nix | 2 +- pkgs/by-name/pi/piv-agent/package.nix | 4 +- pkgs/by-name/pi/pixi/package.nix | 6 +- pkgs/by-name/pi/pizauth/package.nix | 2 +- pkgs/by-name/pl/platformsh/package.nix | 8 +- pkgs/by-name/pl/pls/package.nix | 2 +- pkgs/by-name/pm/pmbootstrap/package.nix | 2 +- pkgs/by-name/po/podman-tui/package.nix | 2 +- pkgs/by-name/po/poke/package.nix | 4 +- pkgs/by-name/po/portablemc/package.nix | 2 +- pkgs/by-name/pr/presenterm/package.nix | 2 +- .../pr/prismlauncher-unwrapped/package.nix | 10 +- pkgs/by-name/pr/prismlauncher/package.nix | 14 +- pkgs/by-name/pr/probe-rs-tools/package.nix | 4 +- .../pr/prometheus-node-exporter/package.nix | 2 +- pkgs/by-name/pr/proto/package.nix | 2 +- pkgs/by-name/pr/protoc-gen-js/package.nix | 2 +- .../by-name/pr/protonmail-desktop/package.nix | 10 +- pkgs/by-name/pr/prr/package.nix | 2 +- pkgs/by-name/pt/pterm/package.nix | 2 +- pkgs/by-name/pw/pwndbg/package.nix | 4 +- pkgs/by-name/py/pylyzer/package.nix | 4 +- pkgs/by-name/py/pyxel/package.nix | 2 +- pkgs/by-name/qg/qgrep/package.nix | 4 +- pkgs/by-name/qs/qsv/package.nix | 2 +- pkgs/by-name/qt/qtalarm/package.nix | 2 +- pkgs/by-name/qu/quickemu/package.nix | 2 +- pkgs/by-name/qu/quickjs-ng/package.nix | 2 +- pkgs/by-name/qu/quickjs/package.nix | 2 +- pkgs/by-name/r0/r0vm/package.nix | 2 +- pkgs/by-name/ra/rage/package.nix | 2 +- pkgs/by-name/ra/railway/package.nix | 2 +- .../by-name/ra/raspberrypi-eeprom/package.nix | 4 +- pkgs/by-name/ra/rathole/package.nix | 2 +- pkgs/by-name/ra/rav1e/package.nix | 4 +- pkgs/by-name/rc/rcp/package.nix | 4 +- pkgs/by-name/re/realm/package.nix | 2 +- .../by-name/re/realvnc-vnc-viewer/package.nix | 2 +- pkgs/by-name/re/redict/package.nix | 6 +- pkgs/by-name/re/redlib/package.nix | 2 +- pkgs/by-name/re/refind/package.nix | 2 +- pkgs/by-name/re/refinery-cli/package.nix | 2 +- pkgs/by-name/re/release-plz/package.nix | 2 +- pkgs/by-name/re/remind/package.nix | 2 +- pkgs/by-name/re/rerun/package.nix | 4 +- pkgs/by-name/re/retool/package.nix | 2 +- pkgs/by-name/re/revolt-desktop/package.nix | 4 +- pkgs/by-name/ri/ride/package.nix | 10 +- pkgs/by-name/ri/ringfairy/package.nix | 2 +- pkgs/by-name/ri/ripunzip/package.nix | 2 +- pkgs/by-name/rk/rkboot/package.nix | 2 +- pkgs/by-name/rl/rl_json/package.nix | 2 +- pkgs/by-name/rm/rmg/package.nix | 2 +- pkgs/by-name/rn/rnote/package.nix | 6 +- pkgs/by-name/ro/robodoc/package.nix | 2 +- pkgs/by-name/ro/rootbar/package.nix | 2 +- pkgs/by-name/ro/routinator/package.nix | 2 +- pkgs/by-name/rp/rpi-imager/package.nix | 4 +- pkgs/by-name/rq/rqbit/package.nix | 6 +- pkgs/by-name/rr/rrdtool/package.nix | 4 +- pkgs/by-name/rs/rs/package.nix | 2 +- pkgs/by-name/rt/rtl_fm_streamer/package.nix | 4 +- pkgs/by-name/ru/ruff-lsp/package.nix | 2 +- pkgs/by-name/ru/ruff/package.nix | 4 +- pkgs/by-name/ru/rustdesk/package.nix | 10 +- pkgs/by-name/ru/rusti-cal/package.nix | 2 +- pkgs/by-name/ru/rustic/package.nix | 2 +- pkgs/by-name/ru/rustlings/package.nix | 2 +- pkgs/by-name/ru/rustls-ffi/package.nix | 2 +- pkgs/by-name/ru/rustmission/package.nix | 2 +- pkgs/by-name/ry/rye/package.nix | 2 +- pkgs/by-name/s3/s3proxy/package.nix | 2 +- pkgs/by-name/sa/saga/package.nix | 6 +- pkgs/by-name/sa/salmon/package.nix | 2 +- pkgs/by-name/sa/sanjuuni/package.nix | 2 +- pkgs/by-name/sa/sarif-fmt/package.nix | 2 +- pkgs/by-name/sc/schemamap/package.nix | 2 +- pkgs/by-name/sc/scrcpy/package.nix | 2 +- pkgs/by-name/sc/screen-pipe/package.nix | 6 +- pkgs/by-name/sc/screenly-cli/package.nix | 2 +- pkgs/by-name/sc/scs/package.nix | 2 +- pkgs/by-name/sd/SDL1/package.nix | 20 +- pkgs/by-name/sd/SDL2_Pango/package.nix | 2 +- pkgs/by-name/sd/SDL2_gfx/package.nix | 4 +- pkgs/by-name/sd/SDL2_image/package.nix | 8 +- pkgs/by-name/sd/SDL2_mixer/package.nix | 6 +- pkgs/by-name/sd/SDL2_net/package.nix | 4 +- pkgs/by-name/sd/SDL2_sound/package.nix | 2 +- pkgs/by-name/sd/SDL2_ttf/package.nix | 6 +- pkgs/by-name/sd/SDL_Pango/package.nix | 2 +- pkgs/by-name/sd/SDL_compat/package.nix | 2 +- pkgs/by-name/sd/SDL_gfx/package.nix | 2 +- pkgs/by-name/sd/SDL_image/package.nix | 2 +- pkgs/by-name/sd/SDL_mixer/package.nix | 4 +- pkgs/by-name/sd/SDL_net/package.nix | 2 +- pkgs/by-name/sd/SDL_sound/package.nix | 2 +- pkgs/by-name/sd/SDL_ttf/package.nix | 2 +- pkgs/by-name/se/selenium-manager/package.nix | 2 +- pkgs/by-name/se/sendme/package.nix | 2 +- pkgs/by-name/se/sequoia-sq/package.nix | 2 +- pkgs/by-name/se/sequoia-wot/package.nix | 2 +- pkgs/by-name/se/serie/package.nix | 2 +- pkgs/by-name/se/servo/package.nix | 2 +- pkgs/by-name/sg/sgfutils/package.nix | 2 +- pkgs/by-name/sh/share-preview/package.nix | 4 +- .../si/signal-backup-deduplicator/package.nix | 2 +- pkgs/by-name/si/silicon/package.nix | 6 +- pkgs/by-name/si/single-file-cli/package.nix | 2 +- pkgs/by-name/si/sirius/package.nix | 2 +- pkgs/by-name/sk/sketchybar/package.nix | 2 +- pkgs/by-name/sk/skhd/package.nix | 2 +- pkgs/by-name/sk/skia/package.nix | 6 +- pkgs/by-name/sk/skribilo/package.nix | 4 +- pkgs/by-name/sl/slang/package.nix | 2 +- pkgs/by-name/sl/slimserver/package.nix | 8 +- pkgs/by-name/sl/slumber/package.nix | 2 +- pkgs/by-name/sm/smartcat/package.nix | 2 +- pkgs/by-name/sm/smuview/package.nix | 4 +- pkgs/by-name/sm/smuxi/package.nix | 4 +- pkgs/by-name/sn/sn0int/package.nix | 4 +- pkgs/by-name/sn/snapcraft/package.nix | 2 +- pkgs/by-name/sn/snes9x/package.nix | 4 +- pkgs/by-name/sn/sniffglue/package.nix | 2 +- pkgs/by-name/sn/snyk/package.nix | 2 +- pkgs/by-name/so/so/package.nix | 2 +- pkgs/by-name/so/solana-cli/package.nix | 8 +- pkgs/by-name/so/sonic-server/package.nix | 2 +- pkgs/by-name/so/sound-of-sorting/package.nix | 2 +- pkgs/by-name/so/soupault/package.nix | 2 +- pkgs/by-name/so/sourcery/package.nix | 2 +- pkgs/by-name/sp/spacedrive/package.nix | 2 +- pkgs/by-name/sp/spade/package.nix | 4 +- pkgs/by-name/sp/spades/package.nix | 2 +- pkgs/by-name/sp/spfft/package.nix | 2 +- pkgs/by-name/sp/spla/package.nix | 2 +- pkgs/by-name/sp/spotifyd/package.nix | 14 +- pkgs/by-name/sp/spotube/package.nix | 2 +- pkgs/by-name/sp/spral/package.nix | 6 +- pkgs/by-name/sq/sqlite-vss/package.nix | 4 +- pkgs/by-name/sq/squeezelite/package.nix | 14 +- .../ss/ssh-askpass-fullscreen/package.nix | 2 +- pkgs/by-name/ss/ssh-openpgp-auth/generic.nix | 2 +- pkgs/by-name/ss/sshesame/package.nix | 2 +- pkgs/by-name/st/stalwart-mail/package.nix | 10 +- pkgs/by-name/st/static-server/package.nix | 2 +- pkgs/by-name/st/stormlib/package.nix | 4 +- pkgs/by-name/st/streamdeck-ui/package.nix | 2 +- pkgs/by-name/st/stu/package.nix | 2 +- pkgs/by-name/su/superscs/package.nix | 2 +- pkgs/by-name/su/supersonic/package.nix | 12 +- pkgs/by-name/su/surrealdb/package.nix | 2 +- pkgs/by-name/sv/svix-server/package.nix | 4 +- pkgs/by-name/sw/switcheroo/package.nix | 2 +- pkgs/by-name/sy/symbolicator/package.nix | 2 +- pkgs/by-name/sy/syncyomi/package.nix | 2 +- pkgs/by-name/sy/syntax/package.nix | 2 +- pkgs/by-name/sy/systemctl-tui/package.nix | 2 +- pkgs/by-name/t-/t-rex/package.nix | 2 +- pkgs/by-name/ta/tabby/package.nix | 18 +- .../ta/tailscale-nginx-auth/package.nix | 2 +- .../tailwindcss-language-server/package.nix | 2 +- pkgs/by-name/ta/talecast/package.nix | 2 +- .../ta/taler-depolymerization/package.nix | 2 +- pkgs/by-name/ta/tangerine/package.nix | 2 +- pkgs/by-name/ta/tartan/package.nix | 2 +- pkgs/by-name/ta/taskwarrior3/package.nix | 2 +- pkgs/by-name/te/teams-for-linux/package.nix | 8 +- pkgs/by-name/te/telegraf/package.nix | 2 +- pkgs/by-name/te/telescope/package.nix | 2 +- .../th/the-legend-of-edgar/package.nix | 2 +- pkgs/by-name/th/the-powder-toy/package.nix | 4 +- pkgs/by-name/th/thefuck/package.nix | 2 +- pkgs/by-name/th/thonny/package.nix | 4 +- pkgs/by-name/ti/tidgi/package.nix | 2 +- pkgs/by-name/ti/tinymist/package.nix | 2 +- pkgs/by-name/tl/tlclient/package.nix | 2 +- pkgs/by-name/tl/tlrc/package.nix | 2 +- pkgs/by-name/to/tootik/package.nix | 2 +- pkgs/by-name/to/tor-browser/package.nix | 4 +- pkgs/by-name/to/toxic/package.nix | 2 +- pkgs/by-name/tp/tpnote/package.nix | 2 +- pkgs/by-name/tr/tracker-miners/package.nix | 6 +- pkgs/by-name/tr/tracy/package.nix | 22 +- pkgs/by-name/tr/transmission_3/package.nix | 6 +- pkgs/by-name/tr/trealla/package.nix | 2 +- pkgs/by-name/tr/trigger-control/package.nix | 4 +- pkgs/by-name/tr/triton-llvm/package.nix | 4 +- pkgs/by-name/tr/trunk-ng/package.nix | 2 +- pkgs/by-name/ts/tsukimi/package.nix | 2 +- pkgs/by-name/tu/tuifimanager/package.nix | 4 +- pkgs/by-name/tu/tup/package.nix | 4 +- pkgs/by-name/tu/turbo-unwrapped/package.nix | 4 +- pkgs/by-name/ty/typst-live/package.nix | 2 +- pkgs/by-name/ty/typst-lsp/package.nix | 4 +- pkgs/by-name/ty/typst/package.nix | 2 +- pkgs/by-name/ty/typstyle/package.nix | 2 +- pkgs/by-name/uc/ucg/package.nix | 2 +- pkgs/by-name/uc/uclibc-ng/package.nix | 2 +- pkgs/by-name/ue/ueberzugpp/package.nix | 8 +- pkgs/by-name/ui/uiua/package.nix | 8 +- pkgs/by-name/un/unbound/package.nix | 2 +- pkgs/by-name/un/unciv/package.nix | 2 +- pkgs/by-name/un/unimap/package.nix | 6 +- pkgs/by-name/un/unison-fsmonitor/package.nix | 2 +- pkgs/by-name/un/unison/package.nix | 4 +- pkgs/by-name/un/universal-ctags/package.nix | 4 +- pkgs/by-name/un/unrar-free/package.nix | 2 +- pkgs/by-name/up/upsun/package.nix | 8 +- pkgs/by-name/ut/ut1999/package.nix | 10 +- pkgs/by-name/uv/uv/package.nix | 2 +- pkgs/by-name/ux/uxn/package.nix | 2 +- pkgs/by-name/va/vale-ls/package.nix | 4 +- pkgs/by-name/va/valkey/package.nix | 6 +- pkgs/by-name/va/vapoursynth/package.nix | 4 +- pkgs/by-name/va/vatprism/package.nix | 2 +- pkgs/by-name/ve/vesktop/package.nix | 24 +- pkgs/by-name/vi/vieb/package.nix | 2 +- pkgs/by-name/vi/vis/package.nix | 2 +- pkgs/by-name/vl/vlc-bin/package.nix | 4 +- pkgs/by-name/vo/volk_2/package.nix | 4 +- pkgs/by-name/vs/vsce/package.nix | 2 +- pkgs/by-name/vs/vscode-js-debug/package.nix | 6 +- pkgs/by-name/vv/vvvvvv/package.nix | 2 +- pkgs/by-name/wa/wapm/package.nix | 2 +- pkgs/by-name/wa/warp-terminal/package.nix | 2 +- pkgs/by-name/wa/wash-cli/package.nix | 2 +- pkgs/by-name/wa/wasm-bindgen-cli/package.nix | 2 +- pkgs/by-name/wa/wastebin/package.nix | 2 +- pkgs/by-name/wa/waybar/package.nix | 4 +- pkgs/by-name/we/weaver/package.nix | 2 +- pkgs/by-name/we/werf/package.nix | 4 +- pkgs/by-name/wi/wiliwili/package.nix | 8 +- pkgs/by-name/wi/wiper/package.nix | 2 +- pkgs/by-name/wl/wl-clip-persist/package.nix | 2 +- pkgs/by-name/wl/wlx-overlay-s/package.nix | 2 +- pkgs/by-name/ws/wslay/package.nix | 2 +- pkgs/by-name/wt/wttrbar/package.nix | 2 +- pkgs/by-name/wt/wtwitch/package.nix | 2 +- pkgs/by-name/x1/x16/package.nix | 2 +- pkgs/by-name/x1/x16/rom.nix | 2 +- pkgs/by-name/xd/xdg-user-dirs/package.nix | 4 +- pkgs/by-name/xe/xevd/package.nix | 2 +- pkgs/by-name/xe/xeve/package.nix | 2 +- pkgs/by-name/xi/xiu/package.nix | 4 +- pkgs/by-name/xm/xml-tooling-c/package.nix | 2 +- pkgs/by-name/xp/xplr/package.nix | 2 +- pkgs/by-name/xs/xsimd/package.nix | 2 +- pkgs/by-name/ya/yabai/package.nix | 14 +- pkgs/by-name/ya/yapesdl/package.nix | 2 +- pkgs/by-name/ya/yazi-unwrapped/package.nix | 2 +- pkgs/by-name/yc/ycmd/package.nix | 2 +- pkgs/by-name/ye/yesplaymusic/package.nix | 2 +- pkgs/by-name/yt/ytui-music/package.nix | 2 +- pkgs/by-name/yu/yubico-piv-tool/package.nix | 2 +- pkgs/by-name/za/zapret/package.nix | 2 +- pkgs/by-name/zc/zchunk/package.nix | 2 +- pkgs/by-name/ze/zed-editor/package.nix | 12 +- pkgs/by-name/ze/zerotierone/package.nix | 4 +- pkgs/by-name/zo/zola/package.nix | 2 +- pkgs/by-name/zo/zoom-us/package.nix | 10 +- pkgs/by-name/zu/zutty/package.nix | 2 +- pkgs/data/fonts/iosevka/default.nix | 2 +- pkgs/data/fonts/uni-vga/default.nix | 6 +- pkgs/data/icons/gnome-icon-theme/default.nix | 2 +- pkgs/data/icons/volantes-cursors/default.nix | 2 +- pkgs/data/misc/scowl/default.nix | 2 +- pkgs/data/themes/adwaita-qt/default.nix | 2 +- .../enlightenment/enlightenment/default.nix | 2 +- pkgs/desktops/gnome-2/default.nix | 2 +- .../gnome-2/desktop/gtksourceview/default.nix | 8 +- .../gnome-2/platform/GConf/default.nix | 4 +- pkgs/desktops/gnustep/libobjc2/default.nix | 2 +- pkgs/desktops/lxqt/compton-conf/default.nix | 2 +- .../lxqt/libdbusmenu-lxqt/default.nix | 2 +- pkgs/desktops/lxqt/libsysstat/default.nix | 2 +- pkgs/desktops/lxqt/qtermwidget/default.nix | 2 +- pkgs/desktops/mate/libmatemixer/default.nix | 2 +- pkgs/desktops/mate/mate-menus/default.nix | 2 +- .../ada-modules/gnatcoll/bindings.nix | 2 +- .../ada-modules/gprbuild/default.nix | 2 +- .../beam-modules/erlang-ls/default.nix | 2 +- pkgs/development/compilers/bfc/default.nix | 2 +- pkgs/development/compilers/bigloo/default.nix | 8 +- .../compilers/binaryen/default.nix | 2 +- .../compilers/blueprint/default.nix | 2 +- pkgs/development/compilers/c0/default.nix | 6 +- pkgs/development/compilers/c3c/default.nix | 2 +- .../compilers/cakelisp/default.nix | 4 +- pkgs/development/compilers/ccl/default.nix | 6 +- .../compilers/chez-racket/shared.nix | 2 +- pkgs/development/compilers/chez/default.nix | 4 +- .../compilers/chicken/4/chicken.nix | 8 +- .../compilers/chicken/5/chicken.nix | 6 +- .../compilers/chicken/5/overrides.nix | 20 +- pkgs/development/compilers/ciao/default.nix | 2 +- .../compilers/circt/circt-llvm.nix | 4 +- pkgs/development/compilers/clasp/default.nix | 2 +- .../development/compilers/cmdstan/default.nix | 2 +- pkgs/development/compilers/codon/default.nix | 2 +- .../compilers/corretto/mk-corretto.nix | 2 +- .../development/compilers/crystal/default.nix | 4 +- pkgs/development/compilers/dart/default.nix | 4 +- pkgs/development/compilers/dictu/default.nix | 2 +- .../compilers/dotnet/build-dotnet.nix | 12 +- pkgs/development/compilers/dotnet/common.nix | 6 +- .../compilers/dotnet/patch-nupkgs.nix | 6 +- pkgs/development/compilers/dotnet/vmr.nix | 4 +- pkgs/development/compilers/dtc/default.nix | 2 +- pkgs/development/compilers/ecl/16.1.2.nix | 2 +- .../elm/packages/elm-json/default.nix | 2 +- .../elm/packages/elm-test-rs/default.nix | 4 +- .../elm/packages/lamdera/default.nix | 4 +- .../elm/packages/node/node-composition.nix | 2 +- pkgs/development/compilers/erg/default.nix | 2 +- pkgs/development/compilers/fasm/bin.nix | 2 +- .../compilers/flutter/engine/package.nix | 16 +- .../compilers/flutter/flutter-tools.nix | 2 +- pkgs/development/compilers/fpc/binary.nix | 2 +- pkgs/development/compilers/fpc/default.nix | 6 +- pkgs/development/compilers/gambit/build.nix | 6 +- pkgs/development/compilers/gcc/all.nix | 2 +- .../compilers/gcc/patches/default.nix | 14 +- pkgs/development/compilers/gerbil/build.nix | 2 +- .../compilers/gforth/boot-forth.nix | 2 +- pkgs/development/compilers/gforth/default.nix | 4 +- .../compilers/ghc/8.10.7-binary.nix | 16 +- pkgs/development/compilers/ghc/8.10.7.nix | 10 +- .../compilers/ghc/8.6.5-binary.nix | 16 +- .../compilers/ghc/9.2.4-binary.nix | 12 +- .../compilers/ghc/9.6.3-binary.nix | 12 +- .../compilers/ghc/common-hadrian.nix | 8 +- .../ghc/common-make-native-bignum.nix | 12 +- .../compilers/ghcjs/8.10/default.nix | 2 +- pkgs/development/compilers/gleam/default.nix | 2 +- pkgs/development/compilers/go/1.21.nix | 2 +- pkgs/development/compilers/go/1.22.nix | 2 +- pkgs/development/compilers/go/1.23.nix | 2 +- .../development/compilers/gprolog/default.nix | 2 +- .../community-edition/buildGraalvm.nix | 22 +- .../community-edition/buildGraalvmProduct.nix | 4 +- .../graalvm/community-edition/default.nix | 2 +- .../community-edition/truffleruby/default.nix | 4 +- pkgs/development/compilers/halide/default.nix | 4 +- pkgs/development/compilers/haxe/default.nix | 2 +- pkgs/development/compilers/idris2/idris2.nix | 4 +- pkgs/development/compilers/idris2/tests.nix | 2 +- .../development/compilers/inform7/default.nix | 2 +- pkgs/development/compilers/ispc/default.nix | 10 +- .../compilers/jetbrains-jdk/17.nix | 2 +- .../compilers/jetbrains-jdk/default.nix | 2 +- .../compilers/jetbrains-jdk/jcef.nix | 2 +- .../development/compilers/jsonnet/default.nix | 2 +- .../compilers/julia/generic-bin.nix | 6 +- pkgs/development/compilers/julia/generic.nix | 4 +- pkgs/development/compilers/kind2/default.nix | 2 +- pkgs/development/compilers/ligo/default.nix | 2 +- .../llvm/common/compiler-rt/default.nix | 8 +- .../compilers/llvm/common/default.nix | 4 +- .../compilers/llvm/common/libcxx/default.nix | 2 +- .../compilers/llvm/common/lld/default.nix | 2 +- .../compilers/llvm/common/lldb.nix | 8 +- .../compilers/llvm/common/llvm/default.nix | 22 +- .../compilers/llvm/common/mlir/default.nix | 2 +- .../development/compilers/lobster/default.nix | 4 +- .../compilers/minimacy/default.nix | 8 +- .../compilers/mit-scheme/default.nix | 6 +- pkgs/development/compilers/mkcl/default.nix | 2 +- pkgs/development/compilers/mlton/20130715.nix | 10 +- .../compilers/mlton/20180207-binary.nix | 6 +- .../compilers/mlton/20210117-binary.nix | 6 +- pkgs/development/compilers/mono/4.nix | 2 +- pkgs/development/compilers/mono/generic.nix | 4 +- pkgs/development/compilers/mono/llvm.nix | 2 +- pkgs/development/compilers/mozart/default.nix | 2 +- .../development/compilers/myrddin/default.nix | 2 +- pkgs/development/compilers/neko/default.nix | 6 +- pkgs/development/compilers/nim/default.nix | 10 +- pkgs/development/compilers/ocaml/4.00.1.nix | 4 +- .../compilers/ocaml/ber-metaocaml.nix | 2 +- pkgs/development/compilers/ocaml/generic.nix | 10 +- pkgs/development/compilers/openjdk/11.nix | 2 +- pkgs/development/compilers/openjdk/21.nix | 2 +- pkgs/development/compilers/orc/default.nix | 4 +- pkgs/development/compilers/osl/default.nix | 2 +- pkgs/development/compilers/polyml/5.6.nix | 4 +- pkgs/development/compilers/polyml/5.7.nix | 6 +- pkgs/development/compilers/polyml/default.nix | 4 +- pkgs/development/compilers/ponyc/default.nix | 10 +- .../purescript/psc-package/default.nix | 6 +- .../purescript/purescript/default.nix | 2 +- pkgs/development/compilers/rust/1_80.nix | 2 +- pkgs/development/compilers/rust/binary.nix | 14 +- pkgs/development/compilers/rust/cargo.nix | 2 +- pkgs/development/compilers/rust/clippy.nix | 4 +- pkgs/development/compilers/rust/rustc.nix | 18 +- pkgs/development/compilers/rust/rustfmt.nix | 4 +- .../compilers/sagittarius-scheme/default.nix | 10 +- pkgs/development/compilers/sbcl/bootstrap.nix | 2 +- pkgs/development/compilers/sbcl/default.nix | 2 +- .../compilers/scryer-prolog/default.nix | 2 +- .../development/compilers/shaderc/default.nix | 4 +- pkgs/development/compilers/smlnj/default.nix | 8 +- pkgs/development/compilers/solc/default.nix | 4 +- .../development/compilers/souffle/default.nix | 2 +- .../spirv-llvm-translator/default.nix | 2 +- .../compilers/swi-prolog/default.nix | 8 +- .../compilers/swift/compiler/default.nix | 44 +-- pkgs/development/compilers/swift/default.nix | 6 +- .../compilers/swift/sourcekit-lsp/default.nix | 4 +- .../compilers/swift/swift-docc/default.nix | 2 +- .../compilers/swift/swift-driver/default.nix | 2 +- .../compilers/swift/swiftpm/default.nix | 20 +- .../compilers/swift/xctest/default.nix | 8 +- .../compilers/temurin-bin/jdk-linux-base.nix | 2 +- pkgs/development/compilers/terra/default.nix | 6 +- pkgs/development/compilers/tinycc/default.nix | 6 +- pkgs/development/compilers/tinygo/default.nix | 4 +- pkgs/development/compilers/uasm/default.nix | 2 +- pkgs/development/compilers/unison/default.nix | 6 +- pkgs/development/compilers/vala/default.nix | 2 +- pkgs/development/compilers/vlang/default.nix | 6 +- pkgs/development/compilers/yap/default.nix | 2 +- .../compilers/zig/0.12/default.nix | 2 +- .../compilers/zig/0.13/default.nix | 2 +- pkgs/development/compilers/zig/generic.nix | 2 +- pkgs/development/compilers/zulu/common.nix | 18 +- .../arduino-language-server/default.nix | 2 +- pkgs/development/embedded/blisp/default.nix | 4 +- pkgs/development/embedded/bossa/default.nix | 2 +- .../embedded/easypdkprog/default.nix | 2 +- pkgs/development/embedded/edl/default.nix | 2 +- .../embedded/elf2uf2-rs/default.nix | 4 +- .../embedded/fpga/ecpdap/default.nix | 2 +- .../embedded/fpga/fujprog/default.nix | 2 +- .../embedded/fpga/trellis/default.nix | 2 +- pkgs/development/embedded/openocd/default.nix | 8 +- pkgs/development/embedded/platformio/core.nix | 2 +- .../gnuradio-modules/ais/default.nix | 2 +- .../gnuradio-modules/osmosdr/default.nix | 2 +- .../guile-modules/guile-gcrypt/default.nix | 2 +- .../guile-modules/guile-git/default.nix | 2 +- .../guile-modules/guile-lib/default.nix | 2 +- .../guile-modules/guile-ssh/default.nix | 2 +- .../haskell-modules/configuration-common.nix | 6 +- .../haskell-modules/configuration-darwin.nix | 4 +- .../haskell-modules/configuration-nix.nix | 10 +- .../haskell-modules/generic-builder.nix | 8 +- .../development/interpreters/bats/default.nix | 8 +- pkgs/development/interpreters/bic/default.nix | 2 +- .../interpreters/chibi/default.nix | 2 +- .../interpreters/cling/default.nix | 4 +- .../interpreters/clisp/default.nix | 8 +- .../interpreters/cyber/default.nix | 2 +- .../interpreters/cyclone/default.nix | 4 +- .../interpreters/dzaima-apl/default.nix | 2 +- .../interpreters/erlang/generic-builder.nix | 10 +- .../interpreters/evcxr/default.nix | 2 +- .../interpreters/femtolisp/default.nix | 2 +- .../interpreters/gauche/default.nix | 2 +- .../interpreters/gnu-apl/default.nix | 4 +- .../interpreters/gnudatalanguage/default.nix | 16 +- pkgs/development/interpreters/guile/2.0.nix | 8 +- pkgs/development/interpreters/guile/2.2.nix | 4 +- pkgs/development/interpreters/guile/3.0.nix | 12 +- .../interpreters/hashlink/default.nix | 2 +- .../development/interpreters/hugs/default.nix | 2 +- .../interpreters/icon-lang/default.nix | 10 +- .../interpreters/janet/default.nix | 2 +- .../development/interpreters/kerf/default.nix | 8 +- .../interpreters/lua-5/default.nix | 8 +- .../interpreters/lua-5/interpreter.nix | 16 +- .../interpreters/luajit/default.nix | 2 +- .../interpreters/lunatic/default.nix | 2 +- .../development/interpreters/lune/default.nix | 4 +- .../interpreters/maude/default.nix | 2 +- .../interpreters/micropython/default.nix | 4 +- .../development/interpreters/mujs/default.nix | 2 +- .../interpreters/nextflow/default.nix | 2 +- .../interpreters/octave/default.nix | 12 +- .../interpreters/perl/interpreter.nix | 12 +- pkgs/development/interpreters/php/generic.nix | 6 +- .../interpreters/picoc/default.nix | 4 +- .../python/cpython/2.7/default.nix | 14 +- .../interpreters/python/cpython/default.nix | 28 +- .../interpreters/python/default.nix | 4 +- .../python/mk-python-derivation.nix | 2 +- .../interpreters/python/pypy/default.nix | 6 +- .../interpreters/python/pypy/prebuilt.nix | 16 +- .../interpreters/python/pypy/prebuilt_2_7.nix | 16 +- .../python/python2/mk-python-derivation.nix | 2 +- .../python/rustpython/default.nix | 4 +- .../development/interpreters/python/tests.nix | 6 +- .../interpreters/racket/default.nix | 18 +- .../interpreters/racket/racket_7_9.nix | 12 +- .../interpreters/rakudo/moarvm.nix | 4 +- .../development/interpreters/ruby/default.nix | 8 +- .../development/interpreters/rune/default.nix | 2 +- .../interpreters/snobol4/default.nix | 2 +- .../interpreters/spidermonkey/common.nix | 6 +- .../interpreters/supercollider/default.nix | 2 +- pkgs/development/interpreters/tcl/generic.nix | 2 +- .../interpreters/tclreadline/default.nix | 2 +- .../interpreters/unicon-lang/default.nix | 2 +- .../development/interpreters/wamr/default.nix | 6 +- .../interpreters/wasmer/default.nix | 6 +- .../interpreters/wasmtime/default.nix | 4 +- pkgs/development/libraries/SDL2/default.nix | 20 +- pkgs/development/libraries/aalib/default.nix | 2 +- .../libraries/abseil-cpp/202103.nix | 2 +- .../libraries/abseil-cpp/202301.nix | 2 +- pkgs/development/libraries/adns/default.nix | 6 +- pkgs/development/libraries/aemu/default.nix | 2 +- pkgs/development/libraries/afflib/default.nix | 2 +- pkgs/development/libraries/agg/default.nix | 6 +- pkgs/development/libraries/allegro/5.nix | 2 +- pkgs/development/libraries/aml/default.nix | 2 +- .../libraries/apr-util/default.nix | 10 +- .../development/libraries/aribb25/default.nix | 6 +- .../libraries/arrayfire/default.nix | 2 +- pkgs/development/libraries/asio/generic.nix | 2 +- .../libraries/audio/cubeb/default.nix | 6 +- .../audio/game-music-emu/default.nix | 2 +- .../libraries/audio/libopenmpt/default.nix | 2 +- .../libraries/audio/lv2/default.nix | 2 +- .../libraries/audio/suil/default.nix | 2 +- .../libraries/audiofile/default.nix | 4 +- pkgs/development/libraries/avahi/default.nix | 6 +- .../libraries/aws-sdk-cpp/default.nix | 4 +- pkgs/development/libraries/azmq/default.nix | 2 +- pkgs/development/libraries/blitz/default.nix | 4 +- pkgs/development/libraries/blst/default.nix | 4 +- pkgs/development/libraries/boost/generic.nix | 8 +- .../libraries/boringssl/default.nix | 2 +- pkgs/development/libraries/botan/default.nix | 2 +- pkgs/development/libraries/box2d/default.nix | 2 +- .../development/libraries/brunsli/default.nix | 2 +- pkgs/development/libraries/bullet/default.nix | 8 +- .../libraries/bullet/roboschool-fork.nix | 10 +- pkgs/development/libraries/caf/default.nix | 4 +- pkgs/development/libraries/cairo/default.nix | 6 +- pkgs/development/libraries/cairomm/1.16.nix | 4 +- .../development/libraries/cairomm/default.nix | 4 +- pkgs/development/libraries/capstone/4.nix | 2 +- .../libraries/capstone/default.nix | 2 +- .../libraries/catboost/default.nix | 4 +- pkgs/development/libraries/catch2/3.nix | 4 +- pkgs/development/libraries/cctag/default.nix | 2 +- pkgs/development/libraries/cctz/default.nix | 4 +- pkgs/development/libraries/cdo/default.nix | 2 +- pkgs/development/libraries/cegui/default.nix | 2 +- pkgs/development/libraries/check/default.nix | 2 +- .../libraries/chromaprint/default.nix | 2 +- .../libraries/classads/default.nix | 2 +- pkgs/development/libraries/clfft/default.nix | 4 +- .../libraries/clucene-core/2.x.nix | 4 +- .../development/libraries/clutter/default.nix | 4 +- pkgs/development/libraries/cmark/default.nix | 2 +- .../libraries/cminpack/default.nix | 2 +- pkgs/development/libraries/cmrt/default.nix | 2 +- pkgs/development/libraries/cogl/default.nix | 10 +- pkgs/development/libraries/coin3d/default.nix | 2 +- .../libraries/cpp-utilities/default.nix | 4 +- .../libraries/cracklib/default.nix | 2 +- pkgs/development/libraries/crc32c/default.nix | 2 +- .../libraries/crossguid/default.nix | 2 +- .../libraries/ctranslate2/default.nix | 6 +- .../libraries/cyrus-sasl/default.nix | 4 +- pkgs/development/libraries/db/generic.nix | 2 +- pkgs/development/libraries/dbus/default.nix | 10 +- pkgs/development/libraries/dclxvi/default.nix | 2 +- pkgs/development/libraries/dconf/default.nix | 2 +- .../libraries/discord-rpc/default.nix | 2 +- .../libraries/double-conversion/default.nix | 2 +- pkgs/development/libraries/duckdb/default.nix | 4 +- .../libraries/easyloggingpp/default.nix | 2 +- .../libraries/edencommon/default.nix | 4 +- pkgs/development/libraries/embree/default.nix | 2 +- pkgs/development/libraries/enchant/2.x.nix | 4 +- pkgs/development/libraries/exempi/default.nix | 4 +- pkgs/development/libraries/exiv2/default.nix | 4 +- pkgs/development/libraries/expat/default.nix | 2 +- pkgs/development/libraries/fb303/default.nix | 2 +- .../libraries/fbthrift/default.nix | 4 +- .../libraries/fflas-ffpack/default.nix | 2 +- pkgs/development/libraries/ffmpeg/generic.nix | 40 +-- pkgs/development/libraries/fftw/default.nix | 2 +- pkgs/development/libraries/fizz/default.nix | 2 +- pkgs/development/libraries/folks/default.nix | 2 +- pkgs/development/libraries/folly/default.nix | 8 +- .../libraries/fontconfig/default.nix | 2 +- .../libraries/fontconfig/make-fonts-conf.nix | 4 +- pkgs/development/libraries/fox/fox-1.6.nix | 4 +- .../libraries/freealut/default.nix | 2 +- .../libraries/freeglut/default.nix | 2 +- .../libraries/freeimage/default.nix | 14 +- .../libraries/freenect/default.nix | 2 +- .../libraries/freetype/default.nix | 4 +- pkgs/development/libraries/freexl/default.nix | 2 +- .../development/libraries/fribidi/default.nix | 2 +- pkgs/development/libraries/g2o/default.nix | 4 +- .../development/libraries/galario/default.nix | 6 +- .../libraries/garmintools/default.nix | 2 +- .../libraries/gbenchmark/default.nix | 2 +- .../development/libraries/gcc/libstdc++/5.nix | 2 +- pkgs/development/libraries/gd/default.nix | 2 +- pkgs/development/libraries/gdal/default.nix | 14 +- pkgs/development/libraries/gdcm/default.nix | 6 +- .../libraries/gdk-pixbuf/default.nix | 8 +- pkgs/development/libraries/gegl/default.nix | 4 +- pkgs/development/libraries/gensio/default.nix | 2 +- .../development/libraries/geoclue/default.nix | 6 +- .../development/libraries/geogram/default.nix | 4 +- pkgs/development/libraries/geos/3.11.nix | 2 +- pkgs/development/libraries/geos/default.nix | 2 +- pkgs/development/libraries/getdns/default.nix | 2 +- .../development/libraries/gettext/default.nix | 6 +- pkgs/development/libraries/gexiv2/default.nix | 2 +- .../libraries/gfxstream/default.nix | 8 +- pkgs/development/libraries/giflib/default.nix | 2 +- pkgs/development/libraries/givaro/default.nix | 2 +- pkgs/development/libraries/gjs/default.nix | 6 +- pkgs/development/libraries/gl2ps/default.nix | 4 +- pkgs/development/libraries/glew/1.10.nix | 4 +- pkgs/development/libraries/glew/default.nix | 6 +- pkgs/development/libraries/glib/default.nix | 12 +- pkgs/development/libraries/glibc/common.nix | 2 +- pkgs/development/libraries/glibmm/2.68.nix | 2 +- pkgs/development/libraries/glibmm/default.nix | 2 +- pkgs/development/libraries/glog/default.nix | 6 +- pkgs/development/libraries/gmime/3.nix | 2 +- pkgs/development/libraries/gmp/4.3.2.nix | 6 +- pkgs/development/libraries/gmp/5.1.x.nix | 10 +- pkgs/development/libraries/gmp/6.x.nix | 6 +- .../libraries/gnome-desktop/default.nix | 8 +- .../gnome-online-accounts/default.nix | 2 +- pkgs/development/libraries/gnutls/default.nix | 8 +- .../gobject-introspection/default.nix | 4 +- pkgs/development/libraries/gom/default.nix | 2 +- .../libraries/google-cloud-cpp/default.nix | 4 +- .../libraries/gperftools/default.nix | 6 +- pkgs/development/libraries/gpgme/default.nix | 2 +- .../libraries/graphene/default.nix | 2 +- pkgs/development/libraries/grpc/default.nix | 4 +- .../libraries/gsl-lite/default.nix | 2 +- pkgs/development/libraries/gsl/default.nix | 4 +- pkgs/development/libraries/gsm/default.nix | 2 +- pkgs/development/libraries/gss/default.nix | 4 +- pkgs/development/libraries/gssdp/1.6.nix | 2 +- pkgs/development/libraries/gssdp/default.nix | 2 +- .../libraries/gstreamer/bad/default.nix | 22 +- .../libraries/gstreamer/base/default.nix | 18 +- .../libraries/gstreamer/core/default.nix | 6 +- .../libraries/gstreamer/good/default.nix | 12 +- .../libraries/gstreamer/rs/default.nix | 16 +- .../libraries/gstreamer/ugly/default.nix | 2 +- .../libraries/gstreamer/vaapi/default.nix | 2 +- pkgs/development/libraries/gthree/default.nix | 4 +- .../libraries/gtk-frdp/default.nix | 2 +- pkgs/development/libraries/gtk/2.x.nix | 16 +- pkgs/development/libraries/gtk/3.x.nix | 26 +- pkgs/development/libraries/gtk/4.x.nix | 24 +- pkgs/development/libraries/gtkmm/4.x.nix | 4 +- .../libraries/gtksourceview/3.x.nix | 2 +- .../libraries/gtksourceview/5.x.nix | 4 +- pkgs/development/libraries/gupnp/default.nix | 2 +- pkgs/development/libraries/gvfs/default.nix | 2 +- .../libraries/harfbuzz/default.nix | 4 +- pkgs/development/libraries/hidapi/default.nix | 8 +- pkgs/development/libraries/hivex/default.nix | 2 +- .../libraries/http-parser/default.nix | 2 +- pkgs/development/libraries/hwloc/default.nix | 6 +- .../libraries/hyperscan/default.nix | 2 +- pkgs/development/libraries/icu/make-icu.nix | 6 +- pkgs/development/libraries/igraph/default.nix | 2 +- .../development/libraries/ilmbase/default.nix | 2 +- pkgs/development/libraries/imgui/default.nix | 8 +- pkgs/development/libraries/imlib2/default.nix | 2 +- pkgs/development/libraries/imtui/default.nix | 2 +- pkgs/development/libraries/inchi/default.nix | 6 +- .../libraries/intel-media-driver/default.nix | 2 +- .../libraries/irrlicht/default.nix | 4 +- pkgs/development/libraries/isa-l/default.nix | 2 +- pkgs/development/libraries/itk/generic.nix | 2 +- .../development/libraries/jabcode/default.nix | 2 +- .../libraries/java/jffi/default.nix | 2 +- .../libraries/jemalloc/default.nix | 8 +- .../kde-frameworks/kauth/default.nix | 2 +- .../kde-frameworks/kdoctools/default.nix | 2 +- .../kde-frameworks/kfilemetadata/default.nix | 2 +- .../kde-frameworks/kinit/default.nix | 2 +- .../libraries/kde-frameworks/kio/default.nix | 4 +- .../kde-frameworks/knotifications.nix | 2 +- .../libraries/kde-frameworks/ktexteditor.nix | 2 +- .../kde-frameworks/solid/default.nix | 4 +- .../libraries/kerberos/heimdal.nix | 8 +- pkgs/development/libraries/kerberos/krb5.nix | 6 +- .../libraries/kyotocabinet/default.nix | 2 +- pkgs/development/libraries/ldb/default.nix | 2 +- .../libraries/lemon-graph/default.nix | 2 +- .../libraries/leptonica/default.nix | 2 +- .../development/libraries/leveldb/default.nix | 2 +- .../libraries/lib2geom/default.nix | 2 +- pkgs/development/libraries/lib3mf/default.nix | 2 +- pkgs/development/libraries/libLAS/default.nix | 2 +- .../libraries/libad9361/default.nix | 2 +- .../libraries/libadwaita/default.nix | 8 +- .../libraries/libagar/libagar_test.nix | 2 +- .../libraries/libantlr3c/default.nix | 2 +- pkgs/development/libraries/libao/default.nix | 4 +- pkgs/development/libraries/libaom/default.nix | 2 +- .../development/libraries/libaosd/default.nix | 2 +- .../libraries/libargon2/default.nix | 2 +- pkgs/development/libraries/libass/default.nix | 2 +- .../libraries/libasyncns/default.nix | 2 +- .../libraries/libatomic_ops/default.nix | 4 +- .../libraries/libbacktrace/default.nix | 2 +- .../libraries/libbladeRF/default.nix | 6 +- .../libraries/libbluray/default.nix | 2 +- .../development/libraries/libbtbb/default.nix | 2 +- .../development/libraries/libbutl/default.nix | 4 +- .../libraries/libcacard/default.nix | 2 +- .../libraries/libcanberra/default.nix | 10 +- .../libraries/libcdio-paranoia/default.nix | 6 +- .../development/libraries/libcdio/default.nix | 4 +- pkgs/development/libraries/libcec/default.nix | 2 +- .../libraries/libcommuni/default.nix | 2 +- .../libraries/libcouchbase/default.nix | 2 +- .../libraries/libdazzle/default.nix | 4 +- .../libraries/libdc1394/default.nix | 4 +- .../libraries/libdevil/default.nix | 2 +- .../libraries/libdiscid/default.nix | 4 +- pkgs/development/libraries/libdv/default.nix | 2 +- .../libraries/libdvdcss/default.nix | 2 +- pkgs/development/libraries/libdwg/default.nix | 2 +- .../libraries/libepoxy/default.nix | 16 +- .../libraries/libevent/default.nix | 2 +- pkgs/development/libraries/libewf/default.nix | 2 +- .../libraries/libextractor/default.nix | 4 +- .../libraries/libfabric/default.nix | 4 +- pkgs/development/libraries/libff/default.nix | 2 +- pkgs/development/libraries/libffi/3.3.nix | 2 +- .../libraries/libfido2/default.nix | 12 +- .../libraries/libfilezilla/default.nix | 4 +- .../development/libraries/libfive/default.nix | 6 +- .../libraries/libfixposix/default.nix | 2 +- pkgs/development/libraries/libfm/default.nix | 2 +- pkgs/development/libraries/libfpx/default.nix | 2 +- .../libraries/libfreeaptx/default.nix | 4 +- .../libraries/libfreefare/default.nix | 2 +- .../development/libraries/libftdi/default.nix | 6 +- pkgs/development/libraries/libgcrypt/1.8.nix | 2 +- .../libraries/libgcrypt/default.nix | 6 +- pkgs/development/libraries/libgda/default.nix | 2 +- .../libraries/libgdiplus/default.nix | 4 +- .../development/libraries/libgit2/default.nix | 4 +- .../libraries/libglvnd/default.nix | 2 +- .../libraries/libgourou/default.nix | 2 +- .../libraries/libgpg-error/default.nix | 2 +- .../development/libraries/libgrss/default.nix | 2 +- .../libraries/libgweather/default.nix | 2 +- pkgs/development/libraries/libhandy/0.x.nix | 2 +- .../libraries/libhandy/default.nix | 2 +- pkgs/development/libraries/libhv/default.nix | 2 +- .../development/libraries/libical/default.nix | 4 +- .../libraries/libiconv/default.nix | 2 +- pkgs/development/libraries/libidn/default.nix | 2 +- .../development/libraries/libidn2/default.nix | 4 +- pkgs/development/libraries/libiio/default.nix | 4 +- .../libraries/libimobiledevice/default.nix | 2 +- .../libraries/libiodbc/default.nix | 2 +- pkgs/development/libraries/libipt/default.nix | 2 +- .../libraries/libiptcdata/default.nix | 2 +- .../libraries/libiscsi/default.nix | 2 +- pkgs/development/libraries/libks/default.nix | 6 +- .../libraries/liblastfm/default.nix | 2 +- .../libraries/liblinear/default.nix | 2 +- .../libraries/liblqr-1/default.nix | 2 +- pkgs/development/libraries/liblxi/default.nix | 2 +- .../libraries/libmcrypt/default.nix | 2 +- .../libraries/libmemcached/default.nix | 4 +- .../libraries/libmesode/default.nix | 2 +- .../libraries/libmikmod/default.nix | 8 +- .../libraries/libmilter/default.nix | 4 +- .../development/libraries/libminc/default.nix | 2 +- .../libraries/libmongocrypt/default.nix | 2 +- .../libraries/libmpeg2/default.nix | 2 +- pkgs/development/libraries/libmtp/default.nix | 2 +- .../libraries/libnatpmp/default.nix | 2 +- pkgs/development/libraries/libnfc/default.nix | 2 +- .../libraries/libngspice/default.nix | 2 +- pkgs/development/libraries/libofx/default.nix | 2 +- pkgs/development/libraries/liboil/default.nix | 4 +- .../libraries/libopenshot-audio/default.nix | 4 +- .../libraries/libopenshot/default.nix | 6 +- .../libraries/libossp-uuid/default.nix | 2 +- .../development/libraries/libpcap/default.nix | 8 +- .../libraries/libphonenumber/default.nix | 2 +- .../libraries/libpipeline/default.nix | 2 +- .../libraries/libplacebo/default.nix | 2 +- pkgs/development/libraries/libpng/default.nix | 2 +- .../libraries/libqglviewer/default.nix | 2 +- .../libraries/librasterlite2/default.nix | 2 +- pkgs/development/libraries/libre/default.nix | 2 +- .../libraries/libredwg/default.nix | 4 +- .../libraries/libremidi/default.nix | 4 +- .../libraries/libressl/default.nix | 2 +- pkgs/development/libraries/librsb/default.nix | 2 +- .../development/libraries/librsvg/default.nix | 6 +- .../libraries/librtprocess/default.nix | 2 +- .../libraries/libsamplerate/default.nix | 4 +- .../development/libraries/libsbsms/common.nix | 2 +- .../libraries/libscrypt/default.nix | 4 +- .../libraries/libsecret/default.nix | 2 +- .../libraries/libsegfault/default.nix | 2 +- .../libraries/libserialport/default.nix | 4 +- .../libraries/libshumate/default.nix | 2 +- .../libraries/libsndfile/default.nix | 6 +- .../libraries/libsodium/default.nix | 2 +- .../development/libraries/libsolv/default.nix | 2 +- .../libraries/libsoundio/default.nix | 8 +- pkgs/development/libraries/libsoup/3.x.nix | 4 +- .../development/libraries/libsoup/default.nix | 4 +- .../libraries/libspatialite/default.nix | 4 +- .../libraries/libspnav/default.nix | 2 +- .../libraries/libstatgrab/default.nix | 2 +- pkgs/development/libraries/libsvm/default.nix | 4 +- .../libraries/libtasn1/default.nix | 2 +- .../libraries/libticalcs2/default.nix | 4 +- .../libraries/libtiger/default.nix | 2 +- .../libraries/libtomcrypt/default.nix | 2 +- .../libraries/libtommath/default.nix | 2 +- .../development/libraries/libubox/default.nix | 2 +- .../libraries/libuchardet/default.nix | 2 +- pkgs/development/libraries/libui/default.nix | 14 +- .../libraries/libuiohook/default.nix | 2 +- .../libraries/libunarr/default.nix | 2 +- .../libraries/libunistring/default.nix | 4 +- .../development/libraries/libusb1/default.nix | 4 +- .../libraries/libusbsio/default.nix | 6 +- pkgs/development/libraries/libuv/default.nix | 6 +- pkgs/development/libraries/libva/1.nix | 2 +- pkgs/development/libraries/libva/default.nix | 2 +- .../libraries/libvdpau/default.nix | 4 +- .../libraries/libvirt-glib/default.nix | 2 +- .../development/libraries/libvirt/default.nix | 6 +- .../libraries/libvncserver/default.nix | 2 +- pkgs/development/libraries/libvpx/default.nix | 8 +- pkgs/development/libraries/libwnck/2.nix | 2 +- pkgs/development/libraries/libx86/default.nix | 2 +- .../libraries/libxkbcommon/default.nix | 2 +- .../libraries/libxklavier/default.nix | 2 +- .../development/libraries/libxml2/default.nix | 6 +- .../development/libraries/libxslt/default.nix | 2 +- .../development/libraries/libxsmm/default.nix | 2 +- pkgs/development/libraries/libyuv/default.nix | 2 +- pkgs/development/libraries/lief/default.nix | 2 +- .../libraries/lightgbm/default.nix | 2 +- pkgs/development/libraries/linbox/default.nix | 2 +- .../libraries/linenoise/default.nix | 2 +- .../libraries/liquid-dsp/default.nix | 4 +- pkgs/development/libraries/lmdb/default.nix | 2 +- .../libraries/loudmouth/default.nix | 2 +- .../libraries/mailcore2/default.nix | 10 +- pkgs/development/libraries/mapnik/default.nix | 2 +- .../matrix-sdk-crypto-nodejs/generic.nix | 2 +- .../development/libraries/medfile/default.nix | 2 +- .../libraries/memorymapping/default.nix | 2 +- .../libraries/mesa-glu/default.nix | 2 +- pkgs/development/libraries/mesa/default.nix | 8 +- .../libraries/mimalloc/default.nix | 4 +- .../development/libraries/mimetic/default.nix | 2 +- .../development/libraries/minixml/default.nix | 2 +- .../libraries/minizip-ng/default.nix | 2 +- pkgs/development/libraries/mlt/default.nix | 6 +- pkgs/development/libraries/mongoc/default.nix | 2 +- .../libraries/mongocxx/default.nix | 4 +- pkgs/development/libraries/movit/default.nix | 4 +- pkgs/development/libraries/mpich/default.nix | 6 +- pkgs/development/libraries/mpir/default.nix | 2 +- pkgs/development/libraries/mvfst/default.nix | 2 +- pkgs/development/libraries/mygui/default.nix | 6 +- pkgs/development/libraries/ncnn/default.nix | 2 +- pkgs/development/libraries/nco/default.nix | 2 +- .../development/libraries/ncurses/default.nix | 8 +- pkgs/development/libraries/ndi/default.nix | 8 +- pkgs/development/libraries/neon/default.nix | 2 +- .../libraries/netcdf-cxx4/default.nix | 2 +- .../libraries/netcdf-fortran/default.nix | 4 +- pkgs/development/libraries/nettle/generic.nix | 4 +- pkgs/development/libraries/newt/default.nix | 4 +- .../development/libraries/nghttp2/default.nix | 2 +- .../development/libraries/nghttp3/default.nix | 2 +- pkgs/development/libraries/ngtcp2/default.nix | 2 +- pkgs/development/libraries/ngtcp2/gnutls.nix | 2 +- pkgs/development/libraries/nlopt/default.nix | 2 +- pkgs/development/libraries/nspr/default.nix | 6 +- pkgs/development/libraries/nss/generic.nix | 4 +- .../libraries/nss_wrapper/default.nix | 2 +- pkgs/development/libraries/ntbtls/default.nix | 2 +- pkgs/development/libraries/numcpp/default.nix | 2 +- pkgs/development/libraries/oatpp/default.nix | 2 +- pkgs/development/libraries/ode/default.nix | 2 +- pkgs/development/libraries/odpic/default.nix | 8 +- pkgs/development/libraries/ogre/default.nix | 6 +- pkgs/development/libraries/ois/default.nix | 4 +- pkgs/development/libraries/okapi/default.nix | 2 +- pkgs/development/libraries/omorfi/default.nix | 2 +- .../libraries/onnxruntime/default.nix | 2 +- .../libraries/openal-soft/default.nix | 10 +- .../development/libraries/openbsm/default.nix | 2 +- .../libraries/opencascade-occt/default.nix | 2 +- .../libraries/opencl-clang/default.nix | 4 +- .../libraries/opencollada/default.nix | 4 +- .../development/libraries/opencolorio/1.x.nix | 6 +- .../libraries/opencolorio/default.nix | 4 +- .../development/libraries/opencsg/default.nix | 10 +- pkgs/development/libraries/openct/default.nix | 2 +- pkgs/development/libraries/opencv/4.x.nix | 16 +- pkgs/development/libraries/opencv/tests.nix | 6 +- .../development/libraries/opendbx/default.nix | 2 +- .../development/libraries/opendht/default.nix | 2 +- .../libraries/opendkim/default.nix | 4 +- pkgs/development/libraries/openexr/3.nix | 4 +- .../development/libraries/openexr/default.nix | 2 +- .../development/libraries/openfec/default.nix | 2 +- .../libraries/openimagedenoise/default.nix | 6 +- .../libraries/openjpeg/default.nix | 2 +- .../libraries/openldap/default.nix | 4 +- .../development/libraries/openmpi/default.nix | 16 +- .../libraries/opensaml-cpp/default.nix | 4 +- .../libraries/openscenegraph/default.nix | 6 +- .../development/libraries/openslp/default.nix | 2 +- .../development/libraries/openssl/default.nix | 2 +- .../libraries/opensubdiv/default.nix | 8 +- .../development/libraries/openvdb/default.nix | 2 +- .../libraries/openvino/default.nix | 4 +- .../oracle-instantclient/default.nix | 8 +- pkgs/development/libraries/packr/default.nix | 4 +- pkgs/development/libraries/pagmo2/default.nix | 6 +- pkgs/development/libraries/pango/default.nix | 4 +- .../libraries/pangolin/default.nix | 2 +- pkgs/development/libraries/pangomm/2.42.nix | 4 +- pkgs/development/libraries/pangomm/2.48.nix | 2 +- .../development/libraries/pangomm/default.nix | 2 +- pkgs/development/libraries/partio/default.nix | 4 +- .../libraries/pc-ble-driver/default.nix | 6 +- .../libraries/pcaudiolib/default.nix | 6 +- pkgs/development/libraries/pcg-c/default.nix | 2 +- pkgs/development/libraries/pcl/default.nix | 4 +- pkgs/development/libraries/physfs/default.nix | 2 +- .../libraries/physics/applgrid/default.nix | 4 +- .../libraries/physics/cernlib/default.nix | 2 +- .../libraries/physics/geant4/default.nix | 4 +- .../libraries/physics/hepmc3/default.nix | 2 +- .../libraries/physics/herwig/default.nix | 2 +- .../libraries/physics/lhapdf/default.nix | 2 +- .../libraries/physics/nlojet/default.nix | 2 +- .../libraries/physics/pythia/default.nix | 2 +- pkgs/development/libraries/pixman/default.nix | 4 +- pkgs/development/libraries/plplot/default.nix | 2 +- pkgs/development/libraries/pmix/default.nix | 4 +- pkgs/development/libraries/png++/default.nix | 2 +- .../libraries/polkit-qt-1/default.nix | 2 +- pkgs/development/libraries/polkit/default.nix | 6 +- .../development/libraries/poppler/default.nix | 2 +- pkgs/development/libraries/popt/default.nix | 2 +- .../libraries/portaudio/default.nix | 8 +- .../libraries/portmidi/default.nix | 4 +- pkgs/development/libraries/ppl/default.nix | 2 +- .../development/libraries/precice/default.nix | 2 +- pkgs/development/libraries/proj/default.nix | 2 +- .../libraries/protobuf/generic-v3.nix | 2 +- .../libraries/protobuf/generic.nix | 4 +- pkgs/development/libraries/pslib/default.nix | 2 +- pkgs/development/libraries/pth/default.nix | 2 +- .../libraries/python-qt/default.nix | 2 +- pkgs/development/libraries/qhull/default.nix | 2 +- .../libraries/qmltermwidget/default.nix | 2 +- .../libraries/qrencode/default.nix | 2 +- .../libraries/qrupdate/default.nix | 2 +- .../libraries/qscintilla/default.nix | 8 +- .../libraries/qt-5/5.15/default.nix | 18 +- .../libraries/qt-5/modules/qt3d.nix | 2 +- .../libraries/qt-5/modules/qtbase.nix | 16 +- .../libraries/qt-5/modules/qtconnectivity.nix | 4 +- .../libraries/qt-5/modules/qtdatavis3d.nix | 2 +- .../libraries/qt-5/modules/qtgamepad.nix | 2 +- .../libraries/qt-5/modules/qtlocation.nix | 2 +- .../libraries/qt-5/modules/qtmultimedia.nix | 4 +- .../libraries/qt-5/modules/qtserialport.nix | 2 +- .../libraries/qt-5/modules/qtspeech.nix | 2 +- .../libraries/qt-5/modules/qttools.nix | 4 +- .../libraries/qt-5/modules/qtwebengine.nix | 18 +- .../libraries/qt-5/modules/qtwebkit.nix | 12 +- .../libraries/qt-5/modules/qtwebview.nix | 4 +- pkgs/development/libraries/qt-6/default.nix | 6 +- .../libraries/qt-6/modules/qtbase.nix | 2 +- .../libraries/qt-6/modules/qtwebengine.nix | 2 +- .../libraries/qtkeychain/default.nix | 6 +- .../libraries/qtpbfimageplugin/default.nix | 2 +- pkgs/development/libraries/quarto/default.nix | 2 +- pkgs/development/libraries/quazip/default.nix | 2 +- .../libraries/quickfix/default.nix | 2 +- .../development/libraries/quictls/default.nix | 2 +- pkgs/development/libraries/qwt/default.nix | 2 +- .../libraries/range-v3/default.nix | 4 +- .../libraries/rapidjson/default.nix | 2 +- pkgs/development/libraries/raylib/default.nix | 12 +- .../libraries/retro-gtk/default.nix | 2 +- .../development/libraries/rlottie/default.nix | 2 +- .../libraries/rnnoise-plugin/default.nix | 6 +- .../development/libraries/rocksdb/default.nix | 6 +- pkgs/development/libraries/rttr/default.nix | 2 +- .../libraries/rubberband/default.nix | 2 +- .../libraries/rustls-ffi/default.nix | 2 +- .../libraries/schroedinger/default.nix | 2 +- .../science/astronomy/indilib/default.nix | 2 +- .../science/biology/bpp-core/default.nix | 2 +- .../science/biology/bpp-phyl/default.nix | 2 +- .../science/biology/bpp-popgen/default.nix | 2 +- .../science/biology/bpp-seq/default.nix | 2 +- .../science/biology/elastix/default.nix | 4 +- .../science/biology/gifticlib/default.nix | 2 +- .../libraries/science/math/arpack/default.nix | 2 +- .../libraries/science/math/blas/default.nix | 2 +- .../libraries/science/math/bonmin/default.nix | 4 +- .../libraries/science/math/clblas/default.nix | 6 +- .../libraries/science/math/faiss/default.nix | 2 +- .../libraries/science/math/itpp/default.nix | 2 +- .../science/math/libamplsolver/default.nix | 2 +- .../science/math/liblapack/default.nix | 4 +- .../science/math/liblbfgs/default.nix | 2 +- .../libraries/science/math/libtorch/bin.nix | 8 +- .../libraries/science/math/m4rie/default.nix | 2 +- .../libraries/science/math/mkl/default.nix | 24 +- .../science/math/openblas/default.nix | 2 +- .../science/math/or-tools/default.nix | 4 +- .../science/math/p4est-sc/default.nix | 2 +- .../science/math/scalapack/default.nix | 6 +- .../math/suitesparse-graphblas/default.nix | 2 +- .../science/math/suitesparse/4.4.nix | 6 +- .../science/math/suitesparse/default.nix | 6 +- .../libraries/science/math/sympow/default.nix | 2 +- .../science/math/tiny-cuda-nn/default.nix | 2 +- .../science/networking/ns-3/default.nix | 2 +- pkgs/development/libraries/serf/default.nix | 4 +- pkgs/development/libraries/sfml/default.nix | 6 +- .../libraries/shibboleth-sp/default.nix | 2 +- .../libraries/silgraphite/graphite2.nix | 2 +- pkgs/development/libraries/smpeg/default.nix | 2 +- pkgs/development/libraries/smpeg2/default.nix | 2 +- pkgs/development/libraries/soci/default.nix | 2 +- .../libraries/sofia-sip/default.nix | 2 +- pkgs/development/libraries/sonic/default.nix | 2 +- .../libraries/speech-tools/default.nix | 4 +- .../libraries/speexdsp/default.nix | 2 +- pkgs/development/libraries/spglib/default.nix | 2 +- .../libraries/spice-gtk/default.nix | 8 +- pkgs/development/libraries/spice/default.nix | 4 +- pkgs/development/libraries/sqlite/default.nix | 2 +- pkgs/development/libraries/sqlite/tools.nix | 2 +- .../libraries/stargate-libcds/default.nix | 2 +- pkgs/development/libraries/stfl/default.nix | 2 +- pkgs/development/libraries/stxxl/default.nix | 2 +- .../libraries/symengine/default.nix | 2 +- pkgs/development/libraries/t1lib/default.nix | 2 +- .../development/libraries/tachyon/default.nix | 2 +- pkgs/development/libraries/taco/default.nix | 2 +- pkgs/development/libraries/talloc/default.nix | 2 +- pkgs/development/libraries/tbb/2020_3.nix | 2 +- pkgs/development/libraries/tbb/2021_5.nix | 2 +- pkgs/development/libraries/tbb/default.nix | 2 +- pkgs/development/libraries/tdb/default.nix | 2 +- pkgs/development/libraries/tdlib/default.nix | 2 +- .../libraries/tezos-rust-libs/default.nix | 2 +- pkgs/development/libraries/thrift/default.nix | 4 +- pkgs/development/libraries/tiledb/default.nix | 2 +- pkgs/development/libraries/tinyxml/2.6.2.nix | 4 +- pkgs/development/libraries/tk/8.5.nix | 2 +- pkgs/development/libraries/tk/generic.nix | 8 +- pkgs/development/libraries/tkimg/default.nix | 2 +- pkgs/development/libraries/toml-f/default.nix | 2 +- .../libraries/tpm2-tss/default.nix | 2 +- .../development/libraries/tracker/default.nix | 12 +- pkgs/development/libraries/ubus/default.nix | 2 +- .../development/libraries/uclient/default.nix | 2 +- pkgs/development/libraries/udns/default.nix | 2 +- .../development/libraries/unicorn/default.nix | 6 +- .../libraries/unixODBCDrivers/default.nix | 24 +- pkgs/development/libraries/v8/default.nix | 10 +- pkgs/development/libraries/vc/0.7.nix | 2 +- .../libraries/vcdimager/default.nix | 2 +- .../libraries/vectorscan/default.nix | 4 +- .../libraries/virtualpg/default.nix | 2 +- pkgs/development/libraries/vmmlib/default.nix | 6 +- pkgs/development/libraries/vrpn/default.nix | 4 +- .../development/libraries/vsqlite/default.nix | 2 +- pkgs/development/libraries/vte/default.nix | 2 +- pkgs/development/libraries/vtk/generic.nix | 14 +- .../libraries/vulkan-headers/default.nix | 2 +- .../libraries/vulkan-loader/default.nix | 8 +- pkgs/development/libraries/vxl/default.nix | 2 +- pkgs/development/libraries/wangle/default.nix | 4 +- .../development/libraries/wayland/default.nix | 2 +- .../libraries/webkitgtk/default.nix | 18 +- .../libraries/webrtc-audio-processing/0.3.nix | 2 +- .../webrtc-audio-processing/default.nix | 4 +- .../development/libraries/wolfssl/default.nix | 6 +- pkgs/development/libraries/wxSVG/default.nix | 2 +- .../libraries/wxsqlite3/default.nix | 2 +- .../libraries/wxsqliteplus/default.nix | 10 +- .../libraries/wxwidgets/wxGTK31.nix | 20 +- .../libraries/wxwidgets/wxGTK32.nix | 18 +- pkgs/development/libraries/x264/default.nix | 4 +- pkgs/development/libraries/x265/default.nix | 4 +- pkgs/development/libraries/xapian/default.nix | 4 +- pkgs/development/libraries/xavs/default.nix | 2 +- pkgs/development/libraries/xed/default.nix | 4 +- .../development/libraries/xgboost/default.nix | 2 +- .../libraries/xml-security-c/default.nix | 2 +- .../libraries/xvidcore/default.nix | 10 +- .../libraries/yubico-pam/default.nix | 2 +- .../libraries/zeroc-ice/default.nix | 2 +- pkgs/development/lisp-modules/ql.nix | 2 +- pkgs/development/lua-modules/nfd/default.nix | 2 +- pkgs/development/lua-modules/overrides.nix | 10 +- pkgs/development/misc/datafusion/default.nix | 2 +- pkgs/development/misc/juce/default.nix | 4 +- pkgs/development/misc/msp430/mspdebug.nix | 14 +- pkgs/development/misc/msp430/mspds/binary.nix | 4 +- .../development/misc/msp430/mspds/default.nix | 8 +- pkgs/development/misc/resholve/test.nix | 8 +- pkgs/development/mobile/androidenv/cmake.nix | 2 +- .../mobile/androidenv/cmdline-tools.nix | 2 +- .../androidenv/compose-android-packages.nix | 4 +- .../mobile/androidenv/ndk-bundle/default.nix | 4 +- .../development/mobile/androidenv/patcher.nix | 2 +- pkgs/development/mobile/gomobile/default.nix | 2 +- .../mobile/titaniumenv/build-app.nix | 4 +- .../mobile/xcodeenv/compose-xcodewrapper.nix | 2 +- pkgs/development/mobile/xpwn/default.nix | 2 +- .../development/node-packages/composition.nix | 2 +- pkgs/development/node-packages/node-env.nix | 10 +- pkgs/development/node-packages/overrides.nix | 24 +- .../ocaml-modules/apron/default.nix | 2 +- .../development/ocaml-modules/arp/default.nix | 2 +- .../ocaml-modules/bjack/default.nix | 2 +- .../ocaml-modules/cairo2/default.nix | 4 +- .../ocaml-modules/camomile/default.nix | 2 +- .../development/ocaml-modules/cpu/default.nix | 2 +- .../ocaml-modules/crowbar/default.nix | 2 +- .../ocaml-modules/ctypes_stubs_js/default.nix | 2 +- .../ocaml-modules/curly/default.nix | 2 +- .../ocaml-modules/eigen/default.nix | 2 +- pkgs/development/ocaml-modules/eio/main.nix | 2 +- pkgs/development/ocaml-modules/eio/posix.nix | 2 +- .../ocaml-modules/elina/default.nix | 2 +- .../ocaml-modules/ffmpeg/ffmpeg-av.nix | 2 +- .../ocaml-modules/ffmpeg/ffmpeg-avcodec.nix | 2 +- .../ocaml-modules/ffmpeg/ffmpeg-avdevice.nix | 2 +- .../ocaml-modules/ffmpeg/ffmpeg-avfilter.nix | 2 +- .../ocaml-modules/ffmpeg/ffmpeg-avutil.nix | 2 +- .../ffmpeg/ffmpeg-swresample.nix | 2 +- .../ocaml-modules/ffmpeg/ffmpeg-swscale.nix | 2 +- .../development/ocaml-modules/git/default.nix | 2 +- .../development/ocaml-modules/gsl/default.nix | 2 +- .../ocaml-modules/gstreamer/default.nix | 2 +- .../ocaml-modules/labltk/default.nix | 2 +- .../ocaml-modules/lacaml/default.nix | 2 +- .../ocaml-modules/ocaml-libvirt/default.nix | 2 +- .../ocaml-modules/sodium/default.nix | 2 +- .../ocaml-modules/torch/default.nix | 2 +- .../ocaml-modules/tsdl/default.nix | 2 +- .../ocaml-modules/uunf/default.nix | 2 +- .../ocaml-modules/zelus/default.nix | 2 +- .../octave-modules/gsl/default.nix | 2 +- .../octave-modules/ocl/default.nix | 2 +- .../octave-modules/strings/default.nix | 2 +- .../perl-modules/ImageExifTool/default.nix | 4 +- .../WWW-YoutubeViewer/default.nix | 4 +- .../strip-nondeterminism/default.nix | 6 +- .../php-packages/datadog_trace/default.nix | 6 +- .../php-packages/mongodb/default.nix | 2 +- .../php-packages/openswoole/default.nix | 2 +- .../php-packages/pdo_sqlsrv/default.nix | 2 +- .../php-packages/relay/default.nix | 6 +- .../php-packages/snuffleupagus/default.nix | 2 +- .../php-packages/sqlsrv/default.nix | 2 +- .../php-packages/swoole/default.nix | 2 +- .../python-modules/aardwolf/default.nix | 2 +- .../python-modules/accelerate/default.nix | 8 +- .../python-modules/accupy/default.nix | 2 +- .../python-modules/adblock/default.nix | 2 +- .../python-modules/aesara/default.nix | 2 +- .../python-modules/aiofiles/default.nix | 2 +- .../python-modules/aioftp/default.nix | 2 +- .../python-modules/aiohttp/default.nix | 6 +- .../python-modules/aiomisc/default.nix | 2 +- .../python-modules/aiosonic/default.nix | 4 +- .../python-modules/ale-py/default.nix | 2 +- .../python-modules/angr/default.nix | 2 +- .../python-modules/ansible-runner/default.nix | 2 +- .../python-modules/anyio/default.nix | 2 +- .../python-modules/apscheduler/default.nix | 2 +- .../python-modules/apsw/default.nix | 2 +- .../python-modules/ase/default.nix | 2 +- .../python-modules/asgiref/default.nix | 2 +- .../aspy-refactor-imports/default.nix | 2 +- .../python-modules/astropy/default.nix | 2 +- .../async-upnp-client/default.nix | 2 +- .../python-modules/asyncio-dgram/default.nix | 2 +- .../python-modules/asyncua/default.nix | 2 +- .../python-modules/aubio/default.nix | 2 +- .../python-modules/audiotools/default.nix | 2 +- .../development/python-modules/av/default.nix | 2 +- .../python-modules/awkward/default.nix | 4 +- .../python-modules/awscrt/default.nix | 4 +- .../python-modules/awslambdaric/default.nix | 2 +- .../python-modules/azure-core/default.nix | 2 +- .../python-modules/b2sdk/default.nix | 2 +- .../python-modules/base2048/default.nix | 2 +- .../bayesian-optimization/default.nix | 2 +- .../python-modules/bcrypt/default.nix | 2 +- .../python-modules/behave/default.nix | 2 +- .../python-modules/binwalk/default.nix | 2 +- .../python-modules/black/default.nix | 6 +- .../python-modules/blackjax/default.nix | 4 +- .../python-modules/bpycv/default.nix | 2 +- .../python-modules/breezy/default.nix | 2 +- .../python-modules/build/default.nix | 2 +- .../python-modules/bx-py-utils/default.nix | 2 +- .../python-modules/bytewax/default.nix | 2 +- .../development/python-modules/capstone/4.nix | 2 +- .../python-modules/capstone/default.nix | 2 +- .../python-modules/capturer/default.nix | 2 +- .../cassandra-driver/default.nix | 2 +- .../python-modules/celery/default.nix | 2 +- .../python-modules/cffi/default.nix | 2 +- .../python-modules/cffsubr/default.nix | 2 +- .../python-modules/cheroot/default.nix | 2 +- .../python-modules/cherrypy/default.nix | 4 +- .../python-modules/chromadb/default.nix | 4 +- .../python-modules/circus/default.nix | 2 +- .../python-modules/cirq-core/default.nix | 2 +- .../python-modules/clarabel/default.nix | 2 +- .../python-modules/clickgen/default.nix | 2 +- .../python-modules/clustershell/default.nix | 2 +- .../python-modules/cmd2/default.nix | 4 +- .../python-modules/cmdstanpy/default.nix | 2 +- .../python-modules/cmigemo/default.nix | 2 +- .../cmsis-pack-manager/default.nix | 2 +- .../python-modules/coloredlogs/default.nix | 2 +- .../python-modules/commoncode/default.nix | 2 +- .../python-modules/configparser/default.nix | 2 +- .../python-modules/construct/default.nix | 2 +- .../python-modules/cot/default.nix | 2 +- .../craft-application/default.nix | 2 +- .../python-modules/craft-parts/default.nix | 2 +- .../python-modules/cram/default.nix | 2 +- .../python-modules/cramjam/default.nix | 2 +- .../python-modules/cryptg/default.nix | 2 +- .../python-modules/cryptography/default.nix | 2 +- .../python-modules/css-inline/default.nix | 4 +- .../python-modules/curio/default.nix | 2 +- .../python-modules/curtsies/default.nix | 2 +- .../python-modules/cvxpy/default.nix | 2 +- pkgs/development/python-modules/cython/0.nix | 6 +- .../python-modules/cython/default.nix | 6 +- .../python-modules/daphne/default.nix | 2 +- .../python-modules/darkdetect/default.nix | 2 +- .../python-modules/dask-jobqueue/default.nix | 2 +- .../python-modules/dask/default.nix | 4 +- .../python-modules/datafusion/default.nix | 2 +- .../python-modules/datalad-gooey/default.nix | 2 +- .../python-modules/datatable/default.nix | 2 +- .../python-modules/dbt-extractor/default.nix | 2 +- .../python-modules/debugpy/default.nix | 8 +- .../python-modules/deltalake/default.nix | 2 +- .../python-modules/demesdraw/default.nix | 2 +- .../python-modules/deploykit/default.nix | 2 +- .../desktop-notifier/default.nix | 2 +- .../python-modules/detectron2/default.nix | 2 +- .../python-modules/devito/default.nix | 8 +- .../python-modules/diskcache/default.nix | 2 +- .../django-postgresql-netfields/default.nix | 2 +- .../python-modules/django-q/default.nix | 2 +- pkgs/development/python-modules/django/4.nix | 2 +- pkgs/development/python-modules/django/5.nix | 2 +- .../python-modules/dlinfo/default.nix | 2 +- .../python-modules/dm-tree/default.nix | 2 +- .../python-modules/docker/default.nix | 2 +- .../python-modules/docutils/default.nix | 2 +- .../python-modules/doit/default.nix | 4 +- .../python-modules/dramatiq/default.nix | 2 +- .../python-modules/dtschema/default.nix | 2 +- .../python-modules/duckdb/default.nix | 2 +- .../python-modules/dulwich/default.nix | 2 +- .../python-modules/dvc-render/default.nix | 2 +- .../python-modules/e3-core/default.nix | 2 +- .../python-modules/elastic-apm/default.nix | 2 +- .../python-modules/eliot/default.nix | 2 +- .../python-modules/embrace/default.nix | 2 +- .../python-modules/enlighten/default.nix | 2 +- .../ephemeral-port-reserve/default.nix | 2 +- .../python-modules/etebase/default.nix | 4 +- .../python-modules/eventlet/default.nix | 2 +- .../python-modules/evtx/default.nix | 2 +- .../python-modules/fastdiff/default.nix | 2 +- .../python-modules/fastjsonschema/default.nix | 2 +- .../fasttext-predict/default.nix | 2 +- .../python-modules/ffcv/default.nix | 2 +- .../python-modules/ffmpy/default.nix | 2 +- .../finetuning-scheduler/default.nix | 4 +- .../python-modules/fipy/default.nix | 4 +- .../python-modules/flask-caching/default.nix | 2 +- .../python-modules/flask-restx/default.nix | 2 +- .../python-modules/flask-testing/default.nix | 2 +- .../python-modules/fonttools/default.nix | 2 +- .../python-modules/foxdot/default.nix | 2 +- .../python-modules/freud/default.nix | 2 +- .../python-modules/frida-python/default.nix | 2 +- .../development/python-modules/fs/default.nix | 2 +- .../python-modules/fsspec/default.nix | 2 +- .../python-modules/funsor/default.nix | 2 +- .../python-modules/fuse-python/default.nix | 2 +- .../python-modules/fusepy/default.nix | 2 +- .../python-modules/gb-io/default.nix | 2 +- .../python-modules/gbulb/default.nix | 2 +- .../python-modules/geopandas/default.nix | 2 +- .../geventhttpclient/default.nix | 2 +- .../python-modules/glean-sdk/default.nix | 2 +- .../python-modules/glymur/default.nix | 4 +- .../python-modules/gmpy2/default.nix | 4 +- .../google-auth-oauthlib/default.nix | 2 +- .../python-modules/google-auth/default.nix | 2 +- .../python-modules/gpy/default.nix | 2 +- .../python-modules/gradio/client.nix | 2 +- .../python-modules/gradio/default.nix | 4 +- .../graphene-django/default.nix | 2 +- .../python-modules/graphviz/default.nix | 2 +- .../python-modules/greeclimate/default.nix | 2 +- .../python-modules/grpcio/default.nix | 2 +- .../python-modules/gssapi/default.nix | 4 +- .../python-modules/gumath/default.nix | 2 +- .../python-modules/gymnasium/default.nix | 2 +- .../python-modules/gyp/default.nix | 2 +- .../python-modules/hfst/default.nix | 2 +- .../python-modules/hidapi/default.nix | 8 +- .../python-modules/httpie/default.nix | 2 +- .../python-modules/httplib2/default.nix | 2 +- .../python-modules/httpx/default.nix | 2 +- .../python-modules/hupper/default.nix | 2 +- .../python-modules/ifcopenshell/default.nix | 2 +- .../python-modules/ignite/default.nix | 2 +- .../imagecodecs-lite/default.nix | 2 +- .../python-modules/imageio/default.nix | 4 +- .../python-modules/img2pdf/default.nix | 4 +- .../python-modules/inkex/default.nix | 2 +- .../python-modules/intake/default.nix | 2 +- .../invisible-watermark/default.nix | 2 +- .../python-modules/ipwhois/default.nix | 2 +- .../python-modules/ipykernel/default.nix | 2 +- .../python-modules/ipykernel/tests.nix | 2 +- .../python-modules/ipython/default.nix | 2 +- .../python-modules/jaraco-net/default.nix | 4 +- .../python-modules/jaraco-path/default.nix | 2 +- .../python-modules/jax/default.nix | 6 +- .../development/python-modules/jaxlib/bin.nix | 6 +- .../python-modules/jaxlib/default.nix | 10 +- .../python-modules/jaxopt/default.nix | 4 +- .../jedi-language-server/default.nix | 2 +- .../python-modules/jedi/default.nix | 2 +- .../python-modules/jellyfish/default.nix | 2 +- .../python-modules/jinja2/default.nix | 2 +- .../python-modules/joblib/default.nix | 2 +- .../johnnycanencrypt/default.nix | 4 +- .../json-stream-rs-tokenizer/default.nix | 2 +- .../python-modules/json-stream/default.nix | 2 +- .../python-modules/jsonstreams/default.nix | 2 +- .../python-modules/jupyter-server/default.nix | 6 +- .../python-modules/jupyterhub/default.nix | 2 +- .../python-modules/jupytext/default.nix | 2 +- .../python-modules/kaleido/default.nix | 2 +- .../python-modules/keyring/default.nix | 4 +- .../python-modules/keyring_24/default.nix | 4 +- .../keystone-engine/default.nix | 2 +- .../python-modules/kivy/default.nix | 8 +- .../python-modules/kiwisolver/default.nix | 2 +- .../python-modules/krb5/default.nix | 2 +- .../python-modules/kubernetes/default.nix | 2 +- .../python-modules/lancedb/default.nix | 2 +- .../python-modules/langchain-core/default.nix | 2 +- .../langgraph-checkpoint-postgres/default.nix | 2 +- .../python-modules/langgraph/default.nix | 2 +- .../python-modules/langsmith/default.nix | 2 +- .../python-modules/ledgerblue/default.nix | 2 +- .../python-modules/ledgerwallet/default.nix | 2 +- .../python-modules/libasyncns/default.nix | 2 +- .../python-modules/libcst/default.nix | 2 +- .../python-modules/librosa/default.nix | 2 +- .../python-modules/libtmux/default.nix | 4 +- .../python-modules/lightgbm/default.nix | 2 +- .../python-modules/llfuse/default.nix | 2 +- .../python-modules/llvmlite/default.nix | 2 +- .../python-modules/loguru/default.nix | 4 +- .../python-modules/logutils/default.nix | 2 +- .../python-modules/ltpycld2/default.nix | 2 +- .../python-modules/lxml/default.nix | 2 +- .../python-modules/lzallright/default.nix | 2 +- .../python-modules/m2crypto/default.nix | 2 +- .../magic-wormhole-mailbox-server/default.nix | 2 +- .../python-modules/magic-wormhole/default.nix | 4 +- .../python-modules/magika/default.nix | 2 +- .../python-modules/mahotas/default.nix | 4 +- .../python-modules/manhole/default.nix | 2 +- .../python-modules/manimpango/default.nix | 2 +- .../python-modules/markdown-it-py/default.nix | 2 +- .../python-modules/materialx/default.nix | 6 +- .../python-modules/matplotlib/default.nix | 8 +- .../python-modules/matplotx/default.nix | 2 +- .../python-modules/maxminddb/default.nix | 2 +- .../python-modules/miniaudio/default.nix | 2 +- .../python-modules/miniupnpc/default.nix | 2 +- .../python-modules/mip/default.nix | 2 +- .../python-modules/mitmproxy-rs/default.nix | 2 +- .../python-modules/mitmproxy/default.nix | 2 +- .../python-modules/mmengine/default.nix | 2 +- .../python-modules/mocket/default.nix | 6 +- .../python-modules/modeled/default.nix | 2 +- .../moderngl-window/default.nix | 2 +- .../python-modules/monotonic/default.nix | 4 +- .../python-modules/morecantile/default.nix | 2 +- .../motioneye-client/default.nix | 2 +- .../python-modules/myjwt/default.nix | 2 +- .../python-modules/nats-py/default.nix | 2 +- .../python-modules/ndtypes/default.nix | 2 +- .../python-modules/nh3/default.nix | 2 +- .../python-modules/nipype/default.nix | 2 +- .../python-modules/nitime/default.nix | 2 +- .../python-modules/notify-py/default.nix | 12 +- .../python-modules/numba/default.nix | 2 +- pkgs/development/python-modules/numpy/1.nix | 10 +- pkgs/development/python-modules/numpy/2.nix | 6 +- .../python-modules/nutils-poly/default.nix | 2 +- .../python-modules/okonomiyaki/default.nix | 2 +- .../python-modules/onecache/default.nix | 2 +- .../python-modules/onnx/default.nix | 2 +- .../python-modules/onnxruntime/default.nix | 2 +- .../open-clip-torch/default.nix | 2 +- .../python-modules/opensfm/default.nix | 4 +- .../python-modules/openstacksdk/tests.nix | 2 +- .../default.nix | 2 +- .../python-modules/openusd/default.nix | 10 +- .../orange-canvas-core/default.nix | 2 +- .../orange-widget-base/default.nix | 2 +- .../orbax-checkpoint/default.nix | 2 +- .../python-modules/orjson/default.nix | 2 +- .../python-modules/osc/default.nix | 2 +- .../python-modules/oscrypto/default.nix | 2 +- .../python-modules/oslo-log/default.nix | 2 +- .../python-modules/ospd/default.nix | 2 +- .../python-modules/osxphotos/default.nix | 2 +- .../python-modules/overly/default.nix | 2 +- .../python-modules/paddlepaddle/default.nix | 2 +- .../python-modules/paho-mqtt/1.nix | 2 +- .../python-modules/paho-mqtt/default.nix | 2 +- .../python-modules/pandas-stubs/default.nix | 4 +- .../python-modules/pandas/default.nix | 12 +- .../python-modules/papermill/default.nix | 2 +- .../python-modules/papis/default.nix | 2 +- .../python-modules/patool/default.nix | 2 +- .../python-modules/pdf2docx/default.nix | 2 +- .../pdoc-pyo3-sample-library/default.nix | 2 +- .../python-modules/pebble/default.nix | 2 +- .../python-modules/pendulum/default.nix | 4 +- .../python-modules/perfplot/default.nix | 2 +- .../python-modules/pettingzoo/default.nix | 2 +- .../python-modules/pgcli/default.nix | 2 +- .../python-modules/picosvg/default.nix | 2 +- .../python-modules/pillow-heif/default.nix | 4 +- .../python-modules/pillow-simd/default.nix | 2 +- .../python-modules/pillow/generic.nix | 2 +- .../python-modules/pint-pandas/default.nix | 2 +- .../python-modules/pip-tools/default.nix | 2 +- .../python-modules/playwright/default.nix | 4 +- .../python-modules/plyer/default.nix | 2 +- .../python-modules/polars/default.nix | 2 +- .../python-modules/powerline/default.nix | 2 +- .../python-modules/ppft/default.nix | 2 +- .../pre-commit-hooks/default.nix | 2 +- .../python-modules/primer3/default.nix | 2 +- .../python-modules/prox-tv/default.nix | 2 +- .../python-modules/psrpcore/default.nix | 2 +- .../python-modules/psutil/default.nix | 6 +- .../python-modules/psycopg/default.nix | 4 +- .../python-modules/psycopg2/default.nix | 2 +- .../python-modules/psycopg2cffi/default.nix | 2 +- .../python-modules/pwntools/default.nix | 2 +- .../py-bip39-bindings/default.nix | 2 +- .../python-modules/py-cpuinfo/default.nix | 2 +- .../python-modules/py-libzfs/default.nix | 2 +- .../py-sr25519-bindings/default.nix | 2 +- .../python-modules/py3exiv2/default.nix | 4 +- .../python-modules/pyarrow/default.nix | 6 +- .../python-modules/pyatv/default.nix | 2 +- .../python-modules/pybind11/default.nix | 4 +- .../python-modules/pybluez/default.nix | 2 +- .../python-modules/pyclip/default.nix | 6 +- .../python-modules/pycookiecheat/default.nix | 2 +- .../python-modules/pycrdt/default.nix | 2 +- .../python-modules/pycups/default.nix | 2 +- .../python-modules/pycurl/default.nix | 2 +- .../python-modules/pydantic-core/default.nix | 2 +- .../python-modules/pydevd/default.nix | 2 +- .../python-modules/pydicom/default.nix | 4 +- .../python-modules/pyeclib/default.nix | 2 +- .../python-modules/pyfakefs/default.nix | 2 +- .../python-modules/pygame-ce/default.nix | 4 +- .../python-modules/pygame/default.nix | 2 +- .../python-modules/pygit2/default.nix | 2 +- .../python-modules/pygls/default.nix | 2 +- .../python-modules/pygmt/default.nix | 2 +- .../python-modules/pygobject/3.nix | 2 +- .../python-modules/pyhanko/default.nix | 2 +- .../python-modules/pyheck/default.nix | 2 +- .../python-modules/pylance/default.nix | 6 +- .../pylibjpeg-openjpeg/default.nix | 2 +- .../python-modules/pylint/default.nix | 2 +- .../python-modules/pymemcache/default.nix | 2 +- .../python-modules/pymunk/default.nix | 2 +- .../python-modules/pymupdf/default.nix | 4 +- .../python-modules/pync/default.nix | 2 +- .../python-modules/pynput/default.nix | 6 +- .../python-modules/pyocd/default.nix | 2 +- .../python-modules/pyopencl/default.nix | 4 +- .../python-modules/pyopengl/default.nix | 2 +- .../python-modules/pyopengltk/default.nix | 2 +- .../python-modules/pyopenssl/default.nix | 2 +- .../python-modules/pyparted/default.nix | 2 +- .../python-modules/pypass/default.nix | 2 +- .../python-modules/pypck/default.nix | 2 +- .../python-modules/pyperscan/default.nix | 2 +- pkgs/development/python-modules/pyqt/5.x.nix | 4 +- pkgs/development/python-modules/pyqt/6.x.nix | 4 +- .../python-modules/pyqtgraph/default.nix | 2 +- .../python-modules/pyqtwebengine/default.nix | 2 +- .../python-modules/pyreadstat/default.nix | 2 +- .../pyreqwest-impersonate/default.nix | 2 +- .../python-modules/pyscard/default.nix | 2 +- .../python-modules/pysequoia/default.nix | 4 +- .../python-modules/pyshark/default.nix | 2 +- .../python-modules/pyside2/default.nix | 2 +- .../python-modules/pyside6/default.nix | 8 +- .../python-modules/pysilero-vad/default.nix | 2 +- .../python-modules/pysptk/default.nix | 2 +- .../python-modules/pystatgrab/default.nix | 2 +- .../python-modules/pysvn/default.nix | 4 +- .../python-modules/pytest-ansible/default.nix | 4 +- .../python-modules/pytest-flask/default.nix | 2 +- .../python-modules/pytest-forked/default.nix | 2 +- .../pytest-recording/default.nix | 2 +- .../python-modules/python-can/default.nix | 2 +- .../python-engineio/default.nix | 4 +- .../python-modules/python-etcd/default.nix | 2 +- .../python-modules/python-flirt/default.nix | 2 +- .../python-modules/python-fx/default.nix | 2 +- .../python-modules/python-gvm/default.nix | 2 +- .../python-modules/python-jenkins/default.nix | 2 +- .../python-modules/python-ldap/default.nix | 2 +- .../python-modules/python-mapnik/default.nix | 6 +- .../python-redis-lock/default.nix | 2 +- .../python-roborock/default.nix | 2 +- .../python-modules/python-rtmidi/default.nix | 4 +- .../python-xmp-toolkit/default.nix | 2 +- .../python-modules/pythonocc-core/default.nix | 2 +- .../pytorch-metric-learning/default.nix | 2 +- .../python-modules/pyudev/default.nix | 2 +- .../python-modules/pyunbound/default.nix | 2 +- .../python-modules/pyvex/default.nix | 4 +- .../python-modules/pyvlx/default.nix | 2 +- .../python-modules/qcelemental/default.nix | 2 +- .../qcodes-contrib-drivers/default.nix | 4 +- .../python-modules/qcs-sdk-python/default.nix | 2 +- .../python-modules/qiskit-ignis/default.nix | 2 +- .../python-modules/qiskit-terra/default.nix | 2 +- .../python-modules/qscintilla-qt5/default.nix | 4 +- .../python-modules/questionary/default.nix | 2 +- .../python-modules/quil/default.nix | 2 +- .../python-modules/rapidfuzz/default.nix | 4 +- .../rapidocr-onnxruntime/default.nix | 2 +- .../python-modules/rasterio/default.nix | 2 +- .../raylib-python-cffi/default.nix | 2 +- .../python-modules/rdflib/default.nix | 2 +- .../readability-lxml/default.nix | 2 +- .../requests-kerberos/default.nix | 2 +- .../python-modules/requests/default.nix | 4 +- .../python-modules/rerun-sdk/default.nix | 2 +- .../python-modules/rising/default.nix | 2 +- .../python-modules/rpy2/default.nix | 2 +- .../python-modules/rpyc/default.nix | 2 +- .../python-modules/rstcheck/default.nix | 2 +- .../python-modules/rtmidi-python/default.nix | 4 +- .../python-modules/ruff-api/default.nix | 2 +- .../python-modules/ruffus/default.nix | 2 +- .../python-modules/rustworkx/default.nix | 2 +- .../python-modules/s3transfer/default.nix | 2 +- .../python-modules/safetensors/default.nix | 4 +- .../python-modules/sanic/default.nix | 4 +- .../python-modules/scikit-image/default.nix | 4 +- .../python-modules/scikit-learn/default.nix | 4 +- .../python-modules/scikit-rf/default.nix | 4 +- .../scikit-survival/default.nix | 2 +- .../python-modules/scipy/default.nix | 8 +- .../python-modules/scrapy/default.nix | 2 +- .../python-modules/screeninfo/default.nix | 2 +- .../python-modules/scs/default.nix | 2 +- .../python-modules/selenium/default.nix | 4 +- .../python-modules/send2trash/default.nix | 2 +- .../python-modules/sentry-sdk/1.nix | 2 +- .../development/python-modules/sh/default.nix | 2 +- .../python-modules/shapely/default.nix | 2 +- .../python-modules/shiboken6/default.nix | 2 +- .../show-in-file-manager/default.nix | 2 +- .../python-modules/simpful/default.nix | 2 +- .../python-modules/simplejson/default.nix | 2 +- .../python-modules/skia-pathops/default.nix | 8 +- .../python-modules/skops/default.nix | 2 +- .../python-modules/skorch/default.nix | 2 +- .../skytemple-files/default.nix | 2 +- .../python-modules/skytemple-rust/default.nix | 2 +- .../python-modules/sleekxmpp/default.nix | 2 +- .../python-modules/smbprotocol/default.nix | 2 +- .../python-modules/snitun/default.nix | 2 +- .../python-modules/somajo/default.nix | 2 +- .../python-modules/soundfile/default.nix | 2 +- .../python-modules/sourmash/default.nix | 2 +- .../spacy-alignments/default.nix | 2 +- .../python-modules/spectral-cube/default.nix | 2 +- .../sqlalchemy-file/default.nix | 2 +- .../python-modules/sshfs/default.nix | 2 +- .../starlette-admin/default.nix | 4 +- .../python-modules/streamlit/default.nix | 2 +- .../python-modules/sudachipy/default.nix | 2 +- .../python-modules/sunpy/default.nix | 2 +- .../python-modules/supervisor/default.nix | 2 +- .../python-modules/tbm-utils/default.nix | 4 +- .../python-modules/tensorboardx/default.nix | 2 +- .../python-modules/tensordict/default.nix | 2 +- .../tensorflow-probability/default.nix | 2 +- .../python-modules/tensorflow/bin.nix | 4 +- .../python-modules/tensorflow/default.nix | 16 +- .../python-modules/tensorstore/default.nix | 2 +- .../python-modules/testpath/default.nix | 2 +- .../python-modules/thinc/default.nix | 2 +- .../python-modules/tiktoken/default.nix | 2 +- .../python-modules/tinygrad/default.nix | 4 +- .../python-modules/tkinter/default.nix | 2 +- .../python-modules/token-bucket/default.nix | 2 +- .../python-modules/tokenizers/default.nix | 2 +- .../python-modules/tololib/default.nix | 2 +- pkgs/development/python-modules/torch/bin.nix | 12 +- .../python-modules/torch/default.nix | 20 +- .../python-modules/torchaudio/bin.nix | 6 +- .../python-modules/torchio/default.nix | 2 +- .../python-modules/torchsnapshot/default.nix | 2 +- .../python-modules/torchvision/bin.nix | 6 +- .../python-modules/trackpy/default.nix | 4 +- .../python-modules/transitions/default.nix | 2 +- .../python-modules/trezor/default.nix | 2 +- .../python-modules/trio-websocket/default.nix | 2 +- .../python-modules/trio/default.nix | 2 +- .../python-modules/trytond/default.nix | 2 +- .../python-modules/twisted/default.nix | 6 +- .../python-modules/txtorcon/default.nix | 2 +- .../python-modules/typer/default.nix | 2 +- .../python-modules/tzlocal/default.nix | 2 +- .../python-modules/uamqp/default.nix | 6 +- .../python-modules/ubelt/default.nix | 2 +- .../python-modules/uharfbuzz/default.nix | 2 +- .../python-modules/unicorn/default.nix | 4 +- .../python-modules/unrardll/default.nix | 4 +- .../python-modules/uvicorn/tests.nix | 2 +- .../python-modules/uvloop/default.nix | 6 +- .../python-modules/vector/default.nix | 2 +- .../python-modules/virtkey/default.nix | 2 +- .../python-modules/vowpalwabbit/default.nix | 4 +- .../python-modules/wandb/default.nix | 6 +- .../python-modules/wasmer/default.nix | 2 +- .../python-modules/watchdog/default.nix | 12 +- .../python-modules/watchfiles/default.nix | 2 +- .../python-modules/webdataset/default.nix | 8 +- .../webrtc-noise-gain/default.nix | 2 +- .../python-modules/websockets/default.nix | 2 +- .../python-modules/websockify/default.nix | 2 +- .../python-modules/webssh/default.nix | 2 +- .../python-modules/werkzeug/default.nix | 4 +- .../python-modules/whenever/default.nix | 2 +- .../python-modules/wxpython/4.2.nix | 4 +- .../python-modules/xlib/default.nix | 2 +- .../python-modules/xnd/default.nix | 2 +- .../python-modules/y-py/default.nix | 2 +- .../python-modules/yamllint/default.nix | 2 +- .../python-modules/zeroc-ice/default.nix | 2 +- .../python-modules/zigpy/default.nix | 2 +- .../python2-modules/cffi/default.nix | 2 +- .../python2-modules/configparser/default.nix | 2 +- .../python2-modules/futures/default.nix | 2 +- .../python2-modules/jinja2/default.nix | 2 +- .../python2-modules/pygobject/default.nix | 2 +- .../python2-modules/pygtk/default.nix | 4 +- pkgs/development/r-modules/default.nix | 20 +- .../development/r-modules/generic-builder.nix | 4 +- pkgs/development/rocm-modules/5/llvm/base.nix | 4 +- .../rocm-modules/5/llvm/stage-1/llvm.nix | 2 +- .../rocm-modules/5/rocm-comgr/default.nix | 4 +- .../5/rocm-device-libs/default.nix | 4 +- .../rocm-modules/5/rocminfo/default.nix | 2 +- .../rocm-modules/5/rocmlir/default.nix | 4 +- pkgs/development/rocm-modules/6/llvm/base.nix | 4 +- .../rocm-modules/6/llvm/stage-1/llvm.nix | 2 +- .../rocm-modules/6/rocm-comgr/default.nix | 4 +- .../6/rocm-device-libs/default.nix | 4 +- .../rocm-modules/6/rocminfo/default.nix | 2 +- .../rocm-modules/6/rocmlir/default.nix | 4 +- .../ruby-modules/gem-config/default.nix | 58 ++-- pkgs/development/ruby-modules/gem/default.nix | 2 +- .../scheme-bytestructures/default.nix | 2 +- .../build-skaware-package.nix | 4 +- .../skaware-packages/tipidee/default.nix | 2 +- pkgs/development/tools/aapt/default.nix | 8 +- .../tools/amazon-qldb-shell/default.nix | 2 +- .../analysis/cargo-tarpaulin/default.nix | 2 +- .../tools/analysis/dotenv-linter/default.nix | 2 +- .../tools/analysis/eresi/default.nix | 4 +- .../tools/analysis/flow/default.nix | 4 +- .../tools/analysis/lcov/default.nix | 2 +- .../tools/analysis/qcachegrind/default.nix | 4 +- .../tools/analysis/radare2/default.nix | 2 +- .../tools/analysis/rizin/cutter.nix | 2 +- .../tools/analysis/rizin/default.nix | 2 +- .../tools/analysis/rizin/rz-ghidra.nix | 2 +- .../tools/analysis/splint/default.nix | 2 +- .../tools/analysis/valgrind/default.nix | 10 +- pkgs/development/tools/bacon/default.nix | 2 +- pkgs/development/tools/bin2c/default.nix | 2 +- .../build-managers/bazel/bazel_5/default.nix | 4 +- .../build-managers/bazel/bazel_6/default.nix | 8 +- .../build-managers/bazel/bazel_7/cpp-test.nix | 6 +- .../build-managers/bazel/bazel_7/default.nix | 4 +- .../bazel/bazel_7/java-test.nix | 2 +- .../bazel/bazel_7/protobuf-test.nix | 4 +- .../tools/build-managers/bazel/cpp-test.nix | 6 +- .../tools/build-managers/bazel/java-test.nix | 2 +- .../build-managers/bazel/protobuf-test.nix | 4 +- .../bazel/python-bin-path-test.nix | 2 +- .../tools/build-managers/bloop/default.nix | 14 +- .../tools/build-managers/buck/default.nix | 2 +- .../tools/build-managers/build2/bpkg.nix | 4 +- .../tools/build-managers/build2/default.nix | 2 +- .../tools/build-managers/conan/default.nix | 6 +- .../build-managers/corrosion/default.nix | 2 +- .../tools/build-managers/fac/default.nix | 4 +- .../tools/build-managers/gn/generic.nix | 2 +- .../build-managers/gnumake/4.2/default.nix | 2 +- .../tools/build-managers/gnumake/default.nix | 2 +- .../tools/build-managers/gradle/default.nix | 6 +- .../build-managers/gradle/fetch-deps.nix | 2 +- .../tools/build-managers/moon/default.nix | 2 +- .../tools/build-managers/msbuild/default.nix | 2 +- .../tools/build-managers/sbt/default.nix | 6 +- .../build-managers/scala-cli/default.nix | 4 +- pkgs/development/tools/buildah/default.nix | 2 +- pkgs/development/tools/buildah/wrapper.nix | 4 +- pkgs/development/tools/buildkit/default.nix | 2 +- pkgs/development/tools/chit/default.nix | 6 +- pkgs/development/tools/cocogitto/default.nix | 2 +- pkgs/development/tools/comby/default.nix | 2 +- .../tools/confluent-cli/default.nix | 2 +- .../buildbot/master.nix | 6 +- .../buildbot/worker.nix | 2 +- .../buildkite-test-collector-rust/default.nix | 2 +- .../continuous-integration/hci/default.nix | 2 +- .../hercules-ci-agent/default.nix | 4 +- pkgs/development/tools/cotton/default.nix | 2 +- .../tools/database/dynein/default.nix | 2 +- .../tools/database/movine/default.nix | 2 +- .../tools/database/prisma-engines/default.nix | 2 +- .../tools/database/prqlc/default.nix | 2 +- .../tools/database/replibyte/default.nix | 2 +- .../tools/database/sqlitebrowser/default.nix | 4 +- .../database/surrealdb-migrations/default.nix | 2 +- pkgs/development/tools/delve/default.nix | 2 +- pkgs/development/tools/devpod/default.nix | 10 +- pkgs/development/tools/dive/default.nix | 2 +- .../tools/documentation/doxygen/default.nix | 4 +- pkgs/development/tools/dprint/default.nix | 2 +- pkgs/development/tools/dump_syms/default.nix | 2 +- pkgs/development/tools/earthly/default.nix | 2 +- .../tools/electron/binary/generic.nix | 2 +- .../tools/electron/chromedriver/generic.nix | 2 +- pkgs/development/tools/espup/default.nix | 2 +- pkgs/development/tools/explain/default.nix | 2 +- .../tools/fermyon-spin/default.nix | 2 +- .../tools/firebase-tools/default.nix | 2 +- pkgs/development/tools/fnm/default.nix | 2 +- .../tools/functiontrace-server/default.nix | 2 +- pkgs/development/tools/garble/default.nix | 4 +- .../development/tools/geckodriver/default.nix | 2 +- pkgs/development/tools/git-ps-rs/default.nix | 2 +- .../github-copilot-intellij-agent/default.nix | 2 +- pkgs/development/tools/glade/default.nix | 2 +- pkgs/development/tools/gllvm/default.nix | 2 +- pkgs/development/tools/glslviewer/default.nix | 4 +- pkgs/development/tools/gptcommit/default.nix | 4 +- .../tools/graphql-client/default.nix | 2 +- pkgs/development/tools/hobbes/default.nix | 2 +- pkgs/development/tools/hors/default.nix | 2 +- pkgs/development/tools/hotdoc/default.nix | 2 +- pkgs/development/tools/htmlq/default.nix | 2 +- pkgs/development/tools/jaq/default.nix | 2 +- .../java/java-language-server/default.nix | 8 +- .../tools/java/jprofiler/default.nix | 4 +- pkgs/development/tools/jless/default.nix | 6 +- pkgs/development/tools/jq/default.nix | 6 +- .../tools/kafka-delta-ingest/default.nix | 2 +- pkgs/development/tools/kdash/default.nix | 2 +- pkgs/development/tools/kubie/default.nix | 2 +- .../lua-language-server/default.nix | 6 +- .../rune-languageserver/default.nix | 2 +- .../vala-language-server/default.nix | 2 +- .../vscode-langservers-extracted/default.nix | 2 +- pkgs/development/tools/ldid/default.nix | 4 +- pkgs/development/tools/libsigrok/default.nix | 2 +- pkgs/development/tools/mars-mips/default.nix | 2 +- pkgs/development/tools/minizinc/ide.nix | 4 +- pkgs/development/tools/misc/autoconf/2.64.nix | 2 +- pkgs/development/tools/misc/autoconf/2.69.nix | 2 +- pkgs/development/tools/misc/autoconf/2.71.nix | 2 +- .../tools/misc/autoconf/default.nix | 2 +- .../tools/misc/autogen/default.nix | 2 +- .../tools/misc/binutils/2.38/libbfd.nix | 2 +- .../tools/misc/blackfire/default.nix | 4 +- .../tools/misc/blackfire/php-probe.nix | 2 +- .../tools/misc/creduce/default.nix | 2 +- pkgs/development/tools/misc/ddd/default.nix | 4 +- pkgs/development/tools/misc/dura/default.nix | 2 +- pkgs/development/tools/misc/ezno/default.nix | 2 +- .../tools/misc/fswatch/default.nix | 2 +- .../development/tools/misc/funzzy/default.nix | 2 +- pkgs/development/tools/misc/gdb/default.nix | 8 +- .../tools/misc/hydra-cli/default.nix | 2 +- .../development/tools/misc/igprof/default.nix | 2 +- .../tools/misc/linuxkit/default.nix | 6 +- pkgs/development/tools/misc/lsof/default.nix | 2 +- .../tools/misc/msitools/default.nix | 2 +- .../tools/misc/netcoredbg/default.nix | 4 +- .../tools/misc/orogene/default.nix | 2 +- .../tools/misc/patchelf/unstable.nix | 2 +- .../tools/misc/pest-ide-tools/default.nix | 2 +- .../tools/misc/pkg-config/default.nix | 4 +- pkgs/development/tools/misc/premake/5.nix | 6 +- .../tools/misc/pwninit/default.nix | 2 +- pkgs/development/tools/misc/riff/default.nix | 2 +- pkgs/development/tools/misc/runme/default.nix | 2 +- .../tools/misc/rustywind/default.nix | 2 +- .../development/tools/misc/samply/default.nix | 2 +- .../tools/misc/sccache/default.nix | 2 +- pkgs/development/tools/misc/sipp/default.nix | 4 +- .../tools/misc/slint-lsp/default.nix | 6 +- .../development/tools/misc/sqitch/default.nix | 4 +- .../tools/misc/src-cli/default.nix | 4 +- .../development/tools/misc/stlink/default.nix | 2 +- .../tools/misc/strace-analyzer/default.nix | 2 +- .../tools/misc/sysbench/default.nix | 2 +- .../development/tools/misc/texinfo/common.nix | 6 +- .../development/tools/misc/texlab/default.nix | 2 +- pkgs/development/tools/misc/tokei/default.nix | 4 +- .../tools/misc/wasmer-pack/default.nix | 2 +- pkgs/development/tools/misc/xxgdb/default.nix | 2 +- pkgs/development/tools/mysql-shell/8.nix | 8 +- .../tools/mysql-shell/innovation.nix | 8 +- pkgs/development/tools/nest-cli/default.nix | 2 +- pkgs/development/tools/nodehun/default.nix | 4 +- pkgs/development/tools/nsis/default.nix | 10 +- pkgs/development/tools/nufmt/default.nix | 2 +- pkgs/development/tools/ocaml/dune/3.nix | 2 +- pkgs/development/tools/ocaml/opam/default.nix | 6 +- .../tools/open-policy-agent/default.nix | 6 +- pkgs/development/tools/oxlint/default.nix | 2 +- pkgs/development/tools/pactorio/default.nix | 2 +- .../development/tools/parsing/antlr/2.7.7.nix | 2 +- pkgs/development/tools/parsing/antlr/4.nix | 8 +- .../tools/parsing/bison/default.nix | 2 +- .../tools/parsing/flex/default.nix | 2 +- .../tools/parsing/jikespg/default.nix | 2 +- .../tools/parsing/ragel/default.nix | 2 +- .../tools/parsing/tree-sitter/default.nix | 2 +- .../development/tools/perseus-cli/default.nix | 2 +- .../development/tools/pgformatter/default.nix | 4 +- pkgs/development/tools/pgtop/default.nix | 4 +- pkgs/development/tools/poac/default.nix | 4 +- pkgs/development/tools/py-spy/default.nix | 2 +- pkgs/development/tools/rbspy/default.nix | 2 +- pkgs/development/tools/rcodesign/default.nix | 2 +- pkgs/development/tools/rebazel/default.nix | 2 +- pkgs/development/tools/reindeer/default.nix | 2 +- pkgs/development/tools/remodel/default.nix | 2 +- pkgs/development/tools/reshape/default.nix | 2 +- pkgs/development/tools/rojo/default.nix | 4 +- pkgs/development/tools/rover/default.nix | 2 +- pkgs/development/tools/rtags/default.nix | 2 +- pkgs/development/tools/rubyfmt/default.nix | 6 +- .../tools/rust/cargo-about/default.nix | 2 +- .../tools/rust/cargo-asm/default.nix | 2 +- .../tools/rust/cargo-audit/default.nix | 2 +- .../tools/rust/cargo-bazel/default.nix | 2 +- .../tools/rust/cargo-binstall/default.nix | 2 +- .../tools/rust/cargo-bisect-rustc/default.nix | 4 +- .../tools/rust/cargo-bundle/default.nix | 4 +- .../tools/rust/cargo-c/default.nix | 2 +- .../tools/rust/cargo-cache/default.nix | 2 +- .../tools/rust/cargo-clone/default.nix | 2 +- .../tools/rust/cargo-codspeed/default.nix | 2 +- .../tools/rust/cargo-component/default.nix | 2 +- .../tools/rust/cargo-crev/default.nix | 2 +- .../tools/rust/cargo-cyclonedx/default.nix | 2 +- .../tools/rust/cargo-deadlinks/default.nix | 2 +- .../tools/rust/cargo-deny/default.nix | 2 +- .../tools/rust/cargo-dephell/default.nix | 4 +- .../tools/rust/cargo-dist/default.nix | 2 +- .../tools/rust/cargo-duplicates/default.nix | 2 +- .../tools/rust/cargo-edit/default.nix | 2 +- .../tools/rust/cargo-feature/default.nix | 2 +- .../tools/rust/cargo-flamegraph/default.nix | 6 +- .../tools/rust/cargo-fund/default.nix | 2 +- .../tools/rust/cargo-fuzz/default.nix | 2 +- .../tools/rust/cargo-generate/default.nix | 4 +- .../tools/rust/cargo-guppy/default.nix | 2 +- .../tools/rust/cargo-hf2/default.nix | 2 +- .../tools/rust/cargo-info/default.nix | 2 +- .../tools/rust/cargo-inspect/default.nix | 2 +- .../tools/rust/cargo-lambda/default.nix | 2 +- .../tools/rust/cargo-leptos/default.nix | 2 +- .../tools/rust/cargo-limit/default.nix | 2 +- .../tools/rust/cargo-llvm-cov/default.nix | 2 +- .../rust/cargo-local-registry/default.nix | 4 +- .../tools/rust/cargo-mobile2/default.nix | 2 +- .../tools/rust/cargo-modules/default.nix | 2 +- .../tools/rust/cargo-msrv/default.nix | 2 +- .../tools/rust/cargo-mutants/default.nix | 2 +- .../tools/rust/cargo-ndk/default.nix | 2 +- .../tools/rust/cargo-outdated/default.nix | 2 +- .../rust/cargo-pgrx/buildPgrxExtension.nix | 4 +- .../tools/rust/cargo-pgrx/default.nix | 6 +- .../tools/rust/cargo-public-api/default.nix | 2 +- .../tools/rust/cargo-release/default.nix | 2 +- .../tools/rust/cargo-risczero/default.nix | 2 +- .../rust/cargo-semver-checks/default.nix | 2 +- .../tools/rust/cargo-shuttle/default.nix | 2 +- .../tools/rust/cargo-spellcheck/default.nix | 2 +- .../tools/rust/cargo-supply-chain/default.nix | 2 +- .../tools/rust/cargo-tally/default.nix | 2 +- .../tools/rust/cargo-tauri/default.nix | 4 +- .../tools/rust/cargo-udeps/default.nix | 2 +- .../tools/rust/cargo-ui/default.nix | 6 +- .../rust/cargo-unused-features/default.nix | 2 +- .../tools/rust/cargo-update/default.nix | 4 +- .../tools/rust/cargo-vet/default.nix | 2 +- .../tools/rust/cargo-watch/default.nix | 4 +- .../tools/rust/cargo-web/default.nix | 2 +- .../tools/rust/cargo-whatfeatures/default.nix | 2 +- .../tools/rust/cargo-workspaces/default.nix | 2 +- .../tools/rust/cbindgen/default.nix | 4 +- .../tools/rust/dioxus-cli/default.nix | 2 +- .../tools/rust/duckscript/default.nix | 2 +- .../tools/rust/humility/default.nix | 2 +- .../tools/rust/panamax/default.nix | 2 +- .../tools/rust/rust-analyzer/default.nix | 2 +- .../default.nix | 4 +- .../development/tools/rust/rustup/default.nix | 6 +- .../tools/rust/rustycli/default.nix | 2 +- .../tools/rust/sqlx-cli/default.nix | 4 +- .../tools/sauce-connect/default.nix | 2 +- .../development/tools/scenic-view/default.nix | 4 +- .../development/tools/sea-orm-cli/default.nix | 2 +- pkgs/development/tools/selene/default.nix | 2 +- .../tools/semantic-release/default.nix | 2 +- pkgs/development/tools/sentry-cli/default.nix | 2 +- pkgs/development/tools/simavr/default.nix | 6 +- pkgs/development/tools/skopeo/default.nix | 4 +- pkgs/development/tools/spr/default.nix | 2 +- pkgs/development/tools/sqsh/default.nix | 2 +- pkgs/development/tools/squawk/default.nix | 4 +- pkgs/development/tools/subxt/default.nix | 2 +- pkgs/development/tools/taplo/default.nix | 2 +- pkgs/development/tools/tarmac/default.nix | 2 +- pkgs/development/tools/teller/default.nix | 2 +- pkgs/development/tools/the-way/default.nix | 2 +- pkgs/development/tools/trunk/default.nix | 2 +- pkgs/development/tools/ttfb/default.nix | 2 +- pkgs/development/tools/vagrant/default.nix | 2 +- pkgs/development/tools/viceroy/default.nix | 2 +- pkgs/development/tools/volta/default.nix | 2 +- pkgs/development/tools/wails/default.nix | 4 +- pkgs/development/tools/wasm-pack/default.nix | 2 +- pkgs/development/tools/wasmedge/default.nix | 4 +- pkgs/development/tools/watchman/default.nix | 4 +- pkgs/development/tools/winhelpcgi/default.nix | 2 +- .../tools/worker-build/default.nix | 2 +- pkgs/development/tools/wrangler_1/default.nix | 2 +- .../tools/wxformbuilder/default.nix | 8 +- pkgs/development/tools/xcbuild/default.nix | 6 +- pkgs/development/tools/xcbuild/platforms.nix | 2 +- pkgs/development/tools/xcbuild/toolchains.nix | 2 +- pkgs/development/web/boa/default.nix | 2 +- pkgs/development/web/bun/default.nix | 2 +- pkgs/development/web/deno/default.nix | 2 +- pkgs/development/web/edge-runtime/default.nix | 4 +- pkgs/development/web/insomnia/default.nix | 2 +- pkgs/development/web/kcgi/default.nix | 4 +- .../web/netlify-cli/composition.nix | 2 +- pkgs/development/web/netlify-cli/node-env.nix | 10 +- pkgs/development/web/netlify-cli/test.nix | 2 +- pkgs/development/web/postman/default.nix | 2 +- pkgs/games/7kaa/default.nix | 2 +- pkgs/games/abuse/default.nix | 2 +- pkgs/games/anki/bin.nix | 4 +- pkgs/games/anki/default.nix | 10 +- pkgs/games/anki/sync-server.nix | 2 +- pkgs/games/arx-libertatis/default.nix | 4 +- pkgs/games/augustus/default.nix | 6 +- pkgs/games/blightmud/default.nix | 8 +- pkgs/games/bzflag/default.nix | 2 +- pkgs/games/cataclysm-dda/common.nix | 8 +- pkgs/games/cdogs-sdl/default.nix | 2 +- pkgs/games/chiaki/default.nix | 4 +- pkgs/games/corsix-th/default.nix | 6 +- pkgs/games/crawl/default.nix | 2 +- pkgs/games/cutemaze/default.nix | 4 +- pkgs/games/ddnet/default.nix | 6 +- pkgs/games/devilutionx/default.nix | 2 +- pkgs/games/doom-ports/doomseeker/default.nix | 2 +- pkgs/games/doom-ports/odamex/default.nix | 2 +- pkgs/games/doom-ports/zandronum/fmod.nix | 6 +- pkgs/games/dwarf-fortress/default.nix | 6 +- .../dwarf-therapist/default.nix | 2 +- pkgs/games/dwarf-fortress/game.nix | 10 +- pkgs/games/dwarf-fortress/lazy-pack.nix | 2 +- pkgs/games/dwarf-fortress/wrapper/default.nix | 4 +- pkgs/games/ecwolf/default.nix | 8 +- pkgs/games/eduke32/default.nix | 10 +- pkgs/games/ferium/default.nix | 2 +- pkgs/games/fheroes2/default.nix | 2 +- pkgs/games/flare/engine.nix | 2 +- pkgs/games/freeciv/default.nix | 2 +- pkgs/games/freedroid/default.nix | 2 +- pkgs/games/freedroidrpg/default.nix | 2 +- pkgs/games/freenukum/default.nix | 2 +- pkgs/games/gargoyle/default.nix | 10 +- pkgs/games/gemrb/default.nix | 2 +- pkgs/games/gmad/default.nix | 4 +- pkgs/games/gtypist/default.nix | 2 +- pkgs/games/hedgewars/default.nix | 2 +- pkgs/games/hheretic/default.nix | 2 +- pkgs/games/hhexen/default.nix | 2 +- pkgs/games/hmcl/default.nix | 2 +- pkgs/games/ja2-stracciatella/default.nix | 2 +- pkgs/games/jfsw/default.nix | 2 +- pkgs/games/julius/default.nix | 6 +- pkgs/games/jumpy/default.nix | 6 +- pkgs/games/klavaro/default.nix | 2 +- pkgs/games/ldmud/default.nix | 2 +- pkgs/games/libremines/default.nix | 2 +- pkgs/games/lincity/default.nix | 2 +- pkgs/games/liquidwar/5.nix | 2 +- pkgs/games/manaplus/default.nix | 2 +- pkgs/games/mchprs/default.nix | 2 +- pkgs/games/mindustry/default.nix | 4 +- pkgs/games/minecraft-servers/derivation.nix | 2 +- pkgs/games/minetest/default.nix | 6 +- pkgs/games/mudlet/default.nix | 6 +- pkgs/games/npush/default.nix | 2 +- pkgs/games/opendungeons/default.nix | 2 +- pkgs/games/openmw/default.nix | 8 +- pkgs/games/openrw/default.nix | 2 +- pkgs/games/openspades/default.nix | 2 +- pkgs/games/osu-lazer/bin.nix | 2 +- pkgs/games/papermc/derivation.nix | 2 +- pkgs/games/path-of-building/default.nix | 4 +- pkgs/games/powermanga/default.nix | 2 +- pkgs/games/quake2/yquake2/default.nix | 4 +- pkgs/games/quakespasm/default.nix | 12 +- pkgs/games/quakespasm/vulkan.nix | 6 +- pkgs/games/quantumminigolf/default.nix | 2 +- pkgs/games/randtype/default.nix | 2 +- pkgs/games/raylib-games/default.nix | 2 +- pkgs/games/scummvm/default.nix | 6 +- pkgs/games/shipwright/default.nix | 20 +- pkgs/games/simutrans/default.nix | 4 +- pkgs/games/sm64ex/generic.nix | 2 +- pkgs/games/snipes/default.nix | 2 +- pkgs/games/space-cadet-pinball/default.nix | 4 +- pkgs/games/space-orbit/default.nix | 2 +- pkgs/games/steam/fhsenv.nix | 2 +- pkgs/games/stockfish/default.nix | 10 +- pkgs/games/system-syzygy/default.nix | 2 +- pkgs/games/taisei/default.nix | 2 +- pkgs/games/tecnoballz/default.nix | 2 +- pkgs/games/teeworlds/default.nix | 10 +- pkgs/games/uhexen2/default.nix | 2 +- pkgs/games/vessel/default.nix | 2 +- pkgs/games/voxelands/default.nix | 2 +- pkgs/games/warsow/engine.nix | 2 +- pkgs/games/warzone2100/default.nix | 6 +- pkgs/games/wesnoth/default.nix | 4 +- pkgs/games/widelands/default.nix | 6 +- pkgs/games/zaz/default.nix | 2 +- pkgs/misc/base16-builder/node-packages.nix | 2 +- pkgs/misc/calaos/installer/default.nix | 2 +- pkgs/misc/cliscord/default.nix | 2 +- pkgs/misc/cups/default.nix | 14 +- .../misc/cups/drivers/brgenml1lpr/default.nix | 2 +- pkgs/misc/drivers/spacenavd/default.nix | 2 +- pkgs/misc/frescobaldi/default.nix | 2 +- pkgs/misc/ghostscript/default.nix | 8 +- pkgs/misc/jackaudio/default.nix | 4 +- pkgs/misc/jackaudio/jack1.nix | 2 +- pkgs/misc/jackaudio/tools.nix | 2 +- pkgs/misc/lilypond/default.nix | 2 +- pkgs/misc/moonfire-nvr/default.nix | 2 +- pkgs/misc/opcua-client-gui/default.nix | 2 +- pkgs/misc/source-and-tags/default.nix | 2 +- pkgs/misc/stabber/default.nix | 2 +- pkgs/misc/t-rec/default.nix | 2 +- pkgs/misc/tmux-plugins/default.nix | 2 +- pkgs/misc/urbit/default.nix | 4 +- pkgs/misc/wiki-tui/default.nix | 2 +- pkgs/os-specific/bsd/freebsd/pkgs/make.nix | 2 +- .../bsd/freebsd/pkgs/mkDerivation.nix | 4 +- pkgs/os-specific/bsd/freebsd/pkgs/mtree.nix | 4 +- .../bsd/netbsd/pkgs/compat/package.nix | 2 +- .../os-specific/bsd/netbsd/pkgs/libcurses.nix | 4 +- .../bsd/netbsd/pkgs/mkDerivation.nix | 4 +- pkgs/os-specific/bsd/netbsd/pkgs/uudecode.nix | 4 +- .../darwin/apple-sdk-11.0/default.nix | 2 +- .../diskdev_cmds/default.nix | 4 +- .../apple-source-releases/xnu/default.nix | 2 +- pkgs/os-specific/darwin/goku/default.nix | 4 +- pkgs/os-specific/darwin/noah/default.nix | 2 +- pkgs/os-specific/darwin/openwith/default.nix | 2 +- pkgs/os-specific/linux/afuse/default.nix | 2 +- pkgs/os-specific/linux/dpdk/default.nix | 4 +- .../linux/firmware/raspberrypi/armstubs.nix | 4 +- .../linux/firmware/raspberrypi/default.nix | 2 +- pkgs/os-specific/linux/fuse/common.nix | 2 +- pkgs/os-specific/linux/guvcview/default.nix | 2 +- .../linux/kernel/common-config.nix | 12 +- pkgs/os-specific/linux/kernel/generic.nix | 2 +- pkgs/os-specific/linux/kernel/linux-rpi.nix | 2 +- .../linux/kernel/xanmod-kernels.nix | 2 +- pkgs/os-specific/linux/kernel/zen-kernels.nix | 2 +- pkgs/os-specific/linux/libaio/default.nix | 2 +- pkgs/os-specific/linux/lsirec/default.nix | 2 +- .../linux/mwprocapture/default.nix | 2 +- pkgs/os-specific/linux/new-lg4ff/default.nix | 2 +- pkgs/os-specific/linux/nfs-utils/default.nix | 2 +- pkgs/os-specific/linux/nsncd/default.nix | 2 +- pkgs/os-specific/linux/pam_p11/default.nix | 2 +- pkgs/os-specific/linux/pax-utils/default.nix | 2 +- pkgs/os-specific/linux/prl-tools/default.nix | 6 +- pkgs/os-specific/linux/procps-ng/default.nix | 2 +- pkgs/os-specific/linux/rasdaemon/default.nix | 4 +- pkgs/os-specific/linux/rtl8821ce/default.nix | 2 +- pkgs/os-specific/linux/shadow/default.nix | 2 +- .../linux/tuxedo-keyboard/default.nix | 2 +- pkgs/os-specific/linux/util-linux/default.nix | 12 +- pkgs/servers/amqp/rabbitmq-server/default.nix | 4 +- .../servers/apache-airflow/python-package.nix | 4 +- pkgs/servers/bindle/default.nix | 2 +- pkgs/servers/binserve/default.nix | 2 +- pkgs/servers/blockbook/default.nix | 2 +- pkgs/servers/clickhouse/default.nix | 16 +- pkgs/servers/code-server/default.nix | 6 +- pkgs/servers/confluencepot/default.nix | 2 +- pkgs/servers/coturn/default.nix | 2 +- pkgs/servers/dante/default.nix | 4 +- pkgs/servers/dendrite/default.nix | 2 +- pkgs/servers/dico/default.nix | 2 +- pkgs/servers/dns/bind/default.nix | 4 +- pkgs/servers/dns/coredns/default.nix | 2 +- pkgs/servers/dns/doh-proxy-rust/default.nix | 2 +- pkgs/servers/dns/knot-dns/default.nix | 6 +- pkgs/servers/dns/knot-resolver/default.nix | 4 +- pkgs/servers/dns/pdns/default.nix | 2 +- pkgs/servers/domoticz/default.nix | 2 +- pkgs/servers/fedigroups/default.nix | 2 +- pkgs/servers/foundationdb/cmake.nix | 2 +- pkgs/servers/frr/default.nix | 2 +- pkgs/servers/ftp/bftpd/default.nix | 2 +- pkgs/servers/gemini/stargazer/default.nix | 2 +- pkgs/servers/geospatial/martin/default.nix | 2 +- pkgs/servers/gotosocial/default.nix | 2 +- pkgs/servers/gpsd/default.nix | 2 +- pkgs/servers/home-assistant/default.nix | 2 +- pkgs/servers/home-automation/evcc/default.nix | 2 +- pkgs/servers/homepage-dashboard/default.nix | 6 +- pkgs/servers/http/apache-httpd/2.4.nix | 6 +- .../apache-modules/mod_python/default.nix | 2 +- pkgs/servers/http/couchdb/3.nix | 2 +- pkgs/servers/http/dufs/default.nix | 4 +- pkgs/servers/http/merecat/default.nix | 2 +- pkgs/servers/http/nginx/generic.nix | 4 +- pkgs/servers/http/tengine/default.nix | 4 +- pkgs/servers/http/trafficserver/default.nix | 10 +- pkgs/servers/imgproxy/default.nix | 2 +- pkgs/servers/irc/solanum/default.nix | 4 +- pkgs/servers/jackett/default.nix | 2 +- pkgs/servers/krill/default.nix | 4 +- pkgs/servers/lidarr/default.nix | 2 +- pkgs/servers/mail/dovecot/default.nix | 18 +- .../dovecot/plugins/fts_xapian/default.nix | 2 +- pkgs/servers/mail/mailpit/default.nix | 2 +- pkgs/servers/mail/public-inbox/default.nix | 4 +- pkgs/servers/mail/rspamd/default.nix | 6 +- pkgs/servers/matrix-conduit/default.nix | 4 +- pkgs/servers/matrix-hebbot/default.nix | 4 +- pkgs/servers/matrix-synapse/default.nix | 4 +- .../plugins/mjolnir-antispam.nix | 2 +- .../rust-synapse-compress-state/default.nix | 2 +- pkgs/servers/memcached/default.nix | 2 +- pkgs/servers/meteor/default.nix | 2 +- pkgs/servers/microbin/default.nix | 2 +- pkgs/servers/microserver/default.nix | 2 +- .../misc/qremotecontrol-server/default.nix | 2 +- pkgs/servers/monitoring/bosun/default.nix | 2 +- .../monitoring/grafana-agent/default.nix | 4 +- pkgs/servers/monitoring/grafana/default.nix | 6 +- pkgs/servers/monitoring/kapacitor/default.nix | 4 +- pkgs/servers/monitoring/lcdproc/default.nix | 2 +- pkgs/servers/monitoring/loki/default.nix | 4 +- .../monitoring/mackerel-agent/default.nix | 4 +- pkgs/servers/monitoring/mtail/default.nix | 2 +- .../nagios/plugins/check_ssl_cert.nix | 2 +- pkgs/servers/monitoring/net-snmp/default.nix | 4 +- .../monitoring/openobserve/default.nix | 2 +- .../servers/monitoring/prometheus/default.nix | 2 +- .../prometheus/exportarr/default.nix | 2 +- .../prometheus/wireguard-exporter.nix | 2 +- .../monitoring/uptime-kuma/default.nix | 2 +- pkgs/servers/mpd/default.nix | 14 +- pkgs/servers/mqtt/mosquitto/default.nix | 2 +- pkgs/servers/mx-puppet-discord/default.nix | 2 +- .../mx-puppet-discord/node-composition.nix | 2 +- pkgs/servers/networking/rustus/default.nix | 2 +- pkgs/servers/nosql/eventstore/default.nix | 2 +- pkgs/servers/nosql/influxdb/default.nix | 4 +- pkgs/servers/nosql/influxdb2/default.nix | 4 +- pkgs/servers/nosql/mongodb/5.0.nix | 4 +- pkgs/servers/nosql/mongodb/mongodb.nix | 16 +- pkgs/servers/nosql/redis/default.nix | 6 +- pkgs/servers/nosql/rethinkdb/default.nix | 6 +- pkgs/servers/nostr-rs-relay/default.nix | 2 +- pkgs/servers/ombi/default.nix | 2 +- pkgs/servers/openvscode-server/default.nix | 6 +- pkgs/servers/osmocom/osmo-bsc/default.nix | 2 +- pkgs/servers/osmocom/osmo-ggsn/default.nix | 2 +- pkgs/servers/osmocom/osmo-hlr/default.nix | 2 +- pkgs/servers/osmocom/osmo-hnbgw/default.nix | 2 +- pkgs/servers/osmocom/osmo-hnodeb/default.nix | 2 +- pkgs/servers/osmocom/osmo-iuh/default.nix | 2 +- pkgs/servers/osmocom/osmo-mgw/default.nix | 2 +- pkgs/servers/osmocom/osmo-msc/default.nix | 2 +- pkgs/servers/osmocom/osmo-pcu/default.nix | 2 +- pkgs/servers/osmocom/osmo-sgsn/default.nix | 2 +- .../osmocom/osmo-sip-connector/default.nix | 2 +- pkgs/servers/oxigraph/default.nix | 2 +- pkgs/servers/pim6sd/default.nix | 2 +- pkgs/servers/piping-server-rust/default.nix | 2 +- pkgs/servers/polaris/default.nix | 2 +- pkgs/servers/prowlarr/default.nix | 4 +- pkgs/servers/ps3netsrv/default.nix | 2 +- pkgs/servers/pulseaudio/default.nix | 28 +- pkgs/servers/radarr/default.nix | 2 +- pkgs/servers/readarr/default.nix | 2 +- pkgs/servers/redpanda/default.nix | 2 +- pkgs/servers/roapi/http.nix | 2 +- pkgs/servers/rpiplay/default.nix | 2 +- pkgs/servers/rtrtr/default.nix | 2 +- pkgs/servers/rustdesk-server/default.nix | 2 +- pkgs/servers/rustypaste/default.nix | 2 +- pkgs/servers/samba/4.x.nix | 28 +- pkgs/servers/search/lnx/default.nix | 2 +- pkgs/servers/search/meilisearch/default.nix | 2 +- pkgs/servers/search/qdrant/default.nix | 2 +- pkgs/servers/search/quickwit/default.nix | 2 +- pkgs/servers/search/typesense/default.nix | 2 +- pkgs/servers/shairplay/default.nix | 2 +- pkgs/servers/shairport-sync/default.nix | 6 +- pkgs/servers/shishi/default.nix | 2 +- pkgs/servers/simple-http-server/default.nix | 2 +- pkgs/servers/sip/freeswitch/default.nix | 6 +- pkgs/servers/snac2/default.nix | 2 +- pkgs/servers/sozu/default.nix | 4 +- .../sql/mariadb/connector-c/default.nix | 2 +- pkgs/servers/sql/materialize/default.nix | 4 +- pkgs/servers/sql/mysql/8.0.x.nix | 6 +- .../servers/sql/percona-server/innovation.nix | 18 +- pkgs/servers/sql/percona-server/lts.nix | 6 +- pkgs/servers/sql/pgbouncer/default.nix | 4 +- pkgs/servers/sql/pgcat/default.nix | 2 +- pkgs/servers/sql/pgpool/default.nix | 4 +- pkgs/servers/sql/postgresql/ext/h3-pg.nix | 2 +- pkgs/servers/sql/postgresql/ext/lantern.nix | 2 +- .../sql/postgresql/ext/pgvecto-rs/default.nix | 2 +- pkgs/servers/sql/postgresql/ext/postgis.nix | 4 +- .../sql/postgresql/ext/timescaledb.nix | 2 +- pkgs/servers/sql/postgresql/generic.nix | 18 +- pkgs/servers/sql/proxysql/default.nix | 2 +- pkgs/servers/sql/sqld/default.nix | 2 +- pkgs/servers/sqlpage/default.nix | 2 +- pkgs/servers/squid/default.nix | 4 +- pkgs/servers/sslh/default.nix | 4 +- pkgs/servers/static-web-server/default.nix | 2 +- pkgs/servers/sunshine/default.nix | 2 +- pkgs/servers/swego/default.nix | 2 +- pkgs/servers/tailscale/default.nix | 4 +- pkgs/servers/teleport/generic.nix | 4 +- pkgs/servers/trezord/default.nix | 4 +- pkgs/servers/unpackerr/default.nix | 2 +- pkgs/servers/ursadb/default.nix | 2 +- pkgs/servers/uwsgi/default.nix | 6 +- pkgs/servers/varnish/default.nix | 2 +- .../web-apps/ethercalc/node-packages.nix | 2 +- pkgs/servers/web-apps/lemmy/server.nix | 2 +- pkgs/servers/web-apps/pict-rs/0.3.nix | 2 +- pkgs/servers/web-apps/pict-rs/default.nix | 4 +- pkgs/servers/webdav-server-rs/default.nix | 2 +- pkgs/servers/x11/xorg/overrides.nix | 16 +- pkgs/shells/bash/5.nix | 2 +- pkgs/shells/bash/bash-completion/default.nix | 2 +- pkgs/shells/fish/default.nix | 16 +- pkgs/shells/fish/plugins/fzf-fish.nix | 2 +- pkgs/shells/ion/default.nix | 4 +- pkgs/shells/nushell/default.nix | 12 +- pkgs/shells/nushell/plugins/formats.nix | 2 +- pkgs/shells/nushell/plugins/gstat.nix | 2 +- pkgs/shells/nushell/plugins/net.nix | 2 +- pkgs/shells/nushell/plugins/polars.nix | 2 +- pkgs/shells/nushell/plugins/query.nix | 2 +- pkgs/shells/powershell/default.nix | 8 +- pkgs/shells/rush/default.nix | 2 +- pkgs/shells/yash/default.nix | 2 +- pkgs/shells/zsh/antibody/default.nix | 2 +- pkgs/shells/zsh/default.nix | 2 +- pkgs/shells/zsh/grml-zsh-config/default.nix | 2 +- pkgs/test/cc-wrapper/default.nix | 10 +- pkgs/test/default.nix | 2 +- pkgs/test/make-binary-wrapper/default.nix | 2 +- pkgs/test/release/default.nix | 2 +- pkgs/test/stdenv-inputs/default.nix | 4 +- pkgs/test/stdenv/default.nix | 2 +- pkgs/test/texlive/default.nix | 2 +- pkgs/tools/X11/inputplug/default.nix | 2 +- pkgs/tools/X11/xidlehook/default.nix | 8 +- pkgs/tools/X11/xpra/default.nix | 2 +- pkgs/tools/admin/acme-sh/default.nix | 2 +- pkgs/tools/admin/balena-cli/default.nix | 8 +- pkgs/tools/admin/coldsnap/default.nix | 2 +- .../docker-credential-helpers/default.nix | 8 +- .../admin/google-cloud-sdk/components.nix | 2 +- pkgs/tools/admin/gtk-vnc/default.nix | 2 +- pkgs/tools/admin/netbox2netshot/default.nix | 2 +- pkgs/tools/admin/pgadmin/default.nix | 2 +- pkgs/tools/admin/procs/default.nix | 4 +- pkgs/tools/admin/pulumi-bin/default.nix | 4 +- pkgs/tools/admin/pulumi/default.nix | 2 +- pkgs/tools/admin/tigervnc/default.nix | 16 +- pkgs/tools/admin/trinsic-cli/default.nix | 2 +- pkgs/tools/admin/uacme/default.nix | 2 +- pkgs/tools/archivers/7zz/default.nix | 6 +- pkgs/tools/archivers/arc_unpacker/default.nix | 4 +- pkgs/tools/archivers/arj/default.nix | 2 +- pkgs/tools/archivers/cpio/default.nix | 2 +- pkgs/tools/archivers/gbl/default.nix | 2 +- pkgs/tools/archivers/gnutar/default.nix | 14 +- pkgs/tools/archivers/innoextract/default.nix | 2 +- pkgs/tools/archivers/p7zip/default.nix | 2 +- pkgs/tools/archivers/pax/default.nix | 2 +- pkgs/tools/archivers/rar/default.nix | 4 +- pkgs/tools/archivers/unar/default.nix | 16 +- pkgs/tools/archivers/unzip/default.nix | 2 +- pkgs/tools/archivers/wimlib/default.nix | 8 +- pkgs/tools/archivers/xarchiver/default.nix | 2 +- pkgs/tools/archivers/zip/default.nix | 6 +- pkgs/tools/archivers/zpaq/default.nix | 2 +- pkgs/tools/audio/dl-librescore/default.nix | 2 +- pkgs/tools/audio/kaldi/default.nix | 2 +- pkgs/tools/audio/mpd-discord-rpc/default.nix | 2 +- pkgs/tools/audio/mpdcron/default.nix | 2 +- pkgs/tools/audio/mpris-scrobbler/default.nix | 6 +- .../audio/openai-whisper-cpp/default.nix | 4 +- pkgs/tools/backup/awsbck/default.nix | 2 +- pkgs/tools/backup/bacula/default.nix | 4 +- pkgs/tools/backup/borgbackup/default.nix | 4 +- pkgs/tools/backup/burp/default.nix | 2 +- pkgs/tools/backup/dar/default.nix | 4 +- pkgs/tools/backup/duplicity/default.nix | 10 +- pkgs/tools/backup/httrack/qt.nix | 2 +- pkgs/tools/backup/monolith/default.nix | 6 +- pkgs/tools/backup/rdedup/default.nix | 2 +- pkgs/tools/backup/tarsnap/default.nix | 4 +- pkgs/tools/bluetooth/blueman/default.nix | 2 +- pkgs/tools/cd-dvd/cdrdao/default.nix | 2 +- pkgs/tools/cd-dvd/cdrkit/default.nix | 8 +- pkgs/tools/cd-dvd/cdrtools/default.nix | 2 +- pkgs/tools/cd-dvd/dvd+rw-tools/default.nix | 4 +- pkgs/tools/compression/bzip3/default.nix | 2 +- pkgs/tools/compression/imagelol/default.nix | 2 +- pkgs/tools/compression/lrzip/default.nix | 2 +- pkgs/tools/compression/pigz/default.nix | 4 +- pkgs/tools/compression/zstd/default.nix | 6 +- pkgs/tools/filesystems/aefs/default.nix | 4 +- .../android-file-transfer/default.nix | 2 +- pkgs/tools/filesystems/apfs-fuse/default.nix | 10 +- pkgs/tools/filesystems/bindfs/default.nix | 4 +- pkgs/tools/filesystems/boxfs/default.nix | 2 +- pkgs/tools/filesystems/ceph/default.nix | 4 +- .../ceph/old-python-packages/cryptography.nix | 4 +- pkgs/tools/filesystems/cryfs/default.nix | 2 +- pkgs/tools/filesystems/curlftpfs/default.nix | 4 +- pkgs/tools/filesystems/dosfstools/default.nix | 2 +- pkgs/tools/filesystems/e2fsprogs/default.nix | 4 +- .../tools/filesystems/erofs-utils/default.nix | 2 +- pkgs/tools/filesystems/f3/default.nix | 8 +- .../tools/filesystems/file-rename/default.nix | 2 +- pkgs/tools/filesystems/garage/default.nix | 8 +- pkgs/tools/filesystems/genimage/default.nix | 2 +- pkgs/tools/filesystems/go-mtpfs/default.nix | 2 +- pkgs/tools/filesystems/goofys/default.nix | 2 +- pkgs/tools/filesystems/moosefs/default.nix | 6 +- pkgs/tools/filesystems/mtools/default.nix | 6 +- pkgs/tools/filesystems/mtpfs/default.nix | 2 +- pkgs/tools/filesystems/ntfs-3g/default.nix | 4 +- pkgs/tools/filesystems/snapraid/default.nix | 4 +- pkgs/tools/filesystems/sshfs-fuse/common.nix | 6 +- pkgs/tools/filesystems/sshfs-fuse/default.nix | 2 +- pkgs/tools/filesystems/svnfs/default.nix | 2 +- .../filesystems/unionfs-fuse/default.nix | 6 +- pkgs/tools/filesystems/wdfs/default.nix | 2 +- .../tools/filesystems/yandex-disk/default.nix | 2 +- pkgs/tools/games/ajour/default.nix | 2 +- pkgs/tools/games/pokefinder/default.nix | 8 +- pkgs/tools/games/ukmm/default.nix | 2 +- pkgs/tools/graphics/amber/default.nix | 2 +- pkgs/tools/graphics/astc-encoder/default.nix | 2 +- pkgs/tools/graphics/asymptote/default.nix | 8 +- pkgs/tools/graphics/barcode/default.nix | 2 +- pkgs/tools/graphics/dcraw/default.nix | 2 +- pkgs/tools/graphics/dmtx-utils/default.nix | 2 +- pkgs/tools/graphics/esshader/default.nix | 2 +- pkgs/tools/graphics/feedgnuplot/default.nix | 4 +- pkgs/tools/graphics/gnuplot/default.nix | 6 +- pkgs/tools/graphics/graphviz/default.nix | 4 +- pkgs/tools/graphics/icoutils/default.nix | 2 +- pkgs/tools/graphics/lepton/default.nix | 2 +- pkgs/tools/graphics/mesa-demos/default.nix | 4 +- pkgs/tools/graphics/netpbm/default.nix | 2 +- pkgs/tools/graphics/nifskope/default.nix | 2 +- pkgs/tools/graphics/oxipng/default.nix | 2 +- pkgs/tools/graphics/pfstools/default.nix | 2 +- pkgs/tools/graphics/pngout/default.nix | 8 +- pkgs/tools/graphics/pstoedit/default.nix | 2 +- pkgs/tools/graphics/quirc/default.nix | 4 +- .../realesrgan-ncnn-vulkan/default.nix | 2 +- .../graphics/texture-synthesis/default.nix | 2 +- pkgs/tools/graphics/vips/default.nix | 8 +- .../graphics/vulkan-caps-viewer/default.nix | 2 +- pkgs/tools/graphics/vulkan-tools/default.nix | 6 +- .../waifu2x-converter-cpp/default.nix | 6 +- pkgs/tools/graphics/wgpu-utils/default.nix | 2 +- pkgs/tools/graphics/zbar/default.nix | 8 +- pkgs/tools/misc/abduco/default.nix | 2 +- pkgs/tools/misc/aescrypt/default.nix | 2 +- pkgs/tools/misc/aichat/default.nix | 2 +- pkgs/tools/misc/aoc-cli/default.nix | 2 +- pkgs/tools/misc/apkeep/default.nix | 2 +- pkgs/tools/misc/archi/default.nix | 2 +- pkgs/tools/misc/asciinema-agg/default.nix | 2 +- pkgs/tools/misc/barman/default.nix | 2 +- pkgs/tools/misc/bat-extras/default.nix | 6 +- pkgs/tools/misc/bibutils/default.nix | 4 +- pkgs/tools/misc/bmon/default.nix | 2 +- pkgs/tools/misc/boxxy/default.nix | 2 +- pkgs/tools/misc/brltty/default.nix | 2 +- pkgs/tools/misc/broot/default.nix | 6 +- pkgs/tools/misc/chafa/default.nix | 2 +- pkgs/tools/misc/checkpwn/default.nix | 2 +- pkgs/tools/misc/ckb-next/default.nix | 2 +- pkgs/tools/misc/clipboard-jh/default.nix | 6 +- pkgs/tools/misc/cod/default.nix | 2 +- pkgs/tools/misc/code-minimap/default.nix | 2 +- pkgs/tools/misc/coinlive/default.nix | 2 +- pkgs/tools/misc/convbin/default.nix | 2 +- pkgs/tools/misc/coreutils/default.nix | 6 +- pkgs/tools/misc/cutecom/default.nix | 2 +- pkgs/tools/misc/daktilo/default.nix | 2 +- pkgs/tools/misc/dialogbox/default.nix | 2 +- pkgs/tools/misc/didyoumean/default.nix | 6 +- pkgs/tools/misc/diffoscope/default.nix | 6 +- pkgs/tools/misc/dijo/default.nix | 2 +- pkgs/tools/misc/diskonaut/default.nix | 2 +- pkgs/tools/misc/diskus/default.nix | 2 +- pkgs/tools/misc/docui/default.nix | 2 +- pkgs/tools/misc/dtool/default.nix | 2 +- pkgs/tools/misc/dua/default.nix | 2 +- pkgs/tools/misc/duc/default.nix | 2 +- pkgs/tools/misc/dvtm/dvtm.nix | 2 +- pkgs/tools/misc/ea/default.nix | 2 +- pkgs/tools/misc/edid-generator/default.nix | 2 +- pkgs/tools/misc/edk2-uefi-shell/default.nix | 2 +- pkgs/tools/misc/eludris/default.nix | 2 +- pkgs/tools/misc/envchain/default.nix | 2 +- pkgs/tools/misc/expect/default.nix | 2 +- pkgs/tools/misc/fclones/default.nix | 4 +- pkgs/tools/misc/fclones/gui.nix | 2 +- pkgs/tools/misc/fcp/default.nix | 2 +- pkgs/tools/misc/fend/default.nix | 2 +- pkgs/tools/misc/ffsend/default.nix | 8 +- pkgs/tools/misc/findutils/default.nix | 2 +- pkgs/tools/misc/flashrom/default.nix | 4 +- pkgs/tools/misc/flitter/default.nix | 2 +- pkgs/tools/misc/flowgger/default.nix | 2 +- pkgs/tools/misc/fondu/default.nix | 4 +- pkgs/tools/misc/fontforge/default.nix | 4 +- pkgs/tools/misc/freshfetch/default.nix | 2 +- pkgs/tools/misc/fsearch/default.nix | 2 +- pkgs/tools/misc/fselect/default.nix | 2 +- pkgs/tools/misc/fw/default.nix | 2 +- pkgs/tools/misc/fwup/default.nix | 4 +- pkgs/tools/misc/geekbench/6.nix | 2 +- pkgs/tools/misc/getoptions/default.nix | 4 +- pkgs/tools/misc/gh-cal/default.nix | 2 +- pkgs/tools/misc/ghostie/default.nix | 6 +- pkgs/tools/misc/gigalixir/default.nix | 2 +- pkgs/tools/misc/gitrs/default.nix | 2 +- pkgs/tools/misc/goaccess/default.nix | 2 +- pkgs/tools/misc/goose/default.nix | 2 +- pkgs/tools/misc/gotify-desktop/default.nix | 2 +- pkgs/tools/misc/grex/default.nix | 2 +- pkgs/tools/misc/grit/default.nix | 2 +- pkgs/tools/misc/grub4dos/default.nix | 4 +- pkgs/tools/misc/halp/default.nix | 4 +- pkgs/tools/misc/handlr/default.nix | 2 +- pkgs/tools/misc/hdf4/default.nix | 6 +- pkgs/tools/misc/hdf5/default.nix | 4 +- pkgs/tools/misc/hdfview/default.nix | 6 +- pkgs/tools/misc/heimdall/default.nix | 6 +- pkgs/tools/misc/hidrd/default.nix | 2 +- pkgs/tools/misc/hiksink/default.nix | 2 +- pkgs/tools/misc/hoard/default.nix | 2 +- pkgs/tools/misc/hsd/default.nix | 2 +- pkgs/tools/misc/hyperfine/default.nix | 2 +- pkgs/tools/misc/iay/default.nix | 4 +- pkgs/tools/misc/idutils/default.nix | 6 +- .../misc/inav-blackbox-tools/default.nix | 2 +- pkgs/tools/misc/intermodal/default.nix | 2 +- pkgs/tools/misc/jdupes/default.nix | 2 +- pkgs/tools/misc/jsonwatch/default.nix | 4 +- pkgs/tools/misc/krapslog/default.nix | 2 +- pkgs/tools/misc/lbdb/default.nix | 2 +- pkgs/tools/misc/leanify/default.nix | 4 +- pkgs/tools/misc/lesspipe/default.nix | 2 +- .../tools/misc/lighthouse-steamvr/default.nix | 2 +- pkgs/tools/misc/livedl/default.nix | 2 +- pkgs/tools/misc/lorri/default.nix | 2 +- pkgs/tools/misc/macchina/default.nix | 2 +- pkgs/tools/misc/marlin-calc/default.nix | 2 +- pkgs/tools/misc/memtest86+/default.nix | 2 +- pkgs/tools/misc/minicom/default.nix | 2 +- pkgs/tools/misc/miniserve/default.nix | 2 +- pkgs/tools/misc/mise/default.nix | 2 +- pkgs/tools/misc/mktorrent/default.nix | 4 +- pkgs/tools/misc/moreutils/default.nix | 2 +- pkgs/tools/misc/mpdscribble/default.nix | 2 +- pkgs/tools/misc/mpy-utils/default.nix | 2 +- pkgs/tools/misc/mynewt-newtmgr/default.nix | 2 +- pkgs/tools/misc/nbench/default.nix | 2 +- pkgs/tools/misc/ncdu/default.nix | 2 +- pkgs/tools/misc/noti/default.nix | 2 +- pkgs/tools/misc/ntfy/default.nix | 4 +- pkgs/tools/misc/nurl/default.nix | 2 +- pkgs/tools/misc/nvimpager/default.nix | 2 +- pkgs/tools/misc/octofetch/default.nix | 4 +- pkgs/tools/misc/oggvideotools/default.nix | 2 +- pkgs/tools/misc/onefetch/default.nix | 2 +- .../misc/opentelemetry-collector/contrib.nix | 2 +- pkgs/tools/misc/ostree-rs-ext/default.nix | 2 +- pkgs/tools/misc/otel-cli/default.nix | 2 +- pkgs/tools/misc/otfcc/default.nix | 2 +- pkgs/tools/misc/owofetch/default.nix | 2 +- pkgs/tools/misc/pazi/default.nix | 2 +- pkgs/tools/misc/pfetch-rs/default.nix | 2 +- pkgs/tools/misc/pgbadger/default.nix | 4 +- pkgs/tools/misc/piston-cli/default.nix | 2 +- pkgs/tools/misc/powerline-rs/default.nix | 2 +- pkgs/tools/misc/pre-commit/default.nix | 2 +- pkgs/tools/misc/qflipper/default.nix | 6 +- pkgs/tools/misc/qrscan/default.nix | 2 +- pkgs/tools/misc/rates/default.nix | 2 +- pkgs/tools/misc/remote-exec/default.nix | 2 +- pkgs/tools/misc/renameutils/default.nix | 4 +- pkgs/tools/misc/rlwrap/default.nix | 2 +- pkgs/tools/misc/rmlint/default.nix | 2 +- pkgs/tools/misc/routino/default.nix | 4 +- pkgs/tools/misc/rtz/default.nix | 2 +- pkgs/tools/misc/rust-motd/default.nix | 2 +- pkgs/tools/misc/rustypaste-cli/default.nix | 2 +- pkgs/tools/misc/sagoin/default.nix | 2 +- pkgs/tools/misc/screen/default.nix | 4 +- pkgs/tools/misc/screenfetch/default.nix | 4 +- pkgs/tools/misc/sfeed/default.nix | 4 +- pkgs/tools/misc/shadowenv/default.nix | 2 +- pkgs/tools/misc/sheldon/default.nix | 2 +- pkgs/tools/misc/shelldap/default.nix | 4 +- pkgs/tools/misc/skim/default.nix | 2 +- pkgs/tools/misc/sshx/default.nix | 2 +- pkgs/tools/misc/star-history/default.nix | 2 +- pkgs/tools/misc/starry/default.nix | 2 +- pkgs/tools/misc/starship/default.nix | 6 +- pkgs/tools/misc/synth/default.nix | 2 +- pkgs/tools/misc/szyszka/default.nix | 2 +- pkgs/tools/misc/tab-rs/default.nix | 4 +- pkgs/tools/misc/tealdeer/default.nix | 2 +- pkgs/tools/misc/tere/default.nix | 2 +- pkgs/tools/misc/timidity/default.nix | 12 +- pkgs/tools/misc/tmux-sessionizer/default.nix | 2 +- pkgs/tools/misc/tmux/default.nix | 6 +- pkgs/tools/misc/toastify/default.nix | 4 +- pkgs/tools/misc/topgrade/default.nix | 4 +- pkgs/tools/misc/toybox/default.nix | 6 +- pkgs/tools/misc/trackma/default.nix | 2 +- pkgs/tools/misc/tty-clock/default.nix | 2 +- pkgs/tools/misc/twm/default.nix | 2 +- pkgs/tools/misc/usbimager/default.nix | 4 +- pkgs/tools/misc/uutils-coreutils/default.nix | 2 +- pkgs/tools/misc/uwufetch/default.nix | 2 +- pkgs/tools/misc/uwuify/default.nix | 2 +- pkgs/tools/misc/vector/default.nix | 4 +- pkgs/tools/misc/vimv-rs/default.nix | 2 +- pkgs/tools/misc/vrc-get/default.nix | 2 +- pkgs/tools/misc/wagyu/default.nix | 2 +- pkgs/tools/misc/watchexec/default.nix | 4 +- pkgs/tools/misc/websocat/default.nix | 2 +- pkgs/tools/misc/wv2/default.nix | 2 +- pkgs/tools/misc/xburst-tools/default.nix | 2 +- pkgs/tools/misc/xxv/default.nix | 2 +- pkgs/tools/misc/yubikey-manager/default.nix | 2 +- .../yubikey-personalization-gui/default.nix | 2 +- pkgs/tools/misc/zellij/default.nix | 2 +- pkgs/tools/misc/zoxide/default.nix | 2 +- pkgs/tools/networking/aircrack-ng/default.nix | 12 +- pkgs/tools/networking/anevicon/default.nix | 4 +- pkgs/tools/networking/aria2/default.nix | 2 +- pkgs/tools/networking/assh/default.nix | 2 +- pkgs/tools/networking/atinout/default.nix | 2 +- pkgs/tools/networking/bandwhich/default.nix | 4 +- pkgs/tools/networking/bitmask-vpn/default.nix | 8 +- pkgs/tools/networking/bore-cli/default.nix | 2 +- pkgs/tools/networking/bore/default.nix | 8 +- pkgs/tools/networking/boringtun/default.nix | 2 +- pkgs/tools/networking/cfspeedtest/default.nix | 2 +- pkgs/tools/networking/chrony/default.nix | 4 +- pkgs/tools/networking/cjdns/default.nix | 4 +- pkgs/tools/networking/cntlm/default.nix | 2 +- pkgs/tools/networking/cocom/default.nix | 2 +- .../networking/croc/test-local-relay.nix | 2 +- .../curl-impersonate/chrome/default.nix | 4 +- .../curl-impersonate/firefox/default.nix | 4 +- pkgs/tools/networking/curl/default.nix | 16 +- pkgs/tools/networking/davix/default.nix | 4 +- pkgs/tools/networking/dcap/default.nix | 2 +- .../networking/dd-agent/datadog-agent.nix | 2 +- pkgs/tools/networking/dhcpcd/default.nix | 6 +- pkgs/tools/networking/dnsmasq/default.nix | 12 +- pkgs/tools/networking/dnsmonster/default.nix | 2 +- pkgs/tools/networking/dnstracer/default.nix | 4 +- pkgs/tools/networking/dogdns/default.nix | 6 +- pkgs/tools/networking/drill/default.nix | 6 +- pkgs/tools/networking/edgedb/default.nix | 2 +- pkgs/tools/networking/fast-ssh/default.nix | 2 +- pkgs/tools/networking/fastd/default.nix | 2 +- pkgs/tools/networking/findomain/default.nix | 2 +- pkgs/tools/networking/ghostunnel/default.nix | 2 +- pkgs/tools/networking/godspeed/default.nix | 2 +- pkgs/tools/networking/gp-saml-gui/default.nix | 4 +- pkgs/tools/networking/gping/default.nix | 4 +- pkgs/tools/networking/grpc_cli/default.nix | 2 +- pkgs/tools/networking/haproxy/default.nix | 8 +- pkgs/tools/networking/hping/default.nix | 2 +- pkgs/tools/networking/httplz/default.nix | 2 +- .../networking/ifstat-legacy/default.nix | 2 +- pkgs/tools/networking/iftop/default.nix | 2 +- pkgs/tools/networking/ifwifi/default.nix | 6 +- pkgs/tools/networking/inetutils/default.nix | 4 +- pkgs/tools/networking/innernet/default.nix | 4 +- pkgs/tools/networking/iperf/3.nix | 2 +- pkgs/tools/networking/isync/default.nix | 2 +- pkgs/tools/networking/jwhois/default.nix | 2 +- pkgs/tools/networking/lftp/default.nix | 4 +- pkgs/tools/networking/libreswan/default.nix | 2 +- pkgs/tools/networking/lychee/default.nix | 2 +- .../networking/magic-wormhole-rs/default.nix | 2 +- pkgs/tools/networking/mailutils/default.nix | 4 +- pkgs/tools/networking/miniupnpc/default.nix | 2 +- pkgs/tools/networking/mole/default.nix | 2 +- pkgs/tools/networking/mosh/default.nix | 2 +- pkgs/tools/networking/mozwire/default.nix | 2 +- pkgs/tools/networking/mtr/default.nix | 2 +- pkgs/tools/networking/narrowlink/default.nix | 2 +- pkgs/tools/networking/nbd/default.nix | 4 +- pkgs/tools/networking/ncftp/default.nix | 2 +- pkgs/tools/networking/ndjbdns/default.nix | 2 +- pkgs/tools/networking/netbird/default.nix | 6 +- .../networking/netcat-openbsd/default.nix | 2 +- pkgs/tools/networking/notemap/default.nix | 2 +- pkgs/tools/networking/ntp/default.nix | 4 +- pkgs/tools/networking/ockam/default.nix | 2 +- pkgs/tools/networking/oha/default.nix | 6 +- pkgs/tools/networking/onetun/default.nix | 2 +- pkgs/tools/networking/openconnect/common.nix | 6 +- .../tools/networking/openfortivpn/default.nix | 2 +- pkgs/tools/networking/openssh/common.nix | 6 +- pkgs/tools/networking/openvpn/default.nix | 4 +- pkgs/tools/networking/p2p/amule/default.nix | 2 +- pkgs/tools/networking/pdnsd/default.nix | 2 +- .../tools/networking/phantomsocks/default.nix | 4 +- pkgs/tools/networking/phodav/default.nix | 2 +- .../networking/pritunl-client/default.nix | 10 +- pkgs/tools/networking/quicktun/default.nix | 2 +- pkgs/tools/networking/restish/default.nix | 4 +- pkgs/tools/networking/rewrk/default.nix | 2 +- pkgs/tools/networking/rustcat/default.nix | 2 +- pkgs/tools/networking/s3rs/default.nix | 2 +- .../networking/shadowsocks-rust/default.nix | 6 +- pkgs/tools/networking/siege/default.nix | 2 +- pkgs/tools/networking/slowlorust/default.nix | 2 +- pkgs/tools/networking/sockperf/default.nix | 2 +- .../tools/networking/speedtest-rs/default.nix | 4 +- pkgs/tools/networking/srelay/default.nix | 2 +- pkgs/tools/networking/strongswan/default.nix | 12 +- pkgs/tools/networking/suckit/default.nix | 2 +- pkgs/tools/networking/termscp/default.nix | 4 +- pkgs/tools/networking/tgt/default.nix | 2 +- pkgs/tools/networking/toxvpn/default.nix | 4 +- .../networking/transmission-rss/default.nix | 2 +- pkgs/tools/networking/trurl/default.nix | 2 +- pkgs/tools/networking/tuic/default.nix | 2 +- pkgs/tools/networking/tunnelto/default.nix | 6 +- pkgs/tools/networking/tuntox/default.nix | 8 +- pkgs/tools/networking/uwimap/default.nix | 8 +- pkgs/tools/networking/veilid/default.nix | 2 +- pkgs/tools/networking/vpn-slice/default.nix | 4 +- .../tools/networking/vpnc-scripts/default.nix | 4 +- pkgs/tools/networking/wakeonlan/default.nix | 4 +- .../networking/wg-netmanager/default.nix | 2 +- pkgs/tools/networking/wget/default.nix | 8 +- pkgs/tools/networking/wget2/default.nix | 2 +- .../networking/wireguard-tools/default.nix | 4 +- .../wireguard-vanity-address/default.nix | 2 +- pkgs/tools/networking/wrk2/default.nix | 2 +- pkgs/tools/networking/xh/default.nix | 2 +- pkgs/tools/networking/xrootd/default.nix | 12 +- pkgs/tools/nix/fh/default.nix | 4 +- pkgs/tools/nix/gridlock/default.nix | 2 +- pkgs/tools/nix/info/default.nix | 4 +- pkgs/tools/nix/nix-init/default.nix | 4 +- pkgs/tools/nix/nixci/default.nix | 4 +- pkgs/tools/nix/nixdoc/default.nix | 2 +- pkgs/tools/nix/npins/default.nix | 2 +- pkgs/tools/nix/statix/default.nix | 2 +- .../package-management/akku/overrides.nix | 4 +- .../disnix/dysnomia/default.nix | 4 +- .../tools/package-management/dpkg/default.nix | 8 +- pkgs/tools/package-management/lix/common.nix | 20 +- .../mynewt-newt/default.nix | 2 +- .../package-management/nix-doc/default.nix | 2 +- .../package-management/nix-du/default.nix | 2 +- .../package-management/nix-index/default.nix | 2 +- .../nix-template/default.nix | 2 +- pkgs/tools/package-management/nix/common.nix | 26 +- pkgs/tools/package-management/nix/default.nix | 6 +- .../tools/package-management/nix/nix-perl.nix | 4 +- pkgs/tools/package-management/pkg/default.nix | 2 +- .../package-management/poetry/unwrapped.nix | 8 +- pkgs/tools/package-management/rpm/default.nix | 4 +- pkgs/tools/security/acsccid/default.nix | 2 +- pkgs/tools/security/adreaper/default.nix | 2 +- .../security/age-plugin-ledger/default.nix | 2 +- .../security/age-plugin-yubikey/default.nix | 4 +- pkgs/tools/security/amber/default.nix | 2 +- pkgs/tools/security/arti/default.nix | 6 +- pkgs/tools/security/authoscope/default.nix | 2 +- pkgs/tools/security/bettercap/default.nix | 2 +- pkgs/tools/security/boofuzz/default.nix | 2 +- pkgs/tools/security/browserpass/default.nix | 2 +- pkgs/tools/security/bws/default.nix | 6 +- pkgs/tools/security/cdk-go/default.nix | 2 +- pkgs/tools/security/cdxgen/default.nix | 2 +- pkgs/tools/security/certdump/default.nix | 2 +- pkgs/tools/security/certinfo/default.nix | 6 +- pkgs/tools/security/chainsaw/default.nix | 2 +- pkgs/tools/security/cherrybomb/default.nix | 2 +- pkgs/tools/security/chipsec/default.nix | 2 +- pkgs/tools/security/clamav/default.nix | 4 +- pkgs/tools/security/cosign/default.nix | 4 +- pkgs/tools/security/echidna/default.nix | 2 +- pkgs/tools/security/feroxbuster/default.nix | 2 +- .../security/firefox_decrypt/default.nix | 2 +- pkgs/tools/security/freeze/default.nix | 2 +- pkgs/tools/security/genpass/default.nix | 2 +- pkgs/tools/security/gfshare/default.nix | 2 +- pkgs/tools/security/ghidra/build.nix | 4 +- pkgs/tools/security/ghidra/default.nix | 2 +- pkgs/tools/security/gitjacker/default.nix | 2 +- pkgs/tools/security/gnupg/22.nix | 6 +- pkgs/tools/security/gnupg/24.nix | 8 +- pkgs/tools/security/go365/default.nix | 2 +- pkgs/tools/security/gopass/default.nix | 2 +- pkgs/tools/security/gpg-tui/default.nix | 2 +- pkgs/tools/security/ibm-sw-tpm2/default.nix | 2 +- pkgs/tools/security/jwt-cli/default.nix | 2 +- pkgs/tools/security/kbs2/default.nix | 8 +- pkgs/tools/security/keepwn/default.nix | 2 +- pkgs/tools/security/kepler/default.nix | 2 +- pkgs/tools/security/keybase/default.nix | 2 +- pkgs/tools/security/keyscope/default.nix | 2 +- pkgs/tools/security/kpcli/default.nix | 2 +- pkgs/tools/security/kubeclarity/default.nix | 2 +- pkgs/tools/security/lethe/default.nix | 2 +- pkgs/tools/security/libacr38u/default.nix | 2 +- pkgs/tools/security/maigret/default.nix | 2 +- pkgs/tools/security/masscan/default.nix | 2 +- pkgs/tools/security/mkp224o/default.nix | 2 +- pkgs/tools/security/monsoon/default.nix | 2 +- pkgs/tools/security/mpw/default.nix | 2 +- pkgs/tools/security/nbtscanner/default.nix | 2 +- pkgs/tools/security/netexec/default.nix | 2 +- pkgs/tools/security/nitrokey-app2/default.nix | 2 +- pkgs/tools/security/oath-toolkit/default.nix | 4 +- pkgs/tools/security/onioncircuits/default.nix | 2 +- pkgs/tools/security/onlykey/onlykey.nix | 2 +- pkgs/tools/security/opensc/default.nix | 4 +- pkgs/tools/security/pass/default.nix | 8 +- .../pass/extensions/audit/default.nix | 2 +- pkgs/tools/security/pcsc-tools/default.nix | 4 +- pkgs/tools/security/pcsclite/default.nix | 4 +- pkgs/tools/security/quill/default.nix | 2 +- pkgs/tools/security/rblake2sum/default.nix | 2 +- pkgs/tools/security/rblake3sum/default.nix | 2 +- pkgs/tools/security/rbw/default.nix | 6 +- pkgs/tools/security/ripasso/cursive.nix | 2 +- pkgs/tools/security/rucredstash/default.nix | 2 +- pkgs/tools/security/rustscan/default.nix | 2 +- pkgs/tools/security/saml2aws/default.nix | 2 +- pkgs/tools/security/schleuder/default.nix | 2 +- pkgs/tools/security/scrypt/default.nix | 2 +- .../sequoia-chameleon-gnupg/default.nix | 2 +- pkgs/tools/security/sheesy-cli/default.nix | 2 +- pkgs/tools/security/snowcrash/default.nix | 2 +- pkgs/tools/security/softhsm/default.nix | 2 +- pkgs/tools/security/solo2-cli/default.nix | 4 +- pkgs/tools/security/spectre-cli/default.nix | 2 +- pkgs/tools/security/ssdeep/default.nix | 2 +- pkgs/tools/security/ssh-mitm/default.nix | 2 +- pkgs/tools/security/sshuttle/default.nix | 2 +- pkgs/tools/security/step-ca/default.nix | 4 +- .../security/step-kms-plugin/default.nix | 2 +- pkgs/tools/security/swtpm/default.nix | 4 +- pkgs/tools/security/tcpcrypt/default.nix | 4 +- pkgs/tools/security/thc-hydra/default.nix | 2 +- pkgs/tools/security/tor/default.nix | 6 +- pkgs/tools/security/tor/torsocks.nix | 2 +- pkgs/tools/security/vault/default.nix | 2 +- pkgs/tools/security/vault/vault-bin.nix | 2 +- pkgs/tools/security/vaultwarden/default.nix | 2 +- pkgs/tools/security/yubihsm-shell/default.nix | 8 +- pkgs/tools/security/yubikey-agent/default.nix | 10 +- pkgs/tools/security/zmap/default.nix | 2 +- pkgs/tools/system/bfs/default.nix | 2 +- pkgs/tools/system/btop/default.nix | 2 +- pkgs/tools/system/clinfo/default.nix | 4 +- pkgs/tools/system/collectd/default.nix | 2 +- pkgs/tools/system/collectd/plugins.nix | 26 +- pkgs/tools/system/fakeroot/default.nix | 4 +- pkgs/tools/system/fio/default.nix | 2 +- pkgs/tools/system/foremost/default.nix | 2 +- pkgs/tools/system/gdu/default.nix | 2 +- pkgs/tools/system/gotop/default.nix | 2 +- pkgs/tools/system/gptfdisk/default.nix | 4 +- pkgs/tools/system/gptman/default.nix | 2 +- pkgs/tools/system/htop/default.nix | 12 +- .../system/java-service-wrapper/default.nix | 2 +- pkgs/tools/system/kanata/default.nix | 4 +- pkgs/tools/system/netdata/default.nix | 16 +- pkgs/tools/system/nsc/default.nix | 2 +- pkgs/tools/system/plan9port/default.nix | 4 +- pkgs/tools/system/rowhammer-test/default.nix | 2 +- pkgs/tools/system/runit/default.nix | 4 +- pkgs/tools/system/s-tui/default.nix | 2 +- pkgs/tools/system/smartmontools/default.nix | 4 +- pkgs/tools/system/stress-ng/default.nix | 2 +- pkgs/tools/system/testdisk/default.nix | 4 +- pkgs/tools/system/tree/default.nix | 6 +- pkgs/tools/system/zenith/default.nix | 4 +- pkgs/tools/text/amber/default.nix | 2 +- pkgs/tools/text/autocorrect/default.nix | 2 +- pkgs/tools/text/chars/default.nix | 2 +- pkgs/tools/text/clima/default.nix | 2 +- pkgs/tools/text/cmigemo/default.nix | 4 +- pkgs/tools/text/coloursum/default.nix | 2 +- pkgs/tools/text/dcs/default.nix | 4 +- pkgs/tools/text/diffr/default.nix | 2 +- pkgs/tools/text/discount/default.nix | 2 +- pkgs/tools/text/fastmod/default.nix | 2 +- pkgs/tools/text/fst/default.nix | 2 +- pkgs/tools/text/gawk/default.nix | 16 +- pkgs/tools/text/gawk/gawkextlib.nix | 4 +- pkgs/tools/text/glogg/default.nix | 4 +- pkgs/tools/text/gnugrep/default.nix | 2 +- pkgs/tools/text/highlight/default.nix | 10 +- pkgs/tools/text/html2text/default.nix | 2 +- pkgs/tools/text/hyx/default.nix | 2 +- pkgs/tools/text/igrep/default.nix | 2 +- pkgs/tools/text/ispell/default.nix | 2 +- pkgs/tools/text/jen/default.nix | 2 +- pkgs/tools/text/jumanpp/default.nix | 2 +- pkgs/tools/text/kakasi/default.nix | 2 +- pkgs/tools/text/kdiff3/default.nix | 2 +- pkgs/tools/text/languagetool-rust/default.nix | 2 +- pkgs/tools/text/mdbook-admonish/default.nix | 2 +- pkgs/tools/text/mdbook-emojicodes/default.nix | 2 +- pkgs/tools/text/mdbook-epub/default.nix | 2 +- pkgs/tools/text/mdbook-footnote/default.nix | 2 +- pkgs/tools/text/mdbook-graphviz/default.nix | 2 +- pkgs/tools/text/mdbook-katex/default.nix | 2 +- .../mdbook-kroki-preprocessor/default.nix | 2 +- pkgs/tools/text/mdbook-linkcheck/default.nix | 4 +- pkgs/tools/text/mdbook-mermaid/default.nix | 2 +- pkgs/tools/text/mdbook-pdf/default.nix | 2 +- pkgs/tools/text/mdbook-plantuml/default.nix | 2 +- pkgs/tools/text/mdbook-toc/default.nix | 2 +- pkgs/tools/text/mdcat/default.nix | 2 +- pkgs/tools/text/pinyin-tool/default.nix | 2 +- pkgs/tools/text/poedit/default.nix | 2 +- pkgs/tools/text/rare-regex/default.nix | 2 +- pkgs/tools/text/ripgrep-all/default.nix | 2 +- pkgs/tools/text/ripgrep/default.nix | 2 +- pkgs/tools/text/rosie/default.nix | 2 +- pkgs/tools/text/runiq/default.nix | 2 +- pkgs/tools/text/ruplacer/default.nix | 2 +- pkgs/tools/text/sd/default.nix | 2 +- pkgs/tools/text/sgml/opensp/default.nix | 4 +- pkgs/tools/text/silver-searcher/default.nix | 2 +- pkgs/tools/text/tab/default.nix | 2 +- pkgs/tools/text/teip/default.nix | 2 +- pkgs/tools/text/termbook/default.nix | 2 +- pkgs/tools/text/xml/basex/default.nix | 2 +- pkgs/tools/text/xsv/default.nix | 2 +- pkgs/tools/typesetting/biber-ms/default.nix | 4 +- pkgs/tools/typesetting/biber/default.nix | 4 +- pkgs/tools/typesetting/htmldoc/default.nix | 2 +- pkgs/tools/typesetting/lowdown/default.nix | 8 +- pkgs/tools/typesetting/sile/default.nix | 10 +- pkgs/tools/typesetting/tectonic/default.nix | 4 +- pkgs/tools/typesetting/ted/default.nix | 2 +- .../typesetting/tex/blahtexml/default.nix | 4 +- pkgs/tools/typesetting/tex/tetex/default.nix | 6 +- .../typesetting/tex/texpresso/default.nix | 2 +- pkgs/tools/video/atomicparsley/default.nix | 2 +- pkgs/tools/video/bento4/default.nix | 4 +- pkgs/tools/video/rtmpdump/default.nix | 2 +- pkgs/tools/video/swfmill/default.nix | 2 +- pkgs/tools/video/tsduck/default.nix | 2 +- pkgs/tools/video/yaydl/default.nix | 2 +- .../virtualization/distrobuilder/default.nix | 2 +- pkgs/tools/virtualization/ovftool/default.nix | 22 +- pkgs/tools/wayland/wob/default.nix | 4 +- pkgs/top-level/aliases.nix | 2 +- pkgs/top-level/all-packages.nix | 216 +++++++-------- pkgs/top-level/emscripten-packages.nix | 6 +- pkgs/top-level/java-packages.nix | 8 +- pkgs/top-level/lua-packages.nix | 6 +- pkgs/top-level/perl-packages.nix | 254 +++++++++--------- pkgs/top-level/php-packages.nix | 18 +- pkgs/top-level/python-packages.nix | 4 +- pkgs/top-level/qt5-packages.nix | 6 +- pkgs/top-level/stage.nix | 2 +- pkgs/top-level/wine-packages.nix | 28 +- 4283 files changed, 8137 insertions(+), 8137 deletions(-) diff --git a/flake.nix b/flake.nix index b09b6a5a4a0b..3e07aa1cd469 100644 --- a/flake.nix +++ b/flake.nix @@ -47,7 +47,7 @@ checks = forAllSystems (system: { tarball = jobs.${system}.tarball; # Exclude power64 due to "libressl is not available on the requested hostPlatform" with hostPlatform being power64 - } // lib.optionalAttrs (self.legacyPackages.${system}.stdenv.isLinux && !self.legacyPackages.${system}.targetPlatform.isPower64) { + } // lib.optionalAttrs (self.legacyPackages.${system}.stdenv.hostPlatform.isLinux && !self.legacyPackages.${system}.targetPlatform.isPower64) { # Test that ensures that the nixosSystem function can accept a lib argument # Note: prefer not to extend or modify `lib`, especially if you want to share reusable modules # alternatives include: `import` a file, or put a custom library in an option or in `_module.args.` diff --git a/lib/tests/test-with-nix.nix b/lib/tests/test-with-nix.nix index 1316aaa49b88..a6aee9859428 100644 --- a/lib/tests/test-with-nix.nix +++ b/lib/tests/test-with-nix.nix @@ -33,7 +33,7 @@ pkgs.runCommand "nixpkgs-lib-tests-nix-${nix.version}" { nativeBuildInputs = [ nix pkgs.gitMinimal - ] ++ lib.optional pkgs.stdenv.isLinux pkgs.inotify-tools; + ] ++ lib.optional pkgs.stdenv.hostPlatform.isLinux pkgs.inotify-tools; strictDeps = true; } '' datadir="${nix}/share" diff --git a/maintainers/scripts/convert-to-import-cargo-lock/shell.nix b/maintainers/scripts/convert-to-import-cargo-lock/shell.nix index fc2e2348309d..2938cf2d0c0b 100644 --- a/maintainers/scripts/convert-to-import-cargo-lock/shell.nix +++ b/maintainers/scripts/convert-to-import-cargo-lock/shell.nix @@ -13,5 +13,5 @@ mkShell { clippy rustfmt ] - ++ lib.optional stdenv.isDarwin pkgs.libiconv; + ++ lib.optional stdenv.hostPlatform.isDarwin pkgs.libiconv; } diff --git a/nixos/modules/config/fonts/fontconfig.nix b/nixos/modules/config/fonts/fontconfig.nix index 7b58d3adc22b..205fd1fa7b96 100644 --- a/nixos/modules/config/fonts/fontconfig.nix +++ b/nixos/modules/config/fonts/fontconfig.nix @@ -52,7 +52,7 @@ let ${lib.optionalString (pkgs.stdenv.hostPlatform == pkgs.stdenv.buildPlatform) '' ${cache} - ${lib.optionalString (pkgs.stdenv.isx86_64 && cfg.cache32Bit) '' + ${lib.optionalString (pkgs.stdenv.hostPlatform.isx86_64 && cfg.cache32Bit) '' ${cache32} ''} ''} diff --git a/nixos/modules/config/ldso.nix b/nixos/modules/config/ldso.nix index 60156dd04098..f8d89db0220e 100644 --- a/nixos/modules/config/ldso.nix +++ b/nixos/modules/config/ldso.nix @@ -32,7 +32,7 @@ in { config = { assertions = [ - { assertion = isNull config.environment.ldso32 || pkgs.stdenv.isx86_64; + { assertion = isNull config.environment.ldso32 || pkgs.stdenv.hostPlatform.isx86_64; message = "Option environment.ldso32 currently only works on x86_64."; } ]; @@ -44,7 +44,7 @@ in { "d /${libDir} 0755 root root - -" "L+ /${libDir}/${ldsoBasename} - - - - ${config.environment.ldso}" ] - ) ++ optionals pkgs.stdenv.isx86_64 ( + ) ++ optionals pkgs.stdenv.hostPlatform.isx86_64 ( if isNull config.environment.ldso32 then [ "r /${libDir32}/${ldsoBasename32} - - - - -" ] else [ diff --git a/nixos/modules/config/pulseaudio.nix b/nixos/modules/config/pulseaudio.nix index 6a6aeaab6541..6e6e577e6e20 100644 --- a/nixos/modules/config/pulseaudio.nix +++ b/nixos/modules/config/pulseaudio.nix @@ -12,7 +12,7 @@ let # Forces 32bit pulseaudio and alsa-plugins to be built/supported for apps # using 32bit alsa on 64bit linux. - enable32BitAlsaPlugins = cfg.support32Bit && pkgs.stdenv.isx86_64 && (pkgs.pkgsi686Linux.alsa-lib != null && pkgs.pkgsi686Linux.libpulseaudio != null); + enable32BitAlsaPlugins = cfg.support32Bit && pkgs.stdenv.hostPlatform.isx86_64 && (pkgs.pkgsi686Linux.alsa-lib != null && pkgs.pkgsi686Linux.libpulseaudio != null); myConfigFile = diff --git a/nixos/modules/config/stub-ld.nix b/nixos/modules/config/stub-ld.nix index 87b7bdf07a2d..05945852ee45 100644 --- a/nixos/modules/config/stub-ld.nix +++ b/nixos/modules/config/stub-ld.nix @@ -49,7 +49,7 @@ in { config = mkIf cfg.enable { environment.ldso = mkDefault stub-ld; - environment.ldso32 = mkIf pkgs.stdenv.isx86_64 (mkDefault stub-ld32); + environment.ldso32 = mkIf pkgs.stdenv.hostPlatform.isx86_64 (mkDefault stub-ld32); }; meta.maintainers = with lib.maintainers; [ tejing ]; diff --git a/nixos/modules/hardware/graphics.nix b/nixos/modules/hardware/graphics.nix index 99c122f75c2a..170ca85a99a2 100644 --- a/nixos/modules/hardware/graphics.nix +++ b/nixos/modules/hardware/graphics.nix @@ -100,7 +100,7 @@ in config = lib.mkIf cfg.enable { assertions = [ { - assertion = cfg.enable32Bit -> pkgs.stdenv.isx86_64; + assertion = cfg.enable32Bit -> pkgs.stdenv.hostPlatform.isx86_64; message = "`hardware.graphics.enable32Bit` only makes sense on a 64-bit system."; } { @@ -112,7 +112,7 @@ in systemd.tmpfiles.settings.graphics-driver = { "/run/opengl-driver"."L+".argument = toString driversEnv; "/run/opengl-driver-32" = - if pkgs.stdenv.isi686 then + if pkgs.stdenv.hostPlatform.isi686 then { "L+".argument = "opengl-driver"; } else if cfg.enable32Bit then { "L+".argument = toString driversEnv32; } diff --git a/nixos/modules/profiles/all-hardware.nix b/nixos/modules/profiles/all-hardware.nix index 249b767593f2..970b76cfbfdf 100644 --- a/nixos/modules/profiles/all-hardware.nix +++ b/nixos/modules/profiles/all-hardware.nix @@ -52,7 +52,7 @@ in # VMware support. "mptspi" "vmxnet3" "vsock" ] ++ lib.optional platform.isx86 "vmw_balloon" - ++ lib.optionals (pkgs.stdenv.isi686 || pkgs.stdenv.isx86_64) [ + ++ lib.optionals (pkgs.stdenv.hostPlatform.isi686 || pkgs.stdenv.hostPlatform.isx86_64) [ "vmw_vmci" "vmwgfx" "vmw_vsock_vmci_transport" # Hyper-V support. @@ -68,7 +68,7 @@ in # Broadcom "vc4" - ] ++ lib.optionals pkgs.stdenv.isAarch64 [ + ] ++ lib.optionals pkgs.stdenv.hostPlatform.isAarch64 [ # Most of the following falls into two categories: # - early KMS / early display # - early storage (e.g. USB) support diff --git a/nixos/modules/services/audio/jack.nix b/nixos/modules/services/audio/jack.nix index a5cb0da29592..7344fdf4a218 100644 --- a/nixos/modules/services/audio/jack.nix +++ b/nixos/modules/services/audio/jack.nix @@ -8,7 +8,7 @@ let pcmPlugin = cfg.jackd.enable && cfg.alsa.enable; loopback = cfg.jackd.enable && cfg.loopback.enable; - enable32BitAlsaPlugins = cfg.alsa.support32Bit && pkgs.stdenv.isx86_64 && pkgs.pkgsi686Linux.alsa-lib != null; + enable32BitAlsaPlugins = cfg.alsa.support32Bit && pkgs.stdenv.hostPlatform.isx86_64 && pkgs.pkgsi686Linux.alsa-lib != null; umaskNeeded = versionOlder cfg.jackd.package.version "1.9.12"; bridgeNeeded = versionAtLeast cfg.jackd.package.version "1.9.12"; diff --git a/nixos/modules/services/desktops/pipewire/pipewire.nix b/nixos/modules/services/desktops/pipewire/pipewire.nix index bf57d1255774..532c64c0f424 100644 --- a/nixos/modules/services/desktops/pipewire/pipewire.nix +++ b/nixos/modules/services/desktops/pipewire/pipewire.nix @@ -19,7 +19,7 @@ let ''; cfg = config.services.pipewire; enable32BitAlsaPlugins = cfg.alsa.support32Bit - && pkgs.stdenv.isx86_64 + && pkgs.stdenv.hostPlatform.isx86_64 && pkgs.pkgsi686Linux.pipewire != null; # The package doesn't output to $out/lib/pipewire directly so that the diff --git a/nixos/modules/services/logging/promtail.nix b/nixos/modules/services/logging/promtail.nix index 9eccd34cef23..644a93214516 100644 --- a/nixos/modules/services/logging/promtail.nix +++ b/nixos/modules/services/logging/promtail.nix @@ -80,7 +80,7 @@ in { PrivateUsers = true; SupplementaryGroups = lib.optional (allowSystemdJournal) "systemd-journal"; - } // (optionalAttrs (!pkgs.stdenv.isAarch64) { # FIXME: figure out why this breaks on aarch64 + } // (optionalAttrs (!pkgs.stdenv.hostPlatform.isAarch64) { # FIXME: figure out why this breaks on aarch64 SystemCallFilter = "@system-service"; }); }; diff --git a/nixos/modules/services/misc/mame.nix b/nixos/modules/services/misc/mame.nix index 054a7803b9c4..ed98ef3ed8a6 100644 --- a/nixos/modules/services/misc/mame.nix +++ b/nixos/modules/services/misc/mame.nix @@ -1,7 +1,7 @@ { config, lib, pkgs, ... }: let cfg = config.services.mame; - mame = "mame${lib.optionalString pkgs.stdenv.is64bit "64"}"; + mame = "mame${lib.optionalString pkgs.stdenv.hostPlatform.is64bit "64"}"; in { options = { diff --git a/nixos/modules/services/misc/tabby.nix b/nixos/modules/services/misc/tabby.nix index d63a6b24ae3d..8fabd10d90fa 100644 --- a/nixos/modules/services/misc/tabby.nix +++ b/nixos/modules/services/misc/tabby.nix @@ -71,7 +71,7 @@ in - nixpkgs.config.cudaSupport - nixpkgs.config.rocmSupport - - if stdenv.isDarwin && stdenv.isAarch64 + - if stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isAarch64 IFF multiple acceleration methods are found to be enabled or if you haven't set either `cudaSupport or rocmSupport` you will have to diff --git a/nixos/modules/services/networking/cjdns.nix b/nixos/modules/services/networking/cjdns.nix index a7f39b379181..6aaaf6295068 100644 --- a/nixos/modules/services/networking/cjdns.nix +++ b/nixos/modules/services/networking/cjdns.nix @@ -274,7 +274,7 @@ in CapabilityBoundingSet = "CAP_NET_ADMIN CAP_NET_RAW CAP_SETUID"; ProtectSystem = true; # Doesn't work on i686, causing service to fail - MemoryDenyWriteExecute = !pkgs.stdenv.isi686; + MemoryDenyWriteExecute = !pkgs.stdenv.hostPlatform.isi686; ProtectHome = true; PrivateTmp = true; }; diff --git a/nixos/modules/services/networking/nsd.nix b/nixos/modules/services/networking/nsd.nix index b17416c1e3d3..fe878ddbe05f 100644 --- a/nixos/modules/services/networking/nsd.nix +++ b/nixos/modules/services/networking/nsd.nix @@ -603,8 +603,8 @@ in reuseport = mkOption { type = types.bool; - default = pkgs.stdenv.isLinux; - defaultText = literalExpression "pkgs.stdenv.isLinux"; + default = pkgs.stdenv.hostPlatform.isLinux; + defaultText = literalExpression "pkgs.stdenv.hostPlatform.isLinux"; description = '' Whether to enable SO_REUSEPORT on all used sockets. This lets multiple processes bind to the same port. This speeds up operation especially diff --git a/nixos/modules/services/video/frigate.nix b/nixos/modules/services/video/frigate.nix index 5c259b7fa14d..b3f38eba6642 100644 --- a/nixos/modules/services/video/frigate.nix +++ b/nixos/modules/services/video/frigate.nix @@ -518,7 +518,7 @@ in libva-utils procps radeontop - ] ++ lib.optionals (!stdenv.isAarch64) [ + ] ++ lib.optionals (!stdenv.hostPlatform.isAarch64) [ # not available on aarch64-linux intel-gpu-tools ]; diff --git a/nixos/modules/system/boot/stage-1.nix b/nixos/modules/system/boot/stage-1.nix index 082380216d2a..b3237aa7f04e 100644 --- a/nixos/modules/system/boot/stage-1.nix +++ b/nixos/modules/system/boot/stage-1.nix @@ -327,7 +327,7 @@ let setHostId = optionalString (config.networking.hostId != null) '' hi="${config.networking.hostId}" - ${if pkgs.stdenv.isBigEndian then '' + ${if pkgs.stdenv.hostPlatform.isBigEndian then '' echo -ne "\x''${hi:0:2}\x''${hi:2:2}\x''${hi:4:2}\x''${hi:6:2}" > /etc/hostid '' else '' echo -ne "\x''${hi:6:2}\x''${hi:4:2}\x''${hi:2:2}\x''${hi:0:2}" > /etc/hostid diff --git a/nixos/modules/system/boot/systemd.nix b/nixos/modules/system/boot/systemd.nix index bb6fcc1d38ce..c7f3e5845f54 100644 --- a/nixos/modules/system/boot/systemd.nix +++ b/nixos/modules/system/boot/systemd.nix @@ -679,7 +679,7 @@ in # Increase numeric PID range (set directly instead of copying a one-line file from systemd) # https://github.com/systemd/systemd/pull/12226 - boot.kernel.sysctl."kernel.pid_max" = mkIf pkgs.stdenv.is64bit (lib.mkDefault 4194304); + boot.kernel.sysctl."kernel.pid_max" = mkIf pkgs.stdenv.hostPlatform.is64bit (lib.mkDefault 4194304); services.logrotate.settings = { "/var/log/btmp" = mapAttrs (_: mkDefault) { diff --git a/nixos/modules/tasks/network-interfaces.nix b/nixos/modules/tasks/network-interfaces.nix index 7e3e24c727b2..c9ea31a85bee 100644 --- a/nixos/modules/tasks/network-interfaces.nix +++ b/nixos/modules/tasks/network-interfaces.nix @@ -438,7 +438,7 @@ let hostidFile = pkgs.runCommand "gen-hostid" { preferLocalBuild = true; } '' hi="${cfg.hostId}" - ${if pkgs.stdenv.isBigEndian then '' + ${if pkgs.stdenv.hostPlatform.isBigEndian then '' echo -ne "\x''${hi:0:2}\x''${hi:2:2}\x''${hi:4:2}\x''${hi:6:2}" > $out '' else '' echo -ne "\x''${hi:6:2}\x''${hi:4:2}\x''${hi:2:2}\x''${hi:0:2}" > $out diff --git a/nixos/modules/virtualisation/docker.nix b/nixos/modules/virtualisation/docker.nix index d6d775998119..4f38bc0b94d6 100644 --- a/nixos/modules/virtualisation/docker.nix +++ b/nixos/modules/virtualisation/docker.nix @@ -244,7 +244,7 @@ in }; assertions = [ - { assertion = cfg.enableNvidia && pkgs.stdenv.isx86_64 -> config.hardware.graphics.enable32Bit or false; + { assertion = cfg.enableNvidia && pkgs.stdenv.hostPlatform.isx86_64 -> config.hardware.graphics.enable32Bit or false; message = "Option enableNvidia on x86_64 requires 32-bit support libraries"; }]; diff --git a/nixos/modules/virtualisation/xen-dom0.nix b/nixos/modules/virtualisation/xen-dom0.nix index fa2cf2b2c6d5..2cc82c910110 100644 --- a/nixos/modules/virtualisation/xen-dom0.nix +++ b/nixos/modules/virtualisation/xen-dom0.nix @@ -605,7 +605,7 @@ in config = lib.modules.mkIf cfg.enable { assertions = [ { - assertion = pkgs.stdenv.isx86_64; + assertion = pkgs.stdenv.hostPlatform.isx86_64; message = "Xen is currently not supported on ${pkgs.stdenv.hostPlatform.system}."; } { diff --git a/nixos/tests/filesender.nix b/nixos/tests/filesender.nix index 9274ddbf7e90..346e315956fb 100644 --- a/nixos/tests/filesender.nix +++ b/nixos/tests/filesender.nix @@ -2,7 +2,7 @@ import ./make-test-python.nix ({ pkgs, lib, ... }: { name = "filesender"; meta = { maintainers = with lib.maintainers; [ nhnn ]; - broken = pkgs.stdenv.isAarch64; # selenium.common.exceptions.WebDriverException: Message: Unsupported platform/architecture combination: linux/aarch64 + broken = pkgs.stdenv.hostPlatform.isAarch64; # selenium.common.exceptions.WebDriverException: Message: Unsupported platform/architecture combination: linux/aarch64 }; nodes.filesender = { ... }: let diff --git a/nixos/tests/freetube.nix b/nixos/tests/freetube.nix index c0beeeaae61f..4b5b2ed343f1 100644 --- a/nixos/tests/freetube.nix +++ b/nixos/tests/freetube.nix @@ -24,7 +24,7 @@ let nodes = { "${name}" = machine; }; meta.maintainers = with pkgs.lib.maintainers; [ kirillrdy ]; # time-out on ofborg - meta.broken = pkgs.stdenv.isAarch64; + meta.broken = pkgs.stdenv.hostPlatform.isAarch64; enableOCR = true; testScript = '' diff --git a/nixos/tests/installed-tests/gdk-pixbuf.nix b/nixos/tests/installed-tests/gdk-pixbuf.nix index 110efdbf710f..a86c20b0fbeb 100644 --- a/nixos/tests/installed-tests/gdk-pixbuf.nix +++ b/nixos/tests/installed-tests/gdk-pixbuf.nix @@ -6,7 +6,7 @@ makeInstalledTest { testConfig = { # Tests allocate a lot of memory trying to exploit a CVE # but qemu-system-i386 has a 2047M memory limit - virtualisation.memorySize = if pkgs.stdenv.isi686 then 2047 else 4096; + virtualisation.memorySize = if pkgs.stdenv.hostPlatform.isi686 then 2047 else 4096; }; testRunnerFlags = [ "--timeout" "1800" ]; diff --git a/nixos/tests/k3s/multi-node.nix b/nixos/tests/k3s/multi-node.nix index bc06ad858d8c..58b98b2a1853 100644 --- a/nixos/tests/k3s/multi-node.nix +++ b/nixos/tests/k3s/multi-node.nix @@ -189,7 +189,7 @@ import ../make-test-python.nix ( m.start() m.wait_for_unit("k3s") - is_aarch64 = "${toString pkgs.stdenv.isAarch64}" == "1" + is_aarch64 = "${toString pkgs.stdenv.hostPlatform.isAarch64}" == "1" # wait for the agent to show up server.wait_until_succeeds("k3s kubectl get node agent") diff --git a/nixos/tests/libvirtd.nix b/nixos/tests/libvirtd.nix index 27ffaac3e62d..0b068d5a2f08 100644 --- a/nixos/tests/libvirtd.nix +++ b/nixos/tests/libvirtd.nix @@ -30,7 +30,7 @@ import ./make-test-python.nix ({ pkgs, ... }: { testScript = let nixosInstallISO = (import ../release.nix {}).iso_minimal.${pkgs.stdenv.hostPlatform.system}; - virshShutdownCmd = if pkgs.stdenv.isx86_64 then "shutdown" else "destroy"; + virshShutdownCmd = if pkgs.stdenv.hostPlatform.isx86_64 then "shutdown" else "destroy"; in '' start_all() diff --git a/nixos/tests/pulseaudio.nix b/nixos/tests/pulseaudio.nix index dc8e33ccd559..ccc33f28bc6d 100644 --- a/nixos/tests/pulseaudio.nix +++ b/nixos/tests/pulseaudio.nix @@ -40,7 +40,7 @@ let }; environment.systemPackages = [ testers.testPlay pkgs.pavucontrol ] - ++ lib.optional pkgs.stdenv.isx86_64 testers.testPlay32; + ++ lib.optional pkgs.stdenv.hostPlatform.isx86_64 testers.testPlay32; } // lib.optionalAttrs systemWide { users.users.alice.extraGroups = [ "pulse-access" ]; systemd.services.pulseaudio.wantedBy = [ "multi-user.target" ]; @@ -54,7 +54,7 @@ let machine.send_chars("testPlay \n") machine.wait_for_file("/tmp/testPlay_success") - ${lib.optionalString pkgs.stdenv.isx86_64 '' + ${lib.optionalString pkgs.stdenv.hostPlatform.isx86_64 '' machine.send_chars("testPlay32 \n") machine.wait_for_file("/tmp/testPlay32_success") ''} diff --git a/nixos/tests/stub-ld.nix b/nixos/tests/stub-ld.nix index 72b0aebf3e6c..f34e082cfd22 100644 --- a/nixos/tests/stub-ld.nix +++ b/nixos/tests/stub-ld.nix @@ -18,7 +18,7 @@ import ./make-test-python.nix ({ lib, pkgs, ... }: { libDir = pkgs.stdenv.hostPlatform.libDir; ldsoBasename = lib.last (lib.splitString "/" pkgs.stdenv.cc.bintools.dynamicLinker); - check32 = pkgs.stdenv.isx86_64; + check32 = pkgs.stdenv.hostPlatform.isx86_64; pkgs32 = pkgs.pkgsi686Linux; libDir32 = pkgs32.stdenv.hostPlatform.libDir; diff --git a/nixos/tests/sunshine.nix b/nixos/tests/sunshine.nix index 7c7e86de203a..a1207bfa49f7 100644 --- a/nixos/tests/sunshine.nix +++ b/nixos/tests/sunshine.nix @@ -2,7 +2,7 @@ import ./make-test-python.nix ({ pkgs, lib, ... }: { name = "sunshine"; meta = { # test is flaky on aarch64 - broken = pkgs.stdenv.isAarch64; + broken = pkgs.stdenv.hostPlatform.isAarch64; maintainers = [ lib.maintainers.devusb ]; }; diff --git a/nixos/tests/wine.nix b/nixos/tests/wine.nix index 7cbe7ac94f1e..7fc98c23c042 100644 --- a/nixos/tests/wine.nix +++ b/nixos/tests/wine.nix @@ -43,7 +43,7 @@ let in listToAttrs ( map (makeWineTest "winePackages" [ hello32 ]) variants - ++ optionals pkgs.stdenv.is64bit + ++ optionals pkgs.stdenv.hostPlatform.is64bit (map (makeWineTest "wineWowPackages" [ hello32 hello64 ]) # This wayland combination times out after spending many hours. # https://hydra.nixos.org/job/nixos/trunk-combined/nixos.tests.wine.wineWowPackages-wayland.x86_64-linux diff --git a/pkgs/applications/audio/ario/default.nix b/pkgs/applications/audio/ario/default.nix index f34ff19ea04c..2231031d0481 100644 --- a/pkgs/applications/audio/ario/default.nix +++ b/pkgs/applications/audio/ario/default.nix @@ -44,7 +44,7 @@ stdenv.mkDerivation rec { taglib ]; - postInstall = lib.optionalString stdenv.isDarwin '' + postInstall = lib.optionalString stdenv.hostPlatform.isDarwin '' for file in $out/lib/ario/plugins/*.dylib; do ln -s $file $out/lib/ario/plugins/$(basename $file .dylib).so done diff --git a/pkgs/applications/audio/ashuffle/default.nix b/pkgs/applications/audio/ashuffle/default.nix index 8318a4936ed9..45daafa88d79 100644 --- a/pkgs/applications/audio/ashuffle/default.nix +++ b/pkgs/applications/audio/ashuffle/default.nix @@ -25,7 +25,7 @@ stdenv.mkDerivation rec { dontUseCmakeConfigure = true; nativeBuildInputs = [ cmake pkg-config meson ninja ]; buildInputs = [ libmpdclient yaml-cpp ] - ++ lib.optionals stdenv.isDarwin [ darwin.apple_sdk.frameworks.CoreFoundation ]; + ++ lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.CoreFoundation ]; mesonFlags = [ "-Dunsupported_use_system_yamlcpp=true" ]; diff --git a/pkgs/applications/audio/aucatctl/default.nix b/pkgs/applications/audio/aucatctl/default.nix index b5d52dce1856..051a1494fd9f 100644 --- a/pkgs/applications/audio/aucatctl/default.nix +++ b/pkgs/applications/audio/aucatctl/default.nix @@ -10,7 +10,7 @@ stdenv.mkDerivation (finalAttrs: { }; buildInputs = [ sndio ] - ++ lib.optional (!stdenv.isDarwin && !stdenv.hostPlatform.isBSD) + ++ lib.optional (!stdenv.hostPlatform.isDarwin && !stdenv.hostPlatform.isBSD) libbsd; outputs = [ "out" "man" ]; @@ -18,7 +18,7 @@ stdenv.mkDerivation (finalAttrs: { preBuild = '' makeFlagsArray+=("PREFIX=$out") '' + lib.optionalString - (!stdenv.isDarwin && !stdenv.hostPlatform.isBSD) '' + (!stdenv.hostPlatform.isDarwin && !stdenv.hostPlatform.isBSD) '' makeFlagsArray+=(LDADD="-lsndio -lbsd") # Fix warning about implicit declaration of function 'strlcpy' diff --git a/pkgs/applications/audio/audacity/default.nix b/pkgs/applications/audio/audacity/default.nix index d7f515007d92..85ceb93f48fe 100644 --- a/pkgs/applications/audio/audacity/default.nix +++ b/pkgs/applications/audio/audacity/default.nix @@ -75,10 +75,10 @@ stdenv.mkDerivation rec { mkdir src/private substituteInPlace scripts/build/macOS/fix_bundle.py \ --replace "path.startswith('/usr/lib/')" "path.startswith('${builtins.storeDir}')" - '' + lib.optionalString stdenv.isLinux '' + '' + lib.optionalString stdenv.hostPlatform.isLinux '' substituteInPlace libraries/lib-files/FileNames.cpp \ --replace /usr/include/linux/magic.h ${linuxHeaders}/include/linux/magic.h - '' + lib.optionalString (stdenv.isDarwin && lib.versionOlder stdenv.hostPlatform.darwinMinVersion "11.0") '' + '' + lib.optionalString (stdenv.hostPlatform.isDarwin && lib.versionOlder stdenv.hostPlatform.darwinMinVersion "11.0") '' sed -z -i "s/NSAppearanceName.*systemAppearance//" src/AudacityApp.mm ''; @@ -89,7 +89,7 @@ stdenv.mkDerivation rec { python3 makeWrapper wrapGAppsHook3 - ] ++ lib.optionals stdenv.isLinux [ + ] ++ lib.optionals stdenv.hostPlatform.isLinux [ linuxHeaders ]; @@ -125,7 +125,7 @@ stdenv.mkDerivation rec { portaudio wavpack wxGTK32 - ] ++ lib.optionals stdenv.isLinux [ + ] ++ lib.optionals stdenv.hostPlatform.isLinux [ alsa-lib # for portaudio at-spi2-core dbus @@ -138,7 +138,7 @@ stdenv.mkDerivation rec { libsepol libuuid util-linux - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ AppKit CoreAudioKit # for portaudio libpng @@ -176,13 +176,13 @@ stdenv.mkDerivation rec { # Replace audacity's wrapper, to: # - put it in the right place, it shouldn't be in "$out/audacity" # - Add the ffmpeg dynamic dependency - postFixup = lib.optionalString stdenv.isLinux '' + postFixup = lib.optionalString stdenv.hostPlatform.isLinux '' wrapProgram "$out/bin/audacity" \ "''${gappsWrapperArgs[@]}" \ --prefix LD_LIBRARY_PATH : "$out/lib/audacity":${lib.makeLibraryPath [ ffmpeg_7 ]} \ --suffix AUDACITY_MODULES_PATH : "$out/lib/audacity/modules" \ --suffix AUDACITY_PATH : "$out/share/audacity" - '' + lib.optionalString stdenv.isDarwin '' + '' + lib.optionalString stdenv.hostPlatform.isDarwin '' mkdir -p $out/{Applications,bin} mv $out/Audacity.app $out/Applications/ makeWrapper $out/Applications/Audacity.app/Contents/MacOS/Audacity $out/bin/audacity diff --git a/pkgs/applications/audio/cardinal/default.nix b/pkgs/applications/audio/cardinal/default.nix index 654d22233a3b..9c318e916a45 100644 --- a/pkgs/applications/audio/cardinal/default.nix +++ b/pkgs/applications/audio/cardinal/default.nix @@ -89,6 +89,6 @@ stdenv.mkDerivation rec { mainProgram = "Cardinal"; platforms = lib.platforms.all; # never built on aarch64-darwin, x86_64-darwin since first introduction in nixpkgs - broken = stdenv.isDarwin; + broken = stdenv.hostPlatform.isDarwin; }; } diff --git a/pkgs/applications/audio/cd-discid/default.nix b/pkgs/applications/audio/cd-discid/default.nix index e13a64e4bd83..a30ebc8fbe39 100644 --- a/pkgs/applications/audio/cd-discid/default.nix +++ b/pkgs/applications/audio/cd-discid/default.nix @@ -13,7 +13,7 @@ stdenv.mkDerivation rec { installFlags = [ "PREFIX=$(out)" "INSTALL=install" ]; buildInputs = [] - ++ lib.optional stdenv.isDarwin IOKit; + ++ lib.optional stdenv.hostPlatform.isDarwin IOKit; meta = with lib; { homepage = "http://linukz.org/cd-discid.shtml"; diff --git a/pkgs/applications/audio/cdparanoia/default.nix b/pkgs/applications/audio/cdparanoia/default.nix index 4c861a177846..bdeb8eec896d 100644 --- a/pkgs/applications/audio/cdparanoia/default.nix +++ b/pkgs/applications/audio/cdparanoia/default.nix @@ -12,7 +12,7 @@ stdenv.mkDerivation rec { sha256 = "1pv4zrajm46za0f6lv162iqffih57a8ly4pc69f7y0gfyigb8p80"; }; - patches = lib.optionals stdenv.isDarwin [ + patches = lib.optionals stdenv.hostPlatform.isDarwin [ (fetchpatch { url = "https://trac.macports.org/export/70964/trunk/dports/audio/cdparanoia/files/osx_interface.patch"; sha256 = "0hq3lvfr0h1m3p0r33jij0s1aspiqlpy533rwv19zrfllb39qvr8"; @@ -37,7 +37,7 @@ stdenv.mkDerivation rec { autoreconfHook ]; - propagatedBuildInputs = lib.optionals stdenv.isDarwin [ + propagatedBuildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ Carbon IOKit ]; diff --git a/pkgs/applications/audio/chuck/default.nix b/pkgs/applications/audio/chuck/default.nix index 6b975b3c6b95..db42e60730ea 100644 --- a/pkgs/applications/audio/chuck/default.nix +++ b/pkgs/applications/audio/chuck/default.nix @@ -12,16 +12,16 @@ stdenv.mkDerivation rec { }; nativeBuildInputs = [ flex bison which ] - ++ lib.optionals stdenv.isDarwin [ DarwinTools xcbuild ]; + ++ lib.optionals stdenv.hostPlatform.isDarwin [ DarwinTools xcbuild ]; buildInputs = [ libsndfile ] - ++ lib.optional (!stdenv.isDarwin) alsa-lib - ++ lib.optionals stdenv.isDarwin [ AppKit Carbon CoreAudio CoreMIDI CoreServices Kernel MultitouchSupport ]; + ++ lib.optional (!stdenv.hostPlatform.isDarwin) alsa-lib + ++ lib.optionals stdenv.hostPlatform.isDarwin [ AppKit Carbon CoreAudio CoreMIDI CoreServices Kernel MultitouchSupport ]; patches = [ ./darwin-limits.patch ]; makeFlags = [ "-C src" "DESTDIR=$(out)/bin" ]; - buildFlags = [ (if stdenv.isDarwin then "mac" else "linux-alsa") ]; + buildFlags = [ (if stdenv.hostPlatform.isDarwin then "mac" else "linux-alsa") ]; meta = with lib; { description = "Programming language for real-time sound synthesis and music creation"; diff --git a/pkgs/applications/audio/cmus/default.nix b/pkgs/applications/audio/cmus/default.nix index db32f8548517..bef7d46a53e4 100644 --- a/pkgs/applications/audio/cmus/default.nix +++ b/pkgs/applications/audio/cmus/default.nix @@ -1,15 +1,15 @@ { config, lib, stdenv, fetchFromGitHub, ncurses, pkg-config , libiconv, CoreAudio, AudioUnit, VideoToolbox -, alsaSupport ? stdenv.isLinux, alsa-lib ? null +, alsaSupport ? stdenv.hostPlatform.isLinux, alsa-lib ? null # simple fallback for everyone else -, aoSupport ? !stdenv.isLinux, libao ? null +, aoSupport ? !stdenv.hostPlatform.isLinux, libao ? null , jackSupport ? false, libjack ? null , samplerateSupport ? jackSupport, libsamplerate ? null , ossSupport ? false, alsa-oss ? null , pulseaudioSupport ? config.pulseaudio or false, libpulseaudio ? null , sndioSupport ? false, sndio ? null -, mprisSupport ? stdenv.isLinux, systemd ? null +, mprisSupport ? stdenv.hostPlatform.isLinux, systemd ? null # TODO: add these #, artsSupport @@ -103,7 +103,7 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ pkg-config ]; buildInputs = [ ncurses ] - ++ lib.optionals stdenv.isDarwin [ libiconv CoreAudio AudioUnit VideoToolbox ] + ++ lib.optionals stdenv.hostPlatform.isDarwin [ libiconv CoreAudio AudioUnit VideoToolbox ] ++ lib.flatten (lib.concatMap (a: a.deps) opts); prefixKey = "prefix="; diff --git a/pkgs/applications/audio/cmusfm/default.nix b/pkgs/applications/audio/cmusfm/default.nix index 5d3a62bd2a56..117356bf948e 100644 --- a/pkgs/applications/audio/cmusfm/default.nix +++ b/pkgs/applications/audio/cmusfm/default.nix @@ -1,5 +1,5 @@ { lib, stdenv, fetchFromGitHub, autoreconfHook, pkg-config, curl, libnotify -, gdk-pixbuf, libnotifySupport ? stdenv.isLinux, debug ? false }: +, gdk-pixbuf, libnotifySupport ? stdenv.hostPlatform.isLinux, debug ? false }: stdenv.mkDerivation rec { pname = "cmusfm"; diff --git a/pkgs/applications/audio/csound/default.nix b/pkgs/applications/audio/csound/default.nix index ccaacf189fae..c6359103593f 100644 --- a/pkgs/applications/audio/csound/default.nix +++ b/pkgs/applications/audio/csound/default.nix @@ -31,21 +31,21 @@ stdenv.mkDerivation rec { }; cmakeFlags = [ "-DBUILD_CSOUND_AC=0" ] # fails to find Score.hpp - ++ lib.optional stdenv.isDarwin "-DCS_FRAMEWORK_DEST=${placeholder "out"}/lib" + ++ lib.optional stdenv.hostPlatform.isDarwin "-DCS_FRAMEWORK_DEST=${placeholder "out"}/lib" # Ignore gettext in CMAKE_PREFIX_PATH on cross to prevent find_program picking up the wrong gettext ++ lib.optional (stdenv.hostPlatform != stdenv.buildPlatform) "-DCMAKE_IGNORE_PATH=${lib.getBin gettext}/bin"; nativeBuildInputs = [ cmake flex bison gettext ]; buildInputs = [ libsndfile libsamplerate boost ] - ++ lib.optionals stdenv.isDarwin [ + ++ lib.optionals stdenv.hostPlatform.isDarwin [ Accelerate AudioUnit CoreAudio CoreMIDI portaudio - ] ++ lib.optionals stdenv.isLinux (builtins.filter (optional: optional != null) [ + ] ++ lib.optionals stdenv.hostPlatform.isLinux (builtins.filter (optional: optional != null) [ alsa-lib libpulseaudio libjack2 liblo ladspa-sdk fluidsynth eigen curl tcltk fltk ]); - postInstall = lib.optional stdenv.isDarwin '' + postInstall = lib.optional stdenv.hostPlatform.isDarwin '' mkdir -p $out/Library/Frameworks ln -s $out/lib/CsoundLib64.framework $out/Library/Frameworks ''; diff --git a/pkgs/applications/audio/eartag/default.nix b/pkgs/applications/audio/eartag/default.nix index 11bd27953f12..d3df0295802c 100644 --- a/pkgs/applications/audio/eartag/default.nix +++ b/pkgs/applications/audio/eartag/default.nix @@ -50,7 +50,7 @@ python3Packages.buildPythonApplication rec { gobject-introspection wrapGAppsHook4 blueprint-compiler - ] ++ lib.optional stdenv.isDarwin gtk4; # for gtk4-update-icon-cache + ] ++ lib.optional stdenv.hostPlatform.isDarwin gtk4; # for gtk4-update-icon-cache buildInputs = [ librsvg diff --git a/pkgs/applications/audio/easyaudiosync/default.nix b/pkgs/applications/audio/easyaudiosync/default.nix index 0b910dfb573b..38fe6b15d937 100644 --- a/pkgs/applications/audio/easyaudiosync/default.nix +++ b/pkgs/applications/audio/easyaudiosync/default.nix @@ -35,7 +35,7 @@ stdenv.mkDerivation rec { cmake pkg-config wrapQtAppsHook - ] ++ lib.optional stdenv.isLinux copyDesktopItems; + ] ++ lib.optional stdenv.hostPlatform.isLinux copyDesktopItems; buildInputs = [ qtbase @@ -48,11 +48,11 @@ stdenv.mkDerivation rec { installPhase = '' runHook preInstall - '' + lib.optionalString stdenv.isDarwin '' + '' + lib.optionalString stdenv.hostPlatform.isDarwin '' mkdir -p $out/Applications mv "easyaudiosync.app" "Easy Audio Sync.app" cp -r "Easy Audio Sync.app" $out/Applications - '' + lib.optionalString stdenv.isLinux '' + '' + lib.optionalString stdenv.hostPlatform.isLinux '' install -Dm755 easyaudiosync $out/bin/easyaudiosync for RES in 48 64 128 256; do diff --git a/pkgs/applications/audio/eq10q/default.nix b/pkgs/applications/audio/eq10q/default.nix index 84c8333d1857..5be159434354 100644 --- a/pkgs/applications/audio/eq10q/default.nix +++ b/pkgs/applications/audio/eq10q/default.nix @@ -33,7 +33,7 @@ stdenv.mkDerivation rec { ''; meta = { - broken = (stdenv.isLinux && stdenv.isAarch64); + broken = (stdenv.hostPlatform.isLinux && stdenv.hostPlatform.isAarch64); description = "LV2 EQ plugins and more, with 64 bit processing"; longDescription = '' Up to 10-Bands parametric equalizer with mono and stereo versions. diff --git a/pkgs/applications/audio/espeak-ng/default.nix b/pkgs/applications/audio/espeak-ng/default.nix index f0aebf4e4a32..7eabadec04c2 100644 --- a/pkgs/applications/audio/espeak-ng/default.nix +++ b/pkgs/applications/audio/espeak-ng/default.nix @@ -53,7 +53,7 @@ stdenv.mkDerivation rec { buildInputs = lib.optional mbrolaSupport mbrola ++ lib.optional pcaudiolibSupport pcaudiolib ++ lib.optional sonicSupport sonic - ++ lib.optionals stdenv.isDarwin [ + ++ lib.optionals stdenv.hostPlatform.isDarwin [ CoreAudio AudioToolbox AudioUnit @@ -61,7 +61,7 @@ stdenv.mkDerivation rec { # touch ChangeLog to avoid below error on darwin: # Makefile.am: error: required file './ChangeLog.md' not found - preConfigure = lib.optionalString stdenv.isDarwin '' + preConfigure = lib.optionalString stdenv.hostPlatform.isDarwin '' touch ChangeLog '' + '' ./autogen.sh @@ -79,7 +79,7 @@ stdenv.mkDerivation rec { --replace '../src/espeak-ng --compile' "${lib.getExe buildPackages.espeak-ng} --compile" ''; - postInstall = lib.optionalString stdenv.isLinux '' + postInstall = lib.optionalString stdenv.hostPlatform.isLinux '' patchelf --set-rpath "$(patchelf --print-rpath $out/bin/espeak-ng)" $out/bin/speak-ng wrapProgram $out/bin/espeak-ng \ --set ALSA_PLUGIN_DIR ${alsa-plugins}/lib/alsa-lib diff --git a/pkgs/applications/audio/fluidsynth/default.nix b/pkgs/applications/audio/fluidsynth/default.nix index ff81d7689227..d02f87642f3f 100644 --- a/pkgs/applications/audio/fluidsynth/default.nix +++ b/pkgs/applications/audio/fluidsynth/default.nix @@ -19,8 +19,8 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ buildPackages.stdenv.cc pkg-config cmake ]; buildInputs = [ glib libsndfile libjack2 ] - ++ lib.optionals stdenv.isLinux [ alsa-lib libpulseaudio ] - ++ lib.optionals stdenv.isDarwin [ AppKit AudioUnit CoreAudio CoreMIDI CoreServices ]; + ++ lib.optionals stdenv.hostPlatform.isLinux [ alsa-lib libpulseaudio ] + ++ lib.optionals stdenv.hostPlatform.isDarwin [ AppKit AudioUnit CoreAudio CoreMIDI CoreServices ]; cmakeFlags = [ "-Denable-framework=off" diff --git a/pkgs/applications/audio/ft2-clone/default.nix b/pkgs/applications/audio/ft2-clone/default.nix index 072c038e144a..84de0229497d 100644 --- a/pkgs/applications/audio/ft2-clone/default.nix +++ b/pkgs/applications/audio/ft2-clone/default.nix @@ -24,8 +24,8 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ cmake ]; buildInputs = [ SDL2 ] - ++ lib.optional stdenv.isLinux alsa-lib - ++ lib.optionals stdenv.isDarwin [ + ++ lib.optional stdenv.hostPlatform.isLinux alsa-lib + ++ lib.optionals stdenv.hostPlatform.isDarwin [ libiconv CoreAudio CoreMIDI diff --git a/pkgs/applications/audio/glicol-cli/default.nix b/pkgs/applications/audio/glicol-cli/default.nix index b549b6ac4fbe..8279bfc6b30d 100644 --- a/pkgs/applications/audio/glicol-cli/default.nix +++ b/pkgs/applications/audio/glicol-cli/default.nix @@ -25,9 +25,9 @@ rustPlatform.buildRustPackage rec { rustPlatform.bindgenHook ]; - buildInputs = lib.optionals stdenv.isDarwin [ + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.AudioUnit - ] ++ lib.optionals stdenv.isLinux [ + ] ++ lib.optionals stdenv.hostPlatform.isLinux [ alsa-lib ]; diff --git a/pkgs/applications/audio/gnome-podcasts/default.nix b/pkgs/applications/audio/gnome-podcasts/default.nix index de7301e5020c..5625f15e3a23 100644 --- a/pkgs/applications/audio/gnome-podcasts/default.nix +++ b/pkgs/applications/audio/gnome-podcasts/default.nix @@ -75,6 +75,6 @@ stdenv.mkDerivation rec { license = lib.licenses.gpl3Plus; maintainers = lib.teams.gnome.members; platforms = lib.platforms.unix; - broken = stdenv.isDarwin; # never built on Hydra https://hydra.nixos.org/job/nixpkgs/trunk/gnome-podcasts.x86_64-darwin + broken = stdenv.hostPlatform.isDarwin; # never built on Hydra https://hydra.nixos.org/job/nixpkgs/trunk/gnome-podcasts.x86_64-darwin }; } diff --git a/pkgs/applications/audio/go-musicfox/default.nix b/pkgs/applications/audio/go-musicfox/default.nix index 243fa8fa1a2a..d0da4ce048b1 100644 --- a/pkgs/applications/audio/go-musicfox/default.nix +++ b/pkgs/applications/audio/go-musicfox/default.nix @@ -37,7 +37,7 @@ buildGoModule rec { buildInputs = [ flac - ] ++ lib.optionals stdenv.isLinux [ + ] ++ lib.optionals stdenv.hostPlatform.isLinux [ alsa-lib ]; diff --git a/pkgs/applications/audio/grandorgue/default.nix b/pkgs/applications/audio/grandorgue/default.nix index 4aa93b5f7090..771bef276221 100644 --- a/pkgs/applications/audio/grandorgue/default.nix +++ b/pkgs/applications/audio/grandorgue/default.nix @@ -41,8 +41,8 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ cmake pkg-config imagemagick libicns makeWrapper ]; buildInputs = [ fftwFloat zlib wavpack wxGTK32 yaml-cpp ] - ++ lib.optionals stdenv.isLinux [ alsa-lib udev ] - ++ lib.optionals stdenv.isDarwin [ Cocoa ] + ++ lib.optionals stdenv.hostPlatform.isLinux [ alsa-lib udev ] + ++ lib.optionals stdenv.hostPlatform.isDarwin [ Cocoa ] ++ lib.optional jackaudioSupport libjack2; cmakeFlags = lib.optionals (!jackaudioSupport) [ @@ -52,9 +52,9 @@ stdenv.mkDerivation rec { "-DINSTALL_DEPEND=OFF" ] ++ lib.optional (!includeDemo) "-DINSTALL_DEMO=OFF"; - env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.isDarwin "-DTARGET_OS_IPHONE=0"; + env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.hostPlatform.isDarwin "-DTARGET_OS_IPHONE=0"; - postInstall = lib.optionalString stdenv.isDarwin '' + postInstall = lib.optionalString stdenv.hostPlatform.isDarwin '' mkdir -p $out/{Applications,bin,lib} mv $out/GrandOrgue.app $out/Applications/ for lib in $out/Applications/GrandOrgue.app/Contents/Frameworks/lib*; do diff --git a/pkgs/applications/audio/gst123/default.nix b/pkgs/applications/audio/gst123/default.nix index 65d925342be2..d988983dcae5 100644 --- a/pkgs/applications/audio/gst123/default.nix +++ b/pkgs/applications/audio/gst123/default.nix @@ -41,7 +41,7 @@ stdenv.mkDerivation (finalAttrs: { enableParallelBuilding = true; meta = { - broken = stdenv.isDarwin; + broken = stdenv.hostPlatform.isDarwin; description = "GStreamer based command line media player"; homepage = "https://space.twc.de/~stefan/gst123.php"; license = lib.licenses.lgpl2Plus; diff --git a/pkgs/applications/audio/hivelytracker/default.nix b/pkgs/applications/audio/hivelytracker/default.nix index 8ad62eb81a5a..49cd0a78ed75 100644 --- a/pkgs/applications/audio/hivelytracker/default.nix +++ b/pkgs/applications/audio/hivelytracker/default.nix @@ -66,6 +66,6 @@ stdenv.mkDerivation (finalAttrs: { platforms = platforms.all; mainProgram = "hivelytracker"; maintainers = with maintainers; [ fgaz ]; - broken = stdenv.isDarwin; # TODO: try to use xcbuild + broken = stdenv.hostPlatform.isDarwin; # TODO: try to use xcbuild }; }) diff --git a/pkgs/applications/audio/jamesdsp/default.nix b/pkgs/applications/audio/jamesdsp/default.nix index 11fb94dc0815..20c40d5d9d9b 100644 --- a/pkgs/applications/audio/jamesdsp/default.nix +++ b/pkgs/applications/audio/jamesdsp/default.nix @@ -80,7 +80,7 @@ stdenv.mkDerivation (finalAttrs: { ''; meta = { - broken = (stdenv.isLinux && stdenv.isAarch64); + broken = (stdenv.hostPlatform.isLinux && stdenv.hostPlatform.isAarch64); description = "Audio effect processor for PipeWire clients"; mainProgram = "jamesdsp"; homepage = "https://github.com/Audio4Linux/JDSP4Linux"; diff --git a/pkgs/applications/audio/jellycli/default.nix b/pkgs/applications/audio/jellycli/default.nix index ddaa6721dfb7..15d69211e1ef 100644 --- a/pkgs/applications/audio/jellycli/default.nix +++ b/pkgs/applications/audio/jellycli/default.nix @@ -21,7 +21,7 @@ buildGoModule rec { buildInputs = [ alsa-lib ]; meta = with lib; { - broken = (stdenv.isLinux && stdenv.isAarch64); + broken = (stdenv.hostPlatform.isLinux && stdenv.hostPlatform.isAarch64); description = "Jellyfin terminal client"; longDescription = '' Terminal music player, works with Jellyfin (>= 10.6) , Emby (>= 4.4), and diff --git a/pkgs/applications/audio/librespot/default.nix b/pkgs/applications/audio/librespot/default.nix index 46ece80638f6..c6c274f60da1 100644 --- a/pkgs/applications/audio/librespot/default.nix +++ b/pkgs/applications/audio/librespot/default.nix @@ -5,7 +5,7 @@ , pkg-config , stdenv , openssl -, withALSA ? stdenv.isLinux +, withALSA ? stdenv.hostPlatform.isLinux , alsa-lib , alsa-plugins , withPortAudio ? false @@ -28,7 +28,7 @@ rustPlatform.buildRustPackage rec { cargoHash = "sha256-tbDlWP0sUIa0W9HhdYNOvo9cGeqFemclhA7quh7f/Rw="; - nativeBuildInputs = [ pkg-config makeWrapper ] ++ lib.optionals stdenv.isDarwin [ + nativeBuildInputs = [ pkg-config makeWrapper ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ rustPlatform.bindgenHook ]; diff --git a/pkgs/applications/audio/listenbrainz-mpd/default.nix b/pkgs/applications/audio/listenbrainz-mpd/default.nix index 0c7ea944a8bf..900839081e71 100644 --- a/pkgs/applications/audio/listenbrainz-mpd/default.nix +++ b/pkgs/applications/audio/listenbrainz-mpd/default.nix @@ -28,7 +28,7 @@ rustPlatform.buildRustPackage rec { nativeBuildInputs = [ pkg-config installShellFiles asciidoctor ]; - buildInputs = [ sqlite ] ++ (if stdenv.isDarwin then [ + buildInputs = [ sqlite ] ++ (if stdenv.hostPlatform.isDarwin then [ libiconv Security SystemConfiguration @@ -39,7 +39,7 @@ rustPlatform.buildRustPackage rec { buildFeatures = [ "shell_completion" - ] ++ lib.optionals stdenv.isLinux [ + ] ++ lib.optionals stdenv.hostPlatform.isLinux [ "systemd" ]; diff --git a/pkgs/applications/audio/littlegptracker/default.nix b/pkgs/applications/audio/littlegptracker/default.nix index fad1d3f15cac..754bf7865f77 100644 --- a/pkgs/applications/audio/littlegptracker/default.nix +++ b/pkgs/applications/audio/littlegptracker/default.nix @@ -20,8 +20,8 @@ stdenv.mkDerivation { buildInputs = [ SDL ] - ++ lib.optional stdenv.isDarwin Foundation - ++ lib.optional stdenv.isLinux jack2; + ++ lib.optional stdenv.hostPlatform.isDarwin Foundation + ++ lib.optional stdenv.hostPlatform.isLinux jack2; patches = [ # Remove outdated (pre-64bit) checks that would fail on modern platforms @@ -32,15 +32,15 @@ stdenv.mkDerivation { preBuild = "cd projects"; makeFlags = [ "CXX=${stdenv.cc.targetPrefix}c++" ] - ++ lib.optionals stdenv.isLinux [ "PLATFORM=DEB" ] - ++ lib.optionals stdenv.isDarwin [ "PLATFORM=OSX" ]; + ++ lib.optionals stdenv.hostPlatform.isLinux [ "PLATFORM=DEB" ] + ++ lib.optionals stdenv.hostPlatform.isDarwin [ "PLATFORM=OSX" ]; env.NIX_CFLAGS_COMPILE = toString ([ "-fpermissive" ] ++ lib.optional stdenv.hostPlatform.isAarch64 "-Wno-error=narrowing"); - NIX_LDFLAGS = lib.optional stdenv.isDarwin "-framework Foundation"; + NIX_LDFLAGS = lib.optional stdenv.hostPlatform.isDarwin "-framework Foundation"; - installPhase = let extension = if stdenv.isDarwin then "app" else "deb-exe"; + installPhase = let extension = if stdenv.hostPlatform.isDarwin then "app" else "deb-exe"; in "install -Dm555 lgpt.${extension} $out/bin/lgpt"; passthru.updateScript = unstableGitUpdater { @@ -69,7 +69,7 @@ stdenv.mkDerivation { maintainers = with maintainers; [ fgaz ]; platforms = platforms.all; # https://github.com/NixOS/nixpkgs/pull/91766#issuecomment-688751821 - broken = stdenv.isDarwin; + broken = stdenv.hostPlatform.isDarwin; mainProgram = "lgpt"; }; } diff --git a/pkgs/applications/audio/master_me/default.nix b/pkgs/applications/audio/master_me/default.nix index 6ed4a2efef60..4d8a35588e7e 100644 --- a/pkgs/applications/audio/master_me/default.nix +++ b/pkgs/applications/audio/master_me/default.nix @@ -23,8 +23,8 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ pkg-config ]; buildInputs = [ libGL python3 ] - ++ lib.optionals stdenv.isDarwin [ Cocoa ] - ++ lib.optionals stdenv.isLinux [ libX11 libXext libXrandr ]; + ++ lib.optionals stdenv.hostPlatform.isDarwin [ Cocoa ] + ++ lib.optionals stdenv.hostPlatform.isLinux [ libX11 libXext libXrandr ]; enableParallelBuilding = true; @@ -39,7 +39,7 @@ stdenv.mkDerivation rec { description = "automatic mastering plugin for live streaming, podcasts and internet radio"; maintainers = with maintainers; [ magnetophon ]; platforms = platforms.all; - broken = stdenv.isDarwin; # error: no type or protocol named 'NSPasteboardType' + broken = stdenv.hostPlatform.isDarwin; # error: no type or protocol named 'NSPasteboardType' license = licenses.gpl3Plus; mainProgram = "master_me"; }; diff --git a/pkgs/applications/audio/mellowplayer/default.nix b/pkgs/applications/audio/mellowplayer/default.nix index 9551e0dda3b2..2bffd43b7b95 100644 --- a/pkgs/applications/audio/mellowplayer/default.nix +++ b/pkgs/applications/audio/mellowplayer/default.nix @@ -62,7 +62,7 @@ mkDerivation rec { meta = with lib; { inherit (qtbase.meta) platforms; - broken = stdenv.isDarwin; # test build fails, but the project is not maintained anymore + broken = stdenv.hostPlatform.isDarwin; # test build fails, but the project is not maintained anymore description = "Cloud music integration for your desktop"; mainProgram = "MellowPlayer"; diff --git a/pkgs/applications/audio/midivisualizer/default.nix b/pkgs/applications/audio/midivisualizer/default.nix index 10a2a5de6a09..54f13d3e628a 100644 --- a/pkgs/applications/audio/midivisualizer/default.nix +++ b/pkgs/applications/audio/midivisualizer/default.nix @@ -36,13 +36,13 @@ stdenv.mkDerivation (finalAttrs: { buildInputs = [ glfw ffmpeg-full - ] ++ lib.optionals stdenv.isLinux [ + ] ++ lib.optionals stdenv.hostPlatform.isLinux [ libX11 libXrandr libXinerama libXcursor gtk3 - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ AppKit Carbon Cocoa @@ -52,7 +52,7 @@ stdenv.mkDerivation (finalAttrs: { Kernel ]; - installPhase = if stdenv.isDarwin then '' + installPhase = if stdenv.hostPlatform.isDarwin then '' mkdir -p $out/Applications $out/bin cp -r MIDIVisualizer.app $out/Applications/ ln -s ../Applications/MIDIVisualizer.app/Contents/MacOS/MIDIVisualizer $out/bin/ diff --git a/pkgs/applications/audio/miniaudicle/default.nix b/pkgs/applications/audio/miniaudicle/default.nix index f3cd335b47be..25ab4f7c6b71 100644 --- a/pkgs/applications/audio/miniaudicle/default.nix +++ b/pkgs/applications/audio/miniaudicle/default.nix @@ -59,6 +59,6 @@ stdenv.mkDerivation (finalAttrs: { license = licenses.gpl2Plus; maintainers = with maintainers; [ fgaz ]; platforms = platforms.all; - broken = stdenv.isDarwin; # not attempted + broken = stdenv.hostPlatform.isDarwin; # not attempted }; }) diff --git a/pkgs/applications/audio/minidsp/default.nix b/pkgs/applications/audio/minidsp/default.nix index 1ba98f003481..6691d3e9507e 100644 --- a/pkgs/applications/audio/minidsp/default.nix +++ b/pkgs/applications/audio/minidsp/default.nix @@ -25,10 +25,10 @@ rustPlatform.buildRustPackage rec { cargoBuildFlags = ["-p minidsp -p minidsp-daemon"]; buildInputs = - lib.optionals stdenv.isLinux [libusb1] - ++ lib.optionals stdenv.isDarwin [AppKit IOKit]; + lib.optionals stdenv.hostPlatform.isLinux [libusb1] + ++ lib.optionals stdenv.hostPlatform.isDarwin [AppKit IOKit]; - nativeBuildInputs = lib.optionals stdenv.isLinux [pkg-config]; + nativeBuildInputs = lib.optionals stdenv.hostPlatform.isLinux [pkg-config]; meta = with lib; { description = "Control interface for some MiniDSP products"; diff --git a/pkgs/applications/audio/mixxx/default.nix b/pkgs/applications/audio/mixxx/default.nix index 8ef52e90f790..90bc03610318 100644 --- a/pkgs/applications/audio/mixxx/default.nix +++ b/pkgs/applications/audio/mixxx/default.nix @@ -132,7 +132,7 @@ mkDerivation rec { "-DINSTALL_USER_UDEV_RULES=OFF" ]; - postInstall = lib.optionalString stdenv.isLinux '' + postInstall = lib.optionalString stdenv.hostPlatform.isLinux '' rules="$src/res/linux/mixxx-usb-uaccess.rules" if [ ! -f "$rules" ]; then echo "$rules is missing, must update the Nix file." diff --git a/pkgs/applications/audio/moc/default.nix b/pkgs/applications/audio/moc/default.nix index a7ad6590aa6b..6039654d76dc 100644 --- a/pkgs/applications/audio/moc/default.nix +++ b/pkgs/applications/audio/moc/default.nix @@ -3,7 +3,7 @@ , ncurses, db , popt, libtool , libiconv, CoreServices # Sound sub-systems -, alsaSupport ? (!stdenv.isDarwin), alsa-lib +, alsaSupport ? (!stdenv.hostPlatform.isDarwin), alsa-lib , pulseSupport ? true, libpulseaudio , jackSupport ? true, libjack2 , ossSupport ? true @@ -80,7 +80,7 @@ stdenv.mkDerivation { # Misc ++ lib.optional curlSupport curl ++ lib.optional samplerateSupport libsamplerate - ++ lib.optionals stdenv.isDarwin [ libiconv CoreServices ]; + ++ lib.optionals stdenv.hostPlatform.isDarwin [ libiconv CoreServices ]; configureFlags = [ # Sound sub-systems diff --git a/pkgs/applications/audio/mopidy/mopidy.nix b/pkgs/applications/audio/mopidy/mopidy.nix index ef604a6b4150..12eab45c52a2 100644 --- a/pkgs/applications/audio/mopidy/mopidy.nix +++ b/pkgs/applications/audio/mopidy/mopidy.nix @@ -33,7 +33,7 @@ pythonPackages.buildPythonApplication rec { requests setuptools tornado - ] ++ lib.optional (!stdenv.isDarwin) dbus-python + ] ++ lib.optional (!stdenv.hostPlatform.isDarwin) dbus-python ); propagatedNativeBuildInputs = [ diff --git a/pkgs/applications/audio/mp3blaster/default.nix b/pkgs/applications/audio/mp3blaster/default.nix index 1faeddb4d8e0..02711ab4e131 100644 --- a/pkgs/applications/audio/mp3blaster/default.nix +++ b/pkgs/applications/audio/mp3blaster/default.nix @@ -24,7 +24,7 @@ stdenv.mkDerivation rec { buildInputs = [ ncurses libvorbis - ] ++ lib.optional stdenv.isDarwin SDL; + ] ++ lib.optional stdenv.hostPlatform.isDarwin SDL; env.NIX_CFLAGS_COMPILE = toString ([ "-Wno-narrowing" diff --git a/pkgs/applications/audio/mpc/default.nix b/pkgs/applications/audio/mpc/default.nix index b0dcbfa18c59..c58c6831edf4 100644 --- a/pkgs/applications/audio/mpc/default.nix +++ b/pkgs/applications/audio/mpc/default.nix @@ -33,7 +33,7 @@ stdenv.mkDerivation rec { buildInputs = [ libmpdclient ] - ++ lib.optionals stdenv.isDarwin [ libiconv ]; + ++ lib.optionals stdenv.hostPlatform.isDarwin [ libiconv ]; nativeBuildInputs = [ installShellFiles diff --git a/pkgs/applications/audio/musescore/default.nix b/pkgs/applications/audio/musescore/default.nix index f7f44b690242..6f28bf98a1b1 100644 --- a/pkgs/applications/audio/musescore/default.nix +++ b/pkgs/applications/audio/musescore/default.nix @@ -35,10 +35,10 @@ }: let - stdenv' = if stdenv.isDarwin then darwin.apple_sdk_11_0.stdenv else stdenv; + stdenv' = if stdenv.hostPlatform.isDarwin then darwin.apple_sdk_11_0.stdenv else stdenv; # portaudio propagates Darwin frameworks. Rebuild it using the 11.0 stdenv # from Qt and the 11.0 SDK frameworks. - portaudio' = if stdenv.isDarwin then portaudio.override { + portaudio' = if stdenv.hostPlatform.isDarwin then portaudio.override { stdenv = stdenv'; inherit (darwin.apple_sdk_11_0.frameworks) AudioUnit @@ -94,10 +94,10 @@ in stdenv'.mkDerivation (finalAttrs: { qtWrapperArgs = [ # MuseScore JACK backend loads libjack at runtime. - "--prefix ${lib.optionalString stdenv.isDarwin "DY"}LD_LIBRARY_PATH : ${lib.makeLibraryPath [ libjack2 ]}" - ] ++ lib.optionals (stdenv.isLinux) [ + "--prefix ${lib.optionalString stdenv.hostPlatform.isDarwin "DY"}LD_LIBRARY_PATH : ${lib.makeLibraryPath [ libjack2 ]}" + ] ++ lib.optionals (stdenv.hostPlatform.isLinux) [ "--set ALSA_PLUGIN_DIR ${alsa-plugins}/lib/alsa-lib" - ] ++ lib.optionals (!stdenv.isDarwin) [ + ] ++ lib.optionals (!stdenv.hostPlatform.isDarwin) [ # There are some issues with using the wayland backend, see: # https://musescore.org/en/node/321936 "--set-default QT_QPA_PLATFORM xcb" @@ -115,7 +115,7 @@ in stdenv'.mkDerivation (finalAttrs: { qttools pkg-config ninja - ] ++ lib.optionals stdenv.isLinux [ + ] ++ lib.optionals stdenv.hostPlatform.isLinux [ # Since https://github.com/musescore/MuseScore/pull/13847/commits/685ac998 # GTK3 is needed for file dialogs. Fixes crash with No GSettings schemas error. wrapGAppsHook3 @@ -141,17 +141,17 @@ in stdenv'.mkDerivation (finalAttrs: { qtsvg qtscxml qtnetworkauth - ] ++ lib.optionals stdenv.isLinux [ + ] ++ lib.optionals stdenv.hostPlatform.isLinux [ alsa-lib qtwayland - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk_11_0.frameworks.Cocoa ]; postInstall = '' # Remove unneeded bundled libraries and headers rm -r $out/{include,lib} - '' + lib.optionalString stdenv.isDarwin '' + '' + lib.optionalString stdenv.hostPlatform.isDarwin '' mkdir -p "$out/Applications" mv "$out/mscore.app" "$out/Applications/mscore.app" mkdir -p $out/bin @@ -174,8 +174,8 @@ in stdenv'.mkDerivation (finalAttrs: { # so we disable it and explicitly use makeQtWrapper. # # TODO: check if something like this is also needed for macOS. - dontWrapQtApps = stdenv.isLinux; - postFixup = lib.optionalString stdenv.isLinux '' + dontWrapQtApps = stdenv.hostPlatform.isLinux; + postFixup = lib.optionalString stdenv.hostPlatform.isLinux '' mkdir -p $out/libexec mv $out/bin/mscore $out/libexec makeQtWrapper $out/libexec/mscore $out/bin/mscore diff --git a/pkgs/applications/audio/muso/default.nix b/pkgs/applications/audio/muso/default.nix index ba235b5157a5..97d897d5fcb3 100644 --- a/pkgs/applications/audio/muso/default.nix +++ b/pkgs/applications/audio/muso/default.nix @@ -14,7 +14,7 @@ rustPlatform.buildRustPackage rec { }; nativeBuildInputs = [ pkg-config wrapGAppsHook3 ]; - buildInputs = lib.optional stdenv.isDarwin CoreServices; + buildInputs = lib.optional stdenv.hostPlatform.isDarwin CoreServices; preConfigure = '' substituteInPlace lib/utils.rs \ @@ -29,7 +29,7 @@ rustPlatform.buildRustPackage rec { cargoHash = "sha256-+UVUejKCfjC6zdW315wmu7f3A5GmnoQ3rIk8SK6LIRI="; meta = with lib; { - broken = stdenv.isDarwin; + broken = stdenv.hostPlatform.isDarwin; description = "Automatic music sorter (based on ID3 tags)"; mainProgram = "muso"; homepage = "https://github.com/quebin31/muso"; diff --git a/pkgs/applications/audio/ncspot/default.nix b/pkgs/applications/audio/ncspot/default.nix index 4053a1a88f6b..d2d428963bad 100644 --- a/pkgs/applications/audio/ncspot/default.nix +++ b/pkgs/applications/audio/ncspot/default.nix @@ -35,16 +35,16 @@ rustPlatform.buildRustPackage rec { ++ lib.optional withClipboard python3; buildInputs = [ ncurses ] - ++ lib.optional stdenv.isLinux openssl + ++ lib.optional stdenv.hostPlatform.isLinux openssl ++ lib.optional withALSA alsa-lib ++ lib.optional withClipboard libxcb ++ lib.optional withCover ueberzug ++ lib.optional withPulseAudio libpulseaudio ++ lib.optional withPortAudio portaudio ++ lib.optional (withMPRIS || withNotify) dbus - ++ lib.optional stdenv.isDarwin Cocoa; + ++ lib.optional stdenv.hostPlatform.isDarwin Cocoa; - env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.isDarwin "-DNCURSES_UNCTRL_H_incl"; + env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.hostPlatform.isDarwin "-DNCURSES_UNCTRL_H_incl"; buildNoDefaultFeatures = true; diff --git a/pkgs/applications/audio/open-music-kontrollers/generic.nix b/pkgs/applications/audio/open-music-kontrollers/generic.nix index 5c48f08dcd7c..4c4211e49f0a 100644 --- a/pkgs/applications/audio/open-music-kontrollers/generic.nix +++ b/pkgs/applications/audio/open-music-kontrollers/generic.nix @@ -28,7 +28,7 @@ stdenv.mkDerivation { ] ++ additionalBuildInputs; meta = with lib; { - broken = stdenv.isDarwin; + broken = stdenv.hostPlatform.isDarwin; description = description; homepage = "https://open-music-kontrollers.ch/lv2/${pname}:"; license = licenses.artistic2; diff --git a/pkgs/applications/audio/openutau/default.nix b/pkgs/applications/audio/openutau/default.nix index d0e840b1516f..df53f4a49644 100644 --- a/pkgs/applications/audio/openutau/default.nix +++ b/pkgs/applications/audio/openutau/default.nix @@ -39,7 +39,7 @@ buildDotnetModule rec { dotnetInstallFlags = [ "-p:PublishReadyToRun=false" ]; # socket cannot bind to localhost on darwin for tests - doCheck = !stdenv.isDarwin; + doCheck = !stdenv.hostPlatform.isDarwin; # net7.0 replacement needed until upstream bumps to dotnet 7 postPatch = '' @@ -54,9 +54,9 @@ buildDotnetModule rec { # need to make sure proprietary worldline resampler is copied postInstall = let - runtime = if (stdenv.isLinux && stdenv.isx86_64) then "linux-x64" - else if (stdenv.isLinux && stdenv.isAarch64) then "linux-arm64" - else if stdenv.isDarwin then "osx" + runtime = if (stdenv.hostPlatform.isLinux && stdenv.hostPlatform.isx86_64) then "linux-x64" + else if (stdenv.hostPlatform.isLinux && stdenv.hostPlatform.isAarch64) then "linux-arm64" + else if stdenv.hostPlatform.isDarwin then "osx" else null; in lib.optionalString (runtime != null) '' cp runtimes/${runtime}/native/libworldline${stdenv.hostPlatform.extensions.sharedLibrary} $out/lib/OpenUtau/ diff --git a/pkgs/applications/audio/opustags/default.nix b/pkgs/applications/audio/opustags/default.nix index 9bafacc2e30e..9f306a3de1b4 100644 --- a/pkgs/applications/audio/opustags/default.nix +++ b/pkgs/applications/audio/opustags/default.nix @@ -14,7 +14,7 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ cmake pkg-config ] - ++ lib.optionals stdenv.isDarwin [ libiconv ]; + ++ lib.optionals stdenv.hostPlatform.isDarwin [ libiconv ]; buildInputs = [ libogg ]; @@ -33,7 +33,7 @@ stdenv.mkDerivation rec { homepage = "https://github.com/fmang/opustags"; description = "Ogg Opus tags editor"; platforms = platforms.all; - broken = stdenv.isDarwin; + broken = stdenv.hostPlatform.isDarwin; maintainers = with maintainers; [ kmein ]; license = licenses.bsd3; mainProgram = "opustags"; diff --git a/pkgs/applications/audio/parrot/default.nix b/pkgs/applications/audio/parrot/default.nix index a0b2972ca037..d7da9213bce8 100644 --- a/pkgs/applications/audio/parrot/default.nix +++ b/pkgs/applications/audio/parrot/default.nix @@ -28,7 +28,7 @@ rustPlatform.buildRustPackage { nativeBuildInputs = [ cmake makeBinaryWrapper pkg-config ]; buildInputs = [ libopus openssl ] - ++ lib.optionals stdenv.isDarwin [ Security ]; + ++ lib.optionals stdenv.hostPlatform.isDarwin [ Security ]; postInstall = '' wrapProgram $out/bin/parrot \ diff --git a/pkgs/applications/audio/pd-plugins/helmholtz/default.nix b/pkgs/applications/audio/pd-plugins/helmholtz/default.nix index 50455328f3a4..a82007c375bd 100644 --- a/pkgs/applications/audio/pd-plugins/helmholtz/default.nix +++ b/pkgs/applications/audio/pd-plugins/helmholtz/default.nix @@ -38,7 +38,7 @@ stdenv.mkDerivation { ''; meta = { - broken = (stdenv.isLinux && stdenv.isAarch64); + broken = (stdenv.hostPlatform.isLinux && stdenv.hostPlatform.isAarch64); description = "Time domain pitch tracker for Pure Data"; homepage = "http://www.katjaas.nl/helmholtz/helmholtz.html"; license = lib.licenses.bsd3; diff --git a/pkgs/applications/audio/pithos/default.nix b/pkgs/applications/audio/pithos/default.nix index dbcc99d7de56..a9ea4096859c 100644 --- a/pkgs/applications/audio/pithos/default.nix +++ b/pkgs/applications/audio/pithos/default.nix @@ -30,7 +30,7 @@ pythonPackages.buildPythonApplication rec { (with pythonPackages; [ pygobject3 pylast ]); meta = with lib; { - broken = stdenv.isDarwin; + broken = stdenv.hostPlatform.isDarwin; description = "Pandora Internet Radio player for GNOME"; mainProgram = "pithos"; homepage = "https://pithos.github.io/"; diff --git a/pkgs/applications/audio/plugin-torture/default.nix b/pkgs/applications/audio/plugin-torture/default.nix index b3f671adc4b2..4b5f0c4acd2f 100644 --- a/pkgs/applications/audio/plugin-torture/default.nix +++ b/pkgs/applications/audio/plugin-torture/default.nix @@ -21,7 +21,7 @@ stdenv.mkDerivation { ''; meta = with lib; { - broken = (stdenv.isLinux && stdenv.isAarch64); + broken = (stdenv.hostPlatform.isLinux && stdenv.hostPlatform.isAarch64); homepage = "https://github.com/cth103/plugin-torture"; description = "Tool to test LADSPA and LV2 plugins"; license = licenses.gpl2; diff --git a/pkgs/applications/audio/polyphone/default.nix b/pkgs/applications/audio/polyphone/default.nix index 11feb31ff1c9..2a38222949f6 100644 --- a/pkgs/applications/audio/polyphone/default.nix +++ b/pkgs/applications/audio/polyphone/default.nix @@ -60,7 +60,7 @@ stdenv.mkDerivation rec { ]; meta = with lib; { - broken = (stdenv.isLinux && stdenv.isAarch64); + broken = (stdenv.hostPlatform.isLinux && stdenv.hostPlatform.isAarch64); description = "Soundfont editor for creating musical instruments"; mainProgram = "polyphone"; homepage = "https://www.polyphone-soundfonts.com/"; diff --git a/pkgs/applications/audio/pt2-clone/default.nix b/pkgs/applications/audio/pt2-clone/default.nix index d00a0e841ba6..0cbb64e6dcad 100644 --- a/pkgs/applications/audio/pt2-clone/default.nix +++ b/pkgs/applications/audio/pt2-clone/default.nix @@ -18,7 +18,7 @@ stdenv.mkDerivation (finalAttrs: { }; nativeBuildInputs = [ cmake ]; - buildInputs = [ SDL2 ] ++ lib.optional stdenv.isLinux alsa-lib; + buildInputs = [ SDL2 ] ++ lib.optional stdenv.hostPlatform.isLinux alsa-lib; postInstall = '' install -Dm444 "$src/release/other/Freedesktop.org Resources/ProTracker 2 clone.desktop" \ diff --git a/pkgs/applications/audio/puredata/default.nix b/pkgs/applications/audio/puredata/default.nix index a335dabf4abc..5d1b11c4ef29 100644 --- a/pkgs/applications/audio/puredata/default.nix +++ b/pkgs/applications/audio/puredata/default.nix @@ -25,9 +25,9 @@ stdenv.mkDerivation rec { buildInputs = [ fftw libjack2 - ] ++ lib.optionals stdenv.isLinux [ + ] ++ lib.optionals stdenv.hostPlatform.isLinux [ alsa-lib - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ portaudio ]; @@ -35,9 +35,9 @@ stdenv.mkDerivation rec { "--enable-universal" "--enable-fftw" "--enable-jack" - ] ++ lib.optionals stdenv.isLinux [ + ] ++ lib.optionals stdenv.hostPlatform.isLinux [ "--enable-alsa" - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ "--enable-portaudio" "--without-local-portaudio" "--disable-jack-framework" diff --git a/pkgs/applications/audio/quadrafuzz/default.nix b/pkgs/applications/audio/quadrafuzz/default.nix index 4f0ea946832e..e2156b391007 100644 --- a/pkgs/applications/audio/quadrafuzz/default.nix +++ b/pkgs/applications/audio/quadrafuzz/default.nix @@ -34,7 +34,7 @@ stdenv.mkDerivation rec { ''; meta = with lib; { - broken = (stdenv.isLinux && stdenv.isAarch64); + broken = (stdenv.hostPlatform.isLinux && stdenv.hostPlatform.isAarch64); homepage = "https://github.com/jpcima/quadrafuzz"; description = "Multi-band fuzz distortion plugin"; maintainers = [ maintainers.magnetophon ]; diff --git a/pkgs/applications/audio/radiotray-ng/default.nix b/pkgs/applications/audio/radiotray-ng/default.nix index ee994b56efb0..6577f33baba0 100644 --- a/pkgs/applications/audio/radiotray-ng/default.nix +++ b/pkgs/applications/audio/radiotray-ng/default.nix @@ -94,7 +94,7 @@ stdenv.mkDerivation rec { env.NIX_CFLAGS_COMPILE = "-Wno-error=deprecated-declarations"; nativeCheckInputs = [ gtest ]; - doCheck = !stdenv.isAarch64; # single failure that I can't explain + doCheck = !stdenv.hostPlatform.isAarch64; # single failure that I can't explain preFixup = '' gappsWrapperArgs+=(--suffix PATH : ${lib.makeBinPath [ dbus ]}) diff --git a/pkgs/applications/audio/reaper/default.nix b/pkgs/applications/audio/reaper/default.nix index da26c1570567..ff8d32b90780 100644 --- a/pkgs/applications/audio/reaper/default.nix +++ b/pkgs/applications/audio/reaper/default.nix @@ -15,14 +15,14 @@ , xdotool , which -, jackSupport ? stdenv.isLinux +, jackSupport ? stdenv.hostPlatform.isLinux , jackLibrary -, pulseaudioSupport ? config.pulseaudio or stdenv.isLinux +, pulseaudioSupport ? config.pulseaudio or stdenv.hostPlatform.isLinux , libpulseaudio }: let - url_for_platform = version: arch: if stdenv.isDarwin + url_for_platform = version: arch: if stdenv.hostPlatform.isDarwin then "https://www.reaper.fm/files/${lib.versions.major version}.x/reaper${builtins.replaceStrings ["."] [""] version}_universal.dmg" else "https://www.reaper.fm/files/${lib.versions.major version}.x/reaper${builtins.replaceStrings ["."] [""] version}_linux_${arch}.tar.xz"; in @@ -32,7 +32,7 @@ stdenv.mkDerivation rec { src = fetchurl { url = url_for_platform version stdenv.hostPlatform.qemuArch; - hash = if stdenv.isDarwin then "sha256-dIRZCUIfqnGTxBaLzczwzD6hA/PyAxPqfa+FfCRKdu0=" else { + hash = if stdenv.hostPlatform.isDarwin then "sha256-dIRZCUIfqnGTxBaLzczwzD6hA/PyAxPqfa+FfCRKdu0=" else { x86_64-linux = "sha256-aa2KcL8yZYG+Dki7J6U473E2BQgdACAIzRLtD9zuHV0="; aarch64-linux = "sha256-NECEEUKtTQajl0MZK8/NsbhcuyihHOo0Q5Y5UpAAgrM="; }.${stdenv.hostPlatform.system}; @@ -40,24 +40,24 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ makeWrapper - ] ++ lib.optionals stdenv.isLinux [ + ] ++ lib.optionals stdenv.hostPlatform.isLinux [ which autoPatchelfHook xdg-utils # Required for desktop integration - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ undmg ]; - sourceRoot = lib.optionalString stdenv.isDarwin "Reaper.app"; + sourceRoot = lib.optionalString stdenv.hostPlatform.isDarwin "Reaper.app"; buildInputs = [ stdenv.cc.cc.lib # reaper and libSwell need libstdc++.so.6 - ] ++ lib.optionals stdenv.isLinux [ + ] ++ lib.optionals stdenv.hostPlatform.isLinux [ gtk3 alsa-lib ]; - runtimeDependencies = lib.optionals stdenv.isLinux [ + runtimeDependencies = lib.optionals stdenv.hostPlatform.isLinux [ gtk3 # libSwell needs libgdk-3.so.0 ] ++ lib.optional jackSupport jackLibrary @@ -65,7 +65,7 @@ stdenv.mkDerivation rec { dontBuild = true; - installPhase = if stdenv.isDarwin then '' + installPhase = if stdenv.hostPlatform.isDarwin then '' runHook preInstall mkdir -p "$out/Applications/Reaper.app" cp -r * "$out/Applications/Reaper.app/" diff --git a/pkgs/applications/audio/rkrlv2/default.nix b/pkgs/applications/audio/rkrlv2/default.nix index 19fca6af988d..fa62fcfa47ac 100644 --- a/pkgs/applications/audio/rkrlv2/default.nix +++ b/pkgs/applications/audio/rkrlv2/default.nix @@ -21,6 +21,6 @@ stdenv.mkDerivation rec { license = licenses.gpl2Only; maintainers = [ maintainers.joelmo ]; platforms = platforms.unix; - broken = stdenv.isAarch64; # g++: error: unrecognized command line option '-mfpmath=sse' + broken = stdenv.hostPlatform.isAarch64; # g++: error: unrecognized command line option '-mfpmath=sse' }; } diff --git a/pkgs/applications/audio/schismtracker/default.nix b/pkgs/applications/audio/schismtracker/default.nix index bc6a406ba2f5..6147973f1493 100644 --- a/pkgs/applications/audio/schismtracker/default.nix +++ b/pkgs/applications/audio/schismtracker/default.nix @@ -21,18 +21,18 @@ stdenv.mkDerivation rec { }; configureFlags = [ "--enable-dependency-tracking" ] - ++ lib.optional stdenv.isDarwin "--disable-sdltest"; + ++ lib.optional stdenv.hostPlatform.isDarwin "--disable-sdltest"; nativeBuildInputs = [ autoreconfHook python3 ]; buildInputs = [ SDL2 ] - ++ lib.optionals stdenv.isLinux [ alsa-lib libXext ] - ++ lib.optionals stdenv.isDarwin [ Cocoa ]; + ++ lib.optionals stdenv.hostPlatform.isLinux [ alsa-lib libXext ] + ++ lib.optionals stdenv.hostPlatform.isDarwin [ Cocoa ]; enableParallelBuilding = true; # Our Darwin SDL2 doesn't have a SDL2main to link against - preConfigure = lib.optionalString stdenv.isDarwin '' + preConfigure = lib.optionalString stdenv.hostPlatform.isDarwin '' substituteInPlace configure.ac \ --replace '-lSDL2main' '-lSDL2' ''; diff --git a/pkgs/applications/audio/scream/default.nix b/pkgs/applications/audio/scream/default.nix index 3c0b83d46c19..cc09b2187535 100644 --- a/pkgs/applications/audio/scream/default.nix +++ b/pkgs/applications/audio/scream/default.nix @@ -1,6 +1,6 @@ { stdenv, lib, config, fetchFromGitHub, cmake, pkg-config -, alsaSupport ? stdenv.isLinux, alsa-lib -, pulseSupport ? config.pulseaudio or stdenv.isLinux, libpulseaudio +, alsaSupport ? stdenv.hostPlatform.isLinux, alsa-lib +, pulseSupport ? config.pulseaudio or stdenv.hostPlatform.isLinux, libpulseaudio , jackSupport ? false, libjack2, soxr , pcapSupport ? false, libpcap }: diff --git a/pkgs/applications/audio/sfxr/default.nix b/pkgs/applications/audio/sfxr/default.nix index d3314facb692..03813ff35248 100644 --- a/pkgs/applications/audio/sfxr/default.nix +++ b/pkgs/applications/audio/sfxr/default.nix @@ -55,7 +55,7 @@ stdenv.mkDerivation (finalAttrs: { makeFlags = [ "DESTDIR=$(out)" ]; meta = with lib; { - broken = stdenv.isDarwin; + broken = stdenv.hostPlatform.isDarwin; homepage = "http://www.drpetter.se/project_sfxr.html"; description = "Videogame sound effect generator"; mainProgram = "sfxr"; diff --git a/pkgs/applications/audio/snapcast/default.nix b/pkgs/applications/audio/snapcast/default.nix index ff58b64cee64..821cda32e977 100644 --- a/pkgs/applications/audio/snapcast/default.nix +++ b/pkgs/applications/audio/snapcast/default.nix @@ -24,10 +24,10 @@ stdenv.mkDerivation rec { asio avahi flac libogg libvorbis libopus aixlog popl soxr ] ++ lib.optional pulseaudioSupport libpulseaudio - ++ lib.optional stdenv.isLinux alsa-lib - ++ lib.optionals stdenv.isDarwin [ IOKit AudioToolbox ]; + ++ lib.optional stdenv.hostPlatform.isLinux alsa-lib + ++ lib.optionals stdenv.hostPlatform.isDarwin [ IOKit AudioToolbox ]; - TARGET=lib.optionalString stdenv.isDarwin "MACOS"; + TARGET=lib.optionalString stdenv.hostPlatform.isDarwin "MACOS"; # Upstream systemd unit files are pretty awful, so we provide our own in a # NixOS module. It might make sense to get that upstreamed... diff --git a/pkgs/applications/audio/snd/default.nix b/pkgs/applications/audio/snd/default.nix index ad935b09ed16..8bb0bf1387e2 100644 --- a/pkgs/applications/audio/snd/default.nix +++ b/pkgs/applications/audio/snd/default.nix @@ -15,8 +15,8 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ pkg-config ]; buildInputs = [ fftw gsl motif ] - ++ lib.optionals stdenv.isLinux [ alsa-lib ] - ++ lib.optionals stdenv.isDarwin [ CoreServices CoreMIDI ] + ++ lib.optionals stdenv.hostPlatform.isLinux [ alsa-lib ] + ++ lib.optionals stdenv.hostPlatform.isDarwin [ CoreServices CoreMIDI ] ++ (with xorg; [ libXext libXft libXpm libXt ]); configureFlags = [ "--with-motif" ]; diff --git a/pkgs/applications/audio/sonobus/default.nix b/pkgs/applications/audio/sonobus/default.nix index fc0c5977360f..d8a69ecd9a0b 100644 --- a/pkgs/applications/audio/sonobus/default.nix +++ b/pkgs/applications/audio/sonobus/default.nix @@ -59,7 +59,7 @@ stdenv.mkDerivation (finalAttrs: { env.NIX_LDFLAGS = lib.optionalString stdenv.hostPlatform.isLinux "-rpath ${lib.makeLibraryPath (finalAttrs.runtimeDependencies)}"; dontPatchELF = true; # needed or nix will try to optimize the binary by removing "useless" rpath - postPatch = lib.optionalString (stdenv.isLinux) '' + postPatch = lib.optionalString (stdenv.hostPlatform.isLinux) '' # needs special setup on Linux, dunno if it can work on Darwin # Also, I get issues with linking without that, not sure why sed -i -e '/juce::juce_recommended_lto_flags/d' CMakeLists.txt @@ -67,7 +67,7 @@ stdenv.mkDerivation (finalAttrs: { ''; # The program does not provide any CMake install instructions - installPhase = lib.optionalString (stdenv.isLinux) '' + installPhase = lib.optionalString (stdenv.hostPlatform.isLinux) '' runHook preInstall cd ../linux ./install.sh "$out" @@ -80,7 +80,7 @@ stdenv.mkDerivation (finalAttrs: { license = with licenses; [ gpl3Plus ]; maintainers = with maintainers; [ PowerUser64 ]; platforms = platforms.unix; - broken = stdenv.isDarwin; + broken = stdenv.hostPlatform.isDarwin; mainProgram = "sonobus"; }; }) diff --git a/pkgs/applications/audio/sorcer/default.nix b/pkgs/applications/audio/sorcer/default.nix index 6c28d540458f..bcca16089a27 100644 --- a/pkgs/applications/audio/sorcer/default.nix +++ b/pkgs/applications/audio/sorcer/default.nix @@ -26,7 +26,7 @@ stdenv.mkDerivation rec { ''; meta = with lib; { - broken = (stdenv.isLinux && stdenv.isAarch64); + broken = (stdenv.hostPlatform.isLinux && stdenv.hostPlatform.isAarch64); homepage = "http://openavproductions.com/sorcer/"; description = "Wavetable LV2 plugin synth, targeted at the electronic / dubstep genre"; license = licenses.gpl3Plus; diff --git a/pkgs/applications/audio/soundtracker/default.nix b/pkgs/applications/audio/soundtracker/default.nix index 02c4813e0370..36f90e67a639 100644 --- a/pkgs/applications/audio/soundtracker/default.nix +++ b/pkgs/applications/audio/soundtracker/default.nix @@ -59,7 +59,7 @@ stdenv.mkDerivation (finalAttrs: { goocanvas libxml2 libsndfile - ] ++ lib.optional stdenv.isLinux alsa-lib; + ] ++ lib.optional stdenv.hostPlatform.isLinux alsa-lib; meta = with lib; { description = "Music tracking tool similar in design to the DOS program FastTracker and the Amiga legend ProTracker"; diff --git a/pkgs/applications/audio/speech-denoiser/default.nix b/pkgs/applications/audio/speech-denoiser/default.nix index 415bf352cae9..a0c3d2d25706 100644 --- a/pkgs/applications/audio/speech-denoiser/default.nix +++ b/pkgs/applications/audio/speech-denoiser/default.nix @@ -35,7 +35,7 @@ stdenv.mkDerivation { ''; meta = with lib; { - broken = (stdenv.isLinux && stdenv.isAarch64); + broken = (stdenv.hostPlatform.isLinux && stdenv.hostPlatform.isAarch64); description = "Speech denoise lv2 plugin based on RNNoise library"; homepage = "https://github.com/lucianodato/speech-denoiser"; license = licenses.lgpl3; diff --git a/pkgs/applications/audio/spotify-player/default.nix b/pkgs/applications/audio/spotify-player/default.nix index dcce24d173ce..a3c51cfaaba2 100644 --- a/pkgs/applications/audio/spotify-player/default.nix +++ b/pkgs/applications/audio/spotify-player/default.nix @@ -49,7 +49,7 @@ rustPlatform.buildRustPackage rec { pkg-config cmake rustPlatform.bindgenHook - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ makeBinaryWrapper ]; @@ -61,14 +61,14 @@ rustPlatform.buildRustPackage rec { ++ lib.optionals withSixel [ libsixel ] ++ lib.optionals (withAudioBackend == "alsa") [ alsa-lib ] ++ lib.optionals (withAudioBackend == "pulseaudio") [ libpulseaudio ] - ++ lib.optionals (withAudioBackend == "rodio" && stdenv.isLinux) [ alsa-lib ] + ++ lib.optionals (withAudioBackend == "rodio" && stdenv.hostPlatform.isLinux) [ alsa-lib ] ++ lib.optionals (withAudioBackend == "portaudio") [ portaudio ] ++ lib.optionals (withAudioBackend == "jackaudio") [ libjack2 ] ++ lib.optionals (withAudioBackend == "rodiojack") [ alsa-lib libjack2 ] ++ lib.optionals (withAudioBackend == "sdl") [ SDL2 ] ++ lib.optionals (withAudioBackend == "gstreamer") [ gst_all_1.gstreamer gst_all_1.gst-devtools gst_all_1.gst-plugins-base gst_all_1.gst-plugins-good ] - ++ lib.optionals (stdenv.isDarwin && withMediaControl) [ darwin.apple_sdk.frameworks.MediaPlayer ] - ++ lib.optionals stdenv.isDarwin (with darwin.apple_sdk.frameworks; [ + ++ lib.optionals (stdenv.hostPlatform.isDarwin && withMediaControl) [ darwin.apple_sdk.frameworks.MediaPlayer ] + ++ lib.optionals stdenv.hostPlatform.isDarwin (with darwin.apple_sdk.frameworks; [ AppKit AudioUnit Cocoa @@ -88,7 +88,7 @@ rustPlatform.buildRustPackage rec { ++ lib.optionals withFuzzy [ "fzf" ]; # sixel-sys is dynamically linked to libsixel - postInstall = lib.optionals (stdenv.isDarwin && withSixel) '' + postInstall = lib.optionals (stdenv.hostPlatform.isDarwin && withSixel) '' wrapProgram $out/bin/spotify_player \ --prefix DYLD_LIBRARY_PATH : "${lib.makeLibraryPath [libsixel]}" ''; diff --git a/pkgs/applications/audio/spotify-qt/default.nix b/pkgs/applications/audio/spotify-qt/default.nix index 0fbf7c943842..cbe252bc2b94 100644 --- a/pkgs/applications/audio/spotify-qt/default.nix +++ b/pkgs/applications/audio/spotify-qt/default.nix @@ -27,7 +27,7 @@ mkDerivation rec { installFlags = [ "DESTDIR=$(out)" ]; - postInstall = lib.optionalString stdenvNoCC.isDarwin '' + postInstall = lib.optionalString stdenvNoCC.hostPlatform.isDarwin '' mkdir -p $out/Applications mv $out/bin/spotify-qt.app $out/Applications ln $out/Applications/spotify-qt.app/Contents/MacOS/spotify-qt $out/bin/spotify-qt diff --git a/pkgs/applications/audio/spotify/darwin.nix b/pkgs/applications/audio/spotify/darwin.nix index 8304bdf3a15d..bc643d4f1b6e 100644 --- a/pkgs/applications/audio/spotify/darwin.nix +++ b/pkgs/applications/audio/spotify/darwin.nix @@ -11,7 +11,7 @@ stdenv.mkDerivation { version = "1.2.40.599.g606b7f29"; - src = if stdenv.isAarch64 then ( + src = if stdenv.hostPlatform.isAarch64 then ( fetchurl { url = "https://web.archive.org/web/20240622065234/https://download.scdn.co/SpotifyARM64.dmg"; hash = "sha256-mmjxKYmsX0rFlIU19JOfPbNgOhlcZs5slLUhDhlON1c="; diff --git a/pkgs/applications/audio/spotify/default.nix b/pkgs/applications/audio/spotify/default.nix index df6d762c65ef..fe49e680908f 100644 --- a/pkgs/applications/audio/spotify/default.nix +++ b/pkgs/applications/audio/spotify/default.nix @@ -18,6 +18,6 @@ let mainProgram = "spotify"; }; -in if stdenv.isDarwin +in if stdenv.hostPlatform.isDarwin then callPackage ./darwin.nix (extraArgs // { inherit pname meta; }) else callPackage ./linux.nix (extraArgs // { inherit pname meta; }) diff --git a/pkgs/applications/audio/stone-phaser/default.nix b/pkgs/applications/audio/stone-phaser/default.nix index 6bef356172cd..f581ae1b1cb6 100644 --- a/pkgs/applications/audio/stone-phaser/default.nix +++ b/pkgs/applications/audio/stone-phaser/default.nix @@ -28,7 +28,7 @@ stdenv.mkDerivation rec { installFlags = [ "PREFIX=$(out)" ]; meta = with lib; { - broken = (stdenv.isLinux && stdenv.isAarch64); + broken = (stdenv.hostPlatform.isLinux && stdenv.hostPlatform.isAarch64); homepage = "https://github.com/jpcima/stone-phaser"; description = "Classic analog phaser effect, made with DPF and Faust"; maintainers = [ maintainers.magnetophon ]; diff --git a/pkgs/applications/audio/strawberry/default.nix b/pkgs/applications/audio/strawberry/default.nix index 9179ecccef07..7fedaf3c2fd8 100644 --- a/pkgs/applications/audio/strawberry/default.nix +++ b/pkgs/applications/audio/strawberry/default.nix @@ -79,7 +79,7 @@ stdenv.mkDerivation rec { taglib qtbase qtx11extras - ] ++ optionals stdenv.isLinux [ + ] ++ optionals stdenv.hostPlatform.isLinux [ libgpod libpulseaudio libselinux @@ -101,7 +101,7 @@ stdenv.mkDerivation rec { pkg-config qttools wrapQtAppsHook - ] ++ optionals stdenv.isLinux [ + ] ++ optionals stdenv.hostPlatform.isLinux [ util-linux ]; diff --git a/pkgs/applications/audio/tauon/default.nix b/pkgs/applications/audio/tauon/default.nix index 12a62f1afc18..3ed875b668ba 100644 --- a/pkgs/applications/audio/tauon/default.nix +++ b/pkgs/applications/audio/tauon/default.nix @@ -112,7 +112,7 @@ stdenv.mkDerivation (finalAttrs: { setproctitle ] ++ lib.optional withDiscordRPC pypresence - ++ lib.optional stdenv.isLinux pulsectl; + ++ lib.optional stdenv.hostPlatform.isLinux pulsectl; makeWrapperArgs = [ "--prefix PATH : ${lib.makeBinPath [ ffmpeg ]}" diff --git a/pkgs/applications/audio/tenacity/default.nix b/pkgs/applications/audio/tenacity/default.nix index 160a032fd648..0ef4ed73787b 100644 --- a/pkgs/applications/audio/tenacity/default.nix +++ b/pkgs/applications/audio/tenacity/default.nix @@ -97,7 +97,7 @@ stdenv.mkDerivation rec { makeWrapper pkg-config python3 - ] ++ lib.optionals stdenv.isLinux [ + ] ++ lib.optionals stdenv.hostPlatform.isLinux [ linuxHeaders ]; @@ -129,7 +129,7 @@ stdenv.mkDerivation rec { twolame wxGTK32 gtk3 - ] ++ lib.optionals stdenv.isLinux [ + ] ++ lib.optionals stdenv.hostPlatform.isLinux [ at-spi2-core dbus libepoxy diff --git a/pkgs/applications/audio/termusic/default.nix b/pkgs/applications/audio/termusic/default.nix index c6048ed1e7fe..c4a42aa3837c 100644 --- a/pkgs/applications/audio/termusic/default.nix +++ b/pkgs/applications/audio/termusic/default.nix @@ -74,7 +74,7 @@ rustPlatform.buildRustPackage rec { mpv-unwrapped openssl sqlite - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ AppKit CoreAudio CoreGraphics @@ -82,7 +82,7 @@ rustPlatform.buildRustPackage rec { IOKit MediaPlayer Security - ] ++ lib.optionals stdenv.isLinux [ + ] ++ lib.optionals stdenv.hostPlatform.isLinux [ alsa-lib ]; diff --git a/pkgs/applications/audio/virtual-ans/default.nix b/pkgs/applications/audio/virtual-ans/default.nix index 4bec1952e03e..22e18502866a 100644 --- a/pkgs/applications/audio/virtual-ans/default.nix +++ b/pkgs/applications/audio/virtual-ans/default.nix @@ -43,13 +43,13 @@ stdenv.mkDerivation rec { ln -s $out/${startScript} $out/bin/virtual-ans ''; - startScript = if stdenv.isx86_32 then "START_LINUX_X86" - else if stdenv.isx86_64 then "START_LINUX_X86_64" - #else if stdenv.isDarwin then "START_MACOS.app" # disabled because I cannot test on Darwin + startScript = if stdenv.hostPlatform.isx86_32 then "START_LINUX_X86" + else if stdenv.hostPlatform.isx86_64 then "START_LINUX_X86_64" + #else if stdenv.hostPlatform.isDarwin then "START_MACOS.app" # disabled because I cannot test on Darwin else abort "Unsupported platform: ${stdenv.hostPlatform.linuxArch}."; - linuxExecutable = if stdenv.isx86_32 then "pixilang_linux_x86" - else if stdenv.isx86_64 then "pixilang_linux_x86_64" + linuxExecutable = if stdenv.hostPlatform.isx86_32 then "pixilang_linux_x86" + else if stdenv.hostPlatform.isx86_64 then "pixilang_linux_x86_64" else ""; meta = with lib; { diff --git a/pkgs/applications/audio/vorbis-tools/default.nix b/pkgs/applications/audio/vorbis-tools/default.nix index 877f670d6861..4325d934e84b 100644 --- a/pkgs/applications/audio/vorbis-tools/default.nix +++ b/pkgs/applications/audio/vorbis-tools/default.nix @@ -22,7 +22,7 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ autoreconfHook pkg-config ]; buildInputs = [ libogg libvorbis libao curl speex flac ] - ++ lib.optionals stdenv.isDarwin [ libiconv ]; + ++ lib.optionals stdenv.hostPlatform.isDarwin [ libiconv ]; meta = with lib; { description = "Extra tools for Ogg-Vorbis audio codec"; diff --git a/pkgs/applications/audio/wavegain/default.nix b/pkgs/applications/audio/wavegain/default.nix index 93dd7bf6fb23..49c66b07a91c 100644 --- a/pkgs/applications/audio/wavegain/default.nix +++ b/pkgs/applications/audio/wavegain/default.nix @@ -28,7 +28,7 @@ stdenv.mkDerivation { ''; meta = { - broken = (stdenv.isLinux && stdenv.isAarch64); + broken = (stdenv.hostPlatform.isLinux && stdenv.hostPlatform.isAarch64); description = "ReplayGain for wave files"; homepage = "https://github.com/MestreLion/wavegain"; license = lib.licenses.lgpl21; diff --git a/pkgs/applications/audio/x42-avldrums/default.nix b/pkgs/applications/audio/x42-avldrums/default.nix index 3234a719e3c0..4a802a324e8a 100644 --- a/pkgs/applications/audio/x42-avldrums/default.nix +++ b/pkgs/applications/audio/x42-avldrums/default.nix @@ -22,7 +22,7 @@ stdenv.mkDerivation rec { enableParallelBuilding = true; meta = with lib; { - broken = (stdenv.isLinux && stdenv.isAarch64); + broken = (stdenv.hostPlatform.isLinux && stdenv.hostPlatform.isAarch64); description = "Drum sample player LV2 plugin dedicated to Glen MacArthur's AVLdrums"; homepage = "https://x42-plugins.com/x42/x42-avldrums"; maintainers = with maintainers; [ magnetophon orivej ]; diff --git a/pkgs/applications/audio/x42-gmsynth/default.nix b/pkgs/applications/audio/x42-gmsynth/default.nix index 8f83263d0a00..1d31211ec80d 100644 --- a/pkgs/applications/audio/x42-gmsynth/default.nix +++ b/pkgs/applications/audio/x42-gmsynth/default.nix @@ -21,7 +21,7 @@ stdenv.mkDerivation rec { enableParallelBuilding = true; meta = with lib; { - broken = (stdenv.isLinux && stdenv.isAarch64); + broken = (stdenv.hostPlatform.isLinux && stdenv.hostPlatform.isAarch64); description = "Chris Colins' General User soundfont player LV2 plugin"; homepage = "https://x42-plugins.com/x42/x42-gmsynth"; maintainers = with maintainers; [ orivej ]; diff --git a/pkgs/applications/audio/xmp/default.nix b/pkgs/applications/audio/xmp/default.nix index efd5fb9caa60..8abce73aff1f 100644 --- a/pkgs/applications/audio/xmp/default.nix +++ b/pkgs/applications/audio/xmp/default.nix @@ -13,8 +13,8 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ autoreconfHook pkg-config ]; buildInputs = [ libxmp ] - ++ lib.optionals stdenv.isLinux [ alsa-lib ] - ++ lib.optionals stdenv.isDarwin [ AudioUnit CoreAudio ]; + ++ lib.optionals stdenv.hostPlatform.isLinux [ alsa-lib ] + ++ lib.optionals stdenv.hostPlatform.isDarwin [ AudioUnit CoreAudio ]; meta = with lib; { description = "Extended module player"; diff --git a/pkgs/applications/audio/youtube-music/default.nix b/pkgs/applications/audio/youtube-music/default.nix index 59d33a00511b..046203416a03 100644 --- a/pkgs/applications/audio/youtube-music/default.nix +++ b/pkgs/applications/audio/youtube-music/default.nix @@ -27,30 +27,30 @@ stdenv.mkDerivation (finalAttrs: { }; nativeBuildInputs = [ makeWrapper python3 nodejs pnpm.configHook ] - ++ lib.optionals (!stdenv.isDarwin) [ copyDesktopItems ]; + ++ lib.optionals (!stdenv.hostPlatform.isDarwin) [ copyDesktopItems ]; ELECTRON_SKIP_BINARY_DOWNLOAD = 1; - postBuild = lib.optionalString stdenv.isDarwin '' + postBuild = lib.optionalString stdenv.hostPlatform.isDarwin '' cp -R ${electron.dist}/Electron.app Electron.app chmod -R u+w Electron.app '' + '' pnpm build ./node_modules/.bin/electron-builder \ --dir \ - -c.electronDist=${if stdenv.isDarwin then "." else electron.dist} \ + -c.electronDist=${if stdenv.hostPlatform.isDarwin then "." else electron.dist} \ -c.electronVersion=${electron.version} ''; installPhase = '' runHook preInstall - '' + lib.optionalString stdenv.isDarwin '' + '' + lib.optionalString stdenv.hostPlatform.isDarwin '' mkdir -p $out/{Applications,bin} mv pack/mac*/YouTube\ Music.app $out/Applications makeWrapper $out/Applications/YouTube\ Music.app/Contents/MacOS/YouTube\ Music $out/bin/youtube-music - '' + lib.optionalString (!stdenv.isDarwin) '' + '' + lib.optionalString (!stdenv.hostPlatform.isDarwin) '' mkdir -p "$out/share/lib/youtube-music" cp -r pack/*-unpacked/{locales,resources{,.pak}} "$out/share/lib/youtube-music" @@ -64,7 +64,7 @@ stdenv.mkDerivation (finalAttrs: { runHook postInstall ''; - postFixup = lib.optionalString (!stdenv.isDarwin) '' + postFixup = lib.optionalString (!stdenv.hostPlatform.isDarwin) '' makeWrapper ${electron}/bin/electron $out/bin/youtube-music \ --add-flags $out/share/lib/youtube-music/resources/app.asar \ --add-flags "\''${NIXOS_OZONE_WL:+\''${WAYLAND_DISPLAY:+--ozone-platform-hint=auto --enable-features=WaylandWindowDecorations}}" \ diff --git a/pkgs/applications/audio/zrythm/default.nix b/pkgs/applications/audio/zrythm/default.nix index e99ef4225cc8..28315b0a3701 100644 --- a/pkgs/applications/audio/zrythm/default.nix +++ b/pkgs/applications/audio/zrythm/default.nix @@ -206,7 +206,7 @@ stdenv.mkDerivation (finalAttrs: { description = "Automated and intuitive digital audio workstation"; maintainers = with maintainers; [ tshaynik magnetophon yuu astavie PowerUser64 ]; platforms = platforms.unix; - broken = stdenv.isDarwin; + broken = stdenv.hostPlatform.isDarwin; license = licenses.agpl3Plus; }; }) diff --git a/pkgs/applications/audio/zynaddsubfx/default.nix b/pkgs/applications/audio/zynaddsubfx/default.nix index 6f5512d4fa33..59f0310263a4 100644 --- a/pkgs/applications/audio/zynaddsubfx/default.nix +++ b/pkgs/applications/audio/zynaddsubfx/default.nix @@ -16,7 +16,7 @@ , zlib # Optional dependencies -, alsaSupport ? stdenv.isLinux +, alsaSupport ? stdenv.hostPlatform.isLinux , alsa-lib , dssiSupport ? false , dssi @@ -28,7 +28,7 @@ , ossSupport ? true , portaudioSupport ? true , portaudio -, sndioSupport ? stdenv.isOpenBSD +, sndioSupport ? stdenv.hostPlatform.isOpenBSD , sndio # Optional GUI dependencies @@ -122,7 +122,7 @@ in stdenv.mkDerivation rec { lib.optionals lashSupport [ "PortChecker" ] # Tests fail on aarch64 - ++ lib.optionals stdenv.isAarch64 [ "MessageTest" "UnisonTest" ]; + ++ lib.optionals stdenv.hostPlatform.isAarch64 [ "MessageTest" "UnisonTest" ]; in '' runHook preCheck ctest --output-on-failure -E '^${lib.concatStringsSep "|" disabledTests}$' @@ -168,6 +168,6 @@ in stdenv.mkDerivation rec { # - ZynAddSubFX LV2 & VST plugin fail to compile (not setup to use ObjC version of pugl) # - TTL generation crashes (`pointer being freed was not allocated`) for all VST plugins using AbstractFX # - Zest UI fails to start on pulg_setup: Could not open display, aborting. - broken = stdenv.isDarwin; + broken = stdenv.hostPlatform.isDarwin; }; } diff --git a/pkgs/applications/backup/vorta/default.nix b/pkgs/applications/backup/vorta/default.nix index b620459f3c73..8bc6e719718a 100644 --- a/pkgs/applications/backup/vorta/default.nix +++ b/pkgs/applications/backup/vorta/default.nix @@ -26,7 +26,7 @@ python3Packages.buildPythonApplication rec { wrapQtAppsHook ]; - buildInputs = lib.optionals stdenv.isLinux [ + buildInputs = lib.optionals stdenv.hostPlatform.isLinux [ qtwayland ]; diff --git a/pkgs/applications/blockchains/alfis/default.nix b/pkgs/applications/blockchains/alfis/default.nix index 776aa155a2fe..ad40bbef75c9 100644 --- a/pkgs/applications/blockchains/alfis/default.nix +++ b/pkgs/applications/blockchains/alfis/default.nix @@ -38,9 +38,9 @@ rustPlatform.buildRustPackage rec { makeWrapper ]; buildInputs = - lib.optional stdenv.isDarwin Security - ++ lib.optional (withGui && stdenv.isLinux) webkitgtk - ++ lib.optionals (withGui && stdenv.isDarwin) [ + lib.optional stdenv.hostPlatform.isDarwin Security + ++ lib.optional (withGui && stdenv.hostPlatform.isLinux) webkitgtk + ++ lib.optionals (withGui && stdenv.hostPlatform.isDarwin) [ Cocoa WebKit ]; @@ -54,7 +54,7 @@ rustPlatform.buildRustPackage rec { "--skip=dns::client::tests::test_udp_client" ]; - postInstall = lib.optionalString (withGui && stdenv.isLinux) '' + postInstall = lib.optionalString (withGui && stdenv.hostPlatform.isLinux) '' wrapProgram $out/bin/alfis \ --prefix PATH : ${lib.makeBinPath [ zenity ]} ''; @@ -66,6 +66,6 @@ rustPlatform.buildRustPackage rec { maintainers = with lib.maintainers; [ misuzu ]; platforms = lib.platforms.unix; mainProgram = "alfis"; - broken = withGui && stdenv.isDarwin; + broken = withGui && stdenv.hostPlatform.isDarwin; }; } diff --git a/pkgs/applications/blockchains/besu/default.nix b/pkgs/applications/blockchains/besu/default.nix index ef985a2806b7..3c48f930a625 100644 --- a/pkgs/applications/blockchains/besu/default.nix +++ b/pkgs/applications/blockchains/besu/default.nix @@ -9,7 +9,7 @@ stdenv.mkDerivation (finalAttrs: rec { sha256 = "sha256-CC24z0+2dSeqDddX5dJUs7SX9QJ8Iyh/nAp0pqdDvwg="; }; - buildInputs = lib.optionals stdenv.isLinux [ jemalloc ]; + buildInputs = lib.optionals stdenv.hostPlatform.isLinux [ jemalloc ]; nativeBuildInputs = [ makeWrapper ]; installPhase = '' @@ -19,7 +19,7 @@ stdenv.mkDerivation (finalAttrs: rec { cp -r lib $out/ wrapProgram $out/bin/${pname} \ --set JAVA_HOME "${jre}" \ - --suffix ${if stdenv.isDarwin then "DYLD_LIBRARY_PATH" else "LD_LIBRARY_PATH"} : ${lib.makeLibraryPath buildInputs} + --suffix ${if stdenv.hostPlatform.isDarwin then "DYLD_LIBRARY_PATH" else "LD_LIBRARY_PATH"} : ${lib.makeLibraryPath buildInputs} ''; passthru.tests = { diff --git a/pkgs/applications/blockchains/bitcoin-abc/default.nix b/pkgs/applications/blockchains/bitcoin-abc/default.nix index 8ead5982b855..75c782a7f45e 100644 --- a/pkgs/applications/blockchains/bitcoin-abc/default.nix +++ b/pkgs/applications/blockchains/bitcoin-abc/default.nix @@ -81,7 +81,7 @@ mkDerivation rec { homepage = "https://bitcoinabc.org/"; maintainers = with maintainers; [ lassulus ]; license = licenses.mit; - broken = stdenv.isDarwin; + broken = stdenv.hostPlatform.isDarwin; platforms = platforms.unix; mainProgram = "bitcoin-cli"; }; diff --git a/pkgs/applications/blockchains/bitcoin-knots/default.nix b/pkgs/applications/blockchains/bitcoin-knots/default.nix index c6838e0a0f65..5c41ba65a695 100644 --- a/pkgs/applications/blockchains/bitcoin-knots/default.nix +++ b/pkgs/applications/blockchains/bitcoin-knots/default.nix @@ -42,14 +42,14 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ autoreconfHook pkg-config ] - ++ lib.optionals stdenv.isLinux [ util-linux ] - ++ lib.optionals stdenv.isDarwin [ hexdump ] - ++ lib.optionals (stdenv.isDarwin && stdenv.isAarch64) [ autoSignDarwinBinariesHook ] + ++ lib.optionals stdenv.hostPlatform.isLinux [ util-linux ] + ++ lib.optionals stdenv.hostPlatform.isDarwin [ hexdump ] + ++ lib.optionals (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isAarch64) [ autoSignDarwinBinariesHook ] ++ lib.optionals withGui [ wrapQtAppsHook ]; buildInputs = [ boost libevent miniupnpc zeromq zlib ] ++ lib.optionals withWallet [ sqlite ] - ++ lib.optionals (withWallet && !stdenv.isDarwin) [ db48 ] + ++ lib.optionals (withWallet && !stdenv.hostPlatform.isDarwin) [ db48 ] ++ lib.optionals withGui [ qrencode qtbase qttools ]; configureFlags = [ diff --git a/pkgs/applications/blockchains/bitcoin/default.nix b/pkgs/applications/blockchains/bitcoin/default.nix index 960ccf418306..e3eb1cf3bc31 100644 --- a/pkgs/applications/blockchains/bitcoin/default.nix +++ b/pkgs/applications/blockchains/bitcoin/default.nix @@ -54,15 +54,15 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ autoreconfHook pkg-config installShellFiles ] - ++ lib.optionals stdenv.isLinux [ util-linux ] - ++ lib.optionals stdenv.isDarwin [ hexdump ] - ++ lib.optionals (stdenv.isDarwin && stdenv.isAarch64) [ autoSignDarwinBinariesHook ] + ++ lib.optionals stdenv.hostPlatform.isLinux [ util-linux ] + ++ lib.optionals stdenv.hostPlatform.isDarwin [ hexdump ] + ++ lib.optionals (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isAarch64) [ autoSignDarwinBinariesHook ] ++ lib.optionals withGui [ wrapQtAppsHook ]; buildInputs = [ boost libevent miniupnpc zeromq zlib ] ++ lib.optionals withWallet [ sqlite ] # building with db48 (for legacy descriptor wallet support) is broken on Darwin - ++ lib.optionals (withWallet && !stdenv.isDarwin) [ db48 ] + ++ lib.optionals (withWallet && !stdenv.hostPlatform.isDarwin) [ db48 ] ++ lib.optionals withGui [ qrencode qtbase qttools ]; postInstall = '' @@ -83,7 +83,7 @@ stdenv.mkDerivation rec { install -Dm644 share/pixmaps/bitcoin256.png $out/share/pixmaps/bitcoin.png ''; - preConfigure = lib.optionalString stdenv.isDarwin '' + preConfigure = lib.optionalString stdenv.hostPlatform.isDarwin '' export MACOSX_DEPLOYMENT_TARGET=10.13 ''; diff --git a/pkgs/applications/blockchains/clightning/default.nix b/pkgs/applications/blockchains/clightning/default.nix index ff049b69d7bc..9f84685e8c10 100644 --- a/pkgs/applications/blockchains/clightning/default.nix +++ b/pkgs/applications/blockchains/clightning/default.nix @@ -35,13 +35,13 @@ stdenv.mkDerivation rec { # as libwally-core detects the host as darwin and tries to add the -static # option to libtool, also we have to add the modified gsed package. nativeBuildInputs = [ autoconf autogen automake gettext libtool lowdown protobuf py3 unzip which ] - ++ lib.optionals stdenv.isDarwin [ cctools darwin.autoSignDarwinBinariesHook ]; + ++ lib.optionals stdenv.hostPlatform.isDarwin [ cctools darwin.autoSignDarwinBinariesHook ]; buildInputs = [ gmp libsodium sqlite zlib jq ]; # this causes some python trouble on a darwin host so we skip this step. # also we have to tell libwally-core to use sed instead of gsed. - postPatch = if !stdenv.isDarwin then '' + postPatch = if !stdenv.hostPlatform.isDarwin then '' patchShebangs \ tools/generate-wire.py \ tools/update-mocks.sh \ @@ -62,7 +62,7 @@ stdenv.mkDerivation rec { # workaround for build issue, happens only x86_64-darwin, not aarch64-darwin # ccan/ccan/fdpass/fdpass.c:16:8: error: variable length array folded to constant array as an extension [-Werror,-Wgnu-folding-constant] # char buf[CMSG_SPACE(sizeof(fd))]; - env.NIX_CFLAGS_COMPILE = lib.optionalString (stdenv.isDarwin && stdenv.isx86_64) "-Wno-error=gnu-folding-constant"; + env.NIX_CFLAGS_COMPILE = lib.optionalString (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isx86_64) "-Wno-error=gnu-folding-constant"; # The `clnrest` plugin requires a Python environment to run postInstall = '' diff --git a/pkgs/applications/blockchains/electrs/default.nix b/pkgs/applications/blockchains/electrs/default.nix index f89b34097794..a31982666ab0 100644 --- a/pkgs/applications/blockchains/electrs/default.nix +++ b/pkgs/applications/blockchains/electrs/default.nix @@ -29,7 +29,7 @@ rustPlatform.buildRustPackage rec { ROCKSDB_INCLUDE_DIR = "${rocksdb}/include"; ROCKSDB_LIB_DIR = "${rocksdb}/lib"; - buildInputs = lib.optionals stdenv.isDarwin [ Security ]; + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ Security ]; passthru.updateScript = ./update.sh; diff --git a/pkgs/applications/blockchains/elements/default.nix b/pkgs/applications/blockchains/elements/default.nix index 90bc9195f9b5..01abe7c2974e 100644 --- a/pkgs/applications/blockchains/elements/default.nix +++ b/pkgs/applications/blockchains/elements/default.nix @@ -44,9 +44,9 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ autoreconfHook pkg-config ] - ++ lib.optionals stdenv.isLinux [ util-linux ] - ++ lib.optionals stdenv.isDarwin [ hexdump ] - ++ lib.optionals (stdenv.isDarwin && stdenv.isAarch64) [ autoSignDarwinBinariesHook ] + ++ lib.optionals stdenv.hostPlatform.isLinux [ util-linux ] + ++ lib.optionals stdenv.hostPlatform.isDarwin [ hexdump ] + ++ lib.optionals (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isAarch64) [ autoSignDarwinBinariesHook ] ++ lib.optionals withGui [ wrapQtAppsHook ]; buildInputs = [ boost libevent miniupnpc zeromq zlib ] @@ -68,7 +68,7 @@ stdenv.mkDerivation rec { # fix "Killed: 9 test/test_bitcoin" # https://github.com/NixOS/nixpkgs/issues/179474 - hardeningDisable = lib.optionals (stdenv.isAarch64 && stdenv.isDarwin) [ "fortify" "stackprotector" ]; + hardeningDisable = lib.optionals (stdenv.hostPlatform.isAarch64 && stdenv.hostPlatform.isDarwin) [ "fortify" "stackprotector" ]; nativeCheckInputs = [ python3 ]; diff --git a/pkgs/applications/blockchains/groestlcoin/default.nix b/pkgs/applications/blockchains/groestlcoin/default.nix index e3acd14a5a9e..18861f021431 100644 --- a/pkgs/applications/blockchains/groestlcoin/default.nix +++ b/pkgs/applications/blockchains/groestlcoin/default.nix @@ -51,9 +51,9 @@ stdenv.mkDerivation rec { ]; nativeBuildInputs = [ autoreconfHook pkg-config installShellFiles ] - ++ lib.optionals stdenv.isLinux [ util-linux ] - ++ lib.optionals stdenv.isDarwin [ hexdump ] - ++ lib.optionals (stdenv.isDarwin && stdenv.isAarch64) [ autoSignDarwinBinariesHook ] + ++ lib.optionals stdenv.hostPlatform.isLinux [ util-linux ] + ++ lib.optionals stdenv.hostPlatform.isDarwin [ hexdump ] + ++ lib.optionals (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isAarch64) [ autoSignDarwinBinariesHook ] ++ lib.optionals withGui [ wrapQtAppsHook ]; buildInputs = [ boost libevent miniupnpc zeromq zlib ] @@ -76,7 +76,7 @@ stdenv.mkDerivation rec { install -Dm644 share/pixmaps/groestlcoin256.png $out/share/pixmaps/groestlcoin.png ''; - preConfigure = lib.optionalString stdenv.isDarwin '' + preConfigure = lib.optionalString stdenv.hostPlatform.isDarwin '' export MACOSX_DEPLOYMENT_TARGET=10.13 ''; diff --git a/pkgs/applications/blockchains/haven-cli/default.nix b/pkgs/applications/blockchains/haven-cli/default.nix index 2147f7cfc7de..e433aa562cf6 100644 --- a/pkgs/applications/blockchains/haven-cli/default.nix +++ b/pkgs/applications/blockchains/haven-cli/default.nix @@ -35,7 +35,7 @@ stdenv.mkDerivation rec { zeromq pcsclite readline libsodium hidapi randomx rapidjson protobuf readline easyloggingpp - ] ++ lib.optionals stdenv.isDarwin [ IOKit CoreData PCSC ] + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ IOKit CoreData PCSC ] ++ lib.optionals trezorSupport [ libusb1 protobuf python3 ]; cmakeFlags = [ @@ -43,7 +43,7 @@ stdenv.mkDerivation rec { "-DReadline_ROOT_DIR=${readline.dev}" "-DReadline_INCLUDE_DIR=${readline.dev}/include/readline" "-DRandomX_ROOT_DIR=${randomx}" - ] ++ lib.optional stdenv.isDarwin "-DBoost_USE_MULTITHREADED=OFF" + ] ++ lib.optional stdenv.hostPlatform.isDarwin "-DBoost_USE_MULTITHREADED=OFF" ++ lib.optional (!trezorSupport) "-DUSE_DEVICE_TREZOR=OFF"; outputs = [ "out" "source" ]; diff --git a/pkgs/applications/blockchains/lighthouse/default.nix b/pkgs/applications/blockchains/lighthouse/default.nix index 83dd93effb15..4d1a81d5da1a 100644 --- a/pkgs/applications/blockchains/lighthouse/default.nix +++ b/pkgs/applications/blockchains/lighthouse/default.nix @@ -65,7 +65,7 @@ rustPlatform.buildRustPackage rec { buildInputs = [ rust-jemalloc-sys sqlite - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ CoreFoundation Security SystemConfiguration @@ -121,7 +121,7 @@ rustPlatform.buildRustPackage rec { "--skip persist::test_persist_caches" "--skip service::tests::tests::test_dht_persistence" "--skip time::test::test_reinsertion_updates_timeout" - ] ++ lib.optionals (stdenv.isAarch64 && stdenv.isDarwin) [ + ] ++ lib.optionals (stdenv.hostPlatform.isAarch64 && stdenv.hostPlatform.isDarwin) [ "--skip subnet_service::tests::attestation_service::test_subscribe_same_subnet_several_slots_apart" "--skip subnet_service::tests::sync_committee_service::same_subscription_with_lower_until_epoch" "--skip subnet_service::tests::sync_committee_service::subscribe_and_unsubscribe" diff --git a/pkgs/applications/blockchains/litecoin/default.nix b/pkgs/applications/blockchains/litecoin/default.nix index 8a3c6a2657aa..0f923fb8f6b8 100644 --- a/pkgs/applications/blockchains/litecoin/default.nix +++ b/pkgs/applications/blockchains/litecoin/default.nix @@ -46,7 +46,7 @@ mkDerivation rec { nativeBuildInputs = [ pkg-config autoreconfHook ]; buildInputs = [ openssl db48 boost zlib zeromq fmt miniupnpc glib protobuf util-linux libevent ] - ++ lib.optionals stdenv.isDarwin [ AppKit ] + ++ lib.optionals stdenv.hostPlatform.isDarwin [ AppKit ] ++ lib.optionals withGui [ qtbase qttools qrencode ]; configureFlags = [ "--with-boost-libdir=${boost.out}/lib" ] @@ -62,7 +62,7 @@ mkDerivation rec { ''; meta = with lib; { - broken = (stdenv.isLinux && stdenv.isAarch64) || stdenv.isDarwin; + broken = (stdenv.hostPlatform.isLinux && stdenv.hostPlatform.isAarch64) || stdenv.hostPlatform.isDarwin; description = "Lite version of Bitcoin using scrypt as a proof-of-work algorithm"; longDescription= '' Litecoin is a peer-to-peer Internet currency that enables instant payments diff --git a/pkgs/applications/blockchains/miniscript/default.nix b/pkgs/applications/blockchains/miniscript/default.nix index 8a842d507b0c..0c3ad55ab440 100644 --- a/pkgs/applications/blockchains/miniscript/default.nix +++ b/pkgs/applications/blockchains/miniscript/default.nix @@ -15,7 +15,7 @@ stdenv.mkDerivation rec { sha256 = "sha256-qkYDzsl2Y4WEDDXs9cE/jIXm01jclkYUQbDGe1S0wYs="; }; - postPatch = lib.optionalString stdenv.isDarwin '' + postPatch = lib.optionalString stdenv.hostPlatform.isDarwin '' # Replace hardcoded g++ with c++ so clang can be used # on darwin substituteInPlace Makefile \ diff --git a/pkgs/applications/blockchains/monero-cli/default.nix b/pkgs/applications/blockchains/monero-cli/default.nix index 7cb476ce4edf..7e87695e78c8 100644 --- a/pkgs/applications/blockchains/monero-cli/default.nix +++ b/pkgs/applications/blockchains/monero-cli/default.nix @@ -82,7 +82,7 @@ stdenv.mkDerivation rec { unbound zeromq ] - ++ lib.optionals stdenv.isDarwin [ + ++ lib.optionals stdenv.hostPlatform.isDarwin [ IOKit CoreData ] @@ -92,7 +92,7 @@ stdenv.mkDerivation rec { libusb1 protobuf_21 ] - ++ lib.optionals (trezorSupport && stdenv.isLinux) [ + ++ lib.optionals (trezorSupport && stdenv.hostPlatform.isLinux) [ udev ]; @@ -104,7 +104,7 @@ stdenv.mkDerivation rec { "-DBUILD_GUI_DEPS=ON" "-DReadline_ROOT_DIR=${readline.dev}" ] - ++ lib.optional stdenv.isDarwin "-DBoost_USE_MULTITHREADED=OFF" + ++ lib.optional stdenv.hostPlatform.isDarwin "-DBoost_USE_MULTITHREADED=OFF" ++ lib.optional trezorSupport [ "-DUSE_DEVICE_TREZOR=ON" # fix build on recent gcc versions diff --git a/pkgs/applications/blockchains/monero-gui/default.nix b/pkgs/applications/blockchains/monero-gui/default.nix index 7a8f5d4c26cb..7e8a5fe73dcd 100644 --- a/pkgs/applications/blockchains/monero-gui/default.nix +++ b/pkgs/applications/blockchains/monero-gui/default.nix @@ -73,14 +73,14 @@ stdenv.mkDerivation rec { unbound zeromq ] - ++ lib.optionals stdenv.isDarwin [ qtmacextras ] + ++ lib.optionals stdenv.hostPlatform.isDarwin [ qtmacextras ] ++ lib.optionals trezorSupport [ hidapi libusb1 protobuf_21 python3 ] - ++ lib.optionals (trezorSupport && stdenv.isLinux) [ + ++ lib.optionals (trezorSupport && stdenv.hostPlatform.isLinux) [ udev ]; diff --git a/pkgs/applications/blockchains/optimism/geth.nix b/pkgs/applications/blockchains/optimism/geth.nix index 722402e704d3..473ee254d08f 100644 --- a/pkgs/applications/blockchains/optimism/geth.nix +++ b/pkgs/applications/blockchains/optimism/geth.nix @@ -37,7 +37,7 @@ buildGoModule rec { # Fix for usb-related segmentation faults on darwin propagatedBuildInputs = - lib.optionals stdenv.isDarwin [ libobjc IOKit ]; + lib.optionals stdenv.hostPlatform.isDarwin [ libobjc IOKit ]; ldflags = [ "-s" "-w" ]; diff --git a/pkgs/applications/blockchains/particl-core/default.nix b/pkgs/applications/blockchains/particl-core/default.nix index cacb8f5f4619..12e86358c954 100644 --- a/pkgs/applications/blockchains/particl-core/default.nix +++ b/pkgs/applications/blockchains/particl-core/default.nix @@ -50,7 +50,7 @@ stdenv.mkDerivation rec { enableParallelBuilding = true; meta = with lib; { - broken = (stdenv.isLinux && stdenv.isAarch64); + broken = (stdenv.hostPlatform.isLinux && stdenv.hostPlatform.isAarch64); description = "Privacy-Focused Marketplace & Decentralized Application Platform"; longDescription = '' An open source, decentralized privacy platform built for global person to person eCommerce. diff --git a/pkgs/applications/blockchains/polkadot/default.nix b/pkgs/applications/blockchains/polkadot/default.nix index 546348d3c433..65e945d77d30 100644 --- a/pkgs/applications/blockchains/polkadot/default.nix +++ b/pkgs/applications/blockchains/polkadot/default.nix @@ -69,8 +69,8 @@ rustPlatform.buildRustPackage rec { # NOTE: jemalloc is used by default on Linux with unprefixed enabled buildInputs = [ openssl ] ++ - lib.optionals stdenv.isLinux [ rust-jemalloc-sys-unprefixed ] ++ - lib.optionals stdenv.isDarwin [ Security SystemConfiguration ]; + lib.optionals stdenv.hostPlatform.isLinux [ rust-jemalloc-sys-unprefixed ] ++ + lib.optionals stdenv.hostPlatform.isDarwin [ Security SystemConfiguration ]; # NOTE: disable building `core`/`std` in wasm environment since rust-src isn't # available for `rustc-wasm32` diff --git a/pkgs/applications/blockchains/snarkos/default.nix b/pkgs/applications/blockchains/snarkos/default.nix index e4dc85f3c4d5..0cebbecc0309 100644 --- a/pkgs/applications/blockchains/snarkos/default.nix +++ b/pkgs/applications/blockchains/snarkos/default.nix @@ -22,7 +22,7 @@ rustPlatform.buildRustPackage rec { # buildAndTestSubdir = "cli"; - nativeBuildInputs = lib.optionals stdenv.isLinux [ pkg-config rustPlatform.bindgenHook ]; + nativeBuildInputs = lib.optionals stdenv.hostPlatform.isLinux [ pkg-config rustPlatform.bindgenHook ]; # Needed to get openssl-sys to use pkg-config. OPENSSL_NO_VENDOR = 1; @@ -35,11 +35,11 @@ rustPlatform.buildRustPackage rec { # ROCKSDB_INCLUDE_DIR="${rocksdb}/include"; # ROCKSDB_LIB_DIR="${rocksdb}/lib"; - buildInputs = lib.optionals stdenv.isDarwin [ Security curl ]; + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ Security curl ]; # some tests are flaky and some need network access # TODO finish filtering the tests to enable them - doCheck = !stdenv.isLinux; + doCheck = !stdenv.hostPlatform.isLinux; # checkFlags = [ # # tries to make a network access # "--skip=rpc::rpc::tests::test_send_transaction_large" diff --git a/pkgs/applications/blockchains/solana-validator/default.nix b/pkgs/applications/blockchains/solana-validator/default.nix index 0d664374efa0..5b18f5fc4cc4 100644 --- a/pkgs/applications/blockchains/solana-validator/default.nix +++ b/pkgs/applications/blockchains/solana-validator/default.nix @@ -75,8 +75,8 @@ rustPlatform.buildRustPackage rec { nativeBuildInputs = [ pkg-config protobuf rustfmt perl rustPlatform.bindgenHook ]; buildInputs = - [ openssl zlib libclang hidapi ] ++ (lib.optionals stdenv.isLinux [ udev ]) - ++ lib.optionals stdenv.isDarwin [ Security System Libsystem libcxx ]; + [ openssl zlib libclang hidapi ] ++ (lib.optionals stdenv.hostPlatform.isLinux [ udev ]) + ++ lib.optionals stdenv.hostPlatform.isDarwin [ Security System Libsystem libcxx ]; strictDeps = true; doCheck = false; @@ -88,7 +88,7 @@ rustPlatform.buildRustPackage rec { # If set, always finds OpenSSL in the system, even if the vendored feature is enabled. OPENSSL_NO_VENDOR = "1"; - } // lib.optionalAttrs stdenv.isDarwin { + } // lib.optionalAttrs stdenv.hostPlatform.isDarwin { # Require this on darwin otherwise the compiler starts rambling about missing # cmath functions CPPFLAGS = "-isystem ${lib.getDev libcxx}/include/c++/v1"; diff --git a/pkgs/applications/blockchains/teos/default.nix b/pkgs/applications/blockchains/teos/default.nix index c2e4fb01384d..61299621e0fb 100644 --- a/pkgs/applications/blockchains/teos/default.nix +++ b/pkgs/applications/blockchains/teos/default.nix @@ -40,7 +40,7 @@ in rustfmt ]; - buildInputs = lib.optionals stdenv.isDarwin [ + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.Security ]; @@ -69,7 +69,7 @@ in buildInputs = [ openssl - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.SystemConfiguration ]; diff --git a/pkgs/applications/blockchains/ton/default.nix b/pkgs/applications/blockchains/ton/default.nix index 517e18ff941e..3a9db76def4e 100644 --- a/pkgs/applications/blockchains/ton/default.nix +++ b/pkgs/applications/blockchains/ton/default.nix @@ -51,7 +51,7 @@ stdenv.mkDerivation rec { meta = with lib; { # The build fails on darwin as: # error: aligned allocation function of type 'void *(std::size_t, std::align_val_t)' is only available on macOS 10.13 or newer - broken = stdenv.isDarwin; + broken = stdenv.hostPlatform.isDarwin; description = "Fully decentralized layer-1 blockchain designed by Telegram"; homepage = "https://ton.org/"; changelog = "https://github.com/ton-blockchain/ton/blob/v${version}/Changelog.md"; diff --git a/pkgs/applications/blockchains/wownero/default.nix b/pkgs/applications/blockchains/wownero/default.nix index 836532c00bad..7ec9f8d83ed8 100644 --- a/pkgs/applications/blockchains/wownero/default.nix +++ b/pkgs/applications/blockchains/wownero/default.nix @@ -67,7 +67,7 @@ stdenv.mkDerivation rec { readline unbound zeromq - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.IOKit ]; diff --git a/pkgs/applications/blockchains/zcash/default.nix b/pkgs/applications/blockchains/zcash/default.nix index dbada09c1b6e..35a3bdb91e8a 100644 --- a/pkgs/applications/blockchains/zcash/default.nix +++ b/pkgs/applications/blockchains/zcash/default.nix @@ -14,7 +14,7 @@ rustPlatform.buildRustPackage.override { inherit stdenv; } rec { hash = "sha256-XGq/cYUo43FcpmRDO2YiNLCuEQLsTFLBFC4M1wM29l8="; }; - prePatch = lib.optionalString stdenv.isAarch64 '' + prePatch = lib.optionalString stdenv.hostPlatform.isAarch64 '' substituteInPlace .cargo/config.offline \ --replace "[target.aarch64-unknown-linux-gnu]" "" \ --replace "linker = \"aarch64-linux-gnu-gcc\"" "" @@ -32,7 +32,7 @@ rustPlatform.buildRustPackage.override { inherit stdenv; } rec { tl-expected utf8cpp zeromq - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ Security ]; diff --git a/pkgs/applications/display-managers/emptty/default.nix b/pkgs/applications/display-managers/emptty/default.nix index de14859c983f..b4a55ece7675 100644 --- a/pkgs/applications/display-managers/emptty/default.nix +++ b/pkgs/applications/display-managers/emptty/default.nix @@ -27,7 +27,7 @@ buildGoModule rec { license = licenses.mit; maintainers = with maintainers; [ urandom ]; # many undefined functions - broken = stdenv.isDarwin; + broken = stdenv.hostPlatform.isDarwin; mainProgram = "emptty"; }; } diff --git a/pkgs/applications/editors/codeblocks/default.nix b/pkgs/applications/editors/codeblocks/default.nix index f22cafbbcec7..80fbe5674635 100644 --- a/pkgs/applications/editors/codeblocks/default.nix +++ b/pkgs/applications/editors/codeblocks/default.nix @@ -117,12 +117,12 @@ stdenv.mkDerivation rec { }) ]; preConfigure = "substituteInPlace ./configure --replace /usr/bin/file ${file}/bin/file"; - postConfigure = lib.optionalString stdenv.isLinux "substituteInPlace libtool --replace ldconfig ${stdenv.cc.libc.bin}/bin/ldconfig"; + postConfigure = lib.optionalString stdenv.hostPlatform.isLinux "substituteInPlace libtool --replace ldconfig ${stdenv.cc.libc.bin}/bin/ldconfig"; configureFlags = [ "--enable-pch=no" ] ++ lib.optionals contribPlugins [ - ("--with-contrib-plugins=all,-FileManager" + lib.optionalString stdenv.isDarwin ",-NassiShneiderman") + ("--with-contrib-plugins=all,-FileManager" + lib.optionalString stdenv.hostPlatform.isDarwin ",-NassiShneiderman") "--with-boost-libdir=${boost}/lib" ]; - postInstall = lib.optionalString stdenv.isDarwin '' + postInstall = lib.optionalString stdenv.hostPlatform.isDarwin '' ln -s $out/lib/codeblocks/plugins $out/share/codeblocks/plugins ''; diff --git a/pkgs/applications/editors/dit/default.nix b/pkgs/applications/editors/dit/default.nix index d0ded7ae72bd..d809348b3f52 100644 --- a/pkgs/applications/editors/dit/default.nix +++ b/pkgs/applications/editors/dit/default.nix @@ -10,7 +10,7 @@ stdenv.mkDerivation rec { }; buildInputs = [ ncurses lua ] - ++ lib.optional stdenv.isDarwin libiconv; + ++ lib.optional stdenv.hostPlatform.isDarwin libiconv; # fix paths prePatch = '' diff --git a/pkgs/applications/editors/emacs/elisp-packages/melpa-packages.nix b/pkgs/applications/editors/emacs/elisp-packages/melpa-packages.nix index d61d83bb5aaa..e680e1f7e63e 100644 --- a/pkgs/applications/editors/emacs/elisp-packages/melpa-packages.nix +++ b/pkgs/applications/editors/emacs/elisp-packages/melpa-packages.nix @@ -253,7 +253,7 @@ let pkgs.zlib.dev pkgs.cairo.dev ] - ++ lib.optional pkgs.stdenv.isLinux pkgs.stdenv.cc.libc.dev + ++ lib.optional pkgs.stdenv.hostPlatform.isLinux pkgs.stdenv.cc.libc.dev ) )} server/epdfinfo ''; @@ -303,7 +303,7 @@ let rm -rf $out/share/emacs/site-lisp/elpa/*/server ''; dontUseCmakeBuildDir = true; - doCheck = pkgs.stdenv.isLinux; + doCheck = pkgs.stdenv.hostPlatform.isLinux; buildInputs = old.buildInputs ++ [ pkgs.llvmPackages.libclang ]; nativeBuildInputs = old.nativeBuildInputs ++ [ pkgs.cmake pkgs.llvmPackages.llvm ]; }); @@ -702,7 +702,7 @@ let # Build a helper executable that interacts with the macOS Dictionary.app osx-dictionary = - if pkgs.stdenv.isDarwin + if pkgs.stdenv.hostPlatform.isDarwin then super.osx-dictionary.overrideAttrs (old: { buildInputs = old.buildInputs ++ diff --git a/pkgs/applications/editors/emacs/make-emacs.nix b/pkgs/applications/editors/emacs/make-emacs.nix index cbcd022c3d35..bdd80f8922a3 100644 --- a/pkgs/applications/editors/emacs/make-emacs.nix +++ b/pkgs/applications/editors/emacs/make-emacs.nix @@ -67,26 +67,26 @@ , withAlsaLib ? false , withAthena ? false , withCsrc ? true -, withDbus ? stdenv.isLinux +, withDbus ? stdenv.hostPlatform.isLinux , withGTK3 ? withPgtk && !noGui , withGlibNetworking ? withPgtk || withGTK3 || (withX && withXwidgets) -, withGpm ? stdenv.isLinux +, withGpm ? stdenv.hostPlatform.isLinux , withImageMagick ? lib.versionOlder version "27" && (withX || withNS) # Emacs 30+ has native JSON support , withJansson ? lib.versionOlder version "30" , withMailutils ? true , withMotif ? false -, withNS ? stdenv.isDarwin && !(variant == "macport" || noGui) +, withNS ? stdenv.hostPlatform.isDarwin && !(variant == "macport" || noGui) , withPgtk ? false -, withSelinux ? stdenv.isLinux +, withSelinux ? stdenv.hostPlatform.isLinux , withSQLite3 ? lib.versionAtLeast version "29" , withSystemd ? lib.meta.availableOn stdenv.hostPlatform systemd , withToolkitScrollBars ? true , withTreeSitter ? lib.versionAtLeast version "29" , withWebP ? lib.versionAtLeast version "29" -, withX ? !(stdenv.isDarwin || noGui || withPgtk) +, withX ? !(stdenv.hostPlatform.isDarwin || noGui || withPgtk) , withXinput2 ? withX && lib.versionAtLeast version "29" -, withXwidgets ? !stdenv.isDarwin && !noGui && (withGTK3 || withPgtk) +, withXwidgets ? !stdenv.hostPlatform.isDarwin && !noGui && (withGTK3 || withPgtk) , withSmallJaDic ? false , withCompressInstall ? true @@ -117,10 +117,10 @@ assert (withGTK3 && !withNS && variant != "macport") -> withX || withPgtk; assert noGui -> !(withX || withGTK3 || withNS || variant == "macport"); -assert withAcl -> stdenv.isLinux; -assert withAlsaLib -> stdenv.isLinux; -assert withGpm -> stdenv.isLinux; -assert withNS -> stdenv.isDarwin && !(withX || variant == "macport"); +assert withAcl -> stdenv.hostPlatform.isLinux; +assert withAlsaLib -> stdenv.hostPlatform.isLinux; +assert withGpm -> stdenv.hostPlatform.isLinux; +assert withNS -> stdenv.hostPlatform.isDarwin && !(withX || variant == "macport"); assert withPgtk -> withGTK3 && !withX; assert withXwidgets -> !noGui && (withGTK3 || withPgtk); @@ -229,9 +229,9 @@ mkDerivation (finalAttrs: { dbus ] ++ lib.optionals withSelinux [ libselinux - ] ++ lib.optionals (!stdenv.isDarwin && withGTK3) [ + ] ++ lib.optionals (!stdenv.hostPlatform.isDarwin && withGTK3) [ gsettings-desktop-schemas - ] ++ lib.optionals (stdenv.isLinux && withX) [ + ] ++ lib.optionals (stdenv.hostPlatform.isLinux && withX) [ libotf m17n_lib ] ++ lib.optionals (withX && withGTK3) [ @@ -275,7 +275,7 @@ mkDerivation (finalAttrs: { libXi ] ++ lib.optionals withXwidgets [ webkitgtk - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ sigtool ] ++ lib.optionals withNS [ librsvg @@ -332,7 +332,7 @@ mkDerivation (finalAttrs: { (lib.withFeature true "mac") (lib.withFeature true "xml2") ] - ++ lib.optionals stdenv.isDarwin [ + ++ lib.optionals stdenv.hostPlatform.isDarwin [ (lib.withFeature withNS "ns") ] ++ [ @@ -399,7 +399,7 @@ mkDerivation (finalAttrs: { -f batch-native-compile $out/share/emacs/site-lisp/site-start.el ''; - postFixup = lib.optionalString (stdenv.isLinux && withX && toolkit == "lucid") '' + postFixup = lib.optionalString (stdenv.hostPlatform.isLinux && withX && toolkit == "lucid") '' patchelf --add-rpath ${lib.makeLibraryPath [ libXcursor ]} $out/bin/emacs patchelf --add-needed "libXcursor.so.1" "$out/bin/emacs" ''; diff --git a/pkgs/applications/editors/gedit/default.nix b/pkgs/applications/editors/gedit/default.nix index 7a7d05df52e8..7a1edc7294b1 100644 --- a/pkgs/applications/editors/gedit/default.nix +++ b/pkgs/applications/editors/gedit/default.nix @@ -71,7 +71,7 @@ stdenv.mkDerivation rec { libgedit-gtksourceview libgedit-tepl libpeas - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ gtk-mac-integration ]; diff --git a/pkgs/applications/editors/heh/default.nix b/pkgs/applications/editors/heh/default.nix index bd7907f7682c..f89ee5a76a0a 100644 --- a/pkgs/applications/editors/heh/default.nix +++ b/pkgs/applications/editors/heh/default.nix @@ -16,7 +16,7 @@ rustPlatform.buildRustPackage rec { hash = "sha256-eqWBTylvXqGhWdSGHdTM1ZURSD5pkUBoBOvBJ5zmJ7w="; }; - buildInputs = lib.optionals stdenv.isDarwin (with darwin.apple_sdk.frameworks; [ + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin (with darwin.apple_sdk.frameworks; [ AppKit ]); diff --git a/pkgs/applications/editors/jetbrains/default.nix b/pkgs/applications/editors/jetbrains/default.nix index 8188a82c2c80..0e3241a0397c 100644 --- a/pkgs/applications/editors/jetbrains/default.nix +++ b/pkgs/applications/editors/jetbrains/default.nix @@ -39,7 +39,7 @@ let products = versions.${system} or (throw "Unsupported system: ${system}"); - package = if stdenv.isDarwin then ./bin/darwin.nix else ./bin/linux.nix; + package = if stdenv.hostPlatform.isDarwin then ./bin/darwin.nix else ./bin/linux.nix; mkJetBrainsProductCore = callPackage package { inherit vmopts; }; mkMeta = meta: fromSource: { inherit (meta) homepage longDescription; @@ -47,7 +47,7 @@ let maintainers = map (x: lib.maintainers."${x}") meta.maintainers; license = if meta.isOpenSource then lib.licenses.asl20 else lib.licenses.unfree; sourceProvenance = if fromSource then [ lib.sourceTypes.fromSource ] else - (if stdenv.isDarwin then [ lib.sourceTypes.binaryNativeCode ] else [ lib.sourceTypes.binaryBytecode ]); + (if stdenv.hostPlatform.isDarwin then [ lib.sourceTypes.binaryNativeCode ] else [ lib.sourceTypes.binaryBytecode ]); }; mkJetBrainsProduct = @@ -85,7 +85,7 @@ let }); buildPycharm = args: - (mkJetBrainsProduct args).overrideAttrs (finalAttrs: previousAttrs: lib.optionalAttrs stdenv.isLinux { + (mkJetBrainsProduct args).overrideAttrs (finalAttrs: previousAttrs: lib.optionalAttrs stdenv.hostPlatform.isLinux { buildInputs = with python3.pkgs; (previousAttrs.buildInputs or []) ++ [ python3 setuptools ]; preInstall = '' echo "compiling cython debug speedups" @@ -106,7 +106,7 @@ rec { clion = (mkJetBrainsProduct { pname = "clion"; - extraBuildInputs = lib.optionals (stdenv.isLinux) [ + extraBuildInputs = lib.optionals (stdenv.hostPlatform.isLinux) [ fontconfig python3 stdenv.cc.cc @@ -114,13 +114,13 @@ rec { libxcrypt-legacy lttng-ust_2_12 musl - ] ++ lib.optionals (stdenv.isLinux && stdenv.isAarch64) [ + ] ++ lib.optionals (stdenv.hostPlatform.isLinux && stdenv.hostPlatform.isAarch64) [ expat libxml2 xz ]; }).overrideAttrs (attrs: { - postInstall = (attrs.postInstall or "") + lib.optionalString (stdenv.isLinux) '' + postInstall = (attrs.postInstall or "") + lib.optionalString (stdenv.hostPlatform.isLinux) '' ( cd $out/clion @@ -131,7 +131,7 @@ rec { ) ''; - postFixup = (attrs.postFixup or "") + lib.optionalString (stdenv.isLinux) '' + postFixup = (attrs.postFixup or "") + lib.optionalString (stdenv.hostPlatform.isLinux) '' ( cd $out/clion @@ -175,7 +175,7 @@ rec { extraBuildInputs = [ libgcc stdenv.cc.cc ]; }).overrideAttrs (attrs: { - postFixup = (attrs.postFixup or "") + lib.optionalString stdenv.isLinux '' + postFixup = (attrs.postFixup or "") + lib.optionalString stdenv.hostPlatform.isLinux '' interp="$(cat $NIX_CC/nix-support/dynamic-linker)" patchelf --set-interpreter $interp $out/goland/plugins/go-plugin/lib/dlv/linux/dlv chmod +x $out/goland/plugins/go-plugin/lib/dlv/linux/dlv @@ -186,7 +186,7 @@ rec { idea-community-src = buildIdea { pname = "idea-community"; extraBuildInputs = [ stdenv.cc.cc ]; fromSource = true; }; - idea-community = if stdenv.isDarwin || stdenv.isAarch64 then idea-community-bin else idea-community-src; + idea-community = if stdenv.hostPlatform.isDarwin || stdenv.hostPlatform.isAarch64 then idea-community-bin else idea-community-src; idea-ultimate = buildIdea { pname = "idea-ultimate"; extraBuildInputs = [ stdenv.cc.cc lldb musl ]; }; @@ -198,7 +198,7 @@ rec { pycharm-community-src = buildPycharm { pname = "pycharm-community"; fromSource = true; }; - pycharm-community = if stdenv.isDarwin then pycharm-community-bin else pycharm-community-src; + pycharm-community = if stdenv.hostPlatform.isDarwin then pycharm-community-bin else pycharm-community-src; pycharm-professional = buildPycharm { pname = "pycharm-professional"; extraBuildInputs = [ musl ]; }; @@ -211,14 +211,14 @@ rec { libxcrypt lttng-ust_2_12 musl - ]++ lib.optionals (stdenv.isLinux && stdenv.isAarch64) [ + ]++ lib.optionals (stdenv.hostPlatform.isLinux && stdenv.hostPlatform.isAarch64) [ expat libxml2 xz ]; }).overrideAttrs (attrs: { - postInstall = (attrs.postInstall or "") + lib.optionalString (stdenv.isLinux) '' + postInstall = (attrs.postInstall or "") + lib.optionalString (stdenv.hostPlatform.isLinux) '' ( cd $out/rider @@ -240,20 +240,20 @@ rec { rust-rover = (mkJetBrainsProduct { pname = "rust-rover"; - extraBuildInputs = lib.optionals (stdenv.isLinux) [ + extraBuildInputs = lib.optionals (stdenv.hostPlatform.isLinux) [ python3 openssl libxcrypt-legacy fontconfig xorg.libX11 libGL - ] ++ lib.optionals (stdenv.isLinux && stdenv.isAarch64) [ + ] ++ lib.optionals (stdenv.hostPlatform.isLinux && stdenv.hostPlatform.isAarch64) [ expat libxml2 xz ]; }).overrideAttrs (attrs: { - postFixup = (attrs.postFixup or "") + lib.optionalString (stdenv.isLinux) '' + postFixup = (attrs.postFixup or "") + lib.optionalString (stdenv.hostPlatform.isLinux) '' ( cd $out/rust-rover diff --git a/pkgs/applications/editors/jetbrains/plugins/specialPlugins.nix b/pkgs/applications/editors/jetbrains/plugins/specialPlugins.nix index dcd6554c791d..574938eef0d3 100644 --- a/pkgs/applications/editors/jetbrains/plugins/specialPlugins.nix +++ b/pkgs/applications/editors/jetbrains/plugins/specialPlugins.nix @@ -27,7 +27,7 @@ buildInputs = [ delve ]; buildPhase = let - arch = (if stdenv.isLinux then "linux" else "mac") + (if stdenv.isAarch64 then "arm" else ""); + arch = (if stdenv.hostPlatform.isLinux then "linux" else "mac") + (if stdenv.hostPlatform.isAarch64 then "arm" else ""); in '' runHook preBuild ln -sf ${delve}/bin/dlv lib/dlv/${arch}/dlv diff --git a/pkgs/applications/editors/lapce/default.nix b/pkgs/applications/editors/lapce/default.nix index 8de4d1882bc5..68ff13a0212a 100644 --- a/pkgs/applications/editors/lapce/default.nix +++ b/pkgs/applications/editors/lapce/default.nix @@ -25,7 +25,7 @@ , xorg }: let - rpathLibs = lib.optionals stdenv.isLinux [ + rpathLibs = lib.optionals stdenv.hostPlatform.isLinux [ libGL libxkbcommon xorg.libX11 @@ -89,9 +89,9 @@ rustPlatform.buildRustPackage rec { glib gtk3 openssl - ] ++ lib.optionals stdenv.isLinux [ + ] ++ lib.optionals stdenv.hostPlatform.isLinux [ fontconfig - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ libobjc Security CoreServices @@ -100,7 +100,7 @@ rustPlatform.buildRustPackage rec { AppKit ]; - postInstall = if stdenv.isLinux then '' + postInstall = if stdenv.hostPlatform.isLinux then '' install -Dm0644 $src/extra/images/logo.svg $out/share/icons/hicolor/scalable/apps/dev.lapce.lapce.svg install -Dm0644 $src/extra/linux/dev.lapce.lapce.desktop $out/share/applications/lapce.desktop @@ -125,6 +125,6 @@ rustPlatform.buildRustPackage rec { maintainers = with maintainers; [ elliot ]; mainProgram = "lapce"; # Undefined symbols for architecture x86_64: "_NSPasteboardTypeFileURL" - broken = stdenv.isDarwin && stdenv.isx86_64; + broken = stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isx86_64; }; } diff --git a/pkgs/applications/editors/libresprite/default.nix b/pkgs/applications/editors/libresprite/default.nix index 02e225a5ffe0..5d4031b064ec 100644 --- a/pkgs/applications/editors/libresprite/default.nix +++ b/pkgs/applications/editors/libresprite/default.nix @@ -69,7 +69,7 @@ stdenv.mkDerivation (finalAttrs: { SDL2_image lua # no v8 due to missing libplatform and libbase - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ AppKit Cocoa Foundation @@ -80,7 +80,7 @@ stdenv.mkDerivation (finalAttrs: { "-DWITH_WEBP_SUPPORT=ON" ]; - hardeningDisable = lib.optional stdenv.isDarwin "format"; + hardeningDisable = lib.optional stdenv.hostPlatform.isDarwin "format"; # Install mime icons. Note that the mimetype is still "x-aseprite" postInstall = '' @@ -116,6 +116,6 @@ stdenv.mkDerivation (finalAttrs: { maintainers = with maintainers; [ fgaz ]; platforms = platforms.all; # https://github.com/LibreSprite/LibreSprite/issues/308 - broken = stdenv.isDarwin; + broken = stdenv.hostPlatform.isDarwin; }; }) diff --git a/pkgs/applications/editors/lite-xl/default.nix b/pkgs/applications/editors/lite-xl/default.nix index 55fce51ac9f7..ac13fc3bf566 100644 --- a/pkgs/applications/editors/lite-xl/default.nix +++ b/pkgs/applications/editors/lite-xl/default.nix @@ -29,7 +29,7 @@ stdenv.mkDerivation rec { lua5_4 pcre2 SDL2 - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ Foundation ]; diff --git a/pkgs/applications/editors/mindforger/default.nix b/pkgs/applications/editors/mindforger/default.nix index bd8a4b0c648e..db4d65de7959 100644 --- a/pkgs/applications/editors/mindforger/default.nix +++ b/pkgs/applications/editors/mindforger/default.nix @@ -49,7 +49,7 @@ stdenv.mkDerivation rec { "CONFIG+=mfwebengine" ]; - postInstall = lib.optionalString stdenv.isDarwin '' + postInstall = lib.optionalString stdenv.hostPlatform.isDarwin '' mkdir "$out"/Applications mv app/mindforger.app "$out"/Applications/ ''; diff --git a/pkgs/applications/editors/nedit/default.nix b/pkgs/applications/editors/nedit/default.nix index 374c5ee28c84..d329220409c3 100644 --- a/pkgs/applications/editors/nedit/default.nix +++ b/pkgs/applications/editors/nedit/default.nix @@ -14,7 +14,7 @@ stdenv.mkDerivation rec { buildInputs = [ motif libXpm libXt ]; # the linux config works fine on darwin too! - buildFlags = lib.optional (stdenv.isLinux || stdenv.isDarwin) "linux"; + buildFlags = lib.optional (stdenv.hostPlatform.isLinux || stdenv.hostPlatform.isDarwin) "linux"; env.NIX_CFLAGS_COMPILE = "-DBUILD_UNTESTED_NEDIT -L${motif}/lib"; diff --git a/pkgs/applications/editors/neovim/gnvim/wrapper.nix b/pkgs/applications/editors/neovim/gnvim/wrapper.nix index 1cf02746f9ae..7869885d1b74 100644 --- a/pkgs/applications/editors/neovim/gnvim/wrapper.nix +++ b/pkgs/applications/editors/neovim/gnvim/wrapper.nix @@ -7,7 +7,7 @@ stdenv.mkDerivation { makeWrapper '${gnvim-unwrapped}/bin/gnvim' "$out/bin/gnvim" \ --prefix PATH : "${neovim}/bin" \ --set GNVIM_RUNTIME_PATH "${gnvim-unwrapped}/share/gnvim/runtime" - '' + lib.optionalString (!stdenv.isDarwin) '' + '' + lib.optionalString (!stdenv.hostPlatform.isDarwin) '' mkdir -p "$out/share" ln -s '${gnvim-unwrapped}/share/icons' "$out/share/icons" diff --git a/pkgs/applications/editors/neovim/wrapper.nix b/pkgs/applications/editors/neovim/wrapper.nix index 8b31ed0a2a38..8bcd1b5ebbd6 100644 --- a/pkgs/applications/editors/neovim/wrapper.nix +++ b/pkgs/applications/editors/neovim/wrapper.nix @@ -105,7 +105,7 @@ let luaRcContent = rcContent; # Remove the symlinks created by symlinkJoin which we need to perform # extra actions upon - postBuild = lib.optionalString stdenv.isLinux '' + postBuild = lib.optionalString stdenv.hostPlatform.isLinux '' rm $out/share/applications/nvim.desktop substitute ${neovim-unwrapped}/share/applications/nvim.desktop $out/share/applications/nvim.desktop \ --replace-warn 'Name=Neovim' 'Name=Neovim wrapper' diff --git a/pkgs/applications/editors/notepad-next/default.nix b/pkgs/applications/editors/notepad-next/default.nix index 45004d470281..2a20691351d1 100644 --- a/pkgs/applications/editors/notepad-next/default.nix +++ b/pkgs/applications/editors/notepad-next/default.nix @@ -27,7 +27,7 @@ mkDerivation rec { --replace '$$[QT_INSTALL_TRANSLATIONS]/qt_zh_CN.qm' "" ''; - postInstall = lib.optionalString stdenv.isDarwin '' + postInstall = lib.optionalString stdenv.hostPlatform.isDarwin '' mv $out/bin $out/Applications rm -fr $out/share ''; @@ -38,7 +38,7 @@ mkDerivation rec { license = licenses.gpl3Plus; platforms = platforms.unix; maintainers = [ maintainers.sebtm ]; - broken = stdenv.isAarch64; + broken = stdenv.hostPlatform.isAarch64; mainProgram = "NotepadNext"; }; } diff --git a/pkgs/applications/editors/nvi/default.nix b/pkgs/applications/editors/nvi/default.nix index 2001ba2497d1..c5ef872bffff 100644 --- a/pkgs/applications/editors/nvi/default.nix +++ b/pkgs/applications/editors/nvi/default.nix @@ -35,6 +35,6 @@ stdenv.mkDerivation rec { description = "Berkeley Vi Editor"; license = licenses.free; platforms = platforms.unix; - broken = stdenv.isDarwin; # never built on Hydra https://hydra.nixos.org/job/nixpkgs/trunk/nvi.x86_64-darwin + broken = stdenv.hostPlatform.isDarwin; # never built on Hydra https://hydra.nixos.org/job/nixpkgs/trunk/nvi.x86_64-darwin }; } diff --git a/pkgs/applications/editors/qxmledit/default.nix b/pkgs/applications/editors/qxmledit/default.nix index 1991b2a7bc77..946a56917d63 100644 --- a/pkgs/applications/editors/qxmledit/default.nix +++ b/pkgs/applications/editors/qxmledit/default.nix @@ -32,7 +32,7 @@ stdenv.mkDerivation rec { dontWrapQtApps = true; meta = with lib; { - broken = stdenv.isDarwin; + broken = stdenv.hostPlatform.isDarwin; description = "Simple XML editor based on qt libraries"; homepage = "https://sourceforge.net/projects/qxmledit"; license = licenses.lgpl2; diff --git a/pkgs/applications/editors/rehex/default.nix b/pkgs/applications/editors/rehex/default.nix index 55e737a78039..f6f1bf2b28b1 100644 --- a/pkgs/applications/editors/rehex/default.nix +++ b/pkgs/applications/editors/rehex/default.nix @@ -30,19 +30,19 @@ stdenv.mkDerivation rec { }; nativeBuildInputs = [ pkg-config which zip ] - ++ lib.optionals stdenv.isDarwin [ libicns ]; + ++ lib.optionals stdenv.hostPlatform.isDarwin [ libicns ]; buildInputs = [ botan3 capstone jansson libunistring wxGTK32 ] ++ (with lua53Packages; [ lua busted ]) ++ (with perlPackages; [ perl TemplateToolkit ]) - ++ lib.optionals stdenv.isLinux [ gtk3 ] - ++ lib.optionals stdenv.isDarwin [ Carbon Cocoa IOKit ]; + ++ lib.optionals stdenv.hostPlatform.isLinux [ gtk3 ] + ++ lib.optionals stdenv.hostPlatform.isDarwin [ Carbon Cocoa IOKit ]; makeFlags = [ "prefix=${placeholder "out"}" "BOTAN_PKG=botan-3" "CXXSTD=-std=c++20" - ] ++ lib.optionals stdenv.isDarwin [ "-f Makefile.osx" ]; + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ "-f Makefile.osx" ]; enableParallelBuilding = true; diff --git a/pkgs/applications/editors/rstudio/default.nix b/pkgs/applications/editors/rstudio/default.nix index 4d606904e2f6..55998bcbe3c9 100644 --- a/pkgs/applications/editors/rstudio/default.nix +++ b/pkgs/applications/editors/rstudio/default.nix @@ -212,7 +212,7 @@ in ''; meta = { - broken = (stdenv.isLinux && stdenv.isAarch64); + broken = (stdenv.hostPlatform.isLinux && stdenv.hostPlatform.isAarch64); inherit description; homepage = "https://www.rstudio.com/"; license = lib.licenses.agpl3Only; diff --git a/pkgs/applications/editors/sublime/2/default.nix b/pkgs/applications/editors/sublime/2/default.nix index 6c9a43779f76..a57fc8d7de90 100644 --- a/pkgs/applications/editors/sublime/2/default.nix +++ b/pkgs/applications/editors/sublime/2/default.nix @@ -36,7 +36,7 @@ stdenv.mkDerivation rec { echo ${libPath} patchelf \ --interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \ - --set-rpath ${libPath}:${stdenv.cc.cc.lib}/lib${lib.optionalString stdenv.is64bit "64"} \ + --set-rpath ${libPath}:${stdenv.cc.cc.lib}/lib${lib.optionalString stdenv.hostPlatform.is64bit "64"} \ $out/sublime/sublime_text mkdir -p $out/share/icons diff --git a/pkgs/applications/editors/sublime/3/common.nix b/pkgs/applications/editors/sublime/3/common.nix index ad89c80fc8e4..7eff7d9bf4df 100644 --- a/pkgs/applications/editors/sublime/3/common.nix +++ b/pkgs/applications/editors/sublime/3/common.nix @@ -65,7 +65,7 @@ let for binary in ${ builtins.concatStringsSep " " binaries }; do patchelf \ --interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \ - --set-rpath ${libPath}:${stdenv.cc.cc.lib}/lib${lib.optionalString stdenv.is64bit "64"} \ + --set-rpath ${libPath}:${stdenv.cc.cc.lib}/lib${lib.optionalString stdenv.hostPlatform.is64bit "64"} \ $binary done @@ -92,7 +92,7 @@ let postFixup = '' wrapProgram $out/sublime_bash \ - --set LD_PRELOAD "${stdenv.cc.cc.lib}/lib${lib.optionalString stdenv.is64bit "64"}/libgcc_s.so.1" + --set LD_PRELOAD "${stdenv.cc.cc.lib}/lib${lib.optionalString stdenv.hostPlatform.is64bit "64"}/libgcc_s.so.1" wrapProgram $out/${primaryBinary} \ --set LD_PRELOAD "${libredirect}/lib/libredirect.so" \ @@ -101,7 +101,7 @@ let "''${gappsWrapperArgs[@]}" # Without this, plugin_host crashes, even though it has the rpath - wrapProgram $out/plugin_host --prefix LD_PRELOAD : ${stdenv.cc.cc.lib}/lib${lib.optionalString stdenv.is64bit "64"}/libgcc_s.so.1:${lib.getLib openssl}/lib/libssl.so:${bzip2.out}/lib/libbz2.so + wrapProgram $out/plugin_host --prefix LD_PRELOAD : ${stdenv.cc.cc.lib}/lib${lib.optionalString stdenv.hostPlatform.is64bit "64"}/libgcc_s.so.1:${lib.getLib openssl}/lib/libssl.so:${bzip2.out}/lib/libbz2.so ''; }; in stdenv.mkDerivation (rec { diff --git a/pkgs/applications/editors/sublime/4/common.nix b/pkgs/applications/editors/sublime/4/common.nix index 730f9c10b8f5..b594633ea3cb 100644 --- a/pkgs/applications/editors/sublime/4/common.nix +++ b/pkgs/applications/editors/sublime/4/common.nix @@ -88,7 +88,7 @@ let for binary in ${builtins.concatStringsSep " " binaries}; do patchelf \ --interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \ - --set-rpath ${lib.makeLibraryPath neededLibraries}:${stdenv.cc.cc.lib}/lib${lib.optionalString stdenv.is64bit "64"} \ + --set-rpath ${lib.makeLibraryPath neededLibraries}:${stdenv.cc.cc.lib}/lib${lib.optionalString stdenv.hostPlatform.is64bit "64"} \ $binary done diff --git a/pkgs/applications/editors/texmacs/default.nix b/pkgs/applications/editors/texmacs/default.nix index ce8939dfc34d..92d162cdc300 100644 --- a/pkgs/applications/editors/texmacs/default.nix +++ b/pkgs/applications/editors/texmacs/default.nix @@ -58,18 +58,18 @@ stdenv.mkDerivation { sqlite git python3 - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ qtmacextras ]; - cmakeFlags = lib.optionals stdenv.isDarwin [ + cmakeFlags = lib.optionals stdenv.hostPlatform.isDarwin [ (lib.cmakeFeature "TEXMACS_GUI" "Qt") (lib.cmakeFeature "CMAKE_INSTALL_PREFIX" "./TeXmacs.app/Contents/Resources") ]; env.NIX_LDFLAGS = "-lz"; - postInstall = lib.optionalString stdenv.isDarwin '' + postInstall = lib.optionalString stdenv.hostPlatform.isDarwin '' mkdir -p $out/{Applications,bin} mv TeXmacs.app $out/Applications/ makeWrapper $out/Applications/TeXmacs.app/Contents/MacOS/TeXmacs $out/bin/texmacs @@ -87,7 +87,7 @@ stdenv.mkDerivation { ]) ]; - postFixup = lib.optionalString (!stdenv.isDarwin) '' + postFixup = lib.optionalString (!stdenv.hostPlatform.isDarwin) '' wrapQtApp $out/bin/texmacs ''; diff --git a/pkgs/applications/editors/texstudio/default.nix b/pkgs/applications/editors/texstudio/default.nix index f0bed0eb3863..728ff5525e98 100644 --- a/pkgs/applications/editors/texstudio/default.nix +++ b/pkgs/applications/editors/texstudio/default.nix @@ -28,11 +28,11 @@ stdenv.mkDerivation (finalAttrs: { qttools quazip zlib - ] ++ lib.optionals stdenv.isLinux [ + ] ++ lib.optionals stdenv.hostPlatform.isLinux [ qtwayland ]; - postInstall = lib.optionalString stdenv.isDarwin '' + postInstall = lib.optionalString stdenv.hostPlatform.isDarwin '' mkdir -p "$out/Applications" mv "$out/bin/texstudio.app" "$out/Applications" rm -d "$out/bin" diff --git a/pkgs/applications/editors/texworks/default.nix b/pkgs/applications/editors/texworks/default.nix index 4ddd4c9cb6c1..a20bc426b3ca 100644 --- a/pkgs/applications/editors/texworks/default.nix +++ b/pkgs/applications/editors/texworks/default.nix @@ -36,7 +36,7 @@ stdenv.mkDerivation rec { qttools ] ++ lib.optional withLua lua ++ lib.optional withPython python3 - ++ lib.optional stdenv.isLinux qtwayland; + ++ lib.optional stdenv.hostPlatform.isLinux qtwayland; cmakeFlags = [ "-DQT_DEFAULT_MAJOR_VERSION=6" diff --git a/pkgs/applications/editors/tijolo/default.nix b/pkgs/applications/editors/tijolo/default.nix index 060c30a171a6..54f0f154ab37 100644 --- a/pkgs/applications/editors/tijolo/default.nix +++ b/pkgs/applications/editors/tijolo/default.nix @@ -38,7 +38,7 @@ crystal.buildCrystalPackage rec { ''; nativeBuildInputs = [ wrapGAppsHook4 gobject-introspection ] - ++ lib.optionals stdenv.isDarwin [ desktopToDarwinBundle ]; + ++ lib.optionals stdenv.hostPlatform.isDarwin [ desktopToDarwinBundle ]; buildInputs = [ gtk4 libadwaita vte-gtk4 libgit2 gtksourceview5 editorconfig-core-c ]; buildTargets = [ "all" ]; diff --git a/pkgs/applications/editors/vim/full.nix b/pkgs/applications/editors/vim/full.nix index 663dc5b688c7..5183ee5d39f2 100644 --- a/pkgs/applications/editors/vim/full.nix +++ b/pkgs/applications/editors/vim/full.nix @@ -11,7 +11,7 @@ , features ? "huge" # One of tiny, small, normal, big or huge , wrapPythonDrv ? false -, guiSupport ? config.vim.gui or (if stdenv.isDarwin then "gtk2" else "gtk3") +, guiSupport ? config.vim.gui or (if stdenv.hostPlatform.isDarwin then "gtk2" else "gtk3") , luaSupport ? config.vim.lua or true , perlSupport ? config.vim.perl or false # Perl interpreter , pythonSupport ? config.vim.python or true # Python interpreter @@ -104,7 +104,7 @@ in stdenv.mkDerivation { "vim_cv_memmove_handles_overlap=yes" ] ++ lib.optional (guiSupport == "gtk2" || guiSupport == "gtk3") "--enable-gui=${guiSupport}" - ++ lib.optional stdenv.isDarwin + ++ lib.optional stdenv.hostPlatform.isDarwin (if darwinSupport then "--enable-darwin" else "--disable-darwin") ++ lib.optionals luaSupport [ "--with-lua-prefix=${lua}" @@ -163,7 +163,7 @@ in stdenv.mkDerivation { ++ lib.optional sodiumSupport libsodium; # error: '__declspec' attributes are not enabled; use '-fdeclspec' or '-fms-extensions' to enable support for __declspec attributes - env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.isDarwin "-fdeclspec"; + env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.hostPlatform.isDarwin "-fdeclspec"; preConfigure = lib.optionalString ftNixSupport '' cp ${vimPlugins.vim-nix.src}/ftplugin/nix.vim runtime/ftplugin/nix.vim @@ -176,7 +176,7 @@ in stdenv.mkDerivation { postInstall = '' ln -s $out/bin/vim $out/bin/vi - '' + lib.optionalString stdenv.isLinux '' + '' + lib.optionalString stdenv.hostPlatform.isLinux '' ln -sfn '${nixosRuntimepath}' "$out"/share/vim/vimrc ''; diff --git a/pkgs/applications/editors/vim/plugins/avante-nvim/default.nix b/pkgs/applications/editors/vim/plugins/avante-nvim/default.nix index 0572977f207b..f3218a0f2ea4 100644 --- a/pkgs/applications/editors/vim/plugins/avante-nvim/default.nix +++ b/pkgs/applications/editors/vim/plugins/avante-nvim/default.nix @@ -47,7 +47,7 @@ let [ openssl ] - ++ lib.optionals stdenv.isDarwin [ + ++ lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.Security ]; diff --git a/pkgs/applications/editors/vim/plugins/overrides.nix b/pkgs/applications/editors/vim/plugins/overrides.nix index 24876a338736..3d2d9f05881a 100644 --- a/pkgs/applications/editors/vim/plugins/overrides.nix +++ b/pkgs/applications/editors/vim/plugins/overrides.nix @@ -478,7 +478,7 @@ in buildInputs = [ libuv.dev - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.AppKit ]; }; @@ -492,7 +492,7 @@ in # Note: the destination should be generator.so, even on darwin # https://github.com/mistricky/codesnap.nvim/blob/main/scripts/build_generator.sh postInstall = let - extension = if stdenv.isDarwin then "dylib" else "so"; + extension = if stdenv.hostPlatform.isDarwin then "dylib" else "so"; in '' rm -r $out/lua/*.so cp ${codesnap-lib}/lib/libgenerator.${extension} $out/lua/generator.so @@ -597,7 +597,7 @@ in rev = "cd97c25320fb0a672b11bcd95d8332bb3088ecce"; hash = "sha256-66NtKteM1mvHP5wAU4e9JbsF+bq91lmCDcTh/6RPhoo="; }; - extension = if stdenv.isDarwin then "dylib" else "so"; + extension = if stdenv.hostPlatform.isDarwin then "dylib" else "so"; rustPackage = rustPlatform.buildRustPackage { pname = "cord.nvim-rust"; inherit version src; @@ -1003,11 +1003,11 @@ in src = LanguageClient-neovim-src; cargoHash = "sha256-H34UqJ6JOwuSABdOup5yKeIwFrGc83TUnw1ggJEx9o4="; - buildInputs = lib.optionals stdenv.isDarwin [ CoreServices ]; + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ CoreServices ]; # FIXME: Use impure version of CoreFoundation because of missing symbols. # Undefined symbols for architecture x86_64: "_CFURLResourceIsReachable" - preConfigure = lib.optionalString stdenv.isDarwin '' + preConfigure = lib.optionalString stdenv.hostPlatform.isDarwin '' export NIX_LDFLAGS="-F${CoreFoundation}/Library/Frameworks -framework CoreFoundation $NIX_LDFLAGS" ''; }; @@ -1541,7 +1541,7 @@ in buildInputs = [ openssl ] - ++ lib.optionals stdenv.isDarwin [ + ++ lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.Security darwin.apple_sdk.frameworks.SystemConfiguration ]; @@ -1593,7 +1593,7 @@ in pname = "sniprun-bin"; inherit version src; - buildInputs = lib.optionals stdenv.isDarwin [ + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.Security ]; @@ -1895,7 +1895,7 @@ in }; vim-addon-manager = super.vim-addon-manager.overrideAttrs { - buildInputs = lib.optional stdenv.isDarwin Cocoa; + buildInputs = lib.optional stdenv.hostPlatform.isDarwin Cocoa; }; vim-addon-mru = super.vim-addon-mru.overrideAttrs { @@ -1956,7 +1956,7 @@ in src = old.src.overrideAttrs (srcOld: { postFetch = (srcOld.postFetch or "") - + lib.optionalString (!stdenv.isDarwin) '' + + lib.optionalString (!stdenv.hostPlatform.isDarwin) '' rm $out/colors/darkBlue.vim ''; }); diff --git a/pkgs/applications/editors/vim/plugins/vim-clap/default.nix b/pkgs/applications/editors/vim/plugins/vim-clap/default.nix index 84a906b9e882..391370c54efd 100644 --- a/pkgs/applications/editors/vim/plugins/vim-clap/default.nix +++ b/pkgs/applications/editors/vim/plugins/vim-clap/default.nix @@ -49,7 +49,7 @@ let buildInputs = [ libgit2 zlib - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.AppKit darwin.apple_sdk.frameworks.CoreServices darwin.apple_sdk.frameworks.SystemConfiguration diff --git a/pkgs/applications/editors/vim/vimacs.nix b/pkgs/applications/editors/vim/vimacs.nix index e65439df5236..e54ac39b2ae4 100644 --- a/pkgs/applications/editors/vim/vimacs.nix +++ b/pkgs/applications/editors/vim/vimacs.nix @@ -1,5 +1,5 @@ { lib, stdenv, config, vim-full, macvim, vimPlugins -, useMacvim ? stdenv.isDarwin && (config.vimacs.macvim or true) +, useMacvim ? stdenv.hostPlatform.isDarwin && (config.vimacs.macvim or true) , vimacsExtraArgs ? "" }: stdenv.mkDerivation rec { diff --git a/pkgs/applications/editors/vscode/extensions/chenglou92.rescript-vscode/default.nix b/pkgs/applications/editors/vscode/extensions/chenglou92.rescript-vscode/default.nix index d0b27457b68a..686ff8652a45 100644 --- a/pkgs/applications/editors/vscode/extensions/chenglou92.rescript-vscode/default.nix +++ b/pkgs/applications/editors/vscode/extensions/chenglou92.rescript-vscode/default.nix @@ -8,9 +8,9 @@ let version = "1.54.0"; rescript-editor-analysis = callPackage ./rescript-editor-analysis.nix { inherit version; }; arch = - if stdenv.isLinux then + if stdenv.hostPlatform.isLinux then "linux" - else if stdenv.isDarwin then + else if stdenv.hostPlatform.isDarwin then "darwin" else throw "Unsupported system: ${stdenv.system}"; diff --git a/pkgs/applications/editors/vscode/extensions/default.nix b/pkgs/applications/editors/vscode/extensions/default.nix index cade496d6b53..7a6c1e0417b8 100644 --- a/pkgs/applications/editors/vscode/extensions/default.nix +++ b/pkgs/applications/editors/vscode/extensions/default.nix @@ -1069,7 +1069,7 @@ let version = "0.8.44"; } // sources.${stdenv.system}; - nativeBuildInputs = lib.optionals stdenv.isLinux [ autoPatchelfHook ]; + nativeBuildInputs = lib.optionals stdenv.hostPlatform.isLinux [ autoPatchelfHook ]; buildInputs = [ stdenv.cc.cc.lib ]; meta = { description = "Open-source autopilot for software development - bring the power of ChatGPT to your IDE"; @@ -3223,7 +3223,7 @@ let version = "2.1.11"; } // sources.${stdenv.system}; - nativeBuildInputs = lib.optionals stdenv.isLinux [ autoPatchelfHook ]; + nativeBuildInputs = lib.optionals stdenv.hostPlatform.isLinux [ autoPatchelfHook ]; buildInputs = [ stdenv.cc.cc.lib zlib diff --git a/pkgs/applications/editors/vscode/extensions/ms-dotnettools.csdevkit/default.nix b/pkgs/applications/editors/vscode/extensions/ms-dotnettools.csdevkit/default.nix index 8d665025bba2..68a3673134ce 100644 --- a/pkgs/applications/editors/vscode/extensions/ms-dotnettools.csdevkit/default.nix +++ b/pkgs/applications/editors/vscode/extensions/ms-dotnettools.csdevkit/default.nix @@ -106,7 +106,7 @@ buildVscodeMarketplaceExtension { chmod +x "${bin}" '') extInfo.binaries )) - + lib.optionalString stdenv.isLinux ( + + lib.optionalString stdenv.hostPlatform.isLinux ( lib.concatStringsSep "\n" ( map (bin: '' patchelf_common "${bin}" diff --git a/pkgs/applications/editors/vscode/extensions/ms-dotnettools.csharp/default.nix b/pkgs/applications/editors/vscode/extensions/ms-dotnettools.csharp/default.nix index 9c26f92ca961..3e988c627219 100644 --- a/pkgs/applications/editors/vscode/extensions/ms-dotnettools.csharp/default.nix +++ b/pkgs/applications/editors/vscode/extensions/ms-dotnettools.csharp/default.nix @@ -99,7 +99,7 @@ buildVscodeMarketplaceExtension { chmod +x "${bin}" '') extInfo.binaries )) - + lib.optionalString stdenv.isLinux ( + + lib.optionalString stdenv.hostPlatform.isLinux ( lib.concatStringsSep "\n" ( map (bin: '' patchelf_common "${bin}" diff --git a/pkgs/applications/editors/vscode/extensions/rust-lang.rust-analyzer/default.nix b/pkgs/applications/editors/vscode/extensions/rust-lang.rust-analyzer/default.nix index a53fc7b8ca5b..e937da9c44b3 100644 --- a/pkgs/applications/editors/vscode/extensions/rust-lang.rust-analyzer/default.nix +++ b/pkgs/applications/editors/vscode/extensions/rust-lang.rust-analyzer/default.nix @@ -52,7 +52,7 @@ let pkg-config libsecret ] - ++ lib.optionals stdenv.isDarwin [ + ++ lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.AppKit darwin.apple_sdk.frameworks.Security ]; diff --git a/pkgs/applications/editors/vscode/extensions/sourcery.sourcery/default.nix b/pkgs/applications/editors/vscode/extensions/sourcery.sourcery/default.nix index d9c3ee2358e2..0e61678a8f4b 100644 --- a/pkgs/applications/editors/vscode/extensions/sourcery.sourcery/default.nix +++ b/pkgs/applications/editors/vscode/extensions/sourcery.sourcery/default.nix @@ -16,11 +16,11 @@ vscode-utils.buildVscodeMarketplaceExtension { postPatch = '' pushd sourcery_binaries/install - rm -r win ${if stdenv.isLinux then "mac" else "linux"} + rm -r win ${if stdenv.hostPlatform.isLinux then "mac" else "linux"} popd ''; - nativeBuildInputs = lib.optionals stdenv.isLinux [ autoPatchelfHook ]; + nativeBuildInputs = lib.optionals stdenv.hostPlatform.isLinux [ autoPatchelfHook ]; buildInputs = [ stdenv.cc.cc.lib diff --git a/pkgs/applications/editors/vscode/extensions/vadimcn.vscode-lldb/default.nix b/pkgs/applications/editors/vscode/extensions/vadimcn.vscode-lldb/default.nix index 0d55381e6597..20b81c3c70cd 100644 --- a/pkgs/applications/editors/vscode/extensions/vadimcn.vscode-lldb/default.nix +++ b/pkgs/applications/editors/vscode/extensions/vadimcn.vscode-lldb/default.nix @@ -41,11 +41,11 @@ let cargoHash = "sha256-e/Jki/4pCs0qzaBVR4iiUhdBFmWlTZYREQkuFSoWYFo="; - buildInputs = lib.optionals stdenv.isDarwin [ lldb ]; + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ lldb ]; nativeBuildInputs = [ makeWrapper ]; - env = lib.optionalAttrs stdenv.isDarwin { NIX_LDFLAGS = "-llldb -lc++abi"; }; + env = lib.optionalAttrs stdenv.hostPlatform.isDarwin { NIX_LDFLAGS = "-llldb -lc++abi"; }; buildAndTestSubdir = "adapter"; @@ -90,7 +90,7 @@ let buildInputs = [ libsecret ] - ++ lib.optionals stdenv.isDarwin ( + ++ lib.optionals stdenv.hostPlatform.isDarwin ( with darwin.apple_sdk.frameworks; [ Security @@ -114,7 +114,7 @@ let # entitlement which nixpkgs' lldb-server does not yet provide; see # for details lldbServer = - if stdenv.isDarwin then + if stdenv.hostPlatform.isDarwin then "/Applications/Xcode.app/Contents/SharedFrameworks/LLDB.framework/Versions/A/Resources/debugserver" else "${lldb.out}/bin/lldb-server"; @@ -150,7 +150,7 @@ stdenv.mkDerivation { '' cp -r ${nodeDeps}/lib/node_modules . '' - + lib.optionalString stdenv.isDarwin '' + + lib.optionalString stdenv.hostPlatform.isDarwin '' export HOME="$TMPDIR/home" mkdir $HOME ''; @@ -161,7 +161,7 @@ stdenv.mkDerivation { ]; makeFlags = [ "vsix_bootstrap" ]; - preBuild = lib.optionalString stdenv.isDarwin '' + preBuild = lib.optionalString stdenv.hostPlatform.isDarwin '' export HOME=$TMPDIR ''; diff --git a/pkgs/applications/editors/vscode/generic.nix b/pkgs/applications/editors/vscode/generic.nix index f2807a1b592d..defae3cf9617 100644 --- a/pkgs/applications/editors/vscode/generic.nix +++ b/pkgs/applications/editors/vscode/generic.nix @@ -157,12 +157,12 @@ in ]; buildInputs = [ libsecret libXScrnSaver libxshmfence ] - ++ lib.optionals (!stdenv.isDarwin) [ alsa-lib at-spi2-atk libkrb5 mesa nss nspr systemd xorg.libxkbfile ]; + ++ lib.optionals (!stdenv.hostPlatform.isDarwin) [ alsa-lib at-spi2-atk libkrb5 mesa nss nspr systemd xorg.libxkbfile ]; - runtimeDependencies = lib.optionals stdenv.isLinux [ (lib.getLib systemd) fontconfig.lib libdbusmenu wayland libsecret ]; + runtimeDependencies = lib.optionals stdenv.hostPlatform.isLinux [ (lib.getLib systemd) fontconfig.lib libdbusmenu wayland libsecret ]; nativeBuildInputs = [ unzip ] - ++ lib.optionals stdenv.isLinux [ + ++ lib.optionals stdenv.hostPlatform.isLinux [ autoPatchelfHook asar copyDesktopItems @@ -176,7 +176,7 @@ in installPhase = '' runHook preInstall - '' + (if stdenv.isDarwin then '' + '' + (if stdenv.hostPlatform.isDarwin then '' mkdir -p "$out/Applications/${longName}.app" "$out/bin" cp -r ./* "$out/Applications/${longName}.app" ln -s "$out/Applications/${longName}.app/Contents/Resources/app/bin/${sourceExecutableName}" "$out/bin/${executableName}" @@ -205,7 +205,7 @@ in preFixup = '' gappsWrapperArgs+=( ${ # we cannot use runtimeDependencies otherwise libdbusmenu do not work on kde - lib.optionalString stdenv.isLinux + lib.optionalString stdenv.hostPlatform.isLinux "--prefix LD_LIBRARY_PATH : ${lib.makeLibraryPath [ libdbusmenu ]}"} # Add gio to PATH so that moving files to the trash works when not using a desktop environment --prefix PATH : ${glib.bin}/bin @@ -216,7 +216,7 @@ in # See https://github.com/NixOS/nixpkgs/issues/49643#issuecomment-873853897 # linux only because of https://github.com/NixOS/nixpkgs/issues/138729 - postPatch = lib.optionalString stdenv.isLinux '' + postPatch = lib.optionalString stdenv.hostPlatform.isLinux '' # this is a fix for "save as root" functionality packed="resources/app/node_modules.asar" unpacked="resources/app/node_modules" @@ -234,7 +234,7 @@ in '' + ( let vscodeRipgrep = - if stdenv.isDarwin then + if stdenv.hostPlatform.isDarwin then "Contents/Resources/app/node_modules.asar.unpacked/@vscode/ripgrep/bin/rg" else "resources/app/node_modules/@vscode/ripgrep/bin/rg"; @@ -247,7 +247,7 @@ in '' ); - postFixup = lib.optionalString stdenv.isLinux '' + postFixup = lib.optionalString stdenv.hostPlatform.isLinux '' patchelf \ --add-needed ${libglvnd}/lib/libGLESv2.so.2 \ --add-needed ${libglvnd}/lib/libGL.so.1 \ diff --git a/pkgs/applications/editors/vscode/vscode.nix b/pkgs/applications/editors/vscode/vscode.nix index 3a2528cde7fd..35f6601d60be 100644 --- a/pkgs/applications/editors/vscode/vscode.nix +++ b/pkgs/applications/editors/vscode/vscode.nix @@ -10,9 +10,9 @@ # documented in https://wiki.nixos.org/wiki/Visual_Studio_Code#Insiders_Build # On MacOS the insider binary is still called code instead of code-insiders as # of 2023-08-06. -, sourceExecutableName ? "code" + lib.optionalString (isInsiders && stdenv.isLinux) "-insiders" +, sourceExecutableName ? "code" + lib.optionalString (isInsiders && stdenv.hostPlatform.isLinux) "-insiders" , commandLineArgs ? "" -, useVSCodeRipgrep ? stdenv.isDarwin +, useVSCodeRipgrep ? stdenv.hostPlatform.isDarwin }: let @@ -27,7 +27,7 @@ let armv7l-linux = "linux-armhf"; }.${system} or throwSystem; - archive_fmt = if stdenv.isDarwin then "zip" else "tar.gz"; + archive_fmt = if stdenv.hostPlatform.isDarwin then "zip" else "tar.gz"; sha256 = { x86_64-linux = "0475kwa3ym14l9ggaf2hg4lcrc0lpi9vchzj4sgj4c3606l9i1aa"; @@ -79,7 +79,7 @@ in # Editing the `code` binary within the app bundle causes the bundle's signature # to be invalidated, which prevents launching starting with macOS Ventura, because VS Code is notarized. # See https://eclecticlight.co/2022/06/17/app-security-changes-coming-in-ventura/ for more information. - dontFixup = stdenv.isDarwin; + dontFixup = stdenv.hostPlatform.isDarwin; meta = with lib; { description = '' diff --git a/pkgs/applications/editors/vscode/vscodium.nix b/pkgs/applications/editors/vscode/vscodium.nix index 312e49e8d02b..54a1a98ad7c6 100644 --- a/pkgs/applications/editors/vscode/vscodium.nix +++ b/pkgs/applications/editors/vscode/vscodium.nix @@ -1,4 +1,4 @@ -{ lib, stdenv, callPackage, fetchurl, nixosTests, commandLineArgs ? "", useVSCodeRipgrep ? stdenv.isDarwin }: +{ lib, stdenv, callPackage, fetchurl, nixosTests, commandLineArgs ? "", useVSCodeRipgrep ? stdenv.hostPlatform.isDarwin }: let inherit (stdenv.hostPlatform) system; @@ -12,7 +12,7 @@ let armv7l-linux = "linux-armhf"; }.${system} or throwSystem; - archive_fmt = if stdenv.isDarwin then "zip" else "tar.gz"; + archive_fmt = if stdenv.hostPlatform.isDarwin then "zip" else "tar.gz"; sha256 = { x86_64-linux = "14pqi5l7zbkhpsl8hd7mqss4xkqnxf0f0h5bs710iadpcscgpndf"; @@ -22,7 +22,7 @@ let armv7l-linux = "1rjv5c85ffy5szxhf71kjmvxiahyyvx2dl6183v5q7apv9pa64hj"; }.${system} or throwSystem; - sourceRoot = lib.optionalString (!stdenv.isDarwin) "."; + sourceRoot = lib.optionalString (!stdenv.hostPlatform.isDarwin) "."; in callPackage ./generic.nix rec { inherit sourceRoot commandLineArgs useVSCodeRipgrep; diff --git a/pkgs/applications/editors/vscode/with-extensions.nix b/pkgs/applications/editors/vscode/with-extensions.nix index bbe5fec19d91..25c97f52d765 100644 --- a/pkgs/applications/editors/vscode/with-extensions.nix +++ b/pkgs/applications/editors/vscode/with-extensions.nix @@ -68,7 +68,7 @@ runCommand "${wrappedPkgName}-with-extensions-${wrappedPkgVersion}" { dontPatchELF = true; dontStrip = true; meta = vscode.meta; -} (if stdenv.isDarwin then '' +} (if stdenv.hostPlatform.isDarwin then '' mkdir -p $out/bin/ mkdir -p "$out/Applications/${longName}.app/Contents/MacOS" diff --git a/pkgs/applications/editors/wxhexeditor/default.nix b/pkgs/applications/editors/wxhexeditor/default.nix index 23ef7a0ef567..eee370d174e0 100644 --- a/pkgs/applications/editors/wxhexeditor/default.nix +++ b/pkgs/applications/editors/wxhexeditor/default.nix @@ -36,7 +36,7 @@ stdenv.mkDerivation rec { buildInputs = lib.optionals stdenv.cc.isClang [ openmp - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ Cocoa ]; diff --git a/pkgs/applications/editors/xedit/default.nix b/pkgs/applications/editors/xedit/default.nix index 6fa4a67dfd6b..eb8f2ee92592 100644 --- a/pkgs/applications/editors/xedit/default.nix +++ b/pkgs/applications/editors/xedit/default.nix @@ -23,7 +23,7 @@ stdenv.mkDerivation rec { }; # ./lisp/mathimp.c:493:10: error: implicitly declaring library function 'finite' with type 'int (double)' - postPatch = lib.optionalString stdenv.isDarwin '' + postPatch = lib.optionalString stdenv.hostPlatform.isDarwin '' for i in $(find . -type f -name "*.c"); do substituteInPlace $i --replace "finite" "isfinite" done @@ -49,7 +49,7 @@ stdenv.mkDerivation rec { maintainers = with maintainers; [ shamilton ]; platforms = platforms.unix; # never built on aarch64-darwin, x86_64-darwin since first introduction in nixpkgs - broken = stdenv.isDarwin; + broken = stdenv.hostPlatform.isDarwin; mainProgram = "xedit"; }; } diff --git a/pkgs/applications/editors/xmlcopyeditor/default.nix b/pkgs/applications/editors/xmlcopyeditor/default.nix index fe3a12a37c20..0c58d35042ae 100644 --- a/pkgs/applications/editors/xmlcopyeditor/default.nix +++ b/pkgs/applications/editors/xmlcopyeditor/default.nix @@ -46,7 +46,7 @@ stdenv.mkDerivation rec { pcre2 wxGTK32 xercesc - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ Cocoa ]; diff --git a/pkgs/applications/editors/zee/default.nix b/pkgs/applications/editors/zee/default.nix index 38ca48ee4056..cea97686072c 100644 --- a/pkgs/applications/editors/zee/default.nix +++ b/pkgs/applications/editors/zee/default.nix @@ -18,7 +18,7 @@ rustPlatform.buildRustPackage rec { nativeBuildInputs = [ pkg-config ]; - buildInputs = [ openssl ] ++ lib.optional stdenv.isDarwin Security; + buildInputs = [ openssl ] ++ lib.optional stdenv.hostPlatform.isDarwin Security; # disable downloading and building the tree-sitter grammars at build time # grammars can be configured in a config file and installed with `zee --build` diff --git a/pkgs/applications/emulators/86box/default.nix b/pkgs/applications/emulators/86box/default.nix index f4e1827c8e62..ac306cf5cdec 100644 --- a/pkgs/applications/emulators/86box/default.nix +++ b/pkgs/applications/emulators/86box/default.nix @@ -33,7 +33,7 @@ enableDynarec ? with stdenv.hostPlatform; isx86 || isAarch, enableNewDynarec ? enableDynarec && stdenv.hostPlatform.isAarch, enableVncRenderer ? false, - enableWayland ? stdenv.isLinux, + enableWayland ? stdenv.hostPlatform.isLinux, unfreeEnableDiscord ? false, unfreeEnableRoms ? false, }: @@ -88,20 +88,20 @@ stdenv.mkDerivation (finalAttrs: { libopus.dev libmpg123.dev ] - ++ lib.optional stdenv.isLinux alsa-lib + ++ lib.optional stdenv.hostPlatform.isLinux alsa-lib ++ lib.optional enableWayland wayland ++ lib.optional enableVncRenderer libvncserver - ++ lib.optional stdenv.isDarwin darwin.apple_sdk_11_0.libs.xpc; + ++ lib.optional stdenv.hostPlatform.isDarwin darwin.apple_sdk_11_0.libs.xpc; cmakeFlags = - lib.optional stdenv.isDarwin "-DCMAKE_MACOSX_BUNDLE=OFF" + lib.optional stdenv.hostPlatform.isDarwin "-DCMAKE_MACOSX_BUNDLE=OFF" ++ lib.optional enableNewDynarec "-DNEW_DYNAREC=ON" ++ lib.optional enableVncRenderer "-DVNC=ON" ++ lib.optional (!enableDynarec) "-DDYNAREC=OFF" ++ lib.optional (!unfreeEnableDiscord) "-DDISCORD=OFF"; postInstall = - lib.optionalString stdenv.isLinux '' + lib.optionalString stdenv.hostPlatform.isLinux '' install -Dm644 -t $out/share/applications $src/src/unix/assets/net.86box.86Box.desktop for size in 48 64 72 96 128 192 256 512; do @@ -129,7 +129,7 @@ stdenv.mkDerivation (finalAttrs: { preFixup = let libPath = lib.makeLibraryPath ([ libpcap ] ++ lib.optional unfreeEnableDiscord discord-gamesdk); - libPathVar = if stdenv.isDarwin then "DYLD_LIBRARY_PATH" else "LD_LIBRARY_PATH"; + libPathVar = if stdenv.hostPlatform.isDarwin then "DYLD_LIBRARY_PATH" else "LD_LIBRARY_PATH"; in '' makeWrapperArgs+=(--prefix ${libPathVar} : "${libPath}") diff --git a/pkgs/applications/emulators/bsnes/ares/default.nix b/pkgs/applications/emulators/bsnes/ares/default.nix index f7fd332c7a33..df08235529e5 100644 --- a/pkgs/applications/emulators/bsnes/ares/default.nix +++ b/pkgs/applications/emulators/bsnes/ares/default.nix @@ -44,14 +44,14 @@ stdenv.mkDerivation (finalAttrs: { pkg-config which wrapGAppsHook3 - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ libicns ]; buildInputs = [ SDL2 libao - ] ++ lib.optionals stdenv.isLinux [ + ] ++ lib.optionals stdenv.hostPlatform.isLinux [ alsa-lib gtk3 gtksourceview3 @@ -62,7 +62,7 @@ stdenv.mkDerivation (finalAttrs: { libpulseaudio openal udev - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk_11_0.frameworks.Cocoa darwin.apple_sdk_11_0.frameworks.OpenAL ]; @@ -71,9 +71,9 @@ stdenv.mkDerivation (finalAttrs: { enableParallelBuilding = true; - makeFlags = lib.optionals stdenv.isLinux [ + makeFlags = lib.optionals stdenv.hostPlatform.isLinux [ "hiro=gtk3" - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ "hiro=cocoa" "lto=false" "vulkan=false" @@ -83,7 +83,7 @@ stdenv.mkDerivation (finalAttrs: { "prefix=$(out)" ]; - env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.isDarwin "-mmacosx-version-min=10.14"; + env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.hostPlatform.isDarwin "-mmacosx-version-min=10.14"; meta = { homepage = "https://ares-emu.net"; @@ -92,7 +92,7 @@ stdenv.mkDerivation (finalAttrs: { license = lib.licenses.isc; maintainers = with lib.maintainers; [ Madouura AndersonTorres ]; platforms = lib.platforms.unix; - broken = stdenv.isDarwin; + broken = stdenv.hostPlatform.isDarwin; }; }) # TODO: select between Qt and GTK3 diff --git a/pkgs/applications/emulators/bsnes/bsnes-hd/default.nix b/pkgs/applications/emulators/bsnes/bsnes-hd/default.nix index 354437e7c7b0..046192df920f 100644 --- a/pkgs/applications/emulators/bsnes/bsnes-hd/default.nix +++ b/pkgs/applications/emulators/bsnes/bsnes-hd/default.nix @@ -47,26 +47,26 @@ stdenv.mkDerivation { ]; nativeBuildInputs = [ pkg-config ] - ++ lib.optionals stdenv.isLinux [ wrapGAppsHook3 ] - ++ lib.optionals stdenv.isDarwin [ libicns makeWrapper ]; + ++ lib.optionals stdenv.hostPlatform.isLinux [ wrapGAppsHook3 ] + ++ lib.optionals stdenv.hostPlatform.isDarwin [ libicns makeWrapper ]; buildInputs = [ SDL2 libao ] - ++ lib.optionals stdenv.isLinux [ libX11 libXv udev gtk3 gtksourceview3 alsa-lib openal libpulseaudio ] - ++ lib.optionals stdenv.isDarwin [ Cocoa OpenAL ]; + ++ lib.optionals stdenv.hostPlatform.isLinux [ libX11 libXv udev gtk3 gtksourceview3 alsa-lib openal libpulseaudio ] + ++ lib.optionals stdenv.hostPlatform.isDarwin [ Cocoa OpenAL ]; enableParallelBuilding = true; makeFlags = [ "-C" "bsnes" "prefix=$(out)" ] - ++ lib.optionals stdenv.isLinux [ "hiro=gtk3" ] - ++ lib.optionals stdenv.isDarwin [ "hiro=cocoa" ]; + ++ lib.optionals stdenv.hostPlatform.isLinux [ "hiro=gtk3" ] + ++ lib.optionals stdenv.hostPlatform.isDarwin [ "hiro=cocoa" ]; - postInstall = lib.optionalString stdenv.isDarwin '' + postInstall = lib.optionalString stdenv.hostPlatform.isDarwin '' mkdir -p $out/bin makeWrapper $out/{Applications/bsnes.app/Contents/MacOS,bin}/bsnes ''; # https://github.com/bsnes-emu/bsnes/issues/107 - preFixup = lib.optionalString stdenv.isLinux '' + preFixup = lib.optionalString stdenv.hostPlatform.isLinux '' gappsWrapperArgs+=( --prefix GDK_BACKEND : x11 ) diff --git a/pkgs/applications/emulators/bsnes/higan/default.nix b/pkgs/applications/emulators/bsnes/higan/default.nix index 17700859ca3a..3eb9a9a310ec 100644 --- a/pkgs/applications/emulators/bsnes/higan/default.nix +++ b/pkgs/applications/emulators/bsnes/higan/default.nix @@ -33,14 +33,14 @@ stdenv.mkDerivation (finalAttrs: { nativeBuildInputs = [ pkg-config - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ libicns ]; buildInputs = [ SDL2 libao - ] ++ lib.optionals stdenv.isLinux [ + ] ++ lib.optionals stdenv.hostPlatform.isLinux [ alsa-lib gtk3 gtksourceview3 @@ -52,7 +52,7 @@ stdenv.mkDerivation (finalAttrs: { openal udev ] - ++ lib.optionals stdenv.isDarwin (with darwin.apple_sdk.frameworks; [ + ++ lib.optionals stdenv.hostPlatform.isDarwin (with darwin.apple_sdk.frameworks; [ Carbon Cocoa OpenAL @@ -72,13 +72,13 @@ stdenv.mkDerivation (finalAttrs: { buildPhase = let platform = - if stdenv.isLinux + if stdenv.hostPlatform.isLinux then "linux" - else if stdenv.isDarwin + else if stdenv.hostPlatform.isDarwin then "macos" - else if stdenv.isBSD + else if stdenv.hostPlatform.isBSD then "bsd" - else if stdenv.isWindows + else if stdenv.hostPlatform.isWindows then "windows" else throw "Unknown platform for higan: ${stdenv.hostPlatform.system}"; in '' @@ -105,7 +105,7 @@ stdenv.mkDerivation (finalAttrs: { installPhase = '' runHook preInstall - '' + (if stdenv.isDarwin then '' + '' + (if stdenv.hostPlatform.isDarwin then '' mkdir ${placeholder "out"} mv higan/out/higan.app ${placeholder "out"}/ mv icarus/out/icarus.app ${placeholder "out"}/ @@ -134,7 +134,7 @@ stdenv.mkDerivation (finalAttrs: { # we create a first-run script to populate # $HOME with all the stuff needed at runtime let - dest = if stdenv.isDarwin + dest = if stdenv.hostPlatform.isDarwin then "\\$HOME/Library/Application Support/higan" else "\\$HOME/higan"; in '' @@ -171,7 +171,7 @@ stdenv.mkDerivation (finalAttrs: { license = licenses.gpl3Plus; maintainers = with maintainers; [ AndersonTorres ]; platforms = platforms.unix; - broken = stdenv.isDarwin; + broken = stdenv.hostPlatform.isDarwin; }; }) # TODO: select between Qt and GTK3 diff --git a/pkgs/applications/emulators/dolphin-emu/default.nix b/pkgs/applications/emulators/dolphin-emu/default.nix index 123ca313ec85..91ad4b876eb9 100644 --- a/pkgs/applications/emulators/dolphin-emu/default.nix +++ b/pkgs/applications/emulators/dolphin-emu/default.nix @@ -71,7 +71,7 @@ stdenv.mkDerivation (finalAttrs: { cmake pkg-config wrapQtAppsHook - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ xcbuild # for plutil ]; @@ -104,7 +104,7 @@ stdenv.mkDerivation (finalAttrs: { xz # Causes linker errors with minizip-ng, prefer vendored. Possible reason why: https://github.com/dolphin-emu/dolphin/pull/12070#issuecomment-1677311838 #zlib-ng - ] ++ lib.optionals stdenv.isLinux [ + ] ++ lib.optionals stdenv.hostPlatform.isLinux [ alsa-lib bluez libevdev @@ -115,7 +115,7 @@ stdenv.mkDerivation (finalAttrs: { #mgba # Derivation doesn't support Darwin udev vulkan-loader - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ CoreBluetooth ForceFeedback IOBluetooth @@ -130,7 +130,7 @@ stdenv.mkDerivation (finalAttrs: { "-DDOLPHIN_WC_REVISION=${finalAttrs.src.rev}" "-DDOLPHIN_WC_DESCRIBE=${finalAttrs.version}" "-DDOLPHIN_WC_BRANCH=master" - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ "-DOSX_USE_DEFAULT_SEARCH_PATH=True" "-DUSE_BUNDLED_MOLTENVK=OFF" "-DMACOS_CODE_SIGNING=OFF" @@ -141,7 +141,7 @@ stdenv.mkDerivation (finalAttrs: { "-DENABLE_AUTOUPDATE=OFF" ]; - qtWrapperArgs = lib.optionals stdenv.isLinux [ + qtWrapperArgs = lib.optionals stdenv.hostPlatform.isLinux [ "--prefix LD_LIBRARY_PATH : ${lib.makeLibraryPath [ vulkan-loader ]}" # https://bugs.dolphin-emu.org/issues/11807 # The .desktop file should already set this, but Dolphin may be launched in other ways diff --git a/pkgs/applications/emulators/dolphin-emu/primehack.nix b/pkgs/applications/emulators/dolphin-emu/primehack.nix index 6a2727478389..c35700856b60 100644 --- a/pkgs/applications/emulators/dolphin-emu/primehack.nix +++ b/pkgs/applications/emulators/dolphin-emu/primehack.nix @@ -61,7 +61,7 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ pkg-config cmake - ] ++ lib.optional stdenv.isLinux wrapQtAppsHook; + ] ++ lib.optional stdenv.hostPlatform.isLinux wrapQtAppsHook; buildInputs = [ curl @@ -93,13 +93,13 @@ stdenv.mkDerivation rec { fmt xz qtbase - ] ++ lib.optionals stdenv.isLinux [ + ] ++ lib.optionals stdenv.hostPlatform.isLinux [ bluez udev libevdev alsa-lib vulkan-loader - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ CoreBluetooth OpenGL ForceFeedback @@ -109,11 +109,11 @@ stdenv.mkDerivation rec { cmakeFlags = [ "-DUSE_SHARED_ENET=ON" "-DENABLE_LTO=ON" - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ "-DOSX_USE_DEFAULT_SEARCH_PATH=True" ]; - qtWrapperArgs = lib.optionals stdenv.isLinux [ + qtWrapperArgs = lib.optionals stdenv.hostPlatform.isLinux [ "--prefix LD_LIBRARY_PATH : ${vulkan-loader}/lib" # https://bugs.dolphin-emu.org/issues/11807 # The .desktop file should already set this, but Dolphin may be launched in other ways @@ -123,7 +123,7 @@ stdenv.mkDerivation rec { # - Allow Dolphin to use nix-provided libraries instead of building them postPatch = '' substituteInPlace CMakeLists.txt --replace 'DISTRIBUTOR "None"' 'DISTRIBUTOR "NixOS"' - '' + lib.optionalString stdenv.isDarwin '' + '' + lib.optionalString stdenv.hostPlatform.isDarwin '' substituteInPlace CMakeLists.txt --replace 'if(NOT APPLE)' 'if(true)' substituteInPlace CMakeLists.txt --replace 'if(LIBUSB_FOUND AND NOT APPLE)' 'if(LIBUSB_FOUND)' ''; @@ -144,7 +144,7 @@ stdenv.mkDerivation rec { description = "Gamecube/Wii/Triforce emulator for x86_64 and ARMv8"; license = licenses.gpl2Plus; maintainers = with maintainers; [ Madouura ]; - broken = stdenv.isDarwin; + broken = stdenv.hostPlatform.isDarwin; platforms = platforms.unix; }; } diff --git a/pkgs/applications/emulators/dosbox/default.nix b/pkgs/applications/emulators/dosbox/default.nix index 2a1171ccf3b7..50805ae20dbb 100644 --- a/pkgs/applications/emulators/dosbox/default.nix +++ b/pkgs/applications/emulators/dosbox/default.nix @@ -55,7 +55,7 @@ stdenv.mkDerivation rec { hardeningDisable = [ "format" ]; - configureFlags = lib.optional stdenv.isDarwin "--disable-sdltest"; + configureFlags = lib.optional stdenv.hostPlatform.isDarwin "--disable-sdltest"; desktopItems = [ (makeDesktopItem { diff --git a/pkgs/applications/emulators/goldberg-emu/default.nix b/pkgs/applications/emulators/goldberg-emu/default.nix index 8b1e92b5963a..e165a36b317b 100644 --- a/pkgs/applications/emulators/goldberg-emu/default.nix +++ b/pkgs/applications/emulators/goldberg-emu/default.nix @@ -42,7 +42,7 @@ stdenv.mkDerivation rec { ''; meta = with lib; { - broken = stdenv.isDarwin; + broken = stdenv.hostPlatform.isDarwin; homepage = "https://gitlab.com/Mr_Goldberg/goldberg_emulator"; changelog = "https://gitlab.com/Mr_Goldberg/goldberg_emulator/-/releases"; description = "Program that emulates steam online features"; diff --git a/pkgs/applications/emulators/mame/default.nix b/pkgs/applications/emulators/mame/default.nix index fae7a0d3fcf9..25018c56aa66 100644 --- a/pkgs/applications/emulators/mame/default.nix +++ b/pkgs/applications/emulators/mame/default.nix @@ -90,8 +90,8 @@ stdenv.mkDerivation rec { sqlite qtbase ] - ++ lib.optionals stdenv.isLinux [ alsa-lib libpulseaudio libXinerama libXi fontconfig ] - ++ lib.optionals stdenv.isDarwin [ libpcap CoreAudioKit ForceFeedback ]; + ++ lib.optionals stdenv.hostPlatform.isLinux [ alsa-lib libpulseaudio libXinerama libXi fontconfig ] + ++ lib.optionals stdenv.hostPlatform.isDarwin [ libpcap CoreAudioKit ForceFeedback ]; nativeBuildInputs = [ copyDesktopItems @@ -195,7 +195,7 @@ stdenv.mkDerivation rec { license = with licenses; [ bsd3 gpl2Plus ]; maintainers = with maintainers; [ thiagokokada ]; platforms = platforms.unix; - broken = stdenv.isDarwin; + broken = stdenv.hostPlatform.isDarwin; mainProgram = "mame"; }; } diff --git a/pkgs/applications/emulators/retroarch/cores.nix b/pkgs/applications/emulators/retroarch/cores.nix index 532109eefa6d..18c510b8465b 100644 --- a/pkgs/applications/emulators/retroarch/cores.nix +++ b/pkgs/applications/emulators/retroarch/cores.nix @@ -267,7 +267,7 @@ in let # linux = bsd # https://github.com/DerKoun/bsnes-hd/blob/f0b6cf34e9780d53516977ed2de64137a8bcc3c5/bsnes/GNUmakefile#L37 - platform = if stdenv.isDarwin then "macos" else "linux"; + platform = if stdenv.hostPlatform.isDarwin then "macos" else "linux"; in [ "-C" diff --git a/pkgs/applications/emulators/retroarch/default.nix b/pkgs/applications/emulators/retroarch/default.nix index 83cb0b2bbc63..b23a5e3c9bb3 100644 --- a/pkgs/applications/emulators/retroarch/default.nix +++ b/pkgs/applications/emulators/retroarch/default.nix @@ -2,9 +2,9 @@ , stdenv , nixosTests , enableNvidiaCgToolkit ? false -, withGamemode ? stdenv.isLinux -, withVulkan ? stdenv.isLinux -, withWayland ? stdenv.isLinux +, withGamemode ? stdenv.hostPlatform.isLinux +, withVulkan ? stdenv.hostPlatform.isLinux +, withWayland ? stdenv.hostPlatform.isLinux , alsa-lib , dbus , fetchFromGitHub @@ -77,7 +77,7 @@ stdenv.mkDerivation rec { lib.optional enableNvidiaCgToolkit nvidia_cg_toolkit ++ lib.optional withVulkan vulkan-loader ++ lib.optional withWayland wayland ++ - lib.optionals stdenv.isLinux [ + lib.optionals stdenv.hostPlatform.isLinux [ alsa-lib dbus libX11 @@ -103,7 +103,7 @@ stdenv.mkDerivation rec { "--disable-update_assets" "--disable-update_core_info" ] ++ - lib.optionals stdenv.isLinux [ + lib.optionals stdenv.hostPlatform.isLinux [ "--enable-dbus" "--enable-egl" "--enable-kms" @@ -142,6 +142,6 @@ stdenv.mkDerivation rec { # https://docs.libretro.com/development/retroarch/compilation/osx/ # and # https://github.com/libretro/RetroArch/blob/71eb74d256cb4dc5b8b43991aec74980547c5069/.gitlab-ci.yml#L330 - broken = stdenv.isDarwin; + broken = stdenv.hostPlatform.isDarwin; }; } diff --git a/pkgs/applications/emulators/ripes/default.nix b/pkgs/applications/emulators/ripes/default.nix index 92b7aca0a144..312c25a02007 100644 --- a/pkgs/applications/emulators/ripes/default.nix +++ b/pkgs/applications/emulators/ripes/default.nix @@ -39,11 +39,11 @@ stdenv.mkDerivation rec { installPhase = '' runHook preInstall - '' + lib.optionalString stdenv.isDarwin '' + '' + lib.optionalString stdenv.hostPlatform.isDarwin '' mkdir -p $out/Applications cp -r Ripes.app $out/Applications/ makeBinaryWrapper $out/Applications/Ripes.app/Contents/MacOS/Ripes $out/bin/Ripes - '' + lib.optionalString stdenv.isLinux '' + '' + lib.optionalString stdenv.hostPlatform.isLinux '' install -D Ripes $out/bin/Ripes '' + '' cp -r ${src}/appdir/usr/share $out/share diff --git a/pkgs/applications/emulators/ruffle/default.nix b/pkgs/applications/emulators/ruffle/default.nix index 481b5ec86654..55b2ce67fc9b 100644 --- a/pkgs/applications/emulators/ruffle/default.nix +++ b/pkgs/applications/emulators/ruffle/default.nix @@ -38,7 +38,7 @@ rustPlatform.buildRustPackage { nativeBuildInputs = [ jre_minimal ] - ++ lib.optionals stdenv.isLinux [ + ++ lib.optionals stdenv.hostPlatform.isLinux [ glib gsettings-desktop-schemas makeWrapper @@ -46,10 +46,10 @@ rustPlatform.buildRustPackage { python3 wrapGAppsHook3 ] - ++ lib.optionals stdenv.isDarwin [ rustPlatform.bindgenHook ]; + ++ lib.optionals stdenv.hostPlatform.isDarwin [ rustPlatform.bindgenHook ]; buildInputs = - lib.optionals stdenv.isLinux [ + lib.optionals stdenv.hostPlatform.isLinux [ alsa-lib cairo gtk3 @@ -64,11 +64,11 @@ rustPlatform.buildRustPackage { vulkan-loader udev ] - ++ lib.optionals stdenv.isDarwin [ darwin.apple_sdk.frameworks.AppKit ]; + ++ lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.AppKit ]; dontWrapGApps = true; - preFixup = lib.optionalString stdenv.isLinux '' + preFixup = lib.optionalString stdenv.hostPlatform.isLinux '' patchelf $out/bin/ruffle_desktop \ --add-needed libxkbcommon-x11.so \ --add-needed libwayland-client.so \ @@ -80,7 +80,7 @@ rustPlatform.buildRustPackage { # This name is too generic mv $out/bin/exporter $out/bin/ruffle_exporter '' - + lib.optionalString stdenv.isLinux '' + + lib.optionalString stdenv.hostPlatform.isLinux '' vulkanWrapperArgs+=( --prefix LD_LIBRARY_PATH ':' ${vulkan-loader}/lib ) diff --git a/pkgs/applications/emulators/tamatool/default.nix b/pkgs/applications/emulators/tamatool/default.nix index 04e5452bf72d..82cd8e9a2528 100644 --- a/pkgs/applications/emulators/tamatool/default.nix +++ b/pkgs/applications/emulators/tamatool/default.nix @@ -43,7 +43,7 @@ stdenv.mkDerivation (finalAttrs: { libpng SDL2 SDL2_image - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.CoreFoundation ]; diff --git a/pkgs/applications/emulators/wine/base.nix b/pkgs/applications/emulators/wine/base.nix index dccf67a7a9bb..cff069a2e75c 100644 --- a/pkgs/applications/emulators/wine/base.nix +++ b/pkgs/applications/emulators/wine/base.nix @@ -23,7 +23,7 @@ let }; } ./setup-hook-darwin.sh; - darwinFrameworks = lib.optionals stdenv.isDarwin ( + darwinFrameworks = lib.optionals stdenv.hostPlatform.isDarwin ( toBuildInputs pkgArches (pkgs: with pkgs.buildPackages.darwin.apple_sdk.frameworks; [ CoreServices Foundation ForceFeedback AppKit OpenGL IOKit DiskArbitration PCSC Security ApplicationServices AudioToolbox CoreAudio AudioUnit CoreMIDI OpenCL Cocoa Carbon @@ -40,7 +40,7 @@ let in stdenv.mkDerivation (finalAttrs: lib.optionalAttrs (buildScript != null) { builder = buildScript; } -// lib.optionalAttrs stdenv.isDarwin { +// lib.optionalAttrs stdenv.hostPlatform.isDarwin { postBuild = '' # The Wine preloader must _not_ be linked to any system libraries, but `NIX_LDFLAGS` will link # to libintl, libiconv, and CoreFoundation no matter what. Delete the one that was built and @@ -68,12 +68,12 @@ lib.optionalAttrs (buildScript != null) { builder = buildScript; } pkg-config ] ++ lib.optionals supportFlags.mingwSupport (mingwGccs - ++ lib.optional stdenv.isDarwin setupHookDarwin); + ++ lib.optional stdenv.hostPlatform.isDarwin setupHookDarwin); buildInputs = toBuildInputs pkgArches (with supportFlags; (pkgs: [ pkgs.freetype pkgs.perl pkgs.libunwind ] - ++ lib.optional stdenv.isLinux pkgs.libcap - ++ lib.optional stdenv.isDarwin pkgs.libinotify-kqueue + ++ lib.optional stdenv.hostPlatform.isLinux pkgs.libcap + ++ lib.optional stdenv.hostPlatform.isDarwin pkgs.libinotify-kqueue ++ lib.optional cupsSupport pkgs.cups ++ lib.optional gettextSupport pkgs.gettext ++ lib.optional dbusSupport pkgs.dbus @@ -92,7 +92,7 @@ lib.optionalAttrs (buildScript != null) { builder = buildScript; } ++ lib.optional pulseaudioSupport pkgs.libpulseaudio ++ lib.optional (xineramaSupport && x11Support) pkgs.xorg.libXinerama ++ lib.optional udevSupport pkgs.udev - ++ lib.optional vulkanSupport (if stdenv.isDarwin then moltenvk else pkgs.vulkan-loader) + ++ lib.optional vulkanSupport (if stdenv.hostPlatform.isDarwin then moltenvk else pkgs.vulkan-loader) ++ lib.optional sdlSupport pkgs.SDL2 ++ lib.optional usbSupport pkgs.libusb1 ++ lib.optionals gstreamerSupport (with pkgs.gst_all_1; @@ -100,8 +100,8 @@ lib.optionalAttrs (buildScript != null) { builder = buildScript; } ++ lib.optionals gtkSupport [ pkgs.gtk3 pkgs.glib ] ++ lib.optionals openclSupport [ pkgs.opencl-headers pkgs.ocl-icd ] ++ lib.optionals tlsSupport [ pkgs.openssl pkgs.gnutls ] - ++ lib.optionals (openglSupport && !stdenv.isDarwin) [ pkgs.libGLU pkgs.libGL pkgs.mesa.osmesa pkgs.libdrm ] - ++ lib.optionals stdenv.isDarwin darwinFrameworks + ++ lib.optionals (openglSupport && !stdenv.hostPlatform.isDarwin) [ pkgs.libGLU pkgs.libGL pkgs.mesa.osmesa pkgs.libdrm ] + ++ lib.optionals stdenv.hostPlatform.isDarwin darwinFrameworks ++ lib.optionals (x11Support) (with pkgs.xorg; [ libX11 libXcomposite libXcursor libXext libXfixes libXi libXrandr libXrender libXxf86vm ]) @@ -115,7 +115,7 @@ lib.optionalAttrs (buildScript != null) { builder = buildScript; } configureFlags = prevConfigFlags ++ lib.optionals supportFlags.waylandSupport [ "--with-wayland" ] ++ lib.optionals supportFlags.vulkanSupport [ "--with-vulkan" ] - ++ lib.optionals ((stdenv.isDarwin && !supportFlags.xineramaSupport) || !supportFlags.x11Support) [ "--without-x" ]; + ++ lib.optionals ((stdenv.hostPlatform.isDarwin && !supportFlags.xineramaSupport) || !supportFlags.x11Support) [ "--without-x" ]; # Wine locates a lot of libraries dynamically through dlopen(). Add # them to the RPATH so that the user doesn't have to set them in diff --git a/pkgs/applications/emulators/wine/default.nix b/pkgs/applications/emulators/wine/default.nix index 2c73ab48ad71..8c8ebdea5878 100644 --- a/pkgs/applications/emulators/wine/default.nix +++ b/pkgs/applications/emulators/wine/default.nix @@ -35,7 +35,7 @@ vulkanSupport ? false, sdlSupport ? false, usbSupport ? false, - mingwSupport ? stdenv.isDarwin, + mingwSupport ? stdenv.hostPlatform.isDarwin, waylandSupport ? false, x11Support ? false, embedInstallers ? false, # The Mono and Gecko MSI installers diff --git a/pkgs/applications/emulators/wine/staging.nix b/pkgs/applications/emulators/wine/staging.nix index 4a9bfb6c3204..634964fb7533 100644 --- a/pkgs/applications/emulators/wine/staging.nix +++ b/pkgs/applications/emulators/wine/staging.nix @@ -8,7 +8,7 @@ let patch = (callPackage ./sources.nix {}).staging; in assert lib.versions.majorMinor wineUnstable.version == lib.versions.majorMinor patch.version; (wineUnstable.override { wineRelease = "staging"; }).overrideAttrs (self: { - buildInputs = build-inputs ([ "perl" "autoconf" "gitMinimal" ] ++ lib.optional stdenv.isLinux "util-linux") self.buildInputs; + buildInputs = build-inputs ([ "perl" "autoconf" "gitMinimal" ] ++ lib.optional stdenv.hostPlatform.isLinux "util-linux") self.buildInputs; nativeBuildInputs = [ autoconf hexdump perl python3 gitMinimal ] ++ self.nativeBuildInputs; prePatch = self.prePatch or "" + '' diff --git a/pkgs/applications/file-managers/lf/default.nix b/pkgs/applications/file-managers/lf/default.nix index 5e6c09b89c89..9bbe32fd298e 100644 --- a/pkgs/applications/file-managers/lf/default.nix +++ b/pkgs/applications/file-managers/lf/default.nix @@ -24,7 +24,7 @@ buildGoModule rec { # Force the use of the pure-go implementation of the os/user library. # Relevant issue: https://github.com/gokcehan/lf/issues/191 - tags = lib.optionals (!stdenv.isDarwin) [ "osusergo" ]; + tags = lib.optionals (!stdenv.hostPlatform.isDarwin) [ "osusergo" ]; postInstall = '' install -D --mode=444 lf.desktop $out/share/applications/lf.desktop diff --git a/pkgs/applications/file-managers/mc/default.nix b/pkgs/applications/file-managers/mc/default.nix index fdc60a309313..1644da02ed2f 100644 --- a/pkgs/applications/file-managers/mc/default.nix +++ b/pkgs/applications/file-managers/mc/default.nix @@ -48,7 +48,7 @@ stdenv.mkDerivation rec { slang zip ] ++ lib.optionals x11Support [ libX11 ] - ++ lib.optionals (!stdenv.isDarwin) [ e2fsprogs gpm ]; + ++ lib.optionals (!stdenv.hostPlatform.isDarwin) [ e2fsprogs gpm ]; enableParallelBuilding = true; @@ -68,7 +68,7 @@ stdenv.mkDerivation rec { --replace /bin/rm ${coreutils}/bin/rm ''; - postFixup = lib.optionalString ((!stdenv.isDarwin) && x11Support) '' + postFixup = lib.optionalString ((!stdenv.hostPlatform.isDarwin) && x11Support) '' # libX11.so is loaded dynamically so autopatch doesn't detect it patchelf \ --add-needed ${libX11}/lib/libX11.so \ diff --git a/pkgs/applications/file-managers/projectable/default.nix b/pkgs/applications/file-managers/projectable/default.nix index 207ea0d0ba0a..b296e6a7ff1c 100644 --- a/pkgs/applications/file-managers/projectable/default.nix +++ b/pkgs/applications/file-managers/projectable/default.nix @@ -30,7 +30,7 @@ rustPlatform.buildRustPackage rec { libgit2 openssl zlib - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.CoreServices ]; diff --git a/pkgs/applications/gis/gmt/default.nix b/pkgs/applications/gis/gmt/default.nix index 3cc04e374440..092d1cb431d6 100644 --- a/pkgs/applications/gis/gmt/default.nix +++ b/pkgs/applications/gis/gmt/default.nix @@ -18,7 +18,7 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ cmake ]; buildInputs = [ curl gdal netcdf pcre dcw-gmt gshhg-gmt ] - ++ (if stdenv.isDarwin then [ + ++ (if stdenv.hostPlatform.isDarwin then [ Accelerate CoreGraphics CoreVideo diff --git a/pkgs/applications/gis/grass/default.nix b/pkgs/applications/gis/grass/default.nix index 2e02c1d2da6a..68bbcb46b526 100644 --- a/pkgs/applications/gis/grass/default.nix +++ b/pkgs/applications/gis/grass/default.nix @@ -5,7 +5,7 @@ , makeWrapper , wrapGAppsHook3 -, withOpenGL ? !stdenv.isDarwin +, withOpenGL ? !stdenv.hostPlatform.isDarwin , bison , blas @@ -87,7 +87,7 @@ stdenv.mkDerivation (finalAttrs: { zlib zstd ] ++ lib.optionals withOpenGL [ libGLU ] - ++ lib.optionals stdenv.isDarwin [ libiconv ] + ++ lib.optionals stdenv.hostPlatform.isDarwin [ libiconv ] ++ lib.optionals stdenv.cc.isClang [ llvmPackages.openmp ]; strictDeps = true; @@ -117,14 +117,14 @@ stdenv.mkDerivation (finalAttrs: { "--without-odbc" ] ++ lib.optionals (! withOpenGL) [ "--without-opengl" - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ "--without-cairo" "--without-freetype" "--without-x" ]; # Otherwise a very confusing "Can't load GDAL library" error - makeFlags = lib.optional stdenv.isDarwin "GDAL_DYNAMIC="; + makeFlags = lib.optional stdenv.hostPlatform.isDarwin "GDAL_DYNAMIC="; /* Ensures that the python script run at build time are actually executable; * otherwise, patchShebangs ignores them. */ diff --git a/pkgs/applications/gis/spatialite-gui/default.nix b/pkgs/applications/gis/spatialite-gui/default.nix index b33818e35486..a8bdedabaa37 100644 --- a/pkgs/applications/gis/spatialite-gui/default.nix +++ b/pkgs/applications/gis/spatialite-gui/default.nix @@ -37,7 +37,7 @@ stdenv.mkDerivation rec { }; nativeBuildInputs = [ pkg-config ] - ++ lib.optional stdenv.isDarwin desktopToDarwinBundle; + ++ lib.optional stdenv.hostPlatform.isDarwin desktopToDarwinBundle; buildInputs = [ curl @@ -59,11 +59,11 @@ stdenv.mkDerivation rec { wxGTK xz zstd - ] ++ lib.optionals stdenv.isDarwin [ Carbon Cocoa IOKit ]; + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ Carbon Cocoa IOKit ]; enableParallelBuilding = true; - postFixup = lib.optionalString stdenv.isDarwin '' + postFixup = lib.optionalString stdenv.hostPlatform.isDarwin '' rm -fr $out/share ''; diff --git a/pkgs/applications/gis/udig/default.nix b/pkgs/applications/gis/udig/default.nix index 264445336cd3..04740f55b065 100644 --- a/pkgs/applications/gis/udig/default.nix +++ b/pkgs/applications/gis/udig/default.nix @@ -63,6 +63,6 @@ let ''; }; in -if stdenv.isDarwin +if stdenv.hostPlatform.isDarwin then darwin else linux diff --git a/pkgs/applications/gis/whitebox-tools/default.nix b/pkgs/applications/gis/whitebox-tools/default.nix index df2343d8813e..199595a65838 100644 --- a/pkgs/applications/gis/whitebox-tools/default.nix +++ b/pkgs/applications/gis/whitebox-tools/default.nix @@ -31,7 +31,7 @@ rustPlatform.buildRustPackage rec { glib gtk3 openssl - ] ++ lib.optional stdenv.isDarwin Security; + ] ++ lib.optional stdenv.hostPlatform.isDarwin Security; nativeBuildInputs = [ cmake diff --git a/pkgs/applications/graphics/ImageMagick/6.x.nix b/pkgs/applications/graphics/ImageMagick/6.x.nix index dac185e3d3d0..e0834055e716 100644 --- a/pkgs/applications/graphics/ImageMagick/6.x.nix +++ b/pkgs/applications/graphics/ImageMagick/6.x.nix @@ -78,7 +78,7 @@ stdenv.mkDerivation (finalAttrs: { ++ lib.optional openexrSupport openexr ++ lib.optional librsvgSupport librsvg ++ lib.optional openjpegSupport openjpeg - ++ lib.optionals stdenv.isDarwin [ + ++ lib.optionals stdenv.hostPlatform.isDarwin [ ApplicationServices Foundation ]; diff --git a/pkgs/applications/graphics/ImageMagick/default.nix b/pkgs/applications/graphics/ImageMagick/default.nix index cd998be7019f..27abada54119 100644 --- a/pkgs/applications/graphics/ImageMagick/default.nix +++ b/pkgs/applications/graphics/ImageMagick/default.nix @@ -101,7 +101,7 @@ stdenv.mkDerivation (finalAttrs: { pango ] ++ lib.optional openjpegSupport openjpeg - ++ lib.optionals stdenv.isDarwin [ + ++ lib.optionals stdenv.hostPlatform.isDarwin [ ApplicationServices Foundation ]; diff --git a/pkgs/applications/graphics/antimony/default.nix b/pkgs/applications/graphics/antimony/default.nix index d39961da9077..b55e6a8a5bb0 100644 --- a/pkgs/applications/graphics/antimony/default.nix +++ b/pkgs/applications/graphics/antimony/default.nix @@ -28,7 +28,7 @@ in sed -i "s,python3,${python3.executable}," CMakeLists.txt ''; - postInstall = lib.optionalString stdenv.isLinux '' + postInstall = lib.optionalString stdenv.hostPlatform.isLinux '' install -Dm644 $src/deploy/icon.svg $out/share/icons/hicolor/scalable/apps/antimony.svg install -Dm644 ${./mimetype.xml} $out/share/mime/packages/antimony.xml ''; diff --git a/pkgs/applications/graphics/artem/default.nix b/pkgs/applications/graphics/artem/default.nix index 8b391f104d83..8f6d27b176a3 100644 --- a/pkgs/applications/graphics/artem/default.nix +++ b/pkgs/applications/graphics/artem/default.nix @@ -23,7 +23,7 @@ rustPlatform.buildRustPackage rec { installShellFiles ]; - buildInputs = lib.optionals stdenv.isDarwin [ + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.Security ]; diff --git a/pkgs/applications/graphics/autotrace/default.nix b/pkgs/applications/graphics/autotrace/default.nix index 30cf116fed14..82bba3c3fc53 100644 --- a/pkgs/applications/graphics/autotrace/default.nix +++ b/pkgs/applications/graphics/autotrace/default.nix @@ -45,7 +45,7 @@ stdenv.mkDerivation rec { imagemagick libpng pstoedit - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.Foundation ]; diff --git a/pkgs/applications/graphics/azpainter/default.nix b/pkgs/applications/graphics/azpainter/default.nix index 111e37711ef3..b1493b94ce67 100644 --- a/pkgs/applications/graphics/azpainter/default.nix +++ b/pkgs/applications/graphics/azpainter/default.nix @@ -30,7 +30,7 @@ stdenv.mkDerivation rec { freetype fontconfig libjpeg libpng libtiff libwebp zlib - ] ++ lib.optionals stdenv.isDarwin [ libiconv ]; + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ libiconv ]; preBuild = '' cd build diff --git a/pkgs/applications/graphics/c3d/default.nix b/pkgs/applications/graphics/c3d/default.nix index cce015802302..dac235b9995e 100644 --- a/pkgs/applications/graphics/c3d/default.nix +++ b/pkgs/applications/graphics/c3d/default.nix @@ -19,7 +19,7 @@ stdenv.mkDerivation rec { }; nativeBuildInputs = [ cmake ]; - buildInputs = [ itk ] ++ lib.optional stdenv.isDarwin Cocoa; + buildInputs = [ itk ] ++ lib.optional stdenv.hostPlatform.isDarwin Cocoa; cmakeFlags = [ "-DCONVERT3D_USE_ITK_REMOTE_MODULES=OFF" ]; @@ -29,7 +29,7 @@ stdenv.mkDerivation rec { maintainers = with maintainers; [ bcdarwin ]; platforms = platforms.unix; license = licenses.gpl3; - broken = stdenv.isAarch64; + broken = stdenv.hostPlatform.isAarch64; # /build/source/itkextras/OneDimensionalInPlaceAccumulateFilter.txx:312:10: fatal error: xmmintrin.h: No such file or directory }; } diff --git a/pkgs/applications/graphics/comical/default.nix b/pkgs/applications/graphics/comical/default.nix index d8e869316619..f25259e5ebf4 100644 --- a/pkgs/applications/graphics/comical/default.nix +++ b/pkgs/applications/graphics/comical/default.nix @@ -27,7 +27,7 @@ stdenv.mkDerivation rec { buildInputs = [ wxGTK32 zlib - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ Cocoa ]; diff --git a/pkgs/applications/graphics/curv/default.nix b/pkgs/applications/graphics/curv/default.nix index 7113437245a3..f1f66784aa51 100644 --- a/pkgs/applications/graphics/curv/default.nix +++ b/pkgs/applications/graphics/curv/default.nix @@ -45,7 +45,7 @@ stdenv.mkDerivation rec { xorg.libXi xorg.libXinerama xorg.libXrandr - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ ilmbase llvmPackages.openmp ]; @@ -62,7 +62,7 @@ stdenv.mkDerivation rec { homepage = "https://github.com/curv3d/curv"; license = licenses.asl20; platforms = platforms.all; - broken = stdenv.isDarwin; + broken = stdenv.hostPlatform.isDarwin; maintainers = with maintainers; [ pbsds ]; mainProgram = "curv"; }; diff --git a/pkgs/applications/graphics/dia/default.nix b/pkgs/applications/graphics/dia/default.nix index 534d1f5884b9..9977224dd761 100644 --- a/pkgs/applications/graphics/dia/default.nix +++ b/pkgs/applications/graphics/dia/default.nix @@ -49,7 +49,7 @@ stdenv.mkDerivation { lib.optionals withDocs [ libxslt ] ++ - lib.optionals stdenv.isDarwin [ + lib.optionals stdenv.hostPlatform.isDarwin [ gtk-mac-integration-gtk3 ]; diff --git a/pkgs/applications/graphics/djview/default.nix b/pkgs/applications/graphics/djview/default.nix index 3678b9760c81..99af85a12b8d 100644 --- a/pkgs/applications/graphics/djview/default.nix +++ b/pkgs/applications/graphics/djview/default.nix @@ -37,7 +37,7 @@ mkDerivation rec { qtbase xorg.libXt libtiff - ] ++ lib.optional stdenv.isDarwin darwin.apple_sdk.frameworks.AGL; + ] ++ lib.optional stdenv.hostPlatform.isDarwin darwin.apple_sdk.frameworks.AGL; preConfigure = '' NOCONFIGURE=1 ./autogen.sh @@ -49,10 +49,10 @@ mkDerivation rec { "--with-x" "--with-tiff" "--disable-nsdejavu" # 2023-11-14: modern browsers have dropped support for NPAPI - ] ++ lib.optional stdenv.isDarwin "--enable-mac"; + ] ++ lib.optional stdenv.hostPlatform.isDarwin "--enable-mac"; meta = with lib; { - broken = stdenv.isDarwin; + broken = stdenv.hostPlatform.isDarwin; description = "Portable DjVu viewer (Qt5) and browser (nsdejavu) plugin"; mainProgram = "djview"; homepage = "https://djvu.sourceforge.net/djview4.html"; diff --git a/pkgs/applications/graphics/drawio/default.nix b/pkgs/applications/graphics/drawio/default.nix index 47ee1ebd43e4..d6b6bb8e9e60 100644 --- a/pkgs/applications/graphics/drawio/default.nix +++ b/pkgs/applications/graphics/drawio/default.nix @@ -39,9 +39,9 @@ stdenv.mkDerivation rec { makeWrapper nodejs yarn - ] ++ lib.optionals (!stdenv.isDarwin) [ + ] ++ lib.optionals (!stdenv.hostPlatform.isDarwin) [ copyDesktopItems - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ autoSignDarwinBinariesHook ]; @@ -62,15 +62,15 @@ stdenv.mkDerivation rec { buildPhase = '' runHook preBuild - '' + lib.optionalString stdenv.isDarwin '' + '' + lib.optionalString stdenv.hostPlatform.isDarwin '' cp -R ${electron.dist}/Electron.app Electron.app chmod -R u+w Electron.app export CSC_IDENTITY_AUTO_DISCOVERY=false sed -i "/afterSign/d" electron-builder-linux-mac.json '' + '' yarn --offline run electron-builder --dir \ - ${lib.optionalString stdenv.isDarwin "--config electron-builder-linux-mac.json"} \ - -c.electronDist=${if stdenv.isDarwin then "." else electron.dist} \ + ${lib.optionalString stdenv.hostPlatform.isDarwin "--config electron-builder-linux-mac.json"} \ + -c.electronDist=${if stdenv.hostPlatform.isDarwin then "." else electron.dist} \ -c.electronVersion=${electron.version} runHook postBuild @@ -79,13 +79,13 @@ stdenv.mkDerivation rec { installPhase = '' runHook preInstall - '' + lib.optionalString stdenv.isDarwin '' + '' + lib.optionalString stdenv.hostPlatform.isDarwin '' mkdir -p $out/{Applications,bin} mv dist/mac*/draw.io.app $out/Applications # Symlinking `draw.io` doesn't work; seems to look for files in the wrong place. makeWrapper $out/Applications/draw.io.app/Contents/MacOS/draw.io $out/bin/drawio - '' + lib.optionalString (!stdenv.isDarwin) '' + '' + lib.optionalString (!stdenv.hostPlatform.isDarwin) '' mkdir -p "$out/share/lib/drawio" cp -r dist/*-unpacked/{locales,resources{,.pak}} "$out/share/lib/drawio" diff --git a/pkgs/applications/graphics/drawpile/default.nix b/pkgs/applications/graphics/drawpile/default.nix index 3bdb37900de0..ad76e0e92b7c 100644 --- a/pkgs/applications/graphics/drawpile/default.nix +++ b/pkgs/applications/graphics/drawpile/default.nix @@ -107,7 +107,7 @@ in mkDerivation rec { license = lib.licenses.gpl3Plus; maintainers = with lib.maintainers; [ fgaz ]; platforms = lib.platforms.unix; - broken = stdenv.isDarwin; + broken = stdenv.hostPlatform.isDarwin; } // lib.optionalAttrs buildServer { mainProgram = "drawpile-srv"; } // lib.optionalAttrs buildClient { diff --git a/pkgs/applications/graphics/emblem/default.nix b/pkgs/applications/graphics/emblem/default.nix index 2b249d7e294e..c0f9046fa9c8 100644 --- a/pkgs/applications/graphics/emblem/default.nix +++ b/pkgs/applications/graphics/emblem/default.nix @@ -49,11 +49,11 @@ stdenv.mkDerivation rec { buildInputs = [ libadwaita libxml2 - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.Foundation ]; - env.NIX_CFLAGS_COMPILE = toString (lib.optionals stdenv.isDarwin [ + env.NIX_CFLAGS_COMPILE = toString (lib.optionals stdenv.hostPlatform.isDarwin [ "-Wno-error=incompatible-function-pointer-types" ]); diff --git a/pkgs/applications/graphics/emulsion/default.nix b/pkgs/applications/graphics/emulsion/default.nix index a57a33e11b51..0db2a75721ec 100644 --- a/pkgs/applications/graphics/emulsion/default.nix +++ b/pkgs/applications/graphics/emulsion/default.nix @@ -30,7 +30,7 @@ let libXrandr libXxf86vm libxcb - ] ++ lib.optionals stdenv.isLinux [ + ] ++ lib.optionals stdenv.hostPlatform.isLinux [ libxkbcommon wayland ]; @@ -55,7 +55,7 @@ rustPlatform.buildRustPackage rec { python3 ]; - buildInputs = rpathLibs ++ lib.optionals stdenv.isDarwin [ + buildInputs = rpathLibs ++ lib.optionals stdenv.hostPlatform.isDarwin [ AppKit CoreGraphics CoreServices @@ -63,7 +63,7 @@ rustPlatform.buildRustPackage rec { OpenGL ]; - postFixup = lib.optionalString stdenv.isLinux '' + postFixup = lib.optionalString stdenv.hostPlatform.isLinux '' patchelf --set-rpath "${lib.makeLibraryPath rpathLibs}" $out/bin/emulsion ''; diff --git a/pkgs/applications/graphics/epick/default.nix b/pkgs/applications/graphics/epick/default.nix index ca93a5f579c9..939232197eeb 100644 --- a/pkgs/applications/graphics/epick/default.nix +++ b/pkgs/applications/graphics/epick/default.nix @@ -24,11 +24,11 @@ rustPlatform.buildRustPackage rec { cargoHash = "sha256-OQZPOiMTpoWabxHa3TJG8L3zq8WxMeFttw8xggSXsMA="; - nativeBuildInputs = lib.optionals stdenv.isLinux [ + nativeBuildInputs = lib.optionals stdenv.hostPlatform.isLinux [ pkg-config ]; - buildInputs = lib.optionals stdenv.isLinux [ + buildInputs = lib.optionals stdenv.hostPlatform.isLinux [ expat fontconfig freetype @@ -36,7 +36,7 @@ rustPlatform.buildRustPackage rec { xorg.libXcursor xorg.libXi xorg.libXrandr - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ AppKit ]; @@ -46,7 +46,7 @@ rustPlatform.buildRustPackage rec { install -Dm444 assets/icon.png $out/share/icons/hicolor/48x48/apps/epick.png ''; - postFixup = lib.optionalString stdenv.isLinux '' + postFixup = lib.optionalString stdenv.hostPlatform.isLinux '' patchelf $out/bin/epick --add-rpath ${lib.makeLibraryPath [ libGL ]} ''; diff --git a/pkgs/applications/graphics/evilpixie/default.nix b/pkgs/applications/graphics/evilpixie/default.nix index fb397239849b..9c5c7e81c3a7 100644 --- a/pkgs/applications/graphics/evilpixie/default.nix +++ b/pkgs/applications/graphics/evilpixie/default.nix @@ -48,8 +48,8 @@ stdenv.mkDerivation (finalAttrs: { platforms = platforms.all; # Undefined symbols for architecture x86_64: # "_bundle_path", referenced from: App::SetupPaths() in src_app.cpp.o - broken = stdenv.isDarwin || + broken = stdenv.hostPlatform.isDarwin || # https://github.com/bcampbell/evilpixie/issues/28 - stdenv.isAarch64; + stdenv.hostPlatform.isAarch64; }; }) diff --git a/pkgs/applications/graphics/f3d/default.nix b/pkgs/applications/graphics/f3d/default.nix index 5daaf0e10ef1..3ce409516249 100644 --- a/pkgs/applications/graphics/f3d/default.nix +++ b/pkgs/applications/graphics/f3d/default.nix @@ -15,7 +15,7 @@ , opencascade-occt , assimp , fontconfig -, withManual ? !stdenv.isDarwin +, withManual ? !stdenv.hostPlatform.isDarwin , withPythonBinding ? false }: @@ -48,7 +48,7 @@ stdenv.mkDerivation rec { opencascade-occt assimp fontconfig - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ Cocoa OpenGL ] ++ lib.optionals withPythonBinding [ diff --git a/pkgs/applications/graphics/feh/default.nix b/pkgs/applications/graphics/feh/default.nix index 56f4936ceff1..e7d144579afd 100644 --- a/pkgs/applications/graphics/feh/default.nix +++ b/pkgs/applications/graphics/feh/default.nix @@ -33,7 +33,7 @@ stdenv.mkDerivation (finalAttrs: { makeFlags = [ "PREFIX=${placeholder "out"}" "exif=1" - ] ++ lib.optional stdenv.isDarwin "verscmp=0" + ] ++ lib.optional stdenv.hostPlatform.isDarwin "verscmp=0" ++ lib.optional enableAutoreload "inotify=1"; installTargets = [ "install" ]; diff --git a/pkgs/applications/graphics/fstl/default.nix b/pkgs/applications/graphics/fstl/default.nix index c3d1f5eb655e..f902776fb58b 100644 --- a/pkgs/applications/graphics/fstl/default.nix +++ b/pkgs/applications/graphics/fstl/default.nix @@ -6,7 +6,7 @@ mkDerivation rec { nativeBuildInputs = [ cmake ]; - installPhase = lib.optionalString stdenv.isDarwin '' + installPhase = lib.optionalString stdenv.hostPlatform.isDarwin '' runHook preInstall mkdir -p $out/Applications diff --git a/pkgs/applications/graphics/gimp/default.nix b/pkgs/applications/graphics/gimp/default.nix index 8faf717a147e..5270b708486d 100644 --- a/pkgs/applications/graphics/gimp/default.nix +++ b/pkgs/applications/graphics/gimp/default.nix @@ -95,7 +95,7 @@ in stdenv.mkDerivation (finalAttrs: { makeWrapper gtk-doc libxslt - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ desktopToDarwinBundle ]; @@ -135,11 +135,11 @@ in stdenv.mkDerivation (finalAttrs: { glib-networking libmypaint mypaint-brushes1 - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ AppKit Cocoa gtk-mac-integration-gtk2 - ] ++ lib.optionals stdenv.isLinux [ + ] ++ lib.optionals stdenv.hostPlatform.isLinux [ libgudev ] ++ lib.optionals withPython [ python @@ -168,7 +168,7 @@ in stdenv.mkDerivation (finalAttrs: { doCheck = true; env = { - NIX_CFLAGS_COMPILE = lib.optionalString stdenv.isDarwin "-DGDK_OSX_BIG_SUR=16"; + NIX_CFLAGS_COMPILE = lib.optionalString stdenv.hostPlatform.isDarwin "-DGDK_OSX_BIG_SUR=16"; # Check if librsvg was built with --disable-pixbuf-loader. PKG_CONFIG_GDK_PIXBUF_2_0_GDK_PIXBUF_MODULEDIR = "${librsvg}/${gdk-pixbuf.moduleDir}"; diff --git a/pkgs/applications/graphics/gnome-obfuscate/default.nix b/pkgs/applications/graphics/gnome-obfuscate/default.nix index 6d0a8a8436f3..db173f58b54e 100644 --- a/pkgs/applications/graphics/gnome-obfuscate/default.nix +++ b/pkgs/applications/graphics/gnome-obfuscate/default.nix @@ -37,7 +37,7 @@ stdenv.mkDerivation (finalAttrs: { hash = "sha256-9lrxK2psdIPGsOC6p8T+3AGPrX6PjrK9mFirdJqBSMM="; }; - env = lib.optionalAttrs stdenv.isDarwin { + env = lib.optionalAttrs stdenv.hostPlatform.isDarwin { # Set the location to gettext to ensure the nixpkgs one on Darwin instead of the vendored one. # The vendored gettext does not build with clang 16. GETTEXT_BIN_DIR = "${lib.getBin buildPackages.gettext}/bin"; @@ -63,7 +63,7 @@ stdenv.mkDerivation (finalAttrs: { gtk4 gdk-pixbuf libadwaita - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ Foundation ]; diff --git a/pkgs/applications/graphics/icon-library/default.nix b/pkgs/applications/graphics/icon-library/default.nix index 8b2347f43818..2b2c3e19825a 100644 --- a/pkgs/applications/graphics/icon-library/default.nix +++ b/pkgs/applications/graphics/icon-library/default.nix @@ -27,7 +27,7 @@ stdenv.mkDerivation rec { hash = "sha256-nWGTYoSa0/fxnD0Mb2132LkeB1oa/gj/oIXBbI+FDw8="; }; - env = lib.optionalAttrs stdenv.isDarwin { + env = lib.optionalAttrs stdenv.hostPlatform.isDarwin { # Set the location to gettext to ensure the nixpkgs one on Darwin instead of the vendored one. # The vendored gettext does not build with clang 16. GETTEXT_BIN_DIR = "${lib.getBin buildPackages.gettext}/bin"; @@ -50,7 +50,7 @@ stdenv.mkDerivation rec { gtk4 gtksourceview5 libadwaita - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.Foundation ]; diff --git a/pkgs/applications/graphics/imagej/default.nix b/pkgs/applications/graphics/imagej/default.nix index 2398a61f2134..37fed43765ea 100644 --- a/pkgs/applications/graphics/imagej/default.nix +++ b/pkgs/applications/graphics/imagej/default.nix @@ -27,7 +27,7 @@ in stdenv.mkDerivation rec { buildInputs = [ glib ]; dontWrapGApps = true; - desktopItems = lib.optionals stdenv.isLinux [ + desktopItems = lib.optionals stdenv.hostPlatform.isLinux [ (makeDesktopItem { name = "ImageJ"; desktopName = "ImageJ"; @@ -56,7 +56,7 @@ in stdenv.mkDerivation rec { runHook postInstall ''; - postFixup = lib.optionalString stdenv.isLinux '' + postFixup = lib.optionalString stdenv.hostPlatform.isLinux '' makeWrapper ${jre}/bin/java $out/bin/imagej \ ''${gappsWrapperArgs[@]} \ --add-flags "-jar $out/share/java/ij.jar -ijpath $out/share" diff --git a/pkgs/applications/graphics/imv/default.nix b/pkgs/applications/graphics/imv/default.nix index 9c60f309e12a..178bdfcae3fb 100644 --- a/pkgs/applications/graphics/imv/default.nix +++ b/pkgs/applications/graphics/imv/default.nix @@ -32,7 +32,7 @@ let # default value of withWindowSystem withWindowSystem' = if withWindowSystem != null then withWindowSystem - else if stdenv.isLinux then "all" + else if stdenv.hostPlatform.isLinux then "all" else "x11"; windowSystems = { diff --git a/pkgs/applications/graphics/inkscape/default.nix b/pkgs/applications/graphics/inkscape/default.nix index 81cd91ebb6b0..62f485ff916e 100644 --- a/pkgs/applications/graphics/inkscape/default.nix +++ b/pkgs/applications/graphics/inkscape/default.nix @@ -134,7 +134,7 @@ stdenv.mkDerivation rec { ] ++ (with perlPackages; [ perl XMLParser - ]) ++ lib.optionals stdenv.isDarwin [ + ]) ++ lib.optionals stdenv.hostPlatform.isDarwin [ desktopToDarwinBundle ]; @@ -168,15 +168,15 @@ stdenv.mkDerivation rec { python3Env zlib libepoxy - ] ++ lib.optionals (!stdenv.isDarwin) [ + ] ++ lib.optionals (!stdenv.hostPlatform.isDarwin) [ gspell - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ cairo gtk-mac-integration ]; # Make sure PyXML modules can be found at run-time. - postInstall = lib.optionalString stdenv.isDarwin '' + postInstall = lib.optionalString stdenv.hostPlatform.isDarwin '' for f in $out/lib/inkscape/*.dylib; do ln -s $f $out/lib/$(basename $f) done diff --git a/pkgs/applications/graphics/lorien/default.nix b/pkgs/applications/graphics/lorien/default.nix index 8105e3682b59..1f86c6dd2ed0 100644 --- a/pkgs/applications/graphics/lorien/default.nix +++ b/pkgs/applications/graphics/lorien/default.nix @@ -27,8 +27,8 @@ let preset = - if stdenv.isLinux then "Linux/X11" - else if stdenv.isDarwin then "Mac OSX" + if stdenv.hostPlatform.isLinux then "Linux/X11" + else if stdenv.hostPlatform.isDarwin then "Mac OSX" else throw "unsupported platform"; in stdenv.mkDerivation rec { diff --git a/pkgs/applications/graphics/menyoki/default.nix b/pkgs/applications/graphics/menyoki/default.nix index 8d965fe7b129..e8ae4e7f2555 100644 --- a/pkgs/applications/graphics/menyoki/default.nix +++ b/pkgs/applications/graphics/menyoki/default.nix @@ -25,11 +25,11 @@ rustPlatform.buildRustPackage rec { cargoHash = "sha256-NtXjlGkX8AzSw98xHPymzdnTipMIunyDbpSr4eVowa0="; nativeBuildInputs = [ installShellFiles ] - ++ lib.optional stdenv.isLinux pkg-config; + ++ lib.optional stdenv.hostPlatform.isLinux pkg-config; buildInputs = lib.optional withSixel libsixel - ++ lib.optionals stdenv.isLinux (with xorg; [ libX11 libXrandr ]) - ++ lib.optional stdenv.isDarwin AppKit; + ++ lib.optionals stdenv.hostPlatform.isLinux (with xorg; [ libX11 libXrandr ]) + ++ lib.optional stdenv.hostPlatform.isDarwin AppKit; buildNoDefaultFeatures = !withSki; buildFeatures = lib.optional withSixel "sixel"; diff --git a/pkgs/applications/graphics/oculante/default.nix b/pkgs/applications/graphics/oculante/default.nix index c6f2b188770c..f2c7aa843dbc 100644 --- a/pkgs/applications/graphics/oculante/default.nix +++ b/pkgs/applications/graphics/oculante/default.nix @@ -44,7 +44,7 @@ rustPlatform.buildRustPackage rec { buildInputs = [ openssl fontconfig - ] ++ lib.optionals stdenv.isLinux [ + ] ++ lib.optionals stdenv.hostPlatform.isLinux [ libGL libX11 libXcursor @@ -54,7 +54,7 @@ rustPlatform.buildRustPackage rec { libxkbcommon wayland - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ darwin.libobjc ]; @@ -71,7 +71,7 @@ rustPlatform.buildRustPackage rec { ''; meta = with lib; { - broken = stdenv.isDarwin; + broken = stdenv.hostPlatform.isDarwin; description = "Minimalistic crossplatform image viewer written in Rust"; homepage = "https://github.com/woelper/oculante"; changelog = "https://github.com/woelper/oculante/blob/${version}/CHANGELOG.md"; diff --git a/pkgs/applications/graphics/openscad/default.nix b/pkgs/applications/graphics/openscad/default.nix index 9b29f6ddc94d..26e19eec33f8 100644 --- a/pkgs/applications/graphics/openscad/default.nix +++ b/pkgs/applications/graphics/openscad/default.nix @@ -26,7 +26,7 @@ , mkDerivation , qtmacextras , qmake -, spacenavSupport ? stdenv.isLinux, libspnav +, spacenavSupport ? stdenv.hostPlatform.isLinux, libspnav , wayland , wayland-protocols , wrapGAppsHook3 @@ -66,8 +66,8 @@ mkDerivation rec { eigen boost glew opencsg cgal_4 mpfr gmp glib harfbuzz lib3mf libzip double-conversion freetype fontconfig qtbase qtmultimedia qscintilla cairo - ] ++ lib.optionals stdenv.isLinux [ libGLU libGL wayland wayland-protocols qtwayland ] - ++ lib.optional stdenv.isDarwin qtmacextras + ] ++ lib.optionals stdenv.hostPlatform.isLinux [ libGLU libGL wayland wayland-protocols qtwayland ] + ++ lib.optional stdenv.hostPlatform.isDarwin qtmacextras ++ lib.optional spacenavSupport libspnav ; @@ -88,7 +88,7 @@ mkDerivation rec { make objects/parser.cxx ''; - postInstall = lib.optionalString stdenv.isDarwin '' + postInstall = lib.optionalString stdenv.hostPlatform.isDarwin '' mkdir $out/Applications mv $out/bin/*.app $out/Applications rmdir $out/bin || true diff --git a/pkgs/applications/graphics/ovito/default.nix b/pkgs/applications/graphics/ovito/default.nix index 3af9566c375f..710460054586 100644 --- a/pkgs/applications/graphics/ovito/default.nix +++ b/pkgs/applications/graphics/ovito/default.nix @@ -48,7 +48,7 @@ mkDerivation rec { qtbase qtsvg qttools - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ VideoDecodeAcceleration ]; @@ -58,6 +58,6 @@ mkDerivation rec { homepage = "https://ovito.org"; license = with licenses; [ gpl3Only mit ]; maintainers = with maintainers; [ twhitehead ]; - broken = stdenv.isDarwin; # clang-11: error: no such file or directory: '$-DOVITO_COPYRIGHT_NOTICE=... + broken = stdenv.hostPlatform.isDarwin; # clang-11: error: no such file or directory: '$-DOVITO_COPYRIGHT_NOTICE=... }; } diff --git a/pkgs/applications/graphics/panotools/default.nix b/pkgs/applications/graphics/panotools/default.nix index c7e7b7d07f5e..494fd093ac4a 100644 --- a/pkgs/applications/graphics/panotools/default.nix +++ b/pkgs/applications/graphics/panotools/default.nix @@ -29,7 +29,7 @@ stdenv.mkDerivation (finalAttrs: { libjpeg libpng libtiff - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.Carbon ]; diff --git a/pkgs/applications/graphics/qosmic/default.nix b/pkgs/applications/graphics/qosmic/default.nix index ebee900cf9d6..eab80b018ccc 100644 --- a/pkgs/applications/graphics/qosmic/default.nix +++ b/pkgs/applications/graphics/qosmic/default.nix @@ -42,7 +42,7 @@ stdenv.mkDerivation rec { }) ]; - postPatch = lib.optionalString stdenv.isDarwin '' + postPatch = lib.optionalString stdenv.hostPlatform.isDarwin '' substituteInPlace qosmic.pro \ --replace "/share" "/Applications/qosmic.app/Contents/Resources" \ --replace "/qosmic/scripts" "/scripts" \ @@ -65,7 +65,7 @@ stdenv.mkDerivation rec { "CONFIG+=link_pkgconfig" ]; - preInstall = lib.optionalString stdenv.isDarwin '' + preInstall = lib.optionalString stdenv.hostPlatform.isDarwin '' mkdir -p $out/Applications mv qosmic.app $out/Applications ''; diff --git a/pkgs/applications/graphics/qvge/default.nix b/pkgs/applications/graphics/qvge/default.nix index e7c6def43b91..ef4e17fcce81 100644 --- a/pkgs/applications/graphics/qvge/default.nix +++ b/pkgs/applications/graphics/qvge/default.nix @@ -29,7 +29,7 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ wrapQtAppsHook qmake ]; - buildInputs = if stdenv.isDarwin then [ qtsvg ] else [ qtx11extras ]; + buildInputs = if stdenv.hostPlatform.isDarwin then [ qtsvg ] else [ qtx11extras ]; meta = with lib; { description = "Qt Visual Graph Editor"; diff --git a/pkgs/applications/graphics/rawtherapee/default.nix b/pkgs/applications/graphics/rawtherapee/default.nix index aa7c9c84ac16..deb45b06d19f 100644 --- a/pkgs/applications/graphics/rawtherapee/default.nix +++ b/pkgs/applications/graphics/rawtherapee/default.nix @@ -58,7 +58,7 @@ stdenv.mkDerivation rec { cmake pkg-config wrapGAppsHook3 - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ makeWrapper ]; @@ -88,9 +88,9 @@ stdenv.mkDerivation rec { exiv2 libraw libjxl - ] ++ lib.optionals stdenv.isLinux [ + ] ++ lib.optionals stdenv.hostPlatform.isLinux [ libcanberra-gtk3 - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ gtk-mac-integration ]; @@ -99,7 +99,7 @@ stdenv.mkDerivation rec { "-DCACHE_NAME_SUFFIX=\"\"" "-DWITH_SYSTEM_LIBRAW=\"ON\"" "-DWITH_JXL=\"ON\"" - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ "-DCMAKE_OSX_DEPLOYMENT_TARGET=${stdenv.hostPlatform.darwinMinVersion}" ]; @@ -110,7 +110,7 @@ stdenv.mkDerivation rec { ]; env.CXXFLAGS = "-include cstdint"; # needed at least with gcc13 on aarch64-linux - postInstall = lib.optionalString stdenv.isDarwin '' + postInstall = lib.optionalString stdenv.hostPlatform.isDarwin '' mkdir -p $out/Applications/RawTherapee.app $out/bin cp -R Release $out/Applications/RawTherapee.app/Contents for f in $out/Applications/RawTherapee.app/Contents/MacOS/*; do diff --git a/pkgs/applications/graphics/rx/default.nix b/pkgs/applications/graphics/rx/default.nix index 5b7162299952..943f46fab649 100644 --- a/pkgs/applications/graphics/rx/default.nix +++ b/pkgs/applications/graphics/rx/default.nix @@ -18,7 +18,7 @@ rustPlatform.buildRustPackage rec { nativeBuildInputs = [ cmake pkg-config makeWrapper ]; - buildInputs = lib.optionals stdenv.isLinux + buildInputs = lib.optionals stdenv.hostPlatform.isLinux (with xorg; [ # glfw-sys dependencies: libX11 libXrandr libXinerama libXcursor libXi libXext @@ -27,7 +27,7 @@ rustPlatform.buildRustPackage rec { # FIXME: GLFW (X11) requires DISPLAY env variable for all tests doCheck = false; - postInstall = lib.optionalString stdenv.isLinux '' + postInstall = lib.optionalString stdenv.hostPlatform.isLinux '' mkdir -p $out/share/applications cp $src/rx.desktop $out/share/applications wrapProgram $out/bin/rx --prefix LD_LIBRARY_PATH : ${libGL}/lib diff --git a/pkgs/applications/graphics/sane/backends/brscan4/default.nix b/pkgs/applications/graphics/sane/backends/brscan4/default.nix index ece80ef18a5b..f4c516ef5698 100644 --- a/pkgs/applications/graphics/sane/backends/brscan4/default.nix +++ b/pkgs/applications/graphics/sane/backends/brscan4/default.nix @@ -2,7 +2,7 @@ let myPatchElf = file: '' patchelf --set-interpreter \ - ${stdenv.cc.libc}/lib/ld-linux${lib.optionalString stdenv.is64bit "-x86-64"}.so.2 \ + ${stdenv.cc.libc}/lib/ld-linux${lib.optionalString stdenv.hostPlatform.is64bit "-x86-64"}.so.2 \ ${file} ''; @@ -49,7 +49,7 @@ stdenv.mkDerivation rec { mkdir -p $out/$PATH_TO_BRSCAN4 cp -rp $PATH_TO_BRSCAN4/* $out/$PATH_TO_BRSCAN4 mkdir -p $out/lib/sane - cp -rp usr/lib${lib.optionalString stdenv.is64bit "64"}/sane/* $out/lib/sane + cp -rp usr/lib${lib.optionalString stdenv.hostPlatform.is64bit "64"}/sane/* $out/lib/sane # Symbolic links were absolute. Fix them so that they point to $out. pushd "$out/lib/sane" > /dev/null diff --git a/pkgs/applications/graphics/sane/backends/brscan5/default.nix b/pkgs/applications/graphics/sane/backends/brscan5/default.nix index b816eb71d27c..91be20f3abbc 100644 --- a/pkgs/applications/graphics/sane/backends/brscan5/default.nix +++ b/pkgs/applications/graphics/sane/backends/brscan5/default.nix @@ -2,7 +2,7 @@ let myPatchElf = file: '' patchelf --set-interpreter \ - ${stdenv.cc.libc}/lib/ld-linux${lib.optionalString stdenv.is64bit "-x86-64"}.so.2 \ + ${stdenv.cc.libc}/lib/ld-linux${lib.optionalString stdenv.hostPlatform.is64bit "-x86-64"}.so.2 \ ${file} ''; system = stdenv.hostPlatform.system; diff --git a/pkgs/applications/graphics/sane/backends/default.nix b/pkgs/applications/graphics/sane/backends/default.nix index 1581b2f5b7b2..55fbc9a3616a 100644 --- a/pkgs/applications/graphics/sane/backends/default.nix +++ b/pkgs/applications/graphics/sane/backends/default.nix @@ -99,7 +99,7 @@ stdenv.mkDerivation rec { libxml2 poppler gawk - ] ++ lib.optionals stdenv.isLinux [ + ] ++ lib.optionals stdenv.hostPlatform.isLinux [ libieee1284 libv4l net-snmp diff --git a/pkgs/applications/graphics/symbolic-preview/default.nix b/pkgs/applications/graphics/symbolic-preview/default.nix index 5d8ef439f013..46f654b95600 100644 --- a/pkgs/applications/graphics/symbolic-preview/default.nix +++ b/pkgs/applications/graphics/symbolic-preview/default.nix @@ -25,6 +25,6 @@ stdenv.mkDerivation rec { license = licenses.gpl3Plus; platforms = platforms.unix; # never built on aarch64-darwin, x86_64-darwin since first introduction in nixpkgs - broken = stdenv.isDarwin; + broken = stdenv.hostPlatform.isDarwin; }; } diff --git a/pkgs/applications/graphics/synfigstudio/default.nix b/pkgs/applications/graphics/synfigstudio/default.nix index 3c83be511976..e19da3fa15fe 100644 --- a/pkgs/applications/graphics/synfigstudio/default.nix +++ b/pkgs/applications/graphics/synfigstudio/default.nix @@ -99,7 +99,7 @@ let fribidi openexr fftw - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.Foundation ]; }; diff --git a/pkgs/applications/graphics/tesseract/tesseract5.nix b/pkgs/applications/graphics/tesseract/tesseract5.nix index 16899aea978b..a8563a09e4c0 100644 --- a/pkgs/applications/graphics/tesseract/tesseract5.nix +++ b/pkgs/applications/graphics/tesseract/tesseract5.nix @@ -30,7 +30,7 @@ stdenv.mkDerivation rec { icu pango opencl-headers - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ Accelerate CoreGraphics CoreVideo diff --git a/pkgs/applications/graphics/tev/default.nix b/pkgs/applications/graphics/tev/default.nix index 6ab953020c60..e026db40e8ed 100644 --- a/pkgs/applications/graphics/tev/default.nix +++ b/pkgs/applications/graphics/tev/default.nix @@ -51,7 +51,7 @@ stdenv.mkDerivation rec { changelog = "https://github.com/Tom94/tev/releases/tag/v${version}"; license = licenses.bsd3; platforms = platforms.unix; - broken = stdenv.isDarwin; # needs apple frameworks + SDK fix? see #205247 + broken = stdenv.hostPlatform.isDarwin; # needs apple frameworks + SDK fix? see #205247 maintainers = [ ]; }; } diff --git a/pkgs/applications/graphics/vengi-tools/default.nix b/pkgs/applications/graphics/vengi-tools/default.nix index 4470ccfec421..be14ad6c63e9 100644 --- a/pkgs/applications/graphics/vengi-tools/default.nix +++ b/pkgs/applications/graphics/vengi-tools/default.nix @@ -67,12 +67,12 @@ stdenv.mkDerivation (finalAttrs: { lzfse SDL2 SDL2_mixer - ] ++ lib.optional stdenv.isLinux wayland-protocols - ++ lib.optionals stdenv.isDarwin [ Carbon CoreServices OpenCL ] - ++ lib.optional (!stdenv.isDarwin) opencl-headers; + ] ++ lib.optional stdenv.hostPlatform.isLinux wayland-protocols + ++ lib.optionals stdenv.hostPlatform.isDarwin [ Carbon CoreServices OpenCL ] + ++ lib.optional (!stdenv.hostPlatform.isDarwin) opencl-headers; cmakeFlags = - lib.optional stdenv.isDarwin "-DCORESERVICES_LIB=${CoreServices}"; + lib.optional stdenv.hostPlatform.isDarwin "-DCORESERVICES_LIB=${CoreServices}"; # error: "The plain signature for target_link_libraries has already been used" doCheck = false; @@ -86,7 +86,7 @@ stdenv.mkDerivation (finalAttrs: { # one. # This is not needed on darwin, since on that platform data files are saved # in *.app/Contents/Resources/ too, and are picked up automatically. - postInstall = lib.optionalString (!stdenv.isDarwin) '' + postInstall = lib.optionalString (!stdenv.hostPlatform.isDarwin) '' for prog in $out/bin/*; do wrapProgram "$prog" \ --set CORE_PATH $out/share/$(basename "$prog")/ @@ -113,6 +113,6 @@ stdenv.mkDerivation (finalAttrs: { license = [ licenses.mit licenses.cc-by-sa-30 ]; maintainers = with maintainers; [ fgaz ]; platforms = platforms.all; - broken = stdenv.isDarwin; + broken = stdenv.hostPlatform.isDarwin; }; }) diff --git a/pkgs/applications/graphics/vimiv-qt/default.nix b/pkgs/applications/graphics/vimiv-qt/default.nix index 83bbbecdc65b..75a0b88fba4e 100644 --- a/pkgs/applications/graphics/vimiv-qt/default.nix +++ b/pkgs/applications/graphics/vimiv-qt/default.nix @@ -21,7 +21,7 @@ python3.pkgs.buildPythonApplication rec { propagatedBuildInputs = with python3.pkgs; [ pyqt5 py3exiv2 ]; - buildInputs = [ qt5.qtsvg ] ++ lib.optionals stdenv.isLinux [ qt5.qtwayland ]; + buildInputs = [ qt5.qtsvg ] ++ lib.optionals stdenv.hostPlatform.isLinux [ qt5.qtwayland ]; postInstall = '' install -Dm644 misc/vimiv.desktop $out/share/applications/vimiv.desktop diff --git a/pkgs/applications/graphics/vpv/default.nix b/pkgs/applications/graphics/vpv/default.nix index 1bbdbd4a35e7..7f80ff24a3ce 100644 --- a/pkgs/applications/graphics/vpv/default.nix +++ b/pkgs/applications/graphics/vpv/default.nix @@ -58,7 +58,7 @@ stdenv.mkDerivation (finalAttrs: { description = "Image viewer for image processing experts"; maintainers = [ lib.maintainers.kidanger ]; license = lib.licenses.gpl3; - broken = stdenv.isDarwin; # the CMake expects the SDL2::SDL2main target for darwin + broken = stdenv.hostPlatform.isDarwin; # the CMake expects the SDL2::SDL2main target for darwin mainProgram = "vpv"; }; }) diff --git a/pkgs/applications/graphics/weylus/default.nix b/pkgs/applications/graphics/weylus/default.nix index 36647a62aef2..61b40006b386 100644 --- a/pkgs/applications/graphics/weylus/default.nix +++ b/pkgs/applications/graphics/weylus/default.nix @@ -38,12 +38,12 @@ rustPlatform.buildRustPackage rec { buildInputs = [ ffmpeg x264 - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ ApplicationServices Carbon Cocoa VideoToolbox - ] ++ lib.optionals stdenv.isLinux [ + ] ++ lib.optionals stdenv.hostPlatform.isLinux [ dbus libva gst_all_1.gst-plugins-base @@ -67,7 +67,7 @@ rustPlatform.buildRustPackage rec { git typescript makeWrapper - ] ++ lib.optionals stdenv.isLinux [ + ] ++ lib.optionals stdenv.hostPlatform.isLinux [ pkg-config autoconf libtool @@ -88,7 +88,7 @@ rustPlatform.buildRustPackage rec { gst_all_1.gst-plugins-base pipewire ]; - in lib.optionalString stdenv.isLinux '' + in lib.optionalString stdenv.hostPlatform.isLinux '' wrapProgram $out/bin/weylus --prefix GST_PLUGIN_PATH : ${GST_PLUGIN_PATH} ''; @@ -97,7 +97,7 @@ rustPlatform.buildRustPackage rec { ''; meta = with lib; { - broken = stdenv.isDarwin; + broken = stdenv.hostPlatform.isDarwin; description = "Use your tablet as graphic tablet/touch screen on your computer"; mainProgram = "weylus"; homepage = "https://github.com/H-M-H/Weylus"; diff --git a/pkgs/applications/graphics/xournalpp/default.nix b/pkgs/applications/graphics/xournalpp/default.nix index 3527f96bf5b9..921fef456289 100644 --- a/pkgs/applications/graphics/xournalpp/default.nix +++ b/pkgs/applications/graphics/xournalpp/default.nix @@ -44,7 +44,7 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ cmake gettext pkg-config wrapGAppsHook3 ]; buildInputs = - lib.optionals stdenv.isLinux [ + lib.optionals stdenv.hostPlatform.isLinux [ alsa-lib ] ++ [ glib diff --git a/pkgs/applications/kde/falkon.nix b/pkgs/applications/kde/falkon.nix index b24375e75005..85c4d113fb13 100644 --- a/pkgs/applications/kde/falkon.nix +++ b/pkgs/applications/kde/falkon.nix @@ -20,7 +20,7 @@ mkDerivation rec { libpthreadstubs libxcb libXdmcp qtsvg qttools qtwebengine qtx11extras kwallet kpurpose karchive kio - ] ++ lib.optionals stdenv.isLinux [ qtwayland ]; + ] ++ lib.optionals stdenv.hostPlatform.isLinux [ qtwayland ]; nativeBuildInputs = [ cmake diff --git a/pkgs/applications/misc/1password-gui/default.nix b/pkgs/applications/misc/1password-gui/default.nix index f95d5d9a94d8..cecb229ce13f 100644 --- a/pkgs/applications/misc/1password-gui/default.nix +++ b/pkgs/applications/misc/1password-gui/default.nix @@ -61,7 +61,7 @@ let meta = { # Requires to be installed in "/Application" which is not possible for now (https://github.com/NixOS/nixpkgs/issues/254944) - broken = stdenv.isDarwin; + broken = stdenv.hostPlatform.isDarwin; description = "Multi-platform password manager"; homepage = "https://1password.com/"; sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ]; @@ -76,7 +76,7 @@ let }; in -if stdenv.isDarwin then +if stdenv.hostPlatform.isDarwin then callPackage ./darwin.nix { inherit pname diff --git a/pkgs/applications/misc/1password/default.nix b/pkgs/applications/misc/1password/default.nix index 9ecc38a9abbb..cbc05d27b878 100644 --- a/pkgs/applications/misc/1password/default.nix +++ b/pkgs/applications/misc/1password/default.nix @@ -32,11 +32,11 @@ stdenv.mkDerivation { else throw "Source for ${pname} is not available for ${system}"; - nativeBuildInputs = [ installShellFiles ] ++ lib.optional stdenv.isLinux autoPatchelfHook; + nativeBuildInputs = [ installShellFiles ] ++ lib.optional stdenv.hostPlatform.isLinux autoPatchelfHook; - buildInputs = lib.optionals stdenv.isDarwin [ xar cpio ]; + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ xar cpio ]; - unpackPhase = lib.optionalString stdenv.isDarwin '' + unpackPhase = lib.optionalString stdenv.hostPlatform.isDarwin '' xar -xf $src zcat op.pkg/Payload | cpio -i ''; @@ -55,7 +55,7 @@ stdenv.mkDerivation { --zsh <($out/bin/${mainProgram} completion zsh) ''; - dontStrip = stdenv.isDarwin; + dontStrip = stdenv.hostPlatform.isDarwin; doInstallCheck = true; diff --git a/pkgs/applications/misc/anup/default.nix b/pkgs/applications/misc/anup/default.nix index 91cf5c9540a5..a72ba17eb6b4 100644 --- a/pkgs/applications/misc/anup/default.nix +++ b/pkgs/applications/misc/anup/default.nix @@ -14,7 +14,7 @@ rustPlatform.buildRustPackage rec { buildInputs = [ sqlite xdg-utils - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ Security ]; diff --git a/pkgs/applications/misc/audio/sox/default.nix b/pkgs/applications/misc/audio/sox/default.nix index 44e1f0992ad7..621fca6feb2d 100644 --- a/pkgs/applications/misc/audio/sox/default.nix +++ b/pkgs/applications/misc/audio/sox/default.nix @@ -31,7 +31,7 @@ , enableAMR ? false , amrnb , amrwb -, enableLibpulseaudio ? stdenv.isLinux && lib.meta.availableOn stdenv.hostPlatform libpulseaudio +, enableLibpulseaudio ? stdenv.hostPlatform.isLinux && lib.meta.availableOn stdenv.hostPlatform libpulseaudio , libpulseaudio }: @@ -65,7 +65,7 @@ stdenv.mkDerivation rec { patches = [ ./0001-musl-rewind-pipe-workaround.patch ]; buildInputs = - lib.optional (enableAlsa && stdenv.isLinux) alsa-lib + lib.optional (enableAlsa && stdenv.hostPlatform.isLinux) alsa-lib ++ lib.optional enableLibao libao ++ lib.optional enableLame lame ++ lib.optional enableLibmad libmad @@ -77,7 +77,7 @@ stdenv.mkDerivation rec { ++ lib.optional enableWavpack wavpack ++ lib.optionals enableAMR [ amrnb amrwb ] ++ lib.optional enableLibpulseaudio libpulseaudio - ++ lib.optional stdenv.isDarwin CoreAudio; + ++ lib.optional stdenv.hostPlatform.isDarwin CoreAudio; enableParallelBuilding = true; diff --git a/pkgs/applications/misc/bambu-studio/default.nix b/pkgs/applications/misc/bambu-studio/default.nix index 70812441d348..b1ff6eb0a2f5 100644 --- a/pkgs/applications/misc/bambu-studio/default.nix +++ b/pkgs/applications/misc/bambu-studio/default.nix @@ -42,7 +42,7 @@ webkitgtk, wxGTK31, xorg, - withSystemd ? stdenv.isLinux, + withSystemd ? stdenv.hostPlatform.isLinux, }: let opencascade-occt = opencascade-occt_7_6; diff --git a/pkgs/applications/misc/bb/default.nix b/pkgs/applications/misc/bb/default.nix index 89a0d75fc2b5..16f4c0bd2d6f 100644 --- a/pkgs/applications/misc/bb/default.nix +++ b/pkgs/applications/misc/bb/default.nix @@ -12,14 +12,14 @@ stdenv.mkDerivation rec { buildInputs = [ aalib ncurses libmikmod xorg.libXau xorg.libXdmcp xorg.libX11 - ] ++ lib.optional stdenv.isDarwin darwin.apple_sdk.frameworks.CoreAudio; + ] ++ lib.optional stdenv.hostPlatform.isDarwin darwin.apple_sdk.frameworks.CoreAudio; - postPatch = lib.optionalString stdenv.isDarwin '' + postPatch = lib.optionalString stdenv.hostPlatform.isDarwin '' sed -i -e '/^#include $/d' *.c ''; # error: 'regparm' is not valid on this platform - env.NIX_CFLAGS_COMPILE = lib.optionalString (stdenv.isDarwin && stdenv.isAarch64) + env.NIX_CFLAGS_COMPILE = lib.optionalString (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isAarch64) "-D__STRICT_ANSI__"; meta = with lib; { diff --git a/pkgs/applications/misc/binocle/default.nix b/pkgs/applications/misc/binocle/default.nix index 92ccc4112993..da77d6c693df 100644 --- a/pkgs/applications/misc/binocle/default.nix +++ b/pkgs/applications/misc/binocle/default.nix @@ -31,11 +31,11 @@ rustPlatform.buildRustPackage rec { makeWrapper ]; - buildInputs = lib.optionals stdenv.isDarwin [ + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ AppKit CoreFoundation CoreGraphics CoreVideo Foundation Metal QuartzCore ]; - postInstall = lib.optionalString (!stdenv.isDarwin) '' + postInstall = lib.optionalString (!stdenv.hostPlatform.isDarwin) '' wrapProgram $out/bin/binocle \ --suffix LD_LIBRARY_PATH : ${lib.makeLibraryPath (with xorg; [ libX11 libXcursor libXi libXrandr ] ++ [ vulkan-loader ])} ''; diff --git a/pkgs/applications/misc/blender/default.nix b/pkgs/applications/misc/blender/default.nix index 503e739a74bd..369a874896b1 100644 --- a/pkgs/applications/misc/blender/default.nix +++ b/pkgs/applications/misc/blender/default.nix @@ -71,22 +71,22 @@ python3Packages, # must use instead of python3.pkgs, see https://github.com/NixOS/nixpkgs/issues/211340 rocmPackages, # comes with a significantly larger closure size runCommand, - spaceNavSupport ? stdenv.isLinux, + spaceNavSupport ? stdenv.hostPlatform.isLinux, sse2neon, stdenv, tbb, wayland, wayland-protocols, wayland-scanner, - waylandSupport ? stdenv.isLinux, + waylandSupport ? stdenv.hostPlatform.isLinux, zlib, zstd, }: let - embreeSupport = (!stdenv.isAarch64 && stdenv.isLinux) || stdenv.isDarwin; - openImageDenoiseSupport = (!stdenv.isAarch64 && stdenv.isLinux) || stdenv.isDarwin; - openUsdSupport = !stdenv.isDarwin; + embreeSupport = (!stdenv.hostPlatform.isAarch64 && stdenv.hostPlatform.isLinux) || stdenv.hostPlatform.isDarwin; + openImageDenoiseSupport = (!stdenv.hostPlatform.isAarch64 && stdenv.hostPlatform.isLinux) || stdenv.hostPlatform.isDarwin; + openUsdSupport = !stdenv.hostPlatform.isDarwin; python3 = python3Packages.python; pyPkgsOpenusd = python3Packages.openusd.override { withOsl = false; }; @@ -130,10 +130,10 @@ stdenv.mkDerivation (finalAttrs: { sourceRoot = "source"; - patches = [ ./draco.patch ] ++ lib.optional stdenv.isDarwin ./darwin.patch; + patches = [ ./draco.patch ] ++ lib.optional stdenv.hostPlatform.isDarwin ./darwin.patch; postPatch = - (lib.optionalString stdenv.isDarwin '' + (lib.optionalString stdenv.hostPlatform.isDarwin '' : > build_files/cmake/platform/platform_apple_xcode.cmake substituteInPlace source/creator/CMakeLists.txt \ --replace-fail '${"$"}{LIBDIR}/python' \ @@ -200,7 +200,7 @@ stdenv.mkDerivation (finalAttrs: { "-DWITH_GHOST_WAYLAND_DYNLOAD=OFF" "-DWITH_GHOST_WAYLAND_LIBDECOR=ON" ] - ++ lib.optionals stdenv.isDarwin [ + ++ lib.optionals stdenv.hostPlatform.isDarwin [ "-DLIBDIR=/does-not-exist" "-DSSE2NEON_INCLUDE_DIR=${sse2neon}/lib" ] @@ -275,7 +275,7 @@ stdenv.mkDerivation (finalAttrs: { ++ lib.optional embreeSupport embree ++ lib.optional openImageDenoiseSupport (openimagedenoise.override { inherit cudaSupport; }) ++ ( - if (!stdenv.isDarwin) then + if (!stdenv.hostPlatform.isDarwin) then [ libGL libGLU @@ -328,14 +328,14 @@ stdenv.mkDerivation (finalAttrs: { blenderExecutable = placeholder "out" - + (if stdenv.isDarwin then "/Applications/Blender.app/Contents/MacOS/Blender" else "/bin/blender"); + + (if stdenv.hostPlatform.isDarwin then "/Applications/Blender.app/Contents/MacOS/Blender" else "/bin/blender"); postInstall = - lib.optionalString stdenv.isDarwin '' + lib.optionalString stdenv.hostPlatform.isDarwin '' mkdir $out/Applications mv $out/Blender.app $out/Applications '' - + lib.optionalString stdenv.isLinux '' + + lib.optionalString stdenv.hostPlatform.isLinux '' mv $out/share/blender/${lib.versions.majorMinor finalAttrs.version}/python{,-ext} '' + '' @@ -355,7 +355,7 @@ stdenv.mkDerivation (finalAttrs: { addDriverRunpath "$program" done '' - + lib.optionalString stdenv.isDarwin '' + + lib.optionalString stdenv.hostPlatform.isDarwin '' makeWrapper $out/Applications/Blender.app/Contents/MacOS/Blender $out/bin/blender ''; @@ -377,7 +377,7 @@ stdenv.mkDerivation (finalAttrs: { import bpy bpy.context.scene.eevee.taa_render_samples = 32 bpy.context.scene.cycles.samples = 32 - if ${if (stdenv.isAarch64 && stdenv.isLinux) then "True" else "False"}: + if ${if (stdenv.hostPlatform.isAarch64 && stdenv.hostPlatform.isLinux) then "True" else "False"}: bpy.context.scene.cycles.use_denoising = False bpy.context.scene.render.resolution_x = 100 bpy.context.scene.render.resolution_y = 100 @@ -433,7 +433,7 @@ stdenv.mkDerivation (finalAttrs: { "x86_64-linux" "aarch64-darwin" ]; - broken = stdenv.isDarwin; # fails due to too-old SDK, using newer SDK fails to compile + broken = stdenv.hostPlatform.isDarwin; # fails due to too-old SDK, using newer SDK fails to compile maintainers = with lib.maintainers; [ amarshall veprbl diff --git a/pkgs/applications/misc/boatswain/default.nix b/pkgs/applications/misc/boatswain/default.nix index 5d2b1540aebe..fc2842ebe52f 100644 --- a/pkgs/applications/misc/boatswain/default.nix +++ b/pkgs/applications/misc/boatswain/default.nix @@ -62,6 +62,6 @@ stdenv.mkDerivation rec { license = licenses.gpl3Plus; platforms = platforms.unix; maintainers = with maintainers; [ _0xMRTT ]; - broken = stdenv.isDarwin; + broken = stdenv.hostPlatform.isDarwin; }; } diff --git a/pkgs/applications/misc/calibre/default.nix b/pkgs/applications/misc/calibre/default.nix index 10bbeefd03f1..b5e8c469b408 100644 --- a/pkgs/applications/misc/calibre/default.nix +++ b/pkgs/applications/misc/calibre/default.nix @@ -224,6 +224,6 @@ stdenv.mkDerivation (finalAttrs: { else lib.licenses.gpl3Plus; maintainers = with lib.maintainers; [ pSub ]; platforms = lib.platforms.unix; - broken = stdenv.isDarwin; + broken = stdenv.hostPlatform.isDarwin; }; }) diff --git a/pkgs/applications/misc/cardpeek/default.nix b/pkgs/applications/misc/cardpeek/default.nix index 833ad9202b9f..6122607bc4dc 100644 --- a/pkgs/applications/misc/cardpeek/default.nix +++ b/pkgs/applications/misc/cardpeek/default.nix @@ -25,7 +25,7 @@ stdenv.mkDerivation { sha256 = "1ighpl7nvcvwnsd6r5h5n9p95kclwrq99hq7bry7s53yr57l6588"; }; - postPatch = lib.optionalString stdenv.isDarwin '' + postPatch = lib.optionalString stdenv.hostPlatform.isDarwin '' # replace xcode check and hard-coded PCSC framework path substituteInPlace configure.ac \ --replace 'if test ! -e "/Applications/Xcode.app/"; then' 'if test yes != yes; then' \ @@ -34,8 +34,8 @@ stdenv.mkDerivation { nativeBuildInputs = [ pkg-config autoreconfHook ]; buildInputs = [ glib gtk3 lua5_2 curl readline ] - ++ lib.optional stdenv.isDarwin PCSC - ++ lib.optional stdenv.isLinux pcsclite; + ++ lib.optional stdenv.hostPlatform.isDarwin PCSC + ++ lib.optional stdenv.hostPlatform.isLinux pcsclite; enableParallelBuilding = true; diff --git a/pkgs/applications/misc/citations/default.nix b/pkgs/applications/misc/citations/default.nix index ae3964355a48..178a0e25cbf6 100644 --- a/pkgs/applications/misc/citations/default.nix +++ b/pkgs/applications/misc/citations/default.nix @@ -56,7 +56,7 @@ stdenv.mkDerivation (finalAttrs: { gtksourceview5 libadwaita poppler - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.Foundation ]; diff --git a/pkgs/applications/misc/clipqr/default.nix b/pkgs/applications/misc/clipqr/default.nix index 18b276f2646f..90d4e0b66b52 100644 --- a/pkgs/applications/misc/clipqr/default.nix +++ b/pkgs/applications/misc/clipqr/default.nix @@ -69,7 +69,7 @@ buildGoModule rec { license = licenses.mit; maintainers = with maintainers; [ MatthieuBarthel ]; homepage = "https://gitlab.com/imatt-foss/clipqr"; - broken = stdenv.isDarwin; + broken = stdenv.hostPlatform.isDarwin; mainProgram = "clipqr"; }; } diff --git a/pkgs/applications/misc/cloak/default.nix b/pkgs/applications/misc/cloak/default.nix index bf3dd3c4a081..61f307edd555 100644 --- a/pkgs/applications/misc/cloak/default.nix +++ b/pkgs/applications/misc/cloak/default.nix @@ -13,7 +13,7 @@ rustPlatform.buildRustPackage rec { cargoHash = "sha256-m11A5fcJzWoDZglrr2Es1V5ZJNepEkGeIRVhexJ7jws="; - buildInputs = lib.optionals stdenv.isDarwin [ Security ]; + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ Security ]; meta = with lib; { homepage = "https://github.com/evansmurithi/cloak"; diff --git a/pkgs/applications/misc/cobalt/default.nix b/pkgs/applications/misc/cobalt/default.nix index 82276b73c4d1..a5dd6a8d9ef4 100644 --- a/pkgs/applications/misc/cobalt/default.nix +++ b/pkgs/applications/misc/cobalt/default.nix @@ -13,7 +13,7 @@ rustPlatform.buildRustPackage rec { cargoHash = "sha256-g25Pw3BlRbuaGjsQav6mU9zVyS1mVUKkgKDOILm8R6U="; - buildInputs = lib.optionals stdenv.isDarwin [ CoreServices ]; + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ CoreServices ]; meta = with lib; { description = "Static site generator written in Rust"; diff --git a/pkgs/applications/misc/collision/default.nix b/pkgs/applications/misc/collision/default.nix index 96f19b47968a..392bf98af62f 100644 --- a/pkgs/applications/misc/collision/default.nix +++ b/pkgs/applications/misc/collision/default.nix @@ -48,7 +48,7 @@ crystal.buildCrystalPackage rec { # Shortly, adding pkg-config to buildInputs along with openssl fixes the issue. nativeBuildInputs = [ wrapGAppsHook4 pkg-config gobject-introspection ] - ++ lib.optionals stdenv.isDarwin [ desktopToDarwinBundle ]; + ++ lib.optionals stdenv.hostPlatform.isDarwin [ desktopToDarwinBundle ]; buildInputs = [ libadwaita diff --git a/pkgs/applications/misc/conceal/default.nix b/pkgs/applications/misc/conceal/default.nix index 94a4d427e84b..5ce8d147fbbf 100644 --- a/pkgs/applications/misc/conceal/default.nix +++ b/pkgs/applications/misc/conceal/default.nix @@ -35,6 +35,6 @@ rustPlatform.buildRustPackage rec { homepage = "https://github.com/TD-Sky/conceal"; license = licenses.mit; maintainers = with maintainers; [ jedsek kashw2 ]; - broken = stdenv.isDarwin; + broken = stdenv.hostPlatform.isDarwin; }; } diff --git a/pkgs/applications/misc/coolreader/default.nix b/pkgs/applications/misc/coolreader/default.nix index d75cdd4843fa..22e9906db561 100644 --- a/pkgs/applications/misc/coolreader/default.nix +++ b/pkgs/applications/misc/coolreader/default.nix @@ -17,7 +17,7 @@ mkDerivation rec { buildInputs = [ qttools fribidi libunibreak ]; meta = with lib; { - broken = stdenv.isDarwin; + broken = stdenv.hostPlatform.isDarwin; homepage = "https://github.com/buggins/coolreader"; description = "Cross platform open source e-book reader"; mainProgram = "cr3"; diff --git a/pkgs/applications/misc/cotp/default.nix b/pkgs/applications/misc/cotp/default.nix index 3b8d737dc1ee..e2f5cffdfbad 100644 --- a/pkgs/applications/misc/cotp/default.nix +++ b/pkgs/applications/misc/cotp/default.nix @@ -19,8 +19,8 @@ rustPlatform.buildRustPackage rec { cargoHash = "sha256-o9LRXbx77EXXO7rEmpBrx2nommJgG0ikw1YzdeB0Gug="; - buildInputs = lib.optionals stdenv.isLinux [ libxcb ] - ++ lib.optionals stdenv.isDarwin [ AppKit ]; + buildInputs = lib.optionals stdenv.hostPlatform.isLinux [ libxcb ] + ++ lib.optionals stdenv.hostPlatform.isDarwin [ AppKit ]; meta = with lib; { homepage = "https://github.com/replydev/cotp"; diff --git a/pkgs/applications/misc/cubiomes-viewer/default.nix b/pkgs/applications/misc/cubiomes-viewer/default.nix index 0d29b7921a66..f75ddf0c108d 100644 --- a/pkgs/applications/misc/cubiomes-viewer/default.nix +++ b/pkgs/applications/misc/cubiomes-viewer/default.nix @@ -54,7 +54,7 @@ stdenv.mkDerivation rec { ''; meta = with lib; { - broken = stdenv.isDarwin; + broken = stdenv.hostPlatform.isDarwin; homepage = "https://github.com/Cubitect/cubiomes-viewer"; description = "Graphical Minecraft seed finder and map viewer"; mainProgram = "cubiomes-viewer"; diff --git a/pkgs/applications/misc/diebahn/default.nix b/pkgs/applications/misc/diebahn/default.nix index 502c247ce2d2..0212547a75a6 100644 --- a/pkgs/applications/misc/diebahn/default.nix +++ b/pkgs/applications/misc/diebahn/default.nix @@ -54,7 +54,7 @@ stdenv.mkDerivation rec { gtk4 libadwaita pango - ] ++ lib.optionals stdenv.isDarwin (with darwin.apple_sdk.frameworks; [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin (with darwin.apple_sdk.frameworks; [ CoreFoundation Foundation Security @@ -62,7 +62,7 @@ stdenv.mkDerivation rec { # Darwin needs to link against gettext from nixpkgs instead of the one vendored by gettext-sys # because the vendored copy does not build with newer versions of clang. - env = lib.optionalAttrs stdenv.isDarwin { + env = lib.optionalAttrs stdenv.hostPlatform.isDarwin { GETTEXT_BIN_DIR = "${lib.getBin gettext}/bin"; GETTEXT_INCLUDE_DIR = "${lib.getDev gettext}/include"; GETTEXT_LIB_DIR = "${lib.getLib gettext}/lib"; diff --git a/pkgs/applications/misc/diff-pdf/default.nix b/pkgs/applications/misc/diff-pdf/default.nix index 1d54b57c9b2f..d64d8f6ab9be 100644 --- a/pkgs/applications/misc/diff-pdf/default.nix +++ b/pkgs/applications/misc/diff-pdf/default.nix @@ -13,7 +13,7 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ autoconf automake pkg-config ]; buildInputs = [ cairo poppler wxGTK ] - ++ lib.optionals stdenv.isDarwin [ Cocoa ]; + ++ lib.optionals stdenv.hostPlatform.isDarwin [ Cocoa ]; preConfigure = "./bootstrap"; diff --git a/pkgs/applications/misc/dmenu-rs/default.nix b/pkgs/applications/misc/dmenu-rs/default.nix index 87d484c2e9bf..4b15eae9e614 100644 --- a/pkgs/applications/misc/dmenu-rs/default.nix +++ b/pkgs/applications/misc/dmenu-rs/default.nix @@ -71,6 +71,6 @@ stdenv.mkDerivation rec { license = with licenses; [ gpl3Only ]; maintainers = with maintainers; [ benjaminedwardwebb ]; platforms = platforms.linux; - broken = (stdenv.isLinux && stdenv.isAarch64); + broken = (stdenv.hostPlatform.isLinux && stdenv.hostPlatform.isAarch64); }; } diff --git a/pkgs/applications/misc/doctave/default.nix b/pkgs/applications/misc/doctave/default.nix index 6b54636488e9..8ddbe3a126e1 100644 --- a/pkgs/applications/misc/doctave/default.nix +++ b/pkgs/applications/misc/doctave/default.nix @@ -16,7 +16,7 @@ rustPlatform.buildRustPackage rec { cargoHash = "sha256-keLcNttdM9JUnn3qi/bWkcObIHl3MRACDHKPSZuScOc="; - buildInputs = lib.optionals stdenv.isDarwin [ + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ CoreServices ]; diff --git a/pkgs/applications/misc/done/default.nix b/pkgs/applications/misc/done/default.nix index 47238cd9cb9c..095d77b1ee83 100644 --- a/pkgs/applications/misc/done/default.nix +++ b/pkgs/applications/misc/done/default.nix @@ -54,11 +54,11 @@ stdenv.mkDerivation rec { libsecret openssl sqlite - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.AppKit ]; - env = lib.optionalAttrs stdenv.isDarwin { + env = lib.optionalAttrs stdenv.hostPlatform.isDarwin { GETTEXT_DIR = gettext; }; diff --git a/pkgs/applications/misc/dupeguru/default.nix b/pkgs/applications/misc/dupeguru/default.nix index c514c2177369..8ec9dfc35033 100644 --- a/pkgs/applications/misc/dupeguru/default.nix +++ b/pkgs/applications/misc/dupeguru/default.nix @@ -60,7 +60,7 @@ python3Packages.buildPythonApplication rec { ''; meta = with lib; { - broken = stdenv.isDarwin; + broken = stdenv.hostPlatform.isDarwin; description = "GUI tool to find duplicate files in a system"; homepage = "https://github.com/arsenetar/dupeguru"; license = licenses.bsd3; diff --git a/pkgs/applications/misc/electron-cash/default.nix b/pkgs/applications/misc/electron-cash/default.nix index 910e21528eb5..e9854ac3ef94 100644 --- a/pkgs/applications/misc/electron-cash/default.nix +++ b/pkgs/applications/misc/electron-cash/default.nix @@ -51,7 +51,7 @@ python3Packages.buildPythonApplication rec { nativeBuildInputs = [ wrapQtAppsHook ]; - buildInputs = [ ] ++ lib.optional stdenv.isLinux qtwayland; + buildInputs = [ ] ++ lib.optional stdenv.hostPlatform.isLinux qtwayland; postPatch = '' substituteInPlace contrib/requirements/requirements.txt \ @@ -61,7 +61,7 @@ python3Packages.buildPythonApplication rec { --replace "(share_dir" "(\"share\"" ''; - postInstall = lib.optionalString stdenv.isLinux '' + postInstall = lib.optionalString stdenv.hostPlatform.isLinux '' substituteInPlace $out/share/applications/electron-cash.desktop \ --replace "Exec=electron-cash" "Exec=$out/bin/electron-cash" ''; diff --git a/pkgs/applications/misc/electrum/default.nix b/pkgs/applications/misc/electrum/default.nix index 859d7bb42b00..0faaf369125d 100644 --- a/pkgs/applications/misc/electrum/default.nix +++ b/pkgs/applications/misc/electrum/default.nix @@ -32,13 +32,13 @@ let }; libsecp256k1_name = - if stdenv.isLinux then "libsecp256k1.so.{v}" - else if stdenv.isDarwin then "libsecp256k1.{v}.dylib" + if stdenv.hostPlatform.isLinux then "libsecp256k1.so.{v}" + else if stdenv.hostPlatform.isDarwin then "libsecp256k1.{v}.dylib" else "libsecp256k1${stdenv.hostPlatform.extensions.sharedLibrary}"; libzbar_name = - if stdenv.isLinux then "libzbar.so.0" - else if stdenv.isDarwin then "libzbar.0.dylib" + if stdenv.hostPlatform.isLinux then "libzbar.so.0" + else if stdenv.hostPlatform.isDarwin then "libzbar.0.dylib" else "libzbar${stdenv.hostPlatform.extensions.sharedLibrary}"; # Not provided in official source releases, which are what upstream signs. @@ -71,7 +71,7 @@ python.pkgs.buildPythonApplication { ''; nativeBuildInputs = lib.optionals enableQt [ wrapQtAppsHook ]; - buildInputs = lib.optional (stdenv.isLinux && enableQt) qtwayland; + buildInputs = lib.optional (stdenv.hostPlatform.isLinux && enableQt) qtwayland; propagatedBuildInputs = with python.pkgs; [ aiohttp @@ -124,7 +124,7 @@ python.pkgs.buildPythonApplication { sed -i '/qdarkstyle/d' contrib/requirements/requirements.txt ''); - postInstall = lib.optionalString stdenv.isLinux '' + postInstall = lib.optionalString stdenv.hostPlatform.isLinux '' substituteInPlace $out/share/applications/electrum.desktop \ --replace 'Exec=sh -c "PATH=\"\\$HOME/.local/bin:\\$PATH\"; electrum %u"' \ "Exec=$out/bin/electrum %u" \ diff --git a/pkgs/applications/misc/electrum/grs.nix b/pkgs/applications/misc/electrum/grs.nix index 9d71a5886be6..cd0b89f94f05 100644 --- a/pkgs/applications/misc/electrum/grs.nix +++ b/pkgs/applications/misc/electrum/grs.nix @@ -13,13 +13,13 @@ let version = "4.5.4"; libsecp256k1_name = - if stdenv.isLinux then "libsecp256k1.so.{v}" - else if stdenv.isDarwin then "libsecp256k1.{v}.dylib" + if stdenv.hostPlatform.isLinux then "libsecp256k1.so.{v}" + else if stdenv.hostPlatform.isDarwin then "libsecp256k1.{v}.dylib" else "libsecp256k1${stdenv.hostPlatform.extensions.sharedLibrary}"; libzbar_name = - if stdenv.isLinux then "libzbar.so.0" - else if stdenv.isDarwin then "libzbar.0.dylib" + if stdenv.hostPlatform.isLinux then "libzbar.so.0" + else if stdenv.hostPlatform.isDarwin then "libzbar.0.dylib" else "libzbar${stdenv.hostPlatform.extensions.sharedLibrary}"; in @@ -36,7 +36,7 @@ python3.pkgs.buildPythonApplication { }; nativeBuildInputs = lib.optionals enableQt [ wrapQtAppsHook ]; - buildInputs = lib.optional (stdenv.isLinux && enableQt) qtwayland; + buildInputs = lib.optional (stdenv.hostPlatform.isLinux && enableQt) qtwayland; propagatedBuildInputs = with python3.pkgs; [ aiohttp @@ -90,7 +90,7 @@ python3.pkgs.buildPythonApplication { sed -i '/qdarkstyle/d' contrib/requirements/requirements.txt ''); - postInstall = lib.optionalString stdenv.isLinux '' + postInstall = lib.optionalString stdenv.hostPlatform.isLinux '' substituteInPlace $out/share/applications/electrum-grs.desktop \ --replace 'Exec=sh -c "PATH=\"\\$HOME/.local/bin:\\$PATH\"; electrum-grs %u"' \ "Exec=$out/bin/electrum-grs %u" \ diff --git a/pkgs/applications/misc/electrum/ltc.nix b/pkgs/applications/misc/electrum/ltc.nix index 110a17aeeac9..e0aaf139cd65 100644 --- a/pkgs/applications/misc/electrum/ltc.nix +++ b/pkgs/applications/misc/electrum/ltc.nix @@ -14,13 +14,13 @@ let version = "4.2.2.1"; libsecp256k1_name = - if stdenv.isLinux then "libsecp256k1.so.0" - else if stdenv.isDarwin then "libsecp256k1.0.dylib" + if stdenv.hostPlatform.isLinux then "libsecp256k1.so.0" + else if stdenv.hostPlatform.isDarwin then "libsecp256k1.0.dylib" else "libsecp256k1${stdenv.hostPlatform.extensions.sharedLibrary}"; libzbar_name = - if stdenv.isLinux then "libzbar.so.0" - else if stdenv.isDarwin then "libzbar.0.dylib" + if stdenv.hostPlatform.isLinux then "libzbar.so.0" + else if stdenv.hostPlatform.isDarwin then "libzbar.0.dylib" else "libzbar${stdenv.hostPlatform.extensions.sharedLibrary}"; # Not provided in official source releases, which are what upstream signs. @@ -112,7 +112,7 @@ python3.pkgs.buildPythonApplication { sed -i '/qdarkstyle/d' contrib/requirements/requirements.txt ''); - postInstall = lib.optionalString stdenv.isLinux '' + postInstall = lib.optionalString stdenv.hostPlatform.isLinux '' # Despite setting usr_share above, these files are installed under # $out/nix ... mv $out/${python3.sitePackages}/nix/store"/"*/share $out @@ -131,7 +131,7 @@ python3.pkgs.buildPythonApplication { ''; nativeCheckInputs = with python3.pkgs; [ pytestCheckHook pyaes pycryptodomex ]; - buildInputs = lib.optional stdenv.isLinux qtwayland; + buildInputs = lib.optional stdenv.hostPlatform.isLinux qtwayland; pytestFlagsArray = [ "electrum_ltc/tests" ]; diff --git a/pkgs/applications/misc/etesync-dav/default.nix b/pkgs/applications/misc/etesync-dav/default.nix index 6b68334f20f4..1758dde546ea 100644 --- a/pkgs/applications/misc/etesync-dav/default.nix +++ b/pkgs/applications/misc/etesync-dav/default.nix @@ -42,6 +42,6 @@ python3.pkgs.buildPythonApplication { mainProgram = "etesync-dav"; license = licenses.gpl3; maintainers = with maintainers; [ thyol valodim ]; - broken = stdenv.isDarwin; # pyobjc-framework-Cocoa is missing + broken = stdenv.hostPlatform.isDarwin; # pyobjc-framework-Cocoa is missing }; } diff --git a/pkgs/applications/misc/eureka-ideas/default.nix b/pkgs/applications/misc/eureka-ideas/default.nix index f8f24fa63569..f9a911a1c119 100644 --- a/pkgs/applications/misc/eureka-ideas/default.nix +++ b/pkgs/applications/misc/eureka-ideas/default.nix @@ -26,7 +26,7 @@ rustPlatform.buildRustPackage rec { buildInputs = [ libgit2 openssl - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ Security ]; diff --git a/pkgs/applications/misc/faircamp/default.nix b/pkgs/applications/misc/faircamp/default.nix index 9f8a507fdce4..0f9155fe1b89 100644 --- a/pkgs/applications/misc/faircamp/default.nix +++ b/pkgs/applications/misc/faircamp/default.nix @@ -53,7 +53,7 @@ rustPlatform.buildRustPackage rec { glib libopus vips - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.CoreServices ]; diff --git a/pkgs/applications/misc/far2l/default.nix b/pkgs/applications/misc/far2l/default.nix index f35df6a049f2..7508bc53e657 100644 --- a/pkgs/applications/misc/far2l/default.nix +++ b/pkgs/applications/misc/far2l/default.nix @@ -31,9 +31,9 @@ stdenv.mkDerivation rec { ++ lib.optionals withColorer [ spdlog xercesc ] ++ lib.optionals withMultiArc [ libarchive pcre ] ++ lib.optionals withNetRocks [ openssl libssh libnfs neon ] - ++ lib.optional (withNetRocks && !stdenv.isDarwin) samba # broken on darwin + ++ lib.optional (withNetRocks && !stdenv.hostPlatform.isDarwin) samba # broken on darwin ++ lib.optionals withPython (with python3Packages; [ python cffi debugpy pcpp ]) - ++ lib.optionals stdenv.isDarwin [ IOKit Carbon Cocoa AudioToolbox OpenGL System ]; + ++ lib.optionals stdenv.hostPlatform.isDarwin [ IOKit Carbon Cocoa AudioToolbox OpenGL System ]; postPatch = '' patchShebangs python/src/prebuild.sh diff --git a/pkgs/applications/misc/firestarter/default.nix b/pkgs/applications/misc/firestarter/default.nix index 8eb001e9c93b..55e1700c5c85 100644 --- a/pkgs/applications/misc/firestarter/default.nix +++ b/pkgs/applications/misc/firestarter/default.nix @@ -99,7 +99,7 @@ stdenv.mkDerivation rec { ''; meta = with lib; { - broken = (stdenv.isLinux && stdenv.isAarch64); + broken = (stdenv.hostPlatform.isLinux && stdenv.hostPlatform.isAarch64); homepage = "https://tu-dresden.de/zih/forschung/projekte/firestarter"; description = "Processor Stress Test Utility"; platforms = platforms.linux; diff --git a/pkgs/applications/misc/flavours/default.nix b/pkgs/applications/misc/flavours/default.nix index 98146e6bfdf3..c2cb20ef5b74 100644 --- a/pkgs/applications/misc/flavours/default.nix +++ b/pkgs/applications/misc/flavours/default.nix @@ -11,7 +11,7 @@ rustPlatform.buildRustPackage rec { hash = "sha256-SOsHvcfDdUpb0x5VZ1vZJnGaIiWWOPgnAwKYNXzfUfI="; }; - buildInputs = lib.optionals stdenv.isDarwin [ libiconv ]; + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ libiconv ]; cargoHash = "sha256-aimPeGIE5jP0pdrqwnzUzBqW0jz9+kcfpLdCN0r30xU="; diff --git a/pkgs/applications/misc/gcal/default.nix b/pkgs/applications/misc/gcal/default.nix index 8f345f39b534..f07a18c0edae 100644 --- a/pkgs/applications/misc/gcal/default.nix +++ b/pkgs/applications/misc/gcal/default.nix @@ -20,7 +20,7 @@ stdenv.mkDerivation rec { enableParallelBuilding = true; - buildInputs = [ ncurses ] ++ lib.optional stdenv.isDarwin gettext; + buildInputs = [ ncurses ] ++ lib.optional stdenv.hostPlatform.isDarwin gettext; meta = { description = "Program for calculating and printing calendars"; diff --git a/pkgs/applications/misc/gcalcli/default.nix b/pkgs/applications/misc/gcalcli/default.nix index da456226b1a7..c9c29cd8e007 100644 --- a/pkgs/applications/misc/gcalcli/default.nix +++ b/pkgs/applications/misc/gcalcli/default.nix @@ -27,7 +27,7 @@ python3Packages.buildPythonApplication rec { --replace-fail "\"types-requests\"," "" \ --replace-fail "\"types-vobject\"," "" '' - + lib.optionalString stdenv.isLinux '' + + lib.optionalString stdenv.hostPlatform.isLinux '' substituteInPlace gcalcli/argparsers.py \ --replace-fail "'notify-send" "'${lib.getExe libnotify}" ''; diff --git a/pkgs/applications/misc/gcfflasher/default.nix b/pkgs/applications/misc/gcfflasher/default.nix index b9a49e172329..01a071dc68f4 100644 --- a/pkgs/applications/misc/gcfflasher/default.nix +++ b/pkgs/applications/misc/gcfflasher/default.nix @@ -22,7 +22,7 @@ stdenv.mkDerivation rec { cmake ]; - buildInputs = lib.optionals stdenv.isLinux [ + buildInputs = lib.optionals stdenv.hostPlatform.isLinux [ libgpiod ]; diff --git a/pkgs/applications/misc/get_iplayer/default.nix b/pkgs/applications/misc/get_iplayer/default.nix index 4f455d901c2d..c807438aaa43 100644 --- a/pkgs/applications/misc/get_iplayer/default.nix +++ b/pkgs/applications/misc/get_iplayer/default.nix @@ -20,7 +20,7 @@ perlPackages.buildPerlPackage rec { hash = "sha256-fqzrgmtqy7dlmGEaTXAqpdt9HqZCVooJ0Vf6/JUKihw="; }; - nativeBuildInputs = [ makeWrapper ] ++ lib.optional stdenv.isDarwin shortenPerlShebang; + nativeBuildInputs = [ makeWrapper ] ++ lib.optional stdenv.hostPlatform.isDarwin shortenPerlShebang; buildInputs = [ perl ]; propagatedBuildInputs = with perlPackages; [ LWP LWPProtocolHttps XMLLibXML Mojolicious @@ -40,7 +40,7 @@ perlPackages.buildPerlPackage rec { runHook postInstall ''; - postInstall = lib.optionalString stdenv.isDarwin '' + postInstall = lib.optionalString stdenv.hostPlatform.isDarwin '' shortenPerlShebang $out/bin/.get_iplayer-wrapped ''; diff --git a/pkgs/applications/misc/gimoji/default.nix b/pkgs/applications/misc/gimoji/default.nix index 71582e3acc39..802c03489b11 100644 --- a/pkgs/applications/misc/gimoji/default.nix +++ b/pkgs/applications/misc/gimoji/default.nix @@ -18,7 +18,7 @@ rustPlatform.buildRustPackage rec { cargoHash = "sha256-pKHhYWEF9L0UX9hc2Ga3WOUWzISA8ONwn3rcI9u2/n0="; - buildInputs = lib.optionals stdenv.isDarwin [ + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.AppKit ]; diff --git a/pkgs/applications/misc/girara/default.nix b/pkgs/applications/misc/girara/default.nix index d33560c4f16a..37f12a266c68 100644 --- a/pkgs/applications/misc/girara/default.nix +++ b/pkgs/applications/misc/girara/default.nix @@ -55,11 +55,11 @@ stdenv.mkDerivation rec { xvfb-run ]; - doCheck = !stdenv.isDarwin; + doCheck = !stdenv.hostPlatform.isDarwin; mesonFlags = [ "-Ddocs=disabled" # docs do not seem to be installed - (lib.mesonEnable "tests" ((stdenv.buildPlatform.canExecute stdenv.hostPlatform) && (!stdenv.isDarwin))) + (lib.mesonEnable "tests" ((stdenv.buildPlatform.canExecute stdenv.hostPlatform) && (!stdenv.hostPlatform.isDarwin))) ]; checkPhase = '' diff --git a/pkgs/applications/misc/gkrellm/default.nix b/pkgs/applications/misc/gkrellm/default.nix index 218110f6d17d..e6d8dfc31f5a 100644 --- a/pkgs/applications/misc/gkrellm/default.nix +++ b/pkgs/applications/misc/gkrellm/default.nix @@ -26,7 +26,7 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ copyDesktopItems pkg-config which wrapGAppsHook3 ]; buildInputs = [ gettext glib gtk2 libX11 libSM libICE ] - ++ lib.optionals stdenv.isDarwin [ IOKit ]; + ++ lib.optionals stdenv.hostPlatform.isDarwin [ IOKit ]; hardeningDisable = [ "format" ]; diff --git a/pkgs/applications/misc/golden-cheetah-bin/default.nix b/pkgs/applications/misc/golden-cheetah-bin/default.nix index 3fcd77f8f4b7..c37e7dc72fff 100644 --- a/pkgs/applications/misc/golden-cheetah-bin/default.nix +++ b/pkgs/applications/misc/golden-cheetah-bin/default.nix @@ -29,7 +29,7 @@ appimageTools.wrapType2 { meta = { description = "Performance software for cyclists, runners and triathletes. This version includes the API Tokens for e.g. Strava"; platforms = lib.platforms.linux; - broken = !stdenv.isx86_64; + broken = !stdenv.hostPlatform.isx86_64; maintainers = with lib.maintainers; [ gador adamcstephens ]; license = lib.licenses.gpl2Plus; sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ]; diff --git a/pkgs/applications/misc/goldendict/default.nix b/pkgs/applications/misc/goldendict/default.nix index 6b1865509b72..9c8edf3c774e 100644 --- a/pkgs/applications/misc/goldendict/default.nix +++ b/pkgs/applications/misc/goldendict/default.nix @@ -36,8 +36,8 @@ stdenv.mkDerivation rec { buildInputs = [ qtbase qtsvg qtwebkit qttools libvorbis hunspell xz lzo - ] ++ lib.optionals stdenv.isLinux [ qtx11extras libXtst ] - ++ lib.optionals stdenv.isDarwin [ bzip2 libiconv ] + ] ++ lib.optionals stdenv.hostPlatform.isLinux [ qtx11extras libXtst ] + ++ lib.optionals stdenv.hostPlatform.isDarwin [ bzip2 libiconv ] ++ lib.optional withCC opencc ++ lib.optional withEpwing libeb ++ lib.optional withExtraTiff libtiff @@ -55,7 +55,7 @@ stdenv.mkDerivation rec { (lib.optional withZim "CONFIG+=zim_support") ]; - postInstall = lib.optionalString stdenv.isDarwin '' + postInstall = lib.optionalString stdenv.hostPlatform.isDarwin '' mkdir -p $out/Applications mv GoldenDict.app $out/Applications ''; diff --git a/pkgs/applications/misc/gpsbabel/default.nix b/pkgs/applications/misc/gpsbabel/default.nix index fbacfb6984c6..e1cfb556891a 100644 --- a/pkgs/applications/misc/gpsbabel/default.nix +++ b/pkgs/applications/misc/gpsbabel/default.nix @@ -2,7 +2,7 @@ , qmake, qttools, wrapQtAppsHook , libusb1, shapelib, zlib , withGUI ? false, qtserialport -, withMapPreview ? (!stdenv.isDarwin), qtwebengine +, withMapPreview ? (!stdenv.hostPlatform.isDarwin), qtwebengine , withDoc ? false, docbook_xml_dtd_45, docbook_xsl, expat, fop, libxml2, libxslt, perl }: @@ -61,7 +61,7 @@ stdenv.mkDerivation rec { # Floating point behavior on i686 causes nmea.test failures. Preventing # extended precision fixes this problem. - env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.isi686 "-ffloat-store"; + env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.hostPlatform.isi686 "-ffloat-store"; doCheck = true; @@ -69,7 +69,7 @@ stdenv.mkDerivation rec { installPhase = '' install -Dm755 gpsbabel -t $out/bin - '' + lib.optionalString withGUI (if stdenv.isDarwin then '' + '' + lib.optionalString withGUI (if stdenv.hostPlatform.isDarwin then '' mkdir -p $out/Applications mv gui/GPSBabelFE.app $out/Applications install -Dm644 gui/*.qm gui/coretool/*.qm -t $out/Applications/GPSBabelFE.app/Contents/Resources/translations @@ -84,7 +84,7 @@ stdenv.mkDerivation rec { cp -r html $doc/share/doc/gpsbabel ''; - postFixup = lib.optionalString withGUI (if stdenv.isDarwin then '' + postFixup = lib.optionalString withGUI (if stdenv.hostPlatform.isDarwin then '' wrapQtApp "$out/Applications/GPSBabelFE.app/Contents/MacOS/GPSBabelFE" '' else '' wrapQtApp "$out/bin/gpsbabelfe" diff --git a/pkgs/applications/misc/gpxlab/default.nix b/pkgs/applications/misc/gpxlab/default.nix index 18c31afef6b5..c3002104256c 100644 --- a/pkgs/applications/misc/gpxlab/default.nix +++ b/pkgs/applications/misc/gpxlab/default.nix @@ -19,7 +19,7 @@ mkDerivation rec { lrelease GPXLab/locale/*.ts ''; - postInstall = lib.optionalString stdenv.isDarwin '' + postInstall = lib.optionalString stdenv.hostPlatform.isDarwin '' mkdir -p $out/Applications mv GPXLab/GPXLab.app $out/Applications ''; diff --git a/pkgs/applications/misc/gpxsee/default.nix b/pkgs/applications/misc/gpxsee/default.nix index add7ea7a789c..60bc8b579237 100644 --- a/pkgs/applications/misc/gpxsee/default.nix +++ b/pkgs/applications/misc/gpxsee/default.nix @@ -46,7 +46,7 @@ stdenv.mkDerivation (finalAttrs: { lrelease gpxsee.pro ''; - postInstall = lib.optionalString stdenv.isDarwin '' + postInstall = lib.optionalString stdenv.hostPlatform.isDarwin '' mkdir -p $out/Applications mv GPXSee.app $out/Applications mkdir -p $out/bin @@ -58,7 +58,7 @@ stdenv.mkDerivation (finalAttrs: { }; meta = { - broken = isQt6 && stdenv.isDarwin; + broken = isQt6 && stdenv.hostPlatform.isDarwin; changelog = "https://build.opensuse.org/package/view_file/home:tumic:GPXSee/gpxsee/gpxsee.changes"; description = "GPS log file viewer and analyzer"; mainProgram = "gpxsee"; diff --git a/pkgs/applications/misc/gsctl/default.nix b/pkgs/applications/misc/gsctl/default.nix index b2b9c7b67b06..bb30f7d1b632 100644 --- a/pkgs/applications/misc/gsctl/default.nix +++ b/pkgs/applications/misc/gsctl/default.nix @@ -31,7 +31,7 @@ buildGoModule rec { kubectl ]; - doCheck = !stdenv.isDarwin; + doCheck = !stdenv.hostPlatform.isDarwin; meta = with lib; { description = "Giant Swarm command line interface"; diff --git a/pkgs/applications/misc/gv/default.nix b/pkgs/applications/misc/gv/default.nix index ca12e3bc77a9..b812e5607380 100644 --- a/pkgs/applications/misc/gv/default.nix +++ b/pkgs/applications/misc/gv/default.nix @@ -9,7 +9,7 @@ stdenv.mkDerivation rec { sha256 = "0q8s43z14vxm41pfa8s5h9kyyzk1fkwjhkiwbf2x70alm6rv6qi1"; }; - configureFlags = lib.optionals stdenv.isDarwin [ + configureFlags = lib.optionals stdenv.hostPlatform.isDarwin [ "--enable-SIGCHLD-fallback" ]; @@ -19,7 +19,7 @@ stdenv.mkDerivation rec { Xaw3d ghostscriptX perl - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ libiconv ]; diff --git a/pkgs/applications/misc/health/default.nix b/pkgs/applications/misc/health/default.nix index 8a2972e99a3a..8ff79b36a515 100644 --- a/pkgs/applications/misc/health/default.nix +++ b/pkgs/applications/misc/health/default.nix @@ -48,7 +48,7 @@ stdenv.mkDerivation rec { libadwaita libsecret tracker - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.Security darwin.apple_sdk.frameworks.Foundation ]; diff --git a/pkgs/applications/misc/inherd-quake/default.nix b/pkgs/applications/misc/inherd-quake/default.nix index 4f9c748730e5..c71dae3b27e1 100644 --- a/pkgs/applications/misc/inherd-quake/default.nix +++ b/pkgs/applications/misc/inherd-quake/default.nix @@ -25,7 +25,7 @@ rustPlatform.buildRustPackage rec { buildInputs = [ openssl - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ CoreServices Security ]; diff --git a/pkgs/applications/misc/inlyne/default.nix b/pkgs/applications/misc/inlyne/default.nix index 661f537d8bef..9f1013604229 100644 --- a/pkgs/applications/misc/inlyne/default.nix +++ b/pkgs/applications/misc/inlyne/default.nix @@ -28,11 +28,11 @@ rustPlatform.buildRustPackage rec { nativeBuildInputs = [ installShellFiles - ] ++ lib.optionals stdenv.isLinux [ + ] ++ lib.optionals stdenv.hostPlatform.isLinux [ pkg-config ]; - buildInputs = lib.optionals stdenv.isLinux [ + buildInputs = lib.optionals stdenv.hostPlatform.isLinux [ fontconfig xorg.libXcursor xorg.libXi @@ -41,11 +41,11 @@ rustPlatform.buildRustPackage rec { wayland libxkbcommon openssl - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk_11_0.frameworks.AppKit ]; - checkFlags = lib.optionals stdenv.isDarwin [ + checkFlags = lib.optionals stdenv.hostPlatform.isDarwin [ # time out on darwin "--skip=interpreter::tests::centered_image_with_size_align_and_link" "--skip=watcher::tests::the_gauntlet" @@ -58,7 +58,7 @@ rustPlatform.buildRustPackage rec { --zsh completions/_inlyne ''; - postFixup = lib.optionalString stdenv.isLinux '' + postFixup = lib.optionalString stdenv.hostPlatform.isLinux '' patchelf $out/bin/inlyne \ --add-rpath ${lib.makeLibraryPath [ libGL xorg.libX11 ]} ''; diff --git a/pkgs/applications/misc/inochi2d/default.nix b/pkgs/applications/misc/inochi2d/default.nix index 44a98ee40339..a88c58d38555 100644 --- a/pkgs/applications/misc/inochi2d/default.nix +++ b/pkgs/applications/misc/inochi2d/default.nix @@ -45,7 +45,7 @@ in meta = { # darwin has slightly different build steps - broken = stdenv.isDarwin; + broken = stdenv.hostPlatform.isDarwin; changelog = "https://github.com/Inochi2D/inochi-creator/releases/tag/${src.rev}"; description = "An open source editor for the Inochi2D puppet format"; }; @@ -73,7 +73,7 @@ in meta = { # darwin has slightly different build steps, aarch fails to build because of some lua related error - broken = stdenv.isDarwin || stdenv.isAarch64; + broken = stdenv.hostPlatform.isDarwin || stdenv.hostPlatform.isAarch64; changelog = "https://github.com/Inochi2D/inochi-session/releases/tag/${src.rev}"; description = "An application that allows streaming with Inochi2D puppets"; }; diff --git a/pkgs/applications/misc/joplin-desktop/default.nix b/pkgs/applications/misc/joplin-desktop/default.nix index 6a1a9423b5eb..bd7bcebd0228 100644 --- a/pkgs/applications/misc/joplin-desktop/default.nix +++ b/pkgs/applications/misc/joplin-desktop/default.nix @@ -74,6 +74,6 @@ let ''; }; in -if stdenv.isDarwin +if stdenv.hostPlatform.isDarwin then darwin else linux diff --git a/pkgs/applications/misc/jp2a/default.nix b/pkgs/applications/misc/jp2a/default.nix index 770246876816..f55b435a4b61 100644 --- a/pkgs/applications/misc/jp2a/default.nix +++ b/pkgs/applications/misc/jp2a/default.nix @@ -34,7 +34,7 @@ stdenv.mkDerivation rec { installFlags = [ "bashcompdir=\${out}/share/bash-completion/completions" ]; meta = with lib; { - broken = stdenv.isDarwin; + broken = stdenv.hostPlatform.isDarwin; homepage = "https://csl.name/jp2a/"; description = "Small utility that converts JPG images to ASCII"; license = licenses.gpl2Only; diff --git a/pkgs/applications/misc/kbt/default.nix b/pkgs/applications/misc/kbt/default.nix index c59b5e62c433..8a7e91ba3c7d 100644 --- a/pkgs/applications/misc/kbt/default.nix +++ b/pkgs/applications/misc/kbt/default.nix @@ -20,13 +20,13 @@ rustPlatform.buildRustPackage rec { cargoHash = "sha256-6zD9WRPWEt0ubppaMRTOusy0zm3z6SGB/5/kMxcJ/Ag="; - nativeBuildInputs = lib.optionals stdenv.isLinux [ + nativeBuildInputs = lib.optionals stdenv.hostPlatform.isLinux [ pkg-config ]; - buildInputs = lib.optionals stdenv.isDarwin [ + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.AppKit - ] ++ lib.optionals stdenv.isLinux [ + ] ++ lib.optionals stdenv.hostPlatform.isLinux [ xorg.libX11 ]; diff --git a/pkgs/applications/misc/keepassxc/default.nix b/pkgs/applications/misc/keepassxc/default.nix index 8e9035c101d1..914884a9aa2b 100644 --- a/pkgs/applications/misc/keepassxc/default.nix +++ b/pkgs/applications/misc/keepassxc/default.nix @@ -54,10 +54,10 @@ stdenv.mkDerivation rec { env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.cc.isClang (toString [ "-Wno-old-style-cast" "-Wno-error" - "-D__BIG_ENDIAN__=${if stdenv.isBigEndian then "1" else "0"}" + "-D__BIG_ENDIAN__=${if stdenv.hostPlatform.isBigEndian then "1" else "0"}" ]); - NIX_LDFLAGS = lib.optionalString stdenv.isDarwin "-rpath ${libargon2}/lib"; + NIX_LDFLAGS = lib.optionalString stdenv.hostPlatform.isDarwin "-rpath ${libargon2}/lib"; patches = [ ./darwin.patch @@ -69,8 +69,8 @@ stdenv.mkDerivation rec { "-DWITH_XC_UPDATECHECK=OFF" ] ++ (lib.optional (!withKeePassX11) "-DWITH_XC_X11=OFF") - ++ (lib.optional (withKeePassFDOSecrets && stdenv.isLinux) "-DWITH_XC_FDOSECRETS=ON") - ++ (lib.optional (withKeePassYubiKey && stdenv.isLinux) "-DWITH_XC_YUBIKEY=ON") + ++ (lib.optional (withKeePassFDOSecrets && stdenv.hostPlatform.isLinux) "-DWITH_XC_FDOSECRETS=ON") + ++ (lib.optional (withKeePassYubiKey && stdenv.hostPlatform.isLinux) "-DWITH_XC_YUBIKEY=ON") ++ (lib.optional withKeePassBrowser "-DWITH_XC_BROWSER=ON") ++ (lib.optional withKeePassBrowserPasskeys "-DWITH_XC_BROWSER_PASSKEYS=ON") ++ (lib.optional withKeePassKeeShare "-DWITH_XC_KEESHARE=ON") @@ -86,7 +86,7 @@ stdenv.mkDerivation rec { export QT_PLUGIN_PATH="${qtbase.bin}/${qtbase.qtPluginPrefix}" # testcli, testgui and testkdbx4 are flaky - skip them all # testautotype on darwin throws "QWidget: Cannot create a QWidget without QApplication" - make test ARGS+="-E 'testcli|testgui${lib.optionalString stdenv.isDarwin "|testautotype|testkdbx4"}' --output-on-failure" + make test ARGS+="-E 'testcli|testgui${lib.optionalString stdenv.hostPlatform.isDarwin "|testautotype|testkdbx4"}' --output-on-failure" runHook postCheck ''; @@ -98,12 +98,12 @@ stdenv.mkDerivation rec { qttools pkg-config ] - ++ lib.optional (!stdenv.isDarwin) wrapGAppsHook3; + ++ lib.optional (!stdenv.hostPlatform.isDarwin) wrapGAppsHook3; dontWrapGApps = true; preFixup = '' qtWrapperArgs+=("''${gappsWrapperArgs[@]}") - '' + lib.optionalString stdenv.isDarwin '' + '' + lib.optionalString stdenv.hostPlatform.isDarwin '' wrapQtApp "$out/Applications/KeePassXC.app/Contents/MacOS/KeePassXC" ''; @@ -128,9 +128,9 @@ stdenv.mkDerivation rec { readline zlib ] - ++ lib.optional (stdenv.isDarwin && withKeePassTouchID) LocalAuthentication - ++ lib.optional stdenv.isDarwin qtmacextras - ++ lib.optional stdenv.isLinux libusb1 + ++ lib.optional (stdenv.hostPlatform.isDarwin && withKeePassTouchID) LocalAuthentication + ++ lib.optional stdenv.hostPlatform.isDarwin qtmacextras + ++ lib.optional stdenv.hostPlatform.isLinux libusb1 ++ lib.optional withKeePassX11 qtx11extras; passthru.tests = nixosTests.keepassxc; diff --git a/pkgs/applications/misc/kemai/default.nix b/pkgs/applications/misc/kemai/default.nix index 70941045ce36..7ad3afc16ce5 100644 --- a/pkgs/applications/misc/kemai/default.nix +++ b/pkgs/applications/misc/kemai/default.nix @@ -64,7 +64,7 @@ stdenv.mkDerivation rec { license = licenses.mit; maintainers = with maintainers; [ poelzi ]; platforms = platforms.unix; - broken = stdenv.isDarwin; + broken = stdenv.hostPlatform.isDarwin; mainProgram = "Kemai"; }; } diff --git a/pkgs/applications/misc/khal/default.nix b/pkgs/applications/misc/khal/default.nix index 83de3e517d78..32c307af6025 100644 --- a/pkgs/applications/misc/khal/default.nix +++ b/pkgs/applications/misc/khal/default.nix @@ -69,7 +69,7 @@ python3.pkgs.buildPythonApplication rec { install -Dm755 misc/khal.desktop -t $out/share/applications ''; - doCheck = !stdenv.isAarch64; + doCheck = !stdenv.hostPlatform.isAarch64; LC_ALL = "en_US.UTF-8"; diff --git a/pkgs/applications/misc/klipper-estimator/default.nix b/pkgs/applications/misc/klipper-estimator/default.nix index 136ad6115d78..e7a511769a8e 100644 --- a/pkgs/applications/misc/klipper-estimator/default.nix +++ b/pkgs/applications/misc/klipper-estimator/default.nix @@ -24,7 +24,7 @@ rustPlatform.buildRustPackage rec { buildInputs = [ openssl ] - ++ lib.optionals stdenv.isDarwin [ libgit2 Security SystemConfiguration ]; + ++ lib.optionals stdenv.hostPlatform.isDarwin [ libgit2 Security SystemConfiguration ]; nativeBuildInputs = [ pkg-config ]; diff --git a/pkgs/applications/misc/kord/default.nix b/pkgs/applications/misc/kord/default.nix index 65337780469a..4cbd5f38e19a 100644 --- a/pkgs/applications/misc/kord/default.nix +++ b/pkgs/applications/misc/kord/default.nix @@ -40,11 +40,11 @@ rustPlatform.buildRustPackage rec { }) ]; - nativeBuildInputs = lib.optionals stdenv.isLinux [ pkg-config ] - ++ lib.optionals stdenv.isDarwin [ rustPlatform.bindgenHook ]; + nativeBuildInputs = lib.optionals stdenv.hostPlatform.isLinux [ pkg-config ] + ++ lib.optionals stdenv.hostPlatform.isDarwin [ rustPlatform.bindgenHook ]; - buildInputs = lib.optionals stdenv.isLinux [ alsa-lib ] - ++ lib.optionals stdenv.isDarwin [ darwin.apple_sdk.frameworks.AudioUnit ]; + buildInputs = lib.optionals stdenv.hostPlatform.isLinux [ alsa-lib ] + ++ lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.AudioUnit ]; meta = with lib; { description = "Music theory binary and library for Rust"; diff --git a/pkgs/applications/misc/leetcode-cli/default.nix b/pkgs/applications/misc/leetcode-cli/default.nix index 3cca48b24c61..24d7faf40722 100644 --- a/pkgs/applications/misc/leetcode-cli/default.nix +++ b/pkgs/applications/misc/leetcode-cli/default.nix @@ -32,7 +32,7 @@ rustPlatform.buildRustPackage rec { openssl dbus sqlite - ] ++ lib.optionals stdenv.isDarwin [ darwin.apple_sdk.frameworks.Security ]; + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.Security ]; postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) '' installShellCompletion --cmd leetcode \ diff --git a/pkgs/applications/misc/lenmus/default.nix b/pkgs/applications/misc/lenmus/default.nix index 7dc018e08714..c7a1ce9f5d2f 100644 --- a/pkgs/applications/misc/lenmus/default.nix +++ b/pkgs/applications/misc/lenmus/default.nix @@ -43,7 +43,7 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ cmake pkg-config - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ makeWrapper ]; @@ -59,7 +59,7 @@ stdenv.mkDerivation rec { wxsqlite3 fluidsynth fontconfig - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ Cocoa ]; @@ -75,7 +75,7 @@ stdenv.mkDerivation rec { "-DMAN_INSTALL_DIR=${placeholder "out"}/share/man" ]; - postInstall = lib.optionalString stdenv.isDarwin '' + postInstall = lib.optionalString stdenv.hostPlatform.isDarwin '' mkdir -p $out/{Applications,bin} mv $out/lenmus.app $out/Applications mv $out/Resources $out/Applications/lenmus.app/Contents diff --git a/pkgs/applications/misc/llpp/default.nix b/pkgs/applications/misc/llpp/default.nix index db089796222c..ff5d34e8224a 100644 --- a/pkgs/applications/misc/llpp/default.nix +++ b/pkgs/applications/misc/llpp/default.nix @@ -43,8 +43,8 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ makeWrapper ocaml pkg-config ]; buildInputs = [ mupdf libX11 freetype zlib gumbo jbig2dec openjpeg libjpeg lcms2 harfbuzz ] - ++ lib.optionals stdenv.isLinux [ libGLU libGL ] - ++ lib.optionals stdenv.isDarwin [ darwin.apple_sdk.frameworks.OpenGL darwin.apple_sdk.frameworks.Cocoa ]; + ++ lib.optionals stdenv.hostPlatform.isLinux [ libGLU libGL ] + ++ lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.OpenGL darwin.apple_sdk.frameworks.Cocoa ]; dontStrip = true; @@ -57,7 +57,7 @@ stdenv.mkDerivation rec { install build/llpp $out/bin install misc/llpp.inotify $out/bin/llpp.inotify install -Dm444 misc/llpp.desktop -t $out/share/applications - '' + lib.optionalString stdenv.isLinux '' + '' + lib.optionalString stdenv.hostPlatform.isLinux '' wrapProgram $out/bin/llpp \ --prefix PATH ":" "${xclip}/bin" diff --git a/pkgs/applications/misc/mdzk/default.nix b/pkgs/applications/misc/mdzk/default.nix index e4093295df68..92498cc92612 100644 --- a/pkgs/applications/misc/mdzk/default.nix +++ b/pkgs/applications/misc/mdzk/default.nix @@ -18,7 +18,7 @@ rustPlatform.buildRustPackage rec { cargoHash = "sha256-5zGUBvmf68tCk5jGrNn+ukgYbiKzrlmZvWrYgoJf2zk="; - buildInputs = lib.optionals stdenv.isDarwin [ CoreServices ]; + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ CoreServices ]; meta = with lib; { description = "Plain text Zettelkasten based on mdBook"; diff --git a/pkgs/applications/misc/mob/default.nix b/pkgs/applications/misc/mob/default.nix index 8a74624d616a..90c1683edeea 100644 --- a/pkgs/applications/misc/mob/default.nix +++ b/pkgs/applications/misc/mob/default.nix @@ -2,7 +2,7 @@ , buildGoModule , fetchFromGitHub , stdenv -, withSpeech ? !stdenv.isDarwin +, withSpeech ? !stdenv.hostPlatform.isDarwin , makeWrapper , espeak-ng }: diff --git a/pkgs/applications/misc/mupdf/default.nix b/pkgs/applications/misc/mupdf/default.nix index b54d9dd86157..0a242d50e3e6 100644 --- a/pkgs/applications/misc/mupdf/default.nix +++ b/pkgs/applications/misc/mupdf/default.nix @@ -15,7 +15,7 @@ , libjpeg , darwin , gumbo -, enableX11 ? (!stdenv.isDarwin) +, enableX11 ? (!stdenv.hostPlatform.isDarwin) , libX11 , libXext , libXi @@ -98,16 +98,16 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ pkg-config ] ++ lib.optional (enableGL || enableX11) copyDesktopItems - ++ lib.optional (stdenv.isDarwin && (enableGL || enableX11)) desktopToDarwinBundle + ++ lib.optional (stdenv.hostPlatform.isDarwin && (enableGL || enableX11)) desktopToDarwinBundle ++ lib.optionals (enableCxx || enablePython) [ python3 python3.pkgs.setuptools python3.pkgs.libclang ] ++ lib.optionals (enablePython) [ which swig ] - ++ lib.optionals stdenv.isDarwin [ fixDarwinDylibNames xcbuild ]; + ++ lib.optionals stdenv.hostPlatform.isDarwin [ fixDarwinDylibNames xcbuild ]; buildInputs = [ freetype harfbuzz openjpeg jbig2dec libjpeg gumbo ] ++ lib.optionals enableX11 [ libX11 libXext libXi libXrandr ] ++ lib.optionals enableCurl [ curl openssl ] ++ lib.optionals enableGL ( - if stdenv.isDarwin then + if stdenv.hostPlatform.isDarwin then with darwin.apple_sdk.frameworks; [ GLUT OpenGL ] else [ freeglut-mupdf libGLU ] @@ -167,7 +167,7 @@ stdenv.mkDerivation rec { moveToOutput "bin" "$bin" cp ./build/shared-release/libmupdf${stdenv.hostPlatform.extensions.sharedLibrary}* $out/lib - '' + (lib.optionalString (stdenv.isDarwin) '' + '' + (lib.optionalString (stdenv.hostPlatform.isDarwin) '' for exe in $bin/bin/*; do install_name_tool -change build/shared-release/libmupdf.dylib $out/lib/libmupdf.dylib "$exe" done @@ -185,7 +185,7 @@ stdenv.mkDerivation rec { mkdir -p $out/${python3.sitePackages}/mupdf cp build/*/_mupdf.so $out/${python3.sitePackages} cp build/*/mupdf.py $out/${python3.sitePackages}/mupdf/__init__.py - '' + lib.optionalString (stdenv.isDarwin) '' + '' + lib.optionalString (stdenv.hostPlatform.isDarwin) '' install_name_tool -add_rpath $out/lib $out/${python3.sitePackages}/_mupdf.so '')); diff --git a/pkgs/applications/misc/mysql-workbench/default.nix b/pkgs/applications/misc/mysql-workbench/default.nix index 5591fa9b4533..01df4df5d1c7 100644 --- a/pkgs/applications/misc/mysql-workbench/default.nix +++ b/pkgs/applications/misc/mysql-workbench/default.nix @@ -141,7 +141,7 @@ stdenv.mkDerivation (finalAttrs: { env.NIX_CFLAGS_COMPILE = toString ([ # error: 'OGRErr OGRSpatialReference::importFromWkt(char**)' is deprecated "-Wno-error=deprecated-declarations" - ] ++ lib.optionals stdenv.isAarch64 [ + ] ++ lib.optionals stdenv.hostPlatform.isAarch64 [ # error: narrowing conversion of '-1' from 'int' to 'char' "-Wno-error=narrowing" ] ++ lib.optionals (stdenv.cc.isGNU && lib.versionAtLeast stdenv.cc.version "12") [ diff --git a/pkgs/applications/misc/navi/default.nix b/pkgs/applications/misc/navi/default.nix index 23abf6a3546e..2d634e99dd15 100644 --- a/pkgs/applications/misc/navi/default.nix +++ b/pkgs/applications/misc/navi/default.nix @@ -15,7 +15,7 @@ rustPlatform.buildRustPackage rec { nativeBuildInputs = [ makeWrapper ]; - buildInputs = lib.optionals stdenv.isDarwin [ libiconv ]; + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ libiconv ]; postInstall = '' wrapProgram $out/bin/navi \ diff --git a/pkgs/applications/misc/notesnook/default.nix b/pkgs/applications/misc/notesnook/default.nix index 3753da39a02e..8f3cb528722d 100644 --- a/pkgs/applications/misc/notesnook/default.nix +++ b/pkgs/applications/misc/notesnook/default.nix @@ -74,6 +74,6 @@ let ''; }; in -if stdenv.isDarwin +if stdenv.hostPlatform.isDarwin then darwin else linux diff --git a/pkgs/applications/misc/obsidian/default.nix b/pkgs/applications/misc/obsidian/default.nix index 41ddd2cf8d94..e8ffe9f3b877 100644 --- a/pkgs/applications/misc/obsidian/default.nix +++ b/pkgs/applications/misc/obsidian/default.nix @@ -23,10 +23,10 @@ let maintainers = with maintainers; [ atila conradmearns zaninime qbit kashw2 w-lfchen ]; }; - filename = if stdenv.isDarwin then "Obsidian-${version}.dmg" else "obsidian-${version}.tar.gz"; + filename = if stdenv.hostPlatform.isDarwin then "Obsidian-${version}.dmg" else "obsidian-${version}.tar.gz"; src = fetchurl { url = "https://github.com/obsidianmd/obsidian-releases/releases/download/v${version}/${filename}"; - hash = if stdenv.isDarwin then "sha256-rFXmhlxXlVz5nCrXMmfYGaxe4/wnBRdFxsfiwiIDHgw=" else "sha256-ok1fedN8+OXBisFpVXbKRW2OhE4o9MC9lJmtMMST6V8="; + hash = if stdenv.hostPlatform.isDarwin then "sha256-rFXmhlxXlVz5nCrXMmfYGaxe4/wnBRdFxsfiwiIDHgw=" else "sha256-ok1fedN8+OXBisFpVXbKRW2OhE4o9MC9lJmtMMST6V8="; }; icon = fetchurl { @@ -89,4 +89,4 @@ let ''; }; in -if stdenv.isDarwin then darwin else linux +if stdenv.hostPlatform.isDarwin then darwin else linux diff --git a/pkgs/applications/misc/octoprint/default.nix b/pkgs/applications/misc/octoprint/default.nix index 18369b8827b5..a241a109091e 100644 --- a/pkgs/applications/misc/octoprint/default.nix +++ b/pkgs/applications/misc/octoprint/default.nix @@ -181,8 +181,8 @@ let class-doc pydantic_1 ] - ++ lib.optionals stdenv.isDarwin [ py.pkgs.appdirs ] - ++ lib.optionals (!stdenv.isDarwin) [ octoprint-pisupport ]; + ++ lib.optionals stdenv.hostPlatform.isDarwin [ py.pkgs.appdirs ] + ++ lib.optionals (!stdenv.hostPlatform.isDarwin) [ octoprint-pisupport ]; nativeCheckInputs = with self; [ ddt @@ -241,7 +241,7 @@ let disabledTests = [ "test_check_setup" # Why should it be able to call pip? - ] ++ lib.optionals stdenv.isDarwin [ "test_set_external_modification" ]; + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ "test_set_external_modification" ]; disabledTestPaths = [ "tests/test_octoprint_setuptools.py" # fails due to distutils and python3.12 ]; diff --git a/pkgs/applications/misc/ola/default.nix b/pkgs/applications/misc/ola/default.nix index 8d4d4df4ef75..b02a63301fee 100644 --- a/pkgs/applications/misc/ola/default.nix +++ b/pkgs/applications/misc/ola/default.nix @@ -48,7 +48,7 @@ stdenv.mkDerivation rec { enableParallelBuilding = true; meta = with lib; { - broken = stdenv.isDarwin; + broken = stdenv.hostPlatform.isDarwin; description = "Framework for controlling entertainment lighting equipment"; homepage = "https://www.openlighting.org/ola/"; maintainers = [ ]; diff --git a/pkgs/applications/misc/openbangla-keyboard/default.nix b/pkgs/applications/misc/openbangla-keyboard/default.nix index a727bdac62ba..04a9fffcb083 100644 --- a/pkgs/applications/misc/openbangla-keyboard/default.nix +++ b/pkgs/applications/misc/openbangla-keyboard/default.nix @@ -86,6 +86,6 @@ stdenv.mkDerivation rec { maintainers = with lib.maintainers; [ hqurve ]; platforms = lib.platforms.linux; # never built on aarch64-linux since first introduction in nixpkgs - broken = stdenv.isLinux && stdenv.isAarch64; + broken = stdenv.hostPlatform.isLinux && stdenv.hostPlatform.isAarch64; }; } diff --git a/pkgs/applications/misc/openbox-menu/default.nix b/pkgs/applications/misc/openbox-menu/default.nix index de3fc6cd0acc..7a9fd06cc295 100644 --- a/pkgs/applications/misc/openbox-menu/default.nix +++ b/pkgs/applications/misc/openbox-menu/default.nix @@ -23,7 +23,7 @@ stdenv.mkDerivation rec { patches = [ ./000-enable-svg.patch ]; # The strip options are not recognized by Darwin. - postPatch = lib.optionalString stdenv.isDarwin '' + postPatch = lib.optionalString stdenv.hostPlatform.isDarwin '' sed -i -e '/strip -s/d' Makefile ''; diff --git a/pkgs/applications/misc/opencpn/default.nix b/pkgs/applications/misc/opencpn/default.nix index 380a88e6f2e0..479fe1bcb076 100644 --- a/pkgs/applications/misc/opencpn/default.nix +++ b/pkgs/applications/misc/opencpn/default.nix @@ -57,7 +57,7 @@ stdenv.mkDerivation (finalAttrs: { hash = "sha256-axRI3sssj2Q6IBfIeyvOa494b0EgKFP+lFL/QrGIybQ="; }; - postPatch = lib.optionalString stdenv.isDarwin '' + postPatch = lib.optionalString stdenv.hostPlatform.isDarwin '' sed -i '/fixup_bundle/d; /NO_DEFAULT_PATH/d' CMakeLists.txt ''; @@ -65,9 +65,9 @@ stdenv.mkDerivation (finalAttrs: { cmake pkg-config gtest - ] ++ lib.optionals stdenv.isLinux [ + ] ++ lib.optionals stdenv.hostPlatform.isLinux [ lsb-release - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ DarwinTools makeWrapper ]; @@ -77,7 +77,7 @@ stdenv.mkDerivation (finalAttrs: { curl dbus flac - ] ++ lib.optionals (stdenv.isDarwin && stdenv.isx86_64) [ + ] ++ lib.optionals (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isx86_64) [ AppKit ] ++ [ gtk3 @@ -105,7 +105,7 @@ stdenv.mkDerivation (finalAttrs: { sqlite tinyxml wxGTK32 - ] ++ lib.optionals stdenv.isLinux [ + ] ++ lib.optionals stdenv.hostPlatform.isLinux [ alsa-utils libselinux libsepol @@ -114,7 +114,7 @@ stdenv.mkDerivation (finalAttrs: { xorg.libXtst ] ++ lib.optionals (lib.meta.availableOn stdenv.hostPlatform elfutils) [ elfutils - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ lame ]; @@ -124,7 +124,7 @@ stdenv.mkDerivation (finalAttrs: { "-DSQUISH_USE_SSE=0" ]); - postInstall = lib.optionals stdenv.isDarwin '' + postInstall = lib.optionals stdenv.hostPlatform.isDarwin '' mkdir -p $out/Applications mv $out/bin/OpenCPN.app $out/Applications makeWrapper $out/Applications/OpenCPN.app/Contents/MacOS/OpenCPN $out/bin/opencpn diff --git a/pkgs/applications/misc/oranda/default.nix b/pkgs/applications/misc/oranda/default.nix index b1326dd592b4..0c5e55efe0ef 100644 --- a/pkgs/applications/misc/oranda/default.nix +++ b/pkgs/applications/misc/oranda/default.nix @@ -28,7 +28,7 @@ rustPlatform.buildRustPackage rec { buildInputs = [ oniguruma - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.CoreServices darwin.apple_sdk.frameworks.SystemConfiguration ]; @@ -42,7 +42,7 @@ rustPlatform.buildRustPackage rec { env = { RUSTONIG_SYSTEM_LIBONIG = true; ORANDA_USE_TAILWIND_BINARY = true; - } // lib.optionalAttrs stdenv.isDarwin { + } // lib.optionalAttrs stdenv.hostPlatform.isDarwin { # without this, tailwindcss fails with OpenSSL configuration error OPENSSL_CONF = ""; }; diff --git a/pkgs/applications/misc/organicmaps/default.nix b/pkgs/applications/misc/organicmaps/default.nix index c95ccd139acf..b81f09e1c301 100644 --- a/pkgs/applications/misc/organicmaps/default.nix +++ b/pkgs/applications/misc/organicmaps/default.nix @@ -91,7 +91,7 @@ in stdenv.mkDerivation rec { meta = with lib; { # darwin: "invalid application of 'sizeof' to a function type" - broken = stdenv.isDarwin; + broken = stdenv.hostPlatform.isDarwin; homepage = "https://organicmaps.app/"; description = "Detailed Offline Maps for Travellers, Tourists, Hikers and Cyclists"; license = licenses.asl20; diff --git a/pkgs/applications/misc/p2pool/default.nix b/pkgs/applications/misc/p2pool/default.nix index 3d537afc1d2b..b8ca97d298ac 100644 --- a/pkgs/applications/misc/p2pool/default.nix +++ b/pkgs/applications/misc/p2pool/default.nix @@ -31,11 +31,11 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ cmake pkg-config ]; buildInputs = [ libuv zeromq libsodium gss hwloc openssl curl ] - ++ lib.optionals stdenv.isDarwin [ Foundation ]; + ++ lib.optionals stdenv.hostPlatform.isDarwin [ Foundation ]; cmakeFlags = ["-DWITH_LTO=OFF"]; - env.NIX_CFLAGS_COMPILE = toString (lib.optionals (stdenv.isDarwin && lib.versionOlder stdenv.hostPlatform.darwinMinVersion "10.13") [ + env.NIX_CFLAGS_COMPILE = toString (lib.optionals (stdenv.hostPlatform.isDarwin && lib.versionOlder stdenv.hostPlatform.darwinMinVersion "10.13") [ "-faligned-allocation" ]); diff --git a/pkgs/applications/misc/pastel/default.nix b/pkgs/applications/misc/pastel/default.nix index e48c0bbcab7b..5164e294a89b 100644 --- a/pkgs/applications/misc/pastel/default.nix +++ b/pkgs/applications/misc/pastel/default.nix @@ -13,7 +13,7 @@ rustPlatform.buildRustPackage rec { cargoHash = "sha256-+Cw/aAXkSbYLqc7TGWsMUJNo88v0s1Cq1m4V84j3gXE="; - buildInputs = lib.optional stdenv.isDarwin Security; + buildInputs = lib.optional stdenv.hostPlatform.isDarwin Security; meta = with lib; { description = "Command-line tool to generate, analyze, convert and manipulate colors"; diff --git a/pkgs/applications/misc/pdfpc/default.nix b/pkgs/applications/misc/pdfpc/default.nix index 2b6e7a0ed88c..cae71f785978 100644 --- a/pkgs/applications/misc/pdfpc/default.nix +++ b/pkgs/applications/misc/pdfpc/default.nix @@ -49,7 +49,7 @@ stdenv.mkDerivation rec { }) ]; - cmakeFlags = lib.optional stdenv.isDarwin (lib.cmakeBool "MOVIES" false); + cmakeFlags = lib.optional stdenv.hostPlatform.isDarwin (lib.cmakeBool "MOVIES" false); meta = with lib; { description = "Presenter console with multi-monitor support for PDF files"; diff --git a/pkgs/applications/misc/pgmodeler/default.nix b/pkgs/applications/misc/pgmodeler/default.nix index 6d91a499803c..35777a0b2563 100644 --- a/pkgs/applications/misc/pgmodeler/default.nix +++ b/pkgs/applications/misc/pgmodeler/default.nix @@ -23,7 +23,7 @@ stdenv.mkDerivation rec { }; nativeBuildInputs = [ pkg-config qmake wrapQtAppsHook ]; - qmakeFlags = [ "pgmodeler.pro" "CONFIG+=release" ] ++ lib.optionals stdenv.isDarwin [ + qmakeFlags = [ "pgmodeler.pro" "CONFIG+=release" ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ "PGSQL_INC=${lib.getDev postgresql}/include" "PGSQL_LIB=${lib.getLib postgresql}/lib/libpq.dylib" "XML_INC=${libxml2.dev}/include/libxml2" @@ -33,10 +33,10 @@ stdenv.mkDerivation rec { # todo: libpq would suffice here. Unfortunately this won't work, if one uses only postgresql.lib here. buildInputs = [ postgresql qtsvg ] - ++ lib.optionals stdenv.isLinux [ qtwayland ] - ++ lib.optionals stdenv.isDarwin [ cups libxml2 ]; + ++ lib.optionals stdenv.hostPlatform.isLinux [ qtwayland ] + ++ lib.optionals stdenv.hostPlatform.isDarwin [ cups libxml2 ]; - postInstall = lib.optionalString stdenv.isDarwin '' + postInstall = lib.optionalString stdenv.hostPlatform.isDarwin '' mkdir -p $out/bin for item in pgmodeler pgmodeler-{cli,se,ch} do @@ -44,7 +44,7 @@ stdenv.mkDerivation rec { done ''; - dontWrapQtApps = stdenv.isDarwin; + dontWrapQtApps = stdenv.hostPlatform.isDarwin; meta = with lib; { description = "Database modeling tool for PostgreSQL"; diff --git a/pkgs/applications/misc/plover/default.nix b/pkgs/applications/misc/plover/default.nix index 3f4e82d2e4d9..65161d713f29 100644 --- a/pkgs/applications/misc/plover/default.nix +++ b/pkgs/applications/misc/plover/default.nix @@ -8,7 +8,7 @@ version = "4.0.0.dev10"; meta = with lib; { - broken = stdenv.isDarwin; + broken = stdenv.hostPlatform.isDarwin; description = "OpenSteno Plover stenography software"; maintainers = with maintainers; [ twey kovirobi ]; license = licenses.gpl2; diff --git a/pkgs/applications/misc/pomodoro/default.nix b/pkgs/applications/misc/pomodoro/default.nix index 77774b5343a5..d9f76a75451b 100644 --- a/pkgs/applications/misc/pomodoro/default.nix +++ b/pkgs/applications/misc/pomodoro/default.nix @@ -12,7 +12,7 @@ rustPlatform.buildRustPackage rec { }; cargoHash = "sha256-6ZhWStZebXSwrej36DXifrsrmR1SWW3PwGUX0hqPwE4="; - buildInputs = lib.optionals stdenv.isDarwin [ Foundation ]; + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ Foundation ]; meta = with lib; { description = "Simple CLI pomodoro timer using desktop notifications written in Rust"; @@ -20,7 +20,7 @@ rustPlatform.buildRustPackage rec { license = licenses.mit; maintainers = with maintainers; [ annaaurora ]; # error: redefinition of module 'ObjectiveC' - broken = stdenv.isDarwin; + broken = stdenv.hostPlatform.isDarwin; mainProgram = "pomodoro"; }; } diff --git a/pkgs/applications/misc/porsmo/default.nix b/pkgs/applications/misc/porsmo/default.nix index f741ad2d6b48..6d9ed5ee2c98 100644 --- a/pkgs/applications/misc/porsmo/default.nix +++ b/pkgs/applications/misc/porsmo/default.nix @@ -29,7 +29,7 @@ rustPlatform.buildRustPackage rec { buildInputs = [ alsa-lib - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.CoreAudio darwin.apple_sdk.frameworks.CoreFoundation ]; diff --git a/pkgs/applications/misc/process-viewer/default.nix b/pkgs/applications/misc/process-viewer/default.nix index ef2b9fec3adb..10f55aced9ea 100644 --- a/pkgs/applications/misc/process-viewer/default.nix +++ b/pkgs/applications/misc/process-viewer/default.nix @@ -20,7 +20,7 @@ rustPlatform.buildRustPackage rec { nativeBuildInputs = [ pkg-config ]; - buildInputs = [ gtk4 ] ++ lib.optionals stdenv.isDarwin [ + buildInputs = [ gtk4 ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk_11_0.frameworks.Foundation ]; diff --git a/pkgs/applications/misc/prusa-slicer/default.nix b/pkgs/applications/misc/prusa-slicer/default.nix index 159b0e0aebc5..ecce3066ed5b 100644 --- a/pkgs/applications/misc/prusa-slicer/default.nix +++ b/pkgs/applications/misc/prusa-slicer/default.nix @@ -128,7 +128,7 @@ stdenv.mkDerivation (finalAttrs: { catch2 ] ++ lib.optionals withSystemd [ systemd - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk_11_0.frameworks.CoreWLAN ]; @@ -210,7 +210,7 @@ stdenv.mkDerivation (finalAttrs: { license = licenses.agpl3Plus; maintainers = with maintainers; [ moredread tweber tmarkus ]; platforms = platforms.unix; - } // lib.optionalAttrs (stdenv.isDarwin) { + } // lib.optionalAttrs (stdenv.hostPlatform.isDarwin) { mainProgram = "PrusaSlicer"; }; }) diff --git a/pkgs/applications/misc/pueue/default.nix b/pkgs/applications/misc/pueue/default.nix index 173323f58975..1eff0355412c 100644 --- a/pkgs/applications/misc/pueue/default.nix +++ b/pkgs/applications/misc/pueue/default.nix @@ -23,11 +23,11 @@ rustPlatform.buildRustPackage rec { nativeBuildInputs = [ installShellFiles - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ rustPlatform.bindgenHook ]; - buildInputs = lib.optionals stdenv.isDarwin [ + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ Libsystem SystemConfiguration libiconv diff --git a/pkgs/applications/misc/pwsafe/default.nix b/pkgs/applications/misc/pwsafe/default.nix index dc2de8b0cd73..b2856cb7978e 100644 --- a/pkgs/applications/misc/pwsafe/default.nix +++ b/pkgs/applications/misc/pwsafe/default.nix @@ -55,7 +55,7 @@ stdenv.mkDerivation rec { openssl xercesc file - ] ++ lib.optionals stdenv.isLinux [ + ] ++ lib.optionals stdenv.hostPlatform.isLinux [ libXext libXi libXt @@ -63,14 +63,14 @@ stdenv.mkDerivation rec { libuuid libyubikey yubikey-personalization - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ Cocoa ]; cmakeFlags = [ "-DNO_GTEST=ON" "-DCMAKE_CXX_FLAGS=-I${yubikey-personalization}/include/ykpers-1" - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ "-DNO_YUBI=ON" ]; @@ -91,7 +91,7 @@ stdenv.mkDerivation rec { for f in $(grep -Rl /usr/bin/ .) ; do substituteInPlace $f --replace /usr/bin/ "" done - '' + lib.optionalString stdenv.isDarwin '' + '' + lib.optionalString stdenv.hostPlatform.isDarwin '' substituteInPlace src/ui/cli/CMakeLists.txt --replace "uuid" "" ''; diff --git a/pkgs/applications/misc/qMasterPassword/default.nix b/pkgs/applications/misc/qMasterPassword/default.nix index a28e8d588693..806d1df05fc4 100644 --- a/pkgs/applications/misc/qMasterPassword/default.nix +++ b/pkgs/applications/misc/qMasterPassword/default.nix @@ -35,7 +35,7 @@ stdenv.mkDerivation rec { # Upstream install is mostly defunct. It hardcodes target.path and doesn't # install anything but the binary. - installPhase = if stdenv.isDarwin then '' + installPhase = if stdenv.hostPlatform.isDarwin then '' mkdir -p "$out"/{Applications,bin} mv qMasterPassword.app "$out"/Applications/ ln -s ../Applications/qMasterPassword.app/Contents/MacOS/qMasterPassword "$out"/bin/qMasterPassword diff --git a/pkgs/applications/misc/qcad/default.nix b/pkgs/applications/misc/qcad/default.nix index b94b8326dca3..6bffbda0a01b 100644 --- a/pkgs/applications/misc/qcad/default.nix +++ b/pkgs/applications/misc/qcad/default.nix @@ -57,7 +57,7 @@ mkDerivation rec { qtscript qtsvg qtxmlpatterns - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ qtmacextras ]; @@ -68,17 +68,17 @@ mkDerivation rec { "QMAKE_CXXFLAGS=-std=c++14" ]; - qtWrapperArgs = lib.optionals stdenv.isLinux [ + qtWrapperArgs = lib.optionals stdenv.hostPlatform.isLinux [ "--prefix LD_LIBRARY_PATH : ${placeholder "out"}/lib" - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ "--prefix DYLD_LIBRARY_PATH : ${placeholder "out"}/lib" ]; installPhase = '' runHook preInstall - '' + lib.optionalString stdenv.isLinux '' + '' + lib.optionalString stdenv.hostPlatform.isLinux '' install -Dm555 release/qcad-bin $out/bin/qcad - '' + lib.optionalString stdenv.isDarwin '' + '' + lib.optionalString stdenv.hostPlatform.isDarwin '' install -Dm555 release/QCAD.app/Contents/MacOS/QCAD $out/bin/qcad mkdir -p $out/lib '' + '' diff --git a/pkgs/applications/misc/qelectrotech/default.nix b/pkgs/applications/misc/qelectrotech/default.nix index b4d8bd3ab182..705618bd2f01 100644 --- a/pkgs/applications/misc/qelectrotech/default.nix +++ b/pkgs/applications/misc/qelectrotech/default.nix @@ -74,6 +74,6 @@ mkDerivation rec { license = licenses.gpl2; maintainers = with maintainers; [ yvesf ]; platforms = qtbase.meta.platforms; - broken = stdenv.isDarwin; + broken = stdenv.hostPlatform.isDarwin; }; } diff --git a/pkgs/applications/misc/qolibri/default.nix b/pkgs/applications/misc/qolibri/default.nix index 0439e212d112..4b8213d46d60 100644 --- a/pkgs/applications/misc/qolibri/default.nix +++ b/pkgs/applications/misc/qolibri/default.nix @@ -59,7 +59,7 @@ stdenv.mkDerivation { license = licenses.gpl2; maintainers = with maintainers; [ azahi ]; platforms = platforms.unix; - broken = stdenv.isDarwin && stdenv.isx86_64; # Looks like a libcxx version mismatch problem. + broken = stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isx86_64; # Looks like a libcxx version mismatch problem. mainProgram = "qolibri"; }; } diff --git a/pkgs/applications/misc/qsyncthingtray/default.nix b/pkgs/applications/misc/qsyncthingtray/default.nix index 2fa22cf73221..68baf5e08ebb 100644 --- a/pkgs/applications/misc/qsyncthingtray/default.nix +++ b/pkgs/applications/misc/qsyncthingtray/default.nix @@ -31,13 +31,13 @@ mkDerivation rec { }) ] ++ lib.optional (!preferQWebView && !preferNative) ./qsyncthingtray-0.5.8-qt-5.6.3.patch; postPatch = '' - ${lib.optionalString stdenv.isLinux '' + ${lib.optionalString stdenv.hostPlatform.isLinux '' substituteInPlace includes/platforms/linux/posixUtils.hpp \ --replace '"/usr/local/bin/syncthing"' '"${syncthing}/bin/syncthing"' \ --replace '"pgrep -x' '"${procps}/bin/pgrep -x' ''} - ${lib.optionalString stdenv.isDarwin '' + ${lib.optionalString stdenv.hostPlatform.isDarwin '' substituteInPlace includes/platforms/darwin/macUtils.hpp \ --replace '"/usr/local/bin/syncthing"' '"${syncthing}/bin/syncthing"' ''} @@ -64,6 +64,6 @@ mkDerivation rec { license = licenses.lgpl3; maintainers = with maintainers; [ zraexy peterhoeg ]; platforms = platforms.all; - broken = !preferNative || stdenv.isDarwin; + broken = !preferNative || stdenv.hostPlatform.isDarwin; }; } diff --git a/pkgs/applications/misc/reddsaver/default.nix b/pkgs/applications/misc/reddsaver/default.nix index b737716ed5d3..c544dc44888f 100644 --- a/pkgs/applications/misc/reddsaver/default.nix +++ b/pkgs/applications/misc/reddsaver/default.nix @@ -21,7 +21,7 @@ rustPlatform.buildRustPackage rec { nativeBuildInputs = [ pkg-config ]; buildInputs = [ openssl ] - ++ lib.optional stdenv.isDarwin Security; + ++ lib.optional stdenv.hostPlatform.isDarwin Security; # package does not contain tests as of v0.3.3 docCheck = false; diff --git a/pkgs/applications/misc/redshift/default.nix b/pkgs/applications/misc/redshift/default.nix index 41a21e8f49ed..6451fa2c7acf 100644 --- a/pkgs/applications/misc/redshift/default.nix +++ b/pkgs/applications/misc/redshift/default.nix @@ -3,15 +3,15 @@ , libtool, pkg-config, wrapGAppsHook3, wrapPython, gobject-introspection, wayland-scanner , gtk3, python, pygobject3, pyxdg -, withQuartz ? stdenv.isDarwin, ApplicationServices -, withRandr ? stdenv.isLinux, libxcb -, withDrm ? stdenv.isLinux, libdrm -, withVidmode ? stdenv.isLinux, libXxf86vm +, withQuartz ? stdenv.hostPlatform.isDarwin, ApplicationServices +, withRandr ? stdenv.hostPlatform.isLinux, libxcb +, withDrm ? stdenv.hostPlatform.isLinux, libdrm +, withVidmode ? stdenv.hostPlatform.isLinux, libXxf86vm , withGeolocation ? true -, withCoreLocation ? withGeolocation && stdenv.isDarwin, CoreLocation, Foundation, Cocoa -, withGeoclue ? withGeolocation && stdenv.isLinux, geoclue -, withAppIndicator ? stdenv.isLinux, libappindicator, libayatana-appindicator +, withCoreLocation ? withGeolocation && stdenv.hostPlatform.isDarwin, CoreLocation, Foundation, Cocoa +, withGeoclue ? withGeolocation && stdenv.hostPlatform.isLinux, geoclue +, withAppIndicator ? stdenv.hostPlatform.isLinux, libappindicator, libayatana-appindicator }: let diff --git a/pkgs/applications/misc/rtfm/default.nix b/pkgs/applications/misc/rtfm/default.nix index 53ad4f9aea9e..655dd90fdb34 100644 --- a/pkgs/applications/misc/rtfm/default.nix +++ b/pkgs/applications/misc/rtfm/default.nix @@ -52,7 +52,7 @@ crystal.buildCrystalPackage rec { nativeBuildInputs = [ wrapGAppsHook4 gobject-introspection - ] ++ lib.optionals stdenv.isDarwin [ desktopToDarwinBundle ]; + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ desktopToDarwinBundle ]; buildInputs = [ webkitgtk_6_0 diff --git a/pkgs/applications/misc/rust-traverse/default.nix b/pkgs/applications/misc/rust-traverse/default.nix index 7d0e072ee36b..ffe101847105 100644 --- a/pkgs/applications/misc/rust-traverse/default.nix +++ b/pkgs/applications/misc/rust-traverse/default.nix @@ -28,7 +28,7 @@ rustPlatform.buildRustPackage rec { buildInputs = [ bzip2 zstd - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk_11_0.frameworks.Foundation ]; diff --git a/pkgs/applications/misc/safecloset/default.nix b/pkgs/applications/misc/safecloset/default.nix index ce774e5a668f..d173777bc3bc 100644 --- a/pkgs/applications/misc/safecloset/default.nix +++ b/pkgs/applications/misc/safecloset/default.nix @@ -19,9 +19,9 @@ rustPlatform.buildRustPackage rec { cargoHash = "sha256-rxNp9dOvy/UTx6Q9pzZGccEKmIiWxzWVYyMxb+h5bqw="; - buildInputs = lib.optionals stdenv.isDarwin [ + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.AppKit - ] ++ lib.optionals stdenv.isLinux [ + ] ++ lib.optionals stdenv.hostPlatform.isLinux [ xorg.libxcb ]; diff --git a/pkgs/applications/misc/sampler/default.nix b/pkgs/applications/misc/sampler/default.nix index a111142bbde4..7ee3d4573d9a 100644 --- a/pkgs/applications/misc/sampler/default.nix +++ b/pkgs/applications/misc/sampler/default.nix @@ -25,8 +25,8 @@ buildGoModule rec { subPackages = [ "." ]; - buildInputs = lib.optional stdenv.isLinux alsa-lib - ++ lib.optionals stdenv.isDarwin [ + buildInputs = lib.optional stdenv.hostPlatform.isLinux alsa-lib + ++ lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.OpenAL ]; diff --git a/pkgs/applications/misc/senv/default.nix b/pkgs/applications/misc/senv/default.nix index b542966e828a..999b140c5fe2 100644 --- a/pkgs/applications/misc/senv/default.nix +++ b/pkgs/applications/misc/senv/default.nix @@ -20,7 +20,7 @@ buildGoModule rec { homepage = "https://github.com/SpectralOps/senv"; license = licenses.mit; maintainers = with maintainers; [ SuperSandro2000 ]; - broken = stdenv.isDarwin; # needs golang.org/x/sys bump + broken = stdenv.hostPlatform.isDarwin; # needs golang.org/x/sys bump mainProgram = "senv"; }; } diff --git a/pkgs/applications/misc/sigal/default.nix b/pkgs/applications/misc/sigal/default.nix index 1e82fce07898..d9b4c4cfd53b 100644 --- a/pkgs/applications/misc/sigal/default.nix +++ b/pkgs/applications/misc/sigal/default.nix @@ -41,7 +41,7 @@ python3.pkgs.buildPythonApplication rec { pytestCheckHook ]); - disabledTests = lib.optionals stdenv.isDarwin [ + disabledTests = lib.optionals stdenv.hostPlatform.isDarwin [ "test_nonmedia_files" ]; diff --git a/pkgs/applications/misc/sioyek/default.nix b/pkgs/applications/misc/sioyek/default.nix index ab853d4dc1f4..64faccf6811c 100644 --- a/pkgs/applications/misc/sioyek/default.nix +++ b/pkgs/applications/misc/sioyek/default.nix @@ -46,7 +46,7 @@ stdenv.mkDerivation (finalAttrs: { qt3d qtbase ] - ++ lib.optionals stdenv.isDarwin [ freetype ]; + ++ lib.optionals stdenv.hostPlatform.isDarwin [ freetype ]; nativeBuildInputs = [ installShellFiles @@ -54,7 +54,7 @@ stdenv.mkDerivation (finalAttrs: { wrapQtAppsHook ]; - qmakeFlags = lib.optionals stdenv.isDarwin [ "CONFIG+=non_portable" ]; + qmakeFlags = lib.optionals stdenv.hostPlatform.isDarwin [ "CONFIG+=non_portable" ]; postPatch = '' substituteInPlace pdf_viewer_build_config.pro \ @@ -65,7 +65,7 @@ stdenv.mkDerivation (finalAttrs: { --replace "/etc/sioyek" "$out/etc" ''; - postInstall = if stdenv.isDarwin then '' + postInstall = if stdenv.hostPlatform.isDarwin then '' cp -r pdf_viewer/shaders sioyek.app/Contents/MacOS/shaders cp pdf_viewer/prefs.config sioyek.app/Contents/MacOS/ cp pdf_viewer/prefs_user.config sioyek.app/Contents/MacOS/ diff --git a/pkgs/applications/misc/slippy/default.nix b/pkgs/applications/misc/slippy/default.nix index cf5cd1ff0b3d..a7e6a75a7a7e 100644 --- a/pkgs/applications/misc/slippy/default.nix +++ b/pkgs/applications/misc/slippy/default.nix @@ -49,7 +49,7 @@ rustPlatform.buildRustPackage rec { buildInputs = [ openssl - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.Security ]; diff --git a/pkgs/applications/misc/snagboot/default.nix b/pkgs/applications/misc/snagboot/default.nix index 11f49d8506b5..3a663443513c 100644 --- a/pkgs/applications/misc/snagboot/default.nix +++ b/pkgs/applications/misc/snagboot/default.nix @@ -39,7 +39,7 @@ python3.pkgs.buildPythonApplication rec { tftpy ]; - postInstall = lib.optionalString stdenv.isLinux '' + postInstall = lib.optionalString stdenv.hostPlatform.isLinux '' rules="src/snagrecover/50-snagboot.rules" if [ ! -f "$rules" ]; then echo "$rules is missing, must update the Nix file." diff --git a/pkgs/applications/misc/stork/default.nix b/pkgs/applications/misc/stork/default.nix index 0de395549bdd..4441508e0be8 100644 --- a/pkgs/applications/misc/stork/default.nix +++ b/pkgs/applications/misc/stork/default.nix @@ -28,7 +28,7 @@ rustPlatform.buildRustPackage rec { nativeBuildInputs = [ pkg-config ]; buildInputs = [ openssl ] - ++ lib.optionals stdenv.isDarwin [ Security ]; + ++ lib.optionals stdenv.hostPlatform.isDarwin [ Security ]; meta = with lib; { description = "Impossibly fast web search, made for static sites"; diff --git a/pkgs/applications/misc/stw/default.nix b/pkgs/applications/misc/stw/default.nix index 689fc9e81ce7..5f36e1e1126c 100644 --- a/pkgs/applications/misc/stw/default.nix +++ b/pkgs/applications/misc/stw/default.nix @@ -27,7 +27,7 @@ stdenv.mkDerivation rec { license = licenses.mit; maintainers = with maintainers; [ somasis ]; platforms = platforms.unix; - broken = stdenv.isDarwin; + broken = stdenv.hostPlatform.isDarwin; mainProgram = "stw"; }; } diff --git a/pkgs/applications/misc/survex/default.nix b/pkgs/applications/misc/survex/default.nix index 2bb4184b4353..bfb79fd10b93 100644 --- a/pkgs/applications/misc/survex/default.nix +++ b/pkgs/applications/misc/survex/default.nix @@ -64,7 +64,7 @@ stdenv.mkDerivation rec { ''; enableParallelBuilding = true; - doCheck = (!stdenv.isDarwin); # times out + doCheck = (!stdenv.hostPlatform.isDarwin); # times out enableParallelChecking = false; meta = with lib; { diff --git a/pkgs/applications/misc/syncthingtray/default.nix b/pkgs/applications/misc/syncthingtray/default.nix index a993a57deb40..3d0cbe7198c2 100644 --- a/pkgs/applications/misc/syncthingtray/default.nix +++ b/pkgs/applications/misc/syncthingtray/default.nix @@ -22,9 +22,9 @@ , xdg-utils , webviewSupport ? true , jsSupport ? true -, kioPluginSupport ? stdenv.isLinux -, plasmoidSupport ? stdenv.isLinux -, systemdSupport ? stdenv.isLinux +, kioPluginSupport ? stdenv.hostPlatform.isLinux +, plasmoidSupport ? stdenv.hostPlatform.isLinux +, systemdSupport ? stdenv.hostPlatform.isLinux /* It is possible to set via this option an absolute exec path that will be written to the `~/.config/autostart/syncthingtray.desktop` file generated during runtime. Alternatively, one can edit the desktop file themselves after @@ -52,8 +52,8 @@ stdenv.mkDerivation (finalAttrs: { qtutilities boost qtforkawesome - ] ++ lib.optionals stdenv.isDarwin [ iconv ] - ++ lib.optionals stdenv.isLinux [ qtwayland ] + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ iconv ] + ++ lib.optionals stdenv.hostPlatform.isLinux [ qtwayland ] ++ lib.optionals webviewSupport [ qtwebengine ] ++ lib.optionals jsSupport [ qtdeclarative ] ++ lib.optionals kioPluginSupport [ kio ] @@ -74,12 +74,12 @@ stdenv.mkDerivation (finalAttrs: { ; # syncthing server seems to hang on darwin, causing tests to fail. - doCheck = !stdenv.isDarwin; + doCheck = !stdenv.hostPlatform.isDarwin; preCheck = '' export QT_QPA_PLATFORM=offscreen export QT_PLUGIN_PATH="${lib.getBin qtbase}/${qtbase.qtPluginPrefix}" ''; - postInstall = lib.optionalString stdenv.isDarwin '' + postInstall = lib.optionalString stdenv.hostPlatform.isDarwin '' # put the app bundle into the proper place /Applications instead of /bin mkdir -p $out/Applications mv $out/bin/syncthingtray.app $out/Applications diff --git a/pkgs/applications/misc/synergy/default.nix b/pkgs/applications/misc/synergy/default.nix index fe15ce3b98b0..7db338b16897 100644 --- a/pkgs/applications/misc/synergy/default.nix +++ b/pkgs/applications/misc/synergy/default.nix @@ -55,7 +55,7 @@ stdenv.mkDerivation rec { postPatch = '' substituteInPlace src/gui/src/SslCertificate.cpp \ --replace 'kUnixOpenSslCommand[] = "openssl";' 'kUnixOpenSslCommand[] = "${openssl}/bin/openssl";' - '' + lib.optionalString stdenv.isLinux '' + '' + lib.optionalString stdenv.hostPlatform.isLinux '' substituteInPlace src/lib/synergy/unix/AppUtilUnix.cpp \ --replace "/usr/share/X11/xkb/rules/evdev.xml" "${xkeyboardconfig}/share/X11/xkb/rules/evdev.xml" ''; @@ -69,14 +69,14 @@ stdenv.mkDerivation rec { qttools # Used for translations even when not building the GUI openssl pcre - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ ApplicationServices Carbon Cocoa CoreServices ScreenSaver UserNotifications - ] ++ lib.optionals stdenv.isLinux [ + ] ++ lib.optionals stdenv.hostPlatform.isLinux [ util-linux libselinux libsepol @@ -95,17 +95,17 @@ stdenv.mkDerivation rec { ]; # Silences many warnings - env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.isDarwin "-Wno-inconsistent-missing-override"; + env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.hostPlatform.isDarwin "-Wno-inconsistent-missing-override"; cmakeFlags = lib.optional (!withGUI) "-DSYNERGY_BUILD_LEGACY_GUI=OFF" # NSFilenamesPboardType is deprecated in 10.14+ - ++ lib.optional stdenv.isDarwin "-DCMAKE_OSX_DEPLOYMENT_TARGET=${if stdenv.isAarch64 then "10.13" else stdenv.hostPlatform.darwinSdkVersion}"; + ++ lib.optional stdenv.hostPlatform.isDarwin "-DCMAKE_OSX_DEPLOYMENT_TARGET=${if stdenv.hostPlatform.isAarch64 then "10.13" else stdenv.hostPlatform.darwinSdkVersion}"; doCheck = true; checkPhase = '' runHook preCheck - '' + lib.optionalString stdenv.isDarwin '' + '' + lib.optionalString stdenv.hostPlatform.isDarwin '' # filter out tests failing with sandboxing on darwin export GTEST_FILTER=-ServerConfigTests.serverconfig_will_deem_equal_configs_with_same_cell_names:NetworkAddress.hostname_valid_parsing '' + '' @@ -120,12 +120,12 @@ stdenv.mkDerivation rec { cp bin/{synergyc,synergys,synergyd,syntool} $out/bin/ '' + lib.optionalString withGUI '' cp bin/synergy $out/bin/ - '' + lib.optionalString stdenv.isLinux '' + '' + lib.optionalString stdenv.hostPlatform.isLinux '' mkdir -p $out/share/{applications,icons/hicolor/scalable/apps} cp ../res/synergy.svg $out/share/icons/hicolor/scalable/apps/ substitute ../res/synergy.desktop $out/share/applications/synergy.desktop \ --replace "/usr/bin" "$out/bin" - '' + lib.optionalString (stdenv.isDarwin && withGUI) '' + '' + lib.optionalString (stdenv.hostPlatform.isDarwin && withGUI) '' mkdir -p $out/Applications cp -r bundle/Synergy.app $out/Applications ln -s $out/bin $out/Applications/Synergy.app/Contents/MacOS diff --git a/pkgs/applications/misc/taizen/default.nix b/pkgs/applications/misc/taizen/default.nix index 903de3c05c1d..30bb445089f5 100644 --- a/pkgs/applications/misc/taizen/default.nix +++ b/pkgs/applications/misc/taizen/default.nix @@ -26,7 +26,7 @@ rustPlatform.buildRustPackage rec { buildInputs = [ ncurses openssl - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.Security ]; diff --git a/pkgs/applications/misc/terminal-typeracer/default.nix b/pkgs/applications/misc/terminal-typeracer/default.nix index 80ece5bded7a..ec2cda0c164c 100644 --- a/pkgs/applications/misc/terminal-typeracer/default.nix +++ b/pkgs/applications/misc/terminal-typeracer/default.nix @@ -25,7 +25,7 @@ rustPlatform.buildRustPackage rec { nativeBuildInputs = [ pkg-config ]; - buildInputs = [ libgit2 openssl sqlite ] ++ lib.optionals stdenv.isDarwin [ libiconv Security ]; + buildInputs = [ libgit2 openssl sqlite ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ libiconv Security ]; OPENSSL_NO_VENDOR = 1; LIBGIT2_NO_VENDOR = 1; diff --git a/pkgs/applications/misc/tickrs/default.nix b/pkgs/applications/misc/tickrs/default.nix index f2cc437ab9b6..4e789f2f8ec7 100644 --- a/pkgs/applications/misc/tickrs/default.nix +++ b/pkgs/applications/misc/tickrs/default.nix @@ -28,7 +28,7 @@ rustPlatform.buildRustPackage rec { buildInputs = [ openssl zlib - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.SystemConfiguration ]; diff --git a/pkgs/applications/misc/translatelocally/default.nix b/pkgs/applications/misc/translatelocally/default.nix index 2749a7ec1566..d99579a5f2a6 100644 --- a/pkgs/applications/misc/translatelocally/default.nix +++ b/pkgs/applications/misc/translatelocally/default.nix @@ -28,7 +28,7 @@ in stdenv.mkDerivation (finalAttrs: { ''; # https://github.com/XapaJIaMnu/translateLocally/blob/81ed8b9/.github/workflows/build.yml#L330 - postConfigure = lib.optionalString stdenv.isAarch64 '' + postConfigure = lib.optionalString stdenv.hostPlatform.isAarch64 '' bash ../cmake/fix_ruy_build.sh .. . ''; diff --git a/pkgs/applications/misc/tthsum/default.nix b/pkgs/applications/misc/tthsum/default.nix index 603ddeca4fd7..e2b9d2e57041 100644 --- a/pkgs/applications/misc/tthsum/default.nix +++ b/pkgs/applications/misc/tthsum/default.nix @@ -15,10 +15,10 @@ stdenv.mkDerivation rec { cp obj-unix/tthsum $out/bin ''; - doCheck = !stdenv.isDarwin; + doCheck = !stdenv.hostPlatform.isDarwin; meta = with lib; { - broken = stdenv.isDarwin; + broken = stdenv.hostPlatform.isDarwin; description = "Md5sum-alike program that works with Tiger/THEX hashes"; longDescription = '' tthsum generates or checks TTH checksums (root of the THEX hash diff --git a/pkgs/applications/misc/tui-journal/default.nix b/pkgs/applications/misc/tui-journal/default.nix index 499cf576c314..a4305dbd1769 100644 --- a/pkgs/applications/misc/tui-journal/default.nix +++ b/pkgs/applications/misc/tui-journal/default.nix @@ -30,7 +30,7 @@ rustPlatform.buildRustPackage rec { libgit2 openssl zlib - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.AppKit darwin.apple_sdk.frameworks.Security ]; diff --git a/pkgs/applications/misc/ubpm/default.nix b/pkgs/applications/misc/ubpm/default.nix index f2c0a9aa02e8..883850f10b13 100644 --- a/pkgs/applications/misc/ubpm/default.nix +++ b/pkgs/applications/misc/ubpm/default.nix @@ -43,6 +43,6 @@ stdenv.mkDerivation (finalAttrs: { mainProgram = "ubpm"; license = licenses.gpl3Only; maintainers = with maintainers; [ kurnevsky ]; - broken = stdenv.isDarwin; + broken = stdenv.hostPlatform.isDarwin; }; }) diff --git a/pkgs/applications/misc/udict/default.nix b/pkgs/applications/misc/udict/default.nix index 24424c1017db..42f2585ec439 100644 --- a/pkgs/applications/misc/udict/default.nix +++ b/pkgs/applications/misc/udict/default.nix @@ -30,7 +30,7 @@ rustPlatform.buildRustPackage rec { buildInputs = [ openssl - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.CoreFoundation darwin.apple_sdk.frameworks.Security ]; diff --git a/pkgs/applications/misc/usb-reset/default.nix b/pkgs/applications/misc/usb-reset/default.nix index 0e924ba5ee67..a5bb2061ed50 100644 --- a/pkgs/applications/misc/usb-reset/default.nix +++ b/pkgs/applications/misc/usb-reset/default.nix @@ -31,7 +31,7 @@ stdenv.mkDerivation rec { ]; meta = with lib; { - broken = stdenv.isDarwin; + broken = stdenv.hostPlatform.isDarwin; description = "Perform a bus reset on a USB device using its vendor and product ID"; homepage = "https://github.com/ralight/usb-reset"; changelog = "https://github.com/ralight/usb-reset/blob/master/ChangeLog.txt"; diff --git a/pkgs/applications/misc/vhs/default.nix b/pkgs/applications/misc/vhs/default.nix index 368a8163657b..12e14f212f7d 100644 --- a/pkgs/applications/misc/vhs/default.nix +++ b/pkgs/applications/misc/vhs/default.nix @@ -18,7 +18,7 @@ buildGoModule rec { ldflags = [ "-s" "-w" "-X=main.Version=${version}" ]; postInstall = '' - wrapProgram $out/bin/vhs --prefix PATH : ${lib.makeBinPath (lib.optionals stdenv.isLinux [ chromium ] ++ [ ffmpeg ttyd ])} + wrapProgram $out/bin/vhs --prefix PATH : ${lib.makeBinPath (lib.optionals stdenv.hostPlatform.isLinux [ chromium ] ++ [ ffmpeg ttyd ])} $out/bin/vhs man > vhs.1 installManPage vhs.1 installShellCompletion --cmd vhs \ diff --git a/pkgs/applications/misc/viking/default.nix b/pkgs/applications/misc/viking/default.nix index 1335d950405f..cb3ab09e31bc 100644 --- a/pkgs/applications/misc/viking/default.nix +++ b/pkgs/applications/misc/viking/default.nix @@ -10,7 +10,7 @@ , withMBTiles ? true, sqlite , withMd5Hash ? true, nettle , withOAuth ? true, liboauth -, withRealtimeGPSTracking ? (!stdenv.isDarwin), gpsd +, withRealtimeGPSTracking ? (!stdenv.hostPlatform.isDarwin), gpsd }: stdenv.mkDerivation rec { @@ -31,7 +31,7 @@ stdenv.mkDerivation rec { ]; nativeBuildInputs = [ docbook_xml_dtd_45 docbook_xsl intltool itstool libxslt pkg-config wrapGAppsHook3 yelp-tools ] - ++ lib.optional stdenv.isDarwin desktopToDarwinBundle; + ++ lib.optional stdenv.hostPlatform.isDarwin desktopToDarwinBundle; buildInputs = [ curl gdk-pixbuf gtk3 json-glib libxml2 ] ++ lib.optional withGeoClue geoclue2 diff --git a/pkgs/applications/misc/visidata/default.nix b/pkgs/applications/misc/visidata/default.nix index cb6033fa4b62..d7a7c4d9f75f 100644 --- a/pkgs/applications/misc/visidata/default.nix +++ b/pkgs/applications/misc/visidata/default.nix @@ -40,7 +40,7 @@ # other , git , withPcap ? true, dpkt, dnslib -, withXclip ? stdenv.isLinux, xclip +, withXclip ? stdenv.hostPlatform.isLinux, xclip , testers , visidata }: diff --git a/pkgs/applications/misc/wordnet/default.nix b/pkgs/applications/misc/wordnet/default.nix index fccd7585e41e..5ed42ab1fc29 100644 --- a/pkgs/applications/misc/wordnet/default.nix +++ b/pkgs/applications/misc/wordnet/default.nix @@ -10,7 +10,7 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ makeWrapper ]; buildInputs = [ tcl tk ] - ++ lib.optionals stdenv.isDarwin [ Cocoa ]; + ++ lib.optionals stdenv.hostPlatform.isDarwin [ Cocoa ]; hardeningDisable = [ "format" ]; diff --git a/pkgs/applications/misc/workrave/default.nix b/pkgs/applications/misc/workrave/default.nix index a0521d443937..869f7c63712c 100644 --- a/pkgs/applications/misc/workrave/default.nix +++ b/pkgs/applications/misc/workrave/default.nix @@ -85,7 +85,7 @@ stdenv.mkDerivation rec { enableParallelBuilding = true; meta = with lib; { - broken = (stdenv.isLinux && stdenv.isAarch64); + broken = (stdenv.hostPlatform.isLinux && stdenv.hostPlatform.isAarch64); description = "Program to help prevent Repetitive Strain Injury"; mainProgram = "workrave"; longDescription = '' diff --git a/pkgs/applications/misc/wthrr/default.nix b/pkgs/applications/misc/wthrr/default.nix index 142d331be9f7..df95d41738e4 100644 --- a/pkgs/applications/misc/wthrr/default.nix +++ b/pkgs/applications/misc/wthrr/default.nix @@ -26,7 +26,7 @@ rustPlatform.buildRustPackage rec { buildInputs = [ openssl - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.CoreFoundation darwin.apple_sdk.frameworks.Security darwin.apple_sdk.frameworks.SystemConfiguration diff --git a/pkgs/applications/misc/xmrig/default.nix b/pkgs/applications/misc/xmrig/default.nix index 2cea4d2dd45c..9b46c65b8003 100644 --- a/pkgs/applications/misc/xmrig/default.nix +++ b/pkgs/applications/misc/xmrig/default.nix @@ -43,7 +43,7 @@ stdenv.mkDerivation rec { libmicrohttpd openssl hwloc - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ Carbon CoreServices OpenCL diff --git a/pkgs/applications/misc/xmrig/proxy.nix b/pkgs/applications/misc/xmrig/proxy.nix index fb69b92e8fe1..9efdbc700a64 100644 --- a/pkgs/applications/misc/xmrig/proxy.nix +++ b/pkgs/applications/misc/xmrig/proxy.nix @@ -38,7 +38,7 @@ stdenv.mkDerivation rec { libuv libmicrohttpd openssl - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ CoreServices IOKit ]; diff --git a/pkgs/applications/misc/xpdf/default.nix b/pkgs/applications/misc/xpdf/default.nix index 2315810e03ff..13b4097f8cdf 100644 --- a/pkgs/applications/misc/xpdf/default.nix +++ b/pkgs/applications/misc/xpdf/default.nix @@ -25,7 +25,7 @@ stdenv.mkDerivation rec { # Fix "No known features for CXX compiler", see # https://cmake.org/pipermail/cmake/2016-December/064733.html and the note at # https://cmake.org/cmake/help/v3.10/command/cmake_minimum_required.html - postPatch = lib.optionalString stdenv.isDarwin '' + postPatch = lib.optionalString stdenv.hostPlatform.isDarwin '' substituteInPlace CMakeLists.txt --replace \ 'cmake_minimum_required(VERSION 2.8.12)' 'cmake_minimum_required(VERSION 3.1.0)' ''; @@ -51,7 +51,7 @@ stdenv.mkDerivation rec { categories = [ "Office" ]; }; - postInstall = lib.optionalString (!stdenv.isDarwin) '' + postInstall = lib.optionalString (!stdenv.hostPlatform.isDarwin) '' install -Dm644 ${desktopItem}/share/applications/xpdf.desktop -t $out/share/applications install -Dm644 $src/xpdf-qt/xpdf-icon.svg $out/share/pixmaps/xpdf.svg ''; diff --git a/pkgs/applications/misc/xygrib/default.nix b/pkgs/applications/misc/xygrib/default.nix index 4ce68f77e25b..32605747399a 100644 --- a/pkgs/applications/misc/xygrib/default.nix +++ b/pkgs/applications/misc/xygrib/default.nix @@ -14,10 +14,10 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ cmake qttools wrapQtAppsHook ]; buildInputs = [ bzip2 qtbase libnova proj_7 openjpeg libpng ]; cmakeFlags = [ "-DOPENJPEG_INCLUDE_DIR=${openjpeg.dev}/include/openjpeg-${lib.versions.majorMinor openjpeg.version}" ] - ++ lib.optionals stdenv.isDarwin [ "-DLIBNOVA_LIBRARY=${libnova}/lib/libnova.dylib" ]; + ++ lib.optionals stdenv.hostPlatform.isDarwin [ "-DLIBNOVA_LIBRARY=${libnova}/lib/libnova.dylib" ]; postInstall = - if stdenv.isDarwin then '' + if stdenv.hostPlatform.isDarwin then '' mkdir -p "$out/Applications" "$out/XyGrib/XyGrib.app/Contents/Resources" cp "../data/img/xyGrib.icns" "$out/XyGrib/XyGrib.app/Contents/Resources/xyGrib.icns" mv $out/XyGrib/XyGrib.app $out/Applications diff --git a/pkgs/applications/misc/zathura/core/default.nix b/pkgs/applications/misc/zathura/core/default.nix index c2a4abacb50e..4aff5303ee18 100644 --- a/pkgs/applications/misc/zathura/core/default.nix +++ b/pkgs/applications/misc/zathura/core/default.nix @@ -90,9 +90,9 @@ stdenv.mkDerivation (finalAttrs: { check json-glib texlive.bin.core - ] ++ lib.optional stdenv.isLinux libseccomp ++ lib.optional stdenv.isDarwin gtk-mac-integration; + ] ++ lib.optional stdenv.hostPlatform.isLinux libseccomp ++ lib.optional stdenv.hostPlatform.isDarwin gtk-mac-integration; - doCheck = !stdenv.isDarwin; + doCheck = !stdenv.hostPlatform.isDarwin; passthru.updateScript = gitUpdater { }; diff --git a/pkgs/applications/misc/zathura/pdf-mupdf/default.nix b/pkgs/applications/misc/zathura/pdf-mupdf/default.nix index b49371b24dea..f0fd28d4a444 100644 --- a/pkgs/applications/misc/zathura/pdf-mupdf/default.nix +++ b/pkgs/applications/misc/zathura/pdf-mupdf/default.nix @@ -51,7 +51,7 @@ stdenv.mkDerivation (finalAttrs: { tesseract leptonica mujs - ] ++ lib.optional stdenv.isDarwin gtk-mac-integration; + ] ++ lib.optional stdenv.hostPlatform.isDarwin gtk-mac-integration; env.PKG_CONFIG_ZATHURA_PLUGINDIR = "lib/zathura"; diff --git a/pkgs/applications/misc/zine/default.nix b/pkgs/applications/misc/zine/default.nix index c7fb80e8318b..40d8b6160365 100644 --- a/pkgs/applications/misc/zine/default.nix +++ b/pkgs/applications/misc/zine/default.nix @@ -24,7 +24,7 @@ rustPlatform.buildRustPackage rec { buildInputs = [ openssl - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.CoreServices ]; diff --git a/pkgs/applications/networking/adguardian/default.nix b/pkgs/applications/networking/adguardian/default.nix index 21123d47e5d1..425974fee511 100644 --- a/pkgs/applications/networking/adguardian/default.nix +++ b/pkgs/applications/networking/adguardian/default.nix @@ -18,7 +18,7 @@ rustPlatform.buildRustPackage rec { cargoHash = "sha256-IPkKiXuFN0KFlcrrSjLmML+O5zCrVRKEqdyV2xBsCsg="; - buildInputs = lib.optionals stdenv.isDarwin [ + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.Security ]; diff --git a/pkgs/applications/networking/avalanchego/default.nix b/pkgs/applications/networking/avalanchego/default.nix index a845bb2bfdd8..97bf552604d4 100644 --- a/pkgs/applications/networking/avalanchego/default.nix +++ b/pkgs/applications/networking/avalanchego/default.nix @@ -20,7 +20,7 @@ buildGoModule rec { # go mod vendor has a bug, see: https://github.com/golang/go/issues/57529 proxyVendor = true; - buildInputs = lib.optionals stdenv.isDarwin [ IOKit ]; + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ IOKit ]; subPackages = [ "main" ]; diff --git a/pkgs/applications/networking/browsers/asuka/default.nix b/pkgs/applications/networking/browsers/asuka/default.nix index 1451e4bbaabd..786f11d2d743 100644 --- a/pkgs/applications/networking/browsers/asuka/default.nix +++ b/pkgs/applications/networking/browsers/asuka/default.nix @@ -16,7 +16,7 @@ rustPlatform.buildRustPackage rec { nativeBuildInputs = [ pkg-config ]; buildInputs = [ ncurses openssl ] - ++ lib.optional stdenv.isDarwin Security; + ++ lib.optional stdenv.hostPlatform.isDarwin Security; meta = with lib; { description = "Gemini Project client written in Rust with NCurses"; diff --git a/pkgs/applications/networking/browsers/brave/default.nix b/pkgs/applications/networking/browsers/brave/default.nix index 1dddb46519fc..af50ac1b7593 100644 --- a/pkgs/applications/networking/browsers/brave/default.nix +++ b/pkgs/applications/networking/browsers/brave/default.nix @@ -3,7 +3,7 @@ callPackage ./make-brave.nix (removeAttrs args [ "callPackage" ]) ( - if stdenv.isAarch64 then + if stdenv.hostPlatform.isAarch64 then rec { pname = "brave"; version = "1.70.117"; @@ -11,7 +11,7 @@ callPackage ./make-brave.nix (removeAttrs args [ "callPackage" ]) hash = "sha256-FUomXWnIbuW8H0/r+fKEmMG8qO0vBAKUS9kijCbH5Mc="; platform = "aarch64-linux"; } - else if stdenv.isx86_64 then + else if stdenv.hostPlatform.isx86_64 then rec { pname = "brave"; version = "1.70.117"; diff --git a/pkgs/applications/networking/browsers/brave/make-brave.nix b/pkgs/applications/networking/browsers/brave/make-brave.nix index 0a4345593bba..e94e1a93bf72 100644 --- a/pkgs/applications/networking/browsers/brave/make-brave.nix +++ b/pkgs/applications/networking/browsers/brave/make-brave.nix @@ -49,14 +49,14 @@ , commandLineArgs ? "" # Necessary for USB audio devices. -, pulseSupport ? stdenv.isLinux +, pulseSupport ? stdenv.hostPlatform.isLinux , libpulseaudio # For GPU acceleration support on Wayland (without the lib it doesn't seem to work) , libGL # For video acceleration via VA-API (--enable-features=VaapiVideoDecoder,VaapiVideoEncoder) -, libvaSupport ? stdenv.isLinux +, libvaSupport ? stdenv.hostPlatform.isLinux , libva , enableVideoAcceleration ? libvaSupport diff --git a/pkgs/applications/networking/browsers/chromium/default.nix b/pkgs/applications/networking/browsers/chromium/default.nix index bebb279f1a66..484cc0e4f194 100644 --- a/pkgs/applications/networking/browsers/chromium/default.nix +++ b/pkgs/applications/networking/browsers/chromium/default.nix @@ -16,7 +16,7 @@ , enableWideVine ? false , ungoogled ? false # Whether to build chromium or ungoogled-chromium , cupsSupport ? true -, pulseSupport ? config.pulseaudio or stdenv.isLinux +, pulseSupport ? config.pulseaudio or stdenv.hostPlatform.isLinux , commandLineArgs ? "" , pkgsBuildBuild , pkgs diff --git a/pkgs/applications/networking/browsers/elinks/default.nix b/pkgs/applications/networking/browsers/elinks/default.nix index 8a129f2fdab8..3dd71ab810e7 100644 --- a/pkgs/applications/networking/browsers/elinks/default.nix +++ b/pkgs/applications/networking/browsers/elinks/default.nix @@ -4,7 +4,7 @@ , # Incompatible licenses, LGPLv3 - GPLv2 enableGuile ? false, guile ? null , enablePython ? false, python ? null -, enablePerl ? (!stdenv.isDarwin) && (stdenv.hostPlatform == stdenv.buildPlatform), perl ? null +, enablePerl ? (!stdenv.hostPlatform.isDarwin) && (stdenv.hostPlatform == stdenv.buildPlatform), perl ? null # re-add javascript support when upstream supports modern spidermonkey }: @@ -26,7 +26,7 @@ stdenv.mkDerivation rec { ncurses libX11 bzip2 zlib brotli zstd xz openssl libidn tre expat libev ] - ++ lib.optional stdenv.isLinux gpm + ++ lib.optional stdenv.hostPlatform.isLinux gpm ++ lib.optional enableGuile guile ++ lib.optional enablePython python ++ lib.optional enablePerl perl diff --git a/pkgs/applications/networking/browsers/firefox/common.nix b/pkgs/applications/networking/browsers/firefox/common.nix index 3787c618a6aa..77e020ff0cea 100644 --- a/pkgs/applications/networking/browsers/firefox/common.nix +++ b/pkgs/applications/networking/browsers/firefox/common.nix @@ -94,20 +94,20 @@ in , debugBuild ? false # On 32bit platforms, we disable adding "-g" for easier linking. -, enableDebugSymbols ? !stdenv.is32bit +, enableDebugSymbols ? !stdenv.hostPlatform.is32bit ## optional libraries -, alsaSupport ? stdenv.isLinux, alsa-lib +, alsaSupport ? stdenv.hostPlatform.isLinux, alsa-lib , ffmpegSupport ? true , gssSupport ? true, libkrb5 -, jackSupport ? stdenv.isLinux, libjack2 +, jackSupport ? stdenv.hostPlatform.isLinux, libjack2 , jemallocSupport ? !stdenv.hostPlatform.isMusl, jemalloc -, ltoSupport ? (stdenv.isLinux && stdenv.is64bit && !stdenv.hostPlatform.isRiscV), overrideCC, buildPackages -, pgoSupport ? (stdenv.isLinux && stdenv.hostPlatform == stdenv.buildPlatform), xvfb-run +, ltoSupport ? (stdenv.hostPlatform.isLinux && stdenv.hostPlatform.is64bit && !stdenv.hostPlatform.isRiscV), overrideCC, buildPackages +, pgoSupport ? (stdenv.hostPlatform.isLinux && stdenv.hostPlatform == stdenv.buildPlatform), xvfb-run , pipewireSupport ? waylandSupport && webrtcSupport -, pulseaudioSupport ? stdenv.isLinux, libpulseaudio -, sndioSupport ? stdenv.isLinux, sndio +, pulseaudioSupport ? stdenv.hostPlatform.isLinux, libpulseaudio +, sndioSupport ? stdenv.hostPlatform.isLinux, sndio , waylandSupport ? true, libxkbcommon, libdrm ## privacy-related options @@ -363,7 +363,7 @@ buildStdenv.mkDerivation { # please get your own set of keys at https://location.services.mozilla.com/api. echo "dfd7836c-d458-4917-98bb-421c82d3c8a0" > $TMPDIR/mls-api-key configureFlagsArray+=("--with-mozilla-api-keyfile=$TMPDIR/mls-api-key") - '' + lib.optionalString (enableOfficialBranding && !stdenv.is32bit) '' + '' + lib.optionalString (enableOfficialBranding && !stdenv.hostPlatform.is32bit) '' export MOZILLA_OFFICIAL=1 '' + lib.optionalString (!requireSigning) '' export MOZ_REQUIRE_SIGNING= @@ -406,7 +406,7 @@ buildStdenv.mkDerivation { ] # elf-hack is broken when using clang+lld: # https://bugzilla.mozilla.org/show_bug.cgi?id=1482204 - ++ lib.optional (ltoSupport && (buildStdenv.isAarch32 || buildStdenv.isi686 || buildStdenv.isx86_64)) "--disable-elf-hack" + ++ lib.optional (ltoSupport && (buildStdenv.hostPlatform.isAarch32 || buildStdenv.hostPlatform.isi686 || buildStdenv.hostPlatform.isx86_64)) "--disable-elf-hack" ++ lib.optional (!drmSupport) "--disable-eme" ++ lib.optional (allowAddonSideload) "--allow-addon-sideload" ++ [ @@ -424,7 +424,7 @@ buildStdenv.mkDerivation { (if debugBuild then "--enable-profiling" else "--enable-optimize") # --enable-release adds -ffunction-sections & LTO that require a big amount # of RAM, and the 32-bit memory space cannot handle that linking - (enableFeature (!debugBuild && !stdenv.is32bit) "release") + (enableFeature (!debugBuild && !stdenv.hostPlatform.is32bit) "release") (enableFeature enableDebugSymbols "debug-symbols") ] ++ lib.optionals enableDebugSymbols [ "--disable-strip" "--disable-install-strip" ] @@ -540,7 +540,7 @@ buildStdenv.mkDerivation { install -Dvm644 ${distributionIni} $out/lib/${binaryName}/distribution/distribution.ini install -Dvm644 ${defaultPrefsFile} $out/lib/${binaryName}/browser/defaults/preferences/nixos-default-prefs.js - '' + lib.optionalString buildStdenv.isLinux '' + '' + lib.optionalString buildStdenv.hostPlatform.isLinux '' # Remove SDK cruft. FIXME: move to a separate output? rm -rf $out/share/idl $out/include $out/lib/${binaryName}-devel-* diff --git a/pkgs/applications/networking/browsers/firefox/wrapper.nix b/pkgs/applications/networking/browsers/firefox/wrapper.nix index bbc88581e1e5..6a34a531c7f1 100644 --- a/pkgs/applications/networking/browsers/firefox/wrapper.nix +++ b/pkgs/applications/networking/browsers/firefox/wrapper.nix @@ -86,7 +86,7 @@ let else []) ); - libs = lib.optionals stdenv.isLinux [ udev libva mesa libnotify xorg.libXScrnSaver cups pciutils ] + libs = lib.optionals stdenv.hostPlatform.isLinux [ udev libva mesa libnotify xorg.libXScrnSaver cups pciutils ] ++ lib.optional pipewireSupport pipewire ++ lib.optional ffmpegSupport ffmpeg ++ lib.optional gssSupport libkrb5 diff --git a/pkgs/applications/networking/browsers/kristall/default.nix b/pkgs/applications/networking/browsers/kristall/default.nix index 3515f0e30e01..f228c9730684 100644 --- a/pkgs/applications/networking/browsers/kristall/default.nix +++ b/pkgs/applications/networking/browsers/kristall/default.nix @@ -21,7 +21,7 @@ stdenv.mkDerivation rec { qmakeFlags = [ "src/kristall.pro" ]; - installPhase = if stdenv.isDarwin then '' + installPhase = if stdenv.hostPlatform.isDarwin then '' mkdir -p $out/Applications mv kristall.app $out/Applications '' else '' diff --git a/pkgs/applications/networking/browsers/ladybird/default.nix b/pkgs/applications/networking/browsers/ladybird/default.nix index c77e70f01aa1..60157ca26282 100644 --- a/pkgs/applications/networking/browsers/ladybird/default.nix +++ b/pkgs/applications/networking/browsers/ladybird/default.nix @@ -145,9 +145,9 @@ stdenv.mkDerivation (finalAttrs: { simdutf skia woff2 - ] ++ lib.optional stdenv.isLinux [ + ] ++ lib.optional stdenv.hostPlatform.isLinux [ qtwayland - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ AppKit Cocoa Foundation @@ -158,7 +158,7 @@ stdenv.mkDerivation (finalAttrs: { # Disable network operations "-DSERENITY_CACHE_DIR=Caches" "-DENABLE_NETWORK_DOWNLOADS=OFF" - ] ++ lib.optionals stdenv.isLinux [ + ] ++ lib.optionals stdenv.hostPlatform.isLinux [ "-DCMAKE_INSTALL_LIBEXECDIR=libexec" ]; @@ -167,14 +167,14 @@ stdenv.mkDerivation (finalAttrs: { env.NIX_CFLAGS_COMPILE = "-Wno-error"; - postInstall = lib.optionalString stdenv.isDarwin '' + postInstall = lib.optionalString stdenv.hostPlatform.isDarwin '' mkdir -p $out/Applications $out/bin mv $out/bundle/Ladybird.app $out/Applications ''; # Only Ladybird and WebContent need wrapped, if Qt is enabled. # On linux we end up wraping some non-Qt apps, like headless-browser. - dontWrapQtApps = stdenv.isDarwin; + dontWrapQtApps = stdenv.hostPlatform.isDarwin; passthru.tests = { nixosTest = nixosTests.ladybird; @@ -188,6 +188,6 @@ stdenv.mkDerivation (finalAttrs: { platforms = [ "x86_64-linux" "aarch64-linux" "x86_64-darwin" "aarch64-darwin" ]; mainProgram = "Ladybird"; # use of undeclared identifier 'NSBezelStyleAccessoryBarAction' - broken = stdenv.isDarwin; + broken = stdenv.hostPlatform.isDarwin; }; }) diff --git a/pkgs/applications/networking/browsers/lagrange/default.nix b/pkgs/applications/networking/browsers/lagrange/default.nix index 7a486ec65fe9..d6770a85138e 100644 --- a/pkgs/applications/networking/browsers/lagrange/default.nix +++ b/pkgs/applications/networking/browsers/lagrange/default.nix @@ -31,7 +31,7 @@ stdenv.mkDerivation (finalAttrs: { buildInputs = [ the-foundation ] ++ lib.optionals (!enableTUI) [ fribidi harfbuzz libwebp mpg123 SDL2 ] ++ lib.optionals enableTUI [ ncurses sealcurses ] - ++ lib.optional stdenv.isDarwin AppKit; + ++ lib.optional stdenv.hostPlatform.isDarwin AppKit; cmakeFlags = lib.optionals enableTUI [ "-DENABLE_TUI=YES" @@ -44,7 +44,7 @@ stdenv.mkDerivation (finalAttrs: { "-DCMAKE_INSTALL_DATADIR=${placeholder "out"}/share" ]; - installPhase = lib.optionalString (stdenv.isDarwin && !enableTUI) '' + installPhase = lib.optionalString (stdenv.hostPlatform.isDarwin && !enableTUI) '' mkdir -p $out/Applications mv Lagrange.app $out/Applications ''; diff --git a/pkgs/applications/networking/browsers/links2/default.nix b/pkgs/applications/networking/browsers/links2/default.nix index 9fe4fe7e37f2..12968f2f56cf 100644 --- a/pkgs/applications/networking/browsers/links2/default.nix +++ b/pkgs/applications/networking/browsers/links2/default.nix @@ -2,9 +2,9 @@ , gpm, openssl, pkg-config, libev # Misc. , libpng, libjpeg, libtiff, librsvg, libavif # graphic formats , bzip2, zlib, xz # Transfer encodings -, enableFB ? (!stdenv.isDarwin) +, enableFB ? (!stdenv.hostPlatform.isDarwin) , enableDirectFB ? false, directfb -, enableX11 ? (!stdenv.isDarwin), libX11, libXt, libXau # GUI support +, enableX11 ? (!stdenv.hostPlatform.isDarwin), libX11, libXt, libXau # GUI support }: stdenv.mkDerivation (finalAttrs: { @@ -18,7 +18,7 @@ stdenv.mkDerivation (finalAttrs: { buildInputs = [ libev librsvg libpng libjpeg libtiff libavif openssl xz bzip2 zlib ] - ++ lib.optionals stdenv.isLinux [ gpm ] + ++ lib.optionals stdenv.hostPlatform.isLinux [ gpm ] ++ lib.optionals enableX11 [ libX11 libXau libXt ] ++ lib.optionals enableDirectFB [ directfb ]; diff --git a/pkgs/applications/networking/browsers/netsurf/browser.nix b/pkgs/applications/networking/browsers/netsurf/browser.nix index cd1b78fc2980..2397145a21c4 100644 --- a/pkgs/applications/networking/browsers/netsurf/browser.nix +++ b/pkgs/applications/networking/browsers/netsurf/browser.nix @@ -107,7 +107,7 @@ stdenv.mkDerivation (finalAttrs: { env.NIX_CFLAGS_COMPILE = "-fcommon"; - env.CFLAGS = lib.optionalString stdenv.isDarwin "-D_DARWIN_C_SOURCE"; + env.CFLAGS = lib.optionalString stdenv.hostPlatform.isDarwin "-D_DARWIN_C_SOURCE"; patchPhase = lib.optionalString stdenv.cc.isClang '' runHook prePatch diff --git a/pkgs/applications/networking/browsers/qutebrowser/default.nix b/pkgs/applications/networking/browsers/qutebrowser/default.nix index 3f676ecd6cc0..64fee95385cc 100644 --- a/pkgs/applications/networking/browsers/qutebrowser/default.nix +++ b/pkgs/applications/networking/browsers/qutebrowser/default.nix @@ -3,7 +3,7 @@ , asciidoc, docbook_xml_dtd_45, docbook_xsl, libxml2 , libxslt , withPdfReader ? true -, pipewireSupport ? stdenv.isLinux +, pipewireSupport ? stdenv.hostPlatform.isLinux , pipewire , qtwayland , qtbase @@ -43,7 +43,7 @@ python3.pkgs.buildPythonApplication { buildInputs = [ qtbase glib-networking - ] ++ lib.optionals stdenv.isLinux [ + ] ++ lib.optionals stdenv.hostPlatform.isLinux [ qtwayland ]; diff --git a/pkgs/applications/networking/browsers/vivaldi/default.nix b/pkgs/applications/networking/browsers/vivaldi/default.nix index e9582cbdd985..6e6299fb556b 100644 --- a/pkgs/applications/networking/browsers/vivaldi/default.nix +++ b/pkgs/applications/networking/browsers/vivaldi/default.nix @@ -15,7 +15,7 @@ , proprietaryCodecs ? false, vivaldi-ffmpeg-codecs ? null , enableWidevine ? false, widevine-cdm ? null , commandLineArgs ? "" -, pulseSupport ? stdenv.isLinux, libpulseaudio +, pulseSupport ? stdenv.hostPlatform.isLinux, libpulseaudio , kerberosSupport ? true, libkrb5 }: @@ -62,7 +62,7 @@ in stdenv.mkDerivation rec { ++ lib.optional kerberosSupport libkrb5; libPath = lib.makeLibraryPath buildInputs - + lib.optionalString (stdenv.is64bit) + + lib.optionalString (stdenv.hostPlatform.is64bit) (":" + lib.makeSearchPathOutput "lib" "lib64" buildInputs) + ":$out/opt/${vivaldiName}/lib"; diff --git a/pkgs/applications/networking/browsers/w3m/default.nix b/pkgs/applications/networking/browsers/w3m/default.nix index 827202ae3818..8ea48ffbad99 100644 --- a/pkgs/applications/networking/browsers/w3m/default.nix +++ b/pkgs/applications/networking/browsers/w3m/default.nix @@ -1,9 +1,9 @@ { lib, stdenv, fetchFromGitHub, fetchpatch , ncurses, boehmgc, gettext, zlib , sslSupport ? true, openssl -, graphicsSupport ? !stdenv.isDarwin, imlib2 +, graphicsSupport ? !stdenv.hostPlatform.isDarwin, imlib2 , x11Support ? graphicsSupport, libX11 -, mouseSupport ? !stdenv.isDarwin, gpm-ncurses +, mouseSupport ? !stdenv.hostPlatform.isDarwin, gpm-ncurses , perl, man, pkg-config, buildPackages, w3m , testers, updateAutotoolsGnuConfigScriptsHook }: @@ -29,7 +29,7 @@ in stdenv.mkDerivation rec { hash = "sha256-upb5lWqhC1jRegzTncIz5e21v4Pw912FyVn217HucFs="; }; - NIX_LDFLAGS = lib.optionalString stdenv.isSunOS "-lsocket -lnsl"; + NIX_LDFLAGS = lib.optionalString stdenv.hostPlatform.isSunOS "-lsocket -lnsl"; # we must set these so that the generated files (e.g. w3mhelp.cgi) contain # the correct paths. diff --git a/pkgs/applications/networking/cloudflared/default.nix b/pkgs/applications/networking/cloudflared/default.nix index f2d841a419bc..5b297129c309 100644 --- a/pkgs/applications/networking/cloudflared/default.nix +++ b/pkgs/applications/networking/cloudflared/default.nix @@ -69,7 +69,7 @@ buildGoModule rec { --replace "TestManagerCtxDoneCloseSessions" "SkipManagerCtxDoneCloseSessions" ''; - doCheck = !stdenv.isDarwin; + doCheck = !stdenv.hostPlatform.isDarwin; passthru = { tests.simple = callPackage ./tests.nix { inherit version; }; diff --git a/pkgs/applications/networking/cluster/click/default.nix b/pkgs/applications/networking/cluster/click/default.nix index de8e4b38754c..a471c5827c76 100644 --- a/pkgs/applications/networking/cluster/click/default.nix +++ b/pkgs/applications/networking/cluster/click/default.nix @@ -13,10 +13,10 @@ rustPlatform.buildRustPackage rec { cargoHash = "sha256-fcJTxZX9mdF4oFl/Cn1egczRy+yhWt2zLKsdLKz6Q+s="; - nativeBuildInputs = lib.optionals stdenv.isLinux [ pkg-config ]; + nativeBuildInputs = lib.optionals stdenv.hostPlatform.isLinux [ pkg-config ]; - buildInputs = lib.optionals stdenv.isLinux [ openssl ] - ++ lib.optionals stdenv.isDarwin [ darwin.apple_sdk.frameworks.Security ]; + buildInputs = lib.optionals stdenv.hostPlatform.isLinux [ openssl ] + ++ lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.Security ]; meta = with lib; { description = ''The "Command Line Interactive Controller for Kubernetes"''; diff --git a/pkgs/applications/networking/cluster/cmctl/default.nix b/pkgs/applications/networking/cluster/cmctl/default.nix index 98fb309942ea..b103450942c7 100644 --- a/pkgs/applications/networking/cluster/cmctl/default.nix +++ b/pkgs/applications/networking/cluster/cmctl/default.nix @@ -35,7 +35,7 @@ buildGoModule rec { ]; # Trusted by this computer: no: x509: “cert-manager” certificate is not trusted - doCheck = !stdenv.isDarwin; + doCheck = !stdenv.hostPlatform.isDarwin; postInstall = '' mv $out/bin/ctl $out/bin/cmctl diff --git a/pkgs/applications/networking/cluster/hadoop/default.nix b/pkgs/applications/networking/cluster/hadoop/default.nix index 91727d4f5801..02acad93a315 100644 --- a/pkgs/applications/networking/cluster/hadoop/default.nix +++ b/pkgs/applications/networking/cluster/hadoop/default.nix @@ -31,26 +31,26 @@ let version = platformAttrs.${stdenv.system}.version or (throw "Unsupported system: ${stdenv.system}"); src = fetchurl { url = "mirror://apache/hadoop/common/hadoop-${finalAttrs.version}/hadoop-${finalAttrs.version}" - + lib.optionalString stdenv.isAarch64 "-aarch64" + ".tar.gz"; + + lib.optionalString stdenv.hostPlatform.isAarch64 "-aarch64" + ".tar.gz"; inherit (platformAttrs.${stdenv.system} or (throw "Unsupported system: ${stdenv.system}")) hash; }; doCheck = true; # Build the container executor binary from source # InstallPhase is not lazily evaluating containerExecutor for some reason - containerExecutor = if stdenv.isLinux then (callPackage ./containerExecutor.nix { + containerExecutor = if stdenv.hostPlatform.isLinux then (callPackage ./containerExecutor.nix { inherit (finalAttrs) version; inherit platformAttrs; }) else ""; nativeBuildInputs = [ makeWrapper ] - ++ lib.optionals stdenv.isLinux [ autoPatchelfHook ]; - buildInputs = lib.optionals stdenv.isLinux [ stdenv.cc.cc.lib openssl protobuf zlib snappy libtirpc ]; + ++ lib.optionals stdenv.hostPlatform.isLinux [ autoPatchelfHook ]; + buildInputs = lib.optionals stdenv.hostPlatform.isLinux [ stdenv.cc.cc.lib openssl protobuf zlib snappy libtirpc ]; installPhase = '' mkdir $out mv * $out/ - '' + lib.optionalString stdenv.isLinux '' + '' + lib.optionalString stdenv.hostPlatform.isLinux '' for n in $(find ${finalAttrs.containerExecutor}/bin -type f); do ln -sf "$n" $out/bin done diff --git a/pkgs/applications/networking/cluster/jx/default.nix b/pkgs/applications/networking/cluster/jx/default.nix index 8d8ad429cb2a..9bb95b36dad0 100644 --- a/pkgs/applications/networking/cluster/jx/default.nix +++ b/pkgs/applications/networking/cluster/jx/default.nix @@ -33,7 +33,7 @@ buildGoModule rec { passthru.updateScript = nix-update-script { }; meta = with lib; { - broken = stdenv.isDarwin; + broken = stdenv.hostPlatform.isDarwin; description = "Command line tool for installing and using Jenkins X"; mainProgram = "jx"; homepage = "https://jenkins-x.io"; diff --git a/pkgs/applications/networking/cluster/k3s/builder.nix b/pkgs/applications/networking/cluster/k3s/builder.nix index 1fb10c82dcc1..8d66882a8a97 100644 --- a/pkgs/applications/networking/cluster/k3s/builder.nix +++ b/pkgs/applications/networking/cluster/k3s/builder.nix @@ -150,9 +150,9 @@ let # a shortcut that provides the images archive for the host platform. Currently only supports # aarch64 (arm64) and x86_64 (amd64), aborts on other architectures. airgapImages = fetchurl ( - if stdenv.isAarch64 then + if stdenv.hostPlatform.isAarch64 then imagesVersions.${findImagesArchive "arm64"} - else if stdenv.isx86_64 then + else if stdenv.hostPlatform.isx86_64 then imagesVersions.${findImagesArchive "amd64"} else abort "k3s: airgap images cannot be found automatically for architecture ${stdenv.hostPlatform.linuxArch}, consider using an image archive with an explicit architecture." diff --git a/pkgs/applications/networking/cluster/k9s/default.nix b/pkgs/applications/networking/cluster/k9s/default.nix index 8e91f641a7a3..5bd085f2bb59 100644 --- a/pkgs/applications/networking/cluster/k9s/default.nix +++ b/pkgs/applications/networking/cluster/k9s/default.nix @@ -26,7 +26,7 @@ buildGoModule rec { vendorHash = "sha256-U/tIsYpoog3S8V2yQGGqaQ+Av7TfvCYt3zn74qWuQKs="; # TODO investigate why some config tests are failing - doCheck = !(stdenv.isDarwin && stdenv.isAarch64); + doCheck = !(stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isAarch64); # Required to workaround test check error: preCheck = "export HOME=$(mktemp -d)"; # For arch != x86 diff --git a/pkgs/applications/networking/cluster/kpt/default.nix b/pkgs/applications/networking/cluster/kpt/default.nix index d7aa86fd7d39..ccccec1c8562 100644 --- a/pkgs/applications/networking/cluster/kpt/default.nix +++ b/pkgs/applications/networking/cluster/kpt/default.nix @@ -23,6 +23,6 @@ buildGoModule rec { homepage = "https://googlecontainertools.github.io/kpt/"; license = licenses.asl20; maintainers = with maintainers; [ mikefaille ]; - broken = stdenv.isDarwin; + broken = stdenv.hostPlatform.isDarwin; }; } diff --git a/pkgs/applications/networking/cluster/kubectl-view-allocations/default.nix b/pkgs/applications/networking/cluster/kubectl-view-allocations/default.nix index 25e11043252b..8f912c267019 100644 --- a/pkgs/applications/networking/cluster/kubectl-view-allocations/default.nix +++ b/pkgs/applications/networking/cluster/kubectl-view-allocations/default.nix @@ -24,7 +24,7 @@ rustPlatform.buildRustPackage rec { lockFile = ./Cargo.lock; }; - buildInputs = lib.optionals stdenv.isDarwin [ Security ]; + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ Security ]; meta = with lib; { description = "kubectl plugin to list allocations (cpu, memory, gpu,... X utilization, requested, limit, allocatable,...)"; diff --git a/pkgs/applications/networking/cluster/lens/default.nix b/pkgs/applications/networking/cluster/lens/default.nix index 3e59a1fc23df..98c9ca2d1758 100644 --- a/pkgs/applications/networking/cluster/lens/default.nix +++ b/pkgs/applications/networking/cluster/lens/default.nix @@ -35,7 +35,7 @@ let platforms = builtins.attrNames sources; }; -in if stdenv.isDarwin then +in if stdenv.hostPlatform.isDarwin then callPackage ./darwin.nix { inherit pname version src meta; } else callPackage ./linux.nix { inherit pname version src meta; } diff --git a/pkgs/applications/networking/cluster/minikube/default.nix b/pkgs/applications/networking/cluster/minikube/default.nix index ad018b0b5e61..a367c8bc3aab 100644 --- a/pkgs/applications/networking/cluster/minikube/default.nix +++ b/pkgs/applications/networking/cluster/minikube/default.nix @@ -29,14 +29,14 @@ buildGoModule rec { }; postPatch = ( - lib.optionalString (withQemu && stdenv.isDarwin) '' + lib.optionalString (withQemu && stdenv.hostPlatform.isDarwin) '' substituteInPlace \ pkg/minikube/registry/drvs/qemu2/qemu2.go \ --replace "/usr/local/opt/qemu/share/qemu" "${qemu}/share/qemu" \ --replace "/opt/homebrew/opt/qemu/share/qemu" "${qemu}/share/qemu" '' ) + ( - lib.optionalString (withQemu && stdenv.isLinux) '' + lib.optionalString (withQemu && stdenv.hostPlatform.isLinux) '' substituteInPlace \ pkg/minikube/registry/drvs/qemu2/qemu2.go \ --replace "/usr/share/OVMF/OVMF_CODE.fd" "${OVMF.firmware}" \ @@ -46,7 +46,7 @@ buildGoModule rec { nativeBuildInputs = [ installShellFiles pkg-config which makeWrapper ]; - buildInputs = if stdenv.isDarwin then [ vmnet ] else if stdenv.isLinux then [ libvirt ] else null; + buildInputs = if stdenv.hostPlatform.isDarwin then [ vmnet ] else if stdenv.hostPlatform.isLinux then [ libvirt ] else null; buildPhase = '' make COMMIT=${src.rev} diff --git a/pkgs/applications/networking/cluster/node-problem-detector/default.nix b/pkgs/applications/networking/cluster/node-problem-detector/default.nix index 4daed56dd9d3..e30d89a9a34c 100644 --- a/pkgs/applications/networking/cluster/node-problem-detector/default.nix +++ b/pkgs/applications/networking/cluster/node-problem-detector/default.nix @@ -20,15 +20,15 @@ buildGoModule rec { # Linux-only feature. See 'ENABLE_JOURNALD' upstream: # https://github.com/kubernetes/node-problem-detector/blob/master/Makefile subPackages = [ "cmd/nodeproblemdetector" ] ++ - lib.optionals stdenv.isLinux [ "cmd/logcounter" ]; + lib.optionals stdenv.hostPlatform.isLinux [ "cmd/logcounter" ]; preBuild = '' - export CGO_ENABLED=${if stdenv.isLinux then "1" else "0"} + export CGO_ENABLED=${if stdenv.hostPlatform.isLinux then "1" else "0"} ''; - buildInputs = lib.optionals stdenv.isLinux [ systemd ]; + buildInputs = lib.optionals stdenv.hostPlatform.isLinux [ systemd ]; - tags = lib.optionals stdenv.isLinux [ "journald" ]; + tags = lib.optionals stdenv.hostPlatform.isLinux [ "journald" ]; ldflags = [ "-X k8s.io/${pname}/pkg/version.version=v${version}" diff --git a/pkgs/applications/networking/cluster/ocm/default.nix b/pkgs/applications/networking/cluster/ocm/default.nix index f83347d0538e..1b2b5568cdd1 100644 --- a/pkgs/applications/networking/cluster/ocm/default.nix +++ b/pkgs/applications/networking/cluster/ocm/default.nix @@ -24,7 +24,7 @@ buildGoModule rec { ''; # Tests fail in Darwin sandbox. - doCheck = !stdenv.isDarwin; + doCheck = !stdenv.hostPlatform.isDarwin; postInstall = '' installShellCompletion --cmd ocm \ diff --git a/pkgs/applications/networking/cluster/rke2/builder.nix b/pkgs/applications/networking/cluster/rke2/builder.nix index 58a9d6c629ea..21941ad8ee0a 100644 --- a/pkgs/applications/networking/cluster/rke2/builder.nix +++ b/pkgs/applications/networking/cluster/rke2/builder.nix @@ -91,7 +91,7 @@ buildGoModule rec { package = rke2; version = "v${version}"; }; - } // lib.optionalAttrs stdenv.isLinux { + } // lib.optionalAttrs stdenv.hostPlatform.isLinux { inherit (nixosTests) rke2; }; diff --git a/pkgs/applications/networking/cluster/temporal-cli/default.nix b/pkgs/applications/networking/cluster/temporal-cli/default.nix index 3e36eda8e6b2..101d3baa6c5d 100644 --- a/pkgs/applications/networking/cluster/temporal-cli/default.nix +++ b/pkgs/applications/networking/cluster/temporal-cli/default.nix @@ -41,7 +41,7 @@ let ]; # Tests fail with x86 on macOS Rosetta 2 - doCheck = !(stdenv.isDarwin && stdenv.hostPlatform.isx86_64); + doCheck = !(stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isx86_64); preCheck = '' export HOME="$(mktemp -d)" diff --git a/pkgs/applications/networking/compactor/default.nix b/pkgs/applications/networking/compactor/default.nix index 12e6f432c5bd..88f0b34fd27c 100644 --- a/pkgs/applications/networking/compactor/default.nix +++ b/pkgs/applications/networking/compactor/default.nix @@ -53,7 +53,7 @@ stdenv.mkDerivation rec { ]; enableParallelBuilding = true; - doCheck = !stdenv.isDarwin; # check-dnstap.sh failing on Darwin + doCheck = !stdenv.hostPlatform.isDarwin; # check-dnstap.sh failing on Darwin nativeCheckInputs = [ cbor-diag cddl diff --git a/pkgs/applications/networking/diswall/default.nix b/pkgs/applications/networking/diswall/default.nix index 76be6f3f75ce..356f8f622c35 100644 --- a/pkgs/applications/networking/diswall/default.nix +++ b/pkgs/applications/networking/diswall/default.nix @@ -14,7 +14,7 @@ rustPlatform.buildRustPackage rec { sha256 = "sha256-iZln/cgYGSFYwXDvD1CkQdfwBDXj897X1il1m5HfFJs="; }; - buildInputs = lib.optionals stdenv.isDarwin [ + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ Security ]; diff --git a/pkgs/applications/networking/dyndns/dyndnsc/default.nix b/pkgs/applications/networking/dyndns/dyndnsc/default.nix index d9da9e48c7fb..a4c84ee7e76a 100644 --- a/pkgs/applications/networking/dyndns/dyndnsc/default.nix +++ b/pkgs/applications/networking/dyndns/dyndnsc/default.nix @@ -48,7 +48,7 @@ python3Packages.buildPythonApplication rec { # AssertionError "test_null_dummy" ] - ++ lib.optionals stdenv.isDarwin [ + ++ lib.optionals stdenv.hostPlatform.isDarwin [ # The tests that spawn a server using Bottle cannot be run on # macOS or Windows as the default multiprocessing start method # on those platforms is 'spawn', which requires the code to be diff --git a/pkgs/applications/networking/feedreaders/newsboat/default.nix b/pkgs/applications/networking/feedreaders/newsboat/default.nix index 43f3c565d244..144634d60d03 100644 --- a/pkgs/applications/networking/feedreaders/newsboat/default.nix +++ b/pkgs/applications/networking/feedreaders/newsboat/default.nix @@ -15,7 +15,7 @@ rustPlatform.buildRustPackage rec { cargoHash = "sha256-0z3G8j0Qk0HEDUKA7fmjFfNW956rRtzKO+0ltNQR4es="; # TODO: Check if that's still needed - postPatch = lib.optionalString stdenv.isDarwin '' + postPatch = lib.optionalString stdenv.hostPlatform.isDarwin '' # Allow other ncurses versions on Darwin substituteInPlace config.sh \ --replace "ncurses5.4" "ncurses" @@ -25,10 +25,10 @@ rustPlatform.buildRustPackage rec { pkg-config asciidoctor gettext - ] ++ lib.optionals stdenv.isDarwin [ makeWrapper ncurses ]; + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ makeWrapper ncurses ]; buildInputs = [ stfl sqlite curl libxml2 json_c ncurses ] - ++ lib.optionals stdenv.isDarwin [ Security Foundation libiconv gettext ]; + ++ lib.optionals stdenv.hostPlatform.isDarwin [ Security Foundation libiconv gettext ]; postBuild = '' make -j $NIX_BUILD_CORES prefix="$out" @@ -49,7 +49,7 @@ rustPlatform.buildRustPackage rec { postInstall = '' make -j $NIX_BUILD_CORES prefix="$out" install - '' + lib.optionalString stdenv.isDarwin '' + '' + lib.optionalString stdenv.hostPlatform.isDarwin '' for prog in $out/bin/*; do wrapProgram "$prog" --prefix DYLD_LIBRARY_PATH : "${stfl}/lib" done diff --git a/pkgs/applications/networking/feedreaders/rsstail/default.nix b/pkgs/applications/networking/feedreaders/rsstail/default.nix index 524e8d76b697..cecad11a4f63 100644 --- a/pkgs/applications/networking/feedreaders/rsstail/default.nix +++ b/pkgs/applications/networking/feedreaders/rsstail/default.nix @@ -11,7 +11,7 @@ stdenv.mkDerivation { sha256 = "12p69i3g1fwlw0bds9jqsdmzkid3k5a41w31d227i7vm12wcvjf6"; }; - buildInputs = [ libmrss ] ++ lib.optionals stdenv.isDarwin [ libiconv ]; + buildInputs = [ libmrss ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ libiconv ]; postPatch = '' substituteInPlace Makefile --replace -liconv_hook "" diff --git a/pkgs/applications/networking/feedreaders/russ/default.nix b/pkgs/applications/networking/feedreaders/russ/default.nix index 832f888dcfaa..3fbaa2108d60 100644 --- a/pkgs/applications/networking/feedreaders/russ/default.nix +++ b/pkgs/applications/networking/feedreaders/russ/default.nix @@ -21,7 +21,7 @@ rustPlatform.buildRustPackage { # tests are network based :( doCheck = false; - buildInputs = lib.optionals stdenv.isDarwin (with darwin.apple_sdk.frameworks; [ + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin (with darwin.apple_sdk.frameworks; [ CoreServices AppKit ]); diff --git a/pkgs/applications/networking/feedreaders/tuifeed/default.nix b/pkgs/applications/networking/feedreaders/tuifeed/default.nix index 0465fc31cf64..16bb0324d07a 100644 --- a/pkgs/applications/networking/feedreaders/tuifeed/default.nix +++ b/pkgs/applications/networking/feedreaders/tuifeed/default.nix @@ -16,7 +16,7 @@ rustPlatform.buildRustPackage rec { cargoHash = "sha256-QKSNbpVRtSKp2q1jVPYTS8XCMtQAyg3AWvD/6+OjI7Y="; - buildInputs = lib.optionals stdenv.isDarwin [ Security ]; + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ Security ]; doCheck = false; diff --git a/pkgs/applications/networking/ftp/filezilla/default.nix b/pkgs/applications/networking/ftp/filezilla/default.nix index 10cf454dc659..e8a1f90fbfa8 100644 --- a/pkgs/applications/networking/ftp/filezilla/default.nix +++ b/pkgs/applications/networking/ftp/filezilla/default.nix @@ -50,9 +50,9 @@ stdenv.mkDerivation rec { wxGTK32 gtk3 xdg-utils - ] ++ lib.optionals stdenv.isDarwin [ CoreServices Security ]; + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ CoreServices Security ]; - preBuild = lib.optionalString (stdenv.isDarwin) '' + preBuild = lib.optionalString (stdenv.hostPlatform.isDarwin) '' export MACOSX_DEPLOYMENT_TARGET=11.0 ''; diff --git a/pkgs/applications/networking/gdrive3/default.nix b/pkgs/applications/networking/gdrive3/default.nix index 4e7fea129654..3fc7af9b1417 100644 --- a/pkgs/applications/networking/gdrive3/default.nix +++ b/pkgs/applications/networking/gdrive3/default.nix @@ -23,7 +23,7 @@ rustPlatform.buildRustPackage rec { }; }; - buildInputs = lib.optionals stdenv.isDarwin [ + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.Security ]; diff --git a/pkgs/applications/networking/gopher/phetch/default.nix b/pkgs/applications/networking/gopher/phetch/default.nix index 9f835c8535e2..a74f94eceb60 100644 --- a/pkgs/applications/networking/gopher/phetch/default.nix +++ b/pkgs/applications/networking/gopher/phetch/default.nix @@ -26,7 +26,7 @@ rustPlatform.buildRustPackage rec { cargoHash = "sha256-y3Y5PnZ51Zc3LmVTijUGnb0KaGm28sWOSYxjuM3A1Zk="; nativeBuildInputs = [ installShellFiles pkg-config scdoc which ]; - buildInputs = [ openssl ] ++ lib.optionals stdenv.isDarwin [ Security ]; + buildInputs = [ openssl ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ Security ]; postInstall = '' make manual diff --git a/pkgs/applications/networking/gopher/sacc/default.nix b/pkgs/applications/networking/gopher/sacc/default.nix index dc4ed20d7204..92907d8a110d 100644 --- a/pkgs/applications/networking/gopher/sacc/default.nix +++ b/pkgs/applications/networking/gopher/sacc/default.nix @@ -15,7 +15,7 @@ stdenv.mkDerivation rec { buildInputs = [ ncurses libressl ]; - CFLAGS = lib.optionals stdenv.isDarwin [ + CFLAGS = lib.optionals stdenv.hostPlatform.isDarwin [ "-D_DARWIN_C_SOURCE" ]; diff --git a/pkgs/applications/networking/ids/suricata/default.nix b/pkgs/applications/networking/ids/suricata/default.nix index 14dbdacd7210..f654a96cb75d 100644 --- a/pkgs/applications/networking/ids/suricata/default.nix +++ b/pkgs/applications/networking/ids/suricata/default.nix @@ -80,7 +80,7 @@ stdenv.mkDerivation rec { enableParallelBuilding = true; - patches = lib.optional stdenv.is64bit ./bpf_stubs_workaround.patch; + patches = lib.optional stdenv.hostPlatform.is64bit ./bpf_stubs_workaround.patch; postPatch = '' substituteInPlace ./configure \ diff --git a/pkgs/applications/networking/ids/zeek/broker/default.nix b/pkgs/applications/networking/ids/zeek/broker/default.nix index 49a13cdb2623..0fcdd5048c0e 100644 --- a/pkgs/applications/networking/ids/zeek/broker/default.nix +++ b/pkgs/applications/networking/ids/zeek/broker/default.nix @@ -62,7 +62,7 @@ stdenv.mkDerivation rec { ./0001-Fix-include-path-in-exported-CMake-targets.patch ]; - postPatch = lib.optionalString stdenv.isDarwin '' + postPatch = lib.optionalString stdenv.hostPlatform.isDarwin '' substituteInPlace bindings/python/CMakeLists.txt --replace " -u -r" "" ''; @@ -76,7 +76,7 @@ stdenv.mkDerivation rec { "-DPY_MOD_INSTALL_DIR=${placeholder "py"}/${python3.sitePackages}/" ]; - env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.isDarwin "-faligned-allocation"; + env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.hostPlatform.isDarwin "-faligned-allocation"; meta = with lib; { description = "Zeek's Messaging Library"; diff --git a/pkgs/applications/networking/ids/zeek/default.nix b/pkgs/applications/networking/ids/zeek/default.nix index e1ac462330c2..8286c46bcb48 100644 --- a/pkgs/applications/networking/ids/zeek/default.nix +++ b/pkgs/applications/networking/ids/zeek/default.nix @@ -58,9 +58,9 @@ stdenv.mkDerivation rec { openssl zlib python - ] ++ lib.optionals stdenv.isLinux [ + ] ++ lib.optionals stdenv.hostPlatform.isLinux [ libkqueue - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ gettext ]; @@ -78,11 +78,11 @@ stdenv.mkDerivation rec { "-DZEEK_STATE_DIR=/var/lib/zeek" "-DZEEK_SPOOL_DIR=/var/spool/zeek" "-DDISABLE_JAVASCRIPT=ON" - ] ++ lib.optionals stdenv.isLinux [ + ] ++ lib.optionals stdenv.hostPlatform.isLinux [ "-DLIBKQUEUE_ROOT_DIR=${libkqueue}" ]; - env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.isDarwin "-faligned-allocation"; + env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.hostPlatform.isDarwin "-faligned-allocation"; postInstall = '' for file in $out/share/zeek/base/frameworks/notice/actions/pp-alarms.zeek $out/share/zeek/base/frameworks/notice/main.zeek; do diff --git a/pkgs/applications/networking/instant-messengers/caprine-bin/default.nix b/pkgs/applications/networking/instant-messengers/caprine-bin/default.nix index cadfe432b297..f82ae2ac4220 100644 --- a/pkgs/applications/networking/instant-messengers/caprine-bin/default.nix +++ b/pkgs/applications/networking/instant-messengers/caprine-bin/default.nix @@ -18,7 +18,7 @@ let sha256 = "sha256-WMT4yrLjDSMsI/lFbYODu3/0whcF+++4ShoChfMyLfQ="; }; in -(if stdenvNoCC.isDarwin then x86_64-dmg else x86_64-appimage).overrideAttrs (oldAttrs: { +(if stdenvNoCC.hostPlatform.isDarwin then x86_64-dmg else x86_64-appimage).overrideAttrs (oldAttrs: { passthru = (oldAttrs.passthru or { }) // { inherit x86_64-appimage x86_64-dmg; }; meta = oldAttrs.meta // { platforms = x86_64-appimage.meta.platforms ++ x86_64-dmg.meta.platforms; diff --git a/pkgs/applications/networking/instant-messengers/chatterino2/default.nix b/pkgs/applications/networking/instant-messengers/chatterino2/default.nix index ca8a163fd566..be7862611f19 100644 --- a/pkgs/applications/networking/instant-messengers/chatterino2/default.nix +++ b/pkgs/applications/networking/instant-messengers/chatterino2/default.nix @@ -20,11 +20,11 @@ stdenv.mkDerivation rec { boost openssl libsecret - ] ++ lib.optionals stdenv.isLinux [ + ] ++ lib.optionals stdenv.hostPlatform.isLinux [ qt6.qtwayland ]; cmakeFlags = [ "-DBUILD_WITH_QT6=ON" ]; - postInstall = lib.optionalString stdenv.isDarwin '' + postInstall = lib.optionalString stdenv.hostPlatform.isDarwin '' mkdir -p "$out/Applications" mv bin/chatterino.app "$out/Applications/" '' + '' diff --git a/pkgs/applications/networking/instant-messengers/dino/default.nix b/pkgs/applications/networking/instant-messengers/dino/default.nix index b818baa89930..dd5f8f54c745 100644 --- a/pkgs/applications/networking/instant-messengers/dino/default.nix +++ b/pkgs/applications/networking/instant-messengers/dino/default.nix @@ -94,7 +94,7 @@ stdenv.mkDerivation (finalAttrs: { ]; # Undefined symbols for architecture arm64: "_gpg_strerror" - NIX_LDFLAGS = lib.optionalString stdenv.isDarwin "-lgpg-error"; + NIX_LDFLAGS = lib.optionalString stdenv.hostPlatform.isDarwin "-lgpg-error"; doCheck = true; checkPhase = '' @@ -112,7 +112,7 @@ stdenv.mkDerivation (finalAttrs: { # will load # # See https://github.com/dino/dino/wiki/macOS - postFixup = lib.optionalString (stdenv.isDarwin) '' + postFixup = lib.optionalString (stdenv.hostPlatform.isDarwin) '' cd "$out/lib/dino/plugins/" for f in *.dylib; do mv "$f" "$(basename "$f" .dylib).so" diff --git a/pkgs/applications/networking/instant-messengers/discord/default.nix b/pkgs/applications/networking/instant-messengers/discord/default.nix index d095b53185f9..939716d9b52d 100644 --- a/pkgs/applications/networking/instant-messengers/discord/default.nix +++ b/pkgs/applications/networking/instant-messengers/discord/default.nix @@ -1,7 +1,7 @@ { branch ? "stable", callPackage, fetchurl, lib, stdenv }: let versions = - if stdenv.isLinux then { + if stdenv.hostPlatform.isLinux then { stable = "0.0.67"; ptb = "0.0.105"; canary = "0.0.492"; @@ -65,7 +65,7 @@ let mainProgram = "discord"; }; package = - if stdenv.isLinux + if stdenv.hostPlatform.isLinux then ./linux.nix else ./darwin.nix; @@ -85,17 +85,17 @@ let }; ptb = rec { pname = "discord-ptb"; - binaryName = if stdenv.isLinux then "DiscordPTB" else desktopName; + binaryName = if stdenv.hostPlatform.isLinux then "DiscordPTB" else desktopName; desktopName = "Discord PTB"; }; canary = rec { pname = "discord-canary"; - binaryName = if stdenv.isLinux then "DiscordCanary" else desktopName; + binaryName = if stdenv.hostPlatform.isLinux then "DiscordCanary" else desktopName; desktopName = "Discord Canary"; }; development = rec { pname = "discord-development"; - binaryName = if stdenv.isLinux then "DiscordDevelopment" else desktopName; + binaryName = if stdenv.hostPlatform.isLinux then "DiscordDevelopment" else desktopName; desktopName = "Discord Development"; }; } diff --git a/pkgs/applications/networking/instant-messengers/element/element-desktop.nix b/pkgs/applications/networking/instant-messengers/element/element-desktop.nix index 37393681224b..fc40e11dca16 100644 --- a/pkgs/applications/networking/instant-messengers/element/element-desktop.nix +++ b/pkgs/applications/networking/instant-messengers/element/element-desktop.nix @@ -42,7 +42,7 @@ stdenv.mkDerivation (finalAttrs: builtins.removeAttrs pinData [ "hashes" ] // { }; nativeBuildInputs = [ yarn fixup-yarn-lock nodejs makeWrapper jq ] - ++ lib.optionals stdenv.isDarwin [ desktopToDarwinBundle ]; + ++ lib.optionals stdenv.hostPlatform.isDarwin [ desktopToDarwinBundle ]; inherit seshat; @@ -125,7 +125,7 @@ stdenv.mkDerivation (finalAttrs: builtins.removeAttrs pinData [ "hashes" ] // { mimeTypes = [ "x-scheme-handler/element" ]; }; - postFixup = lib.optionalString stdenv.isDarwin '' + postFixup = lib.optionalString stdenv.hostPlatform.isDarwin '' cp build/icon.icns $out/Applications/Element.app/Contents/Resources/element.icns ''; diff --git a/pkgs/applications/networking/instant-messengers/element/keytar/default.nix b/pkgs/applications/networking/instant-messengers/element/keytar/default.nix index 7d17d582762a..958a80fb4743 100644 --- a/pkgs/applications/networking/instant-messengers/element/keytar/default.nix +++ b/pkgs/applications/networking/instant-messengers/element/keytar/default.nix @@ -19,10 +19,10 @@ in stdenv.mkDerivation rec { nodejs python3 pkg-config npmHooks.npmConfigHook ] - ++ lib.optional stdenv.isDarwin xcbuild; + ++ lib.optional stdenv.hostPlatform.isDarwin xcbuild; - buildInputs = lib.optionals (!stdenv.isDarwin) [ libsecret ] - ++ lib.optionals stdenv.isDarwin [ Security AppKit ]; + buildInputs = lib.optionals (!stdenv.hostPlatform.isDarwin) [ libsecret ] + ++ lib.optionals stdenv.hostPlatform.isDarwin [ Security AppKit ]; npmDeps = fetchNpmDeps { inherit src; diff --git a/pkgs/applications/networking/instant-messengers/element/seshat/default.nix b/pkgs/applications/networking/instant-messengers/element/seshat/default.nix index bc163fb50a89..e8e88491c2cc 100644 --- a/pkgs/applications/networking/instant-messengers/element/seshat/default.nix +++ b/pkgs/applications/networking/instant-messengers/element/seshat/default.nix @@ -17,7 +17,7 @@ in rustPlatform.buildRustPackage rec { sourceRoot = "${src.name}/seshat-node/native"; nativeBuildInputs = [ nodejs python3 yarn fixup-yarn-lock ]; - buildInputs = [ sqlcipher ] ++ lib.optional stdenv.isDarwin CoreServices; + buildInputs = [ sqlcipher ] ++ lib.optional stdenv.hostPlatform.isDarwin CoreServices; npm_config_nodedir = nodejs; diff --git a/pkgs/applications/networking/instant-messengers/freetalk/default.nix b/pkgs/applications/networking/instant-messengers/freetalk/default.nix index e259c6b60f8d..b71395ad93bb 100644 --- a/pkgs/applications/networking/instant-messengers/freetalk/default.nix +++ b/pkgs/applications/networking/instant-messengers/freetalk/default.nix @@ -15,11 +15,11 @@ stdenv.mkDerivation rec { buildInputs = [ guile glib loudmouth gmp libidn readline libtool libunwind ncurses curl jansson - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ argp-standalone ]; - env.NIX_LDFLAGS = lib.optionalString stdenv.isDarwin "-largp"; + env.NIX_LDFLAGS = lib.optionalString stdenv.hostPlatform.isDarwin "-largp"; meta = with lib; { description = "Console XMPP client"; diff --git a/pkgs/applications/networking/instant-messengers/go-neb/default.nix b/pkgs/applications/networking/instant-messengers/go-neb/default.nix index 82cfb3126c86..6b4528dfe289 100644 --- a/pkgs/applications/networking/instant-messengers/go-neb/default.nix +++ b/pkgs/applications/networking/instant-messengers/go-neb/default.nix @@ -21,7 +21,7 @@ buildGoModule { passthru.tests.go-neb = nixosTests.go-neb; meta = with lib; { - broken = stdenv.isDarwin; + broken = stdenv.hostPlatform.isDarwin; description = "Extensible matrix bot written in Go"; mainProgram = "go-neb"; homepage = "https://github.com/matrix-org/go-neb"; diff --git a/pkgs/applications/networking/instant-messengers/gomuks/default.nix b/pkgs/applications/networking/instant-messengers/gomuks/default.nix index 64b971b2353b..510f577a50e9 100644 --- a/pkgs/applications/networking/instant-messengers/gomuks/default.nix +++ b/pkgs/applications/networking/instant-messengers/gomuks/default.nix @@ -42,7 +42,7 @@ buildGoModule rec { }/* $out/ substituteAllInPlace $out/share/applications/* wrapProgram $out/bin/gomuks \ - --prefix PATH : "${lib.makeBinPath (lib.optionals stdenv.isLinux [ libnotify pulseaudio ])}" \ + --prefix PATH : "${lib.makeBinPath (lib.optionals stdenv.hostPlatform.isLinux [ libnotify pulseaudio ])}" \ --set-default GOMUKS_SOUND_NORMAL "${sound-theme-freedesktop}/share/sounds/freedesktop/stereo/message-new-instant.oga" \ --set-default GOMUKS_SOUND_CRITICAL "${sound-theme-freedesktop}/share/sounds/freedesktop/stereo/complete.oga" ''; diff --git a/pkgs/applications/networking/instant-messengers/gurk-rs/default.nix b/pkgs/applications/networking/instant-messengers/gurk-rs/default.nix index 7d934aabbc65..ae7001fe7bf9 100644 --- a/pkgs/applications/networking/instant-messengers/gurk-rs/default.nix +++ b/pkgs/applications/networking/instant-messengers/gurk-rs/default.nix @@ -38,9 +38,9 @@ rustPlatform.buildRustPackage rec { nativeBuildInputs = [ protobuf pkg-config ]; buildInputs = [ openssl ] - ++ lib.optionals stdenv.isDarwin [ Cocoa ]; + ++ lib.optionals stdenv.hostPlatform.isDarwin [ Cocoa ]; - NIX_LDFLAGS = lib.optionals (stdenv.isDarwin && stdenv.isx86_64) [ "-framework" "AppKit" ]; + NIX_LDFLAGS = lib.optionals (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isx86_64) [ "-framework" "AppKit" ]; PROTOC = "${pkgsBuildHost.protobuf}/bin/protoc"; diff --git a/pkgs/applications/networking/instant-messengers/iamb/default.nix b/pkgs/applications/networking/instant-messengers/iamb/default.nix index 655a20c12ac6..02a632a9f4b1 100644 --- a/pkgs/applications/networking/instant-messengers/iamb/default.nix +++ b/pkgs/applications/networking/instant-messengers/iamb/default.nix @@ -20,7 +20,7 @@ rustPlatform.buildRustPackage rec { cargoHash = "sha256-a5y8nNFixOxJPNDOzvFFRqVrY2jsirCud2ZJJ8OvRhQ="; nativeBuildInputs = [ installShellFiles ]; - buildInputs = lib.optionals stdenv.isDarwin [ + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.AppKit darwin.apple_sdk.frameworks.Cocoa ]; diff --git a/pkgs/applications/networking/instant-messengers/jami/default.nix b/pkgs/applications/networking/instant-messengers/jami/default.nix index 313d45a98239..a3df5958beb6 100644 --- a/pkgs/applications/networking/instant-messengers/jami/default.nix +++ b/pkgs/applications/networking/instant-messengers/jami/default.nix @@ -110,7 +110,7 @@ stdenv.mkDerivation rec { "--disable-resample" "--disable-libwebrtc" "--with-gnutls=yes" - ] ++ lib.optionals stdenv.isLinux [ "--enable-epoll" ]; + ] ++ lib.optionals stdenv.hostPlatform.isLinux [ "--enable-epoll" ]; buildInputs = old.buildInputs ++ [ gnutls ]; }); diff --git a/pkgs/applications/networking/instant-messengers/jitsi-meet-electron/default.nix b/pkgs/applications/networking/instant-messengers/jitsi-meet-electron/default.nix index 88b9baeacf26..619759df2f00 100644 --- a/pkgs/applications/networking/instant-messengers/jitsi-meet-electron/default.nix +++ b/pkgs/applications/networking/instant-messengers/jitsi-meet-electron/default.nix @@ -30,18 +30,18 @@ buildNpmPackage rec { nativeBuildInputs = [ makeWrapper - ] ++ lib.optionals stdenv.isLinux [ + ] ++ lib.optionals stdenv.hostPlatform.isLinux [ copyDesktopItems ]; # robotjs node-gyp dependencies - buildInputs = lib.optionals stdenv.isLinux [ + buildInputs = lib.optionals stdenv.hostPlatform.isLinux [ libpng libX11 libXi libXtst zlib - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ Carbon CoreFoundation ApplicationServices @@ -84,7 +84,7 @@ buildNpmPackage rec { installPhase = '' runHook preInstall - ${lib.optionalString stdenv.isLinux '' + ${lib.optionalString stdenv.hostPlatform.isLinux '' mkdir -p $out/share/jitsi-meet-electron cp -r dist/*-unpacked/{locales,resources{,.pak}} $out/share/jitsi-meet-electron @@ -97,7 +97,7 @@ buildNpmPackage rec { install -Dm644 resources/icons/512x512.png $out/share/icons/hicolor/512x512/apps/jitsi-meet-electron.png ''} - ${lib.optionalString stdenv.isDarwin '' + ${lib.optionalString stdenv.hostPlatform.isDarwin '' mkdir -p $out/Applications cp -r dist/mac*/"Jitsi Meet.app" $out/Applications makeWrapper "$out/Applications/Jitsi Meet.app/Contents/MacOS/Jitsi Meet" $out/bin/jitsi-meet-electron diff --git a/pkgs/applications/networking/instant-messengers/mikutter/default.nix b/pkgs/applications/networking/instant-messengers/mikutter/default.nix index 3938d03447f8..eeb5f582f25c 100644 --- a/pkgs/applications/networking/instant-messengers/mikutter/default.nix +++ b/pkgs/applications/networking/instant-messengers/mikutter/default.nix @@ -79,18 +79,18 @@ with mikutterPaths; stdenv.mkDerivation rec { }; nativeBuildInputs = [ copyDesktopItems wrapGAppsHook3 gobject-introspection ] - ++ lib.optionals stdenv.isDarwin [ libicns ]; + ++ lib.optionals stdenv.hostPlatform.isDarwin [ libicns ]; buildInputs = [ atk gtk2 libnotify which # some plugins use it at runtime wrappedRuby - ] ++ lib.optionals stdenv.isLinux [ alsa-utils ]; + ] ++ lib.optionals stdenv.hostPlatform.isLinux [ alsa-utils ]; scriptPath = lib.makeBinPath ( [ wrappedRuby libnotify which ] - ++ lib.optionals stdenv.isLinux [ alsa-utils ] + ++ lib.optionals stdenv.hostPlatform.isLinux [ alsa-utils ] ); postUnpack = '' @@ -123,7 +123,7 @@ with mikutterPaths; stdenv.mkDerivation rec { let infoPlist = mkInfoPlist { inherit version; }; in - lib.optionalString stdenv.isDarwin '' + lib.optionalString stdenv.hostPlatform.isDarwin '' mkdir -p ${appBinDir} ${appResourceDir} install -Dm644 ${infoPlist} ${appPrefixDir}/Info.plist ln -s $out/bin/mikutter ${appBinDir}/mikutter diff --git a/pkgs/applications/networking/instant-messengers/nchat/default.nix b/pkgs/applications/networking/instant-messengers/nchat/default.nix index 0e3c7f6803fb..b9183b2d7645 100644 --- a/pkgs/applications/networking/instant-messengers/nchat/default.nix +++ b/pkgs/applications/networking/instant-messengers/nchat/default.nix @@ -28,7 +28,7 @@ stdenv.mkDerivation rec { readline sqlite zlib - ] ++ lib.optionals stdenv.isDarwin [ AppKit Cocoa Foundation ]; + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ AppKit Cocoa Foundation ]; cmakeFlags = [ "-DHAS_WHATSAPP=OFF" # go module build required diff --git a/pkgs/applications/networking/instant-messengers/pantalaimon/default.nix b/pkgs/applications/networking/instant-messengers/pantalaimon/default.nix index 3255b99cf706..8a6391892ae4 100644 --- a/pkgs/applications/networking/instant-messengers/pantalaimon/default.nix +++ b/pkgs/applications/networking/instant-messengers/pantalaimon/default.nix @@ -71,7 +71,7 @@ python3Packages.buildPythonApplication rec { ]; # darwin has difficulty communicating with server, fails some integration tests - doCheck = !stdenv.isDarwin; + doCheck = !stdenv.hostPlatform.isDarwin; postInstall = '' installManPage docs/man/*.[1-9] diff --git a/pkgs/applications/networking/instant-messengers/pidgin/default.nix b/pkgs/applications/networking/instant-messengers/pidgin/default.nix index 9300a73b175d..c2c8f98251b6 100644 --- a/pkgs/applications/networking/instant-messengers/pidgin/default.nix +++ b/pkgs/applications/networking/instant-messengers/pidgin/default.nix @@ -79,14 +79,14 @@ let ] ++ lib.optional withOpenssl openssl ++ lib.optionals withGnutls [ gnutls libgcrypt ] - ++ lib.optionals stdenv.isLinux [ gtk2 gtkspell2 farstream ] - ++ lib.optional stdenv.isDarwin gtk2-x11; + ++ lib.optionals stdenv.hostPlatform.isLinux [ gtk2 gtkspell2 farstream ] + ++ lib.optional stdenv.hostPlatform.isDarwin gtk2-x11; propagatedBuildInputs = [ pkg-config gettext ] ++ (with perlPackages; [ perl XMLParser ]) - ++ lib.optional stdenv.isLinux gtk2 - ++ lib.optional stdenv.isDarwin gtk2-x11; + ++ lib.optional stdenv.hostPlatform.isLinux gtk2 + ++ lib.optional stdenv.hostPlatform.isDarwin gtk2-x11; patches = [ ./add-search-path.patch @@ -107,7 +107,7 @@ let ] ++ lib.optionals withCyrus_sasl [ "--enable-cyrus-sasl=yes" ] ++ lib.optionals withGnutls [ "--enable-gnutls=yes" "--enable-nss=no" ] - ++ lib.optionals stdenv.isDarwin [ "--disable-gtkspell" "--disable-vv" ] + ++ lib.optionals stdenv.hostPlatform.isDarwin [ "--disable-gtkspell" "--disable-vv" ] ++ lib.optionals stdenv.cc.isClang [ "CFLAGS=-Wno-error=int-conversion" ]; enableParallelBuilding = true; @@ -121,7 +121,7 @@ let # In particular, this detects missing python imports in some of the tools. postFixup = let # TODO: python is a script, so it doesn't work as interpreter on darwin - binsToTest = lib.optionalString stdenv.isLinux "purple-remote," + "pidgin,finch"; + binsToTest = lib.optionalString stdenv.hostPlatform.isLinux "purple-remote," + "pidgin,finch"; in lib.optionalString doInstallCheck '' for f in "''${!outputBin}"/bin/{${binsToTest}}; do echo "Testing: $f --help" diff --git a/pkgs/applications/networking/instant-messengers/pidgin/pidgin-plugins/tdlib-purple/default.nix b/pkgs/applications/networking/instant-messengers/pidgin/pidgin-plugins/tdlib-purple/default.nix index 1a1fd3b409a6..26c67b070e5e 100644 --- a/pkgs/applications/networking/instant-messengers/pidgin/pidgin-plugins/tdlib-purple/default.nix +++ b/pkgs/applications/networking/instant-messengers/pidgin/pidgin-plugins/tdlib-purple/default.nix @@ -29,7 +29,7 @@ stdenv.mkDerivation rec { cmakeFlags = [ "-DNoVoip=True" ]; # libtgvoip required - env.NIX_CFLAGS_COMPILE = toString (lib.optionals (stdenv.isDarwin && stdenv.isAarch64) [ "-U__ARM_NEON__" ]); + env.NIX_CFLAGS_COMPILE = toString (lib.optionals (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isAarch64) [ "-U__ARM_NEON__" ]); meta = with lib; { homepage = "https://github.com/ars3niy/tdlib-purple"; diff --git a/pkgs/applications/networking/instant-messengers/qtox/default.nix b/pkgs/applications/networking/instant-messengers/qtox/default.nix index 09240ae4713b..84b24dab2de7 100644 --- a/pkgs/applications/networking/instant-messengers/qtox/default.nix +++ b/pkgs/applications/networking/instant-messengers/qtox/default.nix @@ -53,10 +53,10 @@ mkDerivation rec { pcre qrencode sqlcipher - ] ++ lib.optionals stdenv.isDarwin [ AVFoundation ]; + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ AVFoundation ]; nativeBuildInputs = [ cmake pkg-config qttools ] - ++ lib.optionals stdenv.isDarwin [ perl ]; + ++ lib.optionals stdenv.hostPlatform.isDarwin [ perl ]; cmakeFlags = [ "-DGIT_DESCRIBE=v${version}" @@ -67,7 +67,7 @@ mkDerivation rec { ]; meta = with lib; { - broken = stdenv.isDarwin; + broken = stdenv.hostPlatform.isDarwin; description = "Qt Tox client"; mainProgram = "qtox"; homepage = "https://tox.chat"; diff --git a/pkgs/applications/networking/instant-messengers/quaternion/default.nix b/pkgs/applications/networking/instant-messengers/quaternion/default.nix index 2a0bfce75631..ef6bc08616c5 100644 --- a/pkgs/applications/networking/instant-messengers/quaternion/default.nix +++ b/pkgs/applications/networking/instant-messengers/quaternion/default.nix @@ -49,7 +49,7 @@ stdenv.mkDerivation (finalAttrs: { ]; postInstall = - if stdenv.isDarwin then '' + if stdenv.hostPlatform.isDarwin then '' mkdir -p $out/Applications mv $out/bin/quaternion.app $out/Applications rmdir $out/bin || : diff --git a/pkgs/applications/networking/instant-messengers/signal-cli/default.nix b/pkgs/applications/networking/instant-messengers/signal-cli/default.nix index 17aef03835bd..d20ef1f1817e 100644 --- a/pkgs/applications/networking/instant-messengers/signal-cli/default.nix +++ b/pkgs/applications/networking/instant-messengers/signal-cli/default.nix @@ -10,14 +10,14 @@ stdenv.mkDerivation rec { hash = "sha256-OTKXLcLktWiSdRhGe7ioL2ViJQQcCjR1+2LlGoMnSgE="; }; - buildInputs = lib.optionals stdenv.isLinux [ libmatthew_java dbus dbus_java ]; + buildInputs = lib.optionals stdenv.hostPlatform.isLinux [ libmatthew_java dbus dbus_java ]; nativeBuildInputs = [ makeWrapper ]; installPhase = '' mkdir -p $out/bin cp -r lib $out/lib cp bin/signal-cli $out/bin/signal-cli - '' + (if stdenv.isLinux then '' + '' + (if stdenv.hostPlatform.isLinux then '' makeWrapper ${openjdk21_headless}/bin/java $out/bin/signal-cli \ --set JAVA_HOME "${openjdk21_headless}" \ --add-flags "-classpath '$out/lib/*:${libmatthew_java}/lib/jni'" \ @@ -36,7 +36,7 @@ stdenv.mkDerivation rec { # /System/Library/Frameworks/Cocoa.framework/Versions/A/Cocoa: file system sandbox blocked stat() # /System/Library/Frameworks/Cocoa.framework/Versions/A/Cocoa: file system sandbox blocked stat() # /nix/store/in41dz8byyyz4c0w132l7mqi43liv4yr-stdenv-darwin/setup: line 1310: 2231 Abort trap: 6 signal-cli --version - doInstallCheck = stdenv.isLinux; + doInstallCheck = stdenv.hostPlatform.isLinux; installCheckPhase = '' export PATH=$PATH:$out/bin diff --git a/pkgs/applications/networking/instant-messengers/signalbackup-tools/default.nix b/pkgs/applications/networking/instant-messengers/signalbackup-tools/default.nix index 7e381c1205f5..a6a6fe89aadd 100644 --- a/pkgs/applications/networking/instant-messengers/signalbackup-tools/default.nix +++ b/pkgs/applications/networking/instant-messengers/signalbackup-tools/default.nix @@ -25,16 +25,16 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ cmake - ] ++ lib.optionals stdenv.isLinux [ + ] ++ lib.optionals stdenv.hostPlatform.isLinux [ pkg-config ]; buildInputs = [ openssl sqlite - ] ++ lib.optionals stdenv.isLinux [ + ] ++ lib.optionals stdenv.hostPlatform.isLinux [ dbus - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk_11_0.frameworks.Security ]; diff --git a/pkgs/applications/networking/instant-messengers/slack/default.nix b/pkgs/applications/networking/instant-messengers/slack/default.nix index 125691639586..9359480b0efb 100644 --- a/pkgs/applications/networking/instant-messengers/slack/default.nix +++ b/pkgs/applications/networking/instant-messengers/slack/default.nix @@ -207,6 +207,6 @@ let ''; }; in -if stdenv.isDarwin +if stdenv.hostPlatform.isDarwin then darwin else linux diff --git a/pkgs/applications/networking/instant-messengers/teamspeak/server.nix b/pkgs/applications/networking/instant-messengers/teamspeak/server.nix index 577589f6a40b..f77da2638c3d 100644 --- a/pkgs/applications/networking/instant-messengers/teamspeak/server.nix +++ b/pkgs/applications/networking/instant-messengers/teamspeak/server.nix @@ -1,14 +1,14 @@ { lib, stdenv, fetchurl, postgresql, autoPatchelfHook, writeScript }: let - arch = if stdenv.is64bit then "amd64" else "x86"; + arch = if stdenv.hostPlatform.is64bit then "amd64" else "x86"; in stdenv.mkDerivation rec { pname = "teamspeak-server"; version = "3.13.7"; src = fetchurl { url = "https://files.teamspeak-services.com/releases/server/${version}/teamspeak3-server_linux_${arch}-${version}.tar.bz2"; - sha256 = if stdenv.is64bit + sha256 = if stdenv.hostPlatform.is64bit then "sha256-d1pXMamAmAHkyPkGbNm8ViobNoVTE5wSSfKgdA1QBB4=" else "sha256-aMEDOnvBeKfzG8lDFhU8I5DYgG53IsCDBMV2MUyJi2g="; }; diff --git a/pkgs/applications/networking/instant-messengers/telegram/kotatogram-desktop/default.nix b/pkgs/applications/networking/instant-messengers/telegram/kotatogram-desktop/default.nix index b19e3efa8ac7..102500c1c41b 100644 --- a/pkgs/applications/networking/instant-messengers/telegram/kotatogram-desktop/default.nix +++ b/pkgs/applications/networking/instant-messengers/telegram/kotatogram-desktop/default.nix @@ -42,7 +42,7 @@ let inherit stdenv; }; - mainProgram = if stdenv.isLinux then "kotatogram-desktop" else "Kotatogram"; + mainProgram = if stdenv.hostPlatform.isLinux then "kotatogram-desktop" else "Kotatogram"; in stdenv.mkDerivation rec { pname = "kotatogram-desktop"; @@ -61,20 +61,20 @@ stdenv.mkDerivation rec { ./macos-opengl.patch ]; - postPatch = lib.optionalString stdenv.isLinux '' + postPatch = lib.optionalString stdenv.hostPlatform.isLinux '' substituteInPlace Telegram/ThirdParty/libtgvoip/os/linux/AudioInputALSA.cpp \ --replace-fail '"libasound.so.2"' '"${alsa-lib}/lib/libasound.so.2"' substituteInPlace Telegram/ThirdParty/libtgvoip/os/linux/AudioOutputALSA.cpp \ --replace-fail '"libasound.so.2"' '"${alsa-lib}/lib/libasound.so.2"' substituteInPlace Telegram/ThirdParty/libtgvoip/os/linux/AudioPulse.cpp \ --replace-fail '"libpulse.so.0"' '"${libpulseaudio}/lib/libpulse.so.0"' - '' + lib.optionalString stdenv.isDarwin '' + '' + lib.optionalString stdenv.hostPlatform.isDarwin '' substituteInPlace Telegram/lib_webrtc/webrtc/platform/mac/webrtc_environment_mac.mm \ --replace-fail kAudioObjectPropertyElementMain kAudioObjectPropertyElementMaster ''; # Wrapping the inside of the app bundles, avoiding double-wrapping - dontWrapQtApps = stdenv.isDarwin; + dontWrapQtApps = stdenv.hostPlatform.isDarwin; nativeBuildInputs = [ pkg-config @@ -83,11 +83,11 @@ stdenv.mkDerivation rec { python3 wrapQtAppsHook removeReferencesTo - ] ++ lib.optionals stdenv.isLinux [ + ] ++ lib.optionals stdenv.hostPlatform.isLinux [ # to build bundled libdispatch clang gobject-introspection - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ lld ]; @@ -107,7 +107,7 @@ stdenv.mkDerivation rec { tg_owt microsoft-gsl boost - ] ++ lib.optionals stdenv.isLinux [ + ] ++ lib.optionals stdenv.hostPlatform.isLinux [ qtwayland kcoreaddons alsa-lib @@ -115,7 +115,7 @@ stdenv.mkDerivation rec { hunspell jemalloc wayland - ] ++ lib.optionals stdenv.isDarwin (with darwin.apple_sdk_11_0.frameworks; [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin (with darwin.apple_sdk_11_0.frameworks; [ Cocoa CoreFoundation CoreServices @@ -152,7 +152,7 @@ stdenv.mkDerivation rec { enableParallelBuilding = true; - env = lib.optionalAttrs stdenv.isDarwin { + env = lib.optionalAttrs stdenv.hostPlatform.isDarwin { NIX_CFLAGS_LINK = "-fuse-ld=lld"; }; @@ -160,7 +160,7 @@ stdenv.mkDerivation rec { "-DTDESKTOP_API_TEST=ON" ]; - installPhase = lib.optionalString stdenv.isDarwin '' + installPhase = lib.optionalString stdenv.hostPlatform.isDarwin '' mkdir -p $out/Applications cp -r ${mainProgram}.app $out/Applications ln -s $out/{Applications/${mainProgram}.app/Contents/MacOS,bin} @@ -172,7 +172,7 @@ stdenv.mkDerivation rec { remove-references-to -t ${tg_owt.dev} $out/bin/${mainProgram} ''; - postFixup = lib.optionalString stdenv.isDarwin '' + postFixup = lib.optionalString stdenv.hostPlatform.isDarwin '' wrapQtApp $out/Applications/${mainProgram}.app/Contents/MacOS/${mainProgram} ''; diff --git a/pkgs/applications/networking/instant-messengers/telegram/kotatogram-desktop/tg_owt.nix b/pkgs/applications/networking/instant-messengers/telegram/kotatogram-desktop/tg_owt.nix index e2f3c4ba884e..c136d121aa86 100644 --- a/pkgs/applications/networking/instant-messengers/telegram/kotatogram-desktop/tg_owt.nix +++ b/pkgs/applications/networking/instant-messengers/telegram/kotatogram-desktop/tg_owt.nix @@ -42,7 +42,7 @@ stdenv.mkDerivation { fetchSubmodules = true; }; - postPatch = lib.optionalString stdenv.isLinux '' + postPatch = lib.optionalString stdenv.hostPlatform.isLinux '' substituteInPlace src/modules/desktop_capture/linux/wayland/egl_dmabuf.cc \ --replace '"libEGL.so.1"' '"${libGL}/lib/libEGL.so.1"' \ --replace '"libGL.so.1"' '"${libGL}/lib/libGL.so.1"' \ @@ -64,7 +64,7 @@ stdenv.mkDerivation { crc32c libvpx abseil-cpp - ] ++ lib.optionals stdenv.isLinux [ + ] ++ lib.optionals stdenv.hostPlatform.isLinux [ libX11 libXtst libXcomposite @@ -78,7 +78,7 @@ stdenv.mkDerivation { mesa libdrm libGL - ] ++ lib.optionals stdenv.isDarwin (with darwin.apple_sdk.frameworks; [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin (with darwin.apple_sdk.frameworks; [ Cocoa AppKit IOKit diff --git a/pkgs/applications/networking/instant-messengers/telegram/telegram-desktop/default.nix b/pkgs/applications/networking/instant-messengers/telegram/telegram-desktop/default.nix index 6aefc520c7e9..e3e8a3b3f6eb 100644 --- a/pkgs/applications/networking/instant-messengers/telegram/telegram-desktop/default.nix +++ b/pkgs/applications/networking/instant-messengers/telegram/telegram-desktop/default.nix @@ -81,7 +81,7 @@ stdenv.mkDerivation (finalAttrs: { ./scheme.patch ]; - postPatch = lib.optionalString stdenv.isLinux '' + postPatch = lib.optionalString stdenv.hostPlatform.isLinux '' substituteInPlace Telegram/ThirdParty/libtgvoip/os/linux/AudioInputALSA.cpp \ --replace-fail '"libasound.so.2"' '"${alsa-lib}/lib/libasound.so.2"' substituteInPlace Telegram/ThirdParty/libtgvoip/os/linux/AudioOutputALSA.cpp \ @@ -90,7 +90,7 @@ stdenv.mkDerivation (finalAttrs: { --replace-fail '"libpulse.so.0"' '"${libpulseaudio}/lib/libpulse.so.0"' substituteInPlace Telegram/lib_webview/webview/platform/linux/webview_linux_webkitgtk_library.cpp \ --replace-fail '"libwebkitgtk-6.0.so.4"' '"${webkitgtk_6_0}/lib/libwebkitgtk-6.0.so.4"' - '' + lib.optionalString stdenv.isDarwin '' + '' + lib.optionalString stdenv.hostPlatform.isDarwin '' substituteInPlace Telegram/lib_webrtc/webrtc/platform/mac/webrtc_environment_mac.mm \ --replace-fail kAudioObjectPropertyElementMain kAudioObjectPropertyElementMaster ''; @@ -105,11 +105,11 @@ stdenv.mkDerivation (finalAttrs: { ninja python3 wrapQtAppsHook - ] ++ lib.optionals stdenv.isLinux [ + ] ++ lib.optionals stdenv.hostPlatform.isLinux [ gobject-introspection wrapGAppsHook3 extra-cmake-modules - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ lld ]; @@ -132,7 +132,7 @@ stdenv.mkDerivation (finalAttrs: { microsoft-gsl rlottie ada - ] ++ lib.optionals stdenv.isLinux [ + ] ++ lib.optionals stdenv.hostPlatform.isLinux [ qtwayland gtk3 glib-networking @@ -144,7 +144,7 @@ stdenv.mkDerivation (finalAttrs: { hunspell webkitgtk_6_0 jemalloc - ] ++ lib.optionals stdenv.isDarwin (with darwin.apple_sdk_11_0.frameworks; [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin (with darwin.apple_sdk_11_0.frameworks; [ Cocoa CoreFoundation CoreServices @@ -180,7 +180,7 @@ stdenv.mkDerivation (finalAttrs: { libicns ]); - env = lib.optionalAttrs stdenv.isDarwin { + env = lib.optionalAttrs stdenv.hostPlatform.isDarwin { NIX_CFLAGS_LINK = "-fuse-ld=lld"; }; @@ -198,20 +198,20 @@ stdenv.mkDerivation (finalAttrs: { export GI_GIR_PATH="$XDG_DATA_DIRS" ''; - installPhase = lib.optionalString stdenv.isDarwin '' + installPhase = lib.optionalString stdenv.hostPlatform.isDarwin '' mkdir -p $out/Applications cp -r ${finalAttrs.meta.mainProgram}.app $out/Applications ln -s $out/{Applications/${finalAttrs.meta.mainProgram}.app/Contents/MacOS,bin} ''; - postFixup = lib.optionalString stdenv.isLinux '' + postFixup = lib.optionalString stdenv.hostPlatform.isLinux '' # This is necessary to run Telegram in a pure environment. # We also use gappsWrapperArgs from wrapGAppsHook. wrapProgram $out/bin/${finalAttrs.meta.mainProgram} \ "''${gappsWrapperArgs[@]}" \ "''${qtWrapperArgs[@]}" \ --suffix PATH : ${lib.makeBinPath [ xdg-utils ]} - '' + lib.optionalString stdenv.isDarwin '' + '' + lib.optionalString stdenv.hostPlatform.isDarwin '' wrapQtApp $out/Applications/${finalAttrs.meta.mainProgram}.app/Contents/MacOS/${finalAttrs.meta.mainProgram} ''; diff --git a/pkgs/applications/networking/instant-messengers/telegram/tg/default.nix b/pkgs/applications/networking/instant-messengers/telegram/tg/default.nix index 7cdbda355d38..d23ee405efc2 100644 --- a/pkgs/applications/networking/instant-messengers/telegram/tg/default.nix +++ b/pkgs/applications/networking/instant-messengers/telegram/tg/default.nix @@ -30,7 +30,7 @@ buildPythonApplication rec { ]; # Fix notifications on platforms other than darwin by providing notify-send - postPatch = lib.optionalString (!stdenv.isDarwin) '' + postPatch = lib.optionalString (!stdenv.hostPlatform.isDarwin) '' sed -i 's|^NOTIFY_CMD = .*|NOTIFY_CMD = "${libnotify}/bin/notify-send {title} {message} -i {icon_path}"|' tg/config.py ''; diff --git a/pkgs/applications/networking/instant-messengers/telepathy/logger/default.nix b/pkgs/applications/networking/instant-messengers/telepathy/logger/default.nix index 4054219850b4..70612f529434 100644 --- a/pkgs/applications/networking/instant-messengers/telepathy/logger/default.nix +++ b/pkgs/applications/networking/instant-messengers/telepathy/logger/default.nix @@ -26,7 +26,7 @@ stdenv.mkDerivation rec { buildInputs = [ dbus-glib libxml2 sqlite telepathy-glib dbus - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.AppKit darwin.apple_sdk.frameworks.Foundation ]; diff --git a/pkgs/applications/networking/instant-messengers/telepathy/mission-control/default.nix b/pkgs/applications/networking/instant-messengers/telepathy/mission-control/default.nix index 92daa59ae415..5d4bfc5eab4b 100644 --- a/pkgs/applications/networking/instant-messengers/telepathy/mission-control/default.nix +++ b/pkgs/applications/networking/instant-messengers/telepathy/mission-control/default.nix @@ -29,7 +29,7 @@ stdenv.mkDerivation rec { pkg-config libxslt makeWrapper - ] ++ lib.optionals (stdenv.isDarwin && stdenv.isAarch64) [ + ] ++ lib.optionals (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isAarch64) [ autoreconfHook gtk-doc ]; diff --git a/pkgs/applications/networking/instant-messengers/tensor/default.nix b/pkgs/applications/networking/instant-messengers/tensor/default.nix index e90b8b697130..2a42692e412c 100644 --- a/pkgs/applications/networking/instant-messengers/tensor/default.nix +++ b/pkgs/applications/networking/instant-messengers/tensor/default.nix @@ -37,7 +37,7 @@ mkDerivation rec { mimeTypes = [ "application/x-chat" ]; }; - installPhase = if stdenv.isDarwin then '' + installPhase = if stdenv.hostPlatform.isDarwin then '' runHook preInstall mkdir -p $out/Applications diff --git a/pkgs/applications/networking/instant-messengers/twitch-tui/default.nix b/pkgs/applications/networking/instant-messengers/twitch-tui/default.nix index 31ef96cf80c6..8d3b36071874 100644 --- a/pkgs/applications/networking/instant-messengers/twitch-tui/default.nix +++ b/pkgs/applications/networking/instant-messengers/twitch-tui/default.nix @@ -28,7 +28,7 @@ rustPlatform.buildRustPackage rec { buildInputs = [ openssl - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ CoreServices Security SystemConfiguration diff --git a/pkgs/applications/networking/instant-messengers/vk-messenger/default.nix b/pkgs/applications/networking/instant-messengers/vk-messenger/default.nix index 50be0777ae4e..60ed9d60b1e1 100644 --- a/pkgs/applications/networking/instant-messengers/vk-messenger/default.nix +++ b/pkgs/applications/networking/instant-messengers/vk-messenger/default.nix @@ -71,4 +71,4 @@ let cp -r *.app $out/Applications ''; }; -in if stdenv.isDarwin then darwin else linux +in if stdenv.hostPlatform.isDarwin then darwin else linux diff --git a/pkgs/applications/networking/instant-messengers/wire-desktop/default.nix b/pkgs/applications/networking/instant-messengers/wire-desktop/default.nix index 9d41b0455a72..22bf7fb11e6c 100644 --- a/pkgs/applications/networking/instant-messengers/wire-desktop/default.nix +++ b/pkgs/applications/networking/instant-messengers/wire-desktop/default.nix @@ -187,6 +187,6 @@ let }; in -if stdenv.isDarwin +if stdenv.hostPlatform.isDarwin then darwin else linux diff --git a/pkgs/applications/networking/irc/communi/default.nix b/pkgs/applications/networking/irc/communi/default.nix index 84940c288bed..9c25ece8556b 100644 --- a/pkgs/applications/networking/irc/communi/default.nix +++ b/pkgs/applications/networking/irc/communi/default.nix @@ -35,7 +35,7 @@ stdenv.mkDerivation rec { # libCommuni.dylib is installed in $out/Applications/Communi.app/Contents/Frameworks/ on Darwin # Wrapper hook thinks it's a binary because it's in $out/Applications, wraps it with a shell script # So we manually call the wrapper script on just the binary - dontWrapQtApps = stdenv.isDarwin; + dontWrapQtApps = stdenv.hostPlatform.isDarwin; preConfigure = '' export QMAKEFEATURES=${libcommuni}/features @@ -47,11 +47,11 @@ stdenv.mkDerivation rec { "COMMUNI_INSTALL_ICONS=${placeholder "out"}/share/icons/hicolor" "COMMUNI_INSTALL_DESKTOP=${placeholder "out"}/share/applications" "COMMUNI_INSTALL_THEMES=${placeholder "out"}/share/communi/themes" - "COMMUNI_INSTALL_BINS=${placeholder "out"}/${if stdenv.isDarwin then "Applications" else "bin"}" + "COMMUNI_INSTALL_BINS=${placeholder "out"}/${if stdenv.hostPlatform.isDarwin then "Applications" else "bin"}" ]; postInstall = - if stdenv.isDarwin then '' + if stdenv.hostPlatform.isDarwin then '' # Nix qmake does not add the bundle rpath by default. install_name_tool \ -add_rpath @executable_path/../Frameworks \ diff --git a/pkgs/applications/networking/irc/convos/default.nix b/pkgs/applications/networking/irc/convos/default.nix index 2fc2e0585910..c456875d016b 100644 --- a/pkgs/applications/networking/irc/convos/default.nix +++ b/pkgs/applications/networking/irc/convos/default.nix @@ -14,7 +14,7 @@ perlPackages.buildPerlPackage rec { }; nativeBuildInputs = [ makeWrapper ] - ++ lib.optionals stdenv.isDarwin [ shortenPerlShebang ]; + ++ lib.optionals stdenv.hostPlatform.isDarwin [ shortenPerlShebang ]; buildInputs = with perlPackages; [ CryptPassphrase CryptPassphraseArgon2 CryptPassphraseBcrypt @@ -79,7 +79,7 @@ perlPackages.buildPerlPackage rec { ln -s $AUTO_SHARE_PATH/public/assets $out/assets cp -vR templates $out/templates cp Makefile.PL $out/Makefile.PL - '' + lib.optionalString stdenv.isDarwin '' + '' + lib.optionalString stdenv.hostPlatform.isDarwin '' shortenPerlShebang $out/bin/convos '' + '' wrapProgram $out/bin/convos --set MOJO_HOME $out diff --git a/pkgs/applications/networking/irc/epic5/default.nix b/pkgs/applications/networking/irc/epic5/default.nix index 2331eaa4596d..c3a10cc39e9d 100644 --- a/pkgs/applications/networking/irc/epic5/default.nix +++ b/pkgs/applications/networking/irc/epic5/default.nix @@ -11,7 +11,7 @@ stdenv.mkDerivation rec { # Darwin needs libiconv, tcl; while Linux build don't buildInputs = [ openssl ncurses libxcrypt ] - ++ lib.optionals stdenv.isDarwin [ libiconv tcl ]; + ++ lib.optionals stdenv.hostPlatform.isDarwin [ libiconv tcl ]; patches = [ (fetchpatch { diff --git a/pkgs/applications/networking/irc/thelounge/default.nix b/pkgs/applications/networking/irc/thelounge/default.nix index 729afb831d57..0abeec15939f 100644 --- a/pkgs/applications/networking/irc/thelounge/default.nix +++ b/pkgs/applications/networking/irc/thelounge/default.nix @@ -38,7 +38,7 @@ stdenv.mkDerivation (finalAttrs: { hash = "sha256-MM6SgVT7Pjdu96A4eWRucEzT7uNPxBqUDgHKl8mH2C0="; }; - nativeBuildInputs = [ nodejs yarn fixup-yarn-lock python3 npmHooks.npmInstallHook ] ++ lib.optional stdenv.isDarwin cctools; + nativeBuildInputs = [ nodejs yarn fixup-yarn-lock python3 npmHooks.npmInstallHook ] ++ lib.optional stdenv.hostPlatform.isDarwin cctools; buildInputs = [ sqlite ]; configurePhase = '' diff --git a/pkgs/applications/networking/irc/tiny/default.nix b/pkgs/applications/networking/irc/tiny/default.nix index 583723c0d147..fa8f3edf5ad6 100644 --- a/pkgs/applications/networking/irc/tiny/default.nix +++ b/pkgs/applications/networking/irc/tiny/default.nix @@ -4,10 +4,10 @@ , fetchFromGitHub , pkg-config , Foundation -, dbusSupport ? stdenv.isLinux, dbus +, dbusSupport ? stdenv.hostPlatform.isLinux, dbus # rustls will be used for TLS if useOpenSSL=false -, useOpenSSL ? stdenv.isLinux, openssl -, notificationSupport ? stdenv.isLinux +, useOpenSSL ? stdenv.hostPlatform.isLinux, openssl +, notificationSupport ? stdenv.hostPlatform.isLinux }: rustPlatform.buildRustPackage rec { @@ -23,10 +23,10 @@ rustPlatform.buildRustPackage rec { cargoHash = "sha256-AhQCfLCoJU7o8s+XL3hDOPmZi9QjOxXSA9uglA1KSuY="; - nativeBuildInputs = lib.optional stdenv.isLinux pkg-config; + nativeBuildInputs = lib.optional stdenv.hostPlatform.isLinux pkg-config; buildInputs = lib.optionals dbusSupport [ dbus ] ++ lib.optionals useOpenSSL [ openssl ] - ++ lib.optional stdenv.isDarwin Foundation; + ++ lib.optional stdenv.hostPlatform.isDarwin Foundation; buildFeatures = lib.optional notificationSupport "desktop-notifications"; diff --git a/pkgs/applications/networking/irc/weechat/default.nix b/pkgs/applications/networking/irc/weechat/default.nix index 42090534bcc3..8ac356b9183b 100644 --- a/pkgs/applications/networking/irc/weechat/default.nix +++ b/pkgs/applications/networking/irc/weechat/default.nix @@ -3,14 +3,14 @@ , zlib, curl, pkg-config, libgcrypt , cmake, libobjc, libresolv, libiconv , asciidoctor # manpages -, enableTests ? !stdenv.isDarwin, cpputest +, enableTests ? !stdenv.hostPlatform.isDarwin, cpputest , guileSupport ? true, guile , luaSupport ? true, lua5 , perlSupport ? true, perl , pythonSupport ? true, python3Packages , rubySupport ? true, ruby , tclSupport ? true, tcl -, phpSupport ? !stdenv.isDarwin, php, systemd, libxml2, pcre2, libargon2 +, phpSupport ? !stdenv.hostPlatform.isDarwin, php, systemd, libxml2, pcre2, libargon2 , extraBuildInputs ? [] }: @@ -29,7 +29,7 @@ let { name = "python"; enabled = pythonSupport; cmakeFlag = "ENABLE_PYTHON3"; buildInputs = [ python ]; } { name = "php"; enabled = phpSupport; cmakeFlag = "ENABLE_PHP"; buildInputs = [ php-embed.unwrapped.dev libxml2 pcre2 libargon2 - ] ++ lib.optional stdenv.isLinux systemd; } + ] ++ lib.optional stdenv.hostPlatform.isLinux systemd; } ]; enabledPlugins = builtins.filter (p: p.enabled) plugins; @@ -57,19 +57,19 @@ let "-DENABLE_DOC_INCOMPLETE=ON" "-DENABLE_TESTS=${if enableTests then "ON" else "OFF"}" ] - ++ lib.optionals stdenv.isDarwin ["-DICONV_LIBRARY=${libiconv}/lib/libiconv.dylib"] + ++ lib.optionals stdenv.hostPlatform.isDarwin ["-DICONV_LIBRARY=${libiconv}/lib/libiconv.dylib"] ++ map (p: "-D${p.cmakeFlag}=" + (if p.enabled then "ON" else "OFF")) plugins ; nativeBuildInputs = [ cmake pkg-config asciidoctor ] ++ lib.optional enableTests cpputest; buildInputs = [ ncurses openssl aspell cjson gnutls gettext zlib curl libgcrypt ] - ++ lib.optionals stdenv.isDarwin [ libobjc libresolv ] + ++ lib.optionals stdenv.hostPlatform.isDarwin [ libobjc libresolv ] ++ lib.concatMap (p: p.buildInputs) enabledPlugins ++ extraBuildInputs; env.NIX_CFLAGS_COMPILE = "-I${python}/include/${python.libPrefix}" # Fix '_res_9_init: undefined symbol' error - + (lib.optionalString stdenv.isDarwin "-DBIND_8_COMPAT=1 -lresolv"); + + (lib.optionalString stdenv.hostPlatform.isDarwin "-DBIND_8_COMPAT=1 -lresolv"); postInstall = '' for p in ${lib.concatMapStringsSep " " (p: p.name) enabledPlugins}; do diff --git a/pkgs/applications/networking/irc/weechat/scripts/weechat-matrix-bridge/default.nix b/pkgs/applications/networking/irc/weechat/scripts/weechat-matrix-bridge/default.nix index e51e6f061b07..22eb0849cc4a 100644 --- a/pkgs/applications/networking/irc/weechat/scripts/weechat-matrix-bridge/default.nix +++ b/pkgs/applications/networking/irc/weechat/scripts/weechat-matrix-bridge/default.nix @@ -46,6 +46,6 @@ stdenv.mkDerivation { # As of 2019-06-30, all of the dependencies are available on macOS but the # package itself does not build. - broken = stdenv.isDarwin; + broken = stdenv.hostPlatform.isDarwin; }; } diff --git a/pkgs/applications/networking/irc/wraith/default.nix b/pkgs/applications/networking/irc/wraith/default.nix index c059babffe7b..c046a0c2d7f9 100644 --- a/pkgs/applications/networking/irc/wraith/default.nix +++ b/pkgs/applications/networking/irc/wraith/default.nix @@ -23,7 +23,7 @@ stdenv.mkDerivation rec { ''; meta = with lib; { - broken = (stdenv.isLinux && stdenv.isAarch64); + broken = (stdenv.hostPlatform.isLinux && stdenv.hostPlatform.isAarch64); description = "IRC channel management bot written purely in C/C++"; longDescription = '' Wraith is an IRC channel management bot written purely in C/C++. It has diff --git a/pkgs/applications/networking/iroh/default.nix b/pkgs/applications/networking/iroh/default.nix index e3cd1999d81b..ba87e0f29364 100644 --- a/pkgs/applications/networking/iroh/default.nix +++ b/pkgs/applications/networking/iroh/default.nix @@ -18,7 +18,7 @@ rustPlatform.buildRustPackage rec { cargoHash = "sha256-t1re2vpxGZkC45n0jUytqe2SPAC/+fh4Itq1h9znYnM="; - buildInputs = lib.optionals stdenv.isDarwin ( + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin ( with darwin.apple_sdk.frameworks; [ Security SystemConfiguration diff --git a/pkgs/applications/networking/kubo-migrator/all-migrations.nix b/pkgs/applications/networking/kubo-migrator/all-migrations.nix index 54ae2551caa3..d44fafb3be9e 100644 --- a/pkgs/applications/networking/kubo-migrator/all-migrations.nix +++ b/pkgs/applications/networking/kubo-migrator/all-migrations.nix @@ -63,7 +63,7 @@ let fs-repo-9-to-10 fs-repo-8-to-9 fs-repo-7-to-8 - ] ++ lib.optional (!stdenv.isDarwin) # I didn't manage to fix this on macOS: + ] ++ lib.optional (!stdenv.hostPlatform.isDarwin) # I didn't manage to fix this on macOS: fs-repo-6-to-7 # gx/ipfs/QmSGRM5Udmy1jsFBr1Cawez7Lt7LZ3ZKA23GGVEsiEW6F3/eventfd/eventfd.go:27:32: undefined: syscall.SYS_EVENTFD2 ++ [ fs-repo-5-to-6 diff --git a/pkgs/applications/networking/mailreaders/claws-mail/default.nix b/pkgs/applications/networking/mailreaders/claws-mail/default.nix index ddc47d1800c3..d0345f946600 100644 --- a/pkgs/applications/networking/mailreaders/claws-mail/default.nix +++ b/pkgs/applications/networking/mailreaders/claws-mail/default.nix @@ -18,7 +18,7 @@ , enableLdap ? true, openldap , enableNetworkManager ? true, networkmanager , enableLibetpan ? true, libetpan -, enableValgrind ? !stdenv.isDarwin && lib.meta.availableOn stdenv.hostPlatform valgrind, valgrind +, enableValgrind ? !stdenv.hostPlatform.isDarwin && lib.meta.availableOn stdenv.hostPlatform valgrind, valgrind , enableSvg ? true, librsvg # Configure claws-mail's plugins diff --git a/pkgs/applications/networking/mailreaders/mmh/default.nix b/pkgs/applications/networking/mailreaders/mmh/default.nix index 95c101002e2b..edcc48386a11 100644 --- a/pkgs/applications/networking/mailreaders/mmh/default.nix +++ b/pkgs/applications/networking/mailreaders/mmh/default.nix @@ -23,7 +23,7 @@ in stdenv.mkDerivation rec { homepage = "http://marmaro.de/prog/mmh"; license = licenses.bsd3; platforms = platforms.unix; - broken = stdenv.isDarwin; + broken = stdenv.hostPlatform.isDarwin; maintainers = with maintainers; [ kaction ]; }; } diff --git a/pkgs/applications/networking/mailreaders/sylpheed/default.nix b/pkgs/applications/networking/mailreaders/sylpheed/default.nix index 48d14d78d8e1..9e765743dd63 100644 --- a/pkgs/applications/networking/mailreaders/sylpheed/default.nix +++ b/pkgs/applications/networking/mailreaders/sylpheed/default.nix @@ -33,13 +33,13 @@ stdenv.mkDerivation rec { buildInputs = [ gtk2 ] ++ lib.optionals gpgSupport [ gpgme ] ++ lib.optionals sslSupport [ openssl ] - ++ lib.optionals stdenv.isDarwin [ Foundation ]; + ++ lib.optionals stdenv.hostPlatform.isDarwin [ Foundation ]; configureFlags = lib.optional gpgSupport "--enable-gpgme" ++ lib.optional sslSupport "--enable-ssl"; # Undefined symbols for architecture arm64: "_OBJC_CLASS_$_NSAutoreleasePool" - NIX_LDFLAGS = lib.optionalString stdenv.isDarwin "-framework Foundation"; + NIX_LDFLAGS = lib.optionalString stdenv.hostPlatform.isDarwin "-framework Foundation"; meta = with lib; { homepage = "https://sylpheed.sraoss.jp/en/"; diff --git a/pkgs/applications/networking/mhost/default.nix b/pkgs/applications/networking/mhost/default.nix index 435f58d06850..777ea44dc7bd 100644 --- a/pkgs/applications/networking/mhost/default.nix +++ b/pkgs/applications/networking/mhost/default.nix @@ -13,7 +13,7 @@ rustPlatform.buildRustPackage rec { cargoHash = "sha256-d2JYT/eJaGm8pfmjsuSZiQxlzcsypFH53F/9joW0J6I="; - buildInputs = lib.optionals stdenv.isDarwin [ + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ Security SystemConfiguration ]; diff --git a/pkgs/applications/networking/mkchromecast/default.nix b/pkgs/applications/networking/mkchromecast/default.nix index f6364f5ba572..b0df1210b318 100644 --- a/pkgs/applications/networking/mkchromecast/default.nix +++ b/pkgs/applications/networking/mkchromecast/default.nix @@ -25,7 +25,7 @@ let packages = [ nodejs ffmpeg youtube-dl -] ++ lib.optionals stdenv.isLinux [ pulseaudio ]; +] ++ lib.optionals stdenv.hostPlatform.isLinux [ pulseaudio ]; in python3Packages.buildPythonApplication { @@ -39,7 +39,7 @@ python3Packages.buildPythonApplication { sha256 = "sha256-dxsIcBPrZaXlsfzOEXhYj2qoK5LRducJG2ggMrMMl9Y="; }; - buildInputs = lib.optional stdenv.isLinux qtwayland; + buildInputs = lib.optional stdenv.hostPlatform.isLinux qtwayland; propagatedBuildInputs = with python3Packages; ([ pychromecast psutil @@ -72,7 +72,7 @@ python3Packages.buildPythonApplication { postInstall = '' substituteInPlace $out/${python3Packages.python.sitePackages}/mkchromecast/video.py \ --replace '/usr/share/mkchromecast/nodejs/' '${placeholder "out"}/share/mkchromecast/nodejs/' - '' + lib.optionalString stdenv.isDarwin '' + '' + lib.optionalString stdenv.hostPlatform.isDarwin '' install -Dm 755 -t $out/bin bin/audiodevice substituteInPlace $out/${python3Packages.python.sitePackages}/mkchromecast/audio_devices.py \ --replace './bin/audiodevice' '${placeholder "out"}/bin/audiodevice' diff --git a/pkgs/applications/networking/mpop/default.nix b/pkgs/applications/networking/mpop/default.nix index 7370ddd6e201..5e41ef5d2a91 100644 --- a/pkgs/applications/networking/mpop/default.nix +++ b/pkgs/applications/networking/mpop/default.nix @@ -28,7 +28,7 @@ stdenv.mkDerivation rec { ]; buildInputs = - lib.optional stdenv.isDarwin Security + lib.optional stdenv.hostPlatform.isDarwin Security ++ lib.optional gsaslSupport gsasl ++ lib.optional idnSupport libidn ++ lib.optional (sslLibrary == "gnutls") gnutls @@ -39,7 +39,7 @@ stdenv.mkDerivation rec { (lib.withFeature idnSupport "idn") (lib.withFeature gsaslSupport "gsasl") "--with-tls=${sslLibrary}" - ] ++ lib.optional stdenv.isDarwin "--with-macosx-keyring"; + ] ++ lib.optional stdenv.hostPlatform.isDarwin "--with-macosx-keyring"; meta = with lib;{ description = "POP3 mail retrieval agent"; diff --git a/pkgs/applications/networking/msmtp/default.nix b/pkgs/applications/networking/msmtp/default.nix index 6bd0f38ba6f4..15cd369ae335 100644 --- a/pkgs/applications/networking/msmtp/default.nix +++ b/pkgs/applications/networking/msmtp/default.nix @@ -48,10 +48,10 @@ let inherit version src meta; configureFlags = [ "--sysconfdir=/etc" "--with-libgsasl" ] - ++ optionals stdenv.isDarwin [ "--with-macosx-keyring" ]; + ++ optionals stdenv.hostPlatform.isDarwin [ "--with-macosx-keyring" ]; buildInputs = [ gnutls gsasl libidn2 ] - ++ optionals stdenv.isDarwin [ Security ] + ++ optionals stdenv.hostPlatform.isDarwin [ Security ] ++ optionals withKeyring [ libsecret ]; nativeBuildInputs = [ autoreconfHook pkg-config texinfo ]; diff --git a/pkgs/applications/networking/mujmap/default.nix b/pkgs/applications/networking/mujmap/default.nix index d89c17355046..8ee04ef19607 100644 --- a/pkgs/applications/networking/mujmap/default.nix +++ b/pkgs/applications/networking/mujmap/default.nix @@ -21,7 +21,7 @@ rustPlatform.buildRustPackage rec { buildInputs = [ notmuch - ] ++ lib.optional stdenv.isDarwin Security; + ] ++ lib.optional stdenv.hostPlatform.isDarwin Security; meta = with lib; { description = "JMAP integration for notmuch mail"; diff --git a/pkgs/applications/networking/mullvad/openvpn.nix b/pkgs/applications/networking/mullvad/openvpn.nix index 0dcfeaabf677..af2a2d2e494e 100644 --- a/pkgs/applications/networking/mullvad/openvpn.nix +++ b/pkgs/applications/networking/mullvad/openvpn.nix @@ -31,7 +31,7 @@ openvpn.overrideAttrs (oldAttrs: ]; buildInputs = oldAttrs.buildInputs or [ ] - ++ optional stdenv.isLinux [ libnl.dev ]; + ++ optional stdenv.hostPlatform.isLinux [ libnl.dev ]; configureFlags = [ # Assignement instead of appending to make sure to use exactly the flags required by mullvad @@ -52,7 +52,7 @@ openvpn.overrideAttrs (oldAttrs: "--disable-lz4" "--enable-comp-stub" ] - ++ optional stdenv.isLinux [ + ++ optional stdenv.hostPlatform.isLinux [ # Flags are based on https://github.com/mullvad/mullvadvpn-app-binaries/blob/main/Makefile#L35 "--enable-dco" # requires libnl "--disable-iproute2" diff --git a/pkgs/applications/networking/nload/default.nix b/pkgs/applications/networking/nload/default.nix index a2b2731b3b03..3f97981528f5 100644 --- a/pkgs/applications/networking/nload/default.nix +++ b/pkgs/applications/networking/nload/default.nix @@ -36,7 +36,7 @@ stdenv.mkDerivation rec { }) ]; - nativeBuildInputs = lib.optional stdenv.isDarwin autoreconfHook; + nativeBuildInputs = lib.optional stdenv.hostPlatform.isDarwin autoreconfHook; buildInputs = [ ncurses ]; meta = { diff --git a/pkgs/applications/networking/nym/default.nix b/pkgs/applications/networking/nym/default.nix index fc2095caaf21..41fe108b99f2 100644 --- a/pkgs/applications/networking/nym/default.nix +++ b/pkgs/applications/networking/nym/default.nix @@ -45,7 +45,7 @@ rustPlatform.buildRustPackage { nativeBuildInputs = [ pkg-config ]; - buildInputs = [ openssl ] ++ lib.optionals stdenv.isDarwin [ Security CoreServices ]; + buildInputs = [ openssl ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ Security CoreServices ]; checkType = "debug"; diff --git a/pkgs/applications/networking/offrss/default.nix b/pkgs/applications/networking/offrss/default.nix index 081f7d96c1aa..89853c8a088d 100644 --- a/pkgs/applications/networking/offrss/default.nix +++ b/pkgs/applications/networking/offrss/default.nix @@ -11,7 +11,7 @@ stdenv.mkDerivation rec { buildInputs = [ curl libmrss ] ++ lib.optional (stdenv.hostPlatform == stdenv.buildPlatform) podofo - ++ lib.optional (!stdenv.isLinux) libiconv; + ++ lib.optional (!stdenv.hostPlatform.isLinux) libiconv; # Workaround build failure on -fno-common toolchains: # ld: serve_pdf.o:offrss.h:75: multiple definition of `cgi_url_path'; @@ -21,7 +21,7 @@ stdenv.mkDerivation rec { configurePhase = '' substituteInPlace Makefile \ --replace '$(CC) $(CFLAGS) $(LDFLAGS)' '$(CXX) $(CFLAGS) $(LDFLAGS)' - '' + lib.optionalString (!stdenv.isLinux) '' + '' + lib.optionalString (!stdenv.hostPlatform.isLinux) '' sed 's/#EXTRA/EXTRA/' -i Makefile '' + lib.optionalString (stdenv.hostPlatform != stdenv.buildPlatform) '' sed 's/^PDF/#PDF/' -i Makefile diff --git a/pkgs/applications/networking/omping/default.nix b/pkgs/applications/networking/omping/default.nix index 808df455a4f2..1efcd98b46f8 100644 --- a/pkgs/applications/networking/omping/default.nix +++ b/pkgs/applications/networking/omping/default.nix @@ -27,7 +27,7 @@ stdenv.mkDerivation rec { enableParallelBuilding = true; meta = with lib; { - broken = stdenv.isDarwin; + broken = stdenv.hostPlatform.isDarwin; description = "Open Multicast Ping (omping) is a tool for testing IPv4/IPv6 multicast connectivity on a LAN"; license = licenses.mit; platforms = platforms.unix; diff --git a/pkgs/applications/networking/onionshare/default.nix b/pkgs/applications/networking/onionshare/default.nix index 18d791f53402..9e7152393a4d 100644 --- a/pkgs/applications/networking/onionshare/default.nix +++ b/pkgs/applications/networking/onionshare/default.nix @@ -102,9 +102,9 @@ rec { export HOME="$(mktemp -d)" ''; - disabledTests = lib.optionals stdenv.isLinux [ + disabledTests = lib.optionals stdenv.hostPlatform.isLinux [ "test_get_tor_paths_linux" # expects /usr instead of /nix/store - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ # requires meek-client which is not packaged "test_get_tor_paths_darwin" # on darwin (and only on darwin) onionshare attempts to discover diff --git a/pkgs/applications/networking/p2p/eiskaltdcpp/default.nix b/pkgs/applications/networking/p2p/eiskaltdcpp/default.nix index 67dab32e113f..61501dbeb20e 100644 --- a/pkgs/applications/networking/p2p/eiskaltdcpp/default.nix +++ b/pkgs/applications/networking/p2p/eiskaltdcpp/default.nix @@ -26,7 +26,7 @@ mkDerivation rec { GetoptLong TermShellUI ])) ] - ++ lib.optional stdenv.isDarwin libiconv; + ++ lib.optional stdenv.hostPlatform.isDarwin libiconv; cmakeFlags = [ "-DDBUS_NOTIFY=ON" diff --git a/pkgs/applications/networking/p2p/enhanced-ctorrent/default.nix b/pkgs/applications/networking/p2p/enhanced-ctorrent/default.nix index e8432b4c5c24..507469022804 100644 --- a/pkgs/applications/networking/p2p/enhanced-ctorrent/default.nix +++ b/pkgs/applications/networking/p2p/enhanced-ctorrent/default.nix @@ -22,7 +22,7 @@ stdenv.mkDerivation { ]; meta = { - broken = stdenv.isDarwin; + broken = stdenv.hostPlatform.isDarwin; description = "BitTorrent client written in C++"; mainProgram = "ctorrent"; longDescription = '' diff --git a/pkgs/applications/networking/p2p/mldonkey/default.nix b/pkgs/applications/networking/p2p/mldonkey/default.nix index 81a625e5210f..d83a33833b0b 100644 --- a/pkgs/applications/networking/p2p/mldonkey/default.nix +++ b/pkgs/applications/networking/p2p/mldonkey/default.nix @@ -37,7 +37,7 @@ stdenv.mkDerivation rec { buildInputs = (with ocamlPackages; [ num ]) ++ [ zlib ]; meta = { - broken = stdenv.isDarwin; + broken = stdenv.hostPlatform.isDarwin; description = "Client for many p2p networks, with multiple frontends"; homepage = "https://github.com/ygrek/mldonkey"; license = lib.licenses.gpl2Only; diff --git a/pkgs/applications/networking/p2p/pyrosimple/default.nix b/pkgs/applications/networking/p2p/pyrosimple/default.nix index 795f6969ff48..240dc4199801 100644 --- a/pkgs/applications/networking/p2p/pyrosimple/default.nix +++ b/pkgs/applications/networking/p2p/pyrosimple/default.nix @@ -5,7 +5,7 @@ , pyrosimple , python3 , testers -, withInotify ? stdenv.isLinux +, withInotify ? stdenv.hostPlatform.isLinux }: python3.pkgs.buildPythonApplication rec { diff --git a/pkgs/applications/networking/p2p/qbittorrent/default.nix b/pkgs/applications/networking/p2p/qbittorrent/default.nix index 1ec2cbac9ce4..54793401abbe 100644 --- a/pkgs/applications/networking/p2p/qbittorrent/default.nix +++ b/pkgs/applications/networking/p2p/qbittorrent/default.nix @@ -52,11 +52,11 @@ stdenv.mkDerivation rec { qtbase qtsvg qttools - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ Cocoa ] ++ lib.optionals guiSupport [ dbus - ] ++ lib.optionals (guiSupport && stdenv.isLinux) [ + ] ++ lib.optionals (guiSupport && stdenv.hostPlatform.isLinux) [ qtwayland ] ++ lib.optionals trackerSearch [ python3 @@ -78,7 +78,7 @@ stdenv.mkDerivation rec { dontWrapGApps = true; - postInstall = lib.optionalString stdenv.isDarwin '' + postInstall = lib.optionalString stdenv.hostPlatform.isDarwin '' APP_NAME=qbittorrent${lib.optionalString (!guiSupport) "-nox"} mkdir -p $out/{Applications,bin} cp -R $APP_NAME.app $out/Applications diff --git a/pkgs/applications/networking/p2p/synapse-bt/default.nix b/pkgs/applications/networking/p2p/synapse-bt/default.nix index 9ab60d5a18f4..120afed45de6 100644 --- a/pkgs/applications/networking/p2p/synapse-bt/default.nix +++ b/pkgs/applications/networking/p2p/synapse-bt/default.nix @@ -15,7 +15,7 @@ rustPlatform.buildRustPackage rec { nativeBuildInputs = [ pkg-config ]; buildInputs = [ openssl ] - ++ lib.optionals stdenv.isDarwin [ CoreServices Security ]; + ++ lib.optionals stdenv.hostPlatform.isDarwin [ CoreServices Security ]; cargoBuildFlags = [ "--all" ]; diff --git a/pkgs/applications/networking/p2p/transmission/4.nix b/pkgs/applications/networking/p2p/transmission/4.nix index dd27a22168b4..25296efe6926 100644 --- a/pkgs/applications/networking/p2p/transmission/4.nix +++ b/pkgs/applications/networking/p2p/transmission/4.nix @@ -55,7 +55,7 @@ let zlib ] ++ optionals enableSystemd [ systemd ] - ++ optionals stdenv.isLinux [ inotify-tools ]); + ++ optionals stdenv.hostPlatform.isLinux [ inotify-tools ]); in stdenv.mkDerivation (finalAttrs: { @@ -93,7 +93,7 @@ stdenv.mkDerivation (finalAttrs: { (cmakeBool "ENABLE_MAC" false) # requires xcodebuild (cmakeBool "ENABLE_QT" (enableQt5 || enableQt6)) (cmakeBool "INSTALL_LIB" installLib) - ] ++ optionals stdenv.isDarwin [ + ] ++ optionals stdenv.hostPlatform.isDarwin [ # Transmission sets this to 10.13 if not explicitly specified, see https://github.com/transmission/transmission/blob/0be7091eb12f4eb55f6690f313ef70a66795ee72/CMakeLists.txt#L7-L16. "-DCMAKE_OSX_DEPLOYMENT_TARGET=${stdenv.hostPlatform.darwinMinVersion}" ]; @@ -145,8 +145,8 @@ stdenv.mkDerivation (finalAttrs: { ++ optionals enableQt6 (with qt6Packages; [ qttools qtbase qtsvg ]) ++ optionals enableGTK3 [ gtkmm3 xorg.libpthreadstubs ] ++ optionals enableSystemd [ systemd ] - ++ optionals stdenv.isLinux [ inotify-tools ] - ++ optionals stdenv.isDarwin [ libiconv Foundation ]; + ++ optionals stdenv.hostPlatform.isLinux [ inotify-tools ] + ++ optionals stdenv.hostPlatform.isDarwin [ libiconv Foundation ]; postInstall = '' mkdir $apparmor diff --git a/pkgs/applications/networking/p2p/tremc/default.nix b/pkgs/applications/networking/p2p/tremc/default.nix index 8f3b2c6e35ef..98ab36dac08a 100644 --- a/pkgs/applications/networking/p2p/tremc/default.nix +++ b/pkgs/applications/networking/p2p/tremc/default.nix @@ -1,5 +1,5 @@ { lib, stdenv, fetchFromGitHub, fetchpatch, python3Packages -, x11Support ? !stdenv.isDarwin +, x11Support ? !stdenv.hostPlatform.isDarwin , xclip ? null , pbcopy ? null , useGeoIP ? false # Require /var/lib/geoip-databases/GeoIP.dat @@ -7,7 +7,7 @@ let wrapperPath = lib.makeBinPath ( lib.optional x11Support xclip ++ - lib.optional stdenv.isDarwin pbcopy + lib.optional stdenv.hostPlatform.isDarwin pbcopy ); in python3Packages.buildPythonApplication rec { diff --git a/pkgs/applications/networking/pjsip/default.nix b/pkgs/applications/networking/pjsip/default.nix index f27a57012366..3cdfe57c8a5f 100644 --- a/pkgs/applications/networking/pjsip/default.nix +++ b/pkgs/applications/networking/pjsip/default.nix @@ -50,8 +50,8 @@ stdenv.mkDerivation (finalAttrs: { openssl libsamplerate ] - ++ lib.optional stdenv.isLinux alsa-lib - ++ lib.optionals stdenv.isDarwin [ + ++ lib.optional stdenv.hostPlatform.isLinux alsa-lib + ++ lib.optionals stdenv.hostPlatform.isDarwin [ AppKit CoreFoundation Security @@ -59,7 +59,7 @@ stdenv.mkDerivation (finalAttrs: { env = lib.optionalAttrs stdenv.cc.isClang { CXXFLAGS = "-std=c++11"; } - // lib.optionalAttrs stdenv.isDarwin { NIX_CFLAGS_LINK = "-headerpad_max_install_names"; }; + // lib.optionalAttrs stdenv.hostPlatform.isDarwin { NIX_CFLAGS_LINK = "-headerpad_max_install_names"; }; preConfigure = '' export LD=$CC @@ -86,7 +86,7 @@ stdenv.mkDerivation (finalAttrs: { python -m installer --prefix $py dist/*.whl ) '' - + lib.optionalString stdenv.isDarwin '' + + lib.optionalString stdenv.hostPlatform.isDarwin '' # On MacOS relative paths are used to refer to libraries. All libraries use # a relative path like ../lib/*.dylib or ../../lib/*.dylib. We need to # rewrite these to use absolute ones. diff --git a/pkgs/applications/networking/qv2ray/default.nix b/pkgs/applications/networking/qv2ray/default.nix index 01e471c97de9..1105933a9afa 100644 --- a/pkgs/applications/networking/qv2ray/default.nix +++ b/pkgs/applications/networking/qv2ray/default.nix @@ -30,7 +30,7 @@ mkDerivation rec { fetchSubmodules = true; }; - postPatch = lib.optionals stdenv.isDarwin '' + postPatch = lib.optionals stdenv.hostPlatform.isDarwin '' substituteInPlace cmake/platforms/macos.cmake \ --replace \''${QV2RAY_QtX_DIR}/../../../bin/macdeployqt macdeployqt ''; @@ -76,7 +76,7 @@ mkDerivation rec { maintainers = with maintainers; [ poscat rewine ]; platforms = platforms.all; # never built on aarch64-darwin, x86_64-darwin since update to unstable-2022-09-25 - broken = stdenv.isDarwin; + broken = stdenv.hostPlatform.isDarwin; mainProgram = "qv2ray"; }; } diff --git a/pkgs/applications/networking/remote/citrix-workspace/generic.nix b/pkgs/applications/networking/remote/citrix-workspace/generic.nix index 18c3da84c3bf..b59a82f720dc 100644 --- a/pkgs/applications/networking/remote/citrix-workspace/generic.nix +++ b/pkgs/applications/networking/remote/citrix-workspace/generic.nix @@ -46,7 +46,7 @@ stdenv.mkDerivation rec { message = '' In order to use Citrix Workspace, you need to comply with the Citrix EULA and download - the ${if stdenv.is64bit then "64-bit" else "32-bit"} binaries, .tar.gz from: + the ${if stdenv.hostPlatform.is64bit then "64-bit" else "32-bit"} binaries, .tar.gz from: ${homepage} diff --git a/pkgs/applications/networking/remote/citrix-workspace/sources.nix b/pkgs/applications/networking/remote/citrix-workspace/sources.nix index 1b0826c4d2bd..2b5d0e9d7b14 100644 --- a/pkgs/applications/networking/remote/citrix-workspace/sources.nix +++ b/pkgs/applications/networking/remote/citrix-workspace/sources.nix @@ -3,9 +3,9 @@ let mkVersionInfo = _: { major, minor, patch, x64hash, x86hash, x64suffix, x86suffix, homepage }: { inherit homepage; - version = "${major}.${minor}.${patch}.${if stdenv.is64bit then x64suffix else x86suffix}"; - prefix = "linuxx${if stdenv.is64bit then "64" else "86"}"; - hash = if stdenv.is64bit then x64hash else x86hash; + version = "${major}.${minor}.${patch}.${if stdenv.hostPlatform.is64bit then x64suffix else x86suffix}"; + prefix = "linuxx${if stdenv.hostPlatform.is64bit then "64" else "86"}"; + hash = if stdenv.hostPlatform.is64bit then x64hash else x86hash; }; # Attribute-set with all actively supported versions of the Citrix workspace app diff --git a/pkgs/applications/networking/remote/freerdp/3.nix b/pkgs/applications/networking/remote/freerdp/3.nix index 31d5b2beee44..49b412bf7663 100644 --- a/pkgs/applications/networking/remote/freerdp/3.nix +++ b/pkgs/applications/networking/remote/freerdp/3.nix @@ -152,13 +152,13 @@ stdenv.mkDerivation (finalAttrs: { SDL2_image uriparser zlib - ] ++ lib.optionals stdenv.isLinux [ + ] ++ lib.optionals stdenv.hostPlatform.isLinux [ alsa-lib fuse3 systemd wayland wayland-scanner - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ AudioToolbox AVFoundation Carbon @@ -179,7 +179,7 @@ stdenv.mkDerivation (finalAttrs: { WITH_CUPS = cups != null; WITH_FAAC = withUnfree && faac != null; WITH_FAAD2 = faad2 != null; - WITH_FUSE = stdenv.isLinux && fuse3 != null; + WITH_FUSE = stdenv.hostPlatform.isLinux && fuse3 != null; WITH_JPEG = libjpeg_turbo != null; WITH_KRB5 = libkrb5 != null; WITH_OPENH264 = openh264 != null; @@ -194,7 +194,7 @@ stdenv.mkDerivation (finalAttrs: { WITH_X11 = true; }; - env.NIX_CFLAGS_COMPILE = toString (lib.optionals stdenv.isDarwin [ + env.NIX_CFLAGS_COMPILE = toString (lib.optionals stdenv.hostPlatform.isDarwin [ "-DTARGET_OS_IPHONE=0" "-DTARGET_OS_WATCH=0" "-include AudioToolbox/AudioToolbox.h" @@ -202,7 +202,7 @@ stdenv.mkDerivation (finalAttrs: { "-Wno-error=incompatible-function-pointer-types" ]); - env.NIX_LDFLAGS = toString (lib.optionals stdenv.isDarwin [ + env.NIX_LDFLAGS = toString (lib.optionals stdenv.hostPlatform.isDarwin [ "-framework AudioToolbox" ]); diff --git a/pkgs/applications/networking/remote/freerdp/default.nix b/pkgs/applications/networking/remote/freerdp/default.nix index 988986812e30..7490066c7327 100644 --- a/pkgs/applications/networking/remote/freerdp/default.nix +++ b/pkgs/applications/networking/remote/freerdp/default.nix @@ -64,7 +64,7 @@ let dir = "libfreerdp/crypto/test"; file = "Test_x509_cert_info.c"; } - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ { dir = "winpr/libwinpr/sysinfo/test"; file = "TestGetComputerName.c"; @@ -140,11 +140,11 @@ stdenv.mkDerivation rec { pcre2 pcsclite zlib - ] ++ optionals stdenv.isLinux [ + ] ++ optionals stdenv.hostPlatform.isLinux [ alsa-lib systemd wayland - ] ++ optionals stdenv.isDarwin [ + ] ++ optionals stdenv.hostPlatform.isDarwin [ AudioToolbox AVFoundation Carbon @@ -185,7 +185,7 @@ stdenv.mkDerivation rec { WITH_X11 = true; }; - env.NIX_CFLAGS_COMPILE = toString (lib.optionals stdenv.isDarwin [ + env.NIX_CFLAGS_COMPILE = toString (lib.optionals stdenv.hostPlatform.isDarwin [ "-DTARGET_OS_IPHONE=0" "-DTARGET_OS_WATCH=0" "-include AudioToolbox/AudioToolbox.h" @@ -193,7 +193,7 @@ stdenv.mkDerivation rec { "-Wno-error=incompatible-function-pointer-types" ]); - NIX_LDFLAGS = lib.optionals stdenv.isDarwin [ + NIX_LDFLAGS = lib.optionals stdenv.hostPlatform.isDarwin [ "-framework AudioToolbox" ]; diff --git a/pkgs/applications/networking/remote/putty/default.nix b/pkgs/applications/networking/remote/putty/default.nix index 82f096699b20..585f48d3a5f8 100644 --- a/pkgs/applications/networking/remote/putty/default.nix +++ b/pkgs/applications/networking/remote/putty/default.nix @@ -17,7 +17,7 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ cmake perl pkg-config copyDesktopItems ]; buildInputs = lib.optionals stdenv.hostPlatform.isUnix [ gtk3 ncurses - ] ++ lib.optional stdenv.isDarwin darwin.apple_sdk.libs.utmp; + ] ++ lib.optional stdenv.hostPlatform.isDarwin darwin.apple_sdk.libs.utmp; enableParallelBuilding = true; desktopItems = [ diff --git a/pkgs/applications/networking/remote/rdesktop/default.nix b/pkgs/applications/networking/remote/rdesktop/default.nix index a544984ee76b..b92822b17d3f 100644 --- a/pkgs/applications/networking/remote/rdesktop/default.nix +++ b/pkgs/applications/networking/remote/rdesktop/default.nix @@ -1,6 +1,6 @@ { lib, stdenv, fetchFromGitHub, openssl, libX11, krb5, libXcursor, libtasn1 , nettle, gnutls, pkg-config, autoreconfHook, libiconv -, enableCredssp ? (!stdenv.isDarwin) +, enableCredssp ? (!stdenv.hostPlatform.isDarwin) } : stdenv.mkDerivation (rec { @@ -17,7 +17,7 @@ stdenv.mkDerivation (rec { nativeBuildInputs = [pkg-config autoreconfHook]; buildInputs = [openssl libX11 libXcursor libtasn1 nettle gnutls] ++ lib.optional enableCredssp krb5 - ++ lib.optional stdenv.isDarwin libiconv; + ++ lib.optional stdenv.hostPlatform.isDarwin libiconv; configureFlags = [ "--with-ipv6" diff --git a/pkgs/applications/networking/remote/remmina/default.nix b/pkgs/applications/networking/remote/remmina/default.nix index c960d0b473b2..eb926ff1c066 100644 --- a/pkgs/applications/networking/remote/remmina/default.nix +++ b/pkgs/applications/networking/remote/remmina/default.nix @@ -10,8 +10,8 @@ , wayland # The themes here are soft dependencies; only icons are missing without them. , adwaita-icon-theme -, withKf5Wallet ? stdenv.isLinux, libsForQt5 -, withLibsecret ? stdenv.isLinux +, withKf5Wallet ? stdenv.hostPlatform.isLinux, libsForQt5 +, withLibsecret ? stdenv.hostPlatform.isLinux , withWebkitGtk ? false, webkitgtk_4_1 , withVte ? true, vte }: @@ -36,7 +36,7 @@ stdenv.mkDerivation (finalAttrs: { ]; nativeBuildInputs = [ cmake ninja pkg-config wrapGAppsHook3 ] - ++ lib.optionals stdenv.isDarwin [ desktopToDarwinBundle ]; + ++ lib.optionals stdenv.hostPlatform.isDarwin [ desktopToDarwinBundle ]; buildInputs = [ curl @@ -51,7 +51,7 @@ stdenv.mkDerivation (finalAttrs: { openssl adwaita-icon-theme json-glib libsodium harfbuzz python3 wayland - ] ++ lib.optionals stdenv.isLinux [ fuse3 libappindicator-gtk3 libdbusmenu-gtk3 ] + ] ++ lib.optionals stdenv.hostPlatform.isLinux [ fuse3 libappindicator-gtk3 libdbusmenu-gtk3 ] ++ lib.optionals withLibsecret [ libsecret ] ++ lib.optionals withKf5Wallet [ libsForQt5.kwallet ] ++ lib.optionals withWebkitGtk [ webkitgtk_4_1 ] @@ -65,13 +65,13 @@ stdenv.mkDerivation (finalAttrs: { "-DWITH_KF5WALLET=${if withKf5Wallet then "ON" else "OFF"}" "-DWITH_LIBSECRET=${if withLibsecret then "ON" else "OFF"}" "-DWITH_WEBKIT2GTK=${if withWebkitGtk then "ON" else "OFF"}" - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ "-DHAVE_LIBAPPINDICATOR=OFF" "-DWITH_CUPS=OFF" "-DWITH_ICON_CACHE=OFF" ]; - env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.isDarwin (toString [ + env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.hostPlatform.isDarwin (toString [ "-DTARGET_OS_IPHONE=0" "-DTARGET_OS_WATCH=0" ]); @@ -82,7 +82,7 @@ stdenv.mkDerivation (finalAttrs: { gappsWrapperArgs+=( --set-default SSL_CERT_DIR "/etc/ssl/certs/" --prefix LD_LIBRARY_PATH : "${libX11.out}/lib" - ${lib.optionalString stdenv.isDarwin '' + ${lib.optionalString stdenv.hostPlatform.isDarwin '' --prefix XDG_DATA_DIRS : "$XDG_ICON_DIRS" ''} ) diff --git a/pkgs/applications/networking/rymdport/default.nix b/pkgs/applications/networking/rymdport/default.nix index 08c5243414da..70b446db8a5a 100644 --- a/pkgs/applications/networking/rymdport/default.nix +++ b/pkgs/applications/networking/rymdport/default.nix @@ -35,7 +35,7 @@ buildGoModule rec { libXinerama libXrandr libXxf86vm - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ Carbon Cocoa IOKit diff --git a/pkgs/applications/networking/sniffers/qtwirediff/default.nix b/pkgs/applications/networking/sniffers/qtwirediff/default.nix index 7cadaee0e203..ad71c217dbb9 100644 --- a/pkgs/applications/networking/sniffers/qtwirediff/default.nix +++ b/pkgs/applications/networking/sniffers/qtwirediff/default.nix @@ -27,17 +27,17 @@ stdenv.mkDerivation { buildInputs = [ qtbase - ] ++ lib.optionals stdenv.isLinux [ + ] ++ lib.optionals stdenv.hostPlatform.isLinux [ qtwayland ]; installPhase = '' runHook preInstall - '' + lib.optionalString stdenv.isDarwin '' + '' + lib.optionalString stdenv.hostPlatform.isDarwin '' mkdir -p $out/Applications cp -r qtwirediff.app $out/Applications makeWrapper $out/{Applications/qtwirediff.app/Contents/MacOS,bin}/qtwirediff - '' + lib.optionalString stdenv.isLinux '' + '' + lib.optionalString stdenv.hostPlatform.isLinux '' install -Dm755 -T qtwirediff $out/bin/qtwirediff wrapProgram $out/bin/qtwirediff \ --prefix PATH : "${lib.makeBinPath [ wireshark-cli ]}" diff --git a/pkgs/applications/networking/sniffers/wireshark/default.nix b/pkgs/applications/networking/sniffers/wireshark/default.nix index 191924ac7002..04f62befcc9b 100644 --- a/pkgs/applications/networking/sniffers/wireshark/default.nix +++ b/pkgs/applications/networking/sniffers/wireshark/default.nix @@ -51,7 +51,7 @@ , qt6 ? null }: let - isAppBundle = withQt && stdenv.isDarwin; + isAppBundle = withQt && stdenv.hostPlatform.isDarwin; in assert withQt -> qt6 != null; @@ -89,7 +89,7 @@ stdenv.mkDerivation rec { ] ++ lib.optionals withQt [ qt6.wrapQtAppsHook wrapGAppsHook3 - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ fixDarwinDylibNames ]; @@ -126,13 +126,13 @@ stdenv.mkDerivation rec { qtmultimedia qtsvg qttools - ]) ++ lib.optionals (withQt && stdenv.isLinux) [ + ]) ++ lib.optionals (withQt && stdenv.hostPlatform.isLinux) [ qt6.qtwayland - ] ++ lib.optionals stdenv.isLinux [ + ] ++ lib.optionals stdenv.hostPlatform.isLinux [ libcap libnl sbc - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ ApplicationServices gmp SystemConfiguration @@ -171,7 +171,7 @@ stdenv.mkDerivation rec { '' + lib.optionalString isAppBundle '' mkdir -p $out/Applications mv $out/bin/Wireshark.app $out/Applications/Wireshark.app - '' + lib.optionalString stdenv.isDarwin '' + '' + lib.optionalString stdenv.hostPlatform.isDarwin '' local flags=() for file in $out/lib/*.dylib; do flags+=(-change @rpath/"$(basename "$file")" "$file") diff --git a/pkgs/applications/networking/sniffnet/default.nix b/pkgs/applications/networking/sniffnet/default.nix index 79df10e20751..146c0941e850 100644 --- a/pkgs/applications/networking/sniffnet/default.nix +++ b/pkgs/applications/networking/sniffnet/default.nix @@ -33,7 +33,7 @@ rustPlatform.buildRustPackage rec { buildInputs = [ libpcap openssl - ] ++ lib.optionals stdenv.isLinux [ + ] ++ lib.optionals stdenv.hostPlatform.isLinux [ alsa-lib expat fontconfig @@ -42,7 +42,7 @@ rustPlatform.buildRustPackage rec { xorg.libXcursor xorg.libXi xorg.libXrandr - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.AppKit rustPlatform.bindgenHook ]; @@ -62,7 +62,7 @@ rustPlatform.buildRustPackage rec { --replace 'Exec=/usr/bin/sniffnet' 'Exec=sniffnet' ''; - postFixup = lib.optionalString stdenv.isLinux '' + postFixup = lib.optionalString stdenv.hostPlatform.isLinux '' patchelf $out/bin/sniffnet \ --add-rpath ${lib.makeLibraryPath [ vulkan-loader xorg.libX11 libxkbcommon wayland ]} ''; diff --git a/pkgs/applications/networking/sync/celeste/default.nix b/pkgs/applications/networking/sync/celeste/default.nix index fe2d7b07acc8..b1a946f244f9 100644 --- a/pkgs/applications/networking/sync/celeste/default.nix +++ b/pkgs/applications/networking/sync/celeste/default.nix @@ -66,12 +66,12 @@ rustPlatform.buildRustPackage rec { libadwaita librclone pango - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.Foundation darwin.apple_sdk.frameworks.Security ]; - env.NIX_CFLAGS_COMPILE = toString (lib.optionals stdenv.isDarwin [ + env.NIX_CFLAGS_COMPILE = toString (lib.optionals stdenv.hostPlatform.isDarwin [ "-Wno-error=incompatible-function-pointer-types" ]); diff --git a/pkgs/applications/networking/sync/lsyncd/default.nix b/pkgs/applications/networking/sync/lsyncd/default.nix index bdb1b69289fe..66fa5665ccaf 100644 --- a/pkgs/applications/networking/sync/lsyncd/default.nix +++ b/pkgs/applications/networking/sync/lsyncd/default.nix @@ -19,7 +19,7 @@ stdenv.mkDerivation rec { # Special flags needed on Darwin: # https://github.com/axkibe/lsyncd/blob/42413cabbedca429d55a5378f6e830f191f3cc86/INSTALL#L51 - cmakeFlags = lib.optionals stdenv.isDarwin [ "-DWITH_INOTIFY=OFF" "-DWITH_FSEVENTS=ON" "-DXNU_DIR=${xnu}/include" ]; + cmakeFlags = lib.optionals stdenv.hostPlatform.isDarwin [ "-DWITH_INOTIFY=OFF" "-DWITH_FSEVENTS=ON" "-DXNU_DIR=${xnu}/include" ]; dontUseCmakeBuildDir = true; diff --git a/pkgs/applications/networking/sync/rclone/default.nix b/pkgs/applications/networking/sync/rclone/default.nix index df4001e1d0b7..a76ad3ab4421 100644 --- a/pkgs/applications/networking/sync/rclone/default.nix +++ b/pkgs/applications/networking/sync/rclone/default.nix @@ -23,13 +23,13 @@ buildGoModule rec { nativeBuildInputs = [ installShellFiles makeWrapper ]; - buildInputs = lib.optional enableCmount (if stdenv.isDarwin then macfuse-stubs else fuse); + buildInputs = lib.optional enableCmount (if stdenv.hostPlatform.isDarwin then macfuse-stubs else fuse); tags = lib.optionals enableCmount [ "cmount" ]; ldflags = [ "-s" "-w" "-X github.com/rclone/rclone/fs.Version=${version}" ]; - postConfigure = lib.optionalString (!stdenv.isDarwin) '' + postConfigure = lib.optionalString (!stdenv.hostPlatform.isDarwin) '' substituteInPlace vendor/github.com/winfsp/cgofuse/fuse/host_cgo.go \ --replace-fail '"libfuse.so.2"' '"${lib.getLib fuse}/lib/libfuse.so.2"' ''; @@ -51,7 +51,7 @@ buildGoModule rec { # filesystem helpers ln -s $out/bin/rclone $out/bin/rclonefs ln -s $out/bin/rclone $out/bin/mount.rclone - '' + lib.optionalString (enableCmount && !stdenv.isDarwin) + '' + lib.optionalString (enableCmount && !stdenv.hostPlatform.isDarwin) # use --suffix here to ensure we don't shadow /run/wrappers/bin/fusermount3, # as the setuid wrapper is required as non-root on NixOS. '' diff --git a/pkgs/applications/networking/syncplay/default.nix b/pkgs/applications/networking/syncplay/default.nix index 956dd598d4c3..f7d0fdeb5c36 100644 --- a/pkgs/applications/networking/syncplay/default.nix +++ b/pkgs/applications/networking/syncplay/default.nix @@ -28,11 +28,11 @@ buildPythonApplication rec { ./trusted_certificates.patch ]; - buildInputs = lib.optionals enableGUI [ (if stdenv.isLinux then qt6.qtwayland else qt6.qtbase) ]; + buildInputs = lib.optionals enableGUI [ (if stdenv.hostPlatform.isLinux then qt6.qtwayland else qt6.qtbase) ]; propagatedBuildInputs = [ certifi pem twisted ] ++ twisted.optional-dependencies.tls ++ lib.optional enableGUI pyside6 - ++ lib.optional (stdenv.isDarwin && enableGUI) appnope; + ++ lib.optional (stdenv.hostPlatform.isDarwin && enableGUI) appnope; nativeBuildInputs = lib.optionals enableGUI [ qt6.wrapQtAppsHook ]; makeFlags = [ "DESTDIR=" "PREFIX=$(out)" ]; diff --git a/pkgs/applications/networking/syncthing/default.nix b/pkgs/applications/networking/syncthing/default.nix index 99934a964638..b87752f0412b 100644 --- a/pkgs/applications/networking/syncthing/default.nix +++ b/pkgs/applications/networking/syncthing/default.nix @@ -24,7 +24,7 @@ let vendorHash = "sha256-R5GlsCkfoMc5km+NaV+TNUlM3Ot1ARcXfEFimcZOLI4="; - nativeBuildInputs = lib.optionals stdenv.isDarwin [ + nativeBuildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ # Recent versions of macOS seem to require binaries to be signed when # run from Launch Agents/Daemons, even on x86 devices where it has a # more lax code signing policy compared to Apple Silicon. So just sign @@ -87,7 +87,7 @@ in install -Dm644 "$mf" "$mandir/$(basename "$mf")" done - '' + lib.optionalString (stdenv.isLinux) '' + '' + lib.optionalString (stdenv.hostPlatform.isLinux) '' mkdir -p $out/lib/systemd/{system,user} substitute etc/linux-systemd/system/syncthing@.service \ @@ -109,7 +109,7 @@ in stname = "syncthing-relay"; target = "strelaysrv"; - postInstall = lib.optionalString (stdenv.isLinux) '' + postInstall = lib.optionalString (stdenv.hostPlatform.isLinux) '' mkdir -p $out/lib/systemd/system substitute cmd/strelaysrv/etc/linux-systemd/strelaysrv.service \ diff --git a/pkgs/applications/networking/synology-drive-client/default.nix b/pkgs/applications/networking/synology-drive-client/default.nix index 0c2f6c1d5ae7..fb930edd1447 100644 --- a/pkgs/applications/networking/synology-drive-client/default.nix +++ b/pkgs/applications/networking/synology-drive-client/default.nix @@ -78,4 +78,4 @@ let cp -R 'Synology Drive Client.app' $out/Applications/ ''; }; -in if stdenv.isDarwin then darwin else linux +in if stdenv.hostPlatform.isDarwin then darwin else linux diff --git a/pkgs/applications/networking/umurmur/default.nix b/pkgs/applications/networking/umurmur/default.nix index 5af5c568e463..5f87a7395462 100644 --- a/pkgs/applications/networking/umurmur/default.nix +++ b/pkgs/applications/networking/umurmur/default.nix @@ -30,7 +30,7 @@ stdenv.mkDerivation rec { homepage = "https://github.com/umurmur/umurmur"; platforms = platforms.all; # never built on aarch64-darwin since first introduction in nixpkgs - broken = stdenv.isDarwin && stdenv.isAarch64; + broken = stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isAarch64; mainProgram = "umurmurd"; }; } diff --git a/pkgs/applications/networking/warp/default.nix b/pkgs/applications/networking/warp/default.nix index d7f64031c969..c41cc99df4b4 100644 --- a/pkgs/applications/networking/warp/default.nix +++ b/pkgs/applications/networking/warp/default.nix @@ -76,7 +76,7 @@ stdenv.mkDerivation rec { gstreamer gst-plugins-base gst-plugins-bad - ]) ++ lib.optionals stdenv.isDarwin [ + ]) ++ lib.optionals stdenv.hostPlatform.isDarwin [ Security Foundation ]; @@ -88,6 +88,6 @@ stdenv.mkDerivation rec { maintainers = with lib.maintainers; [ dotlambda foo-dogsquared ]; platforms = lib.platforms.all; mainProgram = "warp"; - broken = stdenv.isDarwin; + broken = stdenv.hostPlatform.isDarwin; }; } diff --git a/pkgs/applications/networking/yaup/default.nix b/pkgs/applications/networking/yaup/default.nix index 238bedd52be0..d2fa2778fc87 100644 --- a/pkgs/applications/networking/yaup/default.nix +++ b/pkgs/applications/networking/yaup/default.nix @@ -52,7 +52,7 @@ stdenv.mkDerivation { maintainers = with maintainers; [ fgaz ]; platforms = platforms.all; # ld: unknown option: --export-dynamic - broken = stdenv.isDarwin; + broken = stdenv.hostPlatform.isDarwin; mainProgram = "yaup"; }; } diff --git a/pkgs/applications/office/PageEdit/default.nix b/pkgs/applications/office/PageEdit/default.nix index 5f47ca9bbe68..fa7acd9310ba 100644 --- a/pkgs/applications/office/PageEdit/default.nix +++ b/pkgs/applications/office/PageEdit/default.nix @@ -16,7 +16,7 @@ stdenv.mkDerivation rec { cmakeFlags = [ "-DINSTALL_BUNDLED_DICTS=0" ]; installPhase = - if stdenv.isDarwin then '' + if stdenv.hostPlatform.isDarwin then '' runHook preInstall mkdir -p $out/Applications diff --git a/pkgs/applications/office/appflowy/default.nix b/pkgs/applications/office/appflowy/default.nix index a7a979ed82d3..f3a7ea76c533 100644 --- a/pkgs/applications/office/appflowy/default.nix +++ b/pkgs/applications/office/appflowy/default.nix @@ -40,7 +40,7 @@ stdenvNoCC.mkDerivation (finalAttrs: { nativeBuildInputs = [ makeWrapper copyDesktopItems - ] ++ lib.optionals stdenvNoCC.isLinux [ autoPatchelfHook ]; + ] ++ lib.optionals stdenvNoCC.hostPlatform.isLinux [ autoPatchelfHook ]; buildInputs = [ gtk3 @@ -52,7 +52,7 @@ stdenvNoCC.mkDerivation (finalAttrs: { dontConfigure = true; installPhase = - lib.optionalString stdenvNoCC.isLinux '' + lib.optionalString stdenvNoCC.hostPlatform.isLinux '' runHook preInstall cd AppFlowy/ @@ -67,7 +67,7 @@ stdenvNoCC.mkDerivation (finalAttrs: { runHook postInstall '' - + lib.optionalString stdenvNoCC.isDarwin '' + + lib.optionalString stdenvNoCC.hostPlatform.isDarwin '' runHook preInstall mkdir -p $out/{Applications,bin} @@ -77,17 +77,17 @@ stdenvNoCC.mkDerivation (finalAttrs: { ''; preFixup = - lib.optionalString stdenvNoCC.isLinux '' + lib.optionalString stdenvNoCC.hostPlatform.isLinux '' # Add missing libraries to appflowy using the ones it comes with makeWrapper $out/opt/AppFlowy $out/bin/appflowy \ --set LD_LIBRARY_PATH "$out/opt/lib/" \ --prefix PATH : "${lib.makeBinPath [ xdg-user-dirs ]}" '' - + lib.optionalString stdenvNoCC.isDarwin '' + + lib.optionalString stdenvNoCC.hostPlatform.isDarwin '' makeWrapper $out/Applications/AppFlowy.app/Contents/MacOS/AppFlowy $out/bin/appflowy ''; - desktopItems = lib.optionals stdenvNoCC.isLinux [ + desktopItems = lib.optionals stdenvNoCC.hostPlatform.isLinux [ (makeDesktopItem { name = "appflowy"; desktopName = "AppFlowy"; diff --git a/pkgs/applications/office/beamerpresenter/default.nix b/pkgs/applications/office/beamerpresenter/default.nix index 2749f3577c98..0d122cfbf3cd 100644 --- a/pkgs/applications/office/beamerpresenter/default.nix +++ b/pkgs/applications/office/beamerpresenter/default.nix @@ -55,7 +55,7 @@ stdenv.mkDerivation rec { qtsvg qtmultimedia qttools - ] ++ lib.optionals stdenv.isLinux [ + ] ++ lib.optionals stdenv.hostPlatform.isLinux [ qtwayland ] ++ lib.optionals useMupdf [ freetype diff --git a/pkgs/applications/office/espanso/default.nix b/pkgs/applications/office/espanso/default.nix index c8883f36339e..5679c44ca2dc 100644 --- a/pkgs/applications/office/espanso/default.nix +++ b/pkgs/applications/office/espanso/default.nix @@ -30,14 +30,14 @@ , WebKit , System , waylandSupport ? false -, x11Support ? stdenv.isLinux +, x11Support ? stdenv.hostPlatform.isLinux , testers , espanso }: # espanso does not support building with both X11 and Wayland support at the same time -assert stdenv.isLinux -> x11Support != waylandSupport; -assert stdenv.isDarwin -> !x11Support; -assert stdenv.isDarwin -> !waylandSupport; +assert stdenv.hostPlatform.isLinux -> x11Support != waylandSupport; +assert stdenv.hostPlatform.isDarwin -> !x11Support; +assert stdenv.hostPlatform.isDarwin -> !waylandSupport; rustPlatform.buildRustPackage rec { pname = "espanso"; version = "2.2-unstable-2024-05-14"; @@ -69,20 +69,20 @@ rustPlatform.buildRustPackage rec { "modulo" ] ++ lib.optionals waylandSupport [ "wayland" - ] ++ lib.optionals stdenv.isLinux [ + ] ++ lib.optionals stdenv.hostPlatform.isLinux [ "vendored-tls" - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ "native-tls" ]; buildInputs = [ wxGTK32 - ] ++ lib.optionals stdenv.isLinux [ + ] ++ lib.optionals stdenv.hostPlatform.isLinux [ openssl dbus libnotify libxkbcommon - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ AppKit Cocoa Foundation @@ -104,7 +104,7 @@ rustPlatform.buildRustPackage rec { xdotool ]; - postPatch = lib.optionalString stdenv.isDarwin '' + postPatch = lib.optionalString stdenv.hostPlatform.isDarwin '' substituteInPlace scripts/create_bundle.sh \ --replace-fail target/mac/ $out/Applications/ \ --replace-fail /bin/echo ${coreutils}/bin/echo @@ -119,12 +119,12 @@ rustPlatform.buildRustPackage rec { doCheck = false; postInstall = - if stdenv.isDarwin then '' + if stdenv.hostPlatform.isDarwin then '' EXEC_PATH=$out/bin/espanso BUILD_ARCH=current ${stdenv.shell} ./scripts/create_bundle.sh '' else '' wrapProgram $out/bin/espanso \ --prefix PATH : ${lib.makeBinPath ( - lib.optionals stdenv.isLinux [ + lib.optionals stdenv.hostPlatform.isLinux [ libnotify setxkbmap ] ++ lib.optionals waylandSupport [ diff --git a/pkgs/applications/office/jameica/default.nix b/pkgs/applications/office/jameica/default.nix index f87eaf6d9e4d..32cbcf088c51 100644 --- a/pkgs/applications/office/jameica/default.nix +++ b/pkgs/applications/office/jameica/default.nix @@ -48,8 +48,8 @@ stdenv.mkDerivation rec { }; nativeBuildInputs = [ ant jdk wrapGAppsHook3 makeWrapper stripJavaArchivesHook ]; - buildInputs = lib.optionals stdenv.isLinux [ gtk2 glib libXtst ] - ++ lib.optional stdenv.isDarwin Cocoa; + buildInputs = lib.optionals stdenv.hostPlatform.isLinux [ gtk2 glib libXtst ] + ++ lib.optional stdenv.hostPlatform.isDarwin Cocoa; dontWrapGApps = true; @@ -82,7 +82,7 @@ stdenv.mkDerivation rec { postFixup = '' makeWrapper ${jre}/bin/java $out/bin/jameica \ --add-flags "-cp $out/share/java/jameica.jar:$out/share/jameica-${version}/* ${ - lib.optionalString stdenv.isDarwin ''-Xdock:name="Jameica" -XstartOnFirstThread'' + lib.optionalString stdenv.hostPlatform.isDarwin ''-Xdock:name="Jameica" -XstartOnFirstThread'' } de.willuhn.jameica.Main" \ --prefix LD_LIBRARY_PATH : ${lib.escapeShellArg (lib.makeLibraryPath buildInputs)} \ --chdir "$out/share/java/" \ diff --git a/pkgs/applications/office/kitsas/default.nix b/pkgs/applications/office/kitsas/default.nix index f8f32ecec6ed..9821cdd2f2f8 100644 --- a/pkgs/applications/office/kitsas/default.nix +++ b/pkgs/applications/office/kitsas/default.nix @@ -28,10 +28,10 @@ stdenv.mkDerivation rec { qmakeFlags = [ "../kitsas/kitsas.pro" ]; - installPhase = lib.optionalString stdenv.isDarwin '' + installPhase = lib.optionalString stdenv.hostPlatform.isDarwin '' mkdir -p $out/Applications mv kitsas.app $out/Applications - '' + lib.optionalString (!stdenv.isDarwin) '' + '' + lib.optionalString (!stdenv.hostPlatform.isDarwin) '' install -Dm755 kitsas -t $out/bin install -Dm644 ../kitsas.svg -t $out/share/icons/hicolor/scalable/apps install -Dm644 ../kitsas.png -t $out/share/icons/hicolor/256x256/apps diff --git a/pkgs/applications/office/libreoffice/wrapper.nix b/pkgs/applications/office/libreoffice/wrapper.nix index d2e62f8e5c74..aeab3da08dd7 100644 --- a/pkgs/applications/office/libreoffice/wrapper.nix +++ b/pkgs/applications/office/libreoffice/wrapper.nix @@ -16,7 +16,7 @@ , gnugrep # Configuration options for the wrapper , extraMakeWrapperArgs ? [] -, dbusVerify ? stdenv.isLinux +, dbusVerify ? stdenv.hostPlatform.isLinux , dbus }: diff --git a/pkgs/applications/office/micropad/default.nix b/pkgs/applications/office/micropad/default.nix index 46c318ffbd11..8fd6b2dd5228 100644 --- a/pkgs/applications/office/micropad/default.nix +++ b/pkgs/applications/office/micropad/default.nix @@ -35,7 +35,7 @@ stdenv.mkDerivation (finalAttrs: { }; nativeBuildInputs = [ yarnBuildHook copyDesktopItems makeWrapper ] - ++ lib.optionals stdenv.isDarwin [ desktopToDarwinBundle ]; + ++ lib.optionals stdenv.hostPlatform.isDarwin [ desktopToDarwinBundle ]; installPhase = '' runHook preInstall diff --git a/pkgs/applications/office/mmex/default.nix b/pkgs/applications/office/mmex/default.nix index 14f3c4098102..b88f70225873 100644 --- a/pkgs/applications/office/mmex/default.nix +++ b/pkgs/applications/office/mmex/default.nix @@ -27,10 +27,10 @@ stdenv.mkDerivation rec { hash = "sha256-TQgJ2Q4Z7+OtwuwkfPBgm2BmMKML9nmyFLSkmKJ1RE4="; }; - postPatch = lib.optionalString (stdenv.isDarwin && stdenv.isx86_64) '' + postPatch = lib.optionalString (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isx86_64) '' substituteInPlace src/platfdep_mac.mm \ --replace "appearance.name == NSAppearanceNameDarkAqua" "NO" - '' + lib.optionalString (stdenv.isLinux && !stdenv.isx86_64) '' + '' + lib.optionalString (stdenv.hostPlatform.isLinux && !stdenv.hostPlatform.isx86_64) '' substituteInPlace 3rd/CMakeLists.txt \ --replace "-msse4.2 -maes" "" ''; @@ -42,7 +42,7 @@ stdenv.mkDerivation rec { makeWrapper pkg-config wrapGAppsHook3 - ] ++ lib.optionals stdenv.isLinux [ + ] ++ lib.optionals stdenv.hostPlatform.isLinux [ lsb-release ]; @@ -51,7 +51,7 @@ stdenv.mkDerivation rec { sqlite wxGTK32 gtk3 - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ darwin.libobjc ]; @@ -61,7 +61,7 @@ stdenv.mkDerivation rec { "-Wno-unused-parameter" ]); - postInstall = lib.optionalString stdenv.isDarwin '' + postInstall = lib.optionalString stdenv.hostPlatform.isDarwin '' mkdir -p $out/{Applications,bin} mv $out/mmex.app $out/Applications makeWrapper $out/{Applications/mmex.app/Contents/MacOS,bin}/mmex diff --git a/pkgs/applications/office/paperless-ngx/default.nix b/pkgs/applications/office/paperless-ngx/default.nix index 9e8f2e6f6a34..3dc090921941 100644 --- a/pkgs/applications/office/paperless-ngx/default.nix +++ b/pkgs/applications/office/paperless-ngx/default.nix @@ -81,13 +81,13 @@ let nativeBuildInputs = [ pkg-config python3 - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ xcbuild ]; buildInputs = [ pango - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ giflib darwin.apple_sdk.frameworks.CoreText ]; @@ -254,7 +254,7 @@ python.pkgs.buildPythonApplication rec { "test_rtl_language_detection" ]; - doCheck = !stdenv.isDarwin; + doCheck = !stdenv.hostPlatform.isDarwin; passthru = { inherit python path frontend tesseract5; diff --git a/pkgs/applications/office/pympress/default.nix b/pkgs/applications/office/pympress/default.nix index 8ada870912eb..f370ecec9ddf 100644 --- a/pkgs/applications/office/pympress/default.nix +++ b/pkgs/applications/office/pympress/default.nix @@ -7,9 +7,9 @@ , gobject-introspection , libcanberra-gtk3 , poppler_gi -, withGstreamer ? stdenv.isLinux +, withGstreamer ? stdenv.hostPlatform.isLinux , gst_all_1 -, withVLC ? stdenv.isLinux +, withVLC ? stdenv.hostPlatform.isLinux }: python3Packages.buildPythonApplication rec { diff --git a/pkgs/applications/office/qnotero/default.nix b/pkgs/applications/office/qnotero/default.nix index c091f61dffc6..4fd2e741adb0 100644 --- a/pkgs/applications/office/qnotero/default.nix +++ b/pkgs/applications/office/qnotero/default.nix @@ -47,7 +47,7 @@ python3Packages.buildPythonPackage rec { homepage = "https://www.cogsci.nl/software/qnotero"; license = lib.licenses.gpl2; platforms = lib.platforms.unix; - broken = stdenv.isDarwin; # Build fails even after adding cx-freeze to `buildInputs` + broken = stdenv.hostPlatform.isDarwin; # Build fails even after adding cx-freeze to `buildInputs` maintainers = [ lib.maintainers.nico202 ]; }; } diff --git a/pkgs/applications/office/qownnotes/default.nix b/pkgs/applications/office/qownnotes/default.nix index 2b8d0d089269..71b574ee38e5 100644 --- a/pkgs/applications/office/qownnotes/default.nix +++ b/pkgs/applications/office/qownnotes/default.nix @@ -37,7 +37,7 @@ stdenv.mkDerivation { pkg-config installShellFiles xvfb-run - ] ++ lib.optionals stdenv.isDarwin [ makeWrapper ]; + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ makeWrapper ]; buildInputs = [ qtbase @@ -45,7 +45,7 @@ stdenv.mkDerivation { qtsvg qtwebsockets botan2 - ] ++ lib.optionals stdenv.isLinux [ qtwayland ]; + ] ++ lib.optionals stdenv.hostPlatform.isLinux [ qtwayland ]; cmakeFlags = [ "-DQON_QT6_BUILD=ON" @@ -61,11 +61,11 @@ stdenv.mkDerivation { --fish <(xvfb-run $out/bin/${appname} --completion fish) '' # Create a lowercase symlink for Linux - + lib.optionalString stdenv.isLinux '' + + lib.optionalString stdenv.hostPlatform.isLinux '' ln -s $out/bin/${appname} $out/bin/${pname} '' # Wrap application for macOS as lowercase binary - + lib.optionalString stdenv.isDarwin '' + + lib.optionalString stdenv.hostPlatform.isDarwin '' mkdir -p $out/Applications mv $out/bin/${appname}.app $out/Applications makeWrapper $out/Applications/${appname}.app/Contents/MacOS/${appname} $out/bin/${pname} diff --git a/pkgs/applications/office/roam-research/default.nix b/pkgs/applications/office/roam-research/default.nix index 408f026bc57a..3edbbe1a5081 100644 --- a/pkgs/applications/office/roam-research/default.nix +++ b/pkgs/applications/office/roam-research/default.nix @@ -2,7 +2,7 @@ let extraArgs = removeAttrs args [ "callPackage" ]; in -if stdenv.isDarwin then +if stdenv.hostPlatform.isDarwin then callPackage ./darwin.nix (extraArgs // { }) else callPackage ./linux.nix (extraArgs // { }) diff --git a/pkgs/applications/office/scribus/default.nix b/pkgs/applications/office/scribus/default.nix index 85c0afe9db66..f95ac14c67ab 100644 --- a/pkgs/applications/office/scribus/default.nix +++ b/pkgs/applications/office/scribus/default.nix @@ -83,6 +83,6 @@ stdenv.mkDerivation (finalAttrs: { mit publicDomain ]; - broken = stdenv.isDarwin; + broken = stdenv.hostPlatform.isDarwin; }; }) diff --git a/pkgs/applications/office/treesheets/default.nix b/pkgs/applications/office/treesheets/default.nix index b52dc1dc835f..a696ab541280 100644 --- a/pkgs/applications/office/treesheets/default.nix +++ b/pkgs/applications/office/treesheets/default.nix @@ -30,13 +30,13 @@ stdenv.mkDerivation rec { buildInputs = [ wxGTK - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ Cocoa ]; env.NIX_CFLAGS_COMPILE = "-DPACKAGE_VERSION=\"${builtins.replaceStrings [ "unstable-" ] [ "" ] version}\""; - postInstall = lib.optionalString stdenv.isDarwin '' + postInstall = lib.optionalString stdenv.hostPlatform.isDarwin '' shopt -s extglob mkdir -p $out/{share/treesheets,bin} mv $out/!(share) $out/share/treesheets diff --git a/pkgs/applications/office/trilium/desktop.nix b/pkgs/applications/office/trilium/desktop.nix index 9681c5fc9b8a..13a291f45804 100644 --- a/pkgs/applications/office/trilium/desktop.nix +++ b/pkgs/applications/office/trilium/desktop.nix @@ -96,4 +96,4 @@ let }; in - if stdenv.isDarwin then darwin else linux + if stdenv.hostPlatform.isDarwin then darwin else linux diff --git a/pkgs/applications/office/wordgrinder/default.nix b/pkgs/applications/office/wordgrinder/default.nix index 3647d8ea8e22..c3b2aaf42a07 100644 --- a/pkgs/applications/office/wordgrinder/default.nix +++ b/pkgs/applications/office/wordgrinder/default.nix @@ -19,7 +19,7 @@ stdenv.mkDerivation rec { "OBJDIR=$TMP/wg-build" ]; - preBuild = lib.optionalString stdenv.isLinux '' + preBuild = lib.optionalString stdenv.hostPlatform.isLinux '' makeFlagsArray+=('XFT_PACKAGE=--cflags={} --libs={-lX11 -lXft}') ''; @@ -38,17 +38,17 @@ stdenv.mkDerivation rec { ncurses readline zlib - ] ++ lib.optionals stdenv.isLinux [ + ] ++ lib.optionals stdenv.hostPlatform.isLinux [ libXft ]; # To be able to find - env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.isLinux "-I${libXft.dev}/include/X11"; + env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.hostPlatform.isLinux "-I${libXft.dev}/include/X11"; # Binaries look for LuaFileSystem library (lfs.so) at runtime postInstall = '' wrapProgram $out/bin/wordgrinder --set LUA_CPATH "${lua52Packages.luafilesystem}/lib/lua/5.2/lfs.so"; - '' + lib.optionalString stdenv.isLinux '' + '' + lib.optionalString stdenv.hostPlatform.isLinux '' wrapProgram $out/bin/xwordgrinder --set LUA_CPATH "${lua52Packages.luafilesystem}/lib/lua/5.2/lfs.so"; ''; diff --git a/pkgs/applications/office/zim/default.nix b/pkgs/applications/office/zim/default.nix index 0f4017dbbc07..77eaaa16b992 100644 --- a/pkgs/applications/office/zim/default.nix +++ b/pkgs/applications/office/zim/default.nix @@ -55,6 +55,6 @@ python3Packages.buildPythonApplication rec { license = licenses.gpl2Plus; maintainers = with maintainers; [ pSub ]; mainProgram = "zim"; - broken = stdenv.isDarwin; # https://github.com/NixOS/nixpkgs/pull/52658#issuecomment-449565790 + broken = stdenv.hostPlatform.isDarwin; # https://github.com/NixOS/nixpkgs/pull/52658#issuecomment-449565790 }; } diff --git a/pkgs/applications/printing/pappl/default.nix b/pkgs/applications/printing/pappl/default.nix index 02c4e74eb855..abeb83c9271c 100644 --- a/pkgs/applications/printing/pappl/default.nix +++ b/pkgs/applications/printing/pappl/default.nix @@ -33,7 +33,7 @@ stdenv.mkDerivation rec { libpng libusb1 zlib - ] ++ lib.optionals (!stdenv.isDarwin) [ + ] ++ lib.optionals (!stdenv.hostPlatform.isDarwin) [ # upstream mentions these are not needed for Mac # see: https://github.com/michaelrsweet/pappl#requirements avahi diff --git a/pkgs/applications/radio/airspy/default.nix b/pkgs/applications/radio/airspy/default.nix index 6cb0f40f129a..3c1fa511aef7 100644 --- a/pkgs/applications/radio/airspy/default.nix +++ b/pkgs/applications/radio/airspy/default.nix @@ -21,7 +21,7 @@ stdenv.mkDerivation rec { buildInputs = [ libusb1 ]; cmakeFlags = - lib.optionals stdenv.isLinux [ "-DINSTALL_UDEV_RULES=ON" ]; + lib.optionals stdenv.hostPlatform.isLinux [ "-DINSTALL_UDEV_RULES=ON" ]; meta = with lib; { homepage = "https://github.com/airspy/airspyone_host"; diff --git a/pkgs/applications/radio/csdr/default.nix b/pkgs/applications/radio/csdr/default.nix index af05cb61e836..65bbdbb05dac 100644 --- a/pkgs/applications/radio/csdr/default.nix +++ b/pkgs/applications/radio/csdr/default.nix @@ -23,7 +23,7 @@ stdenv.mkDerivation rec { libsamplerate ]; - hardeningDisable = lib.optional stdenv.isAarch64 "format"; + hardeningDisable = lib.optional stdenv.hostPlatform.isAarch64 "format"; postFixup = '' substituteInPlace "$out"/lib/pkgconfig/csdr.pc \ @@ -36,7 +36,7 @@ stdenv.mkDerivation rec { description = "Simple DSP library and command-line tool for Software Defined Radio"; license = licenses.gpl3Only; platforms = platforms.unix; - broken = stdenv.isDarwin; + broken = stdenv.hostPlatform.isDarwin; maintainers = teams.c3d2.members; }; } diff --git a/pkgs/applications/radio/cubicsdr/default.nix b/pkgs/applications/radio/cubicsdr/default.nix index 839fc9ceaaa1..2677795dc0ed 100644 --- a/pkgs/applications/radio/cubicsdr/default.nix +++ b/pkgs/applications/radio/cubicsdr/default.nix @@ -24,8 +24,8 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ cmake pkg-config ]; buildInputs = [ fftw hamlib liquid-dsp soapysdr-with-plugins wxGTK32 ] - ++ lib.optionals stdenv.isLinux [ libpulseaudio libGL libX11 ] - ++ lib.optionals stdenv.isDarwin [ Cocoa WebKit ]; + ++ lib.optionals stdenv.hostPlatform.isLinux [ libpulseaudio libGL libX11 ] + ++ lib.optionals stdenv.hostPlatform.isDarwin [ Cocoa WebKit ]; cmakeFlags = [ "-DUSE_HAMLIB=ON" ] ++ lib.optional enableDigitalLab "-DENABLE_DIGITAL_LAB=ON"; diff --git a/pkgs/applications/radio/direwolf/default.nix b/pkgs/applications/radio/direwolf/default.nix index e55f895d24af..6cd591fcbda6 100644 --- a/pkgs/applications/radio/direwolf/default.nix +++ b/pkgs/applications/radio/direwolf/default.nix @@ -30,8 +30,8 @@ stdenv.mkDerivation rec { strictDeps = true; - buildInputs = lib.optionals stdenv.isLinux [ alsa-lib udev ] - ++ lib.optionals stdenv.isDarwin [ portaudio ] + buildInputs = lib.optionals stdenv.hostPlatform.isLinux [ alsa-lib udev ] + ++ lib.optionals stdenv.hostPlatform.isDarwin [ portaudio ] ++ lib.optionals gpsdSupport [ gpsd ] ++ lib.optionals hamlibSupport [ hamlib ] ++ lib.optionals extraScripts [ python3 perl espeak ]; diff --git a/pkgs/applications/radio/dump1090/default.nix b/pkgs/applications/radio/dump1090/default.nix index 39c7f832e09f..c34e18be8696 100644 --- a/pkgs/applications/radio/dump1090/default.nix +++ b/pkgs/applications/radio/dump1090/default.nix @@ -30,7 +30,7 @@ stdenv.mkDerivation rec { ncurses rtl-sdr soapysdr-with-plugins - ] ++ lib.optional stdenv.isLinux limesuite; + ] ++ lib.optional stdenv.hostPlatform.isLinux limesuite; env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.cc.isClang "-Wno-implicit-function-declaration -Wno-int-conversion -Wno-unknown-warning-option"; diff --git a/pkgs/applications/radio/fldigi/default.nix b/pkgs/applications/radio/fldigi/default.nix index 2390a4f8c081..0a7edb7aed6a 100644 --- a/pkgs/applications/radio/fldigi/default.nix +++ b/pkgs/applications/radio/fldigi/default.nix @@ -37,7 +37,7 @@ stdenv.mkDerivation rec { portaudio libsndfile libsamplerate - ] ++ lib.optionals (stdenv.isLinux) [ libpulseaudio alsa-lib udev ]; + ] ++ lib.optionals (stdenv.hostPlatform.isLinux) [ libpulseaudio alsa-lib udev ]; env.CXXFLAGS = lib.optionalString stdenv.cc.isClang "-std=c++14"; diff --git a/pkgs/applications/radio/flex-ndax/default.nix b/pkgs/applications/radio/flex-ndax/default.nix index ff2aedf6005e..e45604856a59 100644 --- a/pkgs/applications/radio/flex-ndax/default.nix +++ b/pkgs/applications/radio/flex-ndax/default.nix @@ -16,7 +16,7 @@ buildGoModule rec { vendorHash = "sha256-05LWJm4MoJqjJaFrBZvutKlqSTGl4dSp433AfHHO6LU="; meta = with lib; { - broken = stdenv.isDarwin; + broken = stdenv.hostPlatform.isDarwin; homepage = "https://github.com/kc2g-flex-tools/nDAX"; description = "FlexRadio digital audio transport (DAX) connector for PulseAudio"; license = licenses.mit; diff --git a/pkgs/applications/radio/freedv/default.nix b/pkgs/applications/radio/freedv/default.nix index 27da63dd4022..d53f67031600 100644 --- a/pkgs/applications/radio/freedv/default.nix +++ b/pkgs/applications/radio/freedv/default.nix @@ -16,7 +16,7 @@ , hamlib_4 , wxGTK32 , sioclient -, pulseSupport ? config.pulseaudio or stdenv.isLinux +, pulseSupport ? config.pulseaudio or stdenv.hostPlatform.isLinux , AppKit , AVFoundation , Cocoa @@ -34,7 +34,7 @@ stdenv.mkDerivation rec { hash = "sha256-oFuAH81mduiSQGIDgDDy1IPskqqCBmfWbpqQstUIw9g="; }; - postPatch = lib.optionalString stdenv.isDarwin '' + postPatch = lib.optionalString stdenv.hostPlatform.isDarwin '' substituteInPlace CMakeLists.txt \ --replace-fail "-Wl,-ld_classic" "" substituteInPlace src/CMakeLists.txt \ @@ -44,7 +44,7 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ cmake - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ macdylibbundler makeWrapper darwin.autoSignDarwinBinariesHook @@ -60,7 +60,7 @@ stdenv.mkDerivation rec { wxGTK32 sioclient ] ++ (if pulseSupport then [ libpulseaudio ] else [ portaudio ]) - ++ lib.optionals stdenv.isDarwin [ + ++ lib.optionals stdenv.hostPlatform.isDarwin [ AppKit AVFoundation Cocoa @@ -74,13 +74,13 @@ stdenv.mkDerivation rec { "-DUSE_PULSEAUDIO:BOOL=${if pulseSupport then "TRUE" else "FALSE"}" ]; - env.NIX_CFLAGS_COMPILE = toString (lib.optionals (stdenv.isDarwin && stdenv.isx86_64) [ + env.NIX_CFLAGS_COMPILE = toString (lib.optionals (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isx86_64) [ "-DAPPLE_OLD_XCODE" ]); doCheck = true; - postInstall = lib.optionalString stdenv.isDarwin '' + postInstall = lib.optionalString stdenv.hostPlatform.isDarwin '' mkdir -p $out/Applications mv $out/bin/FreeDV.app $out/Applications makeWrapper $out/Applications/FreeDV.app/Contents/MacOS/FreeDV $out/bin/freedv diff --git a/pkgs/applications/radio/gnuradio/3.8.nix b/pkgs/applications/radio/gnuradio/3.8.nix index 67cc2d6c8ebf..b611ef66b825 100644 --- a/pkgs/applications/radio/gnuradio/3.8.nix +++ b/pkgs/applications/radio/gnuradio/3.8.nix @@ -150,8 +150,8 @@ let }; gr-audio = { runtime = [] - ++ lib.optionals stdenv.isLinux [ alsa-lib libjack2 ] - ++ lib.optionals stdenv.isDarwin [ CoreAudio ] + ++ lib.optionals stdenv.hostPlatform.isLinux [ alsa-lib libjack2 ] + ++ lib.optionals stdenv.hostPlatform.isDarwin [ CoreAudio ] ; cmakeEnableFlag = "GR_AUDIO"; }; diff --git a/pkgs/applications/radio/gnuradio/default.nix b/pkgs/applications/radio/gnuradio/default.nix index e7efa57428b8..f9113b0a23c3 100644 --- a/pkgs/applications/radio/gnuradio/default.nix +++ b/pkgs/applications/radio/gnuradio/default.nix @@ -170,8 +170,8 @@ let }; gr-audio = { runtime = [] - ++ lib.optionals stdenv.isLinux [ alsa-lib libjack2 ] - ++ lib.optionals stdenv.isDarwin [ CoreAudio ] + ++ lib.optionals stdenv.hostPlatform.isLinux [ alsa-lib libjack2 ] + ++ lib.optionals stdenv.hostPlatform.isDarwin [ CoreAudio ] ; cmakeEnableFlag = "GR_AUDIO"; }; diff --git a/pkgs/applications/radio/gnuradio/shared.nix b/pkgs/applications/radio/gnuradio/shared.nix index fe75f6037f37..75a2a97e0d22 100644 --- a/pkgs/applications/radio/gnuradio/shared.nix +++ b/pkgs/applications/radio/gnuradio/shared.nix @@ -88,7 +88,7 @@ in { remove-references-to -t ${stdenv.cc} $(readlink -f $out/lib/libgnuradio-runtime${stdenv.hostPlatform.extensions.sharedLibrary}) '' # Clang references in InstalledDir - + lib.optionalString (hasFeature "gnuradio-runtime" && stdenv.isDarwin) '' + + lib.optionalString (hasFeature "gnuradio-runtime" && stdenv.hostPlatform.isDarwin) '' remove-references-to -t ${stdenv.cc.cc} $(readlink -f $out/lib/libgnuradio-runtime${stdenv.hostPlatform.extensions.sharedLibrary}) '' ; @@ -116,7 +116,7 @@ in { dontWrapQtApps = true; # On darwin, it requires playing with DYLD_FALLBACK_LIBRARY_PATH to make if # find libgnuradio-runtim.3.*.dylib . - doCheck = !stdenv.isDarwin; + doCheck = !stdenv.hostPlatform.isDarwin; preCheck = '' export HOME=$(mktemp -d) export QT_QPA_PLATFORM=offscreen diff --git a/pkgs/applications/radio/gnuradio/wrapper.nix b/pkgs/applications/radio/gnuradio/wrapper.nix index f468aadb27b5..4ffe42593ec5 100644 --- a/pkgs/applications/radio/gnuradio/wrapper.nix +++ b/pkgs/applications/radio/gnuradio/wrapper.nix @@ -127,7 +127,7 @@ let unwrapped.qt.qtbase.qtPluginPrefix (builtins.map lib.getBin ([ unwrapped.qt.qtbase - ] ++ lib.optionals stdenv.isLinux [ + ] ++ lib.optionals stdenv.hostPlatform.isLinux [ unwrapped.qt.qtwayland ])) }" @@ -137,7 +137,7 @@ let unwrapped.qt.qtbase.qtQmlPrefix (builtins.map lib.getBin ([ unwrapped.qt.qtbase - ] ++ lib.optionals stdenv.isLinux [ + ] ++ lib.optionals stdenv.hostPlatform.isLinux [ unwrapped.qt.qtwayland ])) }" diff --git a/pkgs/applications/radio/limesuite/default.nix b/pkgs/applications/radio/limesuite/default.nix index d8d7bcd22d0a..9190896d8e11 100644 --- a/pkgs/applications/radio/limesuite/default.nix +++ b/pkgs/applications/radio/limesuite/default.nix @@ -28,7 +28,7 @@ stdenv.mkDerivation rec { gnuplot libusb1 soapysdr - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ GLUT ] ++ lib.optionals withGui [ fltk diff --git a/pkgs/applications/radio/m17-cxx-demod/default.nix b/pkgs/applications/radio/m17-cxx-demod/default.nix index d6663fbc4287..47a7d103e76c 100644 --- a/pkgs/applications/radio/m17-cxx-demod/default.nix +++ b/pkgs/applications/radio/m17-cxx-demod/default.nix @@ -31,6 +31,6 @@ stdenv.mkDerivation rec { platforms = platforms.unix; maintainers = teams.c3d2.members; # never built on aarch64-darwin, x86_64-darwin since first introduction in nixpkgs - broken = stdenv.isDarwin; + broken = stdenv.hostPlatform.isDarwin; }; } diff --git a/pkgs/applications/radio/multimon-ng/default.nix b/pkgs/applications/radio/multimon-ng/default.nix index 70f3da3118c1..f71af7e64862 100644 --- a/pkgs/applications/radio/multimon-ng/default.nix +++ b/pkgs/applications/radio/multimon-ng/default.nix @@ -11,7 +11,7 @@ stdenv.mkDerivation rec { sha256 = "sha256-irKpVerxzjJIiLofoTdySk/PzojuVLgMq2DYF0qPaAM="; }; - buildInputs = lib.optionals stdenv.isLinux [ libpulseaudio libX11 ]; + buildInputs = lib.optionals stdenv.hostPlatform.isLinux [ libpulseaudio libX11 ]; nativeBuildInputs = [ cmake makeWrapper ]; diff --git a/pkgs/applications/radio/pat/default.nix b/pkgs/applications/radio/pat/default.nix index 267be192f44f..1f1140e5fd4b 100644 --- a/pkgs/applications/radio/pat/default.nix +++ b/pkgs/applications/radio/pat/default.nix @@ -25,11 +25,11 @@ buildGoModule rec { installShellFiles ]; - buildInputs = lib.optional stdenv.isLinux [ libax25 ]; + buildInputs = lib.optional stdenv.hostPlatform.isLinux [ libax25 ]; # Needed by wl2k-go go module for libax25 to include support for Linux' AX.25 stack by linking against libax25. # ref: https://github.com/la5nta/wl2k-go/blob/abe3ae5bf6a2eec670a21672d461d1c3e1d4c2f3/transport/ax25/ax25.go#L11-L17 - tags = lib.optionals stdenv.isLinux [ "libax25" ]; + tags = lib.optionals stdenv.hostPlatform.isLinux [ "libax25" ]; postInstall = '' installManPage man/pat-configure.1 man/pat.1 diff --git a/pkgs/applications/radio/qdmr/default.nix b/pkgs/applications/radio/qdmr/default.nix index 2ebc0d30ff6c..442828a76302 100644 --- a/pkgs/applications/radio/qdmr/default.nix +++ b/pkgs/applications/radio/qdmr/default.nix @@ -16,7 +16,7 @@ }: let - inherit (stdenv) isLinux; + inherit (stdenv.hostPlatform) isLinux; in stdenv.mkDerivation rec { diff --git a/pkgs/applications/radio/qlog/default.nix b/pkgs/applications/radio/qlog/default.nix index 86da4b081ee4..dacdfcbb2704 100644 --- a/pkgs/applications/radio/qlog/default.nix +++ b/pkgs/applications/radio/qlog/default.nix @@ -36,7 +36,7 @@ stdenv.mkDerivation rec { qtwebchannel hamlib qtkeychain - ] ++ (lib.optionals stdenv.isDarwin [ + ] ++ (lib.optionals stdenv.hostPlatform.isDarwin [ cups ]); diff --git a/pkgs/applications/radio/rtl-sdr/default.nix b/pkgs/applications/radio/rtl-sdr/default.nix index f0bbba9b0a3b..6cb25feb980b 100644 --- a/pkgs/applications/radio/rtl-sdr/default.nix +++ b/pkgs/applications/radio/rtl-sdr/default.nix @@ -13,7 +13,7 @@ let nativeBuildInputs = [ pkg-config cmake ]; propagatedBuildInputs = [ libusb1 ]; - cmakeFlags = lib.optionals stdenv.isLinux [ + cmakeFlags = lib.optionals stdenv.hostPlatform.isLinux [ "-DINSTALL_UDEV_RULES=ON" "-DWITH_RPC=ON" ]; diff --git a/pkgs/applications/radio/sdrplay/default.nix b/pkgs/applications/radio/sdrplay/default.nix index 9d9ee298e09c..d19ed4b02794 100644 --- a/pkgs/applications/radio/sdrplay/default.nix +++ b/pkgs/applications/radio/sdrplay/default.nix @@ -1,9 +1,9 @@ { stdenv, lib, fetchurl, autoPatchelfHook, udev, libusb1 }: let arch = - if stdenv.isx86_64 then "x86_64" - else if stdenv.isi686 then "i686" - else if stdenv.isAarch64 then "aarch64" + if stdenv.hostPlatform.isx86_64 then "x86_64" + else if stdenv.hostPlatform.isi686 then "i686" + else if stdenv.hostPlatform.isAarch64 then "aarch64" else throw "unsupported architecture"; version = "3.07.1"; diff --git a/pkgs/applications/radio/sdrpp/default.nix b/pkgs/applications/radio/sdrpp/default.nix index 3ce8f1f7f4ff..151a967d943f 100644 --- a/pkgs/applications/radio/sdrpp/default.nix +++ b/pkgs/applications/radio/sdrpp/default.nix @@ -8,7 +8,7 @@ , hackrf_source ? true, hackrf , limesdr_source ? true, limesuite , perseus_source ? false # needs libperseus-sdr, not yet available in nixpks -, plutosdr_source ? stdenv.isLinux, libiio, libad9361 +, plutosdr_source ? stdenv.hostPlatform.isLinux, libiio, libad9361 , rfspace_source ? true , rtl_sdr_source ? true, rtl-sdr-osmocom, libusb1 # osmocom better w/ rtlsdr v4 , rtl_tcp_source ? true @@ -70,8 +70,8 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ cmake pkg-config ]; buildInputs = [ glfw glew fftwFloat volk zstd ] - ++ lib.optional stdenv.isDarwin AppKit - ++ lib.optional stdenv.isLinux libX11 + ++ lib.optional stdenv.hostPlatform.isDarwin AppKit + ++ lib.optional stdenv.hostPlatform.isLinux libX11 ++ lib.optional airspy_source airspy ++ lib.optional airspyhf_source airspyhf ++ lib.optional bladerf_source libbladeRF diff --git a/pkgs/applications/radio/soapyairspy/default.nix b/pkgs/applications/radio/soapyairspy/default.nix index 289a20d281cc..9d198ad15eb3 100644 --- a/pkgs/applications/radio/soapyairspy/default.nix +++ b/pkgs/applications/radio/soapyairspy/default.nix @@ -16,7 +16,7 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ cmake ]; buildInputs = [ airspy soapysdr ] - ++ lib.optionals stdenv.isDarwin [ libobjc IOKit Security ]; + ++ lib.optionals stdenv.hostPlatform.isDarwin [ libobjc IOKit Security ]; cmakeFlags = [ "-DSoapySDR_DIR=${soapysdr}/share/cmake/SoapySDR/" ]; diff --git a/pkgs/applications/radio/soapyaudio/default.nix b/pkgs/applications/radio/soapyaudio/default.nix index 7434791b69f0..86921754d6b6 100644 --- a/pkgs/applications/radio/soapyaudio/default.nix +++ b/pkgs/applications/radio/soapyaudio/default.nix @@ -16,8 +16,8 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ cmake pkg-config ]; buildInputs = [ hamlib rtaudio libjack2 libusb1 soapysdr ] - ++ lib.optionals stdenv.isLinux [ alsa-lib libpulseaudio ] - ++ lib.optionals stdenv.isDarwin [ Accelerate CoreAudio ]; + ++ lib.optionals stdenv.hostPlatform.isLinux [ alsa-lib libpulseaudio ] + ++ lib.optionals stdenv.hostPlatform.isDarwin [ Accelerate CoreAudio ]; cmakeFlags = [ "-DSoapySDR_DIR=${soapysdr}/share/cmake/SoapySDR/" diff --git a/pkgs/applications/radio/soapybladerf/default.nix b/pkgs/applications/radio/soapybladerf/default.nix index 0f2b445b960e..15c46507350c 100644 --- a/pkgs/applications/radio/soapybladerf/default.nix +++ b/pkgs/applications/radio/soapybladerf/default.nix @@ -19,7 +19,7 @@ in stdenv.mkDerivation { nativeBuildInputs = [ cmake pkg-config ]; buildInputs = [ libbladeRF soapysdr ] - ++ lib.optionals stdenv.isDarwin [ libobjc IOKit Security ]; + ++ lib.optionals stdenv.hostPlatform.isDarwin [ libobjc IOKit Security ]; cmakeFlags = [ "-DSoapySDR_DIR=${soapysdr}/share/cmake/SoapySDR/" ]; diff --git a/pkgs/applications/radio/soapyhackrf/default.nix b/pkgs/applications/radio/soapyhackrf/default.nix index be621c0d3135..3f385a4b7255 100644 --- a/pkgs/applications/radio/soapyhackrf/default.nix +++ b/pkgs/applications/radio/soapyhackrf/default.nix @@ -19,7 +19,7 @@ in stdenv.mkDerivation { nativeBuildInputs = [ cmake pkg-config ]; buildInputs = [ hackrf soapysdr ] - ++ lib.optionals stdenv.isDarwin [ libobjc IOKit Security ]; + ++ lib.optionals stdenv.hostPlatform.isDarwin [ libobjc IOKit Security ]; cmakeFlags = [ "-DSoapySDR_DIR=${soapysdr}/share/cmake/SoapySDR/" ]; diff --git a/pkgs/applications/radio/soapyremote/default.nix b/pkgs/applications/radio/soapyremote/default.nix index c6e7cddd0903..4191b8ae95ce 100644 --- a/pkgs/applications/radio/soapyremote/default.nix +++ b/pkgs/applications/radio/soapyremote/default.nix @@ -19,7 +19,7 @@ in stdenv.mkDerivation { cmakeFlags = [ "-DSoapySDR_DIR=${soapysdr}/share/cmake/SoapySDR/" ]; - env.NIX_CFLAGS_COMPILE = toString (lib.optionals stdenv.isDarwin [ "-include sys/select.h" ]); + env.NIX_CFLAGS_COMPILE = toString (lib.optionals stdenv.hostPlatform.isDarwin [ "-include sys/select.h" ]); meta = with lib; { homepage = "https://github.com/pothosware/SoapyRemote"; diff --git a/pkgs/applications/radio/soapyrtlsdr/default.nix b/pkgs/applications/radio/soapyrtlsdr/default.nix index 80ea41e4f950..f0a5194a4a9e 100644 --- a/pkgs/applications/radio/soapyrtlsdr/default.nix +++ b/pkgs/applications/radio/soapyrtlsdr/default.nix @@ -23,7 +23,7 @@ stdenv.mkDerivation (finalAttrs: { nativeBuildInputs = [ cmake pkg-config ]; buildInputs = [ rtl-sdr soapysdr ] - ++ lib.optionals stdenv.isDarwin [ libobjc IOKit Security ]; + ++ lib.optionals stdenv.hostPlatform.isDarwin [ libobjc IOKit Security ]; cmakeFlags = [ "-DSoapySDR_DIR=${soapysdr}/share/cmake/SoapySDR/" ]; diff --git a/pkgs/applications/radio/soapyuhd/default.nix b/pkgs/applications/radio/soapyuhd/default.nix index 9220df3f5f94..de7b7be855ec 100644 --- a/pkgs/applications/radio/soapyuhd/default.nix +++ b/pkgs/applications/radio/soapyuhd/default.nix @@ -16,7 +16,7 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ cmake pkg-config ]; buildInputs = [ uhd boost soapysdr ] - ++ lib.optionals stdenv.isDarwin [ libobjc IOKit Security ]; + ++ lib.optionals stdenv.hostPlatform.isDarwin [ libobjc IOKit Security ]; cmakeFlags = [ "-DSoapySDR_DIR=${soapysdr}/share/cmake/SoapySDR/" ]; diff --git a/pkgs/applications/radio/splat/default.nix b/pkgs/applications/radio/splat/default.nix index 59d0fc1fdeb0..1bf4e738c713 100644 --- a/pkgs/applications/radio/splat/default.nix +++ b/pkgs/applications/radio/splat/default.nix @@ -44,7 +44,7 @@ stdenv.mkDerivation rec { ''; meta = with lib; { - broken = stdenv.isDarwin; + broken = stdenv.hostPlatform.isDarwin; description = "SPLAT! is an RF Signal Propagation, Loss, And Terrain analysis tool for the electromagnetic spectrum between 20 MHz and 20 GHz"; license = licenses.gpl2Only; diff --git a/pkgs/applications/radio/ubertooth/default.nix b/pkgs/applications/radio/ubertooth/default.nix index 62e645fb6df8..2d8b9f857938 100644 --- a/pkgs/applications/radio/ubertooth/default.nix +++ b/pkgs/applications/radio/ubertooth/default.nix @@ -18,7 +18,7 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ cmake pkg-config ]; buildInputs = [ libbtbb libpcap libusb1 bluez ]; - cmakeFlags = lib.optionals stdenv.isLinux [ + cmakeFlags = lib.optionals stdenv.hostPlatform.isLinux [ "-DINSTALL_UDEV_RULES=TRUE" "-DUDEV_RULES_PATH=etc/udev/rules.d" "-DUDEV_RULES_GROUP=${udevGroup}" diff --git a/pkgs/applications/radio/uhd/default.nix b/pkgs/applications/radio/uhd/default.nix index 947d7d48108d..ce668c45300f 100644 --- a/pkgs/applications/radio/uhd/default.nix +++ b/pkgs/applications/radio/uhd/default.nix @@ -139,7 +139,7 @@ stdenv.mkDerivation (finalAttrs: { # TODO: Check if this still needed # ABI differences GCC 7.1 # /nix/store/wd6r25miqbk9ia53pp669gn4wrg9n9cj-gcc-7.3.0/include/c++/7.3.0/bits/vector.tcc:394:7: note: parameter passing for argument of type 'std::vector::iterator {aka __gnu_cxx::__normal_iterator >}' changed in GCC 7.1 - ] ++ optionals stdenv.isAarch32 [ + ] ++ optionals stdenv.hostPlatform.isAarch32 [ "-DCMAKE_CXX_FLAGS=-Wno-psabi" ]; @@ -163,7 +163,7 @@ stdenv.mkDerivation (finalAttrs: { ]; # many tests fails on darwin, according to ofborg - doCheck = !stdenv.isDarwin; + doCheck = !stdenv.hostPlatform.isDarwin; # Build only the host software preConfigure = "cd host"; diff --git a/pkgs/applications/science/astronomy/gildas/default.nix b/pkgs/applications/science/astronomy/gildas/default.nix index 3b31f069b0e4..eafc631ef92c 100644 --- a/pkgs/applications/science/astronomy/gildas/default.nix +++ b/pkgs/applications/science/astronomy/gildas/default.nix @@ -22,17 +22,17 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ pkg-config groff perl getopt gfortran which ]; buildInputs = [ gtk2-x11 lesstif cfitsio python3Env ncurses ] - ++ lib.optionals stdenv.isDarwin (with darwin.apple_sdk.frameworks; [ CoreFoundation ]); + ++ lib.optionals stdenv.hostPlatform.isDarwin (with darwin.apple_sdk.frameworks; [ CoreFoundation ]); patches = [ ./wrapper.patch ] - ++ lib.optionals stdenv.isDarwin ([ ./clang.patch ./cpp-darwin.patch ]); + ++ lib.optionals stdenv.hostPlatform.isDarwin ([ ./clang.patch ./cpp-darwin.patch ]); env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.cc.isClang "-Wno-unused-command-line-argument"; # Workaround for https://github.com/NixOS/nixpkgs/issues/304528 - env.GAG_CPP = lib.optionalString stdenv.isDarwin "${gfortran.outPath}/bin/cpp"; + env.GAG_CPP = lib.optionalString stdenv.hostPlatform.isDarwin "${gfortran.outPath}/bin/cpp"; - NIX_LDFLAGS = lib.optionalString stdenv.isDarwin (with darwin.apple_sdk.frameworks; "-F${CoreFoundation}/Library/Frameworks"); + NIX_LDFLAGS = lib.optionalString stdenv.hostPlatform.isDarwin (with darwin.apple_sdk.frameworks; "-F${CoreFoundation}/Library/Frameworks"); configurePhase='' substituteInPlace admin/wrapper.sh --replace '%%OUT%%' $out diff --git a/pkgs/applications/science/astronomy/gravit/default.nix b/pkgs/applications/science/astronomy/gravit/default.nix index 070ce96fd577..b734ea9750dc 100644 --- a/pkgs/applications/science/astronomy/gravit/default.nix +++ b/pkgs/applications/science/astronomy/gravit/default.nix @@ -35,7 +35,7 @@ stdenv.mkDerivation rec { enableParallelBuilding = true; meta = { - broken = (stdenv.isLinux && stdenv.isAarch64); + broken = (stdenv.hostPlatform.isLinux && stdenv.hostPlatform.isAarch64); homepage = "https://github.com/gak/gravit"; description = "Beautiful OpenGL-based gravity simulator"; mainProgram = "gravit"; diff --git a/pkgs/applications/science/astronomy/stellarium/default.nix b/pkgs/applications/science/astronomy/stellarium/default.nix index 87118beec99f..7ddaf5357e7c 100644 --- a/pkgs/applications/science/astronomy/stellarium/default.nix +++ b/pkgs/applications/science/astronomy/stellarium/default.nix @@ -43,7 +43,7 @@ stdenv.mkDerivation (finalAttrs: { }) ]; - postPatch = lib.optionalString stdenv.isDarwin '' + postPatch = lib.optionalString stdenv.hostPlatform.isDarwin '' substituteInPlace CMakeLists.txt \ --replace 'SET(CMAKE_INSTALL_PREFIX "''${PROJECT_BINARY_DIR}/Stellarium.app/Contents")' \ 'SET(CMAKE_INSTALL_PREFIX "${placeholder "out"}/Applications/Stellarium.app/Contents")' @@ -72,22 +72,22 @@ stdenv.mkDerivation (finalAttrs: { libnova exiv2 nlopt - ] ++ lib.optionals stdenv.isLinux [ + ] ++ lib.optionals stdenv.hostPlatform.isLinux [ qtwayland ]; preConfigure = '' export SOURCE_DATE_EPOCH=$(date -d 20${lib.versions.major finalAttrs.version}0101 +%s) - '' + lib.optionalString stdenv.isDarwin '' + '' + lib.optionalString stdenv.hostPlatform.isDarwin '' export LC_ALL=en_US.UTF-8 ''; # fatal error: 'QtSerialPort/QSerialPortInfo' file not found - env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.isDarwin "-F${qtserialport}/lib"; + env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.hostPlatform.isDarwin "-F${qtserialport}/lib"; dontWrapGApps = true; - postInstall = lib.optionalString stdenv.isDarwin '' + postInstall = lib.optionalString stdenv.hostPlatform.isDarwin '' makeWrapper $out/Applications/Stellarium.app/Contents/MacOS/Stellarium $out/bin/stellarium ''; diff --git a/pkgs/applications/science/biology/ants/default.nix b/pkgs/applications/science/biology/ants/default.nix index 21dbf69407f2..b42eb791d27f 100644 --- a/pkgs/applications/science/biology/ants/default.nix +++ b/pkgs/applications/science/biology/ants/default.nix @@ -27,7 +27,7 @@ stdenv.mkDerivation (finalAttrs: { buildInputs = [ itk vtk - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ Cocoa ]; diff --git a/pkgs/applications/science/biology/blast/bin.nix b/pkgs/applications/science/biology/blast/bin.nix index 48537a568e4b..1e3975f9f5ff 100644 --- a/pkgs/applications/science/biology/blast/bin.nix +++ b/pkgs/applications/science/biology/blast/bin.nix @@ -35,9 +35,9 @@ in stdenv.mkDerivation { inherit pname version src; - nativeBuildInputs = lib.optionals stdenv.isLinux [ autoPatchelfHook ]; + nativeBuildInputs = lib.optionals stdenv.hostPlatform.isLinux [ autoPatchelfHook ]; - buildInputs = [ python3 perl ] ++ lib.optionals stdenv.isLinux [ zlib bzip2 glib libxml2 ]; + buildInputs = [ python3 perl ] ++ lib.optionals stdenv.hostPlatform.isLinux [ zlib bzip2 glib libxml2 ]; installPhase = '' runHook preInstall diff --git a/pkgs/applications/science/biology/blast/default.nix b/pkgs/applications/science/biology/blast/default.nix index 407d38970b0f..791d6049ad6d 100644 --- a/pkgs/applications/science/biology/blast/default.nix +++ b/pkgs/applications/science/biology/blast/default.nix @@ -81,7 +81,7 @@ stdenv.mkDerivation rec { # perl is necessary in buildInputs so that installed perl scripts get patched # correctly buildInputs = [ coreutils perl gawk zlib bzip2 cpio ] - ++ lib.optionals stdenv.isDarwin [ ApplicationServices ]; + ++ lib.optionals stdenv.hostPlatform.isDarwin [ ApplicationServices ]; hardeningDisable = [ "format" ]; postInstall = '' diff --git a/pkgs/applications/science/biology/bwa-mem2/default.nix b/pkgs/applications/science/biology/bwa-mem2/default.nix index c339baf446d2..0a2d2c8d2052 100644 --- a/pkgs/applications/science/biology/bwa-mem2/default.nix +++ b/pkgs/applications/science/biology/bwa-mem2/default.nix @@ -19,7 +19,7 @@ stdenv.mkDerivation (finalAttrs: { buildInputs = [ zlib ]; # see https://github.com/bwa-mem2/bwa-mem2/issues/93 - postPatch = lib.optionalString stdenv.isDarwin '' + postPatch = lib.optionalString stdenv.hostPlatform.isDarwin '' sed -i 's/memset_s/memset8_s/g' ext/safestringlib/include/safe_mem_lib.h sed -i 's/memset_s/memset8_s/g' ext/safestringlib/safeclib/memset16_s.c sed -i 's/memset_s/memset8_s/g' ext/safestringlib/safeclib/memset32_s.c diff --git a/pkgs/applications/science/biology/cmtk/default.nix b/pkgs/applications/science/biology/cmtk/default.nix index d7d23dd2d46e..1263f8194c9f 100644 --- a/pkgs/applications/science/biology/cmtk/default.nix +++ b/pkgs/applications/science/biology/cmtk/default.nix @@ -31,7 +31,7 @@ stdenv.mkDerivation (finalAttrs: { env.NIX_CFLAGS_COMPILE = toString [ (lib.optionalString stdenv.cc.isGNU "-std=c++11") (lib.optionalString stdenv.cc.isClang "-Wno-error=c++11-narrowing") - (lib.optionalString (stdenv.isDarwin && stdenv.isAarch64) "-Dfinite=isfinite") + (lib.optionalString (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isAarch64) "-Dfinite=isfinite") ]; meta = with lib; { diff --git a/pkgs/applications/science/biology/delly/default.nix b/pkgs/applications/science/biology/delly/default.nix index 34ea942b4f5c..ec1f8612cc34 100644 --- a/pkgs/applications/science/biology/delly/default.nix +++ b/pkgs/applications/science/biology/delly/default.nix @@ -28,7 +28,7 @@ stdenv.mkDerivation (finalAttrs: { htslib xz zlib - ] ++ lib.optional stdenv.isDarwin llvmPackages.openmp; + ] ++ lib.optional stdenv.hostPlatform.isDarwin llvmPackages.openmp; makeFlags = [ "EBROOTHTSLIB=${htslib}" diff --git a/pkgs/applications/science/biology/iqtree/default.nix b/pkgs/applications/science/biology/iqtree/default.nix index a3ac4eb542f0..ce6218449a7e 100644 --- a/pkgs/applications/science/biology/iqtree/default.nix +++ b/pkgs/applications/science/biology/iqtree/default.nix @@ -26,7 +26,7 @@ stdenv.mkDerivation rec { boost eigen zlib - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ llvmPackages.openmp ]; diff --git a/pkgs/applications/science/biology/iv/default.nix b/pkgs/applications/science/biology/iv/default.nix index ba1b91298bb3..a4b408b14a01 100644 --- a/pkgs/applications/science/biology/iv/default.nix +++ b/pkgs/applications/science/biology/iv/default.nix @@ -30,7 +30,7 @@ stdenv.mkDerivation rec { break fi done - '' + lib.optionalString stdenv.isLinux '' + '' + lib.optionalString stdenv.hostPlatform.isLinux '' patchelf --add-needed ${libX11}/lib/libX11.so $out/lib/libIVhines.so ''; diff --git a/pkgs/applications/science/biology/migrate/default.nix b/pkgs/applications/science/biology/migrate/default.nix index 53fc80777612..aceb010875d7 100644 --- a/pkgs/applications/science/biology/migrate/default.nix +++ b/pkgs/applications/science/biology/migrate/default.nix @@ -28,7 +28,7 @@ stdenv.mkDerivation (finalAttrs: { ]; meta = with lib; { - broken = stdenv.isDarwin; + broken = stdenv.hostPlatform.isDarwin; description = "Estimates population size, migration, population splitting parameters using genetic/genomic data"; homepage = "https://peterbeerli.com/migrate-html5/index.html"; license = licenses.mit; diff --git a/pkgs/applications/science/biology/minimap2/default.nix b/pkgs/applications/science/biology/minimap2/default.nix index 5597b5504678..1c523a909241 100644 --- a/pkgs/applications/science/biology/minimap2/default.nix +++ b/pkgs/applications/science/biology/minimap2/default.nix @@ -13,7 +13,7 @@ stdenv.mkDerivation rec { buildInputs = [ zlib ]; - makeFlags = lib.optionals stdenv.isAarch64 [ "arm_neon=1" "aarch64=1" ]; + makeFlags = lib.optionals stdenv.hostPlatform.isAarch64 [ "arm_neon=1" "aarch64=1" ]; installPhase = '' mkdir -p $out/bin diff --git a/pkgs/applications/science/biology/mrtrix/default.nix b/pkgs/applications/science/biology/mrtrix/default.nix index 64eafa0f6968..e17aa3ca038c 100644 --- a/pkgs/applications/science/biology/mrtrix/default.nix +++ b/pkgs/applications/science/biology/mrtrix/default.nix @@ -102,7 +102,7 @@ stdenv.mkDerivation rec { ''; meta = with lib; { - broken = (stdenv.isLinux && stdenv.isAarch64); + broken = (stdenv.hostPlatform.isLinux && stdenv.hostPlatform.isAarch64); homepage = "https://github.com/MRtrix3/mrtrix3"; description = "Suite of tools for diffusion imaging"; maintainers = with maintainers; [ bcdarwin ]; diff --git a/pkgs/applications/science/biology/muscle/default.nix b/pkgs/applications/science/biology/muscle/default.nix index 86067538b13c..33a56d6e26d6 100644 --- a/pkgs/applications/science/biology/muscle/default.nix +++ b/pkgs/applications/science/biology/muscle/default.nix @@ -20,7 +20,7 @@ gccStdenv.mkDerivation rec { installPhase = let target = - if gccStdenv.isDarwin + if gccStdenv.hostPlatform.isDarwin then "Darwin" else "Linux"; in diff --git a/pkgs/applications/science/biology/nest/default.nix b/pkgs/applications/science/biology/nest/default.nix index 96418346eeb9..9714f015f71a 100644 --- a/pkgs/applications/science/biology/nest/default.nix +++ b/pkgs/applications/science/biology/nest/default.nix @@ -51,7 +51,7 @@ stdenv.mkDerivation rec { python3 python3.pkgs.cython ] ++ lib.optional withMpi mpi - ++ lib.optional stdenv.isDarwin llvmPackages.openmp; + ++ lib.optional stdenv.hostPlatform.isDarwin llvmPackages.openmp; propagatedBuildInputs = with python3.pkgs; [ numpy diff --git a/pkgs/applications/science/biology/neuron/default.nix b/pkgs/applications/science/biology/neuron/default.nix index e54d3c9ba7a1..fe5de3c68fab 100644 --- a/pkgs/applications/science/biology/neuron/default.nix +++ b/pkgs/applications/science/biology/neuron/default.nix @@ -34,7 +34,7 @@ stdenv.mkDerivation (finalAttrs: { flex git ] ++ optionals useCore [ perl gsl ] - ++ optionals stdenv.isDarwin [ xcbuild ]; + ++ optionals stdenv.hostPlatform.isDarwin [ xcbuild ]; buildInputs = optionals useIv [ xorg.libX11.dev diff --git a/pkgs/applications/science/biology/obitools/obitools3.nix b/pkgs/applications/science/biology/obitools/obitools3.nix index f415c9c39141..53aa177307df 100644 --- a/pkgs/applications/science/biology/obitools/obitools3.nix +++ b/pkgs/applications/science/biology/obitools/obitools3.nix @@ -11,7 +11,7 @@ python3Packages.buildPythonApplication rec { nativeBuildInputs = [ python3Packages.cython cmake ]; - postPatch = lib.optionalString stdenv.isAarch64 '' + postPatch = lib.optionalString stdenv.hostPlatform.isAarch64 '' substituteInPlace setup.py \ --replace "'-msse2'," "" ''; diff --git a/pkgs/applications/science/biology/paml/default.nix b/pkgs/applications/science/biology/paml/default.nix index f742e33e15cf..1e21d18242bd 100644 --- a/pkgs/applications/science/biology/paml/default.nix +++ b/pkgs/applications/science/biology/paml/default.nix @@ -14,7 +14,7 @@ stdenv.mkDerivation (finalAttrs: { hash = "sha256-P/oHaLxoQzjFuvmHyRdShHv1ayruy6O/I9w8aTyya2s="; }; - env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.isDarwin "-D_POSIX_C_SOURCE"; + env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.hostPlatform.isDarwin "-D_POSIX_C_SOURCE"; preBuild = '' cd ./src/ diff --git a/pkgs/applications/science/biology/plink-ng/default.nix b/pkgs/applications/science/biology/plink-ng/default.nix index b91655ac8fda..b66bed97a94a 100644 --- a/pkgs/applications/science/biology/plink-ng/default.nix +++ b/pkgs/applications/science/biology/plink-ng/default.nix @@ -11,7 +11,7 @@ stdenv.mkDerivation rec { sha256 = "1zhffjbwpd50dxywccbnv1rxy9njwz73l4awc5j7i28rgj3davcq"; }; - buildInputs = [ zlib ] ++ (if stdenv.isDarwin then [ darwin.apple_sdk.frameworks.Accelerate ] else [ blas lapack ]) ; + buildInputs = [ zlib ] ++ (if stdenv.hostPlatform.isDarwin then [ darwin.apple_sdk.frameworks.Accelerate ] else [ blas lapack ]) ; preBuild = '' sed -i 's|zlib-1.2.8/zlib.h|zlib.h|g' *.c *.h @@ -31,7 +31,7 @@ stdenv.mkDerivation rec { ''; meta = { - broken = (stdenv.isLinux && stdenv.isAarch64); + broken = (stdenv.hostPlatform.isLinux && stdenv.hostPlatform.isAarch64); description = "Comprehensive update to the PLINK association analysis toolset"; mainProgram = "plink"; homepage = "https://www.cog-genomics.org/plink2"; diff --git a/pkgs/applications/science/biology/repseek/default.nix b/pkgs/applications/science/biology/repseek/default.nix index e5e0193f7911..9b38171b34ef 100644 --- a/pkgs/applications/science/biology/repseek/default.nix +++ b/pkgs/applications/science/biology/repseek/default.nix @@ -13,7 +13,7 @@ stdenv.mkDerivation rec { substituteInPlace Makefile \ --replace "INSTALLDIR = \$\$HOME/bin" "INSTALLDIR = $out/bin/" \ --replace "CC= gcc" "CC = $CC" - '' + lib.optionalString stdenv.isLinux '' + '' + lib.optionalString stdenv.hostPlatform.isLinux '' substituteInPlace Makefile --replace "MACHINE = MACOSX" "MACHINE = LINUX" ''; diff --git a/pkgs/applications/science/biology/sortmerna/default.nix b/pkgs/applications/science/biology/sortmerna/default.nix index c19556318843..b6291ea85297 100644 --- a/pkgs/applications/science/biology/sortmerna/default.nix +++ b/pkgs/applications/science/biology/sortmerna/default.nix @@ -56,6 +56,6 @@ stdenv.mkDerivation rec { platforms = platforms.x86_64; homepage = "https://bioinfo.lifl.fr/RNA/sortmerna/"; maintainers = with maintainers; [ luispedro ]; - broken = stdenv.isDarwin; + broken = stdenv.hostPlatform.isDarwin; }; } diff --git a/pkgs/applications/science/biology/subread/default.nix b/pkgs/applications/science/biology/subread/default.nix index 62ea61af9192..d2ee518883b5 100644 --- a/pkgs/applications/science/biology/subread/default.nix +++ b/pkgs/applications/science/biology/subread/default.nix @@ -19,7 +19,7 @@ stdenv.mkDerivation rec { configurePhase = '' cd src - cp Makefile.${if stdenv.isLinux then "Linux" else "MacOS"} Makefile + cp Makefile.${if stdenv.hostPlatform.isLinux then "Linux" else "MacOS"} Makefile ''; makeFlags = [ "CC_EXEC=cc" ]; @@ -30,7 +30,7 @@ stdenv.mkDerivation rec { ''; meta = with lib; { - broken = stdenv.isDarwin; + broken = stdenv.hostPlatform.isDarwin; description = "High-performance read alignment, quantification and mutation discovery"; license = licenses.gpl3; maintainers = with maintainers; [ jbedo ]; diff --git a/pkgs/applications/science/biology/svaba/default.nix b/pkgs/applications/science/biology/svaba/default.nix index fec5a5a3b92d..cdb6c4f9c8aa 100644 --- a/pkgs/applications/science/biology/svaba/default.nix +++ b/pkgs/applications/science/biology/svaba/default.nix @@ -34,7 +34,7 @@ stdenv.mkDerivation rec { ''; meta = with lib; { - broken = (stdenv.isLinux && stdenv.isAarch64); + broken = (stdenv.hostPlatform.isLinux && stdenv.hostPlatform.isAarch64); description = "Structural variant and INDEL caller for DNA sequencing data, using genome-wide local assembly"; mainProgram = "svaba"; license = licenses.gpl3; diff --git a/pkgs/applications/science/biology/whisper/default.nix b/pkgs/applications/science/biology/whisper/default.nix index a69b39f4e089..6c8bb21df6a5 100644 --- a/pkgs/applications/science/biology/whisper/default.nix +++ b/pkgs/applications/science/biology/whisper/default.nix @@ -37,7 +37,7 @@ stdenv.mkDerivation rec { ''; meta = with lib; { - broken = stdenv.isDarwin; + broken = stdenv.hostPlatform.isDarwin; description = "Short read sequence mapper"; license = licenses.gpl3; homepage = "https://github.com/refresh-bio/whisper"; diff --git a/pkgs/applications/science/chemistry/apbs/default.nix b/pkgs/applications/science/chemistry/apbs/default.nix index ec8f8e7ffbf6..766e4dcbd557 100644 --- a/pkgs/applications/science/chemistry/apbs/default.nix +++ b/pkgs/applications/science/chemistry/apbs/default.nix @@ -84,7 +84,7 @@ stdenv.mkDerivation (finalAttrs: { suitesparse blas python3 - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ libintl libiconv ]; diff --git a/pkgs/applications/science/chemistry/autodock-vina/default.nix b/pkgs/applications/science/chemistry/autodock-vina/default.nix index d56b8a02a20d..844fe5fea7ed 100644 --- a/pkgs/applications/science/chemistry/autodock-vina/default.nix +++ b/pkgs/applications/science/chemistry/autodock-vina/default.nix @@ -27,7 +27,7 @@ stdenv.mkDerivation (finalAttrs: { buildInputs = [ boost' - ] ++ lib.optionals stdenv.isLinux [ + ] ++ lib.optionals stdenv.hostPlatform.isLinux [ glibc.static ]; diff --git a/pkgs/applications/science/chemistry/element/default.nix b/pkgs/applications/science/chemistry/element/default.nix index cc80cb058d92..dc03eac51028 100644 --- a/pkgs/applications/science/chemistry/element/default.nix +++ b/pkgs/applications/science/chemistry/element/default.nix @@ -19,6 +19,6 @@ buildGoModule rec { homepage = "https://github.com/gennaro-tedesco/element"; license = licenses.asl20; maintainers = [ maintainers.j0hax ]; - broken = stdenv.isDarwin; + broken = stdenv.hostPlatform.isDarwin; }; } diff --git a/pkgs/applications/science/chemistry/ergoscf/default.nix b/pkgs/applications/science/chemistry/ergoscf/default.nix index 3ee33cf19b74..ceaeb3336427 100644 --- a/pkgs/applications/science/chemistry/ergoscf/default.nix +++ b/pkgs/applications/science/chemistry/ergoscf/default.nix @@ -20,7 +20,7 @@ stdenv.mkDerivation rec { configureFlags = [ "--enable-linalgebra-templates" "--enable-performance" - ] ++ lib.optional stdenv.isx86_64 "--enable-sse-intrinsics"; + ] ++ lib.optional stdenv.hostPlatform.isx86_64 "--enable-sse-intrinsics"; LDFLAGS = "-lblas -llapack"; diff --git a/pkgs/applications/science/chemistry/gwyddion/default.nix b/pkgs/applications/science/chemistry/gwyddion/default.nix index 9e64ee7afe4d..c7440e3fad81 100644 --- a/pkgs/applications/science/chemistry/gwyddion/default.nix +++ b/pkgs/applications/science/chemistry/gwyddion/default.nix @@ -11,7 +11,7 @@ zlibSupport ? true, zlib, libuniqueSupport ? true, libunique, libpngSupport ? true, libpng, - openglSupport ? !stdenv.isDarwin, libGL + openglSupport ? !stdenv.hostPlatform.isDarwin, libGL }: stdenv.mkDerivation rec { @@ -60,6 +60,6 @@ stdenv.mkDerivation rec { platforms = with lib.platforms; linux ++ darwin; maintainers = [ ]; # never built on aarch64-darwin since first introduction in nixpkgs - broken = stdenv.isDarwin && stdenv.isAarch64; + broken = stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isAarch64; }; } diff --git a/pkgs/applications/science/computer-architecture/timeloop/default.nix b/pkgs/applications/science/computer-architecture/timeloop/default.nix index 7fc5da8dfa89..3a70478262d5 100644 --- a/pkgs/applications/science/computer-architecture/timeloop/default.nix +++ b/pkgs/applications/science/computer-architecture/timeloop/default.nix @@ -33,7 +33,7 @@ stdenv.mkDerivation rec { yaml-cpp ncurses accelergy - ] ++ lib.optionals stdenv.isLinux [ gpm ]; + ] ++ lib.optionals stdenv.hostPlatform.isLinux [ gpm ]; preConfigure = '' cp -r ./pat-public/src/pat ./src/pat @@ -50,7 +50,7 @@ stdenv.mkDerivation rec { substituteInPlace ./SConstruct \ --replace-fail "env.Replace(AR = \"gcc-ar\")" "pass" \ --replace-fail "env.Replace(RANLIB = \"gcc-ranlib\")" "pass" - '' + lib.optionalString stdenv.isDarwin '' + '' + lib.optionalString stdenv.hostPlatform.isDarwin '' # prevent clang from dying on errors that gcc is fine with substituteInPlace ./src/SConscript --replace "-Werror" "-Wno-inconsistent-missing-override" @@ -76,7 +76,7 @@ stdenv.mkDerivation rec { sconsFlags = # will fail on clang/darwin on link without --static due to undefined extern # however, will fail with static on linux as nixpkgs deps aren't static - lib.optional stdenv.isDarwin "--static" + lib.optional stdenv.hostPlatform.isDarwin "--static" ++ lib.optional enableAccelergy "--accelergy" ++ lib.optional enableISL "--with-isl"; diff --git a/pkgs/applications/science/electronics/dsview/default.nix b/pkgs/applications/science/electronics/dsview/default.nix index 5d6c83f5dfaa..48a94468ef0b 100644 --- a/pkgs/applications/science/electronics/dsview/default.nix +++ b/pkgs/applications/science/electronics/dsview/default.nix @@ -21,12 +21,12 @@ stdenv.mkDerivation rec { ]; nativeBuildInputs = [ cmake pkg-config wrapQtAppsHook ] - ++ lib.optional stdenv.isDarwin desktopToDarwinBundle; + ++ lib.optional stdenv.hostPlatform.isDarwin desktopToDarwinBundle; buildInputs = [ boost fftw qtbase qtsvg libusb1 libzip python3 - ] ++ lib.optional stdenv.isLinux qtwayland; + ] ++ lib.optional stdenv.hostPlatform.isLinux qtwayland; meta = with lib; { description = "GUI program for supporting various instruments from DreamSourceLab, including logic analyzer, oscilloscope, etc"; diff --git a/pkgs/applications/science/electronics/flopoco/default.nix b/pkgs/applications/science/electronics/flopoco/default.nix index e15ef3277a66..ef6f297c63cc 100644 --- a/pkgs/applications/science/electronics/flopoco/default.nix +++ b/pkgs/applications/science/electronics/flopoco/default.nix @@ -45,7 +45,7 @@ stdenv.mkDerivation rec { }) ]; - postPatch = lib.optionalString (stdenv.isDarwin && stdenv.isx86_64) '' + postPatch = lib.optionalString (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isx86_64) '' sed -i "s/-pg//g" {,src/Apps/TaMaDi/}CMakeLists.txt ''; diff --git a/pkgs/applications/science/electronics/fritzing/default.nix b/pkgs/applications/science/electronics/fritzing/default.nix index 9eb7b5044502..04ca24861c0d 100644 --- a/pkgs/applications/science/electronics/fritzing/default.nix +++ b/pkgs/applications/science/electronics/fritzing/default.nix @@ -60,7 +60,7 @@ stdenv.mkDerivation { quazip libngspice clipper - ] ++ lib.optionals stdenv.isLinux [ + ] ++ lib.optionals stdenv.hostPlatform.isLinux [ qtwayland ]; @@ -93,7 +93,7 @@ stdenv.mkDerivation { "phoenix.pro" ]; - postInstall = lib.optionalString stdenv.isDarwin '' + postInstall = lib.optionalString stdenv.hostPlatform.isDarwin '' mkdir $out/Applications mv $out/bin/Fritzing.app $out/Applications/Fritzing.app cp FritzingInfo.plist $out/Applications/Fritzing.app/Contents/Info.plist diff --git a/pkgs/applications/science/electronics/gtkwave/default.nix b/pkgs/applications/science/electronics/gtkwave/default.nix index d28a5cf80906..5649b6bb5a77 100644 --- a/pkgs/applications/science/electronics/gtkwave/default.nix +++ b/pkgs/applications/science/electronics/gtkwave/default.nix @@ -25,7 +25,7 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ pkg-config wrapGAppsHook3 ]; buildInputs = [ bzip2 glib gperf gtk3 judy tcl tk xz ] - ++ lib.optional stdenv.isDarwin gtk-mac-integration; + ++ lib.optional stdenv.hostPlatform.isDarwin gtk-mac-integration; # fix compilation under Darwin # remove these patches upon next release diff --git a/pkgs/applications/science/electronics/hal-hardware-analyzer/default.nix b/pkgs/applications/science/electronics/hal-hardware-analyzer/default.nix index c193352eb455..acf52931c7ed 100644 --- a/pkgs/applications/science/electronics/hal-hardware-analyzer/default.nix +++ b/pkgs/applications/science/electronics/hal-hardware-analyzer/default.nix @@ -38,7 +38,7 @@ let hash = "sha256-adU5SctH+H54UaAmr5BZInytD3wjUzLtQbCwngAWs4o="; }) ]; - postPatch = prev.postPatch + lib.optionalString stdenv.isAarch64 '' + postPatch = prev.postPatch + lib.optionalString stdenv.hostPlatform.isAarch64 '' # https://github.com/igraph/igraph/issues/1694 substituteInPlace tests/CMakeLists.txt \ --replace "igraph_scg_grouping3" "" \ @@ -136,7 +136,7 @@ in stdenv.mkDerivation rec { cmakeBuildType = "MinSizeRel"; # some plugins depend on other plugins and need to be able to load them - postFixup = lib.optionalString stdenv.isLinux '' + postFixup = lib.optionalString stdenv.hostPlatform.isLinux '' find $out/lib/hal_plugins -name '*.so*' | while read -r f ; do patchelf --set-rpath "$(patchelf --print-rpath "$f"):$out/lib/hal_plugins" "$f" done diff --git a/pkgs/applications/science/electronics/kicad/base.nix b/pkgs/applications/science/electronics/kicad/base.nix index 310f9b1c6067..3d39261bc7a5 100644 --- a/pkgs/applications/science/electronics/kicad/base.nix +++ b/pkgs/applications/science/electronics/kicad/base.nix @@ -137,7 +137,7 @@ stdenv.mkDerivation rec { ] # wanted by configuration on linux, doesn't seem to affect performance # no effect on closure size - ++ optionals (stdenv.isLinux) [ + ++ optionals (stdenv.hostPlatform.isLinux) [ util-linux libselinux libsepol diff --git a/pkgs/applications/science/electronics/kicad/default.nix b/pkgs/applications/science/electronics/kicad/default.nix index 4dd8fa743121..a5cceb492522 100644 --- a/pkgs/applications/science/electronics/kicad/default.nix +++ b/pkgs/applications/science/electronics/kicad/default.nix @@ -22,7 +22,7 @@ , pname ? "kicad" , stable ? true , testing ? false -, withNgspice ? !stdenv.isDarwin +, withNgspice ? !stdenv.hostPlatform.isDarwin , libngspice , withScripting ? true , python3 @@ -234,7 +234,7 @@ stdenv.mkDerivation rec { # $out and $program_PYTHONPATH don't exist when makeWrapperArgs gets set? installPhase = let - bin = if stdenv.isDarwin then "*.app/Contents/MacOS" else "bin"; + bin = if stdenv.hostPlatform.isDarwin then "*.app/Contents/MacOS" else "bin"; tools = [ "kicad" "pcbnew" "eeschema" "gerbview" "pcb_calculator" "pl_editor" "bitmap2component" ]; utils = [ "dxf2idf" "idf2vrml" "idfcyl" "idfrect" "kicad-cli" ]; in @@ -286,7 +286,7 @@ stdenv.mkDerivation rec { license = lib.licenses.gpl3Plus; maintainers = with lib.maintainers; [ evils ]; platforms = lib.platforms.all; - broken = stdenv.isDarwin; + broken = stdenv.hostPlatform.isDarwin; mainProgram = "kicad"; }; } diff --git a/pkgs/applications/science/electronics/nanovna-saver/default.nix b/pkgs/applications/science/electronics/nanovna-saver/default.nix index d4c3c68991a2..1f483034d2b1 100644 --- a/pkgs/applications/science/electronics/nanovna-saver/default.nix +++ b/pkgs/applications/science/electronics/nanovna-saver/default.nix @@ -21,7 +21,7 @@ python3.pkgs.buildPythonApplication rec { qt6.qtbase ]; - buildInputs = lib.optional stdenv.isLinux qt6.qtwayland; + buildInputs = lib.optional stdenv.hostPlatform.isLinux qt6.qtwayland; propagatedBuildInputs = with python3.pkgs; [ cython diff --git a/pkgs/applications/science/electronics/openboardview/default.nix b/pkgs/applications/science/electronics/openboardview/default.nix index 60ee6cef7753..a3a906c25c2b 100644 --- a/pkgs/applications/science/electronics/openboardview/default.nix +++ b/pkgs/applications/science/electronics/openboardview/default.nix @@ -38,7 +38,7 @@ stdenv.mkDerivation rec { ]; nativeBuildInputs = [ cmake pkg-config python3 wrapGAppsHook3 ]; - buildInputs = [ SDL2 fontconfig gtk3 ] ++ lib.optionals stdenv.isDarwin [ + buildInputs = [ SDL2 fontconfig gtk3 ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ Cocoa ]; @@ -53,10 +53,10 @@ stdenv.mkDerivation rec { ]; dontWrapGApps = true; - postFixup = lib.optionalString stdenv.isDarwin '' + postFixup = lib.optionalString stdenv.hostPlatform.isDarwin '' mkdir -p "$out/Applications" mv "$out/openboardview.app" "$out/Applications/OpenBoardView.app" - '' + lib.optionalString (!stdenv.isDarwin) '' + '' + lib.optionalString (!stdenv.hostPlatform.isDarwin) '' wrapGApp "$out/bin/${pname}" \ --prefix LD_LIBRARY_PATH : ${lib.makeLibraryPath [ gtk3 ]} ''; diff --git a/pkgs/applications/science/electronics/pulseview/default.nix b/pkgs/applications/science/electronics/pulseview/default.nix index b6d40a19a14b..3a40b107817d 100644 --- a/pkgs/applications/science/electronics/pulseview/default.nix +++ b/pkgs/applications/science/electronics/pulseview/default.nix @@ -36,7 +36,7 @@ stdenv.mkDerivation rec { pkg-config qttools wrapQtAppsHook - ] ++ lib.optional stdenv.isDarwin desktopToDarwinBundle; + ] ++ lib.optional stdenv.hostPlatform.isDarwin desktopToDarwinBundle; buildInputs = [ glib @@ -51,7 +51,7 @@ stdenv.mkDerivation rec { pcre python3 qtsvg - ] ++ lib.optionals stdenv.isLinux [ bluez ]; + ] ++ lib.optionals stdenv.hostPlatform.isLinux [ bluez ]; meta = with lib; { description = "Qt-based LA/scope/MSO GUI for sigrok (a signal analysis software suite)"; diff --git a/pkgs/applications/science/electronics/sv-lang/default.nix b/pkgs/applications/science/electronics/sv-lang/default.nix index 58ecf986cf7a..928cf3059385 100644 --- a/pkgs/applications/science/electronics/sv-lang/default.nix +++ b/pkgs/applications/science/electronics/sv-lang/default.nix @@ -62,7 +62,7 @@ stdenv.mkDerivation rec { # TODO: a mysterious linker error occurs when building the unittests on darwin. # The error occurs when using catch2_3 in nixpkgs, not when fetching catch2_3 using CMake - doCheck = !stdenv.isDarwin; + doCheck = !stdenv.hostPlatform.isDarwin; meta = with lib; { description = "SystemVerilog compiler and language services"; diff --git a/pkgs/applications/science/electronics/tkgate/1.x.nix b/pkgs/applications/science/electronics/tkgate/1.x.nix index f20ce5e0acd0..03883652e637 100644 --- a/pkgs/applications/science/electronics/tkgate/1.x.nix +++ b/pkgs/applications/science/electronics/tkgate/1.x.nix @@ -1,8 +1,8 @@ { lib, stdenv, fetchurl, tcl, tk, libX11, glibc, which, bison, flex, imake, xorgproto, gccmakedep }: let - libiconvInc = lib.optionalString stdenv.isLinux "${glibc.dev}/include"; - libiconvLib = lib.optionalString stdenv.isLinux "${glibc.out}/lib"; + libiconvInc = lib.optionalString stdenv.hostPlatform.isLinux "${glibc.dev}/include"; + libiconvLib = lib.optionalString stdenv.hostPlatform.isLinux "${glibc.out}/lib"; in stdenv.mkDerivation rec { pname = "tkgate"; diff --git a/pkgs/applications/science/electronics/verilator/default.nix b/pkgs/applications/science/electronics/verilator/default.nix index 1bed87615756..b7f2abd37ba7 100644 --- a/pkgs/applications/science/electronics/verilator/default.nix +++ b/pkgs/applications/science/electronics/verilator/default.nix @@ -53,7 +53,7 @@ stdenv.mkDerivation rec { # cmake ]; - doCheck = stdenv.isLinux; # darwin tests are broken for now... + doCheck = stdenv.hostPlatform.isLinux; # darwin tests are broken for now... checkTarget = "test"; preConfigure = "autoconf"; diff --git a/pkgs/applications/science/electronics/xschem/default.nix b/pkgs/applications/science/electronics/xschem/default.nix index 826181139c19..72f4687f5c85 100644 --- a/pkgs/applications/science/electronics/xschem/default.nix +++ b/pkgs/applications/science/electronics/xschem/default.nix @@ -29,7 +29,7 @@ stdenv.mkDerivation rec { hardeningDisable = [ "format" ]; meta = with lib; { - broken = stdenv.isDarwin; + broken = stdenv.hostPlatform.isDarwin; description = "Schematic capture and netlisting EDA tool"; longDescription = '' Xschem is a schematic capture program, it allows creation of diff --git a/pkgs/applications/science/electronics/xyce/default.nix b/pkgs/applications/science/electronics/xyce/default.nix index 85cdafb66057..56fc59c08099 100644 --- a/pkgs/applications/science/electronics/xyce/default.nix +++ b/pkgs/applications/science/electronics/xyce/default.nix @@ -173,7 +173,7 @@ stdenv.mkDerivation rec { ''; meta = with lib; { - broken = (stdenv.isLinux && stdenv.isAarch64) || stdenv.isDarwin; + broken = (stdenv.hostPlatform.isLinux && stdenv.hostPlatform.isAarch64) || stdenv.hostPlatform.isDarwin; description = "High-performance analog circuit simulator"; longDescription = '' Xyce is a SPICE-compatible, high-performance analog circuit simulator, diff --git a/pkgs/applications/science/logic/alt-ergo/default.nix b/pkgs/applications/science/logic/alt-ergo/default.nix index 03787a3a084b..73dcd6596008 100644 --- a/pkgs/applications/science/logic/alt-ergo/default.nix +++ b/pkgs/applications/science/logic/alt-ergo/default.nix @@ -28,7 +28,7 @@ ocamlPackages.buildDunePackage { inherit pname version src; - nativeBuildInputs = [ ocamlPackages.menhir ] ++ lib.optionals stdenv.isDarwin [ darwin.sigtool ]; + nativeBuildInputs = [ ocamlPackages.menhir ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ darwin.sigtool ]; buildInputs = [ alt-ergo-parsers ] ++ (with ocamlPackages; [ cmdliner dune-site ]); meta = { diff --git a/pkgs/applications/science/logic/boolector/default.nix b/pkgs/applications/science/logic/boolector/default.nix index 1fd6bf7dc543..30e3cf500211 100644 --- a/pkgs/applications/science/logic/boolector/default.nix +++ b/pkgs/applications/science/logic/boolector/default.nix @@ -34,11 +34,11 @@ stdenv.mkDerivation rec { nativeCheckInputs = [ python3 ]; doCheck = true; preCheck = - let var = if stdenv.isDarwin then "DYLD_LIBRARY_PATH" else "LD_LIBRARY_PATH"; + let var = if stdenv.hostPlatform.isDarwin then "DYLD_LIBRARY_PATH" else "LD_LIBRARY_PATH"; in # tests modelgen and modelgensmt2 spawn boolector in another processes and # macOS strips DYLD_LIBRARY_PATH, hardcode it for testing - lib.optionalString stdenv.isDarwin '' + lib.optionalString stdenv.hostPlatform.isDarwin '' cp -r bin bin.back install_name_tool -change libboolector.dylib $(pwd)/lib/libboolector.dylib bin/boolector '' + '' @@ -46,7 +46,7 @@ stdenv.mkDerivation rec { patchShebangs .. ''; - postCheck = lib.optionalString stdenv.isDarwin '' + postCheck = lib.optionalString stdenv.hostPlatform.isDarwin '' rm -rf bin mv bin.back bin ''; diff --git a/pkgs/applications/science/logic/btor2tools/default.nix b/pkgs/applications/science/logic/btor2tools/default.nix index 5aca699f9d3d..2b547eeb9221 100644 --- a/pkgs/applications/science/logic/btor2tools/default.nix +++ b/pkgs/applications/science/logic/btor2tools/default.nix @@ -11,7 +11,7 @@ stdenv.mkDerivation rec { sha256 = "0ncl4xwms8d656x95ga8v8zjybx4cmdl5hlcml7dpcgm3p8qj4ks"; }; - nativeBuildInputs = [ cmake ] ++ lib.optional stdenv.isDarwin fixDarwinDylibNames; + nativeBuildInputs = [ cmake ] ++ lib.optional stdenv.hostPlatform.isDarwin fixDarwinDylibNames; installPhase = '' mkdir -p $out $dev/include/btor2parser/ $lib/lib diff --git a/pkgs/applications/science/logic/cbmc/default.nix b/pkgs/applications/science/logic/cbmc/default.nix index c980e84f9d9f..0bfb51273758 100644 --- a/pkgs/applications/science/logic/cbmc/default.nix +++ b/pkgs/applications/science/logic/cbmc/default.nix @@ -83,6 +83,6 @@ stdenv.mkDerivation rec { maintainers = with maintainers; [ jiegec ]; platforms = platforms.unix; # error: no member named 'aligned_alloc' in the global namespace - broken = stdenv.isDarwin && stdenv.isx86_64; + broken = stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isx86_64; }; } diff --git a/pkgs/applications/science/logic/cvc4/default.nix b/pkgs/applications/science/logic/cvc4/default.nix index 2dc12b7ab723..c44b495f2cae 100644 --- a/pkgs/applications/science/logic/cvc4/default.nix +++ b/pkgs/applications/science/logic/cvc4/default.nix @@ -15,13 +15,13 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ pkg-config cmake ]; buildInputs = [ gmp git python3.pkgs.toml readline swig libantlr3c antlr3_4 boost jdk python3 ] - ++ lib.optionals (!stdenv.isDarwin) [ cln ]; + ++ lib.optionals (!stdenv.hostPlatform.isDarwin) [ cln ]; configureFlags = [ "--enable-language-bindings=c,c++,java" "--enable-gpl" "--with-readline" "--with-boost=${boost.dev}" - ] ++ lib.optionals (!stdenv.isDarwin) [ "--with-cln" ]; + ] ++ lib.optionals (!stdenv.hostPlatform.isDarwin) [ "--with-cln" ]; prePatch = '' patch -p1 -i ${./minisat-fenv.patch} -d src/prop/minisat diff --git a/pkgs/applications/science/logic/elan/default.nix b/pkgs/applications/science/logic/elan/default.nix index d43ae16a647e..04c5f746f647 100644 --- a/pkgs/applications/science/logic/elan/default.nix +++ b/pkgs/applications/science/logic/elan/default.nix @@ -19,11 +19,11 @@ rustPlatform.buildRustPackage rec { OPENSSL_NO_VENDOR = 1; buildInputs = [ curl zlib openssl ] - ++ lib.optional stdenv.isDarwin libiconv; + ++ lib.optional stdenv.hostPlatform.isDarwin libiconv; buildFeatures = [ "no-self-update" ]; - patches = lib.optionals stdenv.isLinux [ + patches = lib.optionals stdenv.hostPlatform.isLinux [ # Run patchelf on the downloaded binaries. # This is necessary because Lean 4 is now dynamically linked. (runCommand "0001-dynamically-patchelf-binaries.patch" { diff --git a/pkgs/applications/science/logic/formula/default.nix b/pkgs/applications/science/logic/formula/default.nix index 20267e6071c5..bfaf2489bdf7 100644 --- a/pkgs/applications/science/logic/formula/default.nix +++ b/pkgs/applications/science/logic/formula/default.nix @@ -14,9 +14,9 @@ buildDotnetModule rec { nugetDeps = ./nuget.nix; projectFile = "Src/CommandLine/CommandLine.csproj"; - postFixup = if stdenv.isLinux then '' + postFixup = if stdenv.hostPlatform.isLinux then '' mv $out/bin/CommandLine $out/bin/formula - '' else lib.optionalString stdenv.isDarwin '' + '' else lib.optionalString stdenv.hostPlatform.isDarwin '' makeWrapper ${dotnetCorePackages.runtime_6_0}/bin/dotnet $out/bin/formula \ --add-flags "$out/lib/formula-dotnet/CommandLine.dll" \ --prefix DYLD_LIBRARY_PATH : $out/lib/formula-dotnet/runtimes/macos/native diff --git a/pkgs/applications/science/logic/hol/default.nix b/pkgs/applications/science/logic/hol/default.nix index f23dce326dd5..883eb4331c9f 100644 --- a/pkgs/applications/science/logic/hol/default.nix +++ b/pkgs/applications/science/logic/hol/default.nix @@ -62,7 +62,7 @@ stdenv.mkDerivation { ''; meta = with lib; { - broken = (stdenv.isLinux && stdenv.isAarch64); + broken = (stdenv.hostPlatform.isLinux && stdenv.hostPlatform.isAarch64); description = "Interactive theorem prover based on Higher-Order Logic"; longDescription = '' HOL4 is the latest version of the HOL interactive proof diff --git a/pkgs/applications/science/logic/key/default.nix b/pkgs/applications/science/logic/key/default.nix index 0cd5e90cbb50..d97eb42b4027 100644 --- a/pkgs/applications/science/logic/key/default.nix +++ b/pkgs/applications/science/logic/key/default.nix @@ -51,7 +51,7 @@ in stdenv.mkDerivation rec { __darwinAllowLocalNetworking = true; # tests are broken on darwin - doCheck = !stdenv.isDarwin; + doCheck = !stdenv.hostPlatform.isDarwin; installPhase = '' runHook preInstall diff --git a/pkgs/applications/science/logic/lean/default.nix b/pkgs/applications/science/logic/lean/default.nix index f0bd2ba777db..4df1d6eb8aab 100644 --- a/pkgs/applications/science/logic/lean/default.nix +++ b/pkgs/applications/science/logic/lean/default.nix @@ -42,7 +42,7 @@ stdenv.mkDerivation rec { postPatch = "patchShebangs ."; - postInstall = lib.optionalString stdenv.isDarwin '' + postInstall = lib.optionalString stdenv.hostPlatform.isDarwin '' substituteInPlace $out/bin/leanpkg \ --replace "greadlink" "${coreutils}/bin/readlink" ''; diff --git a/pkgs/applications/science/logic/lean2/default.nix b/pkgs/applications/science/logic/lean2/default.nix index e30b8af04735..83cada9e309a 100644 --- a/pkgs/applications/science/logic/lean2/default.nix +++ b/pkgs/applications/science/logic/lean2/default.nix @@ -40,7 +40,7 @@ stdenv.mkDerivation { license = licenses.asl20; platforms = platforms.unix; maintainers = with maintainers; [ thoughtpolice gebner ]; - broken = stdenv.isAarch64; + broken = stdenv.hostPlatform.isAarch64; mainProgram = "lean"; }; } diff --git a/pkgs/applications/science/logic/logisim-evolution/default.nix b/pkgs/applications/science/logic/logisim-evolution/default.nix index 3d86c8cafdbc..465360a20238 100644 --- a/pkgs/applications/science/logic/logisim-evolution/default.nix +++ b/pkgs/applications/science/logic/logisim-evolution/default.nix @@ -29,7 +29,7 @@ stdenv.mkDerivation (finalAttrs: { makeBinaryWrapper copyDesktopItems unzip - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ desktopToDarwinBundle ]; diff --git a/pkgs/applications/science/logic/logisim/default.nix b/pkgs/applications/science/logic/logisim/default.nix index d278f1e78468..951d5b22deef 100644 --- a/pkgs/applications/science/logic/logisim/default.nix +++ b/pkgs/applications/science/logic/logisim/default.nix @@ -23,7 +23,7 @@ stdenv.mkDerivation (finalAttrs: { makeBinaryWrapper copyDesktopItems unzip - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ desktopToDarwinBundle ]; diff --git a/pkgs/applications/science/logic/mcrl2/default.nix b/pkgs/applications/science/logic/mcrl2/default.nix index c26e5f2e761f..a0cbdabc5a45 100644 --- a/pkgs/applications/science/logic/mcrl2/default.nix +++ b/pkgs/applications/science/logic/mcrl2/default.nix @@ -16,7 +16,7 @@ stdenv.mkDerivation rec { dontWrapQtApps = true; meta = with lib; { - broken = stdenv.isDarwin; + broken = stdenv.hostPlatform.isDarwin; description = "Toolset for model-checking concurrent systems and protocols"; longDescription = '' A formal specification language with an associated toolset, diff --git a/pkgs/applications/science/logic/nuXmv/default.nix b/pkgs/applications/science/logic/nuXmv/default.nix index ad40902e9280..5726796bfa18 100644 --- a/pkgs/applications/science/logic/nuXmv/default.nix +++ b/pkgs/applications/science/logic/nuXmv/default.nix @@ -5,21 +5,21 @@ stdenv.mkDerivation rec { version = "2.0.0"; src = fetchurl { - url = "https://es-static.fbk.eu/tools/nuxmv/downloads/nuXmv-${version}-${if stdenv.isDarwin then "macosx64" else "linux64"}.tar.gz"; - sha256 = if stdenv.isDarwin + url = "https://es-static.fbk.eu/tools/nuxmv/downloads/nuXmv-${version}-${if stdenv.hostPlatform.isDarwin then "macosx64" else "linux64"}.tar.gz"; + sha256 = if stdenv.hostPlatform.isDarwin then "sha256-48I+FhJUUam1nMCMMM47CwGO82BYsNz0eHDHXBfqO2E=" else "sha256-Gf+QgAjTrysZj7qTtt1wcQPganDtO0YtRY4ykhLPzVo="; }; nativeBuildInputs = [ makeWrapper ]; - buildInputs = lib.optionals stdenv.isDarwin [ gmp ]; + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ gmp ]; installPhase= '' runHook preInstall install -Dm755 -t $out/bin ./bin/nuXmv runHook postInstall ''; - postFixup = lib.optionalString stdenv.isDarwin '' + postFixup = lib.optionalString stdenv.hostPlatform.isDarwin '' wrapProgram $out/bin/nuXmv --prefix DYLD_LIBRARY_PATH : ${gmp}/lib ''; diff --git a/pkgs/applications/science/logic/open-wbo/default.nix b/pkgs/applications/science/logic/open-wbo/default.nix index 2290ff29224b..798643acc1bb 100644 --- a/pkgs/applications/science/logic/open-wbo/default.nix +++ b/pkgs/applications/science/logic/open-wbo/default.nix @@ -19,7 +19,7 @@ stdenv.mkDerivation { ''; meta = with lib; { - broken = (stdenv.isLinux && stdenv.isAarch64); + broken = (stdenv.hostPlatform.isLinux && stdenv.hostPlatform.isAarch64); description = "State-of-the-art MaxSAT and Pseudo-Boolean solver"; mainProgram = "open-wbo"; maintainers = with maintainers; [ gebner ]; diff --git a/pkgs/applications/science/logic/opensmt/default.nix b/pkgs/applications/science/logic/opensmt/default.nix index 1a031e8d1e1d..0ebbbc663caa 100644 --- a/pkgs/applications/science/logic/opensmt/default.nix +++ b/pkgs/applications/science/logic/opensmt/default.nix @@ -29,7 +29,7 @@ stdenv.mkDerivation rec { ]; meta = with lib; { - broken = (stdenv.isLinux && stdenv.isAarch64); + broken = (stdenv.hostPlatform.isLinux && stdenv.hostPlatform.isAarch64); description = "Satisfiability modulo theory (SMT) solver"; mainProgram = "opensmt"; maintainers = [ maintainers.raskin ]; diff --git a/pkgs/applications/science/logic/picosat/default.nix b/pkgs/applications/science/logic/picosat/default.nix index 1fef05069a69..23fc2776ba81 100644 --- a/pkgs/applications/science/logic/picosat/default.nix +++ b/pkgs/applications/science/logic/picosat/default.nix @@ -19,7 +19,7 @@ stdenv.mkDerivation rec { configurePhase = "./configure.sh --shared --trace"; - makeFlags = lib.optional stdenv.isDarwin + makeFlags = lib.optional stdenv.hostPlatform.isDarwin "SONAME=-Wl,-install_name,$(out)/lib/libpicosat.so"; installPhase = '' diff --git a/pkgs/applications/science/logic/satallax/default.nix b/pkgs/applications/science/logic/satallax/default.nix index bd3e9d3e8351..0f7d05a8823e 100644 --- a/pkgs/applications/science/logic/satallax/default.nix +++ b/pkgs/applications/science/logic/satallax/default.nix @@ -49,7 +49,7 @@ stdenv.mkDerivation rec { ''; # error: invalid suffix on literal; C++11 requires a space between literal and identifier - env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.isDarwin "-Wno-reserved-user-defined-literal"; + env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.hostPlatform.isDarwin "-Wno-reserved-user-defined-literal"; installPhase = '' mkdir -p "$out/share/doc/satallax" "$out/bin" "$out/lib" "$out/lib/satallax" @@ -67,7 +67,7 @@ stdenv.mkDerivation rec { cp -r coq* "$out/lib/satallax/" ''; - doCheck = stdenv.isLinux; + doCheck = stdenv.hostPlatform.isLinux; checkPhase = '' runHook preCheck diff --git a/pkgs/applications/science/logic/tamarin-prover/default.nix b/pkgs/applications/science/logic/tamarin-prover/default.nix index 2aa92118b03a..e621b36a773b 100644 --- a/pkgs/applications/science/logic/tamarin-prover/default.nix +++ b/pkgs/applications/science/logic/tamarin-prover/default.nix @@ -108,7 +108,7 @@ mkDerivation (common "tamarin-prover" src // { executableToolDepends = [ makeWrapper which maude graphviz ]; postInstall = '' wrapProgram $out/bin/tamarin-prover \ - '' + lib.optionalString stdenv.isLinux '' + '' + lib.optionalString stdenv.hostPlatform.isLinux '' --set LOCALE_ARCHIVE "${glibcLocales}/lib/locale/locale-archive" \ '' + '' --prefix PATH : ${lib.makeBinPath [ which maude graphviz ]} diff --git a/pkgs/applications/science/machine-learning/finalfrontier/default.nix b/pkgs/applications/science/machine-learning/finalfrontier/default.nix index 9dbbe8455d1b..ca495dcc280a 100644 --- a/pkgs/applications/science/machine-learning/finalfrontier/default.nix +++ b/pkgs/applications/science/machine-learning/finalfrontier/default.nix @@ -27,7 +27,7 @@ rustPlatform.buildRustPackage rec { pkg-config ]; - buildInputs = [ openssl ] ++ lib.optionals stdenv.isDarwin [ + buildInputs = [ openssl ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ libiconv Security ]; diff --git a/pkgs/applications/science/machine-learning/finalfusion-utils/default.nix b/pkgs/applications/science/machine-learning/finalfusion-utils/default.nix index b6fa984e7d5b..2b3bd2776089 100644 --- a/pkgs/applications/science/machine-learning/finalfusion-utils/default.nix +++ b/pkgs/applications/science/machine-learning/finalfusion-utils/default.nix @@ -30,7 +30,7 @@ rustPlatform.buildRustPackage rec { gfortran.cc.lib lapack openssl - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ Security ]; diff --git a/pkgs/applications/science/math/R/default.nix b/pkgs/applications/science/math/R/default.nix index b6fac3cca9e5..f2825e13568a 100644 --- a/pkgs/applications/science/math/R/default.nix +++ b/pkgs/applications/science/math/R/default.nix @@ -33,7 +33,7 @@ stdenv.mkDerivation (finalAttrs: { bzip2 gfortran libX11 libXmu libXt libXt libjpeg libpng libtiff ncurses pango pcre2 perl readline (texliveSmall.withPackages (ps: with ps; [ inconsolata helvetic ps.texinfo fancyvrb cm-super rsfs ])) xz zlib less texinfo graphviz icu bison imake which blas lapack curl tcl tk jdk tzdata - ] ++ lib.optionals stdenv.isDarwin [ Cocoa Foundation libobjc libcxx ]; + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ Cocoa Foundation libobjc libcxx ]; patches = [ ./no-usr-local-search-paths.patch @@ -41,7 +41,7 @@ stdenv.mkDerivation (finalAttrs: { # Test of the examples for package 'tcltk' fails in Darwin sandbox. See: # https://github.com/NixOS/nixpkgs/issues/146131 - postPatch = lib.optionalString stdenv.isDarwin '' + postPatch = lib.optionalString stdenv.hostPlatform.isDarwin '' substituteInPlace configure \ --replace "-install_name libRblas.dylib" "-install_name $out/lib/R/lib/libRblas.dylib" \ --replace "-install_name libRlapack.dylib" "-install_name $out/lib/R/lib/libRlapack.dylib" \ @@ -77,7 +77,7 @@ stdenv.mkDerivation (finalAttrs: { RANLIB=$(type -p ranlib) r_cv_have_curl728=yes R_SHELL="${stdenv.shell}" - '' + lib.optionalString stdenv.isDarwin '' + '' + lib.optionalString stdenv.hostPlatform.isDarwin '' --disable-R-framework --without-x OBJC="clang" diff --git a/pkgs/applications/science/math/caffe/default.nix b/pkgs/applications/science/math/caffe/default.nix index 2390e9137751..f82cef9d881c 100644 --- a/pkgs/applications/science/math/caffe/default.nix +++ b/pkgs/applications/science/math/caffe/default.nix @@ -73,7 +73,7 @@ stdenv.mkDerivation rec { ++ lib.optional ncclSupport nccl ++ lib.optionals leveldbSupport [ leveldb snappy ] ++ lib.optionals pythonSupport [ python numpy ] - ++ lib.optionals stdenv.isDarwin [ Accelerate CoreGraphics CoreVideo ] + ++ lib.optionals stdenv.hostPlatform.isDarwin [ Accelerate CoreGraphics CoreVideo ] ; propagatedBuildInputs = lib.optionals pythonSupport ( diff --git a/pkgs/applications/science/math/cemu-ti/default.nix b/pkgs/applications/science/math/cemu-ti/default.nix index 824476090c24..547b57b312db 100644 --- a/pkgs/applications/science/math/cemu-ti/default.nix +++ b/pkgs/applications/science/math/cemu-ti/default.nix @@ -41,6 +41,6 @@ stdenv.mkDerivation (finalAttrs: { license = licenses.gpl3Plus; maintainers = with maintainers; [ luc65r ]; platforms = [ "x86_64-linux" "x86_64-darwin" ]; - broken = stdenv.isDarwin; + broken = stdenv.hostPlatform.isDarwin; }; }) diff --git a/pkgs/applications/science/math/colpack/default.nix b/pkgs/applications/science/math/colpack/default.nix index 768366cc5d7a..591ac3281e5e 100644 --- a/pkgs/applications/science/math/colpack/default.nix +++ b/pkgs/applications/science/math/colpack/default.nix @@ -15,7 +15,7 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ autoreconfHook ]; configureFlags = [ - "--enable-openmp=${if stdenv.isLinux then "yes" else "no"}" + "--enable-openmp=${if stdenv.hostPlatform.isLinux then "yes" else "no"}" "--enable-examples=no" ]; diff --git a/pkgs/applications/science/math/ecm/default.nix b/pkgs/applications/science/math/ecm/default.nix index 222db0e98e6a..ed1c07d87ec1 100644 --- a/pkgs/applications/science/math/ecm/default.nix +++ b/pkgs/applications/science/math/ecm/default.nix @@ -15,7 +15,7 @@ stdenv.mkDerivation { }; # See https://trac.sagemath.org/ticket/19233 - configureFlags = lib.optional stdenv.isDarwin "--disable-asm-redc"; + configureFlags = lib.optional stdenv.hostPlatform.isDarwin "--disable-asm-redc"; buildInputs = [ m4 gmp ]; diff --git a/pkgs/applications/science/math/geogebra/default.nix b/pkgs/applications/science/math/geogebra/default.nix index 5fa4862bb9b4..1d5fa4a9ef45 100644 --- a/pkgs/applications/science/math/geogebra/default.nix +++ b/pkgs/applications/science/math/geogebra/default.nix @@ -95,6 +95,6 @@ let ''; }; in -if stdenv.isDarwin +if stdenv.hostPlatform.isDarwin then darwinPkg else linuxPkg diff --git a/pkgs/applications/science/math/geogebra/geogebra6.nix b/pkgs/applications/science/math/geogebra/geogebra6.nix index 40169a72e4a6..d57175daff93 100644 --- a/pkgs/applications/science/math/geogebra/geogebra6.nix +++ b/pkgs/applications/science/math/geogebra/geogebra6.nix @@ -97,4 +97,4 @@ let }; }; in -if stdenv.isDarwin then darwinPkg else linuxPkg +if stdenv.hostPlatform.isDarwin then darwinPkg else linuxPkg diff --git a/pkgs/applications/science/math/giac/default.nix b/pkgs/applications/science/math/giac/default.nix index 4c0d7235efc7..ce009975c1ba 100644 --- a/pkgs/applications/science/math/giac/default.nix +++ b/pkgs/applications/science/math/giac/default.nix @@ -102,7 +102,7 @@ stdenv.mkDerivation rec { # when fltk is disabled. disable these tests for now. echo > check/chk_fhan2 echo > check/chk_fhan9 - '' + lib.optionalString (stdenv.isDarwin) '' + '' + lib.optionalString (stdenv.hostPlatform.isDarwin) '' # these cover a known regression in giac, likely due to how pari state # is shared between multiple giac instances (see pari.cc.old). # see https://github.com/NixOS/nixpkgs/pull/264126 for more information @@ -118,7 +118,7 @@ stdenv.mkDerivation rec { "--enable-ao" "--enable-ecm" "--enable-glpk" ] ++ lib.optionals enableGUI [ "--enable-gui" "--with-x" - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ "--disable-nls" ] ++ lib.optionals (!enableGUI) [ "--disable-fltk" diff --git a/pkgs/applications/science/math/ginac/default.nix b/pkgs/applications/science/math/ginac/default.nix index d9d12cbf388d..d2713befed38 100644 --- a/pkgs/applications/science/math/ginac/default.nix +++ b/pkgs/applications/science/math/ginac/default.nix @@ -12,7 +12,7 @@ stdenv.mkDerivation rec { propagatedBuildInputs = [ cln ]; buildInputs = [ readline ] - ++ lib.optional stdenv.isDarwin gmp; + ++ lib.optional stdenv.hostPlatform.isDarwin gmp; nativeBuildInputs = [ pkg-config python3 ]; diff --git a/pkgs/applications/science/math/gmsh/default.nix b/pkgs/applications/science/math/gmsh/default.nix index 3e88e7f94bbe..2219815824e7 100644 --- a/pkgs/applications/science/math/gmsh/default.nix +++ b/pkgs/applications/science/math/gmsh/default.nix @@ -16,7 +16,7 @@ stdenv.mkDerivation rec { buildInputs = [ blas lapack gmm fltk libjpeg zlib opencascade-occt - ] ++ lib.optionals (!stdenv.isDarwin) [ + ] ++ lib.optionals (!stdenv.hostPlatform.isDarwin) [ libGL libGLU xorg.libXrender xorg.libXcursor xorg.libXfixes xorg.libXext xorg.libXft xorg.libXinerama xorg.libX11 xorg.libSM xorg.libICE diff --git a/pkgs/applications/science/math/lp_solve/default.nix b/pkgs/applications/science/math/lp_solve/default.nix index 773f1f3c089e..67d7bfdba90c 100644 --- a/pkgs/applications/science/math/lp_solve/default.nix +++ b/pkgs/applications/science/math/lp_solve/default.nix @@ -15,16 +15,16 @@ stdenv.mkDerivation rec { sha256 = "sha256-bUq/9cxqqpM66ObBeiJt8PwLZxxDj2lxXUHQn+gfkC8="; }; - nativeBuildInputs = lib.optionals stdenv.isDarwin [ + nativeBuildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ cctools fixDarwinDylibNames - ] ++ lib.optionals (stdenv.isDarwin && stdenv.isAarch64) [ + ] ++ lib.optionals (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isAarch64) [ autoSignDarwinBinariesHook ]; env = { NIX_CFLAGS_COMPILE = "-Wno-error=implicit-int"; - } // lib.optionalAttrs (stdenv.isDarwin && stdenv.isx86_64) { + } // lib.optionalAttrs (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isx86_64) { NIX_LDFLAGS = "-headerpad_max_install_names"; }; @@ -32,7 +32,7 @@ stdenv.mkDerivation rec { buildPhase = let - ccc = if stdenv.isDarwin then "ccc.osx" else "ccc"; + ccc = if stdenv.hostPlatform.isDarwin then "ccc.osx" else "ccc"; in '' runHook preBuild diff --git a/pkgs/applications/science/math/palp/default.nix b/pkgs/applications/science/math/palp/default.nix index a3b54b78f99b..0db35ba89ae6 100644 --- a/pkgs/applications/science/math/palp/default.nix +++ b/pkgs/applications/science/math/palp/default.nix @@ -21,7 +21,7 @@ stdenv.mkDerivation rec { "format" ]; - patchPhase = lib.optionalString stdenv.isDarwin '' + patchPhase = lib.optionalString stdenv.hostPlatform.isDarwin '' substituteInPlace GNUmakefile --replace gcc cc ''; diff --git a/pkgs/applications/science/math/qalculate-gtk/default.nix b/pkgs/applications/science/math/qalculate-gtk/default.nix index a27d7c1ffdb6..306d6141ac17 100644 --- a/pkgs/applications/science/math/qalculate-gtk/default.nix +++ b/pkgs/applications/science/math/qalculate-gtk/default.nix @@ -14,7 +14,7 @@ stdenv.mkDerivation (finalAttrs: { hardeningDisable = [ "format" ]; nativeBuildInputs = [ intltool pkg-config autoreconfHook wrapGAppsHook3 ] - ++ lib.optionals stdenv.isDarwin [ desktopToDarwinBundle ]; + ++ lib.optionals stdenv.hostPlatform.isDarwin [ desktopToDarwinBundle ]; buildInputs = [ libqalculate gtk3 curl ]; enableParallelBuilding = true; diff --git a/pkgs/applications/science/math/qalculate-qt/default.nix b/pkgs/applications/science/math/qalculate-qt/default.nix index b1db5ce31a79..2cde63449888 100644 --- a/pkgs/applications/science/math/qalculate-qt/default.nix +++ b/pkgs/applications/science/math/qalculate-qt/default.nix @@ -13,14 +13,14 @@ stdenv.mkDerivation (finalAttrs: { nativeBuildInputs = [ qmake intltool pkg-config qttools wrapQtAppsHook ]; buildInputs = [ libqalculate qtbase qtsvg ] - ++ lib.optionals stdenv.isLinux [ qtwayland ]; + ++ lib.optionals stdenv.hostPlatform.isLinux [ qtwayland ]; postPatch = '' substituteInPlace qalculate-qt.pro\ --replace "LRELEASE" "${qttools.dev}/bin/lrelease" ''; - postInstall = lib.optionalString stdenv.isDarwin '' + postInstall = lib.optionalString stdenv.hostPlatform.isDarwin '' mkdir -p $out/Applications mv $out/bin/qalculate-qt.app $out/Applications makeWrapper $out/{Applications/qalculate-qt.app/Contents/MacOS,bin}/qalculate-qt diff --git a/pkgs/applications/science/math/ratpoints/default.nix b/pkgs/applications/science/math/ratpoints/default.nix index f2aa1aac2607..4aaed4a1b0ed 100644 --- a/pkgs/applications/science/math/ratpoints/default.nix +++ b/pkgs/applications/science/math/ratpoints/default.nix @@ -20,7 +20,7 @@ stdenv.mkDerivation rec { buildInputs = [ gmp ]; makeFlags = [ "CC=${stdenv.cc.targetPrefix}cc" ]; - buildFlags = lib.optionals stdenv.isDarwin ["CCFLAGS2=-lgmp -lc -lm" "CCFLAGS=-UUSE_SSE"]; + buildFlags = lib.optionals stdenv.hostPlatform.isDarwin ["CCFLAGS2=-lgmp -lc -lm" "CCFLAGS=-UUSE_SSE"]; installFlags = [ "INSTALL_DIR=$(out)" ]; preInstall = ''mkdir -p "$out"/{bin,share,lib,include}''; diff --git a/pkgs/applications/science/math/scalp/default.nix b/pkgs/applications/science/math/scalp/default.nix index f6ec20faff59..a4d3dc52e0a9 100644 --- a/pkgs/applications/science/math/scalp/default.nix +++ b/pkgs/applications/science/math/scalp/default.nix @@ -33,7 +33,7 @@ stdenv.mkDerivation rec { lp_solve ]; - postPatch = lib.optionalString stdenv.isDarwin '' + postPatch = lib.optionalString stdenv.hostPlatform.isDarwin '' substituteInPlace CMakeLists.txt \ --replace "\''$ORIGIN" "\''${CMAKE_INSTALL_PREFIX}/lib" ''; diff --git a/pkgs/applications/science/math/scilab-bin/default.nix b/pkgs/applications/science/math/scilab-bin/default.nix index f6da20531385..e3ca7bef52a4 100644 --- a/pkgs/applications/science/math/scilab-bin/default.nix +++ b/pkgs/applications/science/math/scilab-bin/default.nix @@ -100,4 +100,4 @@ let ''; }; in -if stdenv.isDarwin then darwin else linux +if stdenv.hostPlatform.isDarwin then darwin else linux diff --git a/pkgs/applications/science/math/singular/default.nix b/pkgs/applications/science/math/singular/default.nix index 6ec1c9a2b74e..fff9c7dfaf90 100644 --- a/pkgs/applications/science/math/singular/default.nix +++ b/pkgs/applications/science/math/singular/default.nix @@ -84,7 +84,7 @@ stdenv.mkDerivation rec { latex2html texinfo texliveSmall - ] ++ lib.optionals stdenv.isDarwin [ getconf ]; + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ getconf ]; depsBuildBuild = [ buildPackages.stdenv.cc ]; preAutoreconf = '' @@ -95,7 +95,7 @@ stdenv.mkDerivation rec { -i '{}' ';' ''; - hardeningDisable = lib.optional stdenv.isi686 "stackprotector"; + hardeningDisable = lib.optional stdenv.hostPlatform.isi686 "stackprotector"; doCheck = true; # very basic checks, does not test any libraries diff --git a/pkgs/applications/science/math/speedcrunch/default.nix b/pkgs/applications/science/math/speedcrunch/default.nix index 021c1bedc348..ed7339ab5677 100644 --- a/pkgs/applications/science/math/speedcrunch/default.nix +++ b/pkgs/applications/science/math/speedcrunch/default.nix @@ -32,6 +32,6 @@ mkDerivation rec { ''; maintainers = with maintainers; [ gebner j0hax ]; inherit (qtbase.meta) platforms; - broken = stdenv.isDarwin; + broken = stdenv.hostPlatform.isDarwin; }; } diff --git a/pkgs/applications/science/misc/gplates/default.nix b/pkgs/applications/science/misc/gplates/default.nix index ae7681a7a3af..72504246b6c0 100644 --- a/pkgs/applications/science/misc/gplates/default.nix +++ b/pkgs/applications/science/misc/gplates/default.nix @@ -80,6 +80,6 @@ in stdenv.mkDerivation (finalAttrs: { homepage = "https://www.gplates.org"; license = licenses.gpl2Only; platforms = platforms.all; - broken = stdenv.isDarwin; # FIX: this check: https://github.com/GPlates/GPlates/blob/gplates/cmake/modules/Config_h.cmake#L72 + broken = stdenv.hostPlatform.isDarwin; # FIX: this check: https://github.com/GPlates/GPlates/blob/gplates/cmake/modules/Config_h.cmake#L72 }; }) diff --git a/pkgs/applications/science/misc/graphia/default.nix b/pkgs/applications/science/misc/graphia/default.nix index a5055220e95f..88fc3a8c0e57 100644 --- a/pkgs/applications/science/misc/graphia/default.nix +++ b/pkgs/applications/science/misc/graphia/default.nix @@ -46,7 +46,7 @@ stdenv.mkDerivation rec { meta = with lib; { # never built on Hydra https://hydra.nixos.org/job/nixpkgs/trunk/graphia.x86_64-darwin - broken = (stdenv.isLinux && stdenv.isAarch64) || stdenv.isDarwin; + broken = (stdenv.hostPlatform.isLinux && stdenv.hostPlatform.isAarch64) || stdenv.hostPlatform.isDarwin; description = "Visualisation tool for the creation and analysis of graphs"; homepage = "https://graphia.app"; license = licenses.gpl3Only; diff --git a/pkgs/applications/science/misc/openmvg/default.nix b/pkgs/applications/science/misc/openmvg/default.nix index f622f87d2e41..a535f436ddb1 100644 --- a/pkgs/applications/science/misc/openmvg/default.nix +++ b/pkgs/applications/science/misc/openmvg/default.nix @@ -73,7 +73,7 @@ stdenv.mkDerivation rec { passthru.updateScript = nix-update-script { }; meta = { - broken = stdenv.isDarwin && stdenv.isx86_64; + broken = stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isx86_64; description = "Library for computer-vision scientists and targeted for the Multiple View Geometry community"; homepage = "https://openmvg.readthedocs.io/en/latest/"; license = lib.licenses.mpl20; diff --git a/pkgs/applications/science/misc/openmvs/default.nix b/pkgs/applications/science/misc/openmvs/default.nix index 57c4367d2a82..689ce1ad554c 100644 --- a/pkgs/applications/science/misc/openmvs/default.nix +++ b/pkgs/applications/science/misc/openmvs/default.nix @@ -38,7 +38,7 @@ stdenv.mkDerivation rec { }; # SSE is enabled by default - cmakeFlags = lib.optional (!stdenv.isx86_64) "-DOpenMVS_USE_SSE=OFF"; + cmakeFlags = lib.optional (!stdenv.hostPlatform.isx86_64) "-DOpenMVS_USE_SSE=OFF"; buildInputs = [ boostWithZstd diff --git a/pkgs/applications/science/misc/openrefine/default.nix b/pkgs/applications/science/misc/openrefine/default.nix index 6d169db23b92..60615b6f0926 100644 --- a/pkgs/applications/science/misc/openrefine/default.nix +++ b/pkgs/applications/science/misc/openrefine/default.nix @@ -120,7 +120,7 @@ in maven.buildMavenPackage { fromSource binaryBytecode # maven dependencies ]; - broken = stdenv.isDarwin; # builds, doesn't run + broken = stdenv.hostPlatform.isDarwin; # builds, doesn't run mainProgram = "refine"; }; } diff --git a/pkgs/applications/science/misc/reason-shell/default.nix b/pkgs/applications/science/misc/reason-shell/default.nix index 5491593cc7f7..015b5c97ebf3 100644 --- a/pkgs/applications/science/misc/reason-shell/default.nix +++ b/pkgs/applications/science/misc/reason-shell/default.nix @@ -26,7 +26,7 @@ rustPlatform.buildRustPackage rec { buildInputs = [ openssl - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.CoreServices ]; diff --git a/pkgs/applications/science/misc/rink/default.nix b/pkgs/applications/science/misc/rink/default.nix index ae51d55168a9..c0b33b3cbedb 100644 --- a/pkgs/applications/science/misc/rink/default.nix +++ b/pkgs/applications/science/misc/rink/default.nix @@ -16,7 +16,7 @@ rustPlatform.buildRustPackage rec { nativeBuildInputs = [ pkg-config installShellFiles asciidoctor ]; buildInputs = [ ncurses ] - ++ (if stdenv.isDarwin then [ curl libiconv Security ] else [ openssl ]); + ++ (if stdenv.hostPlatform.isDarwin then [ curl libiconv Security ] else [ openssl ]); # Some tests fail and/or attempt to use internet servers. doCheck = false; diff --git a/pkgs/applications/science/misc/root/5.nix b/pkgs/applications/science/misc/root/5.nix index 80f2df0688da..62f80ee48096 100644 --- a/pkgs/applications/science/misc/root/5.nix +++ b/pkgs/applications/science/misc/root/5.nix @@ -35,8 +35,8 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ cmake pkg-config ]; buildInputs = [ pcre python3 zlib libxml2 lz4 xz gsl xxHash libxcrypt ] - ++ lib.optionals (!stdenv.isDarwin) [ libX11 libXpm libXft libXext libGLU libGL ] - ++ lib.optionals (stdenv.isDarwin) [ Cocoa OpenGL ] + ++ lib.optionals (!stdenv.hostPlatform.isDarwin) [ libX11 libXpm libXft libXext libGLU libGL ] + ++ lib.optionals (stdenv.hostPlatform.isDarwin) [ Cocoa OpenGL ] ; patches = [ @@ -147,7 +147,7 @@ stdenv.mkDerivation rec { "-Dxml=ON" "-Dxrootd=OFF" ] - ++ lib.optional stdenv.isDarwin "-DOPENGL_INCLUDE_DIR=${OpenGL}/Library/Frameworks"; + ++ lib.optional stdenv.hostPlatform.isDarwin "-DOPENGL_INCLUDE_DIR=${OpenGL}/Library/Frameworks"; setupHook = ./setup-hook.sh; @@ -155,7 +155,7 @@ stdenv.mkDerivation rec { homepage = "https://root.cern.ch/"; description = "Data analysis framework"; platforms = platforms.unix; - broken = !stdenv.isx86_64 || stdenv.cc.isClang or false; + broken = !stdenv.hostPlatform.isx86_64 || stdenv.cc.isClang or false; maintainers = with maintainers; [ veprbl ]; license = licenses.lgpl21; }; diff --git a/pkgs/applications/science/misc/root/default.nix b/pkgs/applications/science/misc/root/default.nix index fd998f732818..98fee1747810 100644 --- a/pkgs/applications/science/misc/root/default.nix +++ b/pkgs/applications/science/misc/root/default.nix @@ -109,8 +109,8 @@ stdenv.mkDerivation rec { tbb xrootd ] - ++ lib.optionals (!stdenv.isDarwin) [ libX11 libXpm libXft libXext libGLU libGL ] - ++ lib.optionals (stdenv.isDarwin) [ Cocoa CoreSymbolication OpenGL ] + ++ lib.optionals (!stdenv.hostPlatform.isDarwin) [ libX11 libXpm libXft libXext libGLU libGL ] + ++ lib.optionals (stdenv.hostPlatform.isDarwin) [ Cocoa CoreSymbolication OpenGL ] ; patches = [ @@ -149,11 +149,11 @@ stdenv.mkDerivation rec { -e '1iset(nlohmann_json_DIR "${nlohmann_json}/lib/cmake/nlohmann_json/")' patchShebangs build/unix/ - '' + lib.optionalString stdenv.isDarwin '' + '' + lib.optionalString stdenv.hostPlatform.isDarwin '' # Eliminate impure reference to /System/Library/PrivateFrameworks substituteInPlace core/macosx/CMakeLists.txt \ --replace "-F/System/Library/PrivateFrameworks " "" - '' + lib.optionalString (stdenv.isDarwin && lib.versionAtLeast stdenv.hostPlatform.darwinMinVersion "11") '' + '' + lib.optionalString (stdenv.hostPlatform.isDarwin && lib.versionAtLeast stdenv.hostPlatform.darwinMinVersion "11") '' MACOSX_DEPLOYMENT_TARGET=10.16 ''; @@ -172,7 +172,7 @@ stdenv.mkDerivation rec { "-Dvdt=OFF" ] ++ lib.optional (stdenv.cc.libc != null) "-DC_INCLUDE_DIRS=${lib.getDev stdenv.cc.libc}/include" - ++ lib.optionals stdenv.isDarwin [ + ++ lib.optionals stdenv.hostPlatform.isDarwin [ "-DOPENGL_INCLUDE_DIR=${OpenGL}/Library/Frameworks" # fatal error: module map file '/nix/store/-Libsystem-osx-10.12.6/include/module.modulemap' not found diff --git a/pkgs/applications/science/misc/simgrid/default.nix b/pkgs/applications/science/misc/simgrid/default.nix index 37c7fb3a2a05..40202b8dbacc 100644 --- a/pkgs/applications/science/misc/simgrid/default.nix +++ b/pkgs/applications/science/misc/simgrid/default.nix @@ -115,6 +115,6 @@ stdenv.mkDerivation rec { license = licenses.lgpl2Plus; maintainers = with maintainers; [ mickours mpoquet ]; platforms = platforms.all; - broken = stdenv.isDarwin; + broken = stdenv.hostPlatform.isDarwin; }; } diff --git a/pkgs/applications/science/misc/tulip/default.nix b/pkgs/applications/science/misc/tulip/default.nix index 9808a572836d..590b429e73f0 100644 --- a/pkgs/applications/science/misc/tulip/default.nix +++ b/pkgs/applications/science/misc/tulip/default.nix @@ -12,15 +12,15 @@ stdenv.mkDerivation rec { }; nativeBuildInputs = [ cmake wrapQtAppsHook ] - ++ lib.optionals stdenv.isLinux [ autoPatchelfHook ]; + ++ lib.optionals stdenv.hostPlatform.isLinux [ autoPatchelfHook ]; buildInputs = [ libxml2 freetype glew libjpeg qtbase python3 ] - ++ lib.optionals stdenv.isDarwin [ llvmPackages.openmp ] - ++ lib.optionals stdenv.isLinux [ libGLU libGL ]; + ++ lib.optionals stdenv.hostPlatform.isDarwin [ llvmPackages.openmp ] + ++ lib.optionals stdenv.hostPlatform.isLinux [ libGLU libGL ]; qtWrapperArgs = [ ''--prefix PATH : ${lib.makeBinPath [ python3 ]}'' ]; - env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.isDarwin (toString [ + env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.hostPlatform.isDarwin (toString [ # fatal error: 'Python.h' file not found "-I${python3}/include/${python3.libPrefix}" # error: format string is not a string literal (potentially insecure) diff --git a/pkgs/applications/science/molecular-dynamics/gromacs/default.nix b/pkgs/applications/science/molecular-dynamics/gromacs/default.nix index 93cd92863283..1eed4ff7c3d6 100644 --- a/pkgs/applications/science/molecular-dynamics/gromacs/default.nix +++ b/pkgs/applications/science/molecular-dynamics/gromacs/default.nix @@ -83,7 +83,7 @@ in stdenv.mkDerivation rec { cudaPackages.cuda_cudart cudaPackages.libcufft cudaPackages.cuda_profiler_api - ] ++ lib.optional stdenv.isDarwin llvmPackages.openmp; + ] ++ lib.optional stdenv.hostPlatform.isDarwin llvmPackages.openmp; propagatedBuildInputs = lib.optional enableMpi mpi; propagatedUserEnvPkgs = lib.optional enableMpi mpi; diff --git a/pkgs/applications/science/physics/crystfel/default.nix b/pkgs/applications/science/physics/crystfel/default.nix index e7eb69fb4e1c..b6f8a0d6f13c 100644 --- a/pkgs/applications/science/physics/crystfel/default.nix +++ b/pkgs/applications/science/physics/crystfel/default.nix @@ -75,7 +75,7 @@ let let version = "7.4.0"; src = - if stdenv.isDarwin then + if stdenv.hostPlatform.isDarwin then fetchurl { url = "https://www.mrc-lmb.cam.ac.uk/mosflm/mosflm/ver${builtins.replaceStrings [ "." ] [ "" ] version}/pre-built/mosflm-osx-64-noX11.zip"; @@ -86,7 +86,7 @@ let url = "https://www.mrc-lmb.cam.ac.uk/mosflm/mosflm/ver${builtins.replaceStrings [ "." ] [ "" ] version}/pre-built/mosflm-linux-64-noX11.zip"; hash = "sha256:1f2qins5kaz5v6mkaclncqpirx3mlz177ywm13py9p6s9mk99g32"; }; - mosflmBinary = if stdenv.isDarwin then "bin/mosflm" else "mosflm-linux-64-noX11"; + mosflmBinary = if stdenv.hostPlatform.isDarwin then "bin/mosflm" else "mosflm-linux-64-noX11"; in stdenv.mkDerivation { pname = "mosflm"; @@ -209,9 +209,9 @@ stdenv.mkDerivation rec { xgandalf pandoc ] ++ lib.optionals withGui [ gtk3 gdk-pixbuf ] - ++ lib.optionals stdenv.isDarwin [ + ++ lib.optionals stdenv.hostPlatform.isDarwin [ argp-standalone - ] ++ lib.optionals (stdenv.isDarwin && !stdenv.isAarch64) [ + ] ++ lib.optionals (stdenv.hostPlatform.isDarwin && !stdenv.hostPlatform.isAarch64) [ memorymappingHook ] ++ lib.optionals withBitshuffle [ hdf5-external-filter-plugins ]; diff --git a/pkgs/applications/science/physics/fasthenry/default.nix b/pkgs/applications/science/physics/fasthenry/default.nix index 6b9a73f6dd17..963828e18edc 100644 --- a/pkgs/applications/science/physics/fasthenry/default.nix +++ b/pkgs/applications/science/physics/fasthenry/default.nix @@ -29,7 +29,7 @@ stdenv.mkDerivation rec { SHELL="sh" "all" ) - '' + (if stdenv.isx86_64 then '' + '' + (if stdenv.hostPlatform.isx86_64 then '' makeFlagsArray+=( CFLAGS="-fcommon -O -DFOUR -m64" ); diff --git a/pkgs/applications/science/physics/professor/default.nix b/pkgs/applications/science/physics/professor/default.nix index 1c6c21c52fef..60a030f52821 100644 --- a/pkgs/applications/science/physics/professor/default.nix +++ b/pkgs/applications/science/physics/professor/default.nix @@ -24,7 +24,7 @@ stdenv.mkDerivation rec { postPatch = '' substituteInPlace Makefile \ --replace-fail 'pip install ' 'pip install --prefix $(out) ' - '' + lib.optionalString stdenv.isDarwin '' + '' + lib.optionalString stdenv.hostPlatform.isDarwin '' substituteInPlace Makefile \ --replace-fail '-shared -o' '-shared -install_name "$(out)/$@" -o' ''; diff --git a/pkgs/applications/science/physics/sacrifice/default.nix b/pkgs/applications/science/physics/sacrifice/default.nix index dbe236537139..b6b53446473f 100644 --- a/pkgs/applications/science/physics/sacrifice/default.nix +++ b/pkgs/applications/science/physics/sacrifice/default.nix @@ -20,7 +20,7 @@ stdenv.mkDerivation { preConfigure = '' substituteInPlace configure --replace HAVE_LCG=yes HAVE_LCG=no '' - + lib.optionalString stdenv.isDarwin '' + + lib.optionalString stdenv.hostPlatform.isDarwin '' substituteInPlace configure --replace LIB_SUFFIX=\"so\" LIB_SUFFIX=\"dylib\" ''; @@ -29,7 +29,7 @@ stdenv.mkDerivation { "--with-pythia=${pythia}" ]; - postInstall = if stdenv.isDarwin then '' + postInstall = if stdenv.hostPlatform.isDarwin then '' install_name_tool -add_rpath ${pythia}/lib "$out"/bin/run-pythia '' else '' wrapProgram $out/bin/run-pythia \ @@ -46,6 +46,6 @@ stdenv.mkDerivation { platforms = lib.platforms.unix; maintainers = with lib.maintainers; [ veprbl ]; # never built on aarch64-darwin since first introduction in nixpkgs - broken = stdenv.isDarwin && stdenv.isAarch64; + broken = stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isAarch64; }; } diff --git a/pkgs/applications/science/physics/sherpa/default.nix b/pkgs/applications/science/physics/sherpa/default.nix index 21a5ee7ec234..2dfe3f7d7bb2 100644 --- a/pkgs/applications/science/physics/sherpa/default.nix +++ b/pkgs/applications/science/physics/sherpa/default.nix @@ -35,6 +35,6 @@ stdenv.mkDerivation rec { platforms = platforms.unix; maintainers = with maintainers; [ veprbl ]; # never built on aarch64-darwin since first introduction in nixpkgs - broken = stdenv.isDarwin && stdenv.isAarch64; + broken = stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isAarch64; }; } diff --git a/pkgs/applications/science/physics/xfitter/default.nix b/pkgs/applications/science/physics/xfitter/default.nix index 8a92c85a1383..e509f3a005f7 100644 --- a/pkgs/applications/science/physics/xfitter/default.nix +++ b/pkgs/applications/science/physics/xfitter/default.nix @@ -50,7 +50,7 @@ stdenv.mkDerivation rec { hardeningDisable = [ "format" ]; # workaround wrong library IDs - postInstall = lib.optionalString stdenv.isDarwin '' + postInstall = lib.optionalString stdenv.hostPlatform.isDarwin '' ln -sv "$out/lib/xfitter/"* "$out/lib/" ''; diff --git a/pkgs/applications/science/physics/xnec2c/default.nix b/pkgs/applications/science/physics/xnec2c/default.nix index ffdd4b6d0b07..aaff1ff40d31 100644 --- a/pkgs/applications/science/physics/xnec2c/default.nix +++ b/pkgs/applications/science/physics/xnec2c/default.nix @@ -38,6 +38,6 @@ stdenv.mkDerivation rec { platforms = platforms.unix; # Darwin support likely to be fixed upstream in the next release - broken = stdenv.isDarwin; + broken = stdenv.hostPlatform.isDarwin; }; } diff --git a/pkgs/applications/science/robotics/mavproxy/default.nix b/pkgs/applications/science/robotics/mavproxy/default.nix index f86ca5f635e4..e36b3d62b696 100644 --- a/pkgs/applications/science/robotics/mavproxy/default.nix +++ b/pkgs/applications/science/robotics/mavproxy/default.nix @@ -25,7 +25,7 @@ buildPythonApplication rec { pyserial setuptools wxpython - ] ++ lib.optionals stdenv.isDarwin [ billiard gnureadline ]; + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ billiard gnureadline ]; # No tests doCheck = false; diff --git a/pkgs/applications/search/recoll/default.nix b/pkgs/applications/search/recoll/default.nix index 5de1166e116d..21618f8ed3ec 100644 --- a/pkgs/applications/search/recoll/default.nix +++ b/pkgs/applications/search/recoll/default.nix @@ -68,7 +68,7 @@ let filters = { perl = perl.passthru.withPackages (p: [ p.ImageExifTool ]); }; filterPath = lib.makeBinPath (map lib.getBin (builtins.attrValues filters)); - useInotify = if stdenv.isLinux then "true" else "false"; + useInotify = if stdenv.hostPlatform.isLinux then "true" else "false"; in mkDerivation rec { @@ -138,7 +138,7 @@ mkDerivation rec { file ] ++ lib.optionals withGui [ qtbase - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ libiconv ]; @@ -167,15 +167,15 @@ mkDerivation rec { --prefix PYTHONPATH : $out/${python3Packages.python.sitePackages} wrapProgram $out/share/recoll/filters/rclimg \ --prefix PERL5LIB : "${with perlPackages; makeFullPerlPath [ ImageExifTool ]}" - '' + lib.optionalString stdenv.isLinux '' + '' + lib.optionalString stdenv.hostPlatform.isLinux '' substituteInPlace $f --replace '"lyx"' '"${lib.getBin lyx}/bin/lyx"' - '' + lib.optionalString (stdenv.isDarwin && withGui) '' + '' + lib.optionalString (stdenv.hostPlatform.isDarwin && withGui) '' mkdir $out/Applications mv $out/bin/recoll.app $out/Applications ''; # create symlink after fixup to prevent double wrapping of recoll - postFixup = lib.optionalString (stdenv.isDarwin && withGui) '' + postFixup = lib.optionalString (stdenv.hostPlatform.isDarwin && withGui) '' ln -s ../Applications/recoll.app/Contents/MacOS/recoll $out/bin/recoll ''; diff --git a/pkgs/applications/system/glances/default.nix b/pkgs/applications/system/glances/default.nix index 6d8899440d4a..ff8b4c310662 100644 --- a/pkgs/applications/system/glances/default.nix +++ b/pkgs/applications/system/glances/default.nix @@ -40,14 +40,14 @@ buildPythonApplication rec { # CoreFoundation. This issues was solved for binaries but for interpreted # scripts a workaround below is still required. # Relevant: https://github.com/NixOS/nixpkgs/issues/24693 - makeWrapperArgs = lib.optionals stdenv.isDarwin [ + makeWrapperArgs = lib.optionals stdenv.hostPlatform.isDarwin [ "--set" "DYLD_FRAMEWORK_PATH" "/System/Library/Frameworks" ]; doCheck = true; - preCheck = lib.optionalString stdenv.isDarwin '' + preCheck = lib.optionalString stdenv.hostPlatform.isDarwin '' export DYLD_FRAMEWORK_PATH=/System/Library/Frameworks ''; @@ -68,7 +68,7 @@ buildPythonApplication rec { jinja2 orjson prometheus-client - ] ++ lib.optional stdenv.isLinux hddtemp; + ] ++ lib.optional stdenv.hostPlatform.isLinux hddtemp; meta = { homepage = "https://nicolargo.github.io/glances/"; diff --git a/pkgs/applications/terminal-emulators/alacritty/default.nix b/pkgs/applications/terminal-emulators/alacritty/default.nix index 58e527cc50a9..33691aaef491 100644 --- a/pkgs/applications/terminal-emulators/alacritty/default.nix +++ b/pkgs/applications/terminal-emulators/alacritty/default.nix @@ -35,7 +35,7 @@ let expat fontconfig freetype - ] ++ lib.optionals stdenv.isLinux [ + ] ++ lib.optionals stdenv.hostPlatform.isLinux [ libGL xorg.libX11 xorg.libXcursor @@ -71,7 +71,7 @@ rustPlatform.buildRustPackage rec { ]; buildInputs = rpathLibs - ++ lib.optionals stdenv.isDarwin [ + ++ lib.optionals stdenv.hostPlatform.isDarwin [ AppKit CoreGraphics CoreServices @@ -83,7 +83,7 @@ rustPlatform.buildRustPackage rec { outputs = [ "out" "terminfo" ]; - postPatch = lib.optionalString stdenv.isLinux '' + postPatch = lib.optionalString stdenv.hostPlatform.isLinux '' substituteInPlace alacritty/src/config/ui_config.rs \ --replace xdg-open ${xdg-utils}/bin/xdg-open ''; @@ -91,7 +91,7 @@ rustPlatform.buildRustPackage rec { checkFlags = [ "--skip=term::test::mock_term" ]; # broken on aarch64 postInstall = ( - if stdenv.isDarwin then '' + if stdenv.hostPlatform.isDarwin then '' mkdir $out/Applications cp -r extra/osx/Alacritty.app $out/Applications ln -s $out/bin $out/Applications/Alacritty.app/Contents/MacOS diff --git a/pkgs/applications/terminal-emulators/contour/default.nix b/pkgs/applications/terminal-emulators/contour/default.nix index a255b2fb99db..f01c47afdd36 100644 --- a/pkgs/applications/terminal-emulators/contour/default.nix +++ b/pkgs/applications/terminal-emulators/contour/default.nix @@ -49,7 +49,7 @@ stdenv.mkDerivation (final: { file wrapQtAppsHook installShellFiles - ] ++ lib.optionals stdenv.isDarwin [ sigtool ]; + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ sigtool ]; buildInputs = [ boxed-cpp @@ -67,21 +67,21 @@ stdenv.mkDerivation (final: { range-v3 yaml-cpp ] - ++ lib.optionals stdenv.isLinux [ libutempter ] - ++ lib.optionals stdenv.isDarwin [ utmp ]; + ++ lib.optionals stdenv.hostPlatform.isLinux [ libutempter ] + ++ lib.optionals stdenv.hostPlatform.isDarwin [ utmp ]; cmakeFlags = [ "-DCONTOUR_QT_VERSION=6" ]; postInstall = '' mkdir -p $out/nix-support $terminfo/share - '' + lib.optionalString stdenv.isDarwin '' + '' + lib.optionalString stdenv.hostPlatform.isDarwin '' mkdir $out/Applications installShellCompletion --zsh $out/contour.app/Contents/Resources/shell-integration/shell-integration.zsh installShellCompletion --fish $out/contour.app/Contents/Resources/shell-integration/shell-integration.fish cp -r $out/contour.app/Contents/Resources/terminfo $terminfo/share mv $out/contour.app $out/Applications ln -s $out/bin $out/Applications/contour.app/Contents/MacOS - '' + lib.optionalString stdenv.isLinux '' + '' + lib.optionalString stdenv.hostPlatform.isLinux '' mv $out/share/terminfo $terminfo/share/ installShellCompletion --zsh $out/share/contour/shell-integration/shell-integration.zsh installShellCompletion --fish $out/share/contour/shell-integration/shell-integration.fish diff --git a/pkgs/applications/terminal-emulators/cool-retro-term/default.nix b/pkgs/applications/terminal-emulators/cool-retro-term/default.nix index 8a33d222855e..c2a871085831 100644 --- a/pkgs/applications/terminal-emulators/cool-retro-term/default.nix +++ b/pkgs/applications/terminal-emulators/cool-retro-term/default.nix @@ -40,7 +40,7 @@ mkDerivation rec { mv $out/usr/share $out/share mv $out/usr/bin $out/bin rmdir $out/usr - '' + lib.optionalString stdenv.isDarwin '' + '' + lib.optionalString stdenv.hostPlatform.isDarwin '' ln -s $out/bin/cool-retro-term.app/Contents/MacOS/cool-retro-term $out/bin/cool-retro-term ''; diff --git a/pkgs/applications/terminal-emulators/kitty/default.nix b/pkgs/applications/terminal-emulators/kitty/default.nix index 162d3cd583fd..cf5614d399a5 100644 --- a/pkgs/applications/terminal-emulators/kitty/default.nix +++ b/pkgs/applications/terminal-emulators/kitty/default.nix @@ -57,7 +57,7 @@ buildPythonApplication rec { librsync openssl.dev xxHash - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ Cocoa Kernel UniformTypeIdentifiers @@ -65,9 +65,9 @@ buildPythonApplication rec { libpng python3 zlib - ] ++ lib.optionals (stdenv.isDarwin && stdenv.isx86_64) [ + ] ++ lib.optionals (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isx86_64) [ Libsystem - ] ++ lib.optionals stdenv.isLinux [ + ] ++ lib.optionals stdenv.hostPlatform.isLinux [ fontconfig libunistring libcanberra libX11 libXrandr libXinerama libXcursor libxkbcommon libXi libXext wayland-protocols wayland dbus libGL @@ -84,10 +84,10 @@ buildPythonApplication rec { sphinx-inline-tabs go fontconfig - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ imagemagick libicns # For the png2icns tool. - ] ++ lib.optionals stdenv.isLinux [ + ] ++ lib.optionals stdenv.hostPlatform.isLinux [ wayland-scanner ]; @@ -141,8 +141,8 @@ buildPythonApplication rec { mkdir ./fonts/ cp "${(nerdfonts.override {fonts = ["NerdFontsSymbolsOnly"];})}/share/fonts/truetype/NerdFonts/SymbolsNerdFontMono-Regular.ttf" ./fonts/ - ${ lib.optionalString (stdenv.isDarwin && stdenv.isx86_64) "export MACOSX_DEPLOYMENT_TARGET=11" } - ${if stdenv.isDarwin then '' + ${ lib.optionalString (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isx86_64) "export MACOSX_DEPLOYMENT_TARGET=11" } + ${if stdenv.hostPlatform.isDarwin then '' ${python.pythonOnBuildForHost.interpreter} setup.py build ${darwinOptions} make docs ${python.pythonOnBuildForHost.interpreter} setup.py kitty.app ${darwinOptions} @@ -165,13 +165,13 @@ buildPythonApplication rec { bashInteractive zsh fish - ] ++ lib.optionals (!stdenv.isDarwin) [ + ] ++ lib.optionals (!stdenv.hostPlatform.isDarwin) [ # integration tests need sudo sudo ]; # skip failing tests due to darwin sandbox - preCheck = lib.optionalString stdenv.isDarwin '' + preCheck = lib.optionalString stdenv.hostPlatform.isDarwin '' substituteInPlace kitty_tests/file_transmission.py \ --replace test_file_get dont_test_file_get \ --replace test_path_mapping_receive dont_test_path_mapping_receive \ @@ -209,7 +209,7 @@ buildPythonApplication rec { runHook preInstall mkdir -p "$out" mkdir -p "$kitten/bin" - ${if stdenv.isDarwin then '' + ${if stdenv.hostPlatform.isDarwin then '' mkdir "$out/bin" ln -s ../Applications/kitty.app/Contents/MacOS/kitty "$out/bin/kitty" ln -s ../Applications/kitty.app/Contents/MacOS/kitten "$out/bin/kitten" @@ -232,7 +232,7 @@ buildPythonApplication rec { --fish <("$out/bin/kitty" +complete setup fish2) \ --zsh <("$out/bin/kitty" +complete setup zsh) - terminfo_src=${if stdenv.isDarwin then + terminfo_src=${if stdenv.hostPlatform.isDarwin then ''"$out/Applications/kitty.app/Contents/Resources/terminfo"'' else "$out/share/terminfo"} @@ -249,7 +249,7 @@ buildPythonApplication rec { ''; passthru = { - tests = lib.optionalAttrs stdenv.isLinux { + tests = lib.optionalAttrs stdenv.hostPlatform.isLinux { default = nixosTests.terminal-emulators.kitty; }; updateScript = nix-update-script {}; diff --git a/pkgs/applications/terminal-emulators/mlterm/default.nix b/pkgs/applications/terminal-emulators/mlterm/default.nix index 28f027401bd7..dcf581f27a80 100644 --- a/pkgs/applications/terminal-emulators/mlterm/default.nix +++ b/pkgs/applications/terminal-emulators/mlterm/default.nix @@ -27,8 +27,8 @@ # documentd in `./configure --help`, and it is reported here: # https://github.com/arakiken/mlterm/issues/73 fb = false; - quartz = stdenv.isDarwin; - wayland = stdenv.isLinux; + quartz = stdenv.hostPlatform.isDarwin; + wayland = stdenv.hostPlatform.isLinux; sdl2 = true; } , libxkbcommon @@ -59,16 +59,16 @@ mlfc = true; } # Whether to enable the X window system -, enableX11 ? stdenv.isLinux +, enableX11 ? stdenv.hostPlatform.isLinux # Most of the input methods and other build features are enabled by default, # the following attribute set can be used to disable some of them. It's parsed # when we set `configureFlags`. If you find other configure Flags that require # dependencies, it'd be nice to make that contribution here. , enableFeatures ? { - uim = !stdenv.isDarwin; - ibus = !stdenv.isDarwin; - fcitx = !stdenv.isDarwin; - m17n = !stdenv.isDarwin; + uim = !stdenv.hostPlatform.isDarwin; + ibus = !stdenv.hostPlatform.isDarwin; + fcitx = !stdenv.hostPlatform.isDarwin; + m17n = !stdenv.hostPlatform.isDarwin; ssh2 = true; bidi = true; # Open Type layout support, (substituting glyphs with opentype fonts) @@ -185,7 +185,7 @@ in stdenv.mkDerivation (finalAttrs: { install -D contrib/icon/mlterm-icon.svg "$out/share/icons/hicolor/scalable/apps/mlterm.svg" install -D contrib/icon/mlterm-icon-gnome2.png "$out/share/icons/hicolor/48x48/apps/mlterm.png" install -D -t $out/share/applications $desktopItem/share/applications/* - '' + lib.optionalString stdenv.isDarwin '' + '' + lib.optionalString stdenv.hostPlatform.isDarwin '' mkdir -p $out/Applications/ cp -a cocoa/mlterm.app $out/Applications/ install $out/bin/mlterm -Dt $out/Applications/mlterm.app/Contents/MacOS/ diff --git a/pkgs/applications/terminal-emulators/rio/default.nix b/pkgs/applications/terminal-emulators/rio/default.nix index 00c1e9aa1ffb..136bbcd49436 100644 --- a/pkgs/applications/terminal-emulators/rio/default.nix +++ b/pkgs/applications/terminal-emulators/rio/default.nix @@ -17,21 +17,21 @@ , vulkan-loader , libxkbcommon -, withX11 ? !stdenv.isDarwin +, withX11 ? !stdenv.hostPlatform.isDarwin , libX11 , libXcursor , libXi , libXrandr , libxcb -, withWayland ? !stdenv.isDarwin +, withWayland ? !stdenv.hostPlatform.isDarwin , wayland , testers , rio }: let - rlinkLibs = if stdenv.isDarwin then [ + rlinkLibs = if stdenv.hostPlatform.isDarwin then [ darwin.libobjc darwin.apple_sdk_11_0.frameworks.AppKit darwin.apple_sdk_11_0.frameworks.AVFoundation @@ -68,7 +68,7 @@ rustPlatform.buildRustPackage rec { nativeBuildInputs = [ ncurses - ] ++ lib.optionals stdenv.isLinux [ + ] ++ lib.optionals stdenv.hostPlatform.isLinux [ cmake pkg-config autoPatchelfHook @@ -99,7 +99,7 @@ rustPlatform.buildRustPackage rec { tic -xe rio,rio-direct -o "$terminfo/share/terminfo" misc/rio.terminfo mkdir -p $out/nix-support echo "$terminfo" >> $out/nix-support/propagated-user-env-packages - '' + lib.optionalString stdenv.isDarwin '' + '' + lib.optionalString stdenv.hostPlatform.isDarwin '' mkdir $out/Applications/ mv misc/osx/Rio.app/ $out/Applications/ mkdir $out/Applications/Rio.app/Contents/MacOS/ @@ -130,6 +130,6 @@ rustPlatform.buildRustPackage rec { # stderr: # thread 'main' panicked at corcovado/src/sys/unix/eventedfd.rs:24:16: # called `Result::unwrap()` on an `Err` value: Os { code: 1, kind: PermissionDenied, message: "Operation not permitted" } - broken = stdenv.isDarwin; + broken = stdenv.hostPlatform.isDarwin; }; } diff --git a/pkgs/applications/terminal-emulators/rxvt-unicode/default.nix b/pkgs/applications/terminal-emulators/rxvt-unicode/default.nix index f28694db2949..a39099cc4bd4 100644 --- a/pkgs/applications/terminal-emulators/rxvt-unicode/default.nix +++ b/pkgs/applications/terminal-emulators/rxvt-unicode/default.nix @@ -76,7 +76,7 @@ stdenv.mkDerivation { url = "https://github.com/exg/rxvt-unicode/commit/16634bc8dd5fc4af62faf899687dfa8f27768d15.patch"; excludes = [ "Changes" ]; sha256 = "sha256-JVqzYi3tcWIN2j5JByZSztImKqbbbB3lnfAwUXrumHM="; - }) ++ lib.optional stdenv.isDarwin ./patches/makefile-phony.patch; + }) ++ lib.optional stdenv.hostPlatform.isDarwin ./patches/makefile-phony.patch; configureFlags = [ "--with-terminfo=${placeholder "terminfo"}/share/terminfo" diff --git a/pkgs/applications/terminal-emulators/st/default.nix b/pkgs/applications/terminal-emulators/st/default.nix index 72a6835ff4aa..676ef292def1 100644 --- a/pkgs/applications/terminal-emulators/st/default.nix +++ b/pkgs/applications/terminal-emulators/st/default.nix @@ -33,7 +33,7 @@ stdenv.mkDerivation (finalAttrs: { (writeText "config.def.h" conf); postPatch = lib.optionalString (conf != null) "cp ${finalAttrs.configFile} config.def.h" - + lib.optionalString stdenv.isDarwin '' + + lib.optionalString stdenv.hostPlatform.isDarwin '' substituteInPlace config.mk --replace "-lrt" "" ''; diff --git a/pkgs/applications/terminal-emulators/syncterm/default.nix b/pkgs/applications/terminal-emulators/syncterm/default.nix index 36a02e08bbd5..60b172184fc9 100644 --- a/pkgs/applications/terminal-emulators/syncterm/default.nix +++ b/pkgs/applications/terminal-emulators/syncterm/default.nix @@ -27,7 +27,7 @@ stdenv.mkDerivation rec { "-Wno-unused-result" "-Wformat-overflow=0" - ] ++ (lib.optionals stdenv.isLinux [ + ] ++ (lib.optionals stdenv.hostPlatform.isLinux [ "-DUSE_ALSA_SOUND" # Don't use OSS for beeps. ]); makeFlags = [ @@ -38,12 +38,12 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ autoPatchelfHook pkg-config SDL2 perl unzip ]; # SDL2 for `sdl2-config`. buildInputs = [ ncurses SDL2 ] - ++ (lib.optional stdenv.isLinux alsa-lib); + ++ (lib.optional stdenv.hostPlatform.isLinux alsa-lib); runtimeDependencies = [ ncurses SDL2 ]; # Both of these are dlopen()'ed at runtime. meta = with lib; { # error: unsupported option '-fsanitize=safe-stack' for target 'x86_64-apple-darwin' - broken = (stdenv.isLinux && stdenv.isAarch64) || stdenv.isDarwin; + broken = (stdenv.hostPlatform.isLinux && stdenv.hostPlatform.isAarch64) || stdenv.hostPlatform.isDarwin; homepage = "https://syncterm.bbsdev.net/"; description = "BBS terminal emulator"; mainProgram = "syncterm"; diff --git a/pkgs/applications/terminal-emulators/termite/default.nix b/pkgs/applications/terminal-emulators/termite/default.nix index 4acc8263ce86..3dc6d484d2d3 100644 --- a/pkgs/applications/terminal-emulators/termite/default.nix +++ b/pkgs/applications/terminal-emulators/termite/default.nix @@ -47,7 +47,7 @@ in stdenv.mkDerivation rec { url = "https://github.com/thestinger/termite/commit/7e9a93b421b9596f8980645a46ac2ad5468dac06.patch"; sha256 = "0vph2m5919f7w1xnc8i6z0j44clsm1chxkfg7l71nahxyfw5yh4j"; }) - ] ++ lib.optional stdenv.isDarwin ./remove_ldflags_macos.patch; + ] ++ lib.optional stdenv.hostPlatform.isDarwin ./remove_ldflags_macos.patch; makeFlags = [ "VERSION=v${version}" "PREFIX=" "DESTDIR=$(out)" ]; diff --git a/pkgs/applications/terminal-emulators/wezterm/default.nix b/pkgs/applications/terminal-emulators/wezterm/default.nix index 4f710d61c20a..68391fc4dc7f 100644 --- a/pkgs/applications/terminal-emulators/wezterm/default.nix +++ b/pkgs/applications/terminal-emulators/wezterm/default.nix @@ -63,12 +63,12 @@ rustPlatform.buildRustPackage rec { ncurses # tic for terminfo pkg-config python3 - ] ++ lib.optional stdenv.isDarwin perl; + ] ++ lib.optional stdenv.hostPlatform.isDarwin perl; buildInputs = [ fontconfig zlib - ] ++ lib.optionals stdenv.isLinux [ + ] ++ lib.optionals stdenv.hostPlatform.isLinux [ libX11 libxcb libxkbcommon @@ -78,7 +78,7 @@ rustPlatform.buildRustPackage rec { xcbutilimage xcbutilkeysyms xcbutilwm # contains xcb-ewmh among others - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ Cocoa CoreGraphics Foundation @@ -89,7 +89,7 @@ rustPlatform.buildRustPackage rec { buildFeatures = [ "distro-defaults" ]; - env.NIX_LDFLAGS = lib.optionalString stdenv.isDarwin "-framework System"; + env.NIX_LDFLAGS = lib.optionalString stdenv.hostPlatform.isDarwin "-framework System"; postInstall = '' mkdir -p $out/nix-support @@ -108,12 +108,12 @@ rustPlatform.buildRustPackage rec { install -Dm644 assets/wezterm-nautilus.py -t $out/share/nautilus-python/extensions ''; - preFixup = lib.optionalString stdenv.isLinux '' + preFixup = lib.optionalString stdenv.hostPlatform.isLinux '' patchelf \ --add-needed "${libGL}/lib/libEGL.so.1" \ --add-needed "${vulkan-loader}/lib/libvulkan.so.1" \ $out/bin/wezterm-gui - '' + lib.optionalString stdenv.isDarwin '' + '' + lib.optionalString stdenv.hostPlatform.isDarwin '' mkdir -p "$out/Applications" OUT_APP="$out/Applications/WezTerm.app" cp -r assets/macos/WezTerm.app "$OUT_APP" diff --git a/pkgs/applications/terminal-emulators/x3270/default.nix b/pkgs/applications/terminal-emulators/x3270/default.nix index 2e901e5af876..45b08bd10f66 100644 --- a/pkgs/applications/terminal-emulators/x3270/default.nix +++ b/pkgs/applications/terminal-emulators/x3270/default.nix @@ -36,9 +36,9 @@ stdenv.mkDerivation rec { sha256 = "sha256-gcC6REfZentIPEDhGznUSYu8mvVfpPeMz/Bks+N43Fk="; }; - buildFlags = lib.optional stdenv.isLinux "unix"; + buildFlags = lib.optional stdenv.hostPlatform.isLinux "unix"; - configureFlags = lib.optionals stdenv.isDarwin [ + configureFlags = lib.optionals stdenv.hostPlatform.isDarwin [ "--enable-c3270" "--enable-pr3270" "--enable-s3270" @@ -70,7 +70,7 @@ stdenv.mkDerivation rec { expat openssl readline - ] ++ lib.optionals stdenv.isDarwin [ libiconv darwin.apple_sdk.frameworks.Security ]; + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ libiconv darwin.apple_sdk.frameworks.Security ]; meta = with lib; { description = "IBM 3270 terminal emulator for the X Window System"; diff --git a/pkgs/applications/version-management/bcompare/default.nix b/pkgs/applications/version-management/bcompare/default.nix index 33b4cb0f90b5..5a60f9a1d546 100644 --- a/pkgs/applications/version-management/bcompare/default.nix +++ b/pkgs/applications/version-management/bcompare/default.nix @@ -93,6 +93,6 @@ let mainProgram = "bcompare"; }; in -if stdenv.isDarwin +if stdenv.hostPlatform.isDarwin then darwin else linux diff --git a/pkgs/applications/version-management/blackbox/default.nix b/pkgs/applications/version-management/blackbox/default.nix index c98ff367c668..e5be040f6a25 100644 --- a/pkgs/applications/version-management/blackbox/default.nix +++ b/pkgs/applications/version-management/blackbox/default.nix @@ -25,7 +25,7 @@ stdenv.mkDerivation rec { buildInputs = [ gnupg ]; # https://github.com/NixOS/nixpkgs/issues/134445 - doCheck = !stdenv.isDarwin && stdenv.isx86_64; + doCheck = !stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isx86_64; nativeCheckInputs = [ expect diff --git a/pkgs/applications/version-management/cvs/default.nix b/pkgs/applications/version-management/cvs/default.nix index 20a38f9f8e8c..7ec801503f76 100644 --- a/pkgs/applications/version-management/cvs/default.nix +++ b/pkgs/applications/version-management/cvs/default.nix @@ -40,7 +40,7 @@ stdenv.mkDerivation rec { "AR=${stdenv.cc.targetPrefix}ar" ]; - env = lib.optionalAttrs (stdenv.isDarwin && stdenv.cc.isClang) { + env = lib.optionalAttrs (stdenv.hostPlatform.isDarwin && stdenv.cc.isClang) { NIX_CFLAGS_COMPILE = "-Wno-implicit-function-declaration"; }; diff --git a/pkgs/applications/version-management/delta/default.nix b/pkgs/applications/version-management/delta/default.nix index d724d4f2bf46..76ace5026e68 100644 --- a/pkgs/applications/version-management/delta/default.nix +++ b/pkgs/applications/version-management/delta/default.nix @@ -29,7 +29,7 @@ rustPlatform.buildRustPackage rec { buildInputs = [ oniguruma - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk_11_0.frameworks.Foundation ]; @@ -49,7 +49,7 @@ rustPlatform.buildRustPackage rec { # https://github.com/dandavison/delta/issues/1660 dontUseCargoParallelTests = true; - checkFlags = lib.optionals stdenv.isDarwin [ + checkFlags = lib.optionals stdenv.hostPlatform.isDarwin [ # This test tries to read /etc/passwd, which fails with the sandbox # enabled on Darwin "--skip=test_diff_real_files" diff --git a/pkgs/applications/version-management/fnc/default.nix b/pkgs/applications/version-management/fnc/default.nix index b52314180816..ec5ade218f10 100644 --- a/pkgs/applications/version-management/fnc/default.nix +++ b/pkgs/applications/version-management/fnc/default.nix @@ -16,7 +16,7 @@ stdenv.mkDerivation (finalAttrs: { env.NIX_CFLAGS_COMPILE = toString (lib.optionals stdenv.cc.isGNU [ # Needed with GCC 12 "-Wno-error=maybe-uninitialized" - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ # error: 'strtonum' is only available on macOS 11.0 or newer "-Wno-error=unguarded-availability-new" ]); diff --git a/pkgs/applications/version-management/fossil/default.nix b/pkgs/applications/version-management/fossil/default.nix index b1b828d47959..9443c1e9cdea 100644 --- a/pkgs/applications/version-management/fossil/default.nix +++ b/pkgs/applications/version-management/fossil/default.nix @@ -31,7 +31,7 @@ stdenv.mkDerivation (finalAttrs: { nativeBuildInputs = [ installShellFiles tcl tcllib ]; buildInputs = [ zlib openssl readline which ed ] - ++ lib.optional stdenv.isDarwin libiconv + ++ lib.optional stdenv.hostPlatform.isDarwin libiconv ++ lib.optional (!withInternalSqlite) sqlite; enableParallelBuilding = true; diff --git a/pkgs/applications/version-management/gfold/default.nix b/pkgs/applications/version-management/gfold/default.nix index fb8cccdda1bd..299ea9fb6ba4 100644 --- a/pkgs/applications/version-management/gfold/default.nix +++ b/pkgs/applications/version-management/gfold/default.nix @@ -25,7 +25,7 @@ rustPlatform.buildRustPackage { cargoHash = "sha256-idzw5dfCCvujvYr7DG0oOzQUIcbACtiIZLoA4MEClzY="; - buildInputs = lib.optionals stdenv.isDarwin [ + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ libiconv Security ]; diff --git a/pkgs/applications/version-management/git-absorb/default.nix b/pkgs/applications/version-management/git-absorb/default.nix index 49d4a0a67ad2..8679f2842f9d 100644 --- a/pkgs/applications/version-management/git-absorb/default.nix +++ b/pkgs/applications/version-management/git-absorb/default.nix @@ -13,7 +13,7 @@ rustPlatform.buildRustPackage rec { nativeBuildInputs = [ installShellFiles ]; - buildInputs = lib.optionals stdenv.isDarwin [ Security ]; + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ Security ]; cargoHash = "sha256-Y/0In33y4mVTaE9yoBZ/3tRWcsSKgGjTCSHdjScNEj0="; diff --git a/pkgs/applications/version-management/git-branchless/default.nix b/pkgs/applications/version-management/git-branchless/default.nix index d3d4efd2478b..0e83d17d33a7 100644 --- a/pkgs/applications/version-management/git-branchless/default.nix +++ b/pkgs/applications/version-management/git-branchless/default.nix @@ -34,7 +34,7 @@ rustPlatform.buildRustPackage rec { openssl sqlite ] - ++ lib.optionals stdenv.isDarwin [ + ++ lib.optionals stdenv.hostPlatform.isDarwin [ Security SystemConfiguration libiconv diff --git a/pkgs/applications/version-management/git-cinnabar/default.nix b/pkgs/applications/version-management/git-cinnabar/default.nix index 2d97b41cdd04..84a34601d40f 100644 --- a/pkgs/applications/version-management/git-cinnabar/default.nix +++ b/pkgs/applications/version-management/git-cinnabar/default.nix @@ -35,7 +35,7 @@ stdenv.mkDerivation (finalAttrs: { curl zlib zstd - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ libiconv CoreServices ]; diff --git a/pkgs/applications/version-management/git-cliff/default.nix b/pkgs/applications/version-management/git-cliff/default.nix index 92660f32267e..25bcf4f1ca7c 100644 --- a/pkgs/applications/version-management/git-cliff/default.nix +++ b/pkgs/applications/version-management/git-cliff/default.nix @@ -22,7 +22,7 @@ rustPlatform.buildRustPackage rec { # attempts to run the program on .git in src which is not deterministic doCheck = false; - buildInputs = lib.optionals stdenv.isDarwin [ + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ Security SystemConfiguration ]; diff --git a/pkgs/applications/version-management/git-cola/default.nix b/pkgs/applications/version-management/git-cola/default.nix index c1c909e8827f..fac196e9ad0c 100644 --- a/pkgs/applications/version-management/git-cola/default.nix +++ b/pkgs/applications/version-management/git-cola/default.nix @@ -20,7 +20,7 @@ python3Packages.buildPythonApplication rec { hash = "sha256-8OErZ6uKTWE245BoBu9lQyTLA43DfWaYDv3wbPWaufg="; }; - buildInputs = lib.optionals stdenv.isLinux [ + buildInputs = lib.optionals stdenv.hostPlatform.isLinux [ qt5.qtwayland ]; @@ -47,7 +47,7 @@ python3Packages.buildPythonApplication rec { disabledTestPaths = [ "qtpy/" "contrib/win32" - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ "cola/inotify.py" ]; diff --git a/pkgs/applications/version-management/git-credential-keepassxc/default.nix b/pkgs/applications/version-management/git-credential-keepassxc/default.nix index 5f4f7c6daf71..3a85cff455b8 100644 --- a/pkgs/applications/version-management/git-credential-keepassxc/default.nix +++ b/pkgs/applications/version-management/git-credential-keepassxc/default.nix @@ -23,7 +23,7 @@ rustPlatform.buildRustPackage rec { cargoHash = "sha256-jBUp0jes4wtr8cmqceEBb6noqGkJUHbIfYgWOw5KMF4="; - buildInputs = lib.optionals stdenv.isDarwin [ DiskArbitration Foundation ]; + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ DiskArbitration Foundation ]; buildFeatures = [] ++ lib.optional withNotification "notification" diff --git a/pkgs/applications/version-management/git-dive/default.nix b/pkgs/applications/version-management/git-dive/default.nix index c0209c38cfa9..b80397e142bf 100644 --- a/pkgs/applications/version-management/git-dive/default.nix +++ b/pkgs/applications/version-management/git-dive/default.nix @@ -31,7 +31,7 @@ rustPlatform.buildRustPackage rec { libgit2 oniguruma zlib - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.Security ]; diff --git a/pkgs/applications/version-management/git-gone/default.nix b/pkgs/applications/version-management/git-gone/default.nix index 51822966e6e6..1cc039a09fc6 100644 --- a/pkgs/applications/version-management/git-gone/default.nix +++ b/pkgs/applications/version-management/git-gone/default.nix @@ -21,7 +21,7 @@ rustPlatform.buildRustPackage rec { nativeBuildInputs = [ installShellFiles ]; - buildInputs = lib.optionals stdenv.isDarwin [ Security ]; + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ Security ]; postInstall = '' installManPage git-gone.1 diff --git a/pkgs/applications/version-management/git-graph/default.nix b/pkgs/applications/version-management/git-graph/default.nix index 016892892247..e801cb0e23bf 100644 --- a/pkgs/applications/version-management/git-graph/default.nix +++ b/pkgs/applications/version-management/git-graph/default.nix @@ -21,7 +21,7 @@ rustPlatform.buildRustPackage rec { description = "Command line tool to show clear git graphs arranged for your branching model"; homepage = "https://github.com/mlange-42/git-graph"; license = licenses.mit; - broken = stdenv.isDarwin; + broken = stdenv.hostPlatform.isDarwin; maintainers = with maintainers; [ cafkafk ]; mainProgram = "git-graph"; }; diff --git a/pkgs/applications/version-management/git-ignore/default.nix b/pkgs/applications/version-management/git-ignore/default.nix index 1210e31894e1..12f4f02fd0a2 100644 --- a/pkgs/applications/version-management/git-ignore/default.nix +++ b/pkgs/applications/version-management/git-ignore/default.nix @@ -23,7 +23,7 @@ rustPlatform.buildRustPackage rec { installShellFiles ]; - buildInputs = lib.optionals stdenv.isDarwin [ + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.Security ]; diff --git a/pkgs/applications/version-management/git-interactive-rebase-tool/default.nix b/pkgs/applications/version-management/git-interactive-rebase-tool/default.nix index 6019e2eb7a4b..835b6ddf8514 100644 --- a/pkgs/applications/version-management/git-interactive-rebase-tool/default.nix +++ b/pkgs/applications/version-management/git-interactive-rebase-tool/default.nix @@ -13,7 +13,7 @@ rustPlatform.buildRustPackage rec { cargoHash = "sha256-9pUUKxPpyoX9f10ZiLWsol2rv66WzQqwa6VubRTrT9Y="; - buildInputs = lib.optionals stdenv.isDarwin [ libiconv Security ]; + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ libiconv Security ]; # Compilation during tests fails if this env var is not set. preCheck = "export GIRT_BUILD_GIT_HASH=${version}"; diff --git a/pkgs/applications/version-management/git-mit/default.nix b/pkgs/applications/version-management/git-mit/default.nix index 067ef1eb087d..2dc3ab74a05d 100644 --- a/pkgs/applications/version-management/git-mit/default.nix +++ b/pkgs/applications/version-management/git-mit/default.nix @@ -31,7 +31,7 @@ rustPlatform.buildRustPackage { libgit2 openssl zlib - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.AppKit ]; diff --git a/pkgs/applications/version-management/git-nomad/default.nix b/pkgs/applications/version-management/git-nomad/default.nix index 941b84b68fcc..566a032f9b20 100644 --- a/pkgs/applications/version-management/git-nomad/default.nix +++ b/pkgs/applications/version-management/git-nomad/default.nix @@ -13,7 +13,7 @@ rustPlatform.buildRustPackage rec { cargoHash = "sha256-7CZC29y9dLpyanolO+epKd0KwmRc1iGY+sPM9f/j5hk="; - buildInputs = lib.optionals stdenv.isDarwin [ + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.SystemConfiguration ]; diff --git a/pkgs/applications/version-management/git-quickfix/default.nix b/pkgs/applications/version-management/git-quickfix/default.nix index 9bc7e678d3ed..a9382ee0cb39 100644 --- a/pkgs/applications/version-management/git-quickfix/default.nix +++ b/pkgs/applications/version-management/git-quickfix/default.nix @@ -22,7 +22,7 @@ rustPlatform.buildRustPackage rec { doCheck = false; nativeBuildInputs = [ pkg-config ]; - buildInputs = [ openssl ] ++ lib.optionals stdenv.isDarwin [ + buildInputs = [ openssl ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ Security SystemConfiguration libiconv diff --git a/pkgs/applications/version-management/git-radar/default.nix b/pkgs/applications/version-management/git-radar/default.nix index 1c19381c1bb1..59ec4b61d85c 100644 --- a/pkgs/applications/version-management/git-radar/default.nix +++ b/pkgs/applications/version-management/git-radar/default.nix @@ -19,7 +19,7 @@ stdenv.mkDerivation rec { mkdir -p $out/bin cp git-radar fetch.sh prompt.bash prompt.zsh radar-base.sh $out ln -s $out/git-radar $out/bin - ${lib.optionalString stdenv.isDarwin '' + ${lib.optionalString stdenv.hostPlatform.isDarwin '' wrapProgram $out/git-radar --prefix PATH : ${lib.makeBinPath [ coreutils-prefixed ]} ''} ''; diff --git a/pkgs/applications/version-management/git-series/default.nix b/pkgs/applications/version-management/git-series/default.nix index 9f20e7cab7b8..86277614bc4c 100644 --- a/pkgs/applications/version-management/git-series/default.nix +++ b/pkgs/applications/version-management/git-series/default.nix @@ -28,14 +28,14 @@ rustPlatform.buildRustPackage { nativeBuildInputs = [ pkg-config installShellFiles - ] ++ lib.optionals stdenv.isDarwin [ curl ]; + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ curl ]; buildInputs = [ libgit2 libssh2 openssl zlib - ] ++ lib.optionals stdenv.isDarwin [ curl ]; + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ curl ]; env = { LIBGIT2_SYS_USE_PKG_CONFIG = true; diff --git a/pkgs/applications/version-management/git-stack/default.nix b/pkgs/applications/version-management/git-stack/default.nix index d9792654a94b..67893b122d06 100644 --- a/pkgs/applications/version-management/git-stack/default.nix +++ b/pkgs/applications/version-management/git-stack/default.nix @@ -20,7 +20,7 @@ rustPlatform.buildRustPackage rec { cargoHash = "sha256-MEhUmy4ijR/zHm/qMt4PqNGYnCfIgjNaL9SlMmXCMmc="; - buildInputs = lib.optionals stdenv.isDarwin [ + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ Security ]; diff --git a/pkgs/applications/version-management/git-sync/default.nix b/pkgs/applications/version-management/git-sync/default.nix index 07fa41a72637..01ac29cf8c56 100644 --- a/pkgs/applications/version-management/git-sync/default.nix +++ b/pkgs/applications/version-management/git-sync/default.nix @@ -26,7 +26,7 @@ stdenv.mkDerivation rec { git gnugrep gnused - ] ++ lib.optionals stdenv.isLinux [ inotify-tools ]); + ] ++ lib.optionals stdenv.hostPlatform.isLinux [ inotify-tools ]); postFixup = '' wrap_path="${wrapperPath}":$out/bin diff --git a/pkgs/applications/version-management/git-trim/default.nix b/pkgs/applications/version-management/git-trim/default.nix index a387ec706718..60db7f8ee71e 100644 --- a/pkgs/applications/version-management/git-trim/default.nix +++ b/pkgs/applications/version-management/git-trim/default.nix @@ -37,7 +37,7 @@ rustPlatform.buildRustPackage rec { nativeBuildInputs = [ pkg-config ]; buildInputs = [ openssl libgit2 ] - ++ lib.optionals stdenv.isDarwin [ IOKit CoreFoundation Security ]; + ++ lib.optionals stdenv.hostPlatform.isDarwin [ IOKit CoreFoundation Security ]; postInstall = '' install -Dm644 -t $out/share/man/man1/ docs/git-trim.1 diff --git a/pkgs/applications/version-management/git-workspace/default.nix b/pkgs/applications/version-management/git-workspace/default.nix index 9418c7d20e58..8ed00127fdbb 100644 --- a/pkgs/applications/version-management/git-workspace/default.nix +++ b/pkgs/applications/version-management/git-workspace/default.nix @@ -27,7 +27,7 @@ rustPlatform.buildRustPackage rec { nativeBuildInputs = [ pkg-config ]; buildInputs = [ openssl ] - ++ lib.optionals stdenv.isDarwin [ libiconv Security ]; + ++ lib.optionals stdenv.hostPlatform.isDarwin [ libiconv Security ]; passthru = { updateScript = nix-update-script { }; diff --git a/pkgs/applications/version-management/git/default.nix b/pkgs/applications/version-management/git/default.nix index dd1b96c29a8c..3d7f96bb5fe0 100644 --- a/pkgs/applications/version-management/git/default.nix +++ b/pkgs/applications/version-management/git/default.nix @@ -7,7 +7,7 @@ , svnSupport ? false, subversionClient, perlLibs, smtpPerlLibs , perlSupport ? stdenv.buildPlatform == stdenv.hostPlatform , nlsSupport ? true -, osxkeychainSupport ? stdenv.isDarwin +, osxkeychainSupport ? stdenv.hostPlatform.isDarwin , guiSupport ? false , withManual ? true , pythonSupport ? true @@ -20,11 +20,11 @@ , gzip # needed at runtime by gitweb.cgi , withSsh ? false , sysctl -, doInstallCheck ? !stdenv.isDarwin # extremely slow on darwin +, doInstallCheck ? !stdenv.hostPlatform.isDarwin # extremely slow on darwin , tests }: -assert osxkeychainSupport -> stdenv.isDarwin; +assert osxkeychainSupport -> stdenv.hostPlatform.isDarwin; assert sendEmailSupport -> perlSupport; assert svnSupport -> perlSupport; @@ -59,7 +59,7 @@ stdenv.mkDerivation (finalAttrs: { ./installCheck-path.patch ] ++ lib.optionals withSsh [ ./ssh-path.patch - ] ++ lib.optionals (guiSupport && stdenv.isDarwin) [ + ] ++ lib.optionals (guiSupport && stdenv.hostPlatform.isDarwin) [ # Needed to workaround an issue in macOS where gitk shows a empty window # https://github.com/Homebrew/homebrew-core/issues/68798 # https://github.com/git/git/pull/944 @@ -87,16 +87,16 @@ stdenv.mkDerivation (finalAttrs: { nativeBuildInputs = [ gettext perlPackages.perl makeWrapper pkg-config ] ++ lib.optionals withManual [ asciidoc texinfo xmlto docbook2x docbook_xsl docbook_xml_dtd_45 libxslt ]; - buildInputs = [ curl openssl zlib expat cpio (if stdenv.isFreeBSD then libiconvReal else libiconv) bash ] + buildInputs = [ curl openssl zlib expat cpio (if stdenv.hostPlatform.isFreeBSD then libiconvReal else libiconv) bash ] ++ lib.optionals perlSupport [ perlPackages.perl ] ++ lib.optionals guiSupport [tcl tk] ++ lib.optionals withpcre2 [ pcre2 ] - ++ lib.optionals stdenv.isDarwin [ Security CoreServices ] + ++ lib.optionals stdenv.hostPlatform.isDarwin [ Security CoreServices ] ++ lib.optionals withLibsecret [ glib libsecret ]; # required to support pthread_cancel() NIX_LDFLAGS = lib.optionalString (stdenv.cc.isGNU && stdenv.hostPlatform.libc == "glibc") "-lgcc_s" - + lib.optionalString (stdenv.isFreeBSD) "-lthr"; + + lib.optionalString (stdenv.hostPlatform.isFreeBSD) "-lthr"; configureFlags = [ "ac_cv_prog_CURL_CONFIG=${lib.getDev curl}/bin/curl-config" @@ -118,8 +118,8 @@ stdenv.mkDerivation (finalAttrs: { ++ lib.optional (stdenv.buildPlatform == stdenv.hostPlatform) "SHELL_PATH=${stdenv.shell}" ++ (if perlSupport then ["PERL_PATH=${perlPackages.perl}/bin/perl"] else ["NO_PERL=1"]) ++ (if pythonSupport then ["PYTHON_PATH=${python3}/bin/python"] else ["NO_PYTHON=1"]) - ++ lib.optionals stdenv.isSunOS ["INSTALL=install" "NO_INET_NTOP=" "NO_INET_PTON="] - ++ (if stdenv.isDarwin then ["NO_APPLE_COMMON_CRYPTO=1"] else ["sysconfdir=/etc"]) + ++ lib.optionals stdenv.hostPlatform.isSunOS ["INSTALL=install" "NO_INET_NTOP=" "NO_INET_PTON="] + ++ (if stdenv.hostPlatform.isDarwin then ["NO_APPLE_COMMON_CRYPTO=1"] else ["sysconfdir=/etc"]) ++ lib.optionals stdenv.hostPlatform.isMusl ["NO_SYS_POLL_H=1" "NO_GETTEXT=YesPlease"] ++ lib.optional withpcre2 "USE_LIBPCRE2=1" ++ lib.optional (!nlsSupport) "NO_GETTEXT=1" @@ -130,7 +130,7 @@ stdenv.mkDerivation (finalAttrs: { # acceptable version. # # See https://github.com/Homebrew/homebrew-core/commit/dfa3ccf1e7d3901e371b5140b935839ba9d8b706 - ++ lib.optional stdenv.isDarwin "TKFRAMEWORK=/nonexistent" + ++ lib.optional stdenv.hostPlatform.isDarwin "TKFRAMEWORK=/nonexistent" ++ lib.optional (stdenv.hostPlatform.isFreeBSD && stdenv.hostPlatform != stdenv.buildPlatform) "uname_S=FreeBSD"; disallowedReferences = lib.optionals (stdenv.buildPlatform != stdenv.hostPlatform) [ @@ -302,7 +302,7 @@ stdenv.mkDerivation (finalAttrs: { "PERL_PATH=${buildPackages.perl}/bin/perl" ]; - nativeInstallCheckInputs = lib.optional (stdenv.isDarwin || stdenv.isFreeBSD) sysctl; + nativeInstallCheckInputs = lib.optional (stdenv.hostPlatform.isDarwin || stdenv.hostPlatform.isFreeBSD) sysctl; preInstallCheck = '' installCheckFlagsArray+=( @@ -346,7 +346,7 @@ stdenv.mkDerivation (finalAttrs: { # Fails reproducibly on ZFS on Linux with formD normalization disable_test t0021-conversion disable_test t3910-mac-os-precompose - '' + lib.optionalString stdenv.isDarwin '' + '' + lib.optionalString stdenv.hostPlatform.isDarwin '' # XXX: Some tests added in 2.24.0 fail. # Please try to re-enable on the next release. disable_test t7816-grep-binary-pattern @@ -355,7 +355,7 @@ stdenv.mkDerivation (finalAttrs: { disable_test t6300-for-each-ref # not ok 1 - populate workdir (with 2.33.1 on x86_64-darwin) disable_test t5003-archive-zip - '' + lib.optionalString (stdenv.isDarwin && stdenv.isAarch64) '' + '' + lib.optionalString (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isAarch64) '' disable_test t7527-builtin-fsmonitor '' + lib.optionalString stdenv.hostPlatform.isMusl '' # Test fails (as of 2.17.0, musl 1.1.19) diff --git a/pkgs/applications/version-management/gitkraken/default.nix b/pkgs/applications/version-management/gitkraken/default.nix index 68d8fabf5a49..3e2206aa633b 100644 --- a/pkgs/applications/version-management/gitkraken/default.nix +++ b/pkgs/applications/version-management/gitkraken/default.nix @@ -249,4 +249,4 @@ let dontFixup = true; }; in -if stdenv.isDarwin then darwin else linux +if stdenv.hostPlatform.isDarwin then darwin else linux diff --git a/pkgs/applications/version-management/gitnr/default.nix b/pkgs/applications/version-management/gitnr/default.nix index a6d5a5bd61e3..3e4e1c07f852 100644 --- a/pkgs/applications/version-management/gitnr/default.nix +++ b/pkgs/applications/version-management/gitnr/default.nix @@ -28,9 +28,9 @@ rustPlatform.buildRustPackage rec { buildInputs = [ openssl - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.AppKit - ] ++ lib.optionals stdenv.isLinux [ + ] ++ lib.optionals stdenv.hostPlatform.isLinux [ libxkbcommon wayland ]; diff --git a/pkgs/applications/version-management/gitoxide/default.nix b/pkgs/applications/version-management/gitoxide/default.nix index 9909d9829cbd..f89e80c2daa6 100644 --- a/pkgs/applications/version-management/gitoxide/default.nix +++ b/pkgs/applications/version-management/gitoxide/default.nix @@ -32,7 +32,7 @@ in rustPlatform.buildRustPackage rec { nativeBuildInputs = [ cmake pkg-config installShellFiles ]; - buildInputs = [ curl ] ++ (if stdenv.isDarwin + buildInputs = [ curl ] ++ (if stdenv.hostPlatform.isDarwin then [ libiconv Security SystemConfiguration ] else [ openssl ]); diff --git a/pkgs/applications/version-management/gittyup/default.nix b/pkgs/applications/version-management/gittyup/default.nix index 2a7cb13d2aa4..146f2c7e9525 100644 --- a/pkgs/applications/version-management/gittyup/default.nix +++ b/pkgs/applications/version-management/gittyup/default.nix @@ -57,7 +57,7 @@ stdenv.mkDerivation rec { openssl qtbase qttools - ] ++ lib.optionals stdenv.isDarwin (with darwin.apple_sdk.frameworks; [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin (with darwin.apple_sdk.frameworks; [ CoreFoundation Security ]); @@ -73,6 +73,6 @@ stdenv.mkDerivation rec { license = with licenses; [ mit ]; maintainers = [ ]; platforms = platforms.unix; - broken = stdenv.isDarwin; + broken = stdenv.hostPlatform.isDarwin; }; } diff --git a/pkgs/applications/version-management/guilt/default.nix b/pkgs/applications/version-management/guilt/default.nix index aeb0eaf43f11..bca572b28bca 100644 --- a/pkgs/applications/version-management/guilt/default.nix +++ b/pkgs/applications/version-management/guilt/default.nix @@ -42,7 +42,7 @@ stdenv.mkDerivation rec { gawk git gnused - ] ++ lib.optionals stdenv.isDarwin [ openssl ]; + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ openssl ]; makeFlags = [ "PREFIX=$(out)" ]; diff --git a/pkgs/applications/version-management/lucky-commit/default.nix b/pkgs/applications/version-management/lucky-commit/default.nix index dcaca33f0952..6e3cb2c09d5f 100644 --- a/pkgs/applications/version-management/lucky-commit/default.nix +++ b/pkgs/applications/version-management/lucky-commit/default.nix @@ -20,7 +20,7 @@ rustPlatform.buildRustPackage rec { cargoHash = "sha256-8JkodGtMdYP/IIBqRcJFD5syiZi+VakDyX7VcvR0HLo="; - buildInputs = lib.optional withOpenCL (if stdenv.isDarwin then OpenCL else ocl-icd); + buildInputs = lib.optional withOpenCL (if stdenv.hostPlatform.isDarwin then OpenCL else ocl-icd); buildNoDefaultFeatures = !withOpenCL; diff --git a/pkgs/applications/version-management/mercurial/default.nix b/pkgs/applications/version-management/mercurial/default.nix index 466cc643c39f..5a790ff3f4d3 100644 --- a/pkgs/applications/version-management/mercurial/default.nix +++ b/pkgs/applications/version-management/mercurial/default.nix @@ -50,7 +50,7 @@ let rustc ]; buildInputs = [ docutils ] - ++ lib.optionals stdenv.isDarwin [ ApplicationServices ]; + ++ lib.optionals stdenv.hostPlatform.isDarwin [ ApplicationServices ]; makeFlags = [ "PREFIX=$(out)" ] ++ lib.optional rustSupport "PURE=--rust"; diff --git a/pkgs/applications/version-management/p4/default.nix b/pkgs/applications/version-management/p4/default.nix index 06e4624c8ee0..ec01f86a3af0 100644 --- a/pkgs/applications/version-management/p4/default.nix +++ b/pkgs/applications/version-management/p4/default.nix @@ -43,11 +43,11 @@ stdenv.mkDerivation (finalAttrs: rec { nativeBuildInputs = [ jam ]; - buildInputs = lib.optionals stdenv.isDarwin [ CoreServices Foundation Security ]; + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ CoreServices Foundation Security ]; outputs = [ "out" "bin" "dev" ]; - hardeningDisable = lib.optionals stdenv.isDarwin [ "strictoverflow" ]; + hardeningDisable = lib.optionals stdenv.hostPlatform.isDarwin [ "strictoverflow" ]; jamFlags = [ @@ -59,8 +59,8 @@ stdenv.mkDerivation (finalAttrs: rec { ] ++ lib.optionals stdenv.cc.isClang [ "-sOSCOMP=clang" "-sCLANGVER=${stdenv.cc.cc.version}" ] ++ lib.optionals stdenv.cc.isGNU [ "-sOSCOMP=gcc" "-sGCCVER=${stdenv.cc.cc.version}" ] - ++ lib.optionals stdenv.isLinux [ "-sOSVER=26" ] - ++ lib.optionals stdenv.isDarwin [ + ++ lib.optionals stdenv.hostPlatform.isLinux [ "-sOSVER=26" ] + ++ lib.optionals stdenv.hostPlatform.isDarwin [ "-sOSVER=1013" "-sMACOSX_SDK=${emptyDirectory}" "-sLIBC++DIR=${lib.getLib stdenv.cc.libcxx}/lib" @@ -69,11 +69,11 @@ stdenv.mkDerivation (finalAttrs: rec { CCFLAGS = # The file contrib/optimizations/slide_hash_neon.h is missing from the # upstream distribution. It comes from the Android/Chromium sources. - lib.optionals stdenv.isAarch64 [ "-I${androidZlibContrib}" ]; + lib.optionals stdenv.hostPlatform.isAarch64 [ "-I${androidZlibContrib}" ]; "C++FLAGS" = # Avoid a compilation error that only occurs for 4-byte longs. - lib.optionals stdenv.isi686 [ "-Wno-narrowing" ] + lib.optionals stdenv.hostPlatform.isi686 [ "-Wno-narrowing" ] # See the "Header dependency changes" section of # https://www.gnu.org/software/gcc/gcc-11/porting_to.html for more # information on why we need to include these. diff --git a/pkgs/applications/version-management/p4d/default.nix b/pkgs/applications/version-management/p4d/default.nix index d7dcd1405575..b441fe846302 100644 --- a/pkgs/applications/version-management/p4d/default.nix +++ b/pkgs/applications/version-management/p4d/default.nix @@ -27,7 +27,7 @@ stdenv.mkDerivation { sourceRoot = "."; - nativeBuildInputs = lib.optionals stdenv.isLinux [ autoPatchelfHook ]; + nativeBuildInputs = lib.optionals stdenv.hostPlatform.isLinux [ autoPatchelfHook ]; dontBuild = true; diff --git a/pkgs/applications/version-management/p4v/default.nix b/pkgs/applications/version-management/p4v/default.nix index 2824ed82cfa2..82aa6b57a8c5 100644 --- a/pkgs/applications/version-management/p4v/default.nix +++ b/pkgs/applications/version-management/p4v/default.nix @@ -21,7 +21,7 @@ let }; mkDerivation = - if stdenv.isDarwin then callPackage ./darwin.nix { } + if stdenv.hostPlatform.isDarwin then callPackage ./darwin.nix { } else qt6Packages.callPackage ./linux.nix { }; in mkDerivation { pname = "p4v"; diff --git a/pkgs/applications/version-management/pijul/default.nix b/pkgs/applications/version-management/pijul/default.nix index 7503814c389d..95d974bfa145 100644 --- a/pkgs/applications/version-management/pijul/default.nix +++ b/pkgs/applications/version-management/pijul/default.nix @@ -26,7 +26,7 @@ rustPlatform.buildRustPackage rec { nativeBuildInputs = [ installShellFiles pkg-config ]; buildInputs = [ openssl libsodium xxHash ] ++ (lib.optionals gitImportSupport [ libgit2 ]) - ++ (lib.optionals stdenv.isDarwin (with darwin.apple_sdk.frameworks; [ + ++ (lib.optionals stdenv.hostPlatform.isDarwin (with darwin.apple_sdk.frameworks; [ CoreServices Security SystemConfiguration ])); diff --git a/pkgs/applications/version-management/rapidsvn/default.nix b/pkgs/applications/version-management/rapidsvn/default.nix index 8887d5126fde..4ed034c500f9 100644 --- a/pkgs/applications/version-management/rapidsvn/default.nix +++ b/pkgs/applications/version-management/rapidsvn/default.nix @@ -36,7 +36,7 @@ stdenv.mkDerivation rec { apr aprutil python3 - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.Cocoa ]; diff --git a/pkgs/applications/version-management/sapling/default.nix b/pkgs/applications/version-management/sapling/default.nix index 13ff1b70f297..e19fbeb4977f 100644 --- a/pkgs/applications/version-management/sapling/default.nix +++ b/pkgs/applications/version-management/sapling/default.nix @@ -40,7 +40,7 @@ let # # See https://github.com/NixOS/nixpkgs/pull/198311#issuecomment-1326894295 myCargoSetupHook = rustPlatform.cargoSetupHook.overrideAttrs (old: { - cargoConfig = lib.optionalString (!stdenv.isDarwin) old.cargoConfig; + cargoConfig = lib.optionalString (!stdenv.hostPlatform.isDarwin) old.cargoConfig; }); src = fetchFromGitHub { @@ -141,7 +141,7 @@ python311Packages.buildPythonApplication { install ${isl}/isl-dist.tar.xz $out/lib/isl-dist.tar.xz ''; - postFixup = lib.optionalString stdenv.isLinux '' + postFixup = lib.optionalString stdenv.hostPlatform.isLinux '' wrapProgram $out/bin/sl \ --set LOCALE_ARCHIVE "${glibcLocales}/lib/locale/locale-archive" ''; @@ -156,7 +156,7 @@ python311Packages.buildPythonApplication { buildInputs = [ openssl - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ curl libiconv Cocoa diff --git a/pkgs/applications/version-management/silver-platter/default.nix b/pkgs/applications/version-management/silver-platter/default.nix index f1653cf10389..368cf8dcf218 100644 --- a/pkgs/applications/version-management/silver-platter/default.nix +++ b/pkgs/applications/version-management/silver-platter/default.nix @@ -37,9 +37,9 @@ buildPythonApplication rec { propagatedBuildInputs = [ setuptools breezy dulwich jinja2 pyyaml ruamel-yaml ]; nativeBuildInputs = [ setuptools-rust rustPlatform.cargoSetupHook cargo rustc ] - ++ lib.optionals stdenv.isLinux [ pkg-config ]; - buildInputs = lib.optionals stdenv.isLinux [ openssl ] - ++ lib.optionals stdenv.isDarwin [ libiconv ]; + ++ lib.optionals stdenv.hostPlatform.isLinux [ pkg-config ]; + buildInputs = lib.optionals stdenv.hostPlatform.isLinux [ openssl ] + ++ lib.optionals stdenv.hostPlatform.isDarwin [ libiconv ]; pythonImportsCheck = [ "silver_platter" ]; diff --git a/pkgs/applications/version-management/stgit/default.nix b/pkgs/applications/version-management/stgit/default.nix index 55c889ce105e..4d44724eddec 100644 --- a/pkgs/applications/version-management/stgit/default.nix +++ b/pkgs/applications/version-management/stgit/default.nix @@ -36,7 +36,7 @@ rustPlatform.buildRustPackage rec { nativeCheckInputs = [ git perl - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ darwin.system_cmds libiconv ]; diff --git a/pkgs/applications/version-management/sublime-merge/common.nix b/pkgs/applications/version-management/sublime-merge/common.nix index a978ff16357d..84f41e6e26c6 100644 --- a/pkgs/applications/version-management/sublime-merge/common.nix +++ b/pkgs/applications/version-management/sublime-merge/common.nix @@ -85,7 +85,7 @@ let for binary in ${builtins.concatStringsSep " " binaries}; do patchelf \ --interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \ - --set-rpath ${lib.makeLibraryPath neededLibraries}:${libGL}/lib:${stdenv.cc.cc.lib}/lib${lib.optionalString stdenv.is64bit "64"} \ + --set-rpath ${lib.makeLibraryPath neededLibraries}:${libGL}/lib:${stdenv.cc.cc.lib}/lib${lib.optionalString stdenv.hostPlatform.is64bit "64"} \ $binary done diff --git a/pkgs/applications/version-management/subversion/default.nix b/pkgs/applications/version-management/subversion/default.nix index 7f0122e56c06..11d9c7fefdff 100644 --- a/pkgs/applications/version-management/subversion/default.nix +++ b/pkgs/applications/version-management/subversion/default.nix @@ -127,7 +127,7 @@ let platforms = platforms.linux ++ platforms.darwin; }; - } // lib.optionalAttrs stdenv.isDarwin { + } // lib.optionalAttrs stdenv.hostPlatform.isDarwin { CXX = "clang++"; CC = "clang"; CPP = "clang -E"; diff --git a/pkgs/applications/version-management/tig/default.nix b/pkgs/applications/version-management/tig/default.nix index b4a8533d468e..6c90d24e55bf 100644 --- a/pkgs/applications/version-management/tig/default.nix +++ b/pkgs/applications/version-management/tig/default.nix @@ -18,7 +18,7 @@ stdenv.mkDerivation rec { autoreconfFlags = [ "-I" "tools" "-v" ]; buildInputs = [ ncurses readline git ] - ++ lib.optionals stdenv.isDarwin [ libiconv ]; + ++ lib.optionals stdenv.hostPlatform.isDarwin [ libiconv ]; # those files are inherently impure, we'll handle the corresponding dependencies. postPatch = '' diff --git a/pkgs/applications/version-management/yadm/default.nix b/pkgs/applications/version-management/yadm/default.nix index 0dab32e57acc..2d6c0c9089af 100644 --- a/pkgs/applications/version-management/yadm/default.nix +++ b/pkgs/applications/version-management/yadm/default.nix @@ -75,7 +75,7 @@ resholve.mkDerivation rec { gnutar ]; fake = { - external = if stdenv.isCygwin then [ ] else [ "cygpath" ]; + external = if stdenv.hostPlatform.isCygwin then [ ] else [ "cygpath" ]; }; fix = { "$GPG_PROGRAM" = [ "gpg" ]; diff --git a/pkgs/applications/video/dmlive/default.nix b/pkgs/applications/video/dmlive/default.nix index db34d1da2749..5127dba204fc 100644 --- a/pkgs/applications/video/dmlive/default.nix +++ b/pkgs/applications/video/dmlive/default.nix @@ -29,7 +29,7 @@ rustPlatform.buildRustPackage rec { nativeBuildInputs = [ pkg-config makeWrapper ]; buildInputs = [ openssl ] - ++ lib.optionals stdenv.isDarwin [ configd Security ]; + ++ lib.optionals stdenv.hostPlatform.isDarwin [ configd Security ]; postInstall = '' wrapProgram "$out/bin/dmlive" --prefix PATH : "${lib.makeBinPath [ mpv ffmpeg nodejs ]}" diff --git a/pkgs/applications/video/glaxnimate/default.nix b/pkgs/applications/video/glaxnimate/default.nix index 9e4eda8a0790..7c6d8500d877 100644 --- a/pkgs/applications/video/glaxnimate/default.nix +++ b/pkgs/applications/video/glaxnimate/default.nix @@ -72,7 +72,7 @@ stdenv.mkDerivation rec { qtWrapperArgs = [ ''--prefix PATH : ${python3WithLibs}/bin'' ]; - passthru.tests.version = lib.optionalAttrs stdenv.isLinux (testers.testVersion { + passthru.tests.version = lib.optionalAttrs stdenv.hostPlatform.isLinux (testers.testVersion { package = glaxnimate; command = "${xvfb-run}/bin/xvfb-run glaxnimate --version"; }); diff --git a/pkgs/applications/video/gnomecast/default.nix b/pkgs/applications/video/gnomecast/default.nix index 37bf7baec870..bea389ccc534 100644 --- a/pkgs/applications/video/gnomecast/default.nix +++ b/pkgs/applications/video/gnomecast/default.nix @@ -40,7 +40,7 @@ buildPythonApplication rec { description = "Native Linux GUI for Chromecasting local files"; homepage = "https://github.com/keredson/gnomecast"; license = with licenses; [ gpl3 ]; - broken = stdenv.isDarwin; + broken = stdenv.hostPlatform.isDarwin; mainProgram = "gnomecast"; }; } diff --git a/pkgs/applications/video/go2tv/default.nix b/pkgs/applications/video/go2tv/default.nix index e48b884e93d3..e7ecf2936935 100644 --- a/pkgs/applications/video/go2tv/default.nix +++ b/pkgs/applications/video/go2tv/default.nix @@ -36,7 +36,7 @@ buildGoModule rec { xorg.libXext xorg.libXxf86vm libglvnd - ] ++ lib.optionals stdenv.isDarwin [ Carbon Cocoa Kernel UserNotifications ]; + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ Carbon Cocoa Kernel UserNotifications ]; ldflags = [ "-s" diff --git a/pkgs/applications/video/gpac/default.nix b/pkgs/applications/video/gpac/default.nix index 57da5147407e..b036e69ce8a3 100644 --- a/pkgs/applications/video/gpac/default.nix +++ b/pkgs/applications/video/gpac/default.nix @@ -15,13 +15,13 @@ stdenv.mkDerivation rec { # For most other functionality, this should probably be extended nativeBuildInputs = [ pkg-config - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ cctools ]; buildInputs = [ zlib - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ Carbon ]; diff --git a/pkgs/applications/video/hyperion-ng/default.nix b/pkgs/applications/video/hyperion-ng/default.nix index 50c00e03c4ef..837e5071f440 100644 --- a/pkgs/applications/video/hyperion-ng/default.nix +++ b/pkgs/applications/video/hyperion-ng/default.nix @@ -37,12 +37,12 @@ stdenv.mkDerivation rec { qtserialport qtsvg qtx11extras - ] ++ lib.optional stdenv.isLinux libcec + ] ++ lib.optional stdenv.hostPlatform.isLinux libcec ++ lib.optional withRPiDispmanx libraspberrypi; nativeBuildInputs = [ cmake wrapQtAppsHook - ] ++ lib.optional stdenv.isDarwin perl; # for macos bundle + ] ++ lib.optional stdenv.hostPlatform.isDarwin perl; # for macos bundle patchPhase = '' patchShebangs test/testrunner.sh diff --git a/pkgs/applications/video/jellyfin-media-player/default.nix b/pkgs/applications/video/jellyfin-media-player/default.nix index fef1a9ae80f0..013b6bdf3631 100644 --- a/pkgs/applications/video/jellyfin-media-player/default.nix +++ b/pkgs/applications/video/jellyfin-media-player/default.nix @@ -21,7 +21,7 @@ , qtwebchannel , qtwebengine , qtx11extras -, withDbus ? stdenv.isLinux +, withDbus ? stdenv.hostPlatform.isLinux }: mkDerivation rec { @@ -51,9 +51,9 @@ mkDerivation rec { qtwebchannel qtwebengine qtx11extras - ] ++ lib.optionals stdenv.isLinux [ + ] ++ lib.optionals stdenv.hostPlatform.isLinux [ qtwayland - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ Cocoa CoreAudio CoreFoundation @@ -74,7 +74,7 @@ mkDerivation rec { "-DLINUX_X11POWER=ON" ]; - postInstall = lib.optionalString stdenv.isDarwin '' + postInstall = lib.optionalString stdenv.hostPlatform.isDarwin '' mkdir -p $out/bin $out/Applications mv "$out/Jellyfin Media Player.app" $out/Applications diff --git a/pkgs/applications/video/lxdvdrip/default.nix b/pkgs/applications/video/lxdvdrip/default.nix index 6b9c8ef2fd14..32b533346dfd 100644 --- a/pkgs/applications/video/lxdvdrip/default.nix +++ b/pkgs/applications/video/lxdvdrip/default.nix @@ -22,7 +22,7 @@ stdenv.mkDerivation rec { buildInputs = [ libdvdread ]; meta = { - broken = (stdenv.isLinux && stdenv.isAarch64); + broken = (stdenv.hostPlatform.isLinux && stdenv.hostPlatform.isAarch64); description = "Command line tool to make a copy from a video DVD for private use"; homepage = "https://sourceforge.net/projects/lxdvdrip"; license = lib.licenses.gpl2; diff --git a/pkgs/applications/video/mirakurun/default.nix b/pkgs/applications/video/mirakurun/default.nix index 3d8034521c89..a1d9d58403d0 100644 --- a/pkgs/applications/video/mirakurun/default.nix +++ b/pkgs/applications/video/mirakurun/default.nix @@ -41,7 +41,7 @@ buildNpmPackage rec { bash nodejs which - ] ++ lib.optionals stdenv.isLinux [ v4l-utils ]; + ] ++ lib.optionals stdenv.hostPlatform.isLinux [ v4l-utils ]; crc32Patch = substituteAll { src = ./fix-musl-detection.patch; isMusl = if stdenv.hostPlatform.isMusl then "true" else "false"; diff --git a/pkgs/applications/video/mkvtoolnix/default.nix b/pkgs/applications/video/mkvtoolnix/default.nix index aff2910784ed..7d4ced909df6 100644 --- a/pkgs/applications/video/mkvtoolnix/default.nix +++ b/pkgs/applications/video/mkvtoolnix/default.nix @@ -91,8 +91,8 @@ stdenv.mkDerivation rec { zlib ] ++ optionals withGUI [ cmark ] - ++ optionals stdenv.isLinux [ qtwayland ] - ++ optionals stdenv.isDarwin [ libiconv ]; + ++ optionals stdenv.hostPlatform.isLinux [ qtwayland ] + ++ optionals stdenv.hostPlatform.isDarwin [ libiconv ]; # autoupdate is not needed but it silences a ton of pointless warnings postPatch = '' diff --git a/pkgs/applications/video/mlv-app/default.nix b/pkgs/applications/video/mlv-app/default.nix index e3f61cdd8201..da9f4d5807e1 100644 --- a/pkgs/applications/video/mlv-app/default.nix +++ b/pkgs/applications/video/mlv-app/default.nix @@ -18,7 +18,7 @@ mkDerivation rec { sha256 = "sha256-RfZXHmWSjZBxNFwQ/bzHppsLS0LauURIdnkAzxAIBcU="; }; - patches = if stdenv.isAarch64 then ./aarch64-flags.patch else null; + patches = if stdenv.hostPlatform.isAarch64 then ./aarch64-flags.patch else null; installPhase = '' runHook preInstall diff --git a/pkgs/applications/video/motion/default.nix b/pkgs/applications/video/motion/default.nix index c3082639cae7..5e02d58977ce 100644 --- a/pkgs/applications/video/motion/default.nix +++ b/pkgs/applications/video/motion/default.nix @@ -23,7 +23,7 @@ stdenv.mkDerivation rec { maintainers = with maintainers; [ puffnfresh veprbl ]; platforms = platforms.unix; # never built on aarch64-darwin since first introduction in nixpkgs - broken = stdenv.isDarwin && stdenv.isAarch64; + broken = stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isAarch64; mainProgram = "motion"; }; } diff --git a/pkgs/applications/video/mpc-qt/default.nix b/pkgs/applications/video/mpc-qt/default.nix index c9219fdf6359..c3f6981503c8 100644 --- a/pkgs/applications/video/mpc-qt/default.nix +++ b/pkgs/applications/video/mpc-qt/default.nix @@ -51,7 +51,7 @@ stdenv.mkDerivation rec { homepage = "https://mpc-qt.github.io"; license = licenses.gpl2; platforms = platforms.unix; - broken = stdenv.isDarwin; + broken = stdenv.hostPlatform.isDarwin; maintainers = with maintainers; [ romildo ]; mainProgram = "mpc-qt"; }; diff --git a/pkgs/applications/video/mplayer/default.nix b/pkgs/applications/video/mplayer/default.nix index 1608585de795..352c7b7edae7 100644 --- a/pkgs/applications/video/mplayer/default.nix +++ b/pkgs/applications/video/mplayer/default.nix @@ -5,11 +5,11 @@ , x11Support ? true, libX11, libXext, libGLU, libGL , xineramaSupport ? true, libXinerama , xvSupport ? true, libXv -, alsaSupport ? stdenv.isLinux, alsa-lib +, alsaSupport ? stdenv.hostPlatform.isLinux, alsa-lib , screenSaverSupport ? true, libXScrnSaver , vdpauSupport ? false, libvdpau -, cddaSupport ? !stdenv.isDarwin, cdparanoia -, dvdnavSupport ? !stdenv.isDarwin, libdvdnav +, cddaSupport ? !stdenv.hostPlatform.isDarwin, cdparanoia +, dvdnavSupport ? !stdenv.hostPlatform.isDarwin, libdvdnav , dvdreadSupport ? true, libdvdread , bluraySupport ? true, libbluray , amrSupport ? false, amrnb, amrwb @@ -112,7 +112,7 @@ stdenv.mkDerivation rec { ++ lib.optional libjpegSupport libjpeg ++ lib.optional bs2bSupport libbs2b ++ lib.optional v4lSupport libv4l - ++ lib.optionals stdenv.isDarwin [ darwin.apple_sdk.frameworks.Cocoa darwin.apple_sdk.frameworks.OpenGL ] + ++ lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.Cocoa darwin.apple_sdk.frameworks.OpenGL ] ; configurePlatforms = [ ]; @@ -147,8 +147,8 @@ stdenv.mkDerivation rec { ] ++ lib.optional (useUnfreeCodecs && codecs != null && !crossBuild) "--codecsdir=${codecs}" ++ lib.optional (stdenv.hostPlatform.isx86 && !crossBuild) "--enable-runtime-cpudetection" ++ lib.optional fribidiSupport "--enable-fribidi" - ++ lib.optional (stdenv.isLinux && !stdenv.isAarch64) "--enable-vidix" - ++ lib.optional stdenv.isLinux "--enable-fbdev" + ++ lib.optional (stdenv.hostPlatform.isLinux && !stdenv.hostPlatform.isAarch64) "--enable-vidix" + ++ lib.optional stdenv.hostPlatform.isLinux "--enable-fbdev" ++ lib.optionals (crossBuild) [ "--enable-cross-compile" "--disable-vidix-pcidb" diff --git a/pkgs/applications/video/mpv/default.nix b/pkgs/applications/video/mpv/default.nix index 5b255be9a1a5..9415a97770c9 100644 --- a/pkgs/applications/video/mpv/default.nix +++ b/pkgs/applications/video/mpv/default.nix @@ -72,37 +72,37 @@ zimg, # Boolean - alsaSupport ? stdenv.isLinux, + alsaSupport ? stdenv.hostPlatform.isLinux, archiveSupport ? true, bluraySupport ? true, bs2bSupport ? true, cacaSupport ? true, cddaSupport ? false, cmsSupport ? true, - drmSupport ? stdenv.isLinux, - dvbinSupport ? stdenv.isLinux, - dvdnavSupport ? stdenv.isLinux, + drmSupport ? stdenv.hostPlatform.isLinux, + dvbinSupport ? stdenv.hostPlatform.isLinux, + dvdnavSupport ? stdenv.hostPlatform.isLinux, jackaudioSupport ? false, javascriptSupport ? true, libpngSupport ? true, openalSupport ? true, - pipewireSupport ? stdenv.isLinux, - pulseSupport ? config.pulseaudio or stdenv.isLinux, + pipewireSupport ? stdenv.hostPlatform.isLinux, + pulseSupport ? config.pulseaudio or stdenv.hostPlatform.isLinux, rubberbandSupport ? true, screenSaverSupport ? true, - sdl2Support ? !stdenv.isDarwin, + sdl2Support ? !stdenv.hostPlatform.isDarwin, sixelSupport ? false, speexSupport ? true, - swiftSupport ? stdenv.isDarwin, + swiftSupport ? stdenv.hostPlatform.isDarwin, theoraSupport ? true, vaapiSupport ? x11Support || waylandSupport, vapoursynthSupport ? false, vdpauSupport ? true, - vulkanSupport ? stdenv.isLinux, - waylandSupport ? stdenv.isLinux, - x11Support ? stdenv.isLinux, - xineramaSupport ? stdenv.isLinux, - xvSupport ? stdenv.isLinux, + vulkanSupport ? stdenv.hostPlatform.isLinux, + waylandSupport ? stdenv.hostPlatform.isLinux, + x11Support ? stdenv.hostPlatform.isLinux, + xineramaSupport ? stdenv.hostPlatform.isLinux, + xvSupport ? stdenv.hostPlatform.isLinux, zimgSupport ? true, }: @@ -124,7 +124,7 @@ let platform // lib.optionalAttrs (platform ? darwinMinVersion) { darwinMinVersion = version; }; stdenv' = - if swiftSupport && stdenv.isDarwin && stdenv.isx86_64 then + if swiftSupport && stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isx86_64 then stdenv.override (old: { buildPlatform = overrideSDK old.buildPlatform "11.0"; hostPlatform = overrideSDK old.hostPlatform "11.0"; @@ -194,7 +194,7 @@ stdenv'.mkDerivation (finalAttrs: { (lib.mesonEnable "swift-build" swiftSupport) (lib.mesonEnable "macos-cocoa-cb" swiftSupport) ] - ++ lib.optionals stdenv.isDarwin [ + ++ lib.optionals stdenv.hostPlatform.isDarwin [ # Toggle explicitly because it fails on darwin (lib.mesonEnable "videotoolbox-pl" vulkanSupport) ]; @@ -209,7 +209,7 @@ stdenv'.mkDerivation (finalAttrs: { ninja pkg-config ] - ++ lib.optionals stdenv.isDarwin [ + ++ lib.optionals stdenv.hostPlatform.isDarwin [ buildPackages.darwin.sigtool xcbuild.xcrun ] @@ -283,9 +283,9 @@ stdenv'.mkDerivation (finalAttrs: { ++ lib.optionals xineramaSupport [ libXinerama ] ++ lib.optionals xvSupport [ libXv ] ++ lib.optionals zimgSupport [ zimg ] - ++ lib.optionals stdenv.isLinux [ nv-codec-headers-11 ] - ++ lib.optionals stdenv.isDarwin [ libiconv ] - ++ lib.optionals stdenv.isDarwin [ + ++ lib.optionals stdenv.hostPlatform.isLinux [ nv-codec-headers-11 ] + ++ lib.optionals stdenv.hostPlatform.isDarwin [ libiconv ] + ++ lib.optionals stdenv.hostPlatform.isDarwin [ Accelerate CoreFoundation Cocoa @@ -293,12 +293,12 @@ stdenv'.mkDerivation (finalAttrs: { MediaPlayer VideoToolbox ] - ++ lib.optionals (stdenv.isDarwin && swiftSupport) [ + ++ lib.optionals (stdenv.hostPlatform.isDarwin && swiftSupport) [ AVFoundation CoreMedia ]; - postBuild = lib.optionalString stdenv.isDarwin '' + postBuild = lib.optionalString stdenv.hostPlatform.isDarwin '' pushd .. # Must be run from the source dir because it uses relative paths python3 TOOLS/osxbundle.py -s build/mpv popd @@ -323,14 +323,14 @@ stdenv'.mkDerivation (finalAttrs: { printf "NoDisplay=true\n" >> umpv.desktop popd '' - + lib.optionalString stdenv.isDarwin '' + + lib.optionalString stdenv.hostPlatform.isDarwin '' mkdir -p $out/Applications cp -r mpv.app $out/Applications ''; # Set RUNPATH so that libcuda in /run/opengl-driver(-32)/lib can be found. # See the explanation in addDriverRunpath. - postFixup = lib.optionalString stdenv.isLinux '' + postFixup = lib.optionalString stdenv.hostPlatform.isLinux '' addDriverRunpath $out/bin/mpv patchShebangs --update --host $out/bin/umpv $out/bin/mpv_identify.sh ''; diff --git a/pkgs/applications/video/mpv/scripts/videoclip.nix b/pkgs/applications/video/mpv/scripts/videoclip.nix index bff265892eb1..3a2ac5e4e992 100644 --- a/pkgs/applications/video/mpv/scripts/videoclip.nix +++ b/pkgs/applications/video/mpv/scripts/videoclip.nix @@ -24,7 +24,7 @@ buildLua { substituteInPlace platform.lua \ --replace \'curl\' \'${lib.getExe curl}\' \ '' - + lib.optionalString stdenv.isLinux '' + + lib.optionalString stdenv.hostPlatform.isLinux '' --replace xclip ${lib.getExe xclip} \ --replace wl-copy ${lib.getExe' wl-clipboard "wl-copy"} ''; diff --git a/pkgs/applications/video/mpv/wrapper.nix b/pkgs/applications/video/mpv/wrapper.nix index b68f2d50c5c4..8104921aadbd 100644 --- a/pkgs/applications/video/mpv/wrapper.nix +++ b/pkgs/applications/video/mpv/wrapper.nix @@ -95,7 +95,7 @@ let makeWrapper "${mpv}/bin/mpv" "$out/bin/mpv" ${mostMakeWrapperArgs} rm "$out/bin/umpv" makeWrapper "${mpv}/bin/umpv" "$out/bin/umpv" ${umpvWrapperArgs} - '' + lib.optionalString stdenv.isDarwin '' + '' + lib.optionalString stdenv.hostPlatform.isDarwin '' # wrapProgram can't operate on symlinks rm "$out/Applications/mpv.app/Contents/MacOS/mpv" makeWrapper "${mpv}/Applications/mpv.app/Contents/MacOS/mpv" "$out/Applications/mpv.app/Contents/MacOS/mpv" ${mostMakeWrapperArgs} diff --git a/pkgs/applications/video/natron/default.nix b/pkgs/applications/video/natron/default.nix index 5ca88c666ee8..e02aa4af610d 100644 --- a/pkgs/applications/video/natron/default.nix +++ b/pkgs/applications/video/natron/default.nix @@ -98,6 +98,6 @@ stdenv.mkDerivation { license = lib.licenses.gpl2; maintainers = [ maintainers.puffnfresh ]; platforms = platforms.linux; - broken = stdenv.isLinux && stdenv.isAarch64; + broken = stdenv.hostPlatform.isLinux && stdenv.hostPlatform.isAarch64; }; } diff --git a/pkgs/applications/video/obs-studio/default.nix b/pkgs/applications/video/obs-studio/default.nix index 5f3f68fb03f5..c7bcdfc4f75d 100644 --- a/pkgs/applications/video/obs-studio/default.nix +++ b/pkgs/applications/video/obs-studio/default.nix @@ -31,13 +31,13 @@ , luajit , swig , python3 -, alsaSupport ? stdenv.isLinux +, alsaSupport ? stdenv.hostPlatform.isLinux , alsa-lib -, pulseaudioSupport ? config.pulseaudio or stdenv.isLinux +, pulseaudioSupport ? config.pulseaudio or stdenv.hostPlatform.isLinux , libpulseaudio , libcef , pciutils -, pipewireSupport ? stdenv.isLinux +, pipewireSupport ? stdenv.hostPlatform.isLinux , withFdk ? true , pipewire , libdrm @@ -183,7 +183,7 @@ stdenv.mkDerivation (finalAttrs: { ) ''; - postFixup = lib.optionalString stdenv.isLinux '' + postFixup = lib.optionalString stdenv.hostPlatform.isLinux '' addDriverRunpath $out/lib/lib*.so addDriverRunpath $out/lib/obs-plugins/*.so diff --git a/pkgs/applications/video/obs-studio/plugins/input-overlay.nix b/pkgs/applications/video/obs-studio/plugins/input-overlay.nix index 9a2069a27133..aff145b1fc74 100644 --- a/pkgs/applications/video/obs-studio/plugins/input-overlay.nix +++ b/pkgs/applications/video/obs-studio/plugins/input-overlay.nix @@ -53,6 +53,6 @@ stdenv.mkDerivation rec { license = licenses.gpl2; platforms = platforms.linux; # never built on aarch64-linux since first introduction in nixpkgs - broken = stdenv.isLinux && stdenv.isAarch64; + broken = stdenv.hostPlatform.isLinux && stdenv.hostPlatform.isAarch64; }; } diff --git a/pkgs/applications/video/obs-studio/plugins/obs-vkcapture.nix b/pkgs/applications/video/obs-studio/plugins/obs-vkcapture.nix index b66d3d01b234..f7e21b796c54 100644 --- a/pkgs/applications/video/obs-studio/plugins/obs-vkcapture.nix +++ b/pkgs/applications/video/obs-studio/plugins/obs-vkcapture.nix @@ -29,7 +29,7 @@ stdenv.mkDerivation (finalAttrs: { hash = "sha256-RIDsT6eL6bUfqPiyPlecnZHu5OorcJb3Xal8pjdOpAA="; }; - cmakeFlags = lib.optionals stdenv.isi686 [ + cmakeFlags = lib.optionals stdenv.hostPlatform.isi686 [ # We don't want to build the plugin for 32bit. The library integrates with # the 64bit plugin but it's necessary to be loaded into 32bit games. "-DBUILD_PLUGIN=OFF" @@ -47,7 +47,7 @@ stdenv.mkDerivation (finalAttrs: { vulkan-loader wayland ] - ++ lib.optionals (!stdenv.isi686) [ + ++ lib.optionals (!stdenv.hostPlatform.isi686) [ obs-studio ]; diff --git a/pkgs/applications/video/olive-editor/default.nix b/pkgs/applications/video/olive-editor/default.nix index 18ee73b53454..c033c1914368 100644 --- a/pkgs/applications/video/olive-editor/default.nix +++ b/pkgs/applications/video/olive-editor/default.nix @@ -80,7 +80,7 @@ stdenv.mkDerivation { qtwayland qtmultimedia qttools - ] ++ lib.optional stdenv.isDarwin CoreFoundation; + ] ++ lib.optional stdenv.hostPlatform.isDarwin CoreFoundation; meta = with lib; { description = "Professional open-source NLE video editor"; @@ -90,7 +90,7 @@ stdenv.mkDerivation { maintainers = [ maintainers.balsoft ]; platforms = platforms.unix; # never built on aarch64-darwin since first introduction in nixpkgs - broken = stdenv.isDarwin && stdenv.isAarch64; + broken = stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isAarch64; mainProgram = "olive-editor"; }; } diff --git a/pkgs/applications/video/openshot-qt/default.nix b/pkgs/applications/video/openshot-qt/default.nix index 88f13ef3eb9b..ec6e309e9b82 100644 --- a/pkgs/applications/video/openshot-qt/default.nix +++ b/pkgs/applications/video/openshot-qt/default.nix @@ -10,7 +10,7 @@ , qtsvg , qtwayland , wayland -, waylandSupport ? stdenv.isLinux +, waylandSupport ? stdenv.hostPlatform.isLinux , wrapGAppsHook3 }: @@ -66,7 +66,7 @@ mkDerivationWith python3.pkgs.buildPythonApplication { wrapProgram $out/bin/openshot-qt \ '' # Fix toolbar icons on Darwin - + lib.optionalString stdenv.isDarwin '' + + lib.optionalString stdenv.hostPlatform.isDarwin '' --suffix QT_PLUGIN_PATH : "${lib.getBin qtsvg}/${qtbase.qtPluginPrefix}" \ '' + '' "''${gappsWrapperArgs[@]}" \ diff --git a/pkgs/applications/video/pyca/default.nix b/pkgs/applications/video/pyca/default.nix index 52463c468931..eab7c5a7d233 100644 --- a/pkgs/applications/video/pyca/default.nix +++ b/pkgs/applications/video/pyca/default.nix @@ -73,7 +73,7 @@ python3.pkgs.buildPythonApplication rec { }; meta = with lib; { - broken = stdenv.isDarwin; + broken = stdenv.hostPlatform.isDarwin; description = "Fully functional Opencast capture agent written in Python"; mainProgram = "pyca"; homepage = "https://github.com/opencast/pyCA"; diff --git a/pkgs/applications/video/qmediathekview/default.nix b/pkgs/applications/video/qmediathekview/default.nix index 0e8f3bfb584b..d08387669eb3 100644 --- a/pkgs/applications/video/qmediathekview/default.nix +++ b/pkgs/applications/video/qmediathekview/default.nix @@ -37,7 +37,7 @@ mkDerivation rec { license = licenses.gpl3Plus; platforms = platforms.linux; maintainers = with maintainers; [ dotlambda ]; - broken = stdenv.isAarch64; + broken = stdenv.hostPlatform.isAarch64; mainProgram = "QMediathekView"; }; } diff --git a/pkgs/applications/video/qstopmotion/default.nix b/pkgs/applications/video/qstopmotion/default.nix index 3172c4bb4343..2f0c66ecd1d1 100644 --- a/pkgs/applications/video/qstopmotion/default.nix +++ b/pkgs/applications/video/qstopmotion/default.nix @@ -79,7 +79,7 @@ mkDerivation rec { license = lib.licenses.gpl2Plus; maintainers = [ maintainers.leenaars ]; - broken = stdenv.isAarch64; + broken = stdenv.hostPlatform.isAarch64; platforms = lib.platforms.gnu ++ lib.platforms.linux; mainProgram = "qstopmotion"; }; diff --git a/pkgs/applications/video/sub-batch/default.nix b/pkgs/applications/video/sub-batch/default.nix index 713a0ad2753e..48b38da01fae 100644 --- a/pkgs/applications/video/sub-batch/default.nix +++ b/pkgs/applications/video/sub-batch/default.nix @@ -30,7 +30,7 @@ rustPlatform.buildRustPackage rec { homepage = "https://github.com/kl/sub-batch"; license = licenses.mit; maintainers = with maintainers; [ erictapen ]; - broken = stdenv.isDarwin; + broken = stdenv.hostPlatform.isDarwin; mainProgram = "sub-batch"; }; } diff --git a/pkgs/applications/video/vcs/default.nix b/pkgs/applications/video/vcs/default.nix index 105823fec3ab..91a966bd1f4e 100644 --- a/pkgs/applications/video/vcs/default.nix +++ b/pkgs/applications/video/vcs/default.nix @@ -5,7 +5,7 @@ }: let version = "1.13.4"; - gopt = if stdenv.isLinux then util-linux else getopt; + gopt = if stdenv.hostPlatform.isLinux then util-linux else getopt; runtimeDeps = [ coreutils ffmpeg gawk gnugrep gnused imagemagick mplayer gopt ]; diff --git a/pkgs/applications/video/youtube-tui/default.nix b/pkgs/applications/video/youtube-tui/default.nix index 89d32f6f9a70..70458c7f6235 100644 --- a/pkgs/applications/video/youtube-tui/default.nix +++ b/pkgs/applications/video/youtube-tui/default.nix @@ -43,14 +43,14 @@ rustPlatform.buildRustPackage rec { xorg.libxcb libsixel mpv - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ CoreFoundation Security AppKit ]; # sixel-sys is dynamically linked to libsixel - postInstall = lib.optionalString stdenv.isDarwin '' + postInstall = lib.optionalString stdenv.hostPlatform.isDarwin '' wrapProgram $out/bin/youtube-tui \ --prefix DYLD_LIBRARY_PATH : "${lib.makeLibraryPath [libsixel]}" ''; diff --git a/pkgs/applications/virtualization/OVMF/default.nix b/pkgs/applications/virtualization/OVMF/default.nix index 2c1e49ac2c3d..35336ad8ad3f 100644 --- a/pkgs/applications/virtualization/OVMF/default.nix +++ b/pkgs/applications/virtualization/OVMF/default.nix @@ -206,6 +206,6 @@ edk2.mkDerivation projectDscPath (finalAttrs: { license = lib.licenses.bsd2; platforms = metaPlatforms; maintainers = with lib.maintainers; [ adamcstephens raitobezarius mjoerg ]; - broken = stdenv.isDarwin && stdenv.isAarch64; + broken = stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isAarch64; }; }) diff --git a/pkgs/applications/virtualization/cloud-hypervisor/default.nix b/pkgs/applications/virtualization/cloud-hypervisor/default.nix index f1dcda8df721..9af9b964825f 100644 --- a/pkgs/applications/virtualization/cloud-hypervisor/default.nix +++ b/pkgs/applications/virtualization/cloud-hypervisor/default.nix @@ -28,7 +28,7 @@ rustPlatform.buildRustPackage rec { separateDebugInfo = true; nativeBuildInputs = [ pkg-config ]; - buildInputs = lib.optional stdenv.isAarch64 dtc; + buildInputs = lib.optional stdenv.hostPlatform.isAarch64 dtc; checkInputs = [ openssl ]; OPENSSL_NO_VENDOR = true; diff --git a/pkgs/applications/virtualization/colima/default.nix b/pkgs/applications/virtualization/colima/default.nix index 253861178594..290186a59e3e 100644 --- a/pkgs/applications/virtualization/colima/default.nix +++ b/pkgs/applications/virtualization/colima/default.nix @@ -12,7 +12,7 @@ , colima # use lima-bin on darwin to support native macOS virtualization # https://github.com/NixOS/nixpkgs/pull/209171 -, lima-drv ? if stdenv.isDarwin then lima-bin else lima +, lima-drv ? if stdenv.hostPlatform.isDarwin then lima-bin else lima }: buildGoModule rec { @@ -33,7 +33,7 @@ buildGoModule rec { }; nativeBuildInputs = [ installShellFiles makeWrapper ] - ++ lib.optionals stdenv.isDarwin [ darwin.DarwinTools ]; + ++ lib.optionals stdenv.hostPlatform.isDarwin [ darwin.DarwinTools ]; vendorHash = "sha256-niuBo2YUUYKH0eSApOByNLrcHqr9m5VKGoiGp1fKklg="; diff --git a/pkgs/applications/virtualization/docker/default.nix b/pkgs/applications/virtualization/docker/default.nix index 9ce338dca7b5..0d7d036d6618 100644 --- a/pkgs/applications/virtualization/docker/default.nix +++ b/pkgs/applications/virtualization/docker/default.nix @@ -16,11 +16,11 @@ rec { , sqlite, iproute2, docker-buildx, docker-compose, docker-sbom , iptables, e2fsprogs, xz, util-linux, xfsprogs, git , procps, rootlesskit, slirp4netns, fuse-overlayfs, nixosTests - , clientOnly ? !stdenv.isLinux, symlinkJoin + , clientOnly ? !stdenv.hostPlatform.isLinux, symlinkJoin , withSystemd ? lib.meta.availableOn stdenv.hostPlatform systemd, systemd - , withBtrfs ? stdenv.isLinux, btrfs-progs - , withLvm ? stdenv.isLinux, lvm2 - , withSeccomp ? stdenv.isLinux, libseccomp + , withBtrfs ? stdenv.hostPlatform.isLinux, btrfs-progs + , withLvm ? stdenv.hostPlatform.isLinux, lvm2 + , withSeccomp ? stdenv.hostPlatform.isLinux, libseccomp , knownVulnerabilities ? [] }: let @@ -80,7 +80,7 @@ rec { hash = mobyHash; }; - moby = buildGoModule (lib.optionalAttrs stdenv.isLinux rec { + moby = buildGoModule (lib.optionalAttrs stdenv.hostPlatform.isLinux rec { pname = "moby"; inherit version; @@ -95,9 +95,9 @@ rec { ++ lib.optional withSystemd systemd ++ lib.optional withSeccomp libseccomp; - extraPath = lib.optionals stdenv.isLinux (lib.makeBinPath [ iproute2 iptables e2fsprogs xz xfsprogs procps util-linux git ]); + extraPath = lib.optionals stdenv.hostPlatform.isLinux (lib.makeBinPath [ iproute2 iptables e2fsprogs xz xfsprogs procps util-linux git ]); - extraUserPath = lib.optionals (stdenv.isLinux && !clientOnly) (lib.makeBinPath [ rootlesskit slirp4netns fuse-overlayfs ]); + extraUserPath = lib.optionals (stdenv.hostPlatform.isLinux && !clientOnly) (lib.makeBinPath [ rootlesskit slirp4netns fuse-overlayfs ]); patches = lib.optionals (lib.versionOlder version "23") [ # This patch incorporates code from a PR fixing using buildkit with the ZFS graph driver. @@ -188,7 +188,7 @@ rec { makeWrapper pkg-config go-md2man go libtool installShellFiles ]; - buildInputs = plugins ++ lib.optionals (lib.versionAtLeast version "23" && stdenv.isLinux) [ + buildInputs = plugins ++ lib.optionals (lib.versionAtLeast version "23" && stdenv.hostPlatform.isLinux) [ glibc glibc.static ]; diff --git a/pkgs/applications/virtualization/krunvm/default.nix b/pkgs/applications/virtualization/krunvm/default.nix index d6da5a2742f5..392ba594189a 100644 --- a/pkgs/applications/virtualization/krunvm/default.nix +++ b/pkgs/applications/virtualization/krunvm/default.nix @@ -35,9 +35,9 @@ stdenv.mkDerivation rec { rustc asciidoctor makeWrapper - ] ++ lib.optionals stdenv.isDarwin [ sigtool ]; + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ sigtool ]; - buildInputs = [ libkrun ] ++ lib.optionals stdenv.isDarwin [ + buildInputs = [ libkrun ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ libiconv ]; @@ -57,7 +57,7 @@ stdenv.mkDerivation rec { # It attaches entitlements with codesign and strip removes those, # voiding the entitlements and making it non-operational. - dontStrip = stdenv.isDarwin; + dontStrip = stdenv.hostPlatform.isDarwin; postFixup = '' wrapProgram $out/bin/krunvm \ diff --git a/pkgs/applications/virtualization/lima/bin.nix b/pkgs/applications/virtualization/lima/bin.nix index 7549f0c1528b..ca45c58ff219 100644 --- a/pkgs/applications/virtualization/lima/bin.nix +++ b/pkgs/applications/virtualization/lima/bin.nix @@ -48,7 +48,7 @@ stdenvNoCC.mkDerivation { sourceRoot = "."; nativeBuildInputs = [ makeBinaryWrapper installShellFiles ] - ++ lib.optionals stdenvNoCC.isLinux [ autoPatchelfHook ]; + ++ lib.optionals stdenvNoCC.hostPlatform.isLinux [ autoPatchelfHook ]; installPhase = '' runHook preInstall @@ -79,7 +79,7 @@ stdenvNoCC.mkDerivation { # Stripping removes entitlements of the binary on Darwin making it non-operational. # Therefore, disable stripping on Darwin. - dontStrip = stdenvNoCC.isDarwin; + dontStrip = stdenvNoCC.hostPlatform.isDarwin; passthru.updateScript = let diff --git a/pkgs/applications/virtualization/lima/default.nix b/pkgs/applications/virtualization/lima/default.nix index c57b58a008b3..318d54c77c41 100644 --- a/pkgs/applications/virtualization/lima/default.nix +++ b/pkgs/applications/virtualization/lima/default.nix @@ -23,7 +23,7 @@ buildGoModule rec { vendorHash = "sha256-P0Qnfu/cqLveAwz9jf/wTXxkoh0jvazlE5C/PcUrWsA="; nativeBuildInputs = [ makeWrapper installShellFiles ] - ++ lib.optionals stdenv.isDarwin [ xcbuild.xcrun sigtool ]; + ++ lib.optionals stdenv.hostPlatform.isDarwin [ xcbuild.xcrun sigtool ]; # clean fails with read only vendor dir postPatch = '' @@ -34,7 +34,7 @@ buildGoModule rec { # It attaches entitlements with codesign and strip removes those, # voiding the entitlements and making it non-operational. - dontStrip = stdenv.isDarwin; + dontStrip = stdenv.hostPlatform.isDarwin; buildPhase = '' runHook preBuild diff --git a/pkgs/applications/virtualization/lkl/default.nix b/pkgs/applications/virtualization/lkl/default.nix index c889dc5ff50a..751cbd021fc2 100644 --- a/pkgs/applications/virtualization/lkl/default.nix +++ b/pkgs/applications/virtualization/lkl/default.nix @@ -34,7 +34,7 @@ stdenv.mkDerivation rec { # Fixup build with newer Linux headers: https://github.com/lkl/linux/pull/484 sed '1i#include ' -i tools/lkl/lib/hijack/xlate.c - '' + lib.optionalString stdenv.isi686 '' + '' + lib.optionalString stdenv.hostPlatform.isi686 '' echo CONFIG_KALLSYMS=n >> arch/lkl/configs/defconfig echo CONFIG_KALLSYMS_BASE_RELATIVE=n >> arch/lkl/configs/defconfig '' + lib.optionalString firewallSupport '' diff --git a/pkgs/applications/virtualization/podman-desktop/default.nix b/pkgs/applications/virtualization/podman-desktop/default.nix index 015768b4ed7c..ce7d993d39de 100644 --- a/pkgs/applications/virtualization/podman-desktop/default.nix +++ b/pkgs/applications/virtualization/podman-desktop/default.nix @@ -51,7 +51,7 @@ stdenv.mkDerivation (finalAttrs: { makeWrapper copyDesktopItems ] - ++ lib.optionals stdenv.isDarwin [ + ++ lib.optionals stdenv.hostPlatform.isDarwin [ desktopToDarwinBundle ]; diff --git a/pkgs/applications/virtualization/podman/default.nix b/pkgs/applications/virtualization/podman/default.nix index 9a714054aa97..95bd221a3fb9 100644 --- a/pkgs/applications/virtualization/podman/default.nix +++ b/pkgs/applications/virtualization/podman/default.nix @@ -22,7 +22,7 @@ , crun , runc , conmon -, extraRuntimes ? lib.optionals stdenv.isLinux [ runc ] # e.g.: runc, gvisor, youki +, extraRuntimes ? lib.optionals stdenv.hostPlatform.isLinux [ runc ] # e.g.: runc, gvisor, youki , fuse-overlayfs , util-linux , iptables @@ -39,12 +39,12 @@ let # do not add qemu to this wrapper, store paths get written to the podman vm config and break when GCed - binPath = lib.makeBinPath (lib.optionals stdenv.isLinux [ + binPath = lib.makeBinPath (lib.optionals stdenv.hostPlatform.isLinux [ fuse-overlayfs util-linux iptables iproute2 - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ vfkit ] ++ extraPackages); @@ -54,7 +54,7 @@ let # this only works for some binaries, others may need to be added to `binPath` or in the modules paths = [ gvproxy - ] ++ lib.optionals stdenv.isLinux [ + ] ++ lib.optionals stdenv.hostPlatform.isLinux [ aardvark-dns catatonit # added here for the pause image and also set in `containersConf` for `init_path` netavark @@ -93,7 +93,7 @@ buildGoModule rec { nativeBuildInputs = [ pkg-config go-md2man installShellFiles makeWrapper python3 ]; - buildInputs = lib.optionals stdenv.isLinux [ + buildInputs = lib.optionals stdenv.hostPlatform.isLinux [ btrfs-progs gpgme libapparmor @@ -110,7 +110,7 @@ buildGoModule rec { runHook preBuild patchShebangs . substituteInPlace Makefile --replace "/bin/bash" "${runtimeShell}" - ${if stdenv.isDarwin then '' + ${if stdenv.hostPlatform.isDarwin then '' make podman-remote # podman-mac-helper uses FHS paths '' else '' make bin/podman bin/rootlessport bin/quadlet @@ -121,7 +121,7 @@ buildGoModule rec { installPhase = '' runHook preInstall - ${if stdenv.isDarwin then '' + ${if stdenv.hostPlatform.isDarwin then '' install bin/darwin/podman -Dt $out/bin '' else '' make install.bin install.systemd @@ -134,7 +134,7 @@ buildGoModule rec { runHook postInstall ''; - postFixup = lib.optionalString stdenv.isLinux '' + postFixup = lib.optionalString stdenv.hostPlatform.isLinux '' RPATH=$(patchelf --print-rpath $out/bin/.podman-wrapped) patchelf --set-rpath "${lib.makeLibraryPath [ systemd ]}":$RPATH $out/bin/.podman-wrapped ''; @@ -144,7 +144,7 @@ buildGoModule rec { package = podman; command = "HOME=$TMPDIR podman --version"; }; - } // lib.optionalAttrs stdenv.isLinux { + } // lib.optionalAttrs stdenv.hostPlatform.isLinux { inherit (nixosTests) podman; # related modules inherit (nixosTests) diff --git a/pkgs/applications/virtualization/qemu/default.nix b/pkgs/applications/virtualization/qemu/default.nix index 6be060d44891..8625069da8b1 100644 --- a/pkgs/applications/virtualization/qemu/default.nix +++ b/pkgs/applications/virtualization/qemu/default.nix @@ -6,14 +6,14 @@ , attr, libcap, libcap_ng, socat, libslirp , CoreServices, Cocoa, Hypervisor, Kernel, rez, setfile, vmnet , guestAgentSupport ? (with stdenv.hostPlatform; isLinux || isNetBSD || isOpenBSD || isSunOS || isWindows) && !minimal -, numaSupport ? stdenv.isLinux && !stdenv.isAarch32 && !minimal, numactl -, seccompSupport ? stdenv.isLinux && !minimal, libseccomp +, numaSupport ? stdenv.hostPlatform.isLinux && !stdenv.hostPlatform.isAarch32 && !minimal, numactl +, seccompSupport ? stdenv.hostPlatform.isLinux && !minimal, libseccomp , alsaSupport ? lib.hasSuffix "linux" stdenv.hostPlatform.system && !nixosTestRunner && !minimal -, pulseSupport ? !stdenv.isDarwin && !nixosTestRunner && !minimal, libpulseaudio -, pipewireSupport ? !stdenv.isDarwin && !nixosTestRunner && !minimal, pipewire -, sdlSupport ? !stdenv.isDarwin && !nixosTestRunner && !minimal, SDL2, SDL2_image -, jackSupport ? !stdenv.isDarwin && !nixosTestRunner && !minimal, libjack2 -, gtkSupport ? !stdenv.isDarwin && !xenSupport && !nixosTestRunner && !minimal, gtk3, gettext, vte, wrapGAppsHook3 +, pulseSupport ? !stdenv.hostPlatform.isDarwin && !nixosTestRunner && !minimal, libpulseaudio +, pipewireSupport ? !stdenv.hostPlatform.isDarwin && !nixosTestRunner && !minimal, pipewire +, sdlSupport ? !stdenv.hostPlatform.isDarwin && !nixosTestRunner && !minimal, SDL2, SDL2_image +, jackSupport ? !stdenv.hostPlatform.isDarwin && !nixosTestRunner && !minimal, libjack2 +, gtkSupport ? !stdenv.hostPlatform.isDarwin && !xenSupport && !nixosTestRunner && !minimal, gtk3, gettext, vte, wrapGAppsHook3 , vncSupport ? !nixosTestRunner && !minimal, libjpeg, libpng , smartcardSupport ? !nixosTestRunner && !minimal, libcacard , spiceSupport ? true && !nixosTestRunner && !minimal, spice, spice-protocol @@ -28,7 +28,7 @@ , libiscsiSupport ? !minimal, libiscsi , smbdSupport ? false, samba , tpmSupport ? !minimal -, uringSupport ? stdenv.isLinux && !userOnly, liburing +, uringSupport ? stdenv.hostPlatform.isLinux && !userOnly, liburing , canokeySupport ? !minimal, canokey-qemu , capstoneSupport ? !minimal, capstone , pluginsSupport ? !stdenv.hostPlatform.isStatic @@ -39,7 +39,7 @@ , hostCpuTargets ? (if toolsOnly then [ ] else if hostCpuOnly - then (lib.optional stdenv.isx86_64 "i386-softmmu" + then (lib.optional stdenv.hostPlatform.isx86_64 "i386-softmmu" ++ ["${stdenv.hostPlatform.qemuArch}-softmmu"]) else null) , nixosTestRunner ? false @@ -91,7 +91,7 @@ stdenv.mkDerivation (finalAttrs: { ++ lib.optionals gtkSupport [ wrapGAppsHook3 ] ++ lib.optionals enableDocs [ python3Packages.sphinx python3Packages.sphinx-rtd-theme ] ++ lib.optionals hexagonSupport [ glib ] - ++ lib.optionals stdenv.isDarwin [ sigtool ] + ++ lib.optionals stdenv.hostPlatform.isDarwin [ sigtool ] ++ lib.optionals (!userOnly) [ dtc ]; buildInputs = [ zlib glib pixman @@ -99,7 +99,7 @@ stdenv.mkDerivation (finalAttrs: { gnutls nettle curl libslirp ] ++ lib.optionals ncursesSupport [ ncurses ] - ++ lib.optionals stdenv.isDarwin [ CoreServices Cocoa Hypervisor Kernel rez setfile vmnet ] + ++ lib.optionals stdenv.hostPlatform.isDarwin [ CoreServices Cocoa Hypervisor Kernel rez setfile vmnet ] ++ lib.optionals seccompSupport [ libseccomp ] ++ lib.optionals numaSupport [ numactl ] ++ lib.optionals alsaSupport [ alsa-lib ] @@ -112,8 +112,8 @@ stdenv.mkDerivation (finalAttrs: { ++ lib.optionals smartcardSupport [ libcacard ] ++ lib.optionals spiceSupport [ spice-protocol spice ] ++ lib.optionals usbredirSupport [ usbredir ] - ++ lib.optionals stdenv.isLinux [ libcap_ng libcap attr ] - ++ lib.optionals (stdenv.isLinux && !userOnly) [ libaio ] + ++ lib.optionals stdenv.hostPlatform.isLinux [ libcap_ng libcap attr ] + ++ lib.optionals (stdenv.hostPlatform.isLinux && !userOnly) [ libaio ] ++ lib.optionals xenSupport [ xen ] ++ lib.optionals cephSupport [ ceph ] ++ lib.optionals glusterfsSupport [ glusterfs libuuid ] @@ -132,7 +132,7 @@ stdenv.mkDerivation (finalAttrs: { outputs = [ "out" ] ++ lib.optional guestAgentSupport "ga"; # On aarch64-linux we would shoot over the Hydra's 2G output limit. - separateDebugInfo = !(stdenv.isAarch64 && stdenv.isLinux); + separateDebugInfo = !(stdenv.hostPlatform.isAarch64 && stdenv.hostPlatform.isLinux); patches = [ ./fix-qemu-ga.patch @@ -179,8 +179,8 @@ stdenv.mkDerivation (finalAttrs: { ++ lib.optional spiceSupport "--enable-spice" ++ lib.optional usbredirSupport "--enable-usb-redir" ++ lib.optional (hostCpuTargets != null) "--target-list=${lib.concatStringsSep "," hostCpuTargets}" - ++ lib.optionals stdenv.isDarwin [ "--enable-cocoa" "--enable-hvf" ] - ++ lib.optional (stdenv.isLinux && !userOnly) "--enable-linux-aio" + ++ lib.optionals stdenv.hostPlatform.isDarwin [ "--enable-cocoa" "--enable-hvf" ] + ++ lib.optional (stdenv.hostPlatform.isLinux && !userOnly) "--enable-linux-aio" ++ lib.optional gtkSupport "--enable-gtk" ++ lib.optional xenSupport "--enable-xen" ++ lib.optional cephSupport "--enable-rbd" @@ -204,7 +204,7 @@ stdenv.mkDerivation (finalAttrs: { # voiding the entitlements and making it non-operational. # The alternative is to re-sign with entitlements after stripping: # * https://github.com/qemu/qemu/blob/v6.1.0/scripts/entitlement.sh#L25 - dontStrip = stdenv.isDarwin; + dontStrip = stdenv.hostPlatform.isDarwin; postFixup = '' # the .desktop is both invalid and pointless @@ -260,7 +260,7 @@ stdenv.mkDerivation (finalAttrs: { # xattrs are not allowed in the sandbox substituteInPlace ../tests/qtest/virtio-9p-test.c \ --replace-fail mapped-xattr mapped-file - '' + lib.optionalString stdenv.isDarwin '' + '' + lib.optionalString stdenv.hostPlatform.isDarwin '' # skip test that stalls on darwin, perhaps due to subtle differences # in fifo behaviour substituteInPlace ../tests/unit/meson.build \ diff --git a/pkgs/applications/virtualization/rvvm/default.nix b/pkgs/applications/virtualization/rvvm/default.nix index 2d6b7d3da0c5..4693999e8f11 100644 --- a/pkgs/applications/virtualization/rvvm/default.nix +++ b/pkgs/applications/virtualization/rvvm/default.nix @@ -15,7 +15,7 @@ assert lib.assertMsg (builtins.elem guiBackend ["sdl" "x11" "none"]) "Unsupported GUI backend"; assert lib.assertMsg (!(enableSDL && enableX11)) "RVVM can have only one GUI backend at a time"; -assert lib.assertMsg (stdenv.isDarwin -> !enableX11) "macOS supports only SDL GUI backend"; +assert lib.assertMsg (stdenv.hostPlatform.isDarwin -> !enableX11) "macOS supports only SDL GUI backend"; stdenv.mkDerivation rec { pname = "rvvm"; diff --git a/pkgs/applications/virtualization/sail-riscv/default.nix b/pkgs/applications/virtualization/sail-riscv/default.nix index cda1f5d6cb20..ba98f6b2cd5a 100644 --- a/pkgs/applications/virtualization/sail-riscv/default.nix +++ b/pkgs/applications/virtualization/sail-riscv/default.nix @@ -61,7 +61,7 @@ stdenv.mkDerivation rec { homepage = "https://github.com/riscv/sail-riscv"; description = "Formal specification of the RISC-V architecture, written in Sail"; maintainers = with maintainers; [ genericnerdyusername ]; - broken = stdenv.isDarwin && stdenv.isAarch64; + broken = stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isAarch64; license = licenses.bsd2; }; } diff --git a/pkgs/applications/virtualization/virt-manager/default.nix b/pkgs/applications/virtualization/virt-manager/default.nix index 228c2ed6cb9f..2b230a95b504 100644 --- a/pkgs/applications/virtualization/virt-manager/default.nix +++ b/pkgs/applications/virtualization/virt-manager/default.nix @@ -45,7 +45,7 @@ python3.pkgs.buildPythonApplication rec { gobject-introspection # for setup hook populating GI_TYPELIB_PATH docutils wrapGAppsHook3 - ] ++ lib.optional stdenv.isDarwin desktopToDarwinBundle; + ] ++ lib.optional stdenv.hostPlatform.isDarwin desktopToDarwinBundle; buildInputs = [ gst_all_1.gst-plugins-base diff --git a/pkgs/applications/virtualization/virt-viewer/default.nix b/pkgs/applications/virtualization/virt-viewer/default.nix index a4e32f618a04..2c368db8da94 100644 --- a/pkgs/applications/virtualization/virt-viewer/default.nix +++ b/pkgs/applications/virtualization/virt-viewer/default.nix @@ -79,7 +79,7 @@ stdenv.mkDerivation rec { gdbm spice-gtk spice-protocol - ] ++ lib.optionals stdenv.isLinux [ + ] ++ lib.optionals stdenv.hostPlatform.isLinux [ libcap ]); diff --git a/pkgs/applications/virtualization/virtualbox/default.nix b/pkgs/applications/virtualization/virtualbox/default.nix index 3f27170311cd..437ceba29ce0 100644 --- a/pkgs/applications/virtualization/virtualbox/default.nix +++ b/pkgs/applications/virtualization/virtualbox/default.nix @@ -13,7 +13,7 @@ , javaBindings ? true, jdk # Almost doesn't affect closure size , pythonBindings ? false, python3 , extensionPack ? null, fakeroot -, pulseSupport ? config.pulseaudio or stdenv.isLinux, libpulseaudio +, pulseSupport ? config.pulseaudio or stdenv.hostPlatform.isLinux, libpulseaudio , enableHardening ? false , headless ? false , enable32bitGuests ? true diff --git a/pkgs/applications/virtualization/xhyve/default.nix b/pkgs/applications/virtualization/xhyve/default.nix index 2d66f8351411..a9119975a7ae 100644 --- a/pkgs/applications/virtualization/xhyve/default.nix +++ b/pkgs/applications/virtualization/xhyve/default.nix @@ -34,6 +34,6 @@ stdenv.mkDerivation rec { license = licenses.bsd2; platforms = platforms.darwin; # never built on aarch64-darwin since first introduction in nixpkgs - broken = stdenv.isDarwin && stdenv.isAarch64; + broken = stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isAarch64; }; } diff --git a/pkgs/applications/window-managers/hyprwm/hypr/default.nix b/pkgs/applications/window-managers/hyprwm/hypr/default.nix index 3952256b8d41..b24c905478e4 100644 --- a/pkgs/applications/window-managers/hyprwm/hypr/default.nix +++ b/pkgs/applications/window-managers/hyprwm/hypr/default.nix @@ -56,7 +56,7 @@ stdenv.mkDerivation (finalAttrs: { ]; # src/ewmh/ewmh.cpp:67:28: error: non-constant-expression cannot be narrowed from type 'int' to 'uint32_t' (aka 'unsigned int') in initializer list - env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.isDarwin "-Wno-c++11-narrowing"; + env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.hostPlatform.isDarwin "-Wno-c++11-narrowing"; installPhase = '' runHook preInstall diff --git a/pkgs/applications/window-managers/hyprwm/hyprpaper/default.nix b/pkgs/applications/window-managers/hyprwm/hyprpaper/default.nix index e0b1b0e20723..771b3b1841a5 100644 --- a/pkgs/applications/window-managers/hyprwm/hyprpaper/default.nix +++ b/pkgs/applications/window-managers/hyprwm/hyprpaper/default.nix @@ -88,7 +88,7 @@ stdenv.mkDerivation (finalAttrs: { license = licenses.bsd3; maintainers = with maintainers; [ wozeparrot fufexan ]; inherit (wayland.meta) platforms; - broken = stdenv.isDarwin; + broken = stdenv.hostPlatform.isDarwin; mainProgram = "hyprpaper"; }; }) diff --git a/pkgs/applications/window-managers/i3/default.nix b/pkgs/applications/window-managers/i3/default.nix index 9b66a3279f8d..acb05f4ac771 100644 --- a/pkgs/applications/window-managers/i3/default.nix +++ b/pkgs/applications/window-managers/i3/default.nix @@ -48,7 +48,7 @@ stdenv.mkDerivation rec { ''; # xvfb-run is available only on Linux - doCheck = stdenv.isLinux; + doCheck = stdenv.hostPlatform.isLinux; checkPhase = '' test_failed= diff --git a/pkgs/applications/window-managers/i3/lock-blur.nix b/pkgs/applications/window-managers/i3/lock-blur.nix index e3eabc547b5f..dc8e8250135b 100644 --- a/pkgs/applications/window-managers/i3/lock-blur.nix +++ b/pkgs/applications/window-managers/i3/lock-blur.nix @@ -29,6 +29,6 @@ i3lock-color.overrideAttrs (oldAttrs : rec { license = licenses.bsd3; maintainers = with maintainers; [ dan4ik605743 ]; platforms = platforms.all; - broken = stdenv.isDarwin; # never built on Hydra https://hydra.nixos.org/job/nixpkgs/trunk/i3lock-blur.x86_64-darwin + broken = stdenv.hostPlatform.isDarwin; # never built on Hydra https://hydra.nixos.org/job/nixpkgs/trunk/i3lock-blur.x86_64-darwin }; }) diff --git a/pkgs/applications/window-managers/i3/lock-color.nix b/pkgs/applications/window-managers/i3/lock-color.nix index 584e13f55369..5a4c12a4474a 100644 --- a/pkgs/applications/window-managers/i3/lock-color.nix +++ b/pkgs/applications/window-managers/i3/lock-color.nix @@ -57,6 +57,6 @@ stdenv.mkDerivation rec { license = licenses.bsd3; platforms = platforms.all; - broken = stdenv.isDarwin; + broken = stdenv.hostPlatform.isDarwin; }; } diff --git a/pkgs/applications/window-managers/owl/default.nix b/pkgs/applications/window-managers/owl/default.nix index 812e65830b33..15ba9de7d753 100644 --- a/pkgs/applications/window-managers/owl/default.nix +++ b/pkgs/applications/window-managers/owl/default.nix @@ -25,7 +25,7 @@ stdenv.mkDerivation { }; # use pregenerated nib files because generating them requires Xcode - postPatch = lib.optionalString stdenv.isDarwin '' + postPatch = lib.optionalString stdenv.hostPlatform.isDarwin '' sed -i "/ibtool/d" configure mkdir -p build/Owl.app/Contents/Resources/English.lproj cp ${./mac/MainMenu.nib} build/Owl.app/Contents/Resources/English.lproj/MainMenu.nib @@ -37,10 +37,10 @@ stdenv.mkDerivation { nativeBuildInputs = [ makeWrapper wayland-scanner - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ darwin.DarwinTools darwin.bootstrap_cmds - ] ++ lib.optionals (!stdenv.isDarwin) [ + ] ++ lib.optionals (!stdenv.hostPlatform.isDarwin) [ gnustep.make gnustep.wrapGNUstepAppsHook ]; @@ -48,9 +48,9 @@ stdenv.mkDerivation { buildInputs = [ libxkbcommon wayland - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.Cocoa - ] ++ lib.optionals (!stdenv.isDarwin) [ + ] ++ lib.optionals (!stdenv.hostPlatform.isDarwin) [ gnustep.back gnustep.base gnustep.gui @@ -64,14 +64,14 @@ stdenv.mkDerivation { configureScript = "../configure"; # error: "Your gnustep-base was configured for the objc-nonfragile-abi but you are not using it now." - env.NIX_CFLAGS_COMPILE = lib.optionalString (!stdenv.isDarwin) "-fobjc-runtime=gnustep-2.0"; + env.NIX_CFLAGS_COMPILE = lib.optionalString (!stdenv.hostPlatform.isDarwin) "-fobjc-runtime=gnustep-2.0"; installPhase = '' runHook preInstall mkdir -p $out/{Applications,bin} mv Owl.app $out/Applications - makeWrapper $out/{Applications/Owl.app${lib.optionalString stdenv.isDarwin "/Contents/MacOS"},bin}/Owl + makeWrapper $out/{Applications/Owl.app${lib.optionalString stdenv.hostPlatform.isDarwin "/Contents/MacOS"},bin}/Owl runHook postInstall ''; diff --git a/pkgs/applications/window-managers/spectrwm/default.nix b/pkgs/applications/window-managers/spectrwm/default.nix index 1678e5954846..52b413452e82 100644 --- a/pkgs/applications/window-managers/spectrwm/default.nix +++ b/pkgs/applications/window-managers/spectrwm/default.nix @@ -23,7 +23,7 @@ stdenv.mkDerivation (finalAttrs: { ] ++ [ libbsd ]); prePatch = let - subdir = if stdenv.isDarwin then "osx" else "linux"; + subdir = if stdenv.hostPlatform.isDarwin then "osx" else "linux"; in "cd ${subdir}"; makeFlags = [ "PREFIX=${placeholder "out"}" ]; diff --git a/pkgs/build-support/add-driver-runpath/default.nix b/pkgs/build-support/add-driver-runpath/default.nix index 08547a4453c5..56026b1fc908 100644 --- a/pkgs/build-support/add-driver-runpath/default.nix +++ b/pkgs/build-support/add-driver-runpath/default.nix @@ -5,7 +5,7 @@ stdenv.mkDerivation { # Named "opengl-driver" for legacy reasons, but it is the path to # hardware drivers installed by NixOS - driverLink = "/run/opengl-driver" + lib.optionalString stdenv.isi686 "-32"; + driverLink = "/run/opengl-driver" + lib.optionalString stdenv.hostPlatform.isi686 "-32"; buildCommand = '' mkdir -p $out/nix-support diff --git a/pkgs/build-support/agda/default.nix b/pkgs/build-support/agda/default.nix index ec0dfe7cc144..12dfdc4b5122 100644 --- a/pkgs/build-support/agda/default.nix +++ b/pkgs/build-support/agda/default.nix @@ -109,7 +109,7 @@ let # darwin, it seems that there is no standard such locale; luckily, # the referenced issue doesn't seem to surface on darwin. Hence let's # set this only on non-darwin. - LC_ALL = optionalString (!stdenv.isDarwin) "C.UTF-8"; + LC_ALL = optionalString (!stdenv.hostPlatform.isDarwin) "C.UTF-8"; meta = if meta.broken or false then meta // { hydraPlatforms = platforms.none; } else meta; diff --git a/pkgs/build-support/alternatives/lapack/default.nix b/pkgs/build-support/alternatives/lapack/default.nix index 2d62855b258a..983d59ac6f60 100644 --- a/pkgs/build-support/alternatives/lapack/default.nix +++ b/pkgs/build-support/alternatives/lapack/default.nix @@ -36,7 +36,7 @@ stdenv.mkDerivation { }; # TODO: drop this forced rebuild, as it was needed just once. - rebuild_salt = if stdenv.isDarwin && stdenv.isx86_64 then "J4AQ" else null; + rebuild_salt = if stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isx86_64 then "J4AQ" else null; dontBuild = true; dontConfigure = true; diff --git a/pkgs/build-support/build-bazel-package/default.nix b/pkgs/build-support/build-bazel-package/default.nix index e752ccdb7dfc..1131f73a1836 100644 --- a/pkgs/build-support/build-bazel-package/default.nix +++ b/pkgs/build-support/build-bazel-package/default.nix @@ -181,7 +181,7 @@ stdenv.mkDerivation (fBuildAttrs // { new_target="$(readlink "$symlink" | sed "s,$NIX_BUILD_TOP,NIX_BUILD_TOP,")" rm "$symlink" ln -sf "$new_target" "$symlink" - '' + lib.optionalString stdenv.isDarwin '' + '' + lib.optionalString stdenv.hostPlatform.isDarwin '' # on linux symlink permissions cannot be modified, so we modify those on darwin to match the linux ones ${chmodder}/bin/chmodder "$symlink" '' + '' diff --git a/pkgs/build-support/build-fhsenv-bubblewrap/buildFHSEnv.nix b/pkgs/build-support/build-fhsenv-bubblewrap/buildFHSEnv.nix index 67931a07dd40..6dfbaae3e5de 100644 --- a/pkgs/build-support/build-fhsenv-bubblewrap/buildFHSEnv.nix +++ b/pkgs/build-support/build-fhsenv-bubblewrap/buildFHSEnv.nix @@ -34,7 +34,7 @@ # /lib will link to /lib32 let - inherit (stdenv) is64bit; + inherit (stdenv.hostPlatform) is64bit; name = if (args ? pname && args ? version) then "${args.pname}-${args.version}" diff --git a/pkgs/build-support/build-graalvm-native-image/default.nix b/pkgs/build-support/build-graalvm-native-image/default.nix index f0e73901c8db..0ac84b000575 100644 --- a/pkgs/build-support/build-graalvm-native-image/default.nix +++ b/pkgs/build-support/build-graalvm-native-image/default.nix @@ -11,8 +11,8 @@ # Default native-image arguments. You probably don't want to set this, # except in special cases. In most cases, use extraNativeBuildArgs instead , nativeImageBuildArgs ? [ - (lib.optionalString stdenv.isDarwin "-H:-CheckToolchain") - (lib.optionalString (stdenv.isLinux && stdenv.isAarch64) "-H:PageSize=64K") + (lib.optionalString stdenv.hostPlatform.isDarwin "-H:-CheckToolchain") + (lib.optionalString (stdenv.hostPlatform.isLinux && stdenv.hostPlatform.isAarch64) "-H:PageSize=64K") "-H:Name=${executable}" "-march=compatibility" "--verbose" diff --git a/pkgs/build-support/dart/build-dart-application/default.nix b/pkgs/build-support/dart/build-dart-application/default.nix index c99b8bbf325e..bd1d2ac1b49c 100644 --- a/pkgs/build-support/dart/build-dart-application/default.nix +++ b/pkgs/build-support/dart/build-dart-application/default.nix @@ -104,7 +104,7 @@ let dartFixupHook makeWrapper jq - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ darwin.sigtool ] ++ # Ensure that we inherit the propagated build inputs from the dependencies. diff --git a/pkgs/build-support/docker/default.nix b/pkgs/build-support/docker/default.nix index 8e7371728029..033bce988ae9 100644 --- a/pkgs/build-support/docker/default.nix +++ b/pkgs/build-support/docker/default.nix @@ -924,7 +924,7 @@ rec { (lib.assertMsg (maxLayers > 1) "the maxLayers argument of dockerTools.buildLayeredImage function must be greather than 1 (current value: ${toString maxLayers})"); assert - (lib.assertMsg (enableFakechroot -> !stdenv.isDarwin) '' + (lib.assertMsg (enableFakechroot -> !stdenv.hostPlatform.isDarwin) '' cannot use `enableFakechroot` because `proot` is not portable to Darwin. Workarounds: - use `fakeRootCommands` with the restricted `fakeroot` environment - cross-compile your packages diff --git a/pkgs/build-support/dotnet/fetch-nupkg/overrides.nix b/pkgs/build-support/dotnet/fetch-nupkg/overrides.nix index 76e241c0cd3a..923f8b4e917d 100644 --- a/pkgs/build-support/dotnet/fetch-nupkg/overrides.nix +++ b/pkgs/build-support/dotnet/fetch-nupkg/overrides.nix @@ -53,7 +53,7 @@ package: package.overrideAttrs ( old: - lib.optionalAttrs (!stdenv.isDarwin) { + lib.optionalAttrs (!stdenv.hostPlatform.isDarwin) { setupHook = writeText "setupHook.sh" '' prependToVar dotnetRuntimeDeps \ "${lib.getLib libICE}" \ @@ -67,7 +67,7 @@ package: package.overrideAttrs ( old: - lib.optionalAttrs stdenv.isLinux { + lib.optionalAttrs stdenv.hostPlatform.isLinux { nativeBuildInputs = old.nativeBuildInputs or [ ] ++ [ autoPatchelfHook ]; buildInputs = old.buildInputs or [ ] ++ [ fontconfig ]; diff --git a/pkgs/build-support/libredirect/default.nix b/pkgs/build-support/libredirect/default.nix index 999824167388..1b8ebcaeacdd 100644 --- a/pkgs/build-support/libredirect/default.nix +++ b/pkgs/build-support/libredirect/default.nix @@ -32,7 +32,7 @@ else stdenv.mkDerivation rec { buildPhase = '' runHook preBuild - ${if stdenv.isDarwin && stdenv.isAarch64 then '' + ${if stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isAarch64 then '' # We need the unwrapped binutils and clang: # We also want to build a fat library with x86_64, arm64, arm64e in there. # Because we use the unwrapped tools, we need to provide -isystem for headers @@ -47,7 +47,7 @@ else stdenv.mkDerivation rec { -Wl,-install_name,$libName \ -Wall -std=c99 -O3 -fPIC libredirect.c \ -shared -o "$libName" - '' else if stdenv.isDarwin then '' + '' else if stdenv.hostPlatform.isDarwin then '' $CC -Wall -std=c99 -O3 -fPIC libredirect.c \ -Wl,-install_name,$out/lib/$libName \ -shared -o "$libName" @@ -58,7 +58,7 @@ else stdenv.mkDerivation rec { if [ -n "$doInstallCheck" ]; then $CC -Wall -std=c99 \ - ${lib.optionalString (!stdenv.isDarwin) "-D_GNU_SOURCE"} \ + ${lib.optionalString (!stdenv.hostPlatform.isDarwin) "-D_GNU_SOURCE"} \ -O3 test.c -o test fi @@ -75,7 +75,7 @@ else stdenv.mkDerivation rec { install -vD "$libName" "$out/lib/$libName" - '' + lib.optionalString (stdenv.isDarwin && stdenv.isAarch64) '' + '' + lib.optionalString (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isAarch64) '' # dylib will be rejected unless dylib rpath gets explictly set install_name_tool \ -change $libName $out/lib/$libName \ @@ -84,7 +84,7 @@ else stdenv.mkDerivation rec { # Provide a setup hook that injects our library into every process. mkdir -p "$hook/nix-support" cat < "$hook/nix-support/setup-hook" - ${if stdenv.isDarwin then '' + ${if stdenv.hostPlatform.isDarwin then '' export DYLD_INSERT_LIBRARIES="$out/lib/$libName" '' else '' export LD_PRELOAD="$out/lib/$libName" diff --git a/pkgs/build-support/mitm-cache/default.nix b/pkgs/build-support/mitm-cache/default.nix index dd44a7ddca9a..e3bce225b46b 100644 --- a/pkgs/build-support/mitm-cache/default.nix +++ b/pkgs/build-support/mitm-cache/default.nix @@ -20,7 +20,7 @@ rustPlatform.buildRustPackage rec { hash = "sha256-l9dnyA4Zo4jlbiCMRzUqW3NkiploVpmvxz9i896JkXU="; }; - buildInputs = lib.optionals stdenv.isDarwin [ + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ Security ]; diff --git a/pkgs/build-support/node/build-npm-package/default.nix b/pkgs/build-support/node/build-npm-package/default.nix index 4bcbf3f14f2f..52b4f5a30e2a 100644 --- a/pkgs/build-support/node/build-npm-package/default.nix +++ b/pkgs/build-support/node/build-npm-package/default.nix @@ -76,7 +76,7 @@ stdenv.mkDerivation (args // { (if npmInstallHook != null then npmInstallHook else npmHooks.npmInstallHook) nodejs.python ] - ++ lib.optionals stdenv.isDarwin [ cctools ]; + ++ lib.optionals stdenv.hostPlatform.isDarwin [ cctools ]; buildInputs = buildInputs ++ [ nodejs ]; strictDeps = true; diff --git a/pkgs/build-support/rust/build-rust-crate/default.nix b/pkgs/build-support/rust/build-rust-crate/default.nix index 313e7601f617..db9c2d784f6b 100644 --- a/pkgs/build-support/rust/build-rust-crate/default.nix +++ b/pkgs/build-support/rust/build-rust-crate/default.nix @@ -283,7 +283,7 @@ crate_: lib.makeOverridable ++ lib.optionals stdenv.hasCC [ stdenv.cc ] ++ lib.optionals stdenv.buildPlatform.isDarwin [ libiconv ] ++ (crate.nativeBuildInputs or [ ]) ++ nativeBuildInputs_; - buildInputs = lib.optionals stdenv.isDarwin [ libiconv ] ++ (crate.buildInputs or [ ]) ++ buildInputs_; + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ libiconv ] ++ (crate.buildInputs or [ ]) ++ buildInputs_; dependencies = map lib.getLib dependencies_; buildDependencies = map lib.getLib buildDependencies_; diff --git a/pkgs/build-support/rust/build-rust-crate/test/default.nix b/pkgs/build-support/rust/build-rust-crate/test/default.nix index dd135af91965..6069ef802dde 100644 --- a/pkgs/build-support/rust/build-rust-crate/test/default.nix +++ b/pkgs/build-support/rust/build-rust-crate/test/default.nix @@ -529,7 +529,7 @@ let # Note: On darwin (which defaults to clang) we have to add # `-undefined dynamic_lookup` as otherwise the compilation fails. $CC -shared \ - ${lib.optionalString stdenv.isDarwin "-undefined dynamic_lookup"} \ + ${lib.optionalString stdenv.hostPlatform.isDarwin "-undefined dynamic_lookup"} \ -o $out/lib/${name}${stdenv.hostPlatform.extensions.library} ${src} ''; b = compile "libb" '' @@ -626,7 +626,7 @@ let }; expectedFiles = [ "./bin/test_binary1" - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ # On Darwin, the debug symbols are in a separate directory. "./bin/test_binary1.dSYM/Contents/Info.plist" "./bin/test_binary1.dSYM/Contents/Resources/DWARF/test_binary1" diff --git a/pkgs/build-support/rust/default-crate-overrides.nix b/pkgs/build-support/rust/default-crate-overrides.nix index 126be2ad99eb..21ca75357fbb 100644 --- a/pkgs/build-support/rust/default-crate-overrides.nix +++ b/pkgs/build-support/rust/default-crate-overrides.nix @@ -72,7 +72,7 @@ in cargo = attrs: { buildInputs = [ openssl zlib curl ] - ++ lib.optionals stdenv.isDarwin [ CoreFoundation Security ]; + ++ lib.optionals stdenv.hostPlatform.isDarwin [ CoreFoundation Security ]; }; libz-sys = attrs: { @@ -281,7 +281,7 @@ in }; security-framework-sys = attr: { - propagatedBuildInputs = lib.optional stdenv.isDarwin Security; + propagatedBuildInputs = lib.optional stdenv.hostPlatform.isDarwin Security; }; sequoia-openpgp = attrs: { @@ -320,7 +320,7 @@ in }; serde_derive = attrs: { - buildInputs = lib.optional stdenv.isDarwin Security; + buildInputs = lib.optional stdenv.hostPlatform.isDarwin Security; }; servo-fontconfig-sys = attrs: { diff --git a/pkgs/build-support/rust/lib/default.nix b/pkgs/build-support/rust/lib/default.nix index 446760840732..322974854878 100644 --- a/pkgs/build-support/rust/lib/default.nix +++ b/pkgs/build-support/rust/lib/default.nix @@ -15,7 +15,7 @@ rec { envVars = let # As a workaround for https://github.com/rust-lang/rust/issues/89626 use lld on pkgsStatic aarch64 - shouldUseLLD = platform: platform.isAarch64 && platform.isStatic && !stdenv.isDarwin; + shouldUseLLD = platform: platform.isAarch64 && platform.isStatic && !stdenv.hostPlatform.isDarwin; ccForBuild = "${pkgsBuildHost.stdenv.cc}/bin/${pkgsBuildHost.stdenv.cc.targetPrefix}cc"; cxxForBuild = "${pkgsBuildHost.stdenv.cc}/bin/${pkgsBuildHost.stdenv.cc.targetPrefix}c++"; diff --git a/pkgs/build-support/rust/test/import-cargo-lock/git-dependency-rev-non-workspace-nested-crate/default.nix b/pkgs/build-support/rust/test/import-cargo-lock/git-dependency-rev-non-workspace-nested-crate/default.nix index 63e3bea3ca1f..b616b293fa39 100644 --- a/pkgs/build-support/rust/test/import-cargo-lock/git-dependency-rev-non-workspace-nested-crate/default.nix +++ b/pkgs/build-support/rust/test/import-cargo-lock/git-dependency-rev-non-workspace-nested-crate/default.nix @@ -21,7 +21,7 @@ rustPlatform.buildRustPackage { buildInputs = [ openssl - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.Security ]; diff --git a/pkgs/build-support/setup-hooks/wrap-gapps-hook/default.nix b/pkgs/build-support/setup-hooks/wrap-gapps-hook/default.nix index 69f9f3b145d7..b2ce7b4b2654 100644 --- a/pkgs/build-support/setup-hooks/wrap-gapps-hook/default.nix +++ b/pkgs/build-support/setup-hooks/wrap-gapps-hook/default.nix @@ -35,7 +35,7 @@ makeSetupHook { # TODO: remove this, packages should depend on GTK explicitly. gtk3 - ] ++ lib.optionals (!stdenv.isDarwin) [ + ] ++ lib.optionals (!stdenv.hostPlatform.isDarwin) [ # It is highly probable that a program will use GSettings, # at minimum through GTK file chooser dialogue. # Let’s add a GIO module for “dconf” GSettings backend @@ -68,7 +68,7 @@ makeSetupHook { basic-contains-dconf = let tested = basic; in testLib.runTest "basic-contains-dconf" ( - testLib.skip stdenv.isDarwin '' + testLib.skip stdenv.hostPlatform.isDarwin '' ${expectSomeLineContainingYInFileXToMentionZ "${tested}/bin/foo" "GIO_EXTRA_MODULES" "${dconf.lib}/lib/gio/modules"} ${expectSomeLineContainingYInFileXToMentionZ "${tested}/libexec/bar" "GIO_EXTRA_MODULES" "${dconf.lib}/lib/gio/modules"} '' @@ -77,7 +77,7 @@ makeSetupHook { basic-contains-gdk-pixbuf = let tested = basic; in testLib.runTest "basic-contains-gdk-pixbuf" ( - testLib.skip stdenv.isDarwin '' + testLib.skip stdenv.hostPlatform.isDarwin '' ${expectSomeLineContainingYInFileXToMentionZ "${tested}/bin/foo" "GDK_PIXBUF_MODULE_FILE" "${lib.getLib librsvg}/lib/gdk-pixbuf-2.0/2.10.0/loaders.cache"} ${expectSomeLineContainingYInFileXToMentionZ "${tested}/libexec/bar" "GDK_PIXBUF_MODULE_FILE" "${lib.getLib librsvg}/lib/gdk-pixbuf-2.0/2.10.0/loaders.cache"} '' diff --git a/pkgs/build-support/writers/scripts.nix b/pkgs/build-support/writers/scripts.nix index 81a88391f324..999c8b4f2ae4 100644 --- a/pkgs/build-support/writers/scripts.nix +++ b/pkgs/build-support/writers/scripts.nix @@ -131,7 +131,7 @@ rec { # On darwin a script cannot be used as an interpreter in a shebang but # there doesn't seem to be a limit to the size of shebang and multiple # arguments to the interpreter are allowed. - if [[ -n "${toString pkgs.stdenvNoCC.isDarwin}" ]] && isScript $interpreter + if [[ -n "${toString pkgs.stdenvNoCC.hostPlatform.isDarwin}" ]] && isScript $interpreter then wrapperInterpreterLine=$(head -1 "$interpreter" | tail -c+3) # Get first word from the line (note: xargs echo remove leading spaces) @@ -753,7 +753,7 @@ rec { strip ? true, }: let - darwinArgs = lib.optionals stdenv.isDarwin [ "-L${lib.getLib libiconv}/lib" ]; + darwinArgs = lib.optionals stdenv.hostPlatform.isDarwin [ "-L${lib.getLib libiconv}/lib" ]; in makeBinWriter { compileScript = '' diff --git a/pkgs/by-name/_6/_64gram/package.nix b/pkgs/by-name/_6/_64gram/package.nix index 61b0536ce755..65ba3347eb48 100644 --- a/pkgs/by-name/_6/_64gram/package.nix +++ b/pkgs/by-name/_6/_64gram/package.nix @@ -41,6 +41,6 @@ telegram-desktop.overrideAttrs (old: rec { changelog = "https://github.com/TDesktop-x64/tdesktop/releases/tag/v${version}"; maintainers = with maintainers; [ clot27 ]; mainProgram = "telegram-desktop"; - broken = stdenv.isDarwin; + broken = stdenv.hostPlatform.isDarwin; }; }) diff --git a/pkgs/by-name/_9/_9base/package.nix b/pkgs/by-name/_9/_9base/package.nix index 580c0ad698dc..3d523c513eec 100644 --- a/pkgs/by-name/_9/_9base/package.nix +++ b/pkgs/by-name/_9/_9base/package.nix @@ -75,6 +75,6 @@ stdenv.mkDerivation { platforms = platforms.unix; # needs additional work to support aarch64-darwin # due to usage of _DARWIN_NO_64_BIT_INODE - broken = stdenv.isAarch64 && stdenv.isDarwin; + broken = stdenv.hostPlatform.isAarch64 && stdenv.hostPlatform.isDarwin; }; } diff --git a/pkgs/by-name/a5/a52dec/package.nix b/pkgs/by-name/a5/a52dec/package.nix index 048b96787a79..53cecb99ef7e 100644 --- a/pkgs/by-name/a5/a52dec/package.nix +++ b/pkgs/by-name/a5/a52dec/package.nix @@ -29,9 +29,9 @@ stdenv.mkDerivation rec { # fails 1 out of 1 tests with "BAD GLOBAL SYMBOLS" on i686 # which can also be fixed with - # hardeningDisable = lib.optional stdenv.isi686 "pic"; + # hardeningDisable = lib.optional stdenv.hostPlatform.isi686 "pic"; # but it's better to disable tests than loose ASLR on i686 - doCheck = !stdenv.isi686; + doCheck = !stdenv.hostPlatform.isi686; meta = with lib; { description = "ATSC A/52 stream decoder"; diff --git a/pkgs/by-name/ab/abctl/package.nix b/pkgs/by-name/ab/abctl/package.nix index 226587b0b005..bd1464c550e8 100644 --- a/pkgs/by-name/ab/abctl/package.nix +++ b/pkgs/by-name/ab/abctl/package.nix @@ -27,6 +27,6 @@ buildGoModule { license = lib.licenses.mit; maintainers = with lib.maintainers; [ xelden ]; mainProgram = "abctl"; - broken = stdenv.isDarwin; + broken = stdenv.hostPlatform.isDarwin; }; } diff --git a/pkgs/by-name/ac/acpica-tools/package.nix b/pkgs/by-name/ac/acpica-tools/package.nix index b11e95be6edc..11e6f1f454c7 100644 --- a/pkgs/by-name/ac/acpica-tools/package.nix +++ b/pkgs/by-name/ac/acpica-tools/package.nix @@ -42,7 +42,7 @@ stdenv.mkDerivation rec { # We can handle stripping ourselves. # Unless we are on Darwin. Upstream makefiles degrade coreutils install to cp if _APPLE is detected. - INSTALLFLAGS = lib.optionals (!stdenv.isDarwin) "-m 555"; + INSTALLFLAGS = lib.optionals (!stdenv.hostPlatform.isDarwin) "-m 555"; installFlags = [ "PREFIX=${placeholder "out"}" ]; diff --git a/pkgs/by-name/ae/aegisub/package.nix b/pkgs/by-name/ae/aegisub/package.nix index 7107d548410d..da6bd3107312 100644 --- a/pkgs/by-name/ae/aegisub/package.nix +++ b/pkgs/by-name/ae/aegisub/package.nix @@ -38,10 +38,10 @@ wxGTK, zlib, # Boolean guard flags - alsaSupport ? stdenv.isLinux, + alsaSupport ? stdenv.hostPlatform.isLinux, openalSupport ? true, portaudioSupport ? true, - pulseaudioSupport ? config.pulseaudio or stdenv.isLinux, + pulseaudioSupport ? config.pulseaudio or stdenv.hostPlatform.isLinux, spellcheckSupport ? true, useBundledLuaJIT ? false, }: @@ -102,12 +102,12 @@ stdenv.mkDerivation (finalAttrs: { ] ++ lib.optionals alsaSupport [ alsa-lib ] ++ lib.optionals openalSupport [ - (if stdenv.isDarwin then OpenAL else openal) + (if stdenv.hostPlatform.isDarwin then OpenAL else openal) ] ++ lib.optionals portaudioSupport [ portaudio ] ++ lib.optionals pulseaudioSupport [ libpulseaudio ] ++ lib.optionals spellcheckSupport [ hunspell ] - ++ lib.optionals stdenv.isDarwin [ + ++ lib.optionals stdenv.hostPlatform.isDarwin [ AppKit Carbon Cocoa diff --git a/pkgs/by-name/ag/agate/package.nix b/pkgs/by-name/ag/agate/package.nix index 8d83b45bec78..1d2763dd324a 100644 --- a/pkgs/by-name/ag/agate/package.nix +++ b/pkgs/by-name/ag/agate/package.nix @@ -28,7 +28,7 @@ rustPlatform.buildRustPackage rec { buildInputs = [ openssl ] - ++ lib.optionals stdenv.isDarwin [ + ++ lib.optionals stdenv.hostPlatform.isDarwin [ libiconv darwin.apple_sdk.frameworks.Security ]; diff --git a/pkgs/by-name/ag/age-plugin-fido2-hmac/package.nix b/pkgs/by-name/ag/age-plugin-fido2-hmac/package.nix index eec840ef2197..6c9571a64d05 100644 --- a/pkgs/by-name/ag/age-plugin-fido2-hmac/package.nix +++ b/pkgs/by-name/ag/age-plugin-fido2-hmac/package.nix @@ -39,7 +39,7 @@ buildGoModule rec { buildInputs = [ libfido2 ]; - postConfigure = lib.optional stdenv.isDarwin darwin_configure; + postConfigure = lib.optional stdenv.hostPlatform.isDarwin darwin_configure; meta = with lib; { description = "Age plugin to encrypt files with fido2 tokens using the hmac-secret extension and non-discoverable credentials"; diff --git a/pkgs/by-name/ai/aiken/package.nix b/pkgs/by-name/ai/aiken/package.nix index 1f8186ef0015..61c66fda313a 100644 --- a/pkgs/by-name/ai/aiken/package.nix +++ b/pkgs/by-name/ai/aiken/package.nix @@ -23,7 +23,7 @@ rustPlatform.buildRustPackage rec { buildInputs = [ openssl ] - ++ lib.optionals stdenv.isDarwin ( + ++ lib.optionals stdenv.hostPlatform.isDarwin ( with darwin.apple_sdk.frameworks; [ Security diff --git a/pkgs/by-name/al/aligator/package.nix b/pkgs/by-name/al/aligator/package.nix index 53346434be78..e7cb03a8771e 100644 --- a/pkgs/by-name/al/aligator/package.nix +++ b/pkgs/by-name/al/aligator/package.nix @@ -42,7 +42,7 @@ stdenv.mkDerivation (finalAttrs: { graphviz pkg-config ] ++ lib.optional pythonSupport python3Packages.pythonImportsCheckHook; - buildInputs = [ fmt ] ++ lib.optional stdenv.isDarwin llvmPackages.openmp; + buildInputs = [ fmt ] ++ lib.optional stdenv.hostPlatform.isDarwin llvmPackages.openmp; propagatedBuildInputs = [ suitesparse ] ++ lib.optionals pythonSupport [ diff --git a/pkgs/by-name/am/amazon-ssm-agent/package.nix b/pkgs/by-name/am/amazon-ssm-agent/package.nix index e19669d546b0..19fc0673355b 100644 --- a/pkgs/by-name/am/amazon-ssm-agent/package.nix +++ b/pkgs/by-name/am/amazon-ssm-agent/package.nix @@ -63,7 +63,7 @@ buildGoModule rec { nativeBuildInputs = [ makeWrapper - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ darwin.DarwinTools ]; @@ -95,7 +95,7 @@ buildGoModule rec { --replace-fail "/sbin/shutdown" "shutdown" echo "${version}" > VERSION - '' + lib.optionalString stdenv.isLinux '' + '' + lib.optionalString stdenv.hostPlatform.isLinux '' substituteInPlace agent/managedInstances/fingerprint/hardwareInfo_unix.go \ --replace-fail /usr/sbin/dmidecode ${dmidecode}/bin/dmidecode ''; diff --git a/pkgs/by-name/am/amfora/package.nix b/pkgs/by-name/am/amfora/package.nix index 8e9f69b0afc4..9b658386725e 100644 --- a/pkgs/by-name/am/amfora/package.nix +++ b/pkgs/by-name/am/amfora/package.nix @@ -13,7 +13,7 @@ buildGoModule rec { vendorHash = "sha256-T/hnlQMDOZV+QGl7xp29sBGfb4VXcXqN6PDoBFdpp4M="; - postInstall = lib.optionalString (!stdenv.isDarwin) '' + postInstall = lib.optionalString (!stdenv.hostPlatform.isDarwin) '' sed -i "s:amfora:$out/bin/amfora:" amfora.desktop install -Dm644 amfora.desktop -t $out/share/applications ''; diff --git a/pkgs/by-name/am/amp/package.nix b/pkgs/by-name/am/amp/package.nix index ebb662ee11c8..2d0890b63d67 100644 --- a/pkgs/by-name/am/amp/package.nix +++ b/pkgs/by-name/am/amp/package.nix @@ -39,7 +39,7 @@ rustPlatform.buildRustPackage rec { xorg.libxcb libgit2 ] - ++ lib.optionals stdenv.isDarwin ( + ++ lib.optionals stdenv.hostPlatform.isDarwin ( with darwin.apple_sdk.frameworks; [ curl diff --git a/pkgs/by-name/an/anchor/package.nix b/pkgs/by-name/an/anchor/package.nix index 2f4d95b732bb..40276f51a2b0 100644 --- a/pkgs/by-name/an/anchor/package.nix +++ b/pkgs/by-name/an/anchor/package.nix @@ -24,7 +24,7 @@ rustPlatform.buildRustPackage rec { }; }; - buildInputs = lib.optionals stdenv.isDarwin [ + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.Security darwin.apple_sdk.frameworks.SystemConfiguration ]; diff --git a/pkgs/by-name/an/android-studio-tools/package.nix b/pkgs/by-name/an/android-studio-tools/package.nix index 06af624a8e26..2b1bca479841 100644 --- a/pkgs/by-name/an/android-studio-tools/package.nix +++ b/pkgs/by-name/an/android-studio-tools/package.nix @@ -19,7 +19,7 @@ stdenvNoCC.mkDerivation { postPatch = '' find . -type f -not -path "./bin/*" -exec chmod -x {} \; - '' + lib.optionalString stdenvNoCC.isDarwin '' + '' + lib.optionalString stdenvNoCC.hostPlatform.isDarwin '' for f in cmdline-tools/bin/*; do sed -i 's|start up script for Linux|start up script for Mac|' $f done diff --git a/pkgs/by-name/an/anyrun/package.nix b/pkgs/by-name/an/anyrun/package.nix index 624beb87fe33..d7712ea43e12 100644 --- a/pkgs/by-name/an/anyrun/package.nix +++ b/pkgs/by-name/an/anyrun/package.nix @@ -46,9 +46,9 @@ rustPlatform.buildRustPackage rec { gtk3 gtk-layer-shell pango - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.Security - ] ++ lib.optionals stdenv.isLinux [ + ] ++ lib.optionals stdenv.hostPlatform.isLinux [ wayland ]; diff --git a/pkgs/by-name/ar/arcan/package.nix b/pkgs/by-name/ar/arcan/package.nix index d472b9f13228..b31d642c703e 100644 --- a/pkgs/by-name/ar/arcan/package.nix +++ b/pkgs/by-name/ar/arcan/package.nix @@ -48,7 +48,7 @@ # Boolean flags buildManPages ? true, useBuiltinLua ? true, - useEspeak ? !stdenv.isDarwin, + useEspeak ? !stdenv.hostPlatform.isDarwin, useStaticLibuvc ? true, useStaticOpenAL ? true, useStaticSqlite ? true, diff --git a/pkgs/by-name/ar/arduino-cli/package.nix b/pkgs/by-name/ar/arduino-cli/package.nix index 8d01ae38e3ec..4eb9cabebac8 100644 --- a/pkgs/by-name/ar/arduino-cli/package.nix +++ b/pkgs/by-name/ar/arduino-cli/package.nix @@ -47,7 +47,7 @@ let --replace-fail "go test" "go test -p $NIX_BUILD_CORES -skip '(${lib.concatStringsSep "|" skipTests})'" ''; - doCheck = stdenv.isLinux; + doCheck = stdenv.hostPlatform.isLinux; checkPhase = '' runHook preCheck @@ -60,7 +60,7 @@ let "-w" "-X github.com/arduino/arduino-cli/version.versionString=${version}" "-X github.com/arduino/arduino-cli/version.commit=unknown" - ] ++ lib.optionals stdenv.isLinux [ "-extldflags '-static'" ]; + ] ++ lib.optionals stdenv.hostPlatform.isLinux [ "-extldflags '-static'" ]; postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) '' export HOME="$(mktemp -d)" @@ -89,7 +89,7 @@ let }; in -if stdenv.isLinux then +if stdenv.hostPlatform.isLinux then # buildFHSEnv is needed because the arduino-cli downloads compiler # toolchains from the internet that have their interpreters pointed at # /lib64/ld-linux-x86-64.so.2 diff --git a/pkgs/by-name/ar/armitage/package.nix b/pkgs/by-name/ar/armitage/package.nix index 411d503728b5..7d704633a360 100644 --- a/pkgs/by-name/ar/armitage/package.nix +++ b/pkgs/by-name/ar/armitage/package.nix @@ -68,7 +68,7 @@ stdenv.mkDerivation (finalAttrs: { gradle makeWrapper copyDesktopItems - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ writeDarwinBundle ]; @@ -98,7 +98,7 @@ stdenv.mkDerivation (finalAttrs: { --prefix PATH : "${lib.makeBinPath [ jdk11 metasploit ]}" install -Dm444 dist/unix/armitage-logo.png $out/share/pixmaps/armitage.png - ${lib.optionalString stdenv.isDarwin '' + ${lib.optionalString stdenv.hostPlatform.isDarwin '' mkdir -p "$out/Applications/Armitage.app/Contents/MacOS" mkdir -p "$out/Applications/Armitage.app/Contents/Resources" cp dist/mac/Armitage.app/Contents/Resources/macIcon.icns $out/Applications/Armitage.app/Contents/Resources diff --git a/pkgs/by-name/ar/arrow-cpp/package.nix b/pkgs/by-name/ar/arrow-cpp/package.nix index 1abfe6f3b701..04a5678f38f1 100644 --- a/pkgs/by-name/ar/arrow-cpp/package.nix +++ b/pkgs/by-name/ar/arrow-cpp/package.nix @@ -50,13 +50,13 @@ testers, enableShared ? !stdenv.hostPlatform.isStatic, enableFlight ? true, - enableJemalloc ? !stdenv.isDarwin, + enableJemalloc ? !stdenv.hostPlatform.isDarwin, enableS3 ? true, - enableGcs ? !stdenv.isDarwin, + enableGcs ? !stdenv.hostPlatform.isDarwin, }: assert lib.asserts.assertMsg ( - (enableS3 && stdenv.isDarwin) + (enableS3 && stdenv.hostPlatform.isDarwin) -> (lib.versionOlder boost.version "1.69" || lib.versionAtLeast boost.version "1.70") ) "S3 on Darwin requires Boost != 1.69"; @@ -128,7 +128,7 @@ stdenv.mkDerivation (finalAttrs: { ninja autoconf # for vendored jemalloc flatbuffers - ] ++ lib.optional stdenv.isDarwin fixDarwinDylibNames; + ] ++ lib.optional stdenv.hostPlatform.isDarwin fixDarwinDylibNames; buildInputs = [ boost @@ -218,10 +218,10 @@ stdenv.mkDerivation (finalAttrs: { "-DPARQUET_REQUIRE_ENCRYPTION=ON" ] ++ lib.optionals (!enableShared) [ "-DARROW_TEST_LINKAGE=static" ] - ++ lib.optionals stdenv.isDarwin [ + ++ lib.optionals stdenv.hostPlatform.isDarwin [ "-DCMAKE_INSTALL_RPATH=@loader_path/../lib" # needed for tools executables ] - ++ lib.optionals (!stdenv.isx86_64) [ "-DARROW_USE_SIMD=OFF" ] + ++ lib.optionals (!stdenv.hostPlatform.isx86_64) [ "-DARROW_USE_SIMD=OFF" ] ++ lib.optionals enableS3 [ "-DAWSSDK_CORE_HEADER_FILE=${aws-sdk-cpp-arrow}/include/aws/core/Aws.h" ]; @@ -247,7 +247,7 @@ stdenv.mkDerivation (finalAttrs: { "TestS3FS.*" "TestS3FSGeneric.*" ] - ++ lib.optionals stdenv.isDarwin [ + ++ lib.optionals stdenv.hostPlatform.isDarwin [ # TODO: revisit at 12.0.0 or when # https://github.com/apache/arrow/commit/295c6644ca6b67c95a662410b2c7faea0920c989 # is available, see diff --git a/pkgs/by-name/as/asfa/package.nix b/pkgs/by-name/as/asfa/package.nix index 428a4e4fda42..e9be2526dd72 100644 --- a/pkgs/by-name/as/asfa/package.nix +++ b/pkgs/by-name/as/asfa/package.nix @@ -31,7 +31,7 @@ rustPlatform.buildRustPackage { buildInputs = [ openssl - ] ++ lib.optionals stdenv.isDarwin [ darwin.apple_sdk.frameworks.SystemConfiguration ]; + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.SystemConfiguration ]; nativeBuildInputs = [ help2man diff --git a/pkgs/by-name/as/asl/package.nix b/pkgs/by-name/as/asl/package.nix index 5a7ca869278a..f6cbe3f46b66 100644 --- a/pkgs/by-name/as/asl/package.nix +++ b/pkgs/by-name/as/asl/package.nix @@ -21,7 +21,7 @@ stdenv.mkDerivation (finalAttrs: { postPatch = lib.optionalString (!buildDocs) '' substituteInPlace Makefile --replace "all: binaries docs" "all: binaries" - '' + lib.optionalString (stdenv.isDarwin && stdenv.isAarch64) '' + '' + lib.optionalString (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isAarch64) '' substituteInPlace sysdefs.h --replace "x86_64" "aarch64" ''; diff --git a/pkgs/by-name/at/atac/package.nix b/pkgs/by-name/at/atac/package.nix index 2a8ce471e2e1..000b41b1b904 100644 --- a/pkgs/by-name/at/atac/package.nix +++ b/pkgs/by-name/at/atac/package.nix @@ -28,7 +28,7 @@ rustPlatform.buildRustPackage rec { [ oniguruma ] - ++ lib.optionals stdenv.isDarwin [ + ++ lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.AppKit darwin.apple_sdk.frameworks.Security darwin.apple_sdk.frameworks.SystemConfiguration diff --git a/pkgs/by-name/at/atf/package.nix b/pkgs/by-name/at/atf/package.nix index e77eb5244d6c..5edb2d6366b8 100644 --- a/pkgs/by-name/at/atf/package.nix +++ b/pkgs/by-name/at/atf/package.nix @@ -42,12 +42,12 @@ stdenv.mkDerivation (finalAttrs: { --replace-fail 'atf_test_program{name="srcdir_test"}' "" '' # These tests fail on Darwin. - + lib.optionalString (finalAttrs.doInstallCheck && stdenv.isDarwin) '' + + lib.optionalString (finalAttrs.doInstallCheck && stdenv.hostPlatform.isDarwin) '' substituteInPlace atf-c/detail/process_test.c \ --replace-fail 'ATF_TP_ADD_TC(tp, status_coredump);' "" '' # This test fails on Linux. - + lib.optionalString (finalAttrs.doInstallCheck && stdenv.isLinux) '' + + lib.optionalString (finalAttrs.doInstallCheck && stdenv.hostPlatform.isLinux) '' substituteInPlace atf-c/detail/fs_test.c \ --replace-fail 'ATF_TP_ADD_TC(tp, eaccess);' "" ''; diff --git a/pkgs/by-name/at/atlauncher/package.nix b/pkgs/by-name/at/atlauncher/package.nix index 838df85a5782..a276dff1c787 100644 --- a/pkgs/by-name/at/atlauncher/package.nix +++ b/pkgs/by-name/at/atlauncher/package.nix @@ -6,8 +6,8 @@ makeWrapper, stdenvNoCC, - gamemodeSupport ? stdenvNoCC.isLinux, - textToSpeechSupport ? stdenvNoCC.isLinux, + gamemodeSupport ? stdenvNoCC.hostPlatform.isLinux, + textToSpeechSupport ? stdenvNoCC.hostPlatform.isLinux, additionalLibs ? [ ], # dependencies diff --git a/pkgs/by-name/at/attic-client/package.nix b/pkgs/by-name/at/attic-client/package.nix index e9b89cf6d54b..aa84bd2a122f 100644 --- a/pkgs/by-name/at/attic-client/package.nix +++ b/pkgs/by-name/at/attic-client/package.nix @@ -28,7 +28,7 @@ rustPlatform.buildRustPackage { buildInputs = [ nix boost - ] ++ lib.optionals stdenv.isDarwin (with darwin.apple_sdk.frameworks; [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin (with darwin.apple_sdk.frameworks; [ SystemConfiguration ]); diff --git a/pkgs/by-name/at/attract-mode/package.nix b/pkgs/by-name/at/attract-mode/package.nix index 87328a78ce6f..21be9ce31441 100644 --- a/pkgs/by-name/at/attract-mode/package.nix +++ b/pkgs/by-name/at/attract-mode/package.nix @@ -40,11 +40,11 @@ stdenv.mkDerivation { sfml zlib ] - ++ lib.optionals (!stdenv.isDarwin) [ + ++ lib.optionals (!stdenv.hostPlatform.isDarwin) [ openal fontconfig ] - ++ lib.optionals stdenv.isDarwin [ + ++ lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.Cocoa darwin.apple_sdk.frameworks.Carbon darwin.apple_sdk.frameworks.IOKit @@ -61,7 +61,7 @@ stdenv.mkDerivation { "PKG_CONFIG=${stdenv.cc.targetPrefix}pkg-config" "AR=${stdenv.cc.targetPrefix}ar" "BUILD_EXPAT=0" - ] ++ lib.optionals stdenv.isDarwin [ "USE_FONTCONFIG=0" ]; + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ "USE_FONTCONFIG=0" ]; enableParallelBuilding = true; diff --git a/pkgs/by-name/at/atuin/package.nix b/pkgs/by-name/at/atuin/package.nix index 9234e8866752..e50cdde161ef 100644 --- a/pkgs/by-name/at/atuin/package.nix +++ b/pkgs/by-name/at/atuin/package.nix @@ -22,7 +22,7 @@ rustPlatform.buildRustPackage rec { # TODO: unify this to one hash because updater do not support this cargoHash = - if stdenv.isLinux + if stdenv.hostPlatform.isLinux then "sha256-K4Vw/d0ZOROWujWr76I3QvfKefLhXLeFufUrgStAyjQ=" else "sha256-8NAfE7cGFT64ntNXK9RT0D/MbDJweN7vvsG/KlrY4K4="; @@ -35,7 +35,7 @@ rustPlatform.buildRustPackage rec { nativeBuildInputs = [ installShellFiles ]; - buildInputs = lib.optionals stdenv.isDarwin [ + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ libiconv darwin.apple_sdk_11_0.frameworks.AppKit darwin.apple_sdk_11_0.frameworks.Security diff --git a/pkgs/by-name/au/autopsy/package.nix b/pkgs/by-name/au/autopsy/package.nix index 72f5130a5109..a2693eb5b8bc 100644 --- a/pkgs/by-name/au/autopsy/package.nix +++ b/pkgs/by-name/au/autopsy/package.nix @@ -1,6 +1,6 @@ { stdenv, lib, makeWrapper, fetchzip, testdisk, imagemagick, jdk, findutils, sleuthkit, ... }: let - jdkWithJfx = jdk.override (lib.optionalAttrs stdenv.isLinux { + jdkWithJfx = jdk.override (lib.optionalAttrs stdenv.hostPlatform.isLinux { enableJavaFX = true; }); in diff --git a/pkgs/by-name/av/avbroot/package.nix b/pkgs/by-name/av/avbroot/package.nix index 8e992e5c3a36..cc7fe1494e65 100644 --- a/pkgs/by-name/av/avbroot/package.nix +++ b/pkgs/by-name/av/avbroot/package.nix @@ -33,7 +33,7 @@ rustPlatform.buildRustPackage rec { protobuf ]; - buildInputs = [ bzip2 ] ++ lib.optionals stdenv.isDarwin [ darwin.apple_sdk.frameworks.Security ]; + buildInputs = [ bzip2 ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.Security ]; meta = { description = "Sign (and root) Android A/B OTAs with custom keys while preserving Android Verified Boot"; diff --git a/pkgs/by-name/aw/aws-sso-cli/package.nix b/pkgs/by-name/aw/aws-sso-cli/package.nix index 6e5b72b1f2d3..b77680f058f2 100644 --- a/pkgs/by-name/aw/aws-sso-cli/package.nix +++ b/pkgs/by-name/aw/aws-sso-cli/package.nix @@ -37,7 +37,7 @@ buildGoModule rec { "TestAWSConsoleUrl" "TestAWSFederatedUrl" "TestServerWithSSL" # https://github.com/synfinatic/aws-sso-cli/issues/1030 -- remove when version >= 2.x - ] ++ lib.optionals stdenv.isDarwin [ "TestDetectShellBash" ]; + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ "TestDetectShellBash" ]; in [ "-skip=^${builtins.concatStringsSep "$|^" skippedTests}$" ]; diff --git a/pkgs/by-name/aw/aws-vault/package.nix b/pkgs/by-name/aw/aws-vault/package.nix index e503848f10b2..a99ed43ea7c0 100644 --- a/pkgs/by-name/aw/aws-vault/package.nix +++ b/pkgs/by-name/aw/aws-vault/package.nix @@ -24,7 +24,7 @@ buildGoModule rec { postInstall = '' # make xdg-open overrideable at runtime # aws-vault uses https://github.com/skratchdot/open-golang/blob/master/open/open.go to open links - ${lib.optionalString (!stdenv.isDarwin) "wrapProgram $out/bin/aws-vault --suffix PATH : ${lib.makeBinPath [ xdg-utils ]}"} + ${lib.optionalString (!stdenv.hostPlatform.isDarwin) "wrapProgram $out/bin/aws-vault --suffix PATH : ${lib.makeBinPath [ xdg-utils ]}"} installShellCompletion --cmd aws-vault \ --bash $src/contrib/completions/bash/aws-vault.bash \ --fish $src/contrib/completions/fish/aws-vault.fish \ diff --git a/pkgs/by-name/az/azure-cli/package.nix b/pkgs/by-name/az/azure-cli/package.nix index 2a73b3da9fac..d9bfd888dd7b 100644 --- a/pkgs/by-name/az/azure-cli/package.nix +++ b/pkgs/by-name/az/azure-cli/package.nix @@ -191,7 +191,7 @@ py.pkgs.toPythonApplication ( chardet colorama ] - ++ lib.optional stdenv.isLinux distro + ++ lib.optional stdenv.hostPlatform.isLinux distro ++ [ fabric javaproperties diff --git a/pkgs/by-name/az/azure-cli/python-packages.nix b/pkgs/by-name/az/azure-cli/python-packages.nix index 97e2d0b1922a..5bde74450419 100644 --- a/pkgs/by-name/az/azure-cli/python-packages.nix +++ b/pkgs/by-name/az/azure-cli/python-packages.nix @@ -69,7 +69,7 @@ let nativeCheckInputs = with self; [ pytest ]; - doCheck = stdenv.isLinux; + doCheck = stdenv.hostPlatform.isLinux; # ignore tests that does network call, or assume powershell checkPhase = '' diff --git a/pkgs/by-name/az/azurite/package.nix b/pkgs/by-name/az/azurite/package.nix index 8f70c247fc1e..de63807785f2 100644 --- a/pkgs/by-name/az/azurite/package.nix +++ b/pkgs/by-name/az/azurite/package.nix @@ -22,9 +22,9 @@ buildNpmPackage rec { npmDepsHash = "sha256-+ptjsz2MDIB/aqu4UxkBLCcehtamFdmswNUsHs23LuE="; nativeBuildInputs = [ pkg-config python3 ]; - buildInputs = lib.optionals stdenv.isLinux [ + buildInputs = lib.optionals stdenv.hostPlatform.isLinux [ libsecret - ] ++ lib.optionals stdenv.isDarwin (with darwin; [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin (with darwin; [ Security apple_sdk.frameworks.AppKit ]); diff --git a/pkgs/by-name/ba/barrage/package.nix b/pkgs/by-name/ba/barrage/package.nix index 497468cb489a..ff879e56924a 100644 --- a/pkgs/by-name/ba/barrage/package.nix +++ b/pkgs/by-name/ba/barrage/package.nix @@ -28,6 +28,6 @@ stdenv.mkDerivation (finalAttrs: { mainProgram = "barrage"; maintainers = with lib.maintainers; [ AndersonTorres ]; inherit (SDL.meta) platforms; - broken = stdenv.isDarwin; + broken = stdenv.hostPlatform.isDarwin; }; }) diff --git a/pkgs/by-name/ba/bat/package.nix b/pkgs/by-name/ba/bat/package.nix index 9e4132bc0b46..716ad80de725 100644 --- a/pkgs/by-name/ba/bat/package.nix +++ b/pkgs/by-name/ba/bat/package.nix @@ -24,7 +24,7 @@ rustPlatform.buildRustPackage rec { nativeBuildInputs = [ pkg-config installShellFiles makeWrapper ]; - buildInputs = lib.optionals stdenv.isDarwin [ libiconv darwin.apple_sdk.frameworks.Security ]; + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ libiconv darwin.apple_sdk.frameworks.Security ]; postInstall = '' installManPage $releaseDir/build/bat-*/out/assets/manual/bat.1 diff --git a/pkgs/by-name/ba/batmon/package.nix b/pkgs/by-name/ba/batmon/package.nix index 5e5cf3f6501f..0d51bc0ec83b 100644 --- a/pkgs/by-name/ba/batmon/package.nix +++ b/pkgs/by-name/ba/batmon/package.nix @@ -28,7 +28,7 @@ rustPlatform.buildRustPackage rec { license = licenses.asl20; mainProgram = "batmon"; platforms = with platforms; unix ++ windows; - broken = stdenv.isDarwin && stdenv.isAarch64; + broken = stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isAarch64; maintainers = with maintainers; [ _6543 ]; }; } diff --git a/pkgs/by-name/bc/bcc/package.nix b/pkgs/by-name/bc/bcc/package.nix index 3d2235a0a0b3..6cc3c1ce3360 100644 --- a/pkgs/by-name/bc/bcc/package.nix +++ b/pkgs/by-name/bc/bcc/package.nix @@ -22,7 +22,7 @@ python3Packages.buildPythonApplication rec { pname = "bcc"; version = "0.31.0"; - disabled = !stdenv.isLinux; + disabled = !stdenv.hostPlatform.isLinux; src = fetchFromGitHub { owner = "iovisor"; diff --git a/pkgs/by-name/bd/bdf2ttf/package.nix b/pkgs/by-name/bd/bdf2ttf/package.nix index c12100bb3662..399c07ee0b65 100644 --- a/pkgs/by-name/bd/bdf2ttf/package.nix +++ b/pkgs/by-name/bd/bdf2ttf/package.nix @@ -27,6 +27,6 @@ stdenv.mkDerivation { license = lib.licenses.mit; maintainers = with lib.maintainers; [ ners ]; platforms = lib.platforms.all; - broken = stdenv.isDarwin; + broken = stdenv.hostPlatform.isDarwin; }; } diff --git a/pkgs/by-name/bi/bicep/package.nix b/pkgs/by-name/bi/bicep/package.nix index d8246c545890..9cd6e1a07f15 100644 --- a/pkgs/by-name/bi/bicep/package.nix +++ b/pkgs/by-name/bi/bicep/package.nix @@ -30,7 +30,7 @@ buildDotnetModule rec { dotnet-runtime = dotnetCorePackages.runtime_8_0; - doCheck = !(stdenv.isDarwin && stdenv.isAarch64); # mono is not available on aarch64-darwin + doCheck = !(stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isAarch64); # mono is not available on aarch64-darwin nativeCheckInputs = [ mono ]; diff --git a/pkgs/by-name/bi/binsider/package.nix b/pkgs/by-name/bi/binsider/package.nix index 3b85edb9b6e7..b5a1b5503666 100644 --- a/pkgs/by-name/bi/binsider/package.nix +++ b/pkgs/by-name/bi/binsider/package.nix @@ -31,6 +31,6 @@ rustPlatform.buildRustPackage rec { ]; maintainers = with maintainers; [ samueltardieu ]; mainProgram = "binsider"; - broken = stdenv.isDarwin || stdenv.isAarch64; + broken = stdenv.hostPlatform.isDarwin || stdenv.hostPlatform.isAarch64; }; } diff --git a/pkgs/by-name/bi/biome/package.nix b/pkgs/by-name/bi/biome/package.nix index c37b4f6f66e5..678a1aa71fdb 100644 --- a/pkgs/by-name/bi/biome/package.nix +++ b/pkgs/by-name/bi/biome/package.nix @@ -33,7 +33,7 @@ rustPlatform.buildRustPackage rec { rust-jemalloc-sys zlib ] - ++ lib.optionals stdenv.isDarwin [ + ++ lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.Security ]; diff --git a/pkgs/by-name/bi/bite/package.nix b/pkgs/by-name/bi/bite/package.nix index de072e33d470..4dd9e4384142 100644 --- a/pkgs/by-name/bi/bite/package.nix +++ b/pkgs/by-name/bi/bite/package.nix @@ -60,14 +60,14 @@ rustPlatform.buildRustPackage rec { pango vulkan-loader ] - ++ lib.optionals stdenv.isDarwin [ + ++ lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.AppKit darwin.apple_sdk.frameworks.CoreGraphics darwin.apple_sdk.frameworks.Foundation darwin.apple_sdk.frameworks.Metal darwin.apple_sdk.frameworks.QuartzCore ] - ++ lib.optionals stdenv.isLinux [ + ++ lib.optionals stdenv.hostPlatform.isLinux [ wayland ]; @@ -76,7 +76,7 @@ rustPlatform.buildRustPackage rec { libxkbcommon vulkan-loader ] - ++ lib.optionals stdenv.isLinux [ + ++ lib.optionals stdenv.hostPlatform.isLinux [ wayland ]; @@ -105,6 +105,6 @@ rustPlatform.buildRustPackage rec { license = licenses.mit; maintainers = with maintainers; [vinnymeller]; mainProgram = "bite"; - broken = stdenv.isDarwin && stdenv.isx86_64; + broken = stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isx86_64; }; } diff --git a/pkgs/by-name/bi/bitwarden-cli/package.nix b/pkgs/by-name/bi/bitwarden-cli/package.nix index d6fa628ae91e..2fe5a8e36878 100644 --- a/pkgs/by-name/bi/bitwarden-cli/package.nix +++ b/pkgs/by-name/bi/bitwarden-cli/package.nix @@ -32,7 +32,7 @@ buildNpmPackage rec { nativeBuildInputs = [ (python3.withPackages (ps: with ps; [ setuptools ])) - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ cctools xcbuild.xcrun ]; diff --git a/pkgs/by-name/bl/blastem/package.nix b/pkgs/by-name/bl/blastem/package.nix index d1ba8d3cb826..2bdd9ed5f477 100644 --- a/pkgs/by-name/bl/blastem/package.nix +++ b/pkgs/by-name/bl/blastem/package.nix @@ -21,7 +21,7 @@ stdenv.mkDerivation (finalAttrs: { }; # will probably be fixed in https://github.com/NixOS/nixpkgs/pull/302481 - postPatch = lib.optionalString stdenv.isDarwin '' + postPatch = lib.optionalString stdenv.hostPlatform.isDarwin '' substituteInPlace Makefile \ --replace-fail "-flto" "" ''; diff --git a/pkgs/by-name/bl/bleep/package.nix b/pkgs/by-name/bl/bleep/package.nix index 190f971ffb82..19a007dd70aa 100644 --- a/pkgs/by-name/bl/bleep/package.nix +++ b/pkgs/by-name/bl/bleep/package.nix @@ -36,7 +36,7 @@ stdenvNoCC.mkDerivation (finalAttrs: { nativeBuildInputs = [ installShellFiles makeWrapper - ] ++ lib.optional stdenvNoCC.isLinux autoPatchelfHook; + ] ++ lib.optional stdenvNoCC.hostPlatform.isLinux autoPatchelfHook; buildInputs = [ zlib ]; @@ -49,7 +49,7 @@ stdenvNoCC.mkDerivation (finalAttrs: { dontAutoPatchelf = true; postFixup = - lib.optionalString stdenvNoCC.isLinux '' + lib.optionalString stdenvNoCC.hostPlatform.isLinux '' autoPatchelf $out '' + '' diff --git a/pkgs/by-name/bl/blockattack/package.nix b/pkgs/by-name/bl/blockattack/package.nix index 35b765920a0a..0e8a3cbc4d51 100644 --- a/pkgs/by-name/bl/blockattack/package.nix +++ b/pkgs/by-name/bl/blockattack/package.nix @@ -66,7 +66,7 @@ stdenv.mkDerivation (finalAttrs: { meta = { homepage = "https://blockattack.net/"; description = "Open source clone of Panel de Pon (aka Tetris Attack)"; - broken = stdenv.isDarwin; + broken = stdenv.hostPlatform.isDarwin; changelog = "https://github.com/blockattack/blockattack-game/blob/${finalAttrs.src.rev}/CHANGELOG.md"; license = with lib.licenses; [ gpl2Plus ]; mainProgram = "blockattack"; diff --git a/pkgs/by-name/bl/blockbench/package.nix b/pkgs/by-name/bl/blockbench/package.nix index a8458255c714..42d619d4302a 100644 --- a/pkgs/by-name/bl/blockbench/package.nix +++ b/pkgs/by-name/bl/blockbench/package.nix @@ -23,7 +23,7 @@ buildNpmPackage rec { nativeBuildInputs = [ makeWrapper ] - ++ lib.optionals (!stdenv.isDarwin) [ + ++ lib.optionals (!stdenv.hostPlatform.isDarwin) [ imagemagick # for icon resizing copyDesktopItems ]; @@ -33,7 +33,7 @@ buildNpmPackage rec { env.ELECTRON_SKIP_BINARY_DOWNLOAD = 1; # disable code signing on Darwin - postConfigure = lib.optionalString stdenv.isDarwin '' + postConfigure = lib.optionalString stdenv.hostPlatform.isDarwin '' export CSC_IDENTITY_AUTO_DISCOVERY=false sed -i "/afterSign/d" package.json ''; @@ -54,13 +54,13 @@ buildNpmPackage rec { installPhase = '' runHook preInstall - ${lib.optionalString stdenv.isDarwin '' + ${lib.optionalString stdenv.hostPlatform.isDarwin '' mkdir -p $out/Applications cp -r dist/mac*/Blockbench.app $out/Applications makeWrapper $out/Applications/Blockbench.app/Contents/MacOS/Blockbench $out/bin/blockbench ''} - ${lib.optionalString (!stdenv.isDarwin) '' + ${lib.optionalString (!stdenv.hostPlatform.isDarwin) '' mkdir -p $out/share/blockbench cp -r dist/*-unpacked/{locales,resources{,.pak}} $out/share/blockbench diff --git a/pkgs/by-name/bo/bochs/package.nix b/pkgs/by-name/bo/bochs/package.nix index 963f242d1ed7..ab06e54c484e 100644 --- a/pkgs/by-name/bo/bochs/package.nix +++ b/pkgs/by-name/bo/bochs/package.nix @@ -19,8 +19,8 @@ , wxGTK32 , enableSDL2 ? true , enableTerm ? true -, enableWx ? !stdenv.isDarwin -, enableX11 ? !stdenv.isDarwin +, enableWx ? !stdenv.hostPlatform.isDarwin +, enableX11 ? !stdenv.hostPlatform.isDarwin }: stdenv.mkDerivation (finalAttrs: { @@ -55,7 +55,7 @@ stdenv.mkDerivation (finalAttrs: { libGLU libX11 libXpm - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ darwin.libobjc ]; @@ -123,7 +123,7 @@ stdenv.mkDerivation (finalAttrs: { ] ++ lib.optionals enableX11 [ "--with-x" "--with-x11" - ] ++ lib.optionals (!stdenv.isDarwin) [ + ] ++ lib.optionals (!stdenv.hostPlatform.isDarwin) [ "--enable-e1000" "--enable-es1370" "--enable-ne2000" diff --git a/pkgs/by-name/bo/boehmgc/package.nix b/pkgs/by-name/bo/boehmgc/package.nix index 4a5418a3206b..1c46aea7f9ca 100644 --- a/pkgs/by-name/bo/boehmgc/package.nix +++ b/pkgs/by-name/bo/boehmgc/package.nix @@ -21,7 +21,7 @@ stdenv.mkDerivation (finalAttrs: { }; outputs = [ "out" "dev" "doc" ]; - separateDebugInfo = stdenv.isLinux && stdenv.hostPlatform.libc != "musl"; + separateDebugInfo = stdenv.hostPlatform.isLinux && stdenv.hostPlatform.libc != "musl"; nativeBuildInputs = [ autoreconfHook @@ -52,7 +52,7 @@ stdenv.mkDerivation (finalAttrs: { # `gctest` fails under x86_64 emulation on aarch64-darwin # and also on aarch64-linux (qemu-user) - doCheck = !((stdenv.isDarwin && stdenv.isx86_64) || (stdenv.isLinux && stdenv.isAarch64)); + doCheck = !((stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isx86_64) || (stdenv.hostPlatform.isLinux && stdenv.hostPlatform.isAarch64)); enableParallelBuilding = true; diff --git a/pkgs/by-name/bo/boinctui/package.nix b/pkgs/by-name/bo/boinctui/package.nix index faf8ca709dd4..eca32ef37731 100644 --- a/pkgs/by-name/bo/boinctui/package.nix +++ b/pkgs/by-name/bo/boinctui/package.nix @@ -18,7 +18,7 @@ stdenv.mkDerivation { ''; outputs = [ "out" "man" ]; - separateDebugInfo = stdenv.isLinux; + separateDebugInfo = stdenv.hostPlatform.isLinux; enableParallelBuilding = true; diff --git a/pkgs/by-name/br/bruno/package.nix b/pkgs/by-name/br/bruno/package.nix index 7576636a5bf6..6b271c571e07 100644 --- a/pkgs/by-name/br/bruno/package.nix +++ b/pkgs/by-name/br/bruno/package.nix @@ -21,7 +21,7 @@ let # fix for: https://github.com/NixOS/nixpkgs/issues/272156 buildNpmPackage' = buildNpmPackage.override { - stdenv = if stdenv.isDarwin then overrideSDK stdenv "11.0" else stdenv; + stdenv = if stdenv.hostPlatform.isDarwin then overrideSDK stdenv "11.0" else stdenv; }; in buildNpmPackage' rec { @@ -47,7 +47,7 @@ buildNpmPackage' rec { (writeShellScriptBin "phantomjs" "echo 2.1.1") pkg-config ] - ++ lib.optionals (!stdenv.isDarwin) [ + ++ lib.optionals (!stdenv.hostPlatform.isDarwin) [ makeWrapper copyDesktopItems ]; @@ -58,7 +58,7 @@ buildNpmPackage' rec { cairo pango ] - ++ lib.optionals stdenv.isDarwin [ + ++ lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk_11_0.frameworks.CoreText ]; @@ -100,7 +100,7 @@ buildNpmPackage' rec { pushd packages/bruno-electron ${ - if stdenv.isDarwin then + if stdenv.hostPlatform.isDarwin then '' cp -r ${electron.dist}/Electron.app ./ find ./Electron.app -name 'Info.plist' | xargs -d '\n' chmod +rw @@ -136,7 +136,7 @@ buildNpmPackage' rec { ${ - if stdenv.isDarwin then + if stdenv.hostPlatform.isDarwin then '' mkdir -p $out/Applications diff --git a/pkgs/by-name/bs/bsc/package.nix b/pkgs/by-name/bs/bsc/package.nix index bb0e762e46f4..03bbb66e5550 100644 --- a/pkgs/by-name/bs/bsc/package.nix +++ b/pkgs/by-name/bs/bsc/package.nix @@ -18,7 +18,7 @@ stdenv.mkDerivation (finalAttrs: { enableParallelBuilding = true; - buildInputs = lib.optional stdenv.isDarwin llvmPackages.openmp; + buildInputs = lib.optional stdenv.hostPlatform.isDarwin llvmPackages.openmp; makeFlags = [ "CC=$(CXX)" diff --git a/pkgs/by-name/bu/buckle/package.nix b/pkgs/by-name/bu/buckle/package.nix index c4139ebe5805..51c5e1486d54 100644 --- a/pkgs/by-name/bu/buckle/package.nix +++ b/pkgs/by-name/bu/buckle/package.nix @@ -18,7 +18,7 @@ rustPlatform.buildRustPackage rec { hash = "sha256-eWhcDzw+6I5N0dse5avwhcQ/y6YZ6b3QKyBwWBrA/xo="; }; - buildInputs = lib.optionals stdenv.isDarwin [ + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.Security darwin.apple_sdk.frameworks.SystemConfiguration ]; diff --git a/pkgs/by-name/bu/bulk_extractor/package.nix b/pkgs/by-name/bu/bulk_extractor/package.nix index 58bbb1edd6d1..25d38c6c35ca 100644 --- a/pkgs/by-name/bu/bulk_extractor/package.nix +++ b/pkgs/by-name/bu/bulk_extractor/package.nix @@ -47,7 +47,7 @@ stdenv.mkDerivation (finalAttrs: { aclocal -I m4 ''; - postPatch = lib.optionalString stdenv.isDarwin '' + postPatch = lib.optionalString stdenv.hostPlatform.isDarwin '' substituteInPlace src/be20_api/feature_recorder_set.cpp --replace-fail '#warn ' '#warning ' ''; diff --git a/pkgs/by-name/bu/bulloak/package.nix b/pkgs/by-name/bu/bulloak/package.nix index dc8584fb6707..6b395068e914 100644 --- a/pkgs/by-name/bu/bulloak/package.nix +++ b/pkgs/by-name/bu/bulloak/package.nix @@ -42,7 +42,7 @@ rustPlatform.buildRustPackage rec { cargoHash = "sha256-lj/wmLu4cBjDjzMD8DlIz+6Rnag0h+zWiE7lfcTC7lY="; - buildInputs = lib.optionals stdenv.isDarwin [ darwin.apple_sdk.frameworks.SystemConfiguration ]; + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.SystemConfiguration ]; # tests run in CI on the source repo doCheck = false; diff --git a/pkgs/by-name/bu/bunbun/package.nix b/pkgs/by-name/bu/bunbun/package.nix index ab9068277871..2d042f08d8f9 100644 --- a/pkgs/by-name/bu/bunbun/package.nix +++ b/pkgs/by-name/bu/bunbun/package.nix @@ -23,7 +23,7 @@ rustPlatform.buildRustPackage rec { cargoHash = "sha256-CcGfaSyCMv0Wm4QsYASBwEnpX8fKbLHRqyEcUmj2w2o="; - buildInputs = lib.optionals stdenv.isDarwin ( + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin ( with darwin.apple_sdk.frameworks; [ CoreFoundation diff --git a/pkgs/by-name/bu/bup/package.nix b/pkgs/by-name/bu/bup/package.nix index 91fb2b3c3f71..c9fe3986611c 100644 --- a/pkgs/by-name/bu/bup/package.nix +++ b/pkgs/by-name/bu/bup/package.nix @@ -23,7 +23,7 @@ let setuptools tornado ] - ++ lib.optionals (!stdenv.isDarwin) [ + ++ lib.optionals (!stdenv.hostPlatform.isDarwin) [ pyxattr pylibacl fuse diff --git a/pkgs/by-name/bu/bustle/package.nix b/pkgs/by-name/bu/bustle/package.nix index a6e3e6474729..876d63ff014f 100644 --- a/pkgs/by-name/bu/bustle/package.nix +++ b/pkgs/by-name/bu/bustle/package.nix @@ -36,7 +36,7 @@ stdenv.mkDerivation (finalAttrs: { hash = "sha256-r29Z+6P+yuCpOBUE3vkESd15lcGXs5+ZTBiQ9nW6DJ4="; }; - env = lib.optionalAttrs stdenv.isDarwin { + env = lib.optionalAttrs stdenv.hostPlatform.isDarwin { # Set the location to gettext to ensure the nixpkgs one on Darwin instead of the vendored one. # The vendored gettext does not build with clang 16. GETTEXT_BIN_DIR = "${lib.getBin buildPackages.gettext}/bin"; @@ -60,7 +60,7 @@ stdenv.mkDerivation (finalAttrs: { glib gtk4 libadwaita - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.Foundation libiconv ]; diff --git a/pkgs/by-name/c2/c2patool/package.nix b/pkgs/by-name/c2/c2patool/package.nix index c6a3645f8b26..29cb68b1f4e0 100644 --- a/pkgs/by-name/c2/c2patool/package.nix +++ b/pkgs/by-name/c2/c2patool/package.nix @@ -30,7 +30,7 @@ rustPlatform.buildRustPackage rec { ]; buildInputs = [ openssl - ] ++ lib.optional stdenv.isDarwin [ + ] ++ lib.optional stdenv.hostPlatform.isDarwin [ libiconv darwin.apple_sdk.frameworks.CoreServices darwin.apple_sdk.frameworks.Carbon diff --git a/pkgs/by-name/ca/cadzinho/package.nix b/pkgs/by-name/ca/cadzinho/package.nix index 6b24ef5a18f7..5a12cd1e54bc 100644 --- a/pkgs/by-name/ca/cadzinho/package.nix +++ b/pkgs/by-name/ca/cadzinho/package.nix @@ -16,7 +16,7 @@ stdenv.mkDerivation rec { substituteInPlace Makefile --replace-fail "-lGLEW" "-lGLEW -lSDL2_net" ''; - nativeBuildInputs = lib.optional stdenv.isDarwin desktopToDarwinBundle; + nativeBuildInputs = lib.optional stdenv.hostPlatform.isDarwin desktopToDarwinBundle; buildInputs = [ SDL2 SDL2_net glew lua5_4 ]; @@ -25,7 +25,7 @@ stdenv.mkDerivation rec { env.NIX_CFLAGS_COMPILE = toString ([ "-I${SDL2.dev}/include/SDL2" "-I${SDL2_net.dev}/include/SDL2" - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ # https://github.com/llvm/llvm-project/issues/62254 "-fno-builtin-strrchr" ]); diff --git a/pkgs/by-name/ca/caligula/package.nix b/pkgs/by-name/ca/caligula/package.nix index 6cb36421eaae..d957b2c79a92 100644 --- a/pkgs/by-name/ca/caligula/package.nix +++ b/pkgs/by-name/ca/caligula/package.nix @@ -24,7 +24,7 @@ rustPlatform.buildRustPackage rec { }; - buildInputs = lib.optionals stdenv.isDarwin ( + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin ( with darwin.apple_sdk.frameworks; [ Cocoa IOKit diff --git a/pkgs/by-name/ca/caprine/package.nix b/pkgs/by-name/ca/caprine/package.nix index e6e2106b3809..f164af42b5a8 100644 --- a/pkgs/by-name/ca/caprine/package.nix +++ b/pkgs/by-name/ca/caprine/package.nix @@ -40,7 +40,7 @@ buildNpmPackage rec { installPhase = '' runHook preInstall - ${lib.optionalString stdenv.isLinux '' + ${lib.optionalString stdenv.hostPlatform.isLinux '' mkdir -p $out/share/caprine cp -r dist/*-unpacked/{locales,resources{,.pak}} $out/share/caprine @@ -53,7 +53,7 @@ buildNpmPackage rec { install -Dm644 build/icon.png $out/share/icons/hicolor/512x512/apps/caprine.png ''} - ${lib.optionalString stdenv.isDarwin '' + ${lib.optionalString stdenv.hostPlatform.isDarwin '' mkdir -p $out/Applications cp -r dist/mac*/"Caprine.app" $out/Applications makeWrapper "$out/Applications/Caprine.app/Contents/MacOS/Caprine" $out/bin/caprine diff --git a/pkgs/by-name/ca/cargo-bump/package.nix b/pkgs/by-name/ca/cargo-bump/package.nix index 0de63ed2036b..e40d79a14089 100644 --- a/pkgs/by-name/ca/cargo-bump/package.nix +++ b/pkgs/by-name/ca/cargo-bump/package.nix @@ -23,7 +23,7 @@ rustPlatform.buildRustPackage rec { pkg-config ]; - buildInputs = lib.optionals stdenv.isDarwin [ + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.Security ]; diff --git a/pkgs/by-name/ca/cargo-geiger/package.nix b/pkgs/by-name/ca/cargo-geiger/package.nix index acfc59829eea..c29825cb86b5 100644 --- a/pkgs/by-name/ca/cargo-geiger/package.nix +++ b/pkgs/by-name/ca/cargo-geiger/package.nix @@ -33,10 +33,10 @@ rustPlatform.buildRustPackage rec { ]; buildInputs = [ openssl ] - ++ lib.optionals stdenv.isDarwin (with darwin.apple_sdk.frameworks; [ CoreFoundation Security libiconv curl ]); + ++ lib.optionals stdenv.hostPlatform.isDarwin (with darwin.apple_sdk.frameworks; [ CoreFoundation Security libiconv curl ]); nativeBuildInputs = [ pkg-config ] # curl-sys wants to run curl-config on darwin - ++ lib.optionals stdenv.isDarwin [ curl.dev ]; + ++ lib.optionals stdenv.hostPlatform.isDarwin [ curl.dev ]; # skip tests with networking or other failures checkFlags = [ diff --git a/pkgs/by-name/ca/cargo-i18n/package.nix b/pkgs/by-name/ca/cargo-i18n/package.nix index 43b353ed4d49..0665e8860b84 100644 --- a/pkgs/by-name/ca/cargo-i18n/package.nix +++ b/pkgs/by-name/ca/cargo-i18n/package.nix @@ -18,7 +18,7 @@ rustPlatform.buildRustPackage rec { cargoHash = "sha256-vN62QmCuhu7AjL6xSpBU6/ul4WgNLZbjWDCFyHj6rIM="; - buildInputs = lib.optionals stdenv.isDarwin [ + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.Foundation ]; diff --git a/pkgs/by-name/ca/cargo-information/package.nix b/pkgs/by-name/ca/cargo-information/package.nix index dcb87ba96748..fe7f950fce85 100644 --- a/pkgs/by-name/ca/cargo-information/package.nix +++ b/pkgs/by-name/ca/cargo-information/package.nix @@ -45,7 +45,7 @@ rustPlatform.buildRustPackage rec { buildInputs = [ openssl curl - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.Security ]; diff --git a/pkgs/by-name/ca/cargo-make/package.nix b/pkgs/by-name/ca/cargo-make/package.nix index 4a90d4af78b5..b55621333838 100644 --- a/pkgs/by-name/ca/cargo-make/package.nix +++ b/pkgs/by-name/ca/cargo-make/package.nix @@ -26,7 +26,7 @@ rustPlatform.buildRustPackage rec { buildInputs = [ bzip2 openssl - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.SystemConfiguration ]; diff --git a/pkgs/by-name/ca/cargo-raze/package.nix b/pkgs/by-name/ca/cargo-raze/package.nix index a0b4fd0ace7b..ca381ef562dd 100644 --- a/pkgs/by-name/ca/cargo-raze/package.nix +++ b/pkgs/by-name/ca/cargo-raze/package.nix @@ -36,9 +36,9 @@ rustPlatform.buildRustPackage { libgit2 openssl curl - ] ++ lib.optional stdenv.isDarwin darwin.apple_sdk.frameworks.Security; + ] ++ lib.optional stdenv.hostPlatform.isDarwin darwin.apple_sdk.frameworks.Security; - preCheck = lib.optionalString stdenv.isDarwin '' + preCheck = lib.optionalString stdenv.hostPlatform.isDarwin '' # Darwin issue: Os { code: 24, kind: Uncategorized, message: "Too many open files" } # https://github.com/google/cargo-raze/issues/544 ulimit -n 1024 diff --git a/pkgs/by-name/ca/cargo-rdme/package.nix b/pkgs/by-name/ca/cargo-rdme/package.nix index 131a6eb70f45..105104e9b46d 100644 --- a/pkgs/by-name/ca/cargo-rdme/package.nix +++ b/pkgs/by-name/ca/cargo-rdme/package.nix @@ -9,7 +9,7 @@ rustPlatform.buildRustPackage rec { hash = "sha256-AARkXr6qOq9u/nmcmCnA4P+Q+MPPChCXoRaYiLwCNPs="; }; - buildInputs = lib.optionals stdenv.isDarwin [ + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ Security ]; diff --git a/pkgs/by-name/ca/cargo-unfmt/package.nix b/pkgs/by-name/ca/cargo-unfmt/package.nix index 3a2a16dfaaf6..e53cc07c330c 100644 --- a/pkgs/by-name/ca/cargo-unfmt/package.nix +++ b/pkgs/by-name/ca/cargo-unfmt/package.nix @@ -19,7 +19,7 @@ rustPlatform.buildRustPackage { cargoHash = "sha256-mMeHTYCUIZR3jVvTxfyH4I9wGfUdCWcyn9djnksAY8k="; - buildInputs = lib.optionals stdenv.isDarwin [ libiconv darwin.apple_sdk.frameworks.Security ]; + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ libiconv darwin.apple_sdk.frameworks.Security ]; # Doc tests are broken on 0.3.3 doCheck = false; diff --git a/pkgs/by-name/ca/cargo-vibe/package.nix b/pkgs/by-name/ca/cargo-vibe/package.nix index 4caaa823264b..ba7a5882b5bb 100644 --- a/pkgs/by-name/ca/cargo-vibe/package.nix +++ b/pkgs/by-name/ca/cargo-vibe/package.nix @@ -28,8 +28,8 @@ rustPlatform.buildRustPackage rec { dbus openssl ] - ++ lib.optional stdenv.isLinux udev - ++ lib.optionals stdenv.isDarwin (with darwin.apple_sdk.frameworks; [ AppKit IOKit CoreBluetooth ]); + ++ lib.optional stdenv.hostPlatform.isLinux udev + ++ lib.optionals stdenv.hostPlatform.isDarwin (with darwin.apple_sdk.frameworks; [ AppKit IOKit CoreBluetooth ]); meta = with lib; { description = "Cargo x Buttplug.io"; diff --git a/pkgs/by-name/ca/cargo-wasi/package.nix b/pkgs/by-name/ca/cargo-wasi/package.nix index b0fe56c9fb69..a42b98da2054 100644 --- a/pkgs/by-name/ca/cargo-wasi/package.nix +++ b/pkgs/by-name/ca/cargo-wasi/package.nix @@ -21,8 +21,8 @@ rustPlatform.buildRustPackage rec { nativeBuildInputs = [ pkg-config ]; - buildInputs = lib.optionals stdenv.isLinux [ openssl ] - ++ lib.optionals stdenv.isDarwin (with darwin.apple_sdk.frameworks; [ Security ]); + buildInputs = lib.optionals stdenv.hostPlatform.isLinux [ openssl ] + ++ lib.optionals stdenv.hostPlatform.isDarwin (with darwin.apple_sdk.frameworks; [ Security ]); # Checks need to be disabled here because the current test suite makes assumptions # about the surrounding environment that aren't Nix friendly. See these lines for specifics: diff --git a/pkgs/by-name/ca/cargo-xwin/package.nix b/pkgs/by-name/ca/cargo-xwin/package.nix index 78c6c9933e83..4f3b16c4ddee 100644 --- a/pkgs/by-name/ca/cargo-xwin/package.nix +++ b/pkgs/by-name/ca/cargo-xwin/package.nix @@ -18,7 +18,7 @@ rustPlatform.buildRustPackage rec { cargoHash = "sha256-xVG1nET020rfMIjhIcCtNr9ZCj8SgQAvXePjyKSPjUs="; - buildInputs = lib.optionals stdenv.isDarwin [ + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.Security ]; diff --git a/pkgs/by-name/ca/casadi/package.nix b/pkgs/by-name/ca/casadi/package.nix index dda1eed048d0..0f1f3e3d7a00 100644 --- a/pkgs/by-name/ca/casadi/package.nix +++ b/pkgs/by-name/ca/casadi/package.nix @@ -97,7 +97,7 @@ stdenv.mkDerivation (finalAttrs: { "if (SWIG_IMPORT)" \ "if (NOT SWIG_IMPORT)" '' - + lib.optionalString stdenv.isDarwin '' + + lib.optionalString stdenv.hostPlatform.isDarwin '' # this is only printing stuff, and is not defined on all CPU substituteInPlace casadi/interfaces/hpipm/hpipm_runtime.hpp --replace-fail \ "d_print_exp_tran_mat" \ @@ -150,7 +150,7 @@ stdenv.mkDerivation (finalAttrs: { python3Packages.numpy python3Packages.python ] - ++ lib.optionals stdenv.isDarwin [ llvmPackages_17.openmp ]; + ++ lib.optionals stdenv.hostPlatform.isDarwin [ llvmPackages_17.openmp ]; cmakeFlags = [ (lib.cmakeBool "WITH_PYTHON" pythonSupport) diff --git a/pkgs/by-name/ca/castxml/package.nix b/pkgs/by-name/ca/castxml/package.nix index 88cbbec87c6d..c0fe17a1d097 100644 --- a/pkgs/by-name/ca/castxml/package.nix +++ b/pkgs/by-name/ca/castxml/package.nix @@ -36,7 +36,7 @@ stdenv.mkDerivation (finalAttrs: { libxml2 llvm zlib - ] ++ lib.optionals (!stdenv.isDarwin) [ libclang ]; + ] ++ lib.optionals (!stdenv.hostPlatform.isDarwin) [ libclang ]; cmakeFlags = [ @@ -47,7 +47,7 @@ stdenv.mkDerivation (finalAttrs: { (lib.cmakeBool "SPHINX_HTML" withHTML) (lib.cmakeBool "SPHINX_MAN" withManual) ] - ++ lib.optionals stdenv.isDarwin [ + ++ lib.optionals stdenv.hostPlatform.isDarwin [ (lib.cmakeOptionType "path" "Clang_DIR" "${lib.getDev libclang}/lib/cmake/clang") ]; diff --git a/pkgs/by-name/cb/cbftp/package.nix b/pkgs/by-name/cb/cbftp/package.nix index 5709acb02ddb..73e11f27b277 100644 --- a/pkgs/by-name/cb/cbftp/package.nix +++ b/pkgs/by-name/cb/cbftp/package.nix @@ -21,7 +21,7 @@ stdenv.mkDerivation rec { dontConfigure = true; - makeFlags = lib.optional stdenv.isDarwin "OPTFLAGS=-O0"; + makeFlags = lib.optional stdenv.hostPlatform.isDarwin "OPTFLAGS=-O0"; installPhase = '' runHook preInstall diff --git a/pkgs/by-name/cc/ccache/package.nix b/pkgs/by-name/cc/ccache/package.nix index 9984771b7ce9..c30543cdbdd1 100644 --- a/pkgs/by-name/cc/ccache/package.nix +++ b/pkgs/by-name/cc/ccache/package.nix @@ -83,7 +83,7 @@ stdenv.mkDerivation (finalAttrs: { # test/run requires the compgen function which is available in # bashInteractive, but not bash. bashInteractive - ] ++ lib.optional stdenv.isDarwin xcodebuild; + ] ++ lib.optional stdenv.hostPlatform.isDarwin xcodebuild; checkInputs = [ doctest @@ -95,7 +95,7 @@ stdenv.mkDerivation (finalAttrs: { [ "test.trim_dir" # flaky on hydra (possibly filesystem-specific?) ] - ++ lib.optionals stdenv.isDarwin [ + ++ lib.optionals stdenv.hostPlatform.isDarwin [ "test.basedir" "test.fileclone" # flaky on hydra (possibly filesystem-specific?) "test.multi_arch" diff --git a/pkgs/by-name/cc/cctools/package.nix b/pkgs/by-name/cc/cctools/package.nix index 2ab074def674..c56f79b69e47 100644 --- a/pkgs/by-name/cc/cctools/package.nix +++ b/pkgs/by-name/cc/cctools/package.nix @@ -132,8 +132,8 @@ stdenv.mkDerivation (finalAttrs: { ld64 llvm ] - ++ lib.optionals stdenv.isDarwin [ darwin.objc4 ] - ++ lib.optionals (stdenv.isDarwin && stdenv.isx86_64) [ memstreamHook ]; + ++ lib.optionals stdenv.hostPlatform.isDarwin [ darwin.objc4 ] + ++ lib.optionals (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isx86_64) [ memstreamHook ]; mesonBuildType = "release"; diff --git a/pkgs/by-name/ce/centerpiece/package.nix b/pkgs/by-name/ce/centerpiece/package.nix index 784945da7c77..7d7c7512d876 100644 --- a/pkgs/by-name/ce/centerpiece/package.nix +++ b/pkgs/by-name/ce/centerpiece/package.nix @@ -38,7 +38,7 @@ rustPlatform.buildRustPackage rec { libXrandr ]); - postFixup = lib.optional stdenv.isLinux '' + postFixup = lib.optional stdenv.hostPlatform.isLinux '' rpath=$(patchelf --print-rpath $out/bin/centerpiece) patchelf --set-rpath "$rpath:${ lib.makeLibraryPath [ diff --git a/pkgs/by-name/ch/chatd/package.nix b/pkgs/by-name/ch/chatd/package.nix index 692e7d752971..1653b80e26f7 100644 --- a/pkgs/by-name/ch/chatd/package.nix +++ b/pkgs/by-name/ch/chatd/package.nix @@ -67,15 +67,15 @@ buildNpmPackage rec { find $out/share/chatd/node_modules -name '*.exe' -or -name '*.dll' -or -name '*.pdb' -delete rm -rf ${ lib.concatStringsSep " " ( - (lib.optional (!stdenv.isx86_64) "$out/share/chatd/node_modules/onnxruntime-node/bin/napi-v3/*/x64") + (lib.optional (!stdenv.hostPlatform.isx86_64) "$out/share/chatd/node_modules/onnxruntime-node/bin/napi-v3/*/x64") ++ (lib.optional ( - !stdenv.isAarch64 + !stdenv.hostPlatform.isAarch64 ) "$out/share/chatd/node_modules/onnxruntime-node/bin/napi-v3/*/arm64") ++ (lib.optional ( - !stdenv.isDarwin + !stdenv.hostPlatform.isDarwin ) "$out/share/chatd/node_modules/onnxruntime-node/bin/napi-v3/darwin") ++ (lib.optional ( - !stdenv.isLinux + !stdenv.hostPlatform.isLinux ) "$out/share/chatd/node_modules/onnxruntime-node/bin/napi-v3/linux") ) } diff --git a/pkgs/by-name/ch/chawan/package.nix b/pkgs/by-name/ch/chawan/package.nix index 7a847adb1b44..d6ffc1d3dcd2 100644 --- a/pkgs/by-name/ch/chawan/package.nix +++ b/pkgs/by-name/ch/chawan/package.nix @@ -79,6 +79,6 @@ stdenv.mkDerivation { platforms = lib.platforms.unix; maintainers = with lib.maintainers; [ jtbx ]; mainProgram = "cha"; - broken = stdenv.isDarwin; # pending PR #292043 + broken = stdenv.hostPlatform.isDarwin; # pending PR #292043 }; } diff --git a/pkgs/by-name/ch/chow-tape-model/package.nix b/pkgs/by-name/ch/chow-tape-model/package.nix index a233e2352d7f..e080ee6c05b8 100644 --- a/pkgs/by-name/ch/chow-tape-model/package.nix +++ b/pkgs/by-name/ch/chow-tape-model/package.nix @@ -126,7 +126,7 @@ stdenv.mkDerivation (finalAttrs: { platforms = platforms.linux; # error: 'vvtanh' was not declared in this scope; did you mean 'tanh'? # error: no matching function for call to 'juce::dsp::SIMDRegister::SIMDRegister(xsimd::simd_batch_traits >::batch_bool_type)' - broken = stdenv.isAarch64; # since 2021-12-27 on hydra (update to 2.10): https://hydra.nixos.org/build/162558991 + broken = stdenv.hostPlatform.isAarch64; # since 2021-12-27 on hydra (update to 2.10): https://hydra.nixos.org/build/162558991 mainProgram = "CHOWTapeModel"; }; }) diff --git a/pkgs/by-name/ci/cinny-unwrapped/package.nix b/pkgs/by-name/ci/cinny-unwrapped/package.nix index fabda88152a4..643b7017deb6 100644 --- a/pkgs/by-name/ci/cinny-unwrapped/package.nix +++ b/pkgs/by-name/ci/cinny-unwrapped/package.nix @@ -27,7 +27,7 @@ buildNpmPackage rec { # Fix error: no member named 'aligned_alloc' in the global namespace env.NIX_CFLAGS_COMPILE = lib.optionalString ( - stdenv.isDarwin && lib.versionOlder stdenv.hostPlatform.darwinSdkVersion "11.0" + stdenv.hostPlatform.isDarwin && lib.versionOlder stdenv.hostPlatform.darwinSdkVersion "11.0" ) "-D_LIBCPP_HAS_NO_LIBRARY_ALIGNED_ALLOCATION=1"; nativeBuildInputs = [ @@ -39,7 +39,7 @@ buildNpmPackage rec { pixman cairo pango - ] ++ lib.optionals stdenv.isDarwin [ darwin.apple_sdk.frameworks.CoreText ]; + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.CoreText ]; installPhase = '' runHook preInstall diff --git a/pkgs/by-name/cl/clickable/package.nix b/pkgs/by-name/cl/clickable/package.nix index 53ef6c2dd4b0..0437aae99580 100644 --- a/pkgs/by-name/cl/clickable/package.nix +++ b/pkgs/by-name/cl/clickable/package.nix @@ -67,7 +67,7 @@ python3Packages.buildPythonApplication rec { ++ # There are no docker images available for the aarch64 architecutre # which are required for tests. - lib.optionals stdenv.isAarch64 [ + lib.optionals stdenv.hostPlatform.isAarch64 [ "test_arch" "test_restricted_arch" ]; diff --git a/pkgs/by-name/cl/clipcat/package.nix b/pkgs/by-name/cl/clipcat/package.nix index 6c5bd77c89db..b5d22c8b5081 100644 --- a/pkgs/by-name/cl/clipcat/package.nix +++ b/pkgs/by-name/cl/clipcat/package.nix @@ -20,7 +20,7 @@ rustPlatform.buildRustPackage rec { cargoHash = "sha256-z2t7kq2ogMHJGF7xQnzc11B42gUZFTVokVkbw35CeY0="; - buildInputs = lib.optionals stdenv.isDarwin [ + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.Cocoa darwin.apple_sdk.frameworks.Security darwin.apple_sdk.frameworks.SystemConfiguration diff --git a/pkgs/by-name/cl/cloudlogoffline/package.nix b/pkgs/by-name/cl/cloudlogoffline/package.nix index 04e6f0ed2c32..027e91d5eb3a 100644 --- a/pkgs/by-name/cl/cloudlogoffline/package.nix +++ b/pkgs/by-name/cl/cloudlogoffline/package.nix @@ -21,7 +21,7 @@ stdenv.mkDerivation (self: { qt6.qmake qt6.wrapQtAppsHook ] - ++ lib.optionals (!stdenv.isDarwin) [ + ++ lib.optionals (!stdenv.hostPlatform.isDarwin) [ copyDesktopItems ]; @@ -33,16 +33,16 @@ stdenv.mkDerivation (self: { ]; postPatch = let - targetDir = if stdenv.isDarwin then "Applications" else "bin"; + targetDir = if stdenv.hostPlatform.isDarwin then "Applications" else "bin"; in '' substituteInPlace CloudLogOffline.pro \ --replace 'target.path = /opt/$''${TARGET}/bin' "target.path = $out/${targetDir}" ''; - postInstall = lib.optionalString (!stdenv.isDarwin) '' + postInstall = lib.optionalString (!stdenv.hostPlatform.isDarwin) '' install -d $out/share/pixmaps install -m644 images/logo_circle.svg $out/share/pixmaps/cloudlogoffline.svg - '' + lib.optionalString stdenv.isDarwin '' + '' + lib.optionalString stdenv.hostPlatform.isDarwin '' # FIXME: For some reason, the Info.plist isn't copied correctly to # the application bundle when building normally, instead creating an # empty file. This doesn't happen when building in a dev shell with @@ -53,7 +53,7 @@ stdenv.mkDerivation (self: { install -m644 macos/Info.plist $out/Applications/CloudLogOffline.app/Contents/Info.plist ''; - desktopItems = lib.optionals (!stdenv.isDarwin) [ + desktopItems = lib.optionals (!stdenv.hostPlatform.isDarwin) [ (makeDesktopItem { name = "cloudlogoffline"; desktopName = "CloudLogOffline"; diff --git a/pkgs/by-name/cm/cmake/package.nix b/pkgs/by-name/cm/cmake/package.nix index ca0f1789a110..82563e56c2b0 100644 --- a/pkgs/by-name/cm/cmake/package.nix +++ b/pkgs/by-name/cm/cmake/package.nix @@ -25,7 +25,7 @@ isBootstrap else false) , useOpenSSL ? !isMinimalBuild -, useSharedLibraries ? (!isMinimalBuild && !stdenv.isCygwin) +, useSharedLibraries ? (!isMinimalBuild && !stdenv.hostPlatform.isCygwin) , uiToolkits ? [] # can contain "ncurses" and/or "qt5" , buildDocs ? !(isMinimalBuild || (uiToolkits == [])) , darwin @@ -66,13 +66,13 @@ stdenv.mkDerivation (finalAttrs: { # Derived from https://github.com/libuv/libuv/commit/1a5d4f08238dd532c3718e210078de1186a5920d ./003-libuv-application-services.diff ] - ++ lib.optional stdenv.isCygwin ./004-cygwin.diff + ++ lib.optional stdenv.hostPlatform.isCygwin ./004-cygwin.diff # Derived from https://github.com/curl/curl/commit/31f631a142d855f069242f3e0c643beec25d1b51 - ++ lib.optional (stdenv.isDarwin && isMinimalBuild) ./005-remove-systemconfiguration-dep.diff + ++ lib.optional (stdenv.hostPlatform.isDarwin && isMinimalBuild) ./005-remove-systemconfiguration-dep.diff # On Darwin, always set CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG. - ++ lib.optional stdenv.isDarwin ./006-darwin-always-set-runtime-c-flag.diff + ++ lib.optional stdenv.hostPlatform.isDarwin ./006-darwin-always-set-runtime-c-flag.diff # On platforms where ps is not part of stdenv, patch the invocation of ps to use an absolute path. - ++ lib.optional (stdenv.isDarwin || stdenv.isFreeBSD) ( + ++ lib.optional (stdenv.hostPlatform.isDarwin || stdenv.hostPlatform.isFreeBSD) ( substituteAll { src = ./007-darwin-bsd-ps-abspath.diff; ps = lib.getExe ps; @@ -108,8 +108,8 @@ stdenv.mkDerivation (finalAttrs: { ++ lib.optional useOpenSSL openssl ++ lib.optional cursesUI ncurses ++ lib.optional qt5UI qtbase - ++ lib.optional stdenv.isDarwin CoreServices - ++ lib.optional (stdenv.isDarwin && !isMinimalBuild) SystemConfiguration; + ++ lib.optional stdenv.hostPlatform.isDarwin CoreServices + ++ lib.optional (stdenv.hostPlatform.isDarwin && !isMinimalBuild) SystemConfiguration; preConfigure = '' fixCmakeFiles . @@ -207,6 +207,6 @@ stdenv.mkDerivation (finalAttrs: { maintainers = with lib.maintainers; [ ttuegel lnl7 AndersonTorres ]; platforms = lib.platforms.all; mainProgram = "cmake"; - broken = (qt5UI && stdenv.isDarwin); + broken = (qt5UI && stdenv.hostPlatform.isDarwin); }; }) diff --git a/pkgs/by-name/co/code2prompt/package.nix b/pkgs/by-name/co/code2prompt/package.nix index f951b2b1e294..03c5e6e7b0a8 100644 --- a/pkgs/by-name/co/code2prompt/package.nix +++ b/pkgs/by-name/co/code2prompt/package.nix @@ -32,7 +32,7 @@ rustPlatform.buildRustPackage rec { buildInputs = [ openssl ] - ++ lib.optionals stdenv.isDarwin [ + ++ lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.Security darwin.apple_sdk.frameworks.AppKit ]; diff --git a/pkgs/by-name/co/codeberg-cli/package.nix b/pkgs/by-name/co/codeberg-cli/package.nix index 825731d4d1b4..2d89eaed9189 100644 --- a/pkgs/by-name/co/codeberg-cli/package.nix +++ b/pkgs/by-name/co/codeberg-cli/package.nix @@ -28,7 +28,7 @@ rustPlatform.buildRustPackage rec { buildInputs = [ openssl ] - ++ lib.optionals stdenv.isDarwin ( + ++ lib.optionals stdenv.hostPlatform.isDarwin ( let d = darwin.apple_sdk.frameworks; in diff --git a/pkgs/by-name/co/codeium/package.nix b/pkgs/by-name/co/codeium/package.nix index 679050b5cc8a..1807519b2202 100644 --- a/pkgs/by-name/co/codeium/package.nix +++ b/pkgs/by-name/co/codeium/package.nix @@ -31,7 +31,7 @@ stdenv.mkDerivation (finalAttrs: { inherit hash; }; - nativeBuildInputs = [ gzip ] ++ lib.optionals stdenv.isLinux [ autoPatchelfHook ]; + nativeBuildInputs = [ gzip ] ++ lib.optionals stdenv.hostPlatform.isLinux [ autoPatchelfHook ]; dontUnpack = true; dontConfigure = true; diff --git a/pkgs/by-name/co/comet-gog/package.nix b/pkgs/by-name/co/comet-gog/package.nix index 35677d4bf08d..f60193005705 100644 --- a/pkgs/by-name/co/comet-gog/package.nix +++ b/pkgs/by-name/co/comet-gog/package.nix @@ -31,7 +31,7 @@ rustPlatform.buildRustPackage rec { env.PROTOC = lib.getExe' protobuf "protoc"; - buildInputs = lib.optionals stdenv.isDarwin [ + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ CoreFoundation SystemConfiguration ]; diff --git a/pkgs/by-name/co/committed/package.nix b/pkgs/by-name/co/committed/package.nix index cd42172fde9f..229414b14f68 100644 --- a/pkgs/by-name/co/committed/package.nix +++ b/pkgs/by-name/co/committed/package.nix @@ -22,7 +22,7 @@ rustPlatform.buildRustPackage { }; cargoHash = "sha256-AmAEGVWq6KxLtiHDGIFVcoP1Wck8z+P9mnDy0SSSJNM="; - buildInputs = lib.optionals stdenv.isDarwin [ darwin.apple_sdk.frameworks.Security ]; + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.Security ]; passthru = { tests.version = testers.testVersion { package = committed; }; diff --git a/pkgs/by-name/co/conduwuit/package.nix b/pkgs/by-name/co/conduwuit/package.nix index 1fd8e9b3e3d5..733b502246a0 100644 --- a/pkgs/by-name/co/conduwuit/package.nix +++ b/pkgs/by-name/co/conduwuit/package.nix @@ -14,17 +14,17 @@ # upstream conduwuit enables jemalloc by default, so we follow suit enableJemalloc ? true, rust-jemalloc-sys, - enableLiburing ? stdenv.isLinux, + enableLiburing ? stdenv.hostPlatform.isLinux, liburing, }: let rust-jemalloc-sys' = rust-jemalloc-sys.override { - unprefixed = !stdenv.isDarwin; + unprefixed = !stdenv.hostPlatform.isDarwin; }; rocksdb' = rocksdb.override { inherit enableLiburing; # rocksdb does not support prefixed jemalloc, which is required on darwin - enableJemalloc = enableJemalloc && !stdenv.isDarwin; + enableJemalloc = enableJemalloc && !stdenv.hostPlatform.isDarwin; jemalloc = rust-jemalloc-sys'; }; in @@ -62,7 +62,7 @@ rustPlatform.buildRustPackage rec { ] ++ lib.optional enableJemalloc rust-jemalloc-sys' ++ lib.optional enableLiburing liburing - ++ lib.optionals stdenv.isDarwin [ + ++ lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.Security ]; diff --git a/pkgs/by-name/co/construct/package.nix b/pkgs/by-name/co/construct/package.nix index eb2c922b31b4..89833c817608 100644 --- a/pkgs/by-name/co/construct/package.nix +++ b/pkgs/by-name/co/construct/package.nix @@ -14,7 +14,7 @@ stdenv.mkDerivation (finalAttrs: { hash = "sha256-ENso0y7yEaXzGXzZOnlZ1L7+j/qayJL+f55/NYLz2ew="; }; - postPatch = lib.optionalString stdenv.isDarwin '' + postPatch = lib.optionalString stdenv.hostPlatform.isDarwin '' substituteInPlace Makefile \ --replace g++ c++ ''; diff --git a/pkgs/by-name/co/convco/package.nix b/pkgs/by-name/co/convco/package.nix index 60b17d84c648..0f08aba98ae8 100644 --- a/pkgs/by-name/co/convco/package.nix +++ b/pkgs/by-name/co/convco/package.nix @@ -24,7 +24,7 @@ rustPlatform.buildRustPackage rec { nativeBuildInputs = [ cmake pkg-config ]; - buildInputs = [ openssl ] ++ lib.optionals stdenv.isDarwin [ libiconv darwin.apple_sdk.frameworks.Security ]; + buildInputs = [ openssl ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ libiconv darwin.apple_sdk.frameworks.Security ]; meta = with lib; { description = "Conventional commit cli"; diff --git a/pkgs/by-name/co/convmv/package.nix b/pkgs/by-name/co/convmv/package.nix index 65fbd85e37d6..e89b4250ead3 100644 --- a/pkgs/by-name/co/convmv/package.nix +++ b/pkgs/by-name/co/convmv/package.nix @@ -34,7 +34,7 @@ stdenv.mkDerivation (finalAttrs: { # testsuite.tar contains filenames that aren't valid UTF-8. Extraction of # testsuite.tar will fail as APFS enforces that filenames are valid UTF-8. - doCheck = !stdenv.isDarwin; + doCheck = !stdenv.hostPlatform.isDarwin; prePatch = lib.optionalString finalAttrs.doCheck '' diff --git a/pkgs/by-name/co/cook-cli/package.nix b/pkgs/by-name/co/cook-cli/package.nix index fbebd0d7fb46..846d3fb52777 100644 --- a/pkgs/by-name/co/cook-cli/package.nix +++ b/pkgs/by-name/co/cook-cli/package.nix @@ -24,7 +24,7 @@ rustPlatform.buildRustPackage rec { buildInputs = [ openssl - ] ++ lib.optionals stdenv.isDarwin [ darwin.apple_sdk.frameworks.SystemConfiguration ]; + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.SystemConfiguration ]; postPatch = '' rm -rf "ui/public" diff --git a/pkgs/by-name/co/costa/package.nix b/pkgs/by-name/co/costa/package.nix index 3dacce655055..fcc644edadf4 100644 --- a/pkgs/by-name/co/costa/package.nix +++ b/pkgs/by-name/co/costa/package.nix @@ -20,7 +20,7 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ cmake ]; - buildInputs = [ scalapack ] ++ lib.optional stdenv.isDarwin llvmPackages.openmp; + buildInputs = [ scalapack ] ++ lib.optional stdenv.hostPlatform.isDarwin llvmPackages.openmp; propagatedBuildInputs = [ mpi ]; diff --git a/pkgs/by-name/co/coyim/package.nix b/pkgs/by-name/co/coyim/package.nix index 458ee764f1df..b45522006890 100644 --- a/pkgs/by-name/co/coyim/package.nix +++ b/pkgs/by-name/co/coyim/package.nix @@ -34,6 +34,6 @@ buildGoModule { homepage = "https://coy.im/"; license = lib.licenses.gpl3; platforms = [ "x86_64-linux" "x86_64-darwin" ]; - broken = stdenv.isDarwin; + broken = stdenv.hostPlatform.isDarwin; }; } diff --git a/pkgs/by-name/cp/cppcheck/package.nix b/pkgs/by-name/cp/cppcheck/package.nix index a7fbe2a50ec4..d7ed4fb99c47 100644 --- a/pkgs/by-name/cp/cppcheck/package.nix +++ b/pkgs/by-name/cp/cppcheck/package.nix @@ -55,7 +55,7 @@ stdenv.mkDerivation (finalAttrs: { strictDeps = true; # test/testcondition.cpp:4949(TestCondition::alwaysTrueContainer): Assertion failed. - doCheck = !(stdenv.isLinux && stdenv.isAarch64); + doCheck = !(stdenv.hostPlatform.isLinux && stdenv.hostPlatform.isAarch64); doInstallCheck = true; postPatch = '' diff --git a/pkgs/by-name/cp/cpuinfo/package.nix b/pkgs/by-name/cp/cpuinfo/package.nix index 5ee3e361ef69..c57f6708b389 100644 --- a/pkgs/by-name/cp/cpuinfo/package.nix +++ b/pkgs/by-name/cp/cpuinfo/package.nix @@ -37,7 +37,7 @@ stdenv.mkDerivation (finalAttrs: { (lib.cmakeBool "USE_SYSTEM_LIBS" true) ]; - doCheck = !(stdenv.isLinux && stdenv.isAarch64); + doCheck = !(stdenv.hostPlatform.isLinux && stdenv.hostPlatform.isAarch64); meta = { description = "Tools and library to detect essential for performance optimization information about host CPU"; diff --git a/pkgs/by-name/cr/crabfit-api/package.nix b/pkgs/by-name/cr/crabfit-api/package.nix index c3d396a03581..eb1eda130e5b 100644 --- a/pkgs/by-name/cr/crabfit-api/package.nix +++ b/pkgs/by-name/cr/crabfit-api/package.nix @@ -58,7 +58,7 @@ rustPlatform.buildRustPackage rec { openssl sqlite ] - ++ lib.optionals stdenv.isDarwin [ + ++ lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.CoreFoundation darwin.apple_sdk.frameworks.Security darwin.apple_sdk.frameworks.SystemConfiguration diff --git a/pkgs/by-name/cr/cronutils/package.nix b/pkgs/by-name/cr/cronutils/package.nix index f1060ba2d2cb..8c2c3d5213a8 100644 --- a/pkgs/by-name/cr/cronutils/package.nix +++ b/pkgs/by-name/cr/cronutils/package.nix @@ -42,7 +42,7 @@ stdenv.mkDerivation (finalAttrs: { makeFlags = [ "prefix=$(out)" ]; - env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.isDarwin (toString [ + env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.hostPlatform.isDarwin (toString [ "-D_DARWIN_C_SOURCE" # runstat.c:81:81: error: format string is not a string literal "-Wno-format-nonliteral" diff --git a/pkgs/by-name/cr/crunchy-cli/package.nix b/pkgs/by-name/cr/crunchy-cli/package.nix index 4a5e9236ef9b..21a8a5b8cb34 100644 --- a/pkgs/by-name/cr/crunchy-cli/package.nix +++ b/pkgs/by-name/cr/crunchy-cli/package.nix @@ -26,13 +26,13 @@ rustPlatform.buildRustPackage rec { }; }; - nativeBuildInputs = lib.optionals stdenv.isLinux [ + nativeBuildInputs = lib.optionals stdenv.hostPlatform.isLinux [ pkg-config ]; - buildInputs = lib.optionals stdenv.isLinux [ + buildInputs = lib.optionals stdenv.hostPlatform.isLinux [ openssl - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.SystemConfiguration ]; diff --git a/pkgs/by-name/cy/cyme/package.nix b/pkgs/by-name/cy/cyme/package.nix index d0ed49b7b267..401b175b463a 100644 --- a/pkgs/by-name/cy/cyme/package.nix +++ b/pkgs/by-name/cy/cyme/package.nix @@ -26,7 +26,7 @@ rustPlatform.buildRustPackage rec { nativeBuildInputs = [ pkg-config - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ darwin.DarwinTools ]; @@ -37,7 +37,7 @@ rustPlatform.buildRustPackage rec { checkFlags = [ # doctest that requires access outside sandbox "--skip=udev::hwdb::get" - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ # system_profiler is not available in the sandbox "--skip=test_run" ]; diff --git a/pkgs/by-name/cz/czkawka/package.nix b/pkgs/by-name/cz/czkawka/package.nix index 6e8cf21d298a..934b6d1dcafa 100644 --- a/pkgs/by-name/cz/czkawka/package.nix +++ b/pkgs/by-name/cz/czkawka/package.nix @@ -21,7 +21,7 @@ let buildRustPackage' = rustPlatform.buildRustPackage.override { - stdenv = if stdenv.isDarwin then overrideSDK stdenv "11.0" else stdenv; + stdenv = if stdenv.hostPlatform.isDarwin then overrideSDK stdenv "11.0" else stdenv; }; self = buildRustPackage' { diff --git a/pkgs/by-name/da/darklua/package.nix b/pkgs/by-name/da/darklua/package.nix index aa79d6048dd9..bf8576961b8b 100644 --- a/pkgs/by-name/da/darklua/package.nix +++ b/pkgs/by-name/da/darklua/package.nix @@ -19,7 +19,7 @@ rustPlatform.buildRustPackage rec { cargoHash = "sha256-fYx+SQdQMnNSygr0/Y4zEPtqfQPZYmQUq3ndi1HlXuE="; - buildInputs = lib.optionals stdenv.isDarwin [ darwin.apple_sdk.frameworks.CoreServices ]; + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.CoreServices ]; # error: linker `aarch64-linux-gnu-gcc` not found postPatch = '' diff --git a/pkgs/by-name/da/darktable/package.nix b/pkgs/by-name/da/darktable/package.nix index 5ccb4d1b63dc..e3a32dba4658 100644 --- a/pkgs/by-name/da/darktable/package.nix +++ b/pkgs/by-name/da/darktable/package.nix @@ -106,17 +106,17 @@ stdenv.mkDerivation rec { libaom portmidi lua - ] ++ lib.optionals stdenv.isLinux [ + ] ++ lib.optionals stdenv.hostPlatform.isLinux [ colord colord-gtk libX11 ocl-icd - ] ++ lib.optional stdenv.isDarwin gtk-mac-integration + ] ++ lib.optional stdenv.hostPlatform.isDarwin gtk-mac-integration ++ lib.optional stdenv.cc.isClang llvmPackages.openmp; cmakeFlags = [ "-DBUILD_USERMANUAL=False" - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ "-DUSE_COLORD=OFF" "-DUSE_KWALLET=OFF" ]; @@ -127,8 +127,8 @@ stdenv.mkDerivation rec { # the wrappers: preFixup = let - libPathEnvVar = if stdenv.isDarwin then "DYLD_LIBRARY_PATH" else "LD_LIBRARY_PATH"; - libPathPrefix = "$out/lib/darktable" + lib.optionalString stdenv.isLinux ":${ocl-icd}/lib"; + libPathEnvVar = if stdenv.hostPlatform.isDarwin then "DYLD_LIBRARY_PATH" else "LD_LIBRARY_PATH"; + libPathPrefix = "$out/lib/darktable" + lib.optionalString stdenv.hostPlatform.isLinux ":${ocl-icd}/lib"; in '' for f in $out/share/darktable/kernels/*.cl; do diff --git a/pkgs/by-name/da/darling-dmg/package.nix b/pkgs/by-name/da/darling-dmg/package.nix index 4fca75a45bc8..3053982a6476 100644 --- a/pkgs/by-name/da/darling-dmg/package.nix +++ b/pkgs/by-name/da/darling-dmg/package.nix @@ -15,7 +15,7 @@ stdenv.mkDerivation { nativeBuildInputs = [ cmake ]; buildInputs = [ fuse openssl zlib bzip2 libxml2 icu lzfse ] - ++ lib.optionals stdenv.isDarwin [ libiconv ]; + ++ lib.optionals stdenv.hostPlatform.isDarwin [ libiconv ]; CXXFLAGS = [ "-DCOMPILE_WITH_LZFSE=1" diff --git a/pkgs/by-name/db/dbd/package.nix b/pkgs/by-name/db/dbd/package.nix index 20658b4d716d..1df459cb3267 100644 --- a/pkgs/by-name/db/dbd/package.nix +++ b/pkgs/by-name/db/dbd/package.nix @@ -17,7 +17,7 @@ stdenv.mkDerivation { makeFlags = [ "PREFIX=${placeholder "out"}" "CC=${stdenv.cc.targetPrefix}cc" - ] ++ lib.optionals stdenv.isDarwin [ "darwin" ] ++ lib.optionals (stdenv.hostPlatform.isUnix && !stdenv.isDarwin) [ "unix" ]; + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ "darwin" ] ++ lib.optionals (stdenv.hostPlatform.isUnix && !stdenv.hostPlatform.isDarwin) [ "unix" ]; meta = with lib; { description = "Netcat-clone, designed to be portable and offer strong encryption"; diff --git a/pkgs/by-name/db/dbeaver-bin/package.nix b/pkgs/by-name/db/dbeaver-bin/package.nix index a8d3dbf0969f..9b5bf26200fb 100644 --- a/pkgs/by-name/db/dbeaver-bin/package.nix +++ b/pkgs/by-name/db/dbeaver-bin/package.nix @@ -41,22 +41,22 @@ stdenvNoCC.mkDerivation (finalAttrs: { inherit hash; }; - sourceRoot = lib.optional stdenvNoCC.isDarwin "dbeaver.app"; + sourceRoot = lib.optional stdenvNoCC.hostPlatform.isDarwin "dbeaver.app"; nativeBuildInputs = [ makeWrapper ] - ++ lib.optionals (!stdenvNoCC.isDarwin) [ + ++ lib.optionals (!stdenvNoCC.hostPlatform.isDarwin) [ gnused wrapGAppsHook3 autoPatchelfHook ] - ++ lib.optionals stdenvNoCC.isDarwin [ undmg ]; + ++ lib.optionals stdenvNoCC.hostPlatform.isDarwin [ undmg ]; dontConfigure = true; dontBuild = true; installPhase = - if !stdenvNoCC.isDarwin then + if !stdenvNoCC.hostPlatform.isDarwin then '' runHook preInstall diff --git a/pkgs/by-name/db/dbgate/package.nix b/pkgs/by-name/db/dbgate/package.nix index ab62dee5f391..58c88b65c0fe 100644 --- a/pkgs/by-name/db/dbgate/package.nix +++ b/pkgs/by-name/db/dbgate/package.nix @@ -40,7 +40,7 @@ let sourceProvenance = [ lib.sourceTypes.binaryNativeCode ]; }; in -if stdenv.isDarwin then +if stdenv.hostPlatform.isDarwin then stdenv.mkDerivation { inherit pname diff --git a/pkgs/by-name/db/dbqn/package.nix b/pkgs/by-name/db/dbqn/package.nix index 832148c928b0..7ec4dea05342 100644 --- a/pkgs/by-name/db/dbqn/package.nix +++ b/pkgs/by-name/db/dbqn/package.nix @@ -65,7 +65,7 @@ stdenv.mkDerivation rec { license = licenses.mit; maintainers = with maintainers; [ AndersonTorres sternenseemann ]; inherit (jdk.meta) platforms; - broken = stdenv.isDarwin; # never built on Hydra https://hydra.nixos.org/job/nixpkgs/staging-next/dbqn-native.x86_64-darwin + broken = stdenv.hostPlatform.isDarwin; # never built on Hydra https://hydra.nixos.org/job/nixpkgs/staging-next/dbqn-native.x86_64-darwin }; } # TODO: Processing app diff --git a/pkgs/by-name/de/debase/package.nix b/pkgs/by-name/de/debase/package.nix index d204f161d09b..a2761056f116 100644 --- a/pkgs/by-name/de/debase/package.nix +++ b/pkgs/by-name/de/debase/package.nix @@ -53,11 +53,11 @@ stdenv.mkDerivation rec { buildInputs = [ libgit2 - ] ++ lib.optionals stdenv.isDarwin [ darwin.apple_sdk_11_0.frameworks.Foundation ]; + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk_11_0.frameworks.Foundation ]; installPhase = '' runHook preInstall - install -Dm755 build-${if stdenv.isDarwin then "mac" else "linux"}/release/debase $out/bin/debase + install -Dm755 build-${if stdenv.hostPlatform.isDarwin then "mac" else "linux"}/release/debase $out/bin/debase runHook postInstall ''; @@ -65,9 +65,9 @@ stdenv.mkDerivation rec { makeFlags = [ "ARCHS=${ - if stdenv.isx86_64 then + if stdenv.hostPlatform.isx86_64 then "x86_64" - else if stdenv.isAarch64 then + else if stdenv.hostPlatform.isAarch64 then "arm64" else abort "unsupported system: ${stdenv.system}" diff --git a/pkgs/by-name/de/deltachat-desktop/package.nix b/pkgs/by-name/de/deltachat-desktop/package.nix index dd647ef0ebf2..78f7c75d4e03 100644 --- a/pkgs/by-name/de/deltachat-desktop/package.nix +++ b/pkgs/by-name/de/deltachat-desktop/package.nix @@ -53,13 +53,13 @@ buildNpmPackage rec { makeWrapper pkg-config python3 - ] ++ lib.optionals stdenv.isLinux [ + ] ++ lib.optionals stdenv.hostPlatform.isLinux [ copyDesktopItems ]; buildInputs = [ deltachat-rpc-server - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.CoreServices ]; diff --git a/pkgs/by-name/de/deploy-rs/package.nix b/pkgs/by-name/de/deploy-rs/package.nix index 9830785e6a30..a4b85ff3dce9 100644 --- a/pkgs/by-name/de/deploy-rs/package.nix +++ b/pkgs/by-name/de/deploy-rs/package.nix @@ -19,7 +19,7 @@ rustPlatform.buildRustPackage { cargoHash = "sha256-lsW810bktMzHZIbuN3pz9N+IUcjNtE5J2AuB/G6pGWI="; - buildInputs = lib.optionals stdenv.isDarwin [ + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.CoreServices darwin.apple_sdk.frameworks.SystemConfiguration ]; diff --git a/pkgs/by-name/de/devenv/package.nix b/pkgs/by-name/de/devenv/package.nix index 29c8333e4117..f940c8390f7b 100644 --- a/pkgs/by-name/de/devenv/package.nix +++ b/pkgs/by-name/de/devenv/package.nix @@ -45,7 +45,7 @@ in rustPlatform.buildRustPackage { nativeBuildInputs = [ makeWrapper pkg-config ]; - buildInputs = [ openssl ] ++ lib.optionals stdenv.isDarwin [ + buildInputs = [ openssl ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.SystemConfiguration ]; diff --git a/pkgs/by-name/de/dezoomify-rs/package.nix b/pkgs/by-name/de/dezoomify-rs/package.nix index c639c99b1b64..2443c1aa6adb 100644 --- a/pkgs/by-name/de/dezoomify-rs/package.nix +++ b/pkgs/by-name/de/dezoomify-rs/package.nix @@ -19,7 +19,7 @@ rustPlatform.buildRustPackage rec { cargoHash = "sha256-K9LNommagWjVxOXq6YUE4eg/3zpj3+MR5BugGCcVUlA="; - buildInputs = lib.optionals stdenv.isDarwin ( + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin ( with darwin.apple_sdk.frameworks; [ SystemConfiguration diff --git a/pkgs/by-name/di/dialog/package.nix b/pkgs/by-name/di/dialog/package.nix index 23f75bb1c994..9ef364729933 100644 --- a/pkgs/by-name/di/dialog/package.nix +++ b/pkgs/by-name/di/dialog/package.nix @@ -3,7 +3,7 @@ , fetchurl , libtool , ncurses -, enableShared ? !stdenv.isDarwin && !stdenv.hostPlatform.isStatic +, enableShared ? !stdenv.hostPlatform.isDarwin && !stdenv.hostPlatform.isStatic , unicodeSupport ? true , withLibrary ? true }: diff --git a/pkgs/by-name/di/diesel-cli/package.nix b/pkgs/by-name/di/diesel-cli/package.nix index 6dc17f197d2b..04f610061599 100644 --- a/pkgs/by-name/di/diesel-cli/package.nix +++ b/pkgs/by-name/di/diesel-cli/package.nix @@ -44,8 +44,8 @@ rustPlatform.buildRustPackage rec { buildInputs = [ openssl ] - ++ lib.optional stdenv.isDarwin darwin.apple_sdk.frameworks.Security - ++ lib.optional (stdenv.isDarwin && mysqlSupport) libiconv + ++ lib.optional stdenv.hostPlatform.isDarwin darwin.apple_sdk.frameworks.Security + ++ lib.optional (stdenv.hostPlatform.isDarwin && mysqlSupport) libiconv ++ lib.optional sqliteSupport sqlite ++ lib.optional postgresqlSupport postgresql ++ lib.optionals mysqlSupport [ diff --git a/pkgs/by-name/di/dim/package.nix b/pkgs/by-name/di/dim/package.nix index f7fe86ab9a98..53ab3a0ed685 100644 --- a/pkgs/by-name/di/dim/package.nix +++ b/pkgs/by-name/di/dim/package.nix @@ -77,7 +77,7 @@ rustPlatform.buildRustPackage rec { buildInputs = [ sqlite ] - ++ lib.optional stdenv.isDarwin [ + ++ lib.optional stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.Security darwin.apple_sdk.frameworks.CoreServices darwin.apple_sdk.frameworks.SystemConfiguration diff --git a/pkgs/by-name/di/disarchive/package.nix b/pkgs/by-name/di/disarchive/package.nix index 9bc24e531552..8b908d40a659 100644 --- a/pkgs/by-name/di/disarchive/package.nix +++ b/pkgs/by-name/di/disarchive/package.nix @@ -41,7 +41,7 @@ stdenv.mkDerivation rec { guile-lzma ]; - doCheck = !stdenv.isDarwin; + doCheck = !stdenv.hostPlatform.isDarwin; nativeCheckInputs = [ guile-quickcheck diff --git a/pkgs/by-name/di/discord-gamesdk/package.nix b/pkgs/by-name/di/discord-gamesdk/package.nix index 7f38bfd45760..5d7a8185be45 100644 --- a/pkgs/by-name/di/discord-gamesdk/package.nix +++ b/pkgs/by-name/di/discord-gamesdk/package.nix @@ -22,7 +22,7 @@ stdenv.mkDerivation rec { buildInputs = [ (stdenv.cc.cc.libgcc or null) ]; - nativeBuildInputs = lib.optional stdenv.isLinux autoPatchelfHook; + nativeBuildInputs = lib.optional stdenv.hostPlatform.isLinux autoPatchelfHook; installPhase = let diff --git a/pkgs/by-name/dm/dmd/generic.nix b/pkgs/by-name/dm/dmd/generic.nix index 51c814832072..cf8cae7b4f5a 100644 --- a/pkgs/by-name/dm/dmd/generic.nix +++ b/pkgs/by-name/dm/dmd/generic.nix @@ -37,7 +37,7 @@ let bits = builtins.toString stdenv.hostPlatform.parsed.cpu.bits; osname = - if stdenv.isDarwin then + if stdenv.hostPlatform.isDarwin then "osx" else stdenv.hostPlatform.parsed.kernel.name; @@ -106,9 +106,9 @@ stdenv.mkDerivation (finalAttrs: { rm dmd/compiler/test/dshell/test6952.d '' + lib.optionalString (lib.versionAtLeast version "2.092.2") '' substituteInPlace dmd/compiler/test/dshell/test6952.d --replace-fail "/usr/bin/env bash" "${bash}/bin/bash" - '' + lib.optionalString stdenv.isLinux '' + '' + lib.optionalString stdenv.hostPlatform.isLinux '' substituteInPlace phobos/std/socket.d --replace-fail "assert(ih.addrList[0] == 0x7F_00_00_01);" "" - '' + lib.optionalString stdenv.isDarwin '' + '' + lib.optionalString stdenv.hostPlatform.isDarwin '' substituteInPlace phobos/std/socket.d --replace-fail "foreach (name; names)" "names = []; foreach (name; names)" ''; @@ -123,7 +123,7 @@ stdenv.mkDerivation (finalAttrs: { buildInputs = [ curl tzdata - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ Foundation ]; @@ -224,6 +224,6 @@ stdenv.mkDerivation (finalAttrs: { platforms = [ "x86_64-linux" "i686-linux" "x86_64-darwin" ]; # ld: section __DATA/__thread_bss has type zero-fill but non-zero file offset file '/private/tmp/nix-build-dmd-2.109.1.drv-0/.rdmd-301/rdmd-build.d-A1CF043A7D87C5E88A58F3C0EF5A0DF7/objs/build.o' for architecture x86_64 # clang-16: error: linker command failed with exit code 1 (use -v to see invocation) - broken = stdenv.isDarwin && stdenv.isx86_64; + broken = stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isx86_64; }; }) diff --git a/pkgs/by-name/do/docfd/package.nix b/pkgs/by-name/do/docfd/package.nix index 11ddaace86fe..e4828191c0c6 100644 --- a/pkgs/by-name/do/docfd/package.nix +++ b/pkgs/by-name/do/docfd/package.nix @@ -16,7 +16,7 @@ let # Needed for x86_64-darwin buildDunePackage' = ocamlPackages.buildDunePackage.override { - stdenv = if stdenv.isDarwin then overrideSDK stdenv "11.0" else stdenv; + stdenv = if stdenv.hostPlatform.isDarwin then overrideSDK stdenv "11.0" else stdenv; }; in buildDunePackage' rec { diff --git a/pkgs/by-name/do/docuum/package.nix b/pkgs/by-name/do/docuum/package.nix index 3eae913da1e1..68409ca05651 100644 --- a/pkgs/by-name/do/docuum/package.nix +++ b/pkgs/by-name/do/docuum/package.nix @@ -23,7 +23,7 @@ rustPlatform.buildRustPackage rec { "--skip=format::tests::code_str_display" ]; - buildInputs = lib.optionals stdenv.isDarwin [ + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.IOKit ]; diff --git a/pkgs/by-name/do/dogedns/package.nix b/pkgs/by-name/do/dogedns/package.nix index 0c94a9506d2c..c6afe1ab7822 100644 --- a/pkgs/by-name/do/dogedns/package.nix +++ b/pkgs/by-name/do/dogedns/package.nix @@ -29,9 +29,9 @@ rustPlatform.buildRustPackage rec { ]; nativeBuildInputs = [ installShellFiles pandoc ] - ++ lib.optionals stdenv.isLinux [ pkg-config ]; - buildInputs = lib.optionals stdenv.isLinux [ openssl ] - ++ lib.optionals stdenv.isDarwin [ darwin.apple_sdk.frameworks.Security ]; + ++ lib.optionals stdenv.hostPlatform.isLinux [ pkg-config ]; + buildInputs = lib.optionals stdenv.hostPlatform.isLinux [ openssl ] + ++ lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.Security ]; postInstall = '' installShellCompletion completions/doge.{bash,fish,zsh} diff --git a/pkgs/by-name/do/dosbox-staging/package.nix b/pkgs/by-name/do/dosbox-staging/package.nix index f4cab21b1b30..d23466447ecc 100644 --- a/pkgs/by-name/do/dosbox-staging/package.nix +++ b/pkgs/by-name/do/dosbox-staging/package.nix @@ -80,8 +80,8 @@ stdenv.mkDerivation (finalAttrs: { speexdsp zlib-ng ] - ++ lib.optionals stdenv.isLinux [ alsa-lib ] - ++ lib.optionals stdenv.isDarwin ( + ++ lib.optionals stdenv.hostPlatform.isLinux [ alsa-lib ] + ++ lib.optionals stdenv.hostPlatform.isDarwin ( with darwin.apple_sdk.frameworks; [ AudioUnit diff --git a/pkgs/by-name/do/dotter/package.nix b/pkgs/by-name/do/dotter/package.nix index 441fbf6cc4e8..e2897b83a348 100644 --- a/pkgs/by-name/do/dotter/package.nix +++ b/pkgs/by-name/do/dotter/package.nix @@ -22,7 +22,7 @@ rustPlatform.buildRustPackage rec { cargoHash = "sha256-LEOORHD0j+HVl/fB9Q2xVZ2AxZKsPE5SeOS1ZsKwTSo="; - buildInputs = lib.optionals stdenv.isDarwin [ darwin.apple_sdk.frameworks.CoreServices ]; + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.CoreServices ]; nativeCheckInputs = [ which diff --git a/pkgs/by-name/ds/dssat/package.nix b/pkgs/by-name/ds/dssat/package.nix index 7d57195dcde4..4b40302c415d 100644 --- a/pkgs/by-name/ds/dssat/package.nix +++ b/pkgs/by-name/ds/dssat/package.nix @@ -51,7 +51,7 @@ stdenv.mkDerivation (final: { makeWrapper ]; - buildInputs = lib.optionals stdenv.isLinux [ glibc.static ]; + buildInputs = lib.optionals stdenv.hostPlatform.isLinux [ glibc.static ]; cmakeFlags = [ "-DCMAKE_INSTALL_PREFIX=${placeholder "out"}/share/dssat/" ]; @@ -69,6 +69,6 @@ stdenv.mkDerivation (final: { license = lib.licenses.bsd3; maintainers = with lib.maintainers; [ pcboy ]; platforms = lib.platforms.unix; - broken = stdenv.isAarch64 && stdenv.isLinux; + broken = stdenv.hostPlatform.isAarch64 && stdenv.hostPlatform.isLinux; }; }) diff --git a/pkgs/by-name/du/dub/package.nix b/pkgs/by-name/du/dub/package.nix index 1416b06fc13f..c6782b49070e 100644 --- a/pkgs/by-name/du/dub/package.nix +++ b/pkgs/by-name/du/dub/package.nix @@ -36,7 +36,7 @@ stdenv.mkDerivation (finalAttrs: { runHook postBuild ''; - doCheck = !stdenv.isDarwin; + doCheck = !stdenv.hostPlatform.isDarwin; checkPhase = '' runHook preCheck diff --git a/pkgs/by-name/du/dublin-traceroute/package.nix b/pkgs/by-name/du/dublin-traceroute/package.nix index 5e797cf97b57..0ec5ac87ef61 100644 --- a/pkgs/by-name/du/dublin-traceroute/package.nix +++ b/pkgs/by-name/du/dublin-traceroute/package.nix @@ -37,6 +37,6 @@ stdenv.mkDerivation { maintainers = with maintainers; [ baloo ]; platforms = platforms.unix; mainProgram = "dublin-traceroute"; - broken = stdenv.isDarwin; + broken = stdenv.hostPlatform.isDarwin; }; } diff --git a/pkgs/by-name/du/dumbpipe/package.nix b/pkgs/by-name/du/dumbpipe/package.nix index 9dc1e12cbac9..4e6bad9004c5 100644 --- a/pkgs/by-name/du/dumbpipe/package.nix +++ b/pkgs/by-name/du/dumbpipe/package.nix @@ -18,7 +18,7 @@ rustPlatform.buildRustPackage rec { cargoHash = "sha256-rlhfGw/b0HnV1Xl9VWIqEuyM9pq29O6bpaawk2hnG+o="; - buildInputs = lib.optionals stdenv.isDarwin ( + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin ( with darwin.apple_sdk.frameworks; [ SystemConfiguration ] diff --git a/pkgs/by-name/du/dummyhttp/package.nix b/pkgs/by-name/du/dummyhttp/package.nix index 0676e970a81f..59ca3d3344a0 100644 --- a/pkgs/by-name/du/dummyhttp/package.nix +++ b/pkgs/by-name/du/dummyhttp/package.nix @@ -18,7 +18,7 @@ rustPlatform.buildRustPackage rec { cargoHash = "sha256-bw0VlPHjNZkpLVJZrB3aaQGkwvQpkJGIn+hi0yn2M4s="; - buildInputs = lib.optionals stdenv.isDarwin [ + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.Security ]; diff --git a/pkgs/by-name/du/dune3d/package.nix b/pkgs/by-name/du/dune3d/package.nix index 122a9691c53b..b1e1863581b8 100644 --- a/pkgs/by-name/du/dune3d/package.nix +++ b/pkgs/by-name/du/dune3d/package.nix @@ -24,7 +24,7 @@ }: let - stdenv' = if stdenv.isDarwin then llvmPackages_17.stdenv else stdenv; + stdenv' = if stdenv.hostPlatform.isDarwin then llvmPackages_17.stdenv else stdenv; opencascade-occt = opencascade-occt_7_6; in stdenv'.mkDerivation (finalAttrs: { @@ -45,7 +45,7 @@ stdenv'.mkDerivation (finalAttrs: { pkg-config wrapGAppsHook3 libxml2 # for xmllints - ] ++ lib.optional stdenv.isDarwin desktopToDarwinBundle; + ] ++ lib.optional stdenv.hostPlatform.isDarwin desktopToDarwinBundle; buildInputs = [ cmake @@ -55,7 +55,7 @@ stdenv'.mkDerivation (finalAttrs: { libepoxy librsvg libspnav - (if stdenv.isLinux then libuuid else libossp_uuid) + (if stdenv.hostPlatform.isLinux then libuuid else libossp_uuid) opencascade-occt (python3.withPackages (pp: [ pp.pygobject3 diff --git a/pkgs/by-name/du/dust/package.nix b/pkgs/by-name/du/dust/package.nix index cf13173519ac..53b095574898 100644 --- a/pkgs/by-name/du/dust/package.nix +++ b/pkgs/by-name/du/dust/package.nix @@ -23,7 +23,7 @@ rustPlatform.buildRustPackage rec { nativeBuildInputs = [ installShellFiles ]; - buildInputs = lib.optionals stdenv.isDarwin [ AppKit ]; + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ AppKit ]; doCheck = false; diff --git a/pkgs/by-name/dx/dxvk/package.nix b/pkgs/by-name/dx/dxvk/package.nix index 9a82a2a20b57..144bfe33609b 100644 --- a/pkgs/by-name/dx/dxvk/package.nix +++ b/pkgs/by-name/dx/dxvk/package.nix @@ -26,7 +26,7 @@ stdenvNoCC.mkDerivation ( mingwW64Stdenv = useWin32ThreadModel pkgsCross.mingwW64.stdenv; dxvk32 = - if stdenvNoCC.isDarwin then + if stdenvNoCC.hostPlatform.isDarwin then pkgsCross.mingw32.dxvk_1.override { stdenv = mingw32Stdenv; enableMoltenVKCompat = true; @@ -35,7 +35,7 @@ stdenvNoCC.mkDerivation ( pkgsCross.mingw32.dxvk_2.override { stdenv = mingw32Stdenv; }; dxvk64 = - if stdenvNoCC.isDarwin then + if stdenvNoCC.hostPlatform.isDarwin then pkgsCross.mingwW64.dxvk_1.override { stdenv = mingwW64Stdenv; enableMoltenVKCompat = true; diff --git a/pkgs/by-name/ea/easytier/package.nix b/pkgs/by-name/ea/easytier/package.nix index 9928fd07b0db..7deb797435f6 100644 --- a/pkgs/by-name/ea/easytier/package.nix +++ b/pkgs/by-name/ea/easytier/package.nix @@ -24,12 +24,12 @@ rustPlatform.buildRustPackage rec { nativeBuildInputs = [ protobuf ]; - buildInputs = lib.optionals stdenv.isDarwin [ + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.Security ]; - buildNoDefaultFeatures = stdenv.isMips; - buildFeatures = lib.optional stdenv.isMips "mips" ++ lib.optional withQuic "quic"; + buildNoDefaultFeatures = stdenv.hostPlatform.isMips; + buildFeatures = lib.optional stdenv.hostPlatform.isMips "mips" ++ lib.optional withQuic "quic"; doCheck = false; # tests failed due to heavy rely on network diff --git a/pkgs/by-name/ed/edk2/package.nix b/pkgs/by-name/ed/edk2/package.nix index 0f50c45e6487..b4919f27efb0 100644 --- a/pkgs/by-name/ed/edk2/package.nix +++ b/pkgs/by-name/ed/edk2/package.nix @@ -13,13 +13,13 @@ let pythonEnv = buildPackages.python3.withPackages (ps: [ps.tkinter]); -targetArch = if stdenv.isi686 then +targetArch = if stdenv.hostPlatform.isi686 then "IA32" -else if stdenv.isx86_64 then +else if stdenv.hostPlatform.isx86_64 then "X64" -else if stdenv.isAarch32 then +else if stdenv.hostPlatform.isAarch32 then "ARM" -else if stdenv.isAarch64 then +else if stdenv.hostPlatform.isAarch64 then "AARCH64" else if stdenv.hostPlatform.isRiscV64 then "RISCV64" @@ -28,7 +28,7 @@ else if stdenv.hostPlatform.isLoongArch64 then else throw "Unsupported architecture"; -buildType = if stdenv.isDarwin then +buildType = if stdenv.hostPlatform.isDarwin then "CLANGPDB" else "GCC5"; @@ -108,7 +108,7 @@ edk2 = stdenv.mkDerivation { env.NIX_CFLAGS_COMPILE = "-Wno-return-type" + lib.optionalString (stdenv.cc.isGNU) " -Wno-error=stringop-truncation" - + lib.optionalString (stdenv.isDarwin) " -Wno-error=macro-redefined"; + + lib.optionalString (stdenv.hostPlatform.isDarwin) " -Wno-error=macro-redefined"; hardeningDisable = [ "format" "fortify" ]; diff --git a/pkgs/by-name/ek/ekho/package.nix b/pkgs/by-name/ek/ekho/package.nix index 043908298266..818c113ba0c2 100644 --- a/pkgs/by-name/ek/ekho/package.nix +++ b/pkgs/by-name/ek/ekho/package.nix @@ -36,7 +36,7 @@ stdenv.mkDerivation (finalAttrs: { nativeBuildInputs = [ pkg-config autoconf automake libtool ]; buildInputs = [ libsndfile libpulseaudio espeak-ng sonic utf8cpp ] - ++ lib.optionals stdenv.isDarwin [ darwin.apple_sdk.frameworks.AudioUnit ]; + ++ lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.AudioUnit ]; meta = with lib; { description = "Chinese text-to-speech software"; diff --git a/pkgs/by-name/en/en-croissant/package.nix b/pkgs/by-name/en/en-croissant/package.nix index b21364ed9e46..72019cbcb9c9 100644 --- a/pkgs/by-name/en/en-croissant/package.nix +++ b/pkgs/by-name/en/en-croissant/package.nix @@ -21,7 +21,7 @@ let buildRustPackage = rustPlatform.buildRustPackage.override { - stdenv = if stdenv.isDarwin then overrideSDK stdenv "11.0" else stdenv; + stdenv = if stdenv.hostPlatform.isDarwin then overrideSDK stdenv "11.0" else stdenv; }; in buildRustPackage rec { @@ -59,11 +59,11 @@ buildRustPackage rec { cargo-tauri pkg-config ] - ++ lib.optionals stdenv.isLinux [ wrapGAppsHook3 ] - ++ lib.optionals stdenv.isDarwin [ makeBinaryWrapper ]; + ++ lib.optionals stdenv.hostPlatform.isLinux [ wrapGAppsHook3 ] + ++ lib.optionals stdenv.hostPlatform.isDarwin [ makeBinaryWrapper ]; buildInputs = - lib.optionals stdenv.isLinux [ + lib.optionals stdenv.hostPlatform.isLinux [ openssl libsoup webkitgtk @@ -72,7 +72,7 @@ buildRustPackage rec { gst_all_1.gst-plugins-bad gst_all_1.gst-plugins-good ] - ++ lib.optionals stdenv.isDarwin [ + ++ lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk_11_0.frameworks.Cocoa darwin.apple_sdk_11_0.frameworks.WebKit ]; @@ -82,7 +82,7 @@ buildRustPackage rec { buildPhase = '' runHook preBuild - cargo tauri build --bundles ${if stdenv.isDarwin then "app" else "deb"} + cargo tauri build --bundles ${if stdenv.hostPlatform.isDarwin then "app" else "deb"} runHook postBuild ''; @@ -93,12 +93,12 @@ buildRustPackage rec { installPhase = '' runHook preInstall - ${lib.optionalString stdenv.isDarwin '' + ${lib.optionalString stdenv.hostPlatform.isDarwin '' mkdir -p "$out"/Applications cp -r src-tauri/target/release/bundle/macos/* "$out"/Applications ''} - ${lib.optionalString stdenv.isLinux '' + ${lib.optionalString stdenv.hostPlatform.isLinux '' mkdir -p "$out" cp -r src-tauri/target/release/bundle/deb/*/data/usr/* "$out" ''} @@ -106,7 +106,7 @@ buildRustPackage rec { runHook postInstall ''; - postInstall = lib.optionalString stdenv.isDarwin '' + postInstall = lib.optionalString stdenv.hostPlatform.isDarwin '' makeWrapper "$out"/Applications/en-croissant.app/Contents/MacOS/en-croissant $out/bin/en-croissant ''; diff --git a/pkgs/by-name/en/envio/package.nix b/pkgs/by-name/en/envio/package.nix index 0424bcf4e9bd..b1037be41ac7 100644 --- a/pkgs/by-name/en/envio/package.nix +++ b/pkgs/by-name/en/envio/package.nix @@ -27,7 +27,7 @@ rustPlatform.buildRustPackage rec { nativeBuildInputs = [ pkg-config ]; buildInputs = [ libgpg-error gpgme ] - ++ lib.optionals stdenv.isDarwin [ Security ]; + ++ lib.optionals stdenv.hostPlatform.isDarwin [ Security ]; # Remove postPatch when updating to the next envio release # For details see https://github.com/envio-cli/envio/pull/31 diff --git a/pkgs/by-name/en/envoy/package.nix b/pkgs/by-name/en/envoy/package.nix index 425184598af6..b6a0b7701410 100644 --- a/pkgs/by-name/en/envoy/package.nix +++ b/pkgs/by-name/en/envoy/package.nix @@ -172,7 +172,7 @@ buildBazelPackage { "--define=wasm=${wasmRuntime}" ] - ++ (lib.optionals stdenv.isAarch64 [ + ++ (lib.optionals stdenv.hostPlatform.isAarch64 [ # external/com_github_google_tcmalloc/tcmalloc/internal/percpu_tcmalloc.h:611:9: error: expected ':' or '::' before '[' token # 611 | : [end_ptr] "=&r"(end_ptr), [cpu_id] "=&r"(cpu_id), # | ^ diff --git a/pkgs/by-name/ep/epoll-shim/package.nix b/pkgs/by-name/ep/epoll-shim/package.nix index bbb49c8ec7c0..63deaaf9df9e 100644 --- a/pkgs/by-name/ep/epoll-shim/package.nix +++ b/pkgs/by-name/ep/epoll-shim/package.nix @@ -26,7 +26,7 @@ stdenv.mkDerivation (finalAttrs: { # https://github.com/jiixyj/epoll-shim/issues/41 # https://github.com/jiixyj/epoll-shim/pull/34 - doCheck = !stdenv.isDarwin; + doCheck = !stdenv.hostPlatform.isDarwin; meta = with lib; { description = "Small epoll implementation using kqueue"; diff --git a/pkgs/by-name/es/eslint/package.nix b/pkgs/by-name/es/eslint/package.nix index b1e2732a2804..6ad9acd2afc0 100644 --- a/pkgs/by-name/es/eslint/package.nix +++ b/pkgs/by-name/es/eslint/package.nix @@ -7,7 +7,7 @@ }: let buildNpmPackage' = buildNpmPackage.override { - stdenv = if stdenv.isDarwin then overrideSDK stdenv "11.0" else stdenv; + stdenv = if stdenv.hostPlatform.isDarwin then overrideSDK stdenv "11.0" else stdenv; }; in buildNpmPackage' rec { diff --git a/pkgs/by-name/es/espflash/package.nix b/pkgs/by-name/es/espflash/package.nix index 2b6baaf48e9f..aad2b117ebb4 100644 --- a/pkgs/by-name/es/espflash/package.nix +++ b/pkgs/by-name/es/espflash/package.nix @@ -32,9 +32,9 @@ rustPlatform.buildRustPackage rec { # Needed to get openssl-sys to use pkg-config. OPENSSL_NO_VENDOR = 1; - buildInputs = [ openssl ] ++ lib.optionals stdenv.isLinux [ + buildInputs = [ openssl ] ++ lib.optionals stdenv.hostPlatform.isLinux [ udev - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ CoreServices Security SystemConfiguration diff --git a/pkgs/by-name/ev/evebox/package.nix b/pkgs/by-name/ev/evebox/package.nix index 29062726c15e..4b09fba8675b 100644 --- a/pkgs/by-name/ev/evebox/package.nix +++ b/pkgs/by-name/ev/evebox/package.nix @@ -28,6 +28,6 @@ rustPlatform.buildRustPackage rec { changelog = "https://github.com/jasonish/evebox/releases/tag/${src.rev}"; license = lib.licenses.mit; maintainers = with lib.maintainers; [ felbinger ]; - broken = stdenv.isDarwin; + broken = stdenv.hostPlatform.isDarwin; }; } diff --git a/pkgs/by-name/ev/evolution-data-server/package.nix b/pkgs/by-name/ev/evolution-data-server/package.nix index 228e20ae0eab..91e9ebba95d3 100644 --- a/pkgs/by-name/ev/evolution-data-server/package.nix +++ b/pkgs/by-name/ev/evolution-data-server/package.nix @@ -30,7 +30,7 @@ , ninja , libkrb5 , openldap -, enableOAuth2 ? stdenv.isLinux +, enableOAuth2 ? stdenv.hostPlatform.isLinux , webkitgtk_4_1 , webkitgtk_6_0 , json-glib @@ -106,7 +106,7 @@ stdenv.mkDerivation rec { libphonenumber boost protobuf - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ libiconv ] ++ lib.optionals withGtk3 [ gtk3 @@ -141,14 +141,14 @@ stdenv.mkDerivation rec { "-DENABLE_OAUTH2_WEBKITGTK4=${lib.boolToString (withGtk4 && enableOAuth2)}" ]; - postPatch = lib.optionalString stdenv.isDarwin '' + postPatch = lib.optionalString stdenv.hostPlatform.isDarwin '' substituteInPlace cmake/modules/SetupBuildFlags.cmake \ --replace "-Wl,--no-undefined" "" substituteInPlace src/services/evolution-alarm-notify/e-alarm-notify.c \ --replace "G_OS_WIN32" "__APPLE__" ''; - postInstall = lib.optionalString stdenv.isDarwin '' + postInstall = lib.optionalString stdenv.hostPlatform.isDarwin '' ln -s $out/lib/evolution-data-server/*.dylib $out/lib/ ''; diff --git a/pkgs/by-name/ew/eww/package.nix b/pkgs/by-name/ew/eww/package.nix index 1c3ba7798c1f..41bf6c7b5500 100644 --- a/pkgs/by-name/ew/eww/package.nix +++ b/pkgs/by-name/ew/eww/package.nix @@ -72,6 +72,6 @@ rustPlatform.buildRustPackage rec { w-lfchen ]; mainProgram = "eww"; - broken = stdenv.isDarwin; + broken = stdenv.hostPlatform.isDarwin; }; } diff --git a/pkgs/by-name/ex/ext4fuse/package.nix b/pkgs/by-name/ex/ext4fuse/package.nix index b083ec1c63f4..4ab5612fe8f5 100644 --- a/pkgs/by-name/ex/ext4fuse/package.nix +++ b/pkgs/by-name/ex/ext4fuse/package.nix @@ -24,7 +24,7 @@ stdenv.mkDerivation (finalAttrs: { which ]; - buildInputs = [ (if stdenv.isDarwin then macfuse-stubs else fuse) ]; + buildInputs = [ (if stdenv.hostPlatform.isDarwin then macfuse-stubs else fuse) ]; installPhase = '' runHook preInstall diff --git a/pkgs/by-name/ez/eza/package.nix b/pkgs/by-name/ez/eza/package.nix index 627376f49d2d..3380e98a1171 100644 --- a/pkgs/by-name/ez/eza/package.nix +++ b/pkgs/by-name/ez/eza/package.nix @@ -30,7 +30,7 @@ rustPlatform.buildRustPackage rec { nativeBuildInputs = [ cmake pkg-config installShellFiles pandoc ]; buildInputs = [ zlib ] - ++ lib.optionals stdenv.isDarwin [ libiconv darwin.apple_sdk.frameworks.Security ]; + ++ lib.optionals stdenv.hostPlatform.isDarwin [ libiconv darwin.apple_sdk.frameworks.Security ]; buildNoDefaultFeatures = true; buildFeatures = lib.optional gitSupport "git"; diff --git a/pkgs/by-name/fa/facter/package.nix b/pkgs/by-name/fa/facter/package.nix index fa92def6b1bc..8d5f3bc03add 100644 --- a/pkgs/by-name/fa/facter/package.nix +++ b/pkgs/by-name/fa/facter/package.nix @@ -35,7 +35,7 @@ bundlerApp { procps util-linux ] - ++ lib.optionals stdenv.isLinux [ + ++ lib.optionals stdenv.hostPlatform.isLinux [ iproute2 virt-what zfs diff --git a/pkgs/by-name/fa/fail2ban/package.nix b/pkgs/by-name/fa/fail2ban/package.nix index 20f89c501dde..6943ccc447a0 100644 --- a/pkgs/by-name/fa/fail2ban/package.nix +++ b/pkgs/by-name/fa/fail2ban/package.nix @@ -23,7 +23,7 @@ python3.pkgs.buildPythonApplication rec { nativeBuildInputs = [ installShellFiles ]; pythonPath = with python3.pkgs; - lib.optionals stdenv.isLinux [ + lib.optionals stdenv.hostPlatform.isLinux [ systemd pyinotify @@ -83,7 +83,7 @@ python3.pkgs.buildPythonApplication rec { rm $out/bin/fail2ban-python ln -s ${python3.interpreter} $out/bin/fail2ban-python - '' + lib.optionalString stdenv.isLinux '' + '' + lib.optionalString stdenv.hostPlatform.isLinux '' # see https://github.com/NixOS/nixpkgs/issues/4968 rm -r "${sitePackages}/usr" ''; diff --git a/pkgs/by-name/fa/fastfetch/package.nix b/pkgs/by-name/fa/fastfetch/package.nix index 05723d9fa4a6..3a52b165b58a 100644 --- a/pkgs/by-name/fa/fastfetch/package.nix +++ b/pkgs/by-name/fa/fastfetch/package.nix @@ -43,7 +43,7 @@ x11Support ? true, }: let - stdenv' = if stdenv.isDarwin then overrideSDK stdenv "11.0" else stdenv; + stdenv' = if stdenv.hostPlatform.isDarwin then overrideSDK stdenv "11.0" else stdenv; in stdenv'.mkDerivation (finalAttrs: { pname = "fastfetch"; @@ -77,7 +77,7 @@ stdenv'.mkDerivation (finalAttrs: { sqlite yyjson ] - ++ lib.optionals stdenv.isLinux [ + ++ lib.optionals stdenv.hostPlatform.isLinux [ dbus dconf ddcutil @@ -103,8 +103,8 @@ stdenv'.mkDerivation (finalAttrs: { xorg.libXdmcp xorg.libXext ] - ++ lib.optionals (x11Support && (!stdenv.isDarwin)) [ xfce.xfconf ] - ++ lib.optionals stdenv.isDarwin ( + ++ lib.optionals (x11Support && (!stdenv.hostPlatform.isDarwin)) [ xfce.xfconf ] + ++ lib.optionals stdenv.hostPlatform.isDarwin ( with darwin.apple_sdk_11_0.frameworks; [ Apple80211 @@ -138,10 +138,10 @@ stdenv'.mkDerivation (finalAttrs: { (lib.cmakeBool "ENABLE_X11" x11Support) (lib.cmakeBool "ENABLE_XCB" x11Support) (lib.cmakeBool "ENABLE_XCB_RANDR" x11Support) - (lib.cmakeBool "ENABLE_XFCONF" (x11Support && (!stdenv.isDarwin))) + (lib.cmakeBool "ENABLE_XFCONF" (x11Support && (!stdenv.hostPlatform.isDarwin))) (lib.cmakeBool "ENABLE_XRANDR" x11Support) ] - ++ lib.optionals stdenv.isLinux [ + ++ lib.optionals stdenv.hostPlatform.isLinux [ (lib.cmakeOptionType "filepath" "CUSTOM_PCI_IDS_PATH" "${hwdata}/share/hwdata/pci.ids") (lib.cmakeOptionType "filepath" "CUSTOM_AMDGPU_IDS_PATH" "${libdrm}/share/libdrm/amdgpu.ids") ]; diff --git a/pkgs/by-name/fa/fastqc/package.nix b/pkgs/by-name/fa/fastqc/package.nix index e7973ab0d602..9c63a98e7711 100644 --- a/pkgs/by-name/fa/fastqc/package.nix +++ b/pkgs/by-name/fa/fastqc/package.nix @@ -23,8 +23,8 @@ stdenv.mkDerivation (finalAttrs: { dontBuild = true; nativeBuildInputs = [ makeWrapper imagemagick ] - ++ lib.optional stdenv.isLinux copyDesktopItems # postInstallHook - ++ lib.optional stdenv.isDarwin desktopToDarwinBundle; #fixupOutputHook + ++ lib.optional stdenv.hostPlatform.isLinux copyDesktopItems # postInstallHook + ++ lib.optional stdenv.hostPlatform.isDarwin desktopToDarwinBundle; #fixupOutputHook buildInputs = [ jre perl]; desktopItem = (makeDesktopItem { diff --git a/pkgs/by-name/fa/fatrop/package.nix b/pkgs/by-name/fa/fatrop/package.nix index e85eede1e2d9..87d66c67802a 100644 --- a/pkgs/by-name/fa/fatrop/package.nix +++ b/pkgs/by-name/fa/fatrop/package.nix @@ -35,7 +35,7 @@ stdenv.mkDerivation (finalAttrs: { buildInputs = [ blasfeo ] ++ lib.optionals pythonSupport [ python3Packages.pybind11 ] - ++ lib.optionals stdenv.isDarwin [ llvmPackages.openmp ]; + ++ lib.optionals stdenv.hostPlatform.isDarwin [ llvmPackages.openmp ]; cmakeFlags = [ (lib.cmakeBool "BUILD_DOCS" true) diff --git a/pkgs/by-name/fe/febio-studio/package.nix b/pkgs/by-name/fe/febio-studio/package.nix index 654046067dc8..5897fae85a1a 100644 --- a/pkgs/by-name/fe/febio-studio/package.nix +++ b/pkgs/by-name/fe/febio-studio/package.nix @@ -25,7 +25,7 @@ let stdenv' = - if stdenv.isDarwin then + if stdenv.hostPlatform.isDarwin then overrideSDK stdenv { darwinSdkVersion = "11.0"; darwinMinVersion = "10.15"; diff --git a/pkgs/by-name/fe/febio/package.nix b/pkgs/by-name/fe/febio/package.nix index 01897ae76036..3f70ad711d76 100644 --- a/pkgs/by-name/fe/febio/package.nix +++ b/pkgs/by-name/fe/febio/package.nix @@ -14,7 +14,7 @@ }: let - stdenv' = if stdenv.isDarwin then overrideSDK stdenv "11.0" else stdenv; + stdenv' = if stdenv.hostPlatform.isDarwin then overrideSDK stdenv "11.0" else stdenv; in stdenv'.mkDerivation (finalAttrs: { @@ -56,7 +56,7 @@ stdenv'.mkDerivation (finalAttrs: { buildInputs = [ zlib ] ++ lib.optionals mklSupport [ mkl ] - ++ lib.optionals stdenv.isDarwin [ + ++ lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.CoreGraphics darwin.apple_sdk.frameworks.CoreVideo darwin.apple_sdk.frameworks.Accelerate diff --git a/pkgs/by-name/fe/fedimint/package.nix b/pkgs/by-name/fe/fedimint/package.nix index 0e38132affc4..f282b70c4ded 100644 --- a/pkgs/by-name/fe/fedimint/package.nix +++ b/pkgs/by-name/fe/fedimint/package.nix @@ -17,7 +17,7 @@ let # Rust rocksdb bindings have C++ compilation/linking errors on Darwin when using newer clang # Forcing it to clang 12 fixes the issue. buildRustPackage = - if stdenv.isDarwin then + if stdenv.hostPlatform.isDarwin then rustPlatform.buildRustPackage.override { stdenv = llvmPackages_12.stdenv; } else rustPlatform.buildRustPackage; @@ -44,7 +44,7 @@ buildRustPackage rec { buildInputs = [ openssl - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ Security libiconv Security diff --git a/pkgs/by-name/fe/feishin/package.nix b/pkgs/by-name/fe/feishin/package.nix index 99307c37dcea..0ed5aed53c6a 100644 --- a/pkgs/by-name/fe/feishin/package.nix +++ b/pkgs/by-name/fe/feishin/package.nix @@ -34,8 +34,8 @@ buildNpmPackage { env.ELECTRON_SKIP_BINARY_DOWNLOAD = "1"; nativeBuildInputs = - lib.optionals (stdenv.isLinux) [ copyDesktopItems ] - ++ lib.optionals stdenv.isDarwin [ darwin.autoSignDarwinBinariesHook ]; + lib.optionals (stdenv.hostPlatform.isLinux) [ copyDesktopItems ] + ++ lib.optionals stdenv.hostPlatform.isDarwin [ darwin.autoSignDarwinBinariesHook ]; postPatch = '' @@ -47,7 +47,7 @@ buildNpmPackage { substituteInPlace src/main/main.ts \ --replace-fail "autoUpdater.checkForUpdatesAndNotify();" "" '' - + lib.optionalString stdenv.isLinux '' + + lib.optionalString stdenv.hostPlatform.isLinux '' # https://github.com/electron/electron/issues/31121 substituteInPlace src/main/main.ts \ --replace-fail "process.resourcesPath" "'$out/share/feishin/resources'" @@ -77,7 +77,7 @@ buildNpmPackage { ''; postBuild = - lib.optionalString stdenv.isDarwin '' + lib.optionalString stdenv.hostPlatform.isDarwin '' # electron-builder appears to build directly on top of Electron.app, by overwriting the files in the bundle. cp -r ${electron.dist}/Electron.app ./ find ./Electron.app -name 'Info.plist' | xargs -d '\n' chmod +rw @@ -90,7 +90,7 @@ buildNpmPackage { + '' npm exec electron-builder -- \ --dir \ - -c.electronDist=${if stdenv.isDarwin then "./" else electron.dist} \ + -c.electronDist=${if stdenv.hostPlatform.isDarwin then "./" else electron.dist} \ -c.electronVersion=${electron.version} \ -c.npmRebuild=false ''; @@ -99,12 +99,12 @@ buildNpmPackage { '' runHook preInstall '' - + lib.optionalString stdenv.isDarwin '' + + lib.optionalString stdenv.hostPlatform.isDarwin '' mkdir -p $out/{Applications,bin} cp -r release/build/**/Feishin.app $out/Applications/ makeWrapper $out/Applications/Feishin.app/Contents/MacOS/Feishin $out/bin/feishin '' - + lib.optionalString stdenv.isLinux '' + + lib.optionalString stdenv.hostPlatform.isLinux '' mkdir -p $out/share/feishin pushd release/build/*/ cp -r locales resources{,.pak} $out/share/feishin diff --git a/pkgs/by-name/fi/fim-rs/package.nix b/pkgs/by-name/fi/fim-rs/package.nix index f2b1cf85dff6..2b1cdc313ce3 100644 --- a/pkgs/by-name/fi/fim-rs/package.nix +++ b/pkgs/by-name/fi/fim-rs/package.nix @@ -34,7 +34,7 @@ rustPlatform.buildRustPackage rec { buildInputs = [ bzip2 zstd - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.CoreFoundation darwin.apple_sdk.frameworks.CoreServices darwin.apple_sdk.frameworks.Security diff --git a/pkgs/by-name/fi/firefoxpwa/package.nix b/pkgs/by-name/fi/firefoxpwa/package.nix index 45c837756867..13ca4fbcd6c1 100644 --- a/pkgs/by-name/fi/firefoxpwa/package.nix +++ b/pkgs/by-name/fi/firefoxpwa/package.nix @@ -69,7 +69,7 @@ rustPlatform.buildRustPackage rec { libs = let libs = - lib.optionals stdenv.isLinux [ + lib.optionals stdenv.hostPlatform.isLinux [ cups ffmpeg libglvnd diff --git a/pkgs/by-name/fi/fittrackee/package.nix b/pkgs/by-name/fi/fittrackee/package.nix index 467e65f04434..e12db808ac2d 100644 --- a/pkgs/by-name/fi/fittrackee/package.nix +++ b/pkgs/by-name/fi/fittrackee/package.nix @@ -98,7 +98,7 @@ python.pkgs.buildPythonApplication rec { export DATABASE_TEST_URL=postgresql://$PGUSER/$PGDATABASE?host=$PGHOST ''; - doCheck = !stdenv.isDarwin; # tests are a bit flaky on darwin + doCheck = !stdenv.hostPlatform.isDarwin; # tests are a bit flaky on darwin preCheck = '' export TMP=$TMPDIR diff --git a/pkgs/by-name/fj/fjo/package.nix b/pkgs/by-name/fj/fjo/package.nix index d451f8342671..7671073cd3ee 100644 --- a/pkgs/by-name/fj/fjo/package.nix +++ b/pkgs/by-name/fj/fjo/package.nix @@ -23,6 +23,6 @@ rustPlatform.buildRustPackage rec { license = lib.licenses.agpl3Only; mainProgram = "berg"; maintainers = with lib.maintainers; [ ehmry ]; - broken = stdenv.isDarwin; + broken = stdenv.hostPlatform.isDarwin; }; } diff --git a/pkgs/by-name/fl/flake-checker/package.nix b/pkgs/by-name/fl/flake-checker/package.nix index 5ccab79d9718..80512e1bf7d9 100644 --- a/pkgs/by-name/fl/flake-checker/package.nix +++ b/pkgs/by-name/fl/flake-checker/package.nix @@ -18,7 +18,7 @@ rustPlatform.buildRustPackage rec { cargoHash = "sha256-0iH5owyNfIpRz6nYwrJUoqd9lVGZ3T3K8rmsOk2UoGI="; - buildInputs = lib.optionals stdenv.isDarwin (with darwin.apple_sdk.frameworks; [ + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin (with darwin.apple_sdk.frameworks; [ Security SystemConfiguration ]); diff --git a/pkgs/by-name/fl/flake-edit/package.nix b/pkgs/by-name/fl/flake-edit/package.nix index e3d0522026d0..cfe799a143e9 100644 --- a/pkgs/by-name/fl/flake-edit/package.nix +++ b/pkgs/by-name/fl/flake-edit/package.nix @@ -31,7 +31,7 @@ rustPlatform.buildRustPackage rec { [ openssl ] - ++ lib.optionals stdenv.isDarwin [ + ++ lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.Security darwin.apple_sdk.frameworks.SystemConfiguration ]; diff --git a/pkgs/by-name/fl/flameshot/package.nix b/pkgs/by-name/fl/flameshot/package.nix index c86e5cc62bc8..3c60703a3a36 100644 --- a/pkgs/by-name/fl/flameshot/package.nix +++ b/pkgs/by-name/fl/flameshot/package.nix @@ -16,10 +16,10 @@ enableMonochromeIcon ? false, }: -assert stdenv.isDarwin -> (!enableWlrSupport); +assert stdenv.hostPlatform.isDarwin -> (!enableWlrSupport); let - stdenv' = if stdenv.isDarwin then overrideSDK stdenv "11.0" else stdenv; + stdenv' = if stdenv.hostPlatform.isDarwin then overrideSDK stdenv "11.0" else stdenv; in stdenv'.mkDerivation { @@ -49,11 +49,11 @@ stdenv'.mkDerivation { (lib.cmakeBool "DISABLE_UPDATE_CHECKER" true) (lib.cmakeBool "USE_MONOCHROME_ICON" enableMonochromeIcon) ] - ++ lib.optionals stdenv.isLinux [ + ++ lib.optionals stdenv.hostPlatform.isLinux [ (lib.cmakeBool "USE_WAYLAND_CLIPBOARD" true) (lib.cmakeBool "USE_WAYLAND_GRIM" enableWlrSupport) ] - ++ lib.optionals stdenv.isDarwin [ + ++ lib.optionals stdenv.hostPlatform.isDarwin [ (lib.cmakeFeature "Qt5_DIR" "${libsForQt5.qtbase.dev}/lib/cmake/Qt5") ]; @@ -65,7 +65,7 @@ stdenv'.mkDerivation { libsForQt5.wrapQtAppsHook makeBinaryWrapper ] - ++ lib.optionals stdenv.isDarwin [ + ++ lib.optionals stdenv.hostPlatform.isDarwin [ imagemagick libicns ]; @@ -75,7 +75,7 @@ stdenv'.mkDerivation { libsForQt5.kguiaddons ]; - postPatch = lib.optionalString stdenv.isDarwin '' + postPatch = lib.optionalString stdenv.hostPlatform.isDarwin '' # Fix icns generation running concurrently with png generation sed -E -i '/"iconutil -o/i\ )\ @@ -89,7 +89,7 @@ stdenv'.mkDerivation { src/CMakeLists.txt ''; - postInstall = lib.optionalString stdenv.isDarwin '' + postInstall = lib.optionalString stdenv.hostPlatform.isDarwin '' mkdir $out/Applications mv $out/bin/flameshot.app $out/Applications @@ -106,7 +106,7 @@ stdenv'.mkDerivation { postFixup = let binary = - if stdenv.isDarwin then "Applications/flameshot.app/Contents/MacOS/flameshot" else "bin/flameshot"; + if stdenv.hostPlatform.isDarwin then "Applications/flameshot.app/Contents/MacOS/flameshot" else "bin/flameshot"; in '' wrapProgram $out/${binary} \ diff --git a/pkgs/by-name/fl/flashgbx/package.nix b/pkgs/by-name/fl/flashgbx/package.nix index d6cd2eac6075..07af37b5dce2 100644 --- a/pkgs/by-name/fl/flashgbx/package.nix +++ b/pkgs/by-name/fl/flashgbx/package.nix @@ -49,7 +49,7 @@ python3Packages.buildPythonApplication rec { requests setuptools qt6.qtbase - ] ++ lib.optionals stdenv.isLinux [ + ] ++ lib.optionals stdenv.hostPlatform.isLinux [ qt6.qtwayland ]; diff --git a/pkgs/by-name/fl/flashprog/package.nix b/pkgs/by-name/fl/flashprog/package.nix index b0bb52f1d383..b70a559ac645 100644 --- a/pkgs/by-name/fl/flashprog/package.nix +++ b/pkgs/by-name/fl/flashprog/package.nix @@ -9,7 +9,7 @@ , pkg-config , stdenv , withJlink ? true -, withGpio ? stdenv.isLinux +, withGpio ? stdenv.hostPlatform.isLinux }: stdenv.mkDerivation (finalAttrs: { @@ -29,7 +29,7 @@ stdenv.mkDerivation (finalAttrs: { buildInputs = [ libftdi1 libusb1 - ] ++ lib.optionals (!stdenv.isDarwin) [ + ] ++ lib.optionals (!stdenv.hostPlatform.isDarwin) [ pciutils ] ++ lib.optionals (withJlink) [ libjaylink @@ -46,10 +46,10 @@ stdenv.mkDerivation (finalAttrs: { "PREFIX=$(out)" "CONFIG_JLINK_SPI=${yesNo withJlink}" "CONFIG_LINUX_GPIO_SPI=${yesNo withGpio}" - "CONFIG_ENABLE_LIBPCI_PROGRAMMERS=${yesNo (!stdenv.isDarwin)}" - "CONFIG_INTERNAL_X86=${yesNo (!(stdenv.isDarwin) && stdenv.isx86_64)}" - "CONFIG_INTERNAL_DMI=${yesNo (!(stdenv.isDarwin) && stdenv.isx86_64)}" - "CONFIG_RAYER_SPI=${yesNo (!(stdenv.isDarwin) && stdenv.isx86_64)}" + "CONFIG_ENABLE_LIBPCI_PROGRAMMERS=${yesNo (!stdenv.hostPlatform.isDarwin)}" + "CONFIG_INTERNAL_X86=${yesNo (!(stdenv.hostPlatform.isDarwin) && stdenv.hostPlatform.isx86_64)}" + "CONFIG_INTERNAL_DMI=${yesNo (!(stdenv.hostPlatform.isDarwin) && stdenv.hostPlatform.isx86_64)}" + "CONFIG_RAYER_SPI=${yesNo (!(stdenv.hostPlatform.isDarwin) && stdenv.hostPlatform.isx86_64)}" ]; meta = with lib; { diff --git a/pkgs/by-name/fl/flatter/package.nix b/pkgs/by-name/fl/flatter/package.nix index bd8d5605edaa..5ef1b6a01444 100644 --- a/pkgs/by-name/fl/flatter/package.nix +++ b/pkgs/by-name/fl/flatter/package.nix @@ -34,7 +34,7 @@ stdenv.mkDerivation { mpfr fplll eigen - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ llvmPackages.openmp ]; diff --git a/pkgs/by-name/fl/flawz/package.nix b/pkgs/by-name/fl/flawz/package.nix index d149b4108624..fb40c65dc218 100644 --- a/pkgs/by-name/fl/flawz/package.nix +++ b/pkgs/by-name/fl/flawz/package.nix @@ -52,6 +52,6 @@ rustPlatform.buildRustPackage rec { mainProgram = "flawz"; maintainers = with lib.maintainers; [ anas ]; platforms = with lib.platforms; unix ++ windows; - broken = stdenv.isDarwin; # needing some apple_sdk packages + broken = stdenv.hostPlatform.isDarwin; # needing some apple_sdk packages }; } diff --git a/pkgs/by-name/fl/flip-link/package.nix b/pkgs/by-name/fl/flip-link/package.nix index b4ba056ee3b4..f652cb11ccac 100644 --- a/pkgs/by-name/fl/flip-link/package.nix +++ b/pkgs/by-name/fl/flip-link/package.nix @@ -13,7 +13,7 @@ rustPlatform.buildRustPackage rec { cargoHash = "sha256-x3JnqztoLol5dNMact/qMveQuvcMTg/jqHxW0lksB7Y="; - buildInputs = lib.optional stdenv.isDarwin libiconv; + buildInputs = lib.optional stdenv.hostPlatform.isDarwin libiconv; checkFlags = [ # requires embedded toolchains diff --git a/pkgs/by-name/fl/flite/package.nix b/pkgs/by-name/fl/flite/package.nix index 1edb95c2d4b8..514ded67728a 100644 --- a/pkgs/by-name/fl/flite/package.nix +++ b/pkgs/by-name/fl/flite/package.nix @@ -41,7 +41,7 @@ stdenv.mkDerivation (finalAttrs: { }) ]; - buildInputs = lib.optional stdenv.isLinux ( + buildInputs = lib.optional stdenv.hostPlatform.isLinux ( { alsa = alsa-lib; pulseaudio = libpulseaudio; @@ -51,7 +51,7 @@ stdenv.mkDerivation (finalAttrs: { configureFlags = [ "--enable-shared" - ] ++ lib.optionals stdenv.isLinux [ "--with-audio=${audioBackend}" ]; + ] ++ lib.optionals stdenv.hostPlatform.isLinux [ "--with-audio=${audioBackend}" ]; # main/Makefile creates and removes 'flite_voice_list.c' from multiple targets: # make[1]: *** No rule to make target 'flite_voice_list.c', needed by 'all'. Stop diff --git a/pkgs/by-name/fl/fluent-bit/package.nix b/pkgs/by-name/fl/fluent-bit/package.nix index dbbb41852524..8f3839130828 100644 --- a/pkgs/by-name/fl/fluent-bit/package.nix +++ b/pkgs/by-name/fl/fluent-bit/package.nix @@ -24,7 +24,7 @@ stdenv.mkDerivation (finalAttrs: { }; # optional only to avoid linux rebuild - patches = lib.optionals stdenv.isDarwin [ ./macos-11-sdk-compat.patch ]; + patches = lib.optionals stdenv.hostPlatform.isDarwin [ ./macos-11-sdk-compat.patch ]; nativeBuildInputs = [ cmake @@ -38,8 +38,8 @@ stdenv.mkDerivation (finalAttrs: { libyaml postgresql ] - ++ lib.optionals stdenv.isLinux [ systemd ] - ++ lib.optionals stdenv.isDarwin [ + ++ lib.optionals stdenv.hostPlatform.isLinux [ systemd ] + ++ lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk_11_0.frameworks.IOKit darwin.apple_sdk_11_0.frameworks.Foundation ]; @@ -49,11 +49,11 @@ stdenv.mkDerivation (finalAttrs: { "-DFLB_METRICS=ON" "-DFLB_HTTP_SERVER=ON" "-DFLB_OUT_PGSQL=ON" - ] ++ lib.optionals stdenv.isDarwin [ "-DCMAKE_OSX_DEPLOYMENT_TARGET=10.13" ]; + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ "-DCMAKE_OSX_DEPLOYMENT_TARGET=10.13" ]; env.NIX_CFLAGS_COMPILE = toString ( # Used by the embedded luajit, but is not predefined on older mac SDKs. - lib.optionals stdenv.isDarwin [ "-DTARGET_OS_IPHONE=0" ] + lib.optionals stdenv.hostPlatform.isDarwin [ "-DTARGET_OS_IPHONE=0" ] # Assumes GNU version of strerror_r, and the posix version has an # incompatible return type. ++ lib.optionals (!stdenv.hostPlatform.isGnu) [ "-Wno-int-conversion" ] diff --git a/pkgs/by-name/fo/forgejo-cli/package.nix b/pkgs/by-name/fo/forgejo-cli/package.nix index c8965fa3beea..ee49edd29110 100644 --- a/pkgs/by-name/fo/forgejo-cli/package.nix +++ b/pkgs/by-name/fo/forgejo-cli/package.nix @@ -36,7 +36,7 @@ rustPlatform.buildRustPackage { openssl zlib ] - ++ lib.optionals stdenv.isDarwin ( + ++ lib.optionals stdenv.hostPlatform.isDarwin ( with darwin.apple_sdk.frameworks; [ Security diff --git a/pkgs/by-name/fo/forgejo/generic.nix b/pkgs/by-name/fo/forgejo/generic.nix index a2a1e51850bc..8ca9a12e96ac 100644 --- a/pkgs/by-name/fo/forgejo/generic.nix +++ b/pkgs/by-name/fo/forgejo/generic.nix @@ -158,7 +158,7 @@ buildGoModule rec { changelog = "https://codeberg.org/forgejo/forgejo/releases/tag/${src.rev}"; license = lib.licenses.mit; maintainers = with lib.maintainers; [ emilylange urandom bendlas adamcstephens ]; - broken = stdenv.isDarwin; + broken = stdenv.hostPlatform.isDarwin; mainProgram = "gitea"; }; } diff --git a/pkgs/by-name/fo/formatjson5/package.nix b/pkgs/by-name/fo/formatjson5/package.nix index 852b4096254c..112f94aa8358 100644 --- a/pkgs/by-name/fo/formatjson5/package.nix +++ b/pkgs/by-name/fo/formatjson5/package.nix @@ -21,7 +21,7 @@ rustPlatform.buildRustPackage rec { cargoHash = "sha256-zPgaZPDyNVPmBXz6QwOYnmh/sbJ8aPST8znLMfIWejk="; - buildInputs = lib.optionals stdenv.isDarwin [ darwin.apple_sdk.frameworks.Security ]; + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.Security ]; cargoBuildFlags = [ "--example formatjson5" ]; diff --git a/pkgs/by-name/fo/fortune-kind/package.nix b/pkgs/by-name/fo/fortune-kind/package.nix index 1fd3783735d8..bea0bec5c403 100644 --- a/pkgs/by-name/fo/fortune-kind/package.nix +++ b/pkgs/by-name/fo/fortune-kind/package.nix @@ -23,7 +23,7 @@ rustPlatform.buildRustPackage rec { cargoHash = "sha256-hxbvsAQsZWUAgj8QAlcxqBA5YagLO3/vz9lQGJMHUjw="; nativeBuildInputs = [ makeBinaryWrapper installShellFiles ]; - buildInputs = lib.optionals stdenv.isDarwin [ libiconv darwin.apple_sdk.frameworks.Security ]; + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ libiconv darwin.apple_sdk.frameworks.Security ]; buildNoDefaultFeatures = true; diff --git a/pkgs/by-name/fr/frankenphp/package.nix b/pkgs/by-name/fr/frankenphp/package.nix index da6d32c5c7b8..9cae030df839 100644 --- a/pkgs/by-name/fr/frankenphp/package.nix +++ b/pkgs/by-name/fr/frankenphp/package.nix @@ -19,9 +19,9 @@ let phpEmbedWithZts = php.override { embedSupport = true; ztsSupport = true; - staticSupport = stdenv.isDarwin; + staticSupport = stdenv.hostPlatform.isDarwin; zendSignalsSupport = false; - zendMaxExecutionTimersSupport = stdenv.isLinux; + zendMaxExecutionTimersSupport = stdenv.hostPlatform.isLinux; }; phpUnwrapped = phpEmbedWithZts.unwrapped; phpConfig = "${phpUnwrapped.dev}/bin/php-config"; @@ -45,7 +45,7 @@ in buildGoModule rec { vendorHash = "sha256-U2B0ok6TgqUPMwlnkzpPkJLG22S3VpoU80bWwZAeaJo="; buildInputs = [ phpUnwrapped brotli ] ++ phpUnwrapped.buildInputs; - nativeBuildInputs = [ makeBinaryWrapper ] ++ lib.optionals stdenv.isDarwin [ pkg-config cctools darwin.autoSignDarwinBinariesHook ]; + nativeBuildInputs = [ makeBinaryWrapper ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ pkg-config cctools darwin.autoSignDarwinBinariesHook ]; subPackages = [ "frankenphp" ]; @@ -63,7 +63,7 @@ in buildGoModule rec { export CGO_LDFLAGS="-DFRANKENPHP_VERSION=${version} \ $(${phpConfig} --ldflags) \ $(${phpConfig} --libs)" - '' + lib.optionalString stdenv.isDarwin '' + '' + lib.optionalString stdenv.hostPlatform.isDarwin '' # replace hard-code homebrew path substituteInPlace ../frankenphp.go \ --replace "-L/opt/homebrew/opt/libiconv/lib" "-L${libiconv}/lib" diff --git a/pkgs/by-name/fr/freecad/package.nix b/pkgs/by-name/fr/freecad/package.nix index f272988ee555..fda823b66744 100644 --- a/pkgs/by-name/fr/freecad/package.nix +++ b/pkgs/by-name/fr/freecad/package.nix @@ -23,7 +23,7 @@ , pkg-config , python311Packages , runCommand # for passthru.tests -, spaceNavSupport ? stdenv.isLinux +, spaceNavSupport ? stdenv.hostPlatform.isLinux , stdenv , swig , vtk diff --git a/pkgs/by-name/fr/fretboard/package.nix b/pkgs/by-name/fr/fretboard/package.nix index 6cc8b189e765..57d8de7846e1 100644 --- a/pkgs/by-name/fr/fretboard/package.nix +++ b/pkgs/by-name/fr/fretboard/package.nix @@ -49,7 +49,7 @@ stdenv.mkDerivation (finalAttrs: { glib gtk4 libadwaita - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.Foundation ]; @@ -65,6 +65,6 @@ stdenv.mkDerivation (finalAttrs: { mainProgram = "fretboard"; maintainers = with maintainers; [ michaelgrahamevans ]; platforms = platforms.unix; - broken = stdenv.isDarwin; + broken = stdenv.hostPlatform.isDarwin; }; }) diff --git a/pkgs/by-name/ft/ftgl/package.nix b/pkgs/by-name/ft/ftgl/package.nix index d1fb07167e13..ee2a3e2457bf 100644 --- a/pkgs/by-name/ft/ftgl/package.nix +++ b/pkgs/by-name/ft/ftgl/package.nix @@ -40,7 +40,7 @@ stdenv.mkDerivation rec { ]; buildInputs = [ freetype - ] ++ (if stdenv.isDarwin then [ + ] ++ (if stdenv.hostPlatform.isDarwin then [ OpenGL GLUT ] else [ diff --git a/pkgs/by-name/fu/furmark/package.nix b/pkgs/by-name/fu/furmark/package.nix index c3e84546f826..adc2f9dc66d4 100644 --- a/pkgs/by-name/fu/furmark/package.nix +++ b/pkgs/by-name/fu/furmark/package.nix @@ -55,7 +55,7 @@ stdenv.mkDerivation (finalAttrs: { buildInputs = [ libGL libGLU - ] ++ lib.optionals stdenv.isAarch64 [ libxcrypt-legacy ]; + ] ++ lib.optionals stdenv.hostPlatform.isAarch64 [ libxcrypt-legacy ]; installPhase = '' runHook preInstall diff --git a/pkgs/by-name/fw/fwupd/package.nix b/pkgs/by-name/fw/fwupd/package.nix index f366b9290a96..c38eb75de8cc 100644 --- a/pkgs/by-name/fw/fwupd/package.nix +++ b/pkgs/by-name/fw/fwupd/package.nix @@ -67,7 +67,7 @@ let haveDell = isx86; # only redfish for x86_64 - haveRedfish = stdenv.isx86_64; + haveRedfish = stdenv.hostPlatform.isx86_64; # only use msr if x86 (requires cpuid) haveMSR = isx86; diff --git a/pkgs/by-name/fy/fyne/package.nix b/pkgs/by-name/fy/fyne/package.nix index a2e2e3826543..fafe2a36a3be 100644 --- a/pkgs/by-name/fy/fyne/package.nix +++ b/pkgs/by-name/fy/fyne/package.nix @@ -40,7 +40,7 @@ buildGoModule rec { libXrandr libXxf86vm ] - ++ (lib.optionals stdenv.isDarwin ( + ++ (lib.optionals stdenv.hostPlatform.isDarwin ( with darwin.apple_sdk_11_0.frameworks; [ Carbon diff --git a/pkgs/by-name/ga/gambit-project/package.nix b/pkgs/by-name/ga/gambit-project/package.nix index 630549a59caa..1c254e025190 100644 --- a/pkgs/by-name/ga/gambit-project/package.nix +++ b/pkgs/by-name/ga/gambit-project/package.nix @@ -24,7 +24,7 @@ stdenv.mkDerivation (finalAttrs: { buildInputs = lib.optional withGui wxGTK31 - ++ lib.optional stdenv.isDarwin darwin.apple_sdk.frameworks.Cocoa; + ++ lib.optional stdenv.hostPlatform.isDarwin darwin.apple_sdk.frameworks.Cocoa; strictDeps = true; diff --git a/pkgs/by-name/ga/gavin-bc/package.nix b/pkgs/by-name/ga/gavin-bc/package.nix index ad8364d41ce4..58c9ce61033d 100644 --- a/pkgs/by-name/ga/gavin-bc/package.nix +++ b/pkgs/by-name/ga/gavin-bc/package.nix @@ -40,7 +40,7 @@ stdenv.mkDerivation (finalAttrs: { license = lib.licenses.bsd2; maintainers = [ lib.maintainers.AndersonTorres ]; platforms = lib.platforms.unix; - broken = stdenv.isDarwin; + broken = stdenv.hostPlatform.isDarwin; }; }) # TODO: cover most of configure settings diff --git a/pkgs/by-name/gc/gcs/package.nix b/pkgs/by-name/gc/gcs/package.nix index 954128a40ba1..53fe4896f3b4 100644 --- a/pkgs/by-name/gc/gcs/package.nix +++ b/pkgs/by-name/gc/gcs/package.nix @@ -71,7 +71,7 @@ buildGoModule rec { fontconfig freetype ] - ++ lib.optionals stdenv.isDarwin [ + ++ lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk_11_0.frameworks.Carbon darwin.apple_sdk_11_0.frameworks.Cocoa darwin.apple_sdk_11_0.frameworks.Kernel @@ -100,6 +100,6 @@ buildGoModule rec { maintainers = with lib.maintainers; [ tomasajt ]; platforms = lib.platforms.linux ++ lib.platforms.darwin; # incompatible vendor/github.com/richardwilkes/unison/internal/skia/libskia_linux.a - broken = stdenv.isLinux && stdenv.isAarch64; + broken = stdenv.hostPlatform.isLinux && stdenv.hostPlatform.isAarch64; }; } diff --git a/pkgs/by-name/gd/gdlv/package.nix b/pkgs/by-name/gd/gdlv/package.nix index 27628ae34d6b..59423a71ee5a 100644 --- a/pkgs/by-name/gd/gdlv/package.nix +++ b/pkgs/by-name/gd/gdlv/package.nix @@ -23,12 +23,12 @@ buildGoModule rec { subPackages = "."; preBuild = - lib.optionalString (stdenv.isDarwin && lib.versionOlder stdenv.hostPlatform.darwinMinVersion "11.0") + lib.optionalString (stdenv.hostPlatform.isDarwin && lib.versionOlder stdenv.hostPlatform.darwinMinVersion "11.0") '' export MACOSX_DEPLOYMENT_TARGET=10.15 ''; - buildInputs = lib.optionals stdenv.isDarwin [ + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ AppKit CoreGraphics Foundation diff --git a/pkgs/by-name/ge/gen-license/package.nix b/pkgs/by-name/ge/gen-license/package.nix index fc6200797d86..a69b44d78473 100644 --- a/pkgs/by-name/ge/gen-license/package.nix +++ b/pkgs/by-name/ge/gen-license/package.nix @@ -18,7 +18,7 @@ rustPlatform.buildRustPackage rec { cargoHash = "sha256-TEsWACxEs4eJ8rO4RnKJWpwT1KcDoBEGftHSJt4YXVw="; - buildInputs = lib.optionals stdenv.isDarwin [ + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.Security ]; diff --git a/pkgs/by-name/ge/geoserver/package.nix b/pkgs/by-name/ge/geoserver/package.nix index ed1c82f80643..76a68eea8c3a 100644 --- a/pkgs/by-name/ge/geoserver/package.nix +++ b/pkgs/by-name/ge/geoserver/package.nix @@ -27,7 +27,7 @@ stdenv.mkDerivation (finalAttrs: rec { installPhase = let inputs = finalAttrs.buildInputs or [ ]; - ldLibraryPathEnvName = if stdenv.isDarwin then "DYLD_LIBRARY_PATH" else "LD_LIBRARY_PATH"; + ldLibraryPathEnvName = if stdenv.hostPlatform.isDarwin then "DYLD_LIBRARY_PATH" else "LD_LIBRARY_PATH"; in '' runHook preInstall diff --git a/pkgs/by-name/ge/gepetto-viewer/package.nix b/pkgs/by-name/ge/gepetto-viewer/package.nix index 3ea4da20ece0..da5429416d60 100644 --- a/pkgs/by-name/ge/gepetto-viewer/package.nix +++ b/pkgs/by-name/ge/gepetto-viewer/package.nix @@ -44,8 +44,8 @@ let ]; cmakeFlags = [ - (lib.cmakeBool "BUILD_PY_QCUSTOM_PLOT" (!stdenv.isDarwin)) - (lib.cmakeBool "BUILD_PY_QGV" (!stdenv.isDarwin)) + (lib.cmakeBool "BUILD_PY_QCUSTOM_PLOT" (!stdenv.hostPlatform.isDarwin)) + (lib.cmakeBool "BUILD_PY_QGV" (!stdenv.hostPlatform.isDarwin)) ]; outputs = [ @@ -67,7 +67,7 @@ let libsForQt5.wrapQtAppsHook pkg-config python3Packages.python - ] ++ lib.optionals (stdenv.isDarwin && stdenv.isAarch64) [ darwin.autoSignDarwinBinariesHook ]; + ] ++ lib.optionals (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isAarch64) [ darwin.autoSignDarwinBinariesHook ]; propagatedBuildInputs = [ jrl-cmakemodules @@ -80,7 +80,7 @@ let # wrapQtAppsHook uses isMachO, which fails to detect binaries without this # ref. https://github.com/NixOS/nixpkgs/pull/138334 - preFixup = lib.optionalString stdenv.isDarwin "export LC_ALL=C"; + preFixup = lib.optionalString stdenv.hostPlatform.isDarwin "export LC_ALL=C"; postFixup = '' # CMake is not aware exports are in $dev diff --git a/pkgs/by-name/ge/gex/package.nix b/pkgs/by-name/ge/gex/package.nix index 2b404b98f44b..b23169f058e2 100644 --- a/pkgs/by-name/ge/gex/package.nix +++ b/pkgs/by-name/ge/gex/package.nix @@ -28,7 +28,7 @@ rustPlatform.buildRustPackage rec { [ libgit2 ] - ++ lib.optionals stdenv.isDarwin [ + ++ lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.Security ]; diff --git a/pkgs/by-name/gf/gfal2/package.nix b/pkgs/by-name/gf/gfal2/package.nix index 3b3debaf7fef..205f6e192bc4 100644 --- a/pkgs/by-name/gf/gfal2/package.nix +++ b/pkgs/by-name/gf/gfal2/package.nix @@ -42,7 +42,7 @@ stdenv.mkDerivation (finalAttrs: { lfc = false; # Break because of redundant `-luuid`. This needs to be fixed from the gfal2 upstream. # TODO: Change back to `true` once fixed. - mock = !stdenv.isDarwin; + mock = !stdenv.hostPlatform.isDarwin; rfio = false; sftp = true; srm = false; diff --git a/pkgs/by-name/gh/ghciwatch/package.nix b/pkgs/by-name/gh/ghciwatch/package.nix index b505e405e173..db5353c92653 100644 --- a/pkgs/by-name/gh/ghciwatch/package.nix +++ b/pkgs/by-name/gh/ghciwatch/package.nix @@ -19,7 +19,7 @@ rustPlatform.buildRustPackage rec { cargoHash = "sha256-bE2cNgmq1TxtEDmLuyJVJpaj0Gbt73fnD1j/X42OL/w="; - buildInputs = lib.optionals stdenv.isDarwin [ + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.CoreFoundation darwin.apple_sdk.frameworks.CoreServices ]; diff --git a/pkgs/by-name/gh/ghex/package.nix b/pkgs/by-name/gh/ghex/package.nix index 0d81d0ba969f..a0de4d0c65b0 100644 --- a/pkgs/by-name/gh/ghex/package.nix +++ b/pkgs/by-name/gh/ghex/package.nix @@ -58,7 +58,7 @@ stdenv.mkDerivation rec { mesonFlags = [ "-Dgtk_doc=true" "-Dvapi=true" - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ # mremap does not exist on darwin "-Dmmap-buffer-backend=false" ]; diff --git a/pkgs/by-name/gi/girouette/package.nix b/pkgs/by-name/gi/girouette/package.nix index 2c2a733c3117..09b0d61fccc9 100644 --- a/pkgs/by-name/gi/girouette/package.nix +++ b/pkgs/by-name/gi/girouette/package.nix @@ -28,7 +28,7 @@ rustPlatform.buildRustPackage rec { buildInputs = [ dbus openssl - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.Security ]; diff --git a/pkgs/by-name/gi/git-agecrypt/package.nix b/pkgs/by-name/gi/git-agecrypt/package.nix index a9c2d85ff63c..bdd9beba175d 100644 --- a/pkgs/by-name/gi/git-agecrypt/package.nix +++ b/pkgs/by-name/gi/git-agecrypt/package.nix @@ -25,7 +25,7 @@ rustPlatform.buildRustPackage { nativeBuildInputs = [ pkg-config git ]; buildInputs = [ libgit2 zlib ] - ++ lib.optional stdenv.isDarwin darwin.apple_sdk.frameworks.Security; + ++ lib.optional stdenv.hostPlatform.isDarwin darwin.apple_sdk.frameworks.Security; meta = with lib; { diff --git a/pkgs/by-name/gi/git-gr/package.nix b/pkgs/by-name/gi/git-gr/package.nix index 96a03ed49e94..a50d389c04d0 100644 --- a/pkgs/by-name/gi/git-gr/package.nix +++ b/pkgs/by-name/gi/git-gr/package.nix @@ -35,11 +35,11 @@ rustPlatform.buildRustPackage { nativeBuildInputs = [installShellFiles] - ++ lib.optional stdenv.isLinux pkg-config; + ++ lib.optional stdenv.hostPlatform.isLinux pkg-config; buildInputs = - lib.optional stdenv.isLinux openssl - ++ lib.optionals stdenv.isDarwin [ + lib.optional stdenv.hostPlatform.isLinux openssl + ++ lib.optionals stdenv.hostPlatform.isDarwin [ libiconv darwin.apple_sdk.frameworks.CoreServices darwin.apple_sdk.frameworks.SystemConfiguration diff --git a/pkgs/by-name/gi/git-igitt/package.nix b/pkgs/by-name/gi/git-igitt/package.nix index a8c281991686..65ee35a5e763 100644 --- a/pkgs/by-name/gi/git-igitt/package.nix +++ b/pkgs/by-name/gi/git-igitt/package.nix @@ -33,7 +33,7 @@ rustPlatform.buildRustPackage { libgit2 oniguruma zlib - ] ++ lib.optionals stdenv.isDarwin [ darwin.apple_sdk.frameworks.Security ]; + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.Security ]; env = { RUSTONIG_SYSTEM_LIBONIG = true; diff --git a/pkgs/by-name/gi/git-instafix/package.nix b/pkgs/by-name/gi/git-instafix/package.nix index d05e9fab8726..18ab6f5fa0bd 100644 --- a/pkgs/by-name/gi/git-instafix/package.nix +++ b/pkgs/by-name/gi/git-instafix/package.nix @@ -37,6 +37,6 @@ rustPlatform.buildRustPackage { license = with licenses; [ mit asl20 ]; maintainers = with maintainers; [ mightyiam quodlibetor ]; changelog = "https://github.com/quodlibetor/git-instafix/releases/tag/v${version}"; - broken = stdenv.isDarwin; + broken = stdenv.hostPlatform.isDarwin; }; } diff --git a/pkgs/by-name/gi/git-together/package.nix b/pkgs/by-name/gi/git-together/package.nix index e71668a83a73..44ae1249a59c 100644 --- a/pkgs/by-name/gi/git-together/package.nix +++ b/pkgs/by-name/gi/git-together/package.nix @@ -19,7 +19,7 @@ rustPlatform.buildRustPackage rec { }; nativeBuildInputs = [ pkg-config ]; - buildInputs = [ openssl ] ++ lib.optional stdenv.isDarwin darwin.Security; + buildInputs = [ openssl ] ++ lib.optional stdenv.hostPlatform.isDarwin darwin.Security; OPENSSL_NO_VENDOR = true; diff --git a/pkgs/by-name/gi/gitbutler/package.nix b/pkgs/by-name/gi/gitbutler/package.nix index 66da05851dde..21fe0bb3096b 100644 --- a/pkgs/by-name/gi/gitbutler/package.nix +++ b/pkgs/by-name/gi/gitbutler/package.nix @@ -67,12 +67,12 @@ rustPlatform.buildRustPackage rec { buildInputs = [ openssl ] - ++ lib.optionals stdenv.isLinux [ + ++ lib.optionals stdenv.hostPlatform.isLinux [ glib-networking libsoup webkitgtk ] - ++ lib.optionals stdenv.isDarwin ( + ++ lib.optionals stdenv.hostPlatform.isDarwin ( with darwin.apple_sdk.frameworks; [ AppKit @@ -144,13 +144,13 @@ rustPlatform.buildRustPackage rec { '' runHook preInstall '' - + lib.optionalString stdenv.isDarwin '' + + lib.optionalString stdenv.hostPlatform.isDarwin '' mkdir -p $out/bin cp -r target/release/bundle/macos $out/Applications mv $out/Applications/GitButler.app/Contents/MacOS/GitButler $out/bin/git-butler ln -s $out/bin/git-butler $out/Applications/GitButler.app/Contents/MacOS/GitButler '' - + lib.optionalString stdenv.isLinux '' + + lib.optionalString stdenv.hostPlatform.isLinux '' cp -r target/release/bundle/"$tauriBundle"/*/data/usr $out desktop-file-edit \ diff --git a/pkgs/by-name/gi/github-runner/package.nix b/pkgs/by-name/gi/github-runner/package.nix index 535aaeed42cf..a2923b66b3b9 100644 --- a/pkgs/by-name/gi/github-runner/package.nix +++ b/pkgs/by-name/gi/github-runner/package.nix @@ -113,7 +113,7 @@ buildDotnetModule rec { nativeBuildInputs = [ which git - ] ++ lib.optionals (stdenv.isDarwin && stdenv.isAarch64) [ + ] ++ lib.optionals (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isAarch64) [ darwin.autoSignDarwinBinariesHook ]; @@ -230,7 +230,7 @@ buildDotnetModule rec { substituteInPlace $out/lib/github-runner/config.sh \ --replace './bin/Runner.Listener' "$out/bin/Runner.Listener" - '' + lib.optionalString stdenv.isLinux '' + '' + lib.optionalString stdenv.hostPlatform.isLinux '' substituteInPlace $out/lib/github-runner/config.sh \ --replace 'command -v ldd' 'command -v ${glibc.bin}/bin/ldd' \ --replace 'ldd ./bin' '${glibc.bin}/bin/ldd ${dotnet-runtime}/shared/Microsoft.NETCore.App/${dotnet-runtime.version}/' \ @@ -256,7 +256,7 @@ buildDotnetModule rec { install -D src/Misc/layoutbin/hashFiles/index.js $out/lib/github-runner/hashFiles/index.js mkdir -p $out/lib/github-runner/checkScripts install src/Misc/layoutbin/checkScripts/* $out/lib/github-runner/checkScripts/ - '' + lib.optionalString stdenv.isLinux '' + '' + lib.optionalString stdenv.hostPlatform.isLinux '' # Wrap explicitly to, e.g., prevent extra entries for LD_LIBRARY_PATH makeWrapperArgs=() diff --git a/pkgs/by-name/gi/gitlab-ci-ls/package.nix b/pkgs/by-name/gi/gitlab-ci-ls/package.nix index 7468842c6468..55bfc010ea92 100644 --- a/pkgs/by-name/gi/gitlab-ci-ls/package.nix +++ b/pkgs/by-name/gi/gitlab-ci-ls/package.nix @@ -23,7 +23,7 @@ rustPlatform.buildRustPackage rec { nativeBuildInputs = [ pkg-config ]; buildInputs = [ openssl ] - ++ lib.optionals stdenv.isDarwin [ + ++ lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.SystemConfiguration ]; diff --git a/pkgs/by-name/gi/gitlab-release-cli/package.nix b/pkgs/by-name/gi/gitlab-release-cli/package.nix index 64f1f24e744b..28119445dc2b 100644 --- a/pkgs/by-name/gi/gitlab-release-cli/package.nix +++ b/pkgs/by-name/gi/gitlab-release-cli/package.nix @@ -18,7 +18,7 @@ buildGoModule rec { vendorHash = "sha256-UwDMRsWbk8rEv2d5FssIzCLby68YZULoxd3/JGLsCQU="; - checkFlags = lib.optionals stdenv.isDarwin [ + checkFlags = lib.optionals stdenv.hostPlatform.isDarwin [ # Skip failing test "-skip TestHTTPSCustomCA" ]; diff --git a/pkgs/by-name/gi/gitlab-timelogs/package.nix b/pkgs/by-name/gi/gitlab-timelogs/package.nix index 23c03763e314..c0dc2a2a6153 100644 --- a/pkgs/by-name/gi/gitlab-timelogs/package.nix +++ b/pkgs/by-name/gi/gitlab-timelogs/package.nix @@ -22,7 +22,7 @@ rustPlatform.buildRustPackage rec { buildInputs = [ openssl ] - ++ lib.optionals stdenv.isDarwin [ + ++ lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.SystemConfiguration iconv ]; diff --git a/pkgs/by-name/gi/gitu/package.nix b/pkgs/by-name/gi/gitu/package.nix index eda3c91c59cb..33eb8d0c9bea 100644 --- a/pkgs/by-name/gi/gitu/package.nix +++ b/pkgs/by-name/gi/gitu/package.nix @@ -31,7 +31,7 @@ rustPlatform.buildRustPackage rec { libgit2 openssl zlib - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.AppKit darwin.apple_sdk.frameworks.Security ]; diff --git a/pkgs/by-name/gi/gitui/package.nix b/pkgs/by-name/gi/gitui/package.nix index a93cad786827..df3adcb0e39f 100644 --- a/pkgs/by-name/gi/gitui/package.nix +++ b/pkgs/by-name/gi/gitui/package.nix @@ -25,8 +25,8 @@ rustPlatform.buildRustPackage rec { nativeBuildInputs = [ pkg-config ]; buildInputs = [ openssl ] - ++ lib.optional stdenv.isLinux xclip - ++ lib.optionals stdenv.isDarwin [ + ++ lib.optional stdenv.hostPlatform.isLinux xclip + ++ lib.optionals stdenv.hostPlatform.isDarwin [ libiconv darwin.apple_sdk.frameworks.Security darwin.apple_sdk.frameworks.AppKit diff --git a/pkgs/by-name/gl/glfw3/package.nix b/pkgs/by-name/gl/glfw3/package.nix index 3d5050a8d46d..a5a7b33a0a95 100644 --- a/pkgs/by-name/gl/glfw3/package.nix +++ b/pkgs/by-name/gl/glfw3/package.nix @@ -29,12 +29,12 @@ stdenv.mkDerivation { propagatedBuildInputs = lib.optionals (!stdenv.hostPlatform.isWindows) [ libGL ]; nativeBuildInputs = [ cmake extra-cmake-modules ] - ++ lib.optionals stdenv.isDarwin [ fixDarwinDylibNames ] - ++ lib.optionals stdenv.isLinux [ wayland-scanner ]; + ++ lib.optionals stdenv.hostPlatform.isDarwin [ fixDarwinDylibNames ] + ++ lib.optionals stdenv.hostPlatform.isLinux [ wayland-scanner ]; buildInputs = - lib.optionals stdenv.isDarwin (with darwin.apple_sdk.frameworks; [ Carbon Cocoa Kernel ]) - ++ lib.optionals stdenv.isLinux [ + lib.optionals stdenv.hostPlatform.isDarwin (with darwin.apple_sdk.frameworks; [ Carbon Cocoa Kernel ]) + ++ lib.optionals stdenv.hostPlatform.isLinux [ wayland wayland-protocols libxkbcommon @@ -48,12 +48,12 @@ stdenv.mkDerivation { cmakeFlags = [ "-DBUILD_SHARED_LIBS=ON" - ] ++ lib.optionals (!stdenv.isDarwin && !stdenv.hostPlatform.isWindows) [ + ] ++ lib.optionals (!stdenv.hostPlatform.isDarwin && !stdenv.hostPlatform.isWindows) [ "-DCMAKE_C_FLAGS=-D_GLFW_GLX_LIBRARY='\"${lib.getLib libGL}/lib/libGL.so.1\"'" "-DCMAKE_C_FLAGS=-D_GLFW_EGL_LIBRARY='\"${lib.getLib libGL}/lib/libEGL.so.1\"'" ]; - postPatch = lib.optionalString stdenv.isLinux '' + postPatch = lib.optionalString stdenv.hostPlatform.isLinux '' substituteInPlace src/wl_init.c \ --replace-fail "libxkbcommon.so.0" "${lib.getLib libxkbcommon}/lib/libxkbcommon.so.0" \ --replace-fail "libdecor-0.so.0" "${lib.getLib libdecor}/lib/libdecor-0.so.0" \ @@ -63,7 +63,7 @@ stdenv.mkDerivation { ''; # glfw may dlopen libwayland-client.so: - postFixup = lib.optionalString stdenv.isLinux '' + postFixup = lib.optionalString stdenv.hostPlatform.isLinux '' patchelf ''${!outputLib}/lib/libglfw.so --add-rpath ${lib.getLib wayland}/lib ''; diff --git a/pkgs/by-name/gl/glrnvim/package.nix b/pkgs/by-name/gl/glrnvim/package.nix index 92a606699e3c..af11d0a66665 100644 --- a/pkgs/by-name/gl/glrnvim/package.nix +++ b/pkgs/by-name/gl/glrnvim/package.nix @@ -19,7 +19,7 @@ rustPlatform.buildRustPackage rec { cargoHash = "sha256-cHEse+pXwgPTL8GJyY4s1mhWXGTY8Fnn2rFpA5SNerY="; - buildInputs = lib.optionals stdenv.isDarwin (with darwin.apple_sdk.frameworks; [ + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin (with darwin.apple_sdk.frameworks; [ DiskArbitration Foundation ]); diff --git a/pkgs/by-name/gm/gmetronome/package.nix b/pkgs/by-name/gm/gmetronome/package.nix index ff501861b895..7dcd816c31b4 100644 --- a/pkgs/by-name/gm/gmetronome/package.nix +++ b/pkgs/by-name/gm/gmetronome/package.nix @@ -39,6 +39,6 @@ stdenv.mkDerivation rec { platforms = platforms.unix; maintainers = with maintainers; [ aleksana ]; mainProgram = "gmetronome"; - broken = stdenv.isDarwin; + broken = stdenv.hostPlatform.isDarwin; }; } diff --git a/pkgs/by-name/gm/gmic/package.nix b/pkgs/by-name/gm/gmic/package.nix index 602f9cc80294..71402ab7e89a 100644 --- a/pkgs/by-name/gm/gmic/package.nix +++ b/pkgs/by-name/gm/gmic/package.nix @@ -73,7 +73,7 @@ stdenv.mkDerivation (finalAttrs: { postPatch = '' cp -r ${finalAttrs.gmic_stdlib} src/gmic_stdlib_community.h '' - + lib.optionalString stdenv.isDarwin '' + + lib.optionalString stdenv.hostPlatform.isDarwin '' substituteInPlace CMakeLists.txt \ --replace "LD_LIBRARY_PATH" "DYLD_LIBRARY_PATH" ''; diff --git a/pkgs/by-name/gn/gnome-maps/package.nix b/pkgs/by-name/gn/gnome-maps/package.nix index 85515a19ad70..789e0c4d9bc0 100644 --- a/pkgs/by-name/gn/gnome-maps/package.nix +++ b/pkgs/by-name/gn/gnome-maps/package.nix @@ -37,7 +37,7 @@ stdenv.mkDerivation (finalAttrs: { hash = "sha256-lAtBuXQLCBMyXjkWdYcWz4+g7k4MkZHyYM7AbZITWDU="; }; - doCheck = !stdenv.isDarwin; + doCheck = !stdenv.hostPlatform.isDarwin; nativeBuildInputs = [ gettext diff --git a/pkgs/by-name/gn/gnucap/package.nix b/pkgs/by-name/gn/gnucap/package.nix index d67fc5d2c74b..2713a2283de6 100644 --- a/pkgs/by-name/gn/gnucap/package.nix +++ b/pkgs/by-name/gn/gnucap/package.nix @@ -20,7 +20,7 @@ It performs nonlinear dc and transient analyses, fourier analysis, and ac analys changelog = "https://git.savannah.gnu.org/cgit/gnucap.git/plain/NEWS?h=v${version}"; license = licenses.gpl3Plus; platforms = platforms.all; - broken = stdenv.isDarwin; # Relies on LD_LIBRARY_PATH + broken = stdenv.hostPlatform.isDarwin; # Relies on LD_LIBRARY_PATH maintainers = [ maintainers.raboof ]; mainProgram = "gnucap"; }; diff --git a/pkgs/by-name/gn/gnucobol/package.nix b/pkgs/by-name/gn/gnucobol/package.nix index 7c698954e5ab..75341f91bbb9 100644 --- a/pkgs/by-name/gn/gnucobol/package.nix +++ b/pkgs/by-name/gn/gnucobol/package.nix @@ -79,7 +79,7 @@ stdenv.mkDerivation (finalAttrs: { aclocal automake '' - + lib.optionalString stdenv.isDarwin '' + + lib.optionalString stdenv.hostPlatform.isDarwin '' # when building with nix on darwin, configure will use GNU strip, # which fails due to using --strip-unneeded, which is not supported substituteInPlace configure --replace-fail '"GNU strip"' 'FAKE GNU strip' @@ -87,7 +87,7 @@ stdenv.mkDerivation (finalAttrs: { # error: call to undeclared function 'xmlCleanupParser' # ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] - env.CFLAGS = lib.optionalString stdenv.isDarwin "-Wno-error=implicit-function-declaration"; + env.CFLAGS = lib.optionalString stdenv.hostPlatform.isDarwin "-Wno-error=implicit-function-declaration"; enableParallelBuilding = true; diff --git a/pkgs/by-name/go/go-ethereum/package.nix b/pkgs/by-name/go/go-ethereum/package.nix index 4b15286f7fa9..05e8768bded8 100644 --- a/pkgs/by-name/go/go-ethereum/package.nix +++ b/pkgs/by-name/go/go-ethereum/package.nix @@ -50,7 +50,7 @@ in buildGoModule rec { # Fix for usb-related segmentation faults on darwin propagatedBuildInputs = - lib.optionals stdenv.isDarwin [ libobjc IOKit ]; + lib.optionals stdenv.hostPlatform.isDarwin [ libobjc IOKit ]; passthru.tests = { inherit (nixosTests) geth; }; diff --git a/pkgs/by-name/go/gobang/package.nix b/pkgs/by-name/go/gobang/package.nix index 2889747b0738..aaefff5aa3b8 100644 --- a/pkgs/by-name/go/gobang/package.nix +++ b/pkgs/by-name/go/gobang/package.nix @@ -25,7 +25,7 @@ rustPlatform.buildRustPackage { buildInputs = with darwin.apple_sdk.frameworks; - lib.optionals stdenv.isDarwin [ + lib.optionals stdenv.hostPlatform.isDarwin [ CoreFoundation Security SystemConfiguration diff --git a/pkgs/by-name/go/goofcord/package.nix b/pkgs/by-name/go/goofcord/package.nix index d3830c39b360..39249fbde729 100644 --- a/pkgs/by-name/go/goofcord/package.nix +++ b/pkgs/by-name/go/goofcord/package.nix @@ -34,7 +34,7 @@ stdenv.mkDerivation (finalAttrs: { copyDesktopItems ]; - buildInputs = lib.optionals stdenv.isLinux [ + buildInputs = lib.optionals stdenv.hostPlatform.isLinux [ libpulseaudio pipewire stdenv.cc.cc.lib diff --git a/pkgs/by-name/go/google-chrome/package.nix b/pkgs/by-name/go/google-chrome/package.nix index d5c54c6400b5..4698f9c9a416 100644 --- a/pkgs/by-name/go/google-chrome/package.nix +++ b/pkgs/by-name/go/google-chrome/package.nix @@ -309,4 +309,4 @@ let mainProgram = "google-chrome-stable"; }; in -if stdenvNoCC.isDarwin then darwin else linux +if stdenvNoCC.hostPlatform.isDarwin then darwin else linux diff --git a/pkgs/by-name/go/goss/package.nix b/pkgs/by-name/go/goss/package.nix index 3f3a7fcebc02..0b618c195d5a 100644 --- a/pkgs/by-name/go/goss/package.nix +++ b/pkgs/by-name/go/goss/package.nix @@ -37,7 +37,7 @@ buildGoModule rec { postInstall = let runtimeDependencies = [ bash getent ] - ++ lib.optionals stdenv.isLinux [ systemd ]; + ++ lib.optionals stdenv.hostPlatform.isLinux [ systemd ]; in '' wrapProgram $out/bin/goss \ --prefix PATH : "${lib.makeBinPath runtimeDependencies}" diff --git a/pkgs/by-name/go/gossip/package.nix b/pkgs/by-name/go/gossip/package.nix index f6c4927316d9..518539351cd0 100644 --- a/pkgs/by-name/go/gossip/package.nix +++ b/pkgs/by-name/go/gossip/package.nix @@ -61,7 +61,7 @@ rustPlatform.buildRustPackage rec { pkg-config rustPlatform.bindgenHook ] - ++ lib.optionals stdenv.isLinux [ + ++ lib.optionals stdenv.hostPlatform.isLinux [ wayland-scanner ]; @@ -73,7 +73,7 @@ rustPlatform.buildRustPackage rec { libxkbcommon openssl ] - ++ lib.optionals stdenv.isDarwin [ + ++ lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.AppKit darwin.apple_sdk.frameworks.Cocoa darwin.apple_sdk.frameworks.CoreGraphics @@ -81,7 +81,7 @@ rustPlatform.buildRustPackage rec { darwin.apple_sdk.frameworks.ForceFeedback darwin.apple_sdk.frameworks.AVFoundation ] - ++ lib.optionals stdenv.isLinux [ + ++ lib.optionals stdenv.hostPlatform.isLinux [ wayland xorg.libX11 xorg.libXcursor @@ -99,7 +99,7 @@ rustPlatform.buildRustPackage rec { ln -s $out/logo/gossip.png $out/share/icons/hicolor/128x128/apps/gossip.png ''; - postFixup = lib.optionalString (!stdenv.isDarwin) '' + postFixup = lib.optionalString (!stdenv.hostPlatform.isDarwin) '' patchelf $out/bin/gossip \ --add-rpath ${ lib.makeLibraryPath [ diff --git a/pkgs/by-name/go/got/package.nix b/pkgs/by-name/go/got/package.nix index 29931498ccaf..d872cd796042 100644 --- a/pkgs/by-name/go/got/package.nix +++ b/pkgs/by-name/go/got/package.nix @@ -21,7 +21,7 @@ }: let - stdenv' = if stdenv.isDarwin && stdenv.isx86_64 + stdenv' = if stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isx86_64 then overrideSDK stdenv "11.0" else stdenv; in @@ -35,12 +35,12 @@ stdenv'.mkDerivation (finalAttrs: { }; nativeBuildInputs = [ pkg-config bison ] - ++ lib.optionals stdenv.isLinux [ autoPatchelfHook ]; + ++ lib.optionals stdenv.hostPlatform.isLinux [ autoPatchelfHook ]; buildInputs = [ libressl libbsd libevent libuuid libmd zlib ncurses ] - ++ lib.optionals stdenv.isDarwin [ libossp_uuid ]; + ++ lib.optionals stdenv.hostPlatform.isDarwin [ libossp_uuid ]; - preConfigure = lib.optionalString stdenv.isDarwin '' + preConfigure = lib.optionalString stdenv.hostPlatform.isDarwin '' # The configure script assumes dependencies on Darwin are installed via # Homebrew or MacPorts and hardcodes assumptions about the paths of # dependencies which fails the nixpkgs configurePhase. @@ -53,12 +53,12 @@ stdenv'.mkDerivation (finalAttrs: { ] ++ lib.optionals withSsh [ ''-DGOT_DIAL_PATH_SSH="${lib.getExe openssh}"'' ''-DGOT_TAG_PATH_SSH_KEYGEN="${lib.getExe' openssh "ssh-keygen"}"'' - ] ++ lib.optionals stdenv.isLinux [ + ] ++ lib.optionals stdenv.hostPlatform.isLinux [ ''-DGOT_TAG_PATH_SIGNIFY="${lib.getExe signify}"'' ] ++ lib.optionals stdenv.cc.isClang [ "-Wno-error=implicit-function-declaration" "-Wno-error=int-conversion" - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ # error: conflicting types for 'strmode' "-DHAVE_STRMODE=1" # Undefined symbols for architecture arm64: "_bsd_getopt" diff --git a/pkgs/by-name/gp/gpscorrelate/package.nix b/pkgs/by-name/gp/gpscorrelate/package.nix index b0e87221f8da..bb72042c21c5 100644 --- a/pkgs/by-name/gp/gpscorrelate/package.nix +++ b/pkgs/by-name/gp/gpscorrelate/package.nix @@ -31,7 +31,7 @@ stdenv.mkDerivation rec { libxslt pkg-config wrapGAppsHook3 - ] ++ lib.optional stdenv.isDarwin desktopToDarwinBundle; + ] ++ lib.optional stdenv.hostPlatform.isDarwin desktopToDarwinBundle; buildInputs = [ exiv2 diff --git a/pkgs/by-name/gp/gptscript/package.nix b/pkgs/by-name/gp/gptscript/package.nix index 515cb7955370..a034a08aa721 100644 --- a/pkgs/by-name/gp/gptscript/package.nix +++ b/pkgs/by-name/gp/gptscript/package.nix @@ -19,7 +19,7 @@ buildGoModule rec { vendorHash = "sha256-Kf/ckUuG+SA8WQN2MKL+Xrz91RGPuA7X2/MjryRXsts="; propagatedBuildInputs = with darwin; - lib.optionals stdenv.isDarwin [Security]; + lib.optionals stdenv.hostPlatform.isDarwin [Security]; ldflags = [ "-s" diff --git a/pkgs/by-name/gr/grafana-alloy/package.nix b/pkgs/by-name/gr/grafana-alloy/package.nix index e9eb1133f1f1..c09e7725b9ce 100644 --- a/pkgs/by-name/gr/grafana-alloy/package.nix +++ b/pkgs/by-name/gr/grafana-alloy/package.nix @@ -79,7 +79,7 @@ buildGoModule rec { # uses go-systemd, which uses libsystemd headers # https://github.com/coreos/go-systemd/issues/351 - NIX_CFLAGS_COMPILE = lib.optionals stdenv.isLinux [ "-I${lib.getDev systemd}/include" ]; + NIX_CFLAGS_COMPILE = lib.optionals stdenv.hostPlatform.isLinux [ "-I${lib.getDev systemd}/include" ]; checkFlags = [ "-tags nonetwork" # disable network tests @@ -89,7 +89,7 @@ buildGoModule rec { # go-systemd uses libsystemd under the hood, which does dlopen(libsystemd) at # runtime. # Add to RUNPATH so it can be found. - postFixup = lib.optionalString stdenv.isLinux '' + postFixup = lib.optionalString stdenv.hostPlatform.isLinux '' patchelf \ --set-rpath "${lib.makeLibraryPath [ (lib.getLib systemd) ]}:$(patchelf --print-rpath $out/bin/alloy)" \ $out/bin/alloy diff --git a/pkgs/by-name/gu/guile-avahi/package.nix b/pkgs/by-name/gu/guile-avahi/package.nix index c75d4ee0f079..3a8c9be42998 100644 --- a/pkgs/by-name/gu/guile-avahi/package.nix +++ b/pkgs/by-name/gu/guile-avahi/package.nix @@ -28,7 +28,7 @@ stdenv.mkDerivation rec { doCheck = true; makeFlags = [ "GUILE_AUTO_COMPILE=0" ]; - env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.isDarwin "-Wno-unused-function"; + env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.hostPlatform.isDarwin "-Wno-unused-function"; meta = with lib; { description = "Bindings to Avahi for GNU Guile"; diff --git a/pkgs/by-name/gu/guile-chickadee/package.nix b/pkgs/by-name/gu/guile-chickadee/package.nix index f4a454bf4e45..aa34a0d36df9 100644 --- a/pkgs/by-name/gu/guile-chickadee/package.nix +++ b/pkgs/by-name/gu/guile-chickadee/package.nix @@ -66,7 +66,7 @@ stdenv.mkDerivation (finalAttrs: { command = "chickadee -v"; }; - doCheck = !stdenv.isDarwin; + doCheck = !stdenv.hostPlatform.isDarwin; meta = with lib; { description = "Game development toolkit for Guile Scheme with SDL2 and OpenGL"; @@ -75,6 +75,6 @@ stdenv.mkDerivation (finalAttrs: { maintainers = with maintainers; [ chito ]; mainProgram = "chickadee"; platforms = guile.meta.platforms; - broken = stdenv.isDarwin; + broken = stdenv.hostPlatform.isDarwin; }; }) diff --git a/pkgs/by-name/gu/guile-goblins/package.nix b/pkgs/by-name/gu/guile-goblins/package.nix index aa5bcbc4bced..4175b9c5d79b 100644 --- a/pkgs/by-name/gu/guile-goblins/package.nix +++ b/pkgs/by-name/gu/guile-goblins/package.nix @@ -23,7 +23,7 @@ stdenv.mkDerivation rec { makeFlags = [ "GUILE_AUTO_COMPILE=0" ]; # tests hang on darwin, and fail randomly on aarch64-linux on ofborg - doCheck = !stdenv.isDarwin && !stdenv.isAarch64; + doCheck = !stdenv.hostPlatform.isDarwin && !stdenv.hostPlatform.isAarch64; meta = with lib; { description = "Spritely Goblins for Guile"; diff --git a/pkgs/by-name/gu/guile-lzlib/package.nix b/pkgs/by-name/gu/guile-lzlib/package.nix index 21c9c6c53950..a465849470b0 100644 --- a/pkgs/by-name/gu/guile-lzlib/package.nix +++ b/pkgs/by-name/gu/guile-lzlib/package.nix @@ -25,7 +25,7 @@ stdenv.mkDerivation rec { makeFlags = [ "GUILE_AUTO_COMPILE=0" ]; # tests fail on darwin - doCheck = !stdenv.isDarwin; + doCheck = !stdenv.hostPlatform.isDarwin; meta = with lib; { description = "GNU Guile library providing bindings to lzlib"; diff --git a/pkgs/by-name/gu/guile-lzma/package.nix b/pkgs/by-name/gu/guile-lzma/package.nix index 89a361ef9e4c..9f7b941f068f 100644 --- a/pkgs/by-name/gu/guile-lzma/package.nix +++ b/pkgs/by-name/gu/guile-lzma/package.nix @@ -28,7 +28,7 @@ stdenv.mkDerivation rec { doCheck = true; # In procedure bytevector-u8-ref: Argument 2 out of range - dontStrip = stdenv.isDarwin; + dontStrip = stdenv.hostPlatform.isDarwin; meta = with lib; { homepage = "https://ngyro.com/software/guile-lzma.html"; diff --git a/pkgs/by-name/gu/guile-quickcheck/package.nix b/pkgs/by-name/gu/guile-quickcheck/package.nix index 0a7a0c836a64..2c3c0f9c4b9b 100644 --- a/pkgs/by-name/gu/guile-quickcheck/package.nix +++ b/pkgs/by-name/gu/guile-quickcheck/package.nix @@ -18,7 +18,7 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ guile pkg-config ]; buildInputs = [ guile ]; - doCheck = !stdenv.isDarwin; + doCheck = !stdenv.hostPlatform.isDarwin; meta = with lib; { homepage = "https://ngyro.com/software/guile-quickcheck.html"; diff --git a/pkgs/by-name/gu/guile-zstd/package.nix b/pkgs/by-name/gu/guile-zstd/package.nix index 70fea933eabb..2c0f9b8d0425 100644 --- a/pkgs/by-name/gu/guile-zstd/package.nix +++ b/pkgs/by-name/gu/guile-zstd/package.nix @@ -26,7 +26,7 @@ stdenv.mkDerivation rec { propagatedBuildInputs = [ zstd ]; makeFlags = [ "GUILE_AUTO_COMPILE=0" ]; - doCheck = !stdenv.isDarwin; + doCheck = !stdenv.hostPlatform.isDarwin; meta = with lib; { description = "GNU Guile library providing bindings to zstd"; diff --git a/pkgs/by-name/ha/halloy/package.nix b/pkgs/by-name/ha/halloy/package.nix index 3421fbe9f1ea..04af62588db5 100644 --- a/pkgs/by-name/ha/halloy/package.nix +++ b/pkgs/by-name/ha/halloy/package.nix @@ -53,7 +53,7 @@ rustPlatform.buildRustPackage rec { xorg.libXi xorg.libXrandr ] - ++ lib.optionals stdenv.isDarwin [ + ++ lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.AppKit darwin.apple_sdk.frameworks.CoreFoundation darwin.apple_sdk.frameworks.CoreGraphics @@ -63,7 +63,7 @@ rustPlatform.buildRustPackage rec { darwin.apple_sdk.frameworks.QuartzCore darwin.apple_sdk.frameworks.Security ] - ++ lib.optionals stdenv.isLinux [ wayland ]; + ++ lib.optionals stdenv.hostPlatform.isLinux [ wayland ]; desktopItems = [ (makeDesktopItem { @@ -89,7 +89,7 @@ rustPlatform.buildRustPackage rec { }) ]; - postFixup = lib.optional stdenv.isLinux ( + postFixup = lib.optional stdenv.hostPlatform.isLinux ( let rpathWayland = lib.makeLibraryPath [ wayland @@ -106,7 +106,7 @@ rustPlatform.buildRustPackage rec { postInstall = '' install -Dm644 assets/linux/icons/hicolor/128x128/apps/org.squidowl.halloy.png \ $out/share/icons/hicolor/128x128/apps/org.squidowl.halloy.png - '' + lib.optionalString stdenv.isDarwin '' + '' + lib.optionalString stdenv.hostPlatform.isDarwin '' APP_DIR="$out/Applications/Halloy.app/Contents" mkdir -p "$APP_DIR/MacOS" diff --git a/pkgs/by-name/ha/handbrake/package.nix b/pkgs/by-name/ha/handbrake/package.nix index c24cee4960f9..264520341ece 100644 --- a/pkgs/by-name/ha/handbrake/package.nix +++ b/pkgs/by-name/ha/handbrake/package.nix @@ -65,7 +65,7 @@ # which in turn depends on systemd. systemd is not supported on Darwin, so # for now we disable GTK GUI support on Darwin. (It may be possible to remove # this restriction later.) - useGtk ? !stdenv.isDarwin, + useGtk ? !stdenv.hostPlatform.isDarwin, appstream, desktop-file-utils, meson, @@ -198,7 +198,7 @@ let -e '/ ## Additional library and tool checks/,/ ## MinGW specific library and tool checks/d' \ -i make/configure.py '' - + optionalString stdenv.isDarwin '' + + optionalString stdenv.hostPlatform.isDarwin '' # Prevent the configure script from failing if xcodebuild isn't available, # which it isn't in the Nix context. (The actual build goes fine without # xcodebuild.) @@ -269,7 +269,7 @@ let xz zimg ] - ++ optional (!stdenv.isDarwin) numactl + ++ optional (!stdenv.hostPlatform.isDarwin) numactl ++ optionals useGtk [ dbus-glib glib @@ -286,7 +286,7 @@ let udev ] ++ optional useFdk fdk_aac - ++ optionals stdenv.isDarwin [ + ++ optionals stdenv.hostPlatform.isDarwin [ AudioToolbox Foundation libobjc @@ -294,7 +294,7 @@ let ] # NOTE: 2018-12-27: Handbrake supports nv-codec-headers for Linux only, # look at ./make/configure.py search "enable_nvenc" - ++ optional stdenv.isLinux nv-codec-headers; + ++ optional stdenv.hostPlatform.isLinux nv-codec-headers; configureFlags = [ @@ -303,7 +303,7 @@ let ] ++ optional (!useGtk) "--disable-gtk" ++ optional useFdk "--enable-fdk-aac" - ++ optional stdenv.isDarwin "--disable-xcode" + ++ optional stdenv.hostPlatform.isDarwin "--disable-xcode" ++ optional stdenv.hostPlatform.isx86 "--harden"; # NOTE: 2018-12-27: Check NixOS HandBrake test if changing @@ -362,7 +362,7 @@ let ]; mainProgram = "HandBrakeCLI"; platforms = with platforms; unix; - broken = stdenv.isDarwin; # https://github.com/NixOS/nixpkgs/pull/297984#issuecomment-2016503434 + broken = stdenv.hostPlatform.isDarwin; # https://github.com/NixOS/nixpkgs/pull/297984#issuecomment-2016503434 }; }; in diff --git a/pkgs/by-name/ha/harvid/package.nix b/pkgs/by-name/ha/harvid/package.nix index 83f1148904ea..efbe45d667c0 100644 --- a/pkgs/by-name/ha/harvid/package.nix +++ b/pkgs/by-name/ha/harvid/package.nix @@ -25,7 +25,7 @@ stdenv.mkDerivation (finalAttrs: { nativeBuildInputs = [ pkg-config ] - ++ lib.optionals stdenv.isDarwin [ + ++ lib.optionals stdenv.hostPlatform.isDarwin [ which unixtools.xxd ]; @@ -36,7 +36,7 @@ stdenv.mkDerivation (finalAttrs: { libpng ]; - postPatch = lib.optionalString stdenv.isDarwin '' + postPatch = lib.optionalString stdenv.hostPlatform.isDarwin '' substituteInPlace libharvid/Makefile \ --replace-fail /usr/bin/libtool ${cctools}/bin/libtool ''; diff --git a/pkgs/by-name/ha/hatch/package.nix b/pkgs/by-name/ha/hatch/package.nix index 5ae22d698f21..ef827725267e 100644 --- a/pkgs/by-name/ha/hatch/package.nix +++ b/pkgs/by-name/ha/hatch/package.nix @@ -62,7 +62,7 @@ python3Packages.buildPythonApplication rec { setuptools ] ++ [ cargo ] - ++ lib.optionals stdenv.isDarwin [ + ++ lib.optionals stdenv.hostPlatform.isDarwin [ darwin.ps ]; @@ -100,7 +100,7 @@ python3Packages.buildPythonApplication rec { # Could not read ELF interpreter from any of the following paths: /bin/sh, /usr/bin/env, /bin/dash, /bin/ls "test_new_selected_python" ] - ++ lib.optionals stdenv.isDarwin [ + ++ lib.optionals stdenv.hostPlatform.isDarwin [ # https://github.com/NixOS/nixpkgs/issues/209358 "test_scripts_no_environment" @@ -114,9 +114,9 @@ python3Packages.buildPythonApplication rec { "test_macos_archflags" "test_macos_max_compat" ] - ++ lib.optionals stdenv.isAarch64 [ "test_resolve" ]; + ++ lib.optionals stdenv.hostPlatform.isAarch64 [ "test_resolve" ]; - disabledTestPaths = lib.optionals stdenv.isDarwin [ + disabledTestPaths = lib.optionals stdenv.hostPlatform.isDarwin [ # AssertionError: assert [call('test h...2p32/bin/sh')] == [call('test h..., shell=True)] # At index 0 diff: # call('test hatch-test.py3.10', shell=True, executable='/nix/store/b34ianga4diikh0kymkpqwmvba0mmzf7-bash-5.2p32/bin/sh') diff --git a/pkgs/by-name/ha/havoc/package.nix b/pkgs/by-name/ha/havoc/package.nix index ee5db97c9865..81b8177c4ec8 100644 --- a/pkgs/by-name/ha/havoc/package.nix +++ b/pkgs/by-name/ha/havoc/package.nix @@ -51,6 +51,6 @@ stdenv.mkDerivation (finalAttrs: { mainProgram = "havoc"; maintainers = with lib.maintainers; [ AndersonTorres ]; inherit (wayland.meta) platforms; - broken = stdenv.isDarwin; # fatal error: 'sys/epoll.h' file not found + broken = stdenv.hostPlatform.isDarwin; # fatal error: 'sys/epoll.h' file not found }; }) diff --git a/pkgs/by-name/ha/haylxon/package.nix b/pkgs/by-name/ha/haylxon/package.nix index c4a781d7cde6..5f8f71f4114f 100644 --- a/pkgs/by-name/ha/haylxon/package.nix +++ b/pkgs/by-name/ha/haylxon/package.nix @@ -18,7 +18,7 @@ rustPlatform.buildRustPackage rec { cargoHash = "sha256-6vVsm4gdcFCxKvvmOi3wlHkFoZp8CG+u50NfxIZqCl8="; - buildInputs = lib.optionals stdenv.isDarwin [ darwin.apple_sdk.frameworks.Security ]; + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.Security ]; meta = { description = "Save screenshots of urls and webpages from terminal"; diff --git a/pkgs/by-name/he/hercules/package.nix b/pkgs/by-name/he/hercules/package.nix index 080d3a849beb..8a7e4a16dbaf 100644 --- a/pkgs/by-name/he/hercules/package.nix +++ b/pkgs/by-name/he/hercules/package.nix @@ -6,7 +6,7 @@ , cmake , zlib , bzip2 -, enableRexx ? stdenv.isLinux, regina +, enableRexx ? stdenv.hostPlatform.isLinux, regina }: let herculesCpu = diff --git a/pkgs/by-name/hi/hieroglyphic/package.nix b/pkgs/by-name/hi/hieroglyphic/package.nix index 4cb0ebf507e5..71f245d996f4 100644 --- a/pkgs/by-name/hi/hieroglyphic/package.nix +++ b/pkgs/by-name/hi/hieroglyphic/package.nix @@ -59,7 +59,7 @@ stdenv.mkDerivation (finalAttrs: { gtk4 libadwaita ] - ++ lib.optionals stdenv.isDarwin [ + ++ lib.optionals stdenv.hostPlatform.isDarwin [ CoreFoundation Foundation ]; diff --git a/pkgs/by-name/hi/himalaya/package.nix b/pkgs/by-name/hi/himalaya/package.nix index 5a271432a0cc..027254e2423a 100644 --- a/pkgs/by-name/hi/himalaya/package.nix +++ b/pkgs/by-name/hi/himalaya/package.nix @@ -30,7 +30,7 @@ rustPlatform.buildRustPackage rec { cargoHash = "sha256-YS8IamapvmdrOPptQh2Ef9Yold0IK1XIeGs0kDIQ5b8="; - NIX_LDFLAGS = lib.optionals stdenv.isDarwin [ + NIX_LDFLAGS = lib.optionals stdenv.hostPlatform.isDarwin [ "-F${darwin.apple_sdk.frameworks.AppKit}/Library/Frameworks" "-framework" "AppKit" @@ -41,7 +41,7 @@ rustPlatform.buildRustPackage rec { ++ lib.optional (installManPages || installShellCompletions) installShellFiles; buildInputs = [ ] - ++ lib.optionals stdenv.isDarwin (with darwin.apple_sdk.frameworks; [ AppKit Cocoa Security ]) + ++ lib.optionals stdenv.hostPlatform.isDarwin (with darwin.apple_sdk.frameworks; [ AppKit Cocoa Security ]) ++ lib.optional (builtins.elem "notmuch" buildFeatures) notmuch ++ lib.optional (builtins.elem "pgp-gpg" buildFeatures) gpgme; diff --git a/pkgs/by-name/ho/hoppscotch/package.nix b/pkgs/by-name/ho/hoppscotch/package.nix index 5fd0dfe9e150..1484afa5a55e 100644 --- a/pkgs/by-name/ho/hoppscotch/package.nix +++ b/pkgs/by-name/ho/hoppscotch/package.nix @@ -50,7 +50,7 @@ let sourceProvenance = [ lib.sourceTypes.binaryNativeCode ]; }; in -if stdenv.isDarwin then +if stdenv.hostPlatform.isDarwin then stdenv.mkDerivation { inherit pname diff --git a/pkgs/by-name/hp/hpipm/package.nix b/pkgs/by-name/hp/hpipm/package.nix index a33efcc43677..88899d752b91 100644 --- a/pkgs/by-name/hp/hpipm/package.nix +++ b/pkgs/by-name/hp/hpipm/package.nix @@ -28,7 +28,7 @@ stdenv.mkDerivation (finalAttrs: { cmakeFlags = [ "-DHPIPM_FIND_BLASFEO=ON" "-DBUILD_SHARED_LIBS=ON" - ] ++ lib.optionals (!stdenv.isx86_64) [ "-DTARGET=GENERIC" ]; + ] ++ lib.optionals (!stdenv.hostPlatform.isx86_64) [ "-DTARGET=GENERIC" ]; meta = { description = "High-performance interior-point-method QP and QCQP solvers"; diff --git a/pkgs/by-name/ht/htb-toolkit/package.nix b/pkgs/by-name/ht/htb-toolkit/package.nix index dbbe025bf661..df3c8cde1275 100644 --- a/pkgs/by-name/ht/htb-toolkit/package.nix +++ b/pkgs/by-name/ht/htb-toolkit/package.nix @@ -38,9 +38,9 @@ rustPlatform.buildRustPackage { buildInputs = [ openssl - ] ++ lib.optionals stdenv.isLinux [ + ] ++ lib.optionals stdenv.hostPlatform.isLinux [ gnome-keyring - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.Security darwin.apple_sdk.frameworks.SystemConfiguration ]; diff --git a/pkgs/by-name/ht/htcondor/package.nix b/pkgs/by-name/ht/htcondor/package.nix index c1cf23d22abb..3cb4665f5e48 100644 --- a/pkgs/by-name/ht/htcondor/package.nix +++ b/pkgs/by-name/ht/htcondor/package.nix @@ -60,6 +60,6 @@ stdenv.mkDerivation rec { license = licenses.asl20; maintainers = with maintainers; [ evey ]; # cannot find -lpthread: No such file or directory - broken = stdenv.isAarch64; + broken = stdenv.hostPlatform.isAarch64; }; } diff --git a/pkgs/by-name/ht/httpdirfs/package.nix b/pkgs/by-name/ht/httpdirfs/package.nix index 22dbceaf3799..6b6ed108fd45 100644 --- a/pkgs/by-name/ht/httpdirfs/package.nix +++ b/pkgs/by-name/ht/httpdirfs/package.nix @@ -24,7 +24,7 @@ stdenv.mkDerivation (finalAttrs: { hash = "sha256-PUYsT0VDEzerPqwrLJrET4kSsWsQhtnfmLepeaqtA+I="; }; - postPatch = lib.optional stdenv.isDarwin '' + postPatch = lib.optional stdenv.hostPlatform.isDarwin '' substituteInPlace Makefile --replace-fail '-fanalyzer' '-Xanalyzer' ''; @@ -49,7 +49,7 @@ stdenv.mkDerivation (finalAttrs: { passthru = { # Disabled for Darwin because requires macFUSE installed outside NixOS - tests.version = lib.optionalAttrs stdenv.isLinux ( + tests.version = lib.optionalAttrs stdenv.hostPlatform.isLinux ( testers.testVersion { command = "${lib.getExe finalAttrs.finalPackage} --version"; package = finalAttrs.finalPackage; diff --git a/pkgs/by-name/ht/httptoolkit/package.nix b/pkgs/by-name/ht/httptoolkit/package.nix index 173e093cb71c..3acc04031f88 100644 --- a/pkgs/by-name/ht/httptoolkit/package.nix +++ b/pkgs/by-name/ht/httptoolkit/package.nix @@ -29,7 +29,7 @@ buildNpmPackage rec { CSC_IDENTITY_AUTO_DISCOVERY = "false"; }; - nativeBuildInputs = [ makeWrapper ] ++ lib.optionals stdenv.isLinux [ copyDesktopItems ]; + nativeBuildInputs = [ makeWrapper ] ++ lib.optionals stdenv.hostPlatform.isLinux [ copyDesktopItems ]; npmBuildScript = "build:src"; @@ -50,7 +50,7 @@ buildNpmPackage rec { installPhase = '' runHook preInstall - ${lib.optionalString stdenv.isLinux '' + ${lib.optionalString stdenv.hostPlatform.isLinux '' mkdir -p $out/share/httptoolkit cp -r dist/*-unpacked/{locales,resources{,.pak}} $out/share/httptoolkit @@ -64,7 +64,7 @@ buildNpmPackage rec { --inherit-argv0 ''} - ${lib.optionalString stdenv.isDarwin '' + ${lib.optionalString stdenv.hostPlatform.isDarwin '' mkdir -p $out/Applications cp -r dist/mac*/"HTTP Toolkit.app" $out/Applications diff --git a/pkgs/by-name/hu/hurl/package.nix b/pkgs/by-name/hu/hurl/package.nix index b758e779705f..db2f1619703d 100644 --- a/pkgs/by-name/hu/hurl/package.nix +++ b/pkgs/by-name/hu/hurl/package.nix @@ -41,7 +41,7 @@ rustPlatform.buildRustPackage rec { buildInputs = [ libxml2 openssl - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ curl ]; diff --git a/pkgs/by-name/hy/hydra/package.nix b/pkgs/by-name/hy/hydra/package.nix index 661eb4d0231c..8c88d03c21a1 100644 --- a/pkgs/by-name/hy/hydra/package.nix +++ b/pkgs/by-name/hy/hydra/package.nix @@ -173,7 +173,7 @@ stdenv.mkDerivation (finalAttrs: { darcs gnused breezy - ] ++ lib.optionals stdenv.isLinux [ rpm dpkg cdrkit ] + ] ++ lib.optionals stdenv.hostPlatform.isLinux [ rpm dpkg cdrkit ] ); nativeBuildInputs = [ diff --git a/pkgs/by-name/im/immersed-vr/package.nix b/pkgs/by-name/im/immersed-vr/package.nix index f057d192ca97..7bf1f14574d4 100644 --- a/pkgs/by-name/im/immersed-vr/package.nix +++ b/pkgs/by-name/im/immersed-vr/package.nix @@ -31,6 +31,6 @@ let sourceProvenance = with sourceTypes; [ binaryNativeCode ]; }; -in if stdenv.isDarwin +in if stdenv.hostPlatform.isDarwin then callPackage ./darwin.nix { inherit pname version src meta; } else callPackage ./linux.nix { inherit pname version src meta; } diff --git a/pkgs/by-name/im/implot/demos/default.nix b/pkgs/by-name/im/implot/demos/default.nix index b3a369668c1d..677448924dee 100644 --- a/pkgs/by-name/im/implot/demos/default.nix +++ b/pkgs/by-name/im/implot/demos/default.nix @@ -72,7 +72,7 @@ stdenv.mkDerivation rec { homepage = "https://github.com/epezent/implot_demos"; broken = stdenv.hostPlatform.isAarch64 # Target "mandel" relies on AVX2 - || stdenv.isDarwin; + || stdenv.hostPlatform.isDarwin; license = lib.licenses.mit; maintainers = with lib.maintainers; [ SomeoneSerge ]; mainProgram = "implot-demos"; diff --git a/pkgs/by-name/in/inshellisense/package.nix b/pkgs/by-name/in/inshellisense/package.nix index d7a1589ccbcf..3b2a84ace0c5 100644 --- a/pkgs/by-name/in/inshellisense/package.nix +++ b/pkgs/by-name/in/inshellisense/package.nix @@ -20,8 +20,8 @@ buildNpmPackage rec { # npm ERR! int ret = openpty(&master, &slave, nullptr, NULL, static_cast(&winp)); # # when `node-gyp` tries to build the dep. The below allows `npm` to download the prebuilt binary. - makeCacheWritable = stdenv.isDarwin; - nativeBuildInputs = lib.optional stdenv.isDarwin cacert; + makeCacheWritable = stdenv.hostPlatform.isDarwin; + nativeBuildInputs = lib.optional stdenv.hostPlatform.isDarwin cacert; meta = with lib; { description = "IDE style command line auto complete"; diff --git a/pkgs/by-name/in/inv-sig-helper/package.nix b/pkgs/by-name/in/inv-sig-helper/package.nix index 5070b60abcdd..31f78a23b5f7 100644 --- a/pkgs/by-name/in/inv-sig-helper/package.nix +++ b/pkgs/by-name/in/inv-sig-helper/package.nix @@ -31,7 +31,7 @@ rustPlatform.buildRustPackage { buildInputs = [ openssl ] - ++ lib.optionals stdenv.isDarwin [ + ++ lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.Security darwin.apple_sdk.frameworks.SystemConfiguration ]; diff --git a/pkgs/by-name/ip/ipxe/package.nix b/pkgs/by-name/ip/ipxe/package.nix index c06072a41088..85e3564f3cbb 100644 --- a/pkgs/by-name/ip/ipxe/package.nix +++ b/pkgs/by-name/ip/ipxe/package.nix @@ -19,7 +19,7 @@ let targets = additionalTargets - // lib.optionalAttrs stdenv.isx86_64 { + // lib.optionalAttrs stdenv.hostPlatform.isx86_64 { "bin-x86_64-efi/ipxe.efi" = null; "bin-x86_64-efi/ipxe.efirom" = null; "bin-x86_64-efi/ipxe.usb" = "ipxe-efi.usb"; @@ -32,13 +32,13 @@ let "bin/ipxe.lkrn" = null; "bin/undionly.kpxe" = null; } - // lib.optionalAttrs stdenv.isAarch32 { + // lib.optionalAttrs stdenv.hostPlatform.isAarch32 { "bin-arm32-efi/ipxe.efi" = null; "bin-arm32-efi/ipxe.efirom" = null; "bin-arm32-efi/ipxe.usb" = "ipxe-efi.usb"; "bin-arm32-efi/snp.efi" = null; } - // lib.optionalAttrs stdenv.isAarch64 { + // lib.optionalAttrs stdenv.hostPlatform.isAarch64 { "bin-arm64-efi/ipxe.efi" = null; "bin-arm64-efi/ipxe.efirom" = null; "bin-arm64-efi/ipxe.usb" = "ipxe-efi.usb"; diff --git a/pkgs/by-name/ir/iredis/package.nix b/pkgs/by-name/ir/iredis/package.nix index 8a5956e52a69..7521bab9d9a8 100644 --- a/pkgs/by-name/ir/iredis/package.nix +++ b/pkgs/by-name/ir/iredis/package.nix @@ -51,7 +51,7 @@ python3.pkgs.buildPythonApplication rec { "--deselect=tests/unittests/test_render_functions.py::test_render_time" # Only execute unittests, because cli tests require a running Redis "tests/unittests/" - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ # Flaky tests "--deselect=tests/unittests/test_entry.py::test_command_shell_options_higher_priority" "--deselect=tests/unittests/test_utils.py::test_timer" diff --git a/pkgs/by-name/is/isabelle/package.nix b/pkgs/by-name/is/isabelle/package.nix index 3adf58f467a3..1012d06542ec 100644 --- a/pkgs/by-name/is/isabelle/package.nix +++ b/pkgs/by-name/is/isabelle/package.nix @@ -30,7 +30,7 @@ let hash = "sha256-DB/ETVZhbT82IMZA97TmHG6gJcGpFavxDKDTwPzIF80="; }; - buildPhase = (if stdenv.isDarwin then '' + buildPhase = (if stdenv.hostPlatform.isDarwin then '' LDFLAGS="-dynamic -undefined dynamic_lookup -lSystem" '' else '' LDFLAGS="-fPIC -shared" @@ -52,7 +52,7 @@ in stdenv.mkDerivation (finalAttrs: rec { dirname = "Isabelle${version}"; src = - if stdenv.isDarwin + if stdenv.hostPlatform.isDarwin then fetchurl { @@ -74,14 +74,14 @@ in stdenv.mkDerivation (finalAttrs: rec { nativeBuildInputs = [ java ]; buildInputs = [ polyml veriT vampire eprover-ho nettools ] - ++ lib.optionals (!stdenv.isDarwin) [ java procps ]; + ++ lib.optionals (!stdenv.hostPlatform.isDarwin) [ java procps ]; - sourceRoot = "${dirname}${lib.optionalString stdenv.isDarwin ".app"}"; + sourceRoot = "${dirname}${lib.optionalString stdenv.hostPlatform.isDarwin ".app"}"; doCheck = stdenv.hostPlatform.system != "aarch64-linux"; checkPhase = "bin/isabelle build -v HOL-SMT_Examples"; - postUnpack = lib.optionalString stdenv.isDarwin '' + postUnpack = lib.optionalString stdenv.hostPlatform.isDarwin '' mv $sourceRoot ${dirname} sourceRoot=${dirname} ''; @@ -144,10 +144,10 @@ in stdenv.mkDerivation (finalAttrs: rec { '' + lib.optionalString (stdenv.hostPlatform.system == "x86_64-darwin") '' substituteInPlace lib/scripts/isabelle-platform \ --replace-fail 'ISABELLE_APPLE_PLATFORM64=arm64-darwin' "" - '' + lib.optionalString stdenv.isLinux '' + '' + lib.optionalString stdenv.hostPlatform.isLinux '' arch=${if stdenv.hostPlatform.system == "aarch64-linux" then "arm64-linux" else stdenv.hostPlatform.system} for f in contrib/*/$arch/{z3,nunchaku,spass,zipperposition}; do - patchelf --set-interpreter $(cat ${stdenv.cc}/nix-support/dynamic-linker) "$f"${lib.optionalString stdenv.isAarch64 " || true"} + patchelf --set-interpreter $(cat ${stdenv.cc}/nix-support/dynamic-linker) "$f"${lib.optionalString stdenv.hostPlatform.isAarch64 " || true"} done patchelf --set-interpreter $(cat ${stdenv.cc}/nix-support/dynamic-linker) contrib/bash_process-*/$arch/bash_process for d in contrib/kodkodi-*/jni/$arch; do @@ -221,7 +221,7 @@ in stdenv.mkDerivation (finalAttrs: rec { license = licenses.bsd3; maintainers = [ maintainers.jwiegley maintainers.jvanbruegge ]; platforms = platforms.unix; - broken = stdenv.isDarwin; + broken = stdenv.hostPlatform.isDarwin; }; passthru.withComponents = f: diff --git a/pkgs/by-name/iv/iverilog/package.nix b/pkgs/by-name/iv/iverilog/package.nix index 06e8a94a4c53..3dbbd8056dd3 100644 --- a/pkgs/by-name/iv/iverilog/package.nix +++ b/pkgs/by-name/iv/iverilog/package.nix @@ -44,7 +44,7 @@ stdenv.mkDerivation rec { enableParallelBuilding = true; - env = lib.optionalAttrs stdenv.isDarwin { + env = lib.optionalAttrs stdenv.hostPlatform.isDarwin { NIX_CFLAGS_COMPILE = "-Wno-error=implicit-function-declaration"; }; @@ -54,7 +54,7 @@ stdenv.mkDerivation rec { # (see https://github.com/steveicarus/iverilog/issues/917) # so disable the full suite for now. doCheck = true; - doInstallCheck = !stdenv.isAarch64; + doInstallCheck = !stdenv.hostPlatform.isAarch64; nativeInstallCheckInputs = [ perl diff --git a/pkgs/by-name/j/j/package.nix b/pkgs/by-name/j/j/package.nix index 97a8064cc60d..a832bc953333 100644 --- a/pkgs/by-name/j/j/package.nix +++ b/pkgs/by-name/j/j/package.nix @@ -30,17 +30,17 @@ stdenv.mkDerivation rec { # Emulate jplatform64.sh configuration variables jplatform = - if stdenv.isDarwin then "darwin" + if stdenv.hostPlatform.isDarwin then "darwin" else if stdenv.hostPlatform.isAarch then "raspberry" - else if stdenv.isLinux then "linux" + else if stdenv.hostPlatform.isLinux then "linux" else "unsupported"; j64x = - if stdenv.is32bit then "j32" - else if stdenv.isx86_64 then - if stdenv.isLinux && avx2Support then "j64avx2" else "j64" - else if stdenv.isAarch64 then - if stdenv.isDarwin then "j64arm" else "j64" + if stdenv.hostPlatform.is32bit then "j32" + else if stdenv.hostPlatform.isx86_64 then + if stdenv.hostPlatform.isLinux && avx2Support then "j64avx2" else "j64" + else if stdenv.hostPlatform.isAarch64 then + if stdenv.hostPlatform.isDarwin then "j64arm" else "j64" else "unsupported"; env.NIX_LDFLAGS = "-lgmp"; @@ -80,7 +80,7 @@ stdenv.mkDerivation rec { ''; license = licenses.gpl3Only; maintainers = with maintainers; [ raskin synthetica AndersonTorres ]; - broken = stdenv.isDarwin; + broken = stdenv.hostPlatform.isDarwin; platforms = platforms.all; mainProgram = "jconsole"; }; diff --git a/pkgs/by-name/jd/jdt-language-server/package.nix b/pkgs/by-name/jd/jdt-language-server/package.nix index 33d735424c32..268599a385ec 100644 --- a/pkgs/by-name/jd/jdt-language-server/package.nix +++ b/pkgs/by-name/jd/jdt-language-server/package.nix @@ -38,7 +38,7 @@ stdenv.mkDerivation (finalAttrs: { # The application ships with different config directories for each platform. # Note the application come with ARM variants as well, although the # current included wrapper doesn't use them. - configDir = if stdenv.isDarwin then "config_mac" else "config_linux"; + configDir = if stdenv.hostPlatform.isDarwin then "config_mac" else "config_linux"; in '' runHook preInstall diff --git a/pkgs/by-name/je/jellyfin-web/package.nix b/pkgs/by-name/je/jellyfin-web/package.nix index c1f81ee3f2f5..ee5622baabd6 100644 --- a/pkgs/by-name/je/jellyfin-web/package.nix +++ b/pkgs/by-name/je/jellyfin-web/package.nix @@ -16,7 +16,7 @@ let # node-canvas builds code that requires aligned_alloc, # which on Darwin requires at least the 10.15 SDK stdenv' = - if stdenv.isDarwin then + if stdenv.hostPlatform.isDarwin then overrideSDK stdenv { darwinMinVersion = "10.15"; darwinSdkVersion = "11.0"; @@ -42,11 +42,11 @@ buildNpmPackage' rec { npmBuildScript = [ "build:production" ]; - nativeBuildInputs = [ pkg-config ] ++ lib.optionals stdenv.isDarwin [ xcbuild ]; + nativeBuildInputs = [ pkg-config ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ xcbuild ]; buildInputs = [ pango ] - ++ lib.optionals stdenv.isDarwin [ + ++ lib.optionals stdenv.hostPlatform.isDarwin [ giflib darwin.apple_sdk.frameworks.CoreText ]; diff --git a/pkgs/by-name/ji/jikken/package.nix b/pkgs/by-name/ji/jikken/package.nix index aa4ab8184578..a401e9633fbc 100644 --- a/pkgs/by-name/ji/jikken/package.nix +++ b/pkgs/by-name/ji/jikken/package.nix @@ -25,7 +25,7 @@ rustPlatform.buildRustPackage rec { buildInputs = [ openssl ] - ++ lib.optionals stdenv.isDarwin [ + ++ lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk_11_0.frameworks.IOKit darwin.apple_sdk_11_0.frameworks.Security darwin.apple_sdk_11_0.frameworks.SystemConfiguration diff --git a/pkgs/by-name/jn/jnv/package.nix b/pkgs/by-name/jn/jnv/package.nix index ecb59dad3775..6257fbeede66 100644 --- a/pkgs/by-name/jn/jnv/package.nix +++ b/pkgs/by-name/jn/jnv/package.nix @@ -18,7 +18,7 @@ rustPlatform.buildRustPackage rec { cargoHash = "sha256-xF0sxoSo7z7lxrF3wFAmU7edREoWKBFBnZ6Xq22c8q0="; - buildInputs = lib.optional stdenv.isDarwin ( + buildInputs = lib.optional stdenv.hostPlatform.isDarwin ( with darwin.apple_sdk.frameworks; [ CoreGraphics diff --git a/pkgs/by-name/jo/job-security/package.nix b/pkgs/by-name/jo/job-security/package.nix index 3912f03daf6b..1d057f6ecd01 100644 --- a/pkgs/by-name/jo/job-security/package.nix +++ b/pkgs/by-name/jo/job-security/package.nix @@ -23,6 +23,6 @@ rustPlatform.buildRustPackage rec { license = with lib.licenses; [ asl20 mit mpl20 ]; maintainers = with lib.maintainers; [ fgaz ]; mainProgram = "jobs"; - broken = stdenv.isDarwin; + broken = stdenv.hostPlatform.isDarwin; }; } diff --git a/pkgs/by-name/jo/jogl/package.nix b/pkgs/by-name/jo/jogl/package.nix index a12b6b762220..d8a626ee15c0 100644 --- a/pkgs/by-name/jo/jogl/package.nix +++ b/pkgs/by-name/jo/jogl/package.nix @@ -56,7 +56,7 @@ stdenv.mkDerivation { --delete '//*[@if="setup.addNativeBroadcom"]' \ jogl/make/build-newt.xml '' - + lib.optionalString stdenv.isDarwin '' + + lib.optionalString stdenv.hostPlatform.isDarwin '' sed -i '/if="use.macos/d' gluegen/make/gluegen-cpptasks-base.xml rm -r jogl/oculusvr-sdk ''; @@ -67,11 +67,11 @@ stdenv.mkDerivation { git xmlstarlet stripJavaArchivesHook - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ xcbuild ]; - buildInputs = lib.optionals stdenv.isLinux [ + buildInputs = lib.optionals stdenv.hostPlatform.isLinux [ udev xorg.libX11 xorg.libXrandr @@ -81,7 +81,7 @@ stdenv.mkDerivation { xorg.libXxf86vm xorg.libXrender mesa - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk_11_0.frameworks.AppKit darwin.apple_sdk_11_0.frameworks.Cocoa ]; diff --git a/pkgs/by-name/jo/joshuto/package.nix b/pkgs/by-name/jo/joshuto/package.nix index 18ef1ea06369..0d35b905a99b 100644 --- a/pkgs/by-name/jo/joshuto/package.nix +++ b/pkgs/by-name/jo/joshuto/package.nix @@ -21,7 +21,7 @@ rustPlatform.buildRustPackage rec { nativeBuildInputs = [ installShellFiles ]; - buildInputs = lib.optionals stdenv.isDarwin [ + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.Foundation ]; diff --git a/pkgs/by-name/jo/josm/package.nix b/pkgs/by-name/jo/josm/package.nix index 749f6e0ba295..920b294562d1 100644 --- a/pkgs/by-name/jo/josm/package.nix +++ b/pkgs/by-name/jo/josm/package.nix @@ -33,10 +33,10 @@ stdenv.mkDerivation rec { dontUnpack = true; nativeBuildInputs = [ makeWrapper ]; - buildInputs = lib.optionals (!stdenv.isDarwin) [ jre ]; + buildInputs = lib.optionals (!stdenv.hostPlatform.isDarwin) [ jre ]; installPhase = - if stdenv.isDarwin then '' + if stdenv.hostPlatform.isDarwin then '' mkdir -p $out/Applications ${unzip}/bin/unzip ${srcs.macosx} 'JOSM.app/*' -d $out/Applications '' else '' diff --git a/pkgs/by-name/jo/jove/package.nix b/pkgs/by-name/jo/jove/package.nix index 82c3f9056d35..8c4c17170753 100644 --- a/pkgs/by-name/jo/jove/package.nix +++ b/pkgs/by-name/jo/jove/package.nix @@ -53,6 +53,6 @@ stdenv.mkDerivation (finalAttrs: { maintainers = with lib.maintainers; [ AndersonTorres ]; platforms = lib.platforms.unix; # never built on Hydra: https://hydra.nixos.org/job/nixpkgs/trunk/jove.x86_64-darwin - broken = stdenv.isDarwin; + broken = stdenv.hostPlatform.isDarwin; }; }) diff --git a/pkgs/by-name/ju/just/package.nix b/pkgs/by-name/ju/just/package.nix index 3dfcd639f5d1..169829952641 100644 --- a/pkgs/by-name/ju/just/package.nix +++ b/pkgs/by-name/ju/just/package.nix @@ -25,7 +25,7 @@ rustPlatform.buildRustPackage rec { cargoHash = "sha256-X3noVDRnnrR6xuOBfoH4JPdcPLOBHbGQb6opNvzK/TE="; nativeBuildInputs = [ installShellFiles mdbook ]; - buildInputs = lib.optionals stdenv.isDarwin [ libiconv ]; + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ libiconv ]; preCheck = '' # USER must not be empty diff --git a/pkgs/by-name/ju/justbuild/package.nix b/pkgs/by-name/ju/justbuild/package.nix index 7b531d554eae..86274edd4f3e 100644 --- a/pkgs/by-name/ju/justbuild/package.nix +++ b/pkgs/by-name/ju/justbuild/package.nix @@ -90,7 +90,7 @@ stdenv.mkDerivation rec { mv etc/repos.json.patched etc/repos.json jq '.unknown.PATH = []' etc/toolchain/CC/TARGETS > etc/toolchain/CC/TARGETS.patched mv etc/toolchain/CC/TARGETS.patched etc/toolchain/CC/TARGETS - '' + lib.optionalString stdenv.isDarwin '' + '' + lib.optionalString stdenv.hostPlatform.isDarwin '' sed -ie 's|-Wl,-z,stack-size=8388608|-Wl,-stack_size,0x800000|' bin/bootstrap.py ''; @@ -166,7 +166,7 @@ stdenv.mkDerivation rec { ''; meta = with lib; { - broken = stdenv.isDarwin; + broken = stdenv.hostPlatform.isDarwin; description = "Generic build tool"; homepage = "https://github.com/just-buildsystem/justbuild"; license = licenses.asl20; diff --git a/pkgs/by-name/jw/jwasm/package.nix b/pkgs/by-name/jw/jwasm/package.nix index a1cf1a9cf5c0..eaf30e58356e 100644 --- a/pkgs/by-name/jw/jwasm/package.nix +++ b/pkgs/by-name/jw/jwasm/package.nix @@ -44,7 +44,7 @@ stdenv.mkDerivation (finalAttrs: { license = lib.licenses.gpl2Plus; maintainers = with lib.maintainers; [ AndersonTorres ]; platforms = lib.platforms.unix; - broken = stdenv.isDarwin; + broken = stdenv.hostPlatform.isDarwin; }; }) # TODO: generalize for Windows builds diff --git a/pkgs/by-name/ka/kakoune-lsp/package.nix b/pkgs/by-name/ka/kakoune-lsp/package.nix index 74fdfb2c6e30..42176134371b 100644 --- a/pkgs/by-name/ka/kakoune-lsp/package.nix +++ b/pkgs/by-name/ka/kakoune-lsp/package.nix @@ -25,7 +25,7 @@ rustPlatform.buildRustPackage rec { cargoHash = "sha256-QonOqdcdp1vbxzLnF46X0DLVay2Up1LvHZ/ZZ04LqlE="; - buildInputs = lib.optionals stdenv.isDarwin [ + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ CoreServices Security SystemConfiguration diff --git a/pkgs/by-name/ka/kana/package.nix b/pkgs/by-name/ka/kana/package.nix index 3fc7e8d3c257..e0260d1363d6 100644 --- a/pkgs/by-name/ka/kana/package.nix +++ b/pkgs/by-name/ka/kana/package.nix @@ -50,7 +50,7 @@ stdenv.mkDerivation rec { gst-plugins-base gst-plugins-bad gst-plugins-good - ]) ++ lib.optionals stdenv.isDarwin [ + ]) ++ lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.Foundation ]; diff --git a/pkgs/by-name/ka/kanha/package.nix b/pkgs/by-name/ka/kanha/package.nix index c3f713d0370d..583671f38433 100644 --- a/pkgs/by-name/ka/kanha/package.nix +++ b/pkgs/by-name/ka/kanha/package.nix @@ -21,7 +21,7 @@ rustPlatform.buildRustPackage rec { buildInputs = [ openssl ] - ++ lib.optionals stdenv.isDarwin ( + ++ lib.optionals stdenv.hostPlatform.isDarwin ( with darwin.apple_sdk.frameworks; [ Security diff --git a/pkgs/by-name/ka/kanidm/package.nix b/pkgs/by-name/ka/kanidm/package.nix index 4a6272992787..cfa9e43ba7ff 100644 --- a/pkgs/by-name/ka/kanidm/package.nix +++ b/pkgs/by-name/ka/kanidm/package.nix @@ -24,7 +24,7 @@ }: let - arch = if stdenv.isx86_64 then "x86_64" else "generic"; + arch = if stdenv.hostPlatform.isx86_64 then "x86_64" else "generic"; in rustPlatform.buildRustPackage rec { pname = "kanidm"; @@ -51,7 +51,7 @@ rustPlatform.buildRustPackage rec { format = (formats.toml { }).generate "${KANIDM_BUILD_PROFILE}.toml"; profile = { admin_bind_path = "/run/kanidmd/sock"; - cpu_flags = if stdenv.isx86_64 then "x86_64_legacy" else "none"; + cpu_flags = if stdenv.hostPlatform.isx86_64 then "x86_64_legacy" else "none"; default_config_path = "/etc/kanidm/server.toml"; default_unix_shell_path = "${lib.getBin bashInteractive}/bin/bash"; htmx_ui_pkg_path = "@htmx_ui_pkg_path@"; diff --git a/pkgs/by-name/kc/kcl/package.nix b/pkgs/by-name/kc/kcl/package.nix index 84012a3a59bb..b016abe16bb9 100644 --- a/pkgs/by-name/kc/kcl/package.nix +++ b/pkgs/by-name/kc/kcl/package.nix @@ -23,7 +23,7 @@ buildGoModule rec { vendorHash = "sha256-DGYYH5sKhpcWHYoUim4NyflzqsXFc4MCOqIw5jIfIiM="; # By default, libs and bins are stripped. KCL will crash on darwin if they are. - dontStrip = stdenv.isDarwin; + dontStrip = stdenv.hostPlatform.isDarwin; ldflags = [ "-w -s" @@ -33,7 +33,7 @@ buildGoModule rec { nativeBuildInputs = [ makeWrapper installShellFiles ]; buildInputs = [ kclvm kclvm_cli ] ++ ( - lib.optional stdenv.isDarwin [ + lib.optional stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.Security darwin.apple_sdk.frameworks.CoreServices darwin.apple_sdk.frameworks.SystemConfiguration diff --git a/pkgs/by-name/kc/kclvm/package.nix b/pkgs/by-name/kc/kclvm/package.nix index 08864ba0b65a..17e9cefc8f9a 100644 --- a/pkgs/by-name/kc/kclvm/package.nix +++ b/pkgs/by-name/kc/kclvm/package.nix @@ -28,14 +28,14 @@ rustPlatform.buildRustPackage rec { }; }; - buildInputs = [ rustc ] ++ lib.optionals stdenv.isDarwin [ + buildInputs = [ rustc ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.Security darwin.apple_sdk.frameworks.CoreServices darwin.apple_sdk.frameworks.SystemConfiguration ]; - postInstall = lib.optionalString stdenv.isDarwin '' + postInstall = lib.optionalString stdenv.hostPlatform.isDarwin '' install_name_tool -id $out/lib/libkclvm_cli_cdylib.dylib $out/lib/libkclvm_cli_cdylib.dylib ''; diff --git a/pkgs/by-name/kc/kclvm_cli/package.nix b/pkgs/by-name/kc/kclvm_cli/package.nix index 2100a96996da..79b3b10f6664 100644 --- a/pkgs/by-name/kc/kclvm_cli/package.nix +++ b/pkgs/by-name/kc/kclvm_cli/package.nix @@ -23,7 +23,7 @@ rustPlatform.buildRustPackage rec { cargoPatches = [ ./cargo_lock.patch ]; buildInputs = [ kclvm rustc ] ++ ( - lib.optionals stdenv.isDarwin [ + lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.Security darwin.apple_sdk.frameworks.CoreServices darwin.apple_sdk.frameworks.SystemConfiguration diff --git a/pkgs/by-name/ke/keeweb/package.nix b/pkgs/by-name/ke/keeweb/package.nix index 063d59880d61..48b9a603d841 100644 --- a/pkgs/by-name/ke/keeweb/package.nix +++ b/pkgs/by-name/ke/keeweb/package.nix @@ -82,7 +82,7 @@ let platforms = builtins.attrNames srcs; }; in -if stdenv.isDarwin then +if stdenv.hostPlatform.isDarwin then stdenv.mkDerivation { inherit pname diff --git a/pkgs/by-name/ke/keycard-cli/package.nix b/pkgs/by-name/ke/keycard-cli/package.nix index 017990084c56..1b815533d0ab 100644 --- a/pkgs/by-name/ke/keycard-cli/package.nix +++ b/pkgs/by-name/ke/keycard-cli/package.nix @@ -24,6 +24,6 @@ buildGoModule rec { homepage = "https://keycard.status.im"; license = licenses.mpl20; maintainers = [ maintainers.zimbatm ]; - broken = stdenv.isDarwin; # never built on Hydra https://hydra.nixos.org/job/nixpkgs/trunk/keycard-cli.x86_64-darwin + broken = stdenv.hostPlatform.isDarwin; # never built on Hydra https://hydra.nixos.org/job/nixpkgs/trunk/keycard-cli.x86_64-darwin }; } diff --git a/pkgs/by-name/ke/keydb/package.nix b/pkgs/by-name/ke/keydb/package.nix index f33b51a0fbff..265f8a884fcb 100644 --- a/pkgs/by-name/ke/keydb/package.nix +++ b/pkgs/by-name/ke/keydb/package.nix @@ -48,18 +48,18 @@ stdenv.mkDerivation (finalAttrs: { "PREFIX=${placeholder "out"}" "AR=${stdenv.cc.targetPrefix}ar" "RANLIB=${stdenv.cc.targetPrefix}ranlib" - "USEASM=${if stdenv.isx86_64 then "true" else "false"}" + "USEASM=${if stdenv.hostPlatform.isx86_64 then "true" else "false"}" ] ++ lib.optionals (!tlsSupport) [ "BUILD_TLS=no" ] ++ lib.optionals withSystemd [ "USE_SYSTEMD=yes" ] - ++ lib.optionals (!stdenv.isx86_64) [ "MALLOC=libc" ]; + ++ lib.optionals (!stdenv.hostPlatform.isx86_64) [ "MALLOC=libc" ]; enableParallelBuilding = true; - hardeningEnable = lib.optionals (!stdenv.isDarwin) [ "pie" ]; + hardeningEnable = lib.optionals (!stdenv.hostPlatform.isDarwin) [ "pie" ]; # darwin currently lacks a pure `pgrep` which is extensively used here - doCheck = !stdenv.isDarwin; + doCheck = !stdenv.hostPlatform.isDarwin; nativeCheckInputs = [ which tcl diff --git a/pkgs/by-name/ki/kissfft/package.nix b/pkgs/by-name/ki/kissfft/package.nix index 1480d73b537e..03d0e7d04584 100644 --- a/pkgs/by-name/ki/kissfft/package.nix +++ b/pkgs/by-name/ki/kissfft/package.nix @@ -62,7 +62,7 @@ stdenv.mkDerivation (finalAttrs: { # Required for `test/testcpp.c`. env = { - NIX_CFLAGS_COMPILE = lib.optionalString stdenv.isDarwin "-D__MATH_LONG_DOUBLE_CONSTANTS=1"; + NIX_CFLAGS_COMPILE = lib.optionalString stdenv.hostPlatform.isDarwin "-D__MATH_LONG_DOUBLE_CONSTANTS=1"; }; doCheck = true; diff --git a/pkgs/by-name/kn/knxd/package.nix b/pkgs/by-name/kn/knxd/package.nix index 38e09d579745..bcbe85fcefc2 100644 --- a/pkgs/by-name/kn/knxd/package.nix +++ b/pkgs/by-name/kn/knxd/package.nix @@ -10,7 +10,7 @@ , fmt_9 , libev , withSystemd ? lib.meta.availableOn stdenv.hostPlatform systemd, systemd -, withUsb ? stdenv.isLinux, libusb1 +, withUsb ? stdenv.hostPlatform.isLinux, libusb1 }: stdenv.mkDerivation (finalAttrs: { @@ -34,7 +34,7 @@ stdenv.mkDerivation (finalAttrs: { buildInputs = [ fmt_9 libev ] ++ lib.optional withSystemd systemd ++ lib.optional withUsb libusb1 - ++ lib.optional stdenv.isDarwin argp-standalone; + ++ lib.optional stdenv.hostPlatform.isDarwin argp-standalone; configureFlags = [ (lib.enableFeature withSystemd "systemd") diff --git a/pkgs/by-name/ko/koboldcpp/package.nix b/pkgs/by-name/ko/koboldcpp/package.nix index 85053dc716ce..4d1a69a3b0be 100644 --- a/pkgs/by-name/ko/koboldcpp/package.nix +++ b/pkgs/by-name/ko/koboldcpp/package.nix @@ -16,7 +16,7 @@ config, cudaPackages ? { }, - openblasSupport ? !stdenv.isDarwin, + openblasSupport ? !stdenv.hostPlatform.isDarwin, openblas, cublasSupport ? config.cudaSupport, @@ -24,14 +24,14 @@ # For example if you're on an GTX 1080 that means you're using "Pascal" and you need to pass "sm_60" cudaArches ? cudaPackages.cudaFlags.realArches or [ ], - clblastSupport ? stdenv.isLinux, + clblastSupport ? stdenv.hostPlatform.isLinux, clblast, ocl-icd, vulkanSupport ? true, vulkan-loader, - metalSupport ? stdenv.isDarwin && stdenv.isAarch64, + metalSupport ? stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isAarch64, march ? "", mtune ? "", }: @@ -44,7 +44,7 @@ let ''; darwinFrameworks = - if (stdenv.isDarwin && stdenv.isx86_64) then + if (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isx86_64) then darwin.apple_sdk.frameworks else darwin.apple_sdk_11_0.frameworks; @@ -74,7 +74,7 @@ effectiveStdenv.mkDerivation (finalAttrs: { buildInputs = [ tk ] ++ finalAttrs.pythonInputs - ++ lib.optionals effectiveStdenv.isDarwin [ + ++ lib.optionals effectiveStdenv.hostPlatform.isDarwin [ darwinFrameworks.Accelerate darwinFrameworks.CoreVideo darwinFrameworks.CoreGraphics @@ -100,7 +100,7 @@ effectiveStdenv.mkDerivation (finalAttrs: { pythonPath = finalAttrs.pythonInputs; - darwinLdFlags = lib.optionals stdenv.isDarwin [ + darwinLdFlags = lib.optionals stdenv.hostPlatform.isDarwin [ "-F${darwinFrameworks.CoreServices}/Library/Frameworks" "-F${darwinFrameworks.Accelerate}/Library/Frameworks" "-framework CoreServices" diff --git a/pkgs/by-name/ko/kokkos/package.nix b/pkgs/by-name/ko/kokkos/package.nix index eb94813071cf..c5faab3042a3 100644 --- a/pkgs/by-name/ko/kokkos/package.nix +++ b/pkgs/by-name/ko/kokkos/package.nix @@ -40,6 +40,6 @@ stdenv.mkDerivation (finalAttrs: { license = with licenses; [ asl20-llvm ]; maintainers = with maintainers; [ Madouura ]; platforms = platforms.unix; - broken = stdenv.isDarwin; + broken = stdenv.hostPlatform.isDarwin; }; }) diff --git a/pkgs/by-name/ko/komac/package.nix b/pkgs/by-name/ko/komac/package.nix index 61f41cd5c58d..3e5186ec4851 100644 --- a/pkgs/by-name/ko/komac/package.nix +++ b/pkgs/by-name/ko/komac/package.nix @@ -33,7 +33,7 @@ rustPlatform.buildRustPackage { dbus openssl zstd - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.Security darwin.apple_sdk.frameworks.SystemConfiguration ]; diff --git a/pkgs/by-name/ko/koodo-reader/package.nix b/pkgs/by-name/ko/koodo-reader/package.nix index a57c44b0c37f..2d5132fb4cbe 100644 --- a/pkgs/by-name/ko/koodo-reader/package.nix +++ b/pkgs/by-name/ko/koodo-reader/package.nix @@ -36,7 +36,7 @@ stdenv.mkDerivation (finalAttrs: { yarnBuildHook nodejs ] - ++ lib.optionals (!stdenv.isDarwin) [ + ++ lib.optionals (!stdenv.hostPlatform.isDarwin) [ copyDesktopItems wrapGAppsHook3 ]; @@ -59,7 +59,7 @@ stdenv.mkDerivation (finalAttrs: { installPhase = '' runHook preInstall - ${lib.optionalString (!stdenv.isDarwin) '' + ${lib.optionalString (!stdenv.hostPlatform.isDarwin) '' install -Dm644 assets/icons/256x256.png $out/share/icons/hicolor/256x256/apps/koodo-reader.png install -Dm644 ${./mime-types.xml} $out/share/mime/packages/koodo-reader.xml @@ -67,7 +67,7 @@ stdenv.mkDerivation (finalAttrs: { cp -r dist/*-unpacked/{locales,resources{,.pak}} $out/share/lib/koodo-reader ''} - ${lib.optionalString stdenv.isDarwin '' + ${lib.optionalString stdenv.hostPlatform.isDarwin '' mkdir -p $out/Applications cp -r dist/mac*/"Koodo Reader.app" $out/Applications makeWrapper "$out/Applications/Koodo Reader.app/Contents/MacOS/Koodo Reader" $out/bin/koodo-reader @@ -77,7 +77,7 @@ stdenv.mkDerivation (finalAttrs: { ''; # we use makeShellWrapper instead of the makeBinaryWrapper provided by wrapGAppsHook for proper shell variable expansion - postFixup = lib.optionalString (!stdenv.isDarwin) '' + postFixup = lib.optionalString (!stdenv.hostPlatform.isDarwin) '' makeShellWrapper ${lib.getExe electron} $out/bin/koodo-reader \ --add-flags $out/share/lib/koodo-reader/resources/app.asar \ "''${gappsWrapperArgs[@]}" \ diff --git a/pkgs/by-name/ky/kyua/package.nix b/pkgs/by-name/ky/kyua/package.nix index ba399a44ab74..bec61ceeb4b5 100644 --- a/pkgs/by-name/ky/kyua/package.nix +++ b/pkgs/by-name/ky/kyua/package.nix @@ -37,7 +37,7 @@ stdenv.mkDerivation (finalAttrs: { --replace-fail 'CLI_LIBS = ' 'CLI_LIBS = libutils.a ' '' # These tests fail on Darwin or are unreliable. - + lib.optionalString (finalAttrs.doInstallCheck && stdenv.isDarwin) '' + + lib.optionalString (finalAttrs.doInstallCheck && stdenv.hostPlatform.isDarwin) '' sed -i utils/process/Makefile.am.inc -e '/executor_pid_test/d' substituteInPlace utils/process/Kyuafile \ --replace-fail 'atf_test_program{name="executor_pid_test"}' "" @@ -57,7 +57,7 @@ stdenv.mkDerivation (finalAttrs: { --replace-fail 'atf_add_test_case premature_exit' "" '' # fchflags and UF_NOUNLINK are not supported on Linux. Other tests also fail. - + lib.optionalString (finalAttrs.doInstallCheck && stdenv.isLinux) '' + + lib.optionalString (finalAttrs.doInstallCheck && stdenv.hostPlatform.isLinux) '' sed -i utils/process/Makefile.am.inc -e '/executor_pid_test/d' substituteInPlace utils/process/Kyuafile \ --replace-fail 'atf_test_program{name="executor_pid_test"}' "" diff --git a/pkgs/by-name/la/lan-mouse/package.nix b/pkgs/by-name/la/lan-mouse/package.nix index dff74b1b7958..b9bf9b2ddb02 100644 --- a/pkgs/by-name/la/lan-mouse/package.nix +++ b/pkgs/by-name/la/lan-mouse/package.nix @@ -36,7 +36,7 @@ rustPlatform.buildRustPackage rec { libX11 libXtst ] - ++ lib.optional stdenv.isDarwin darwin.apple_sdk.frameworks.CoreGraphics; + ++ lib.optional stdenv.hostPlatform.isDarwin darwin.apple_sdk.frameworks.CoreGraphics; cargoHash = "sha256-pDdpmZPaClU8KjFHO7v3FDQp9D83GQN+SnFg53q2fjs="; diff --git a/pkgs/by-name/la/lanraragi/package.nix b/pkgs/by-name/la/lanraragi/package.nix index ff32a96d78fd..24eab34147ed 100644 --- a/pkgs/by-name/la/lanraragi/package.nix +++ b/pkgs/by-name/la/lanraragi/package.nix @@ -61,7 +61,7 @@ buildNpmPackage rec { TimeLocal YAMLPP StringSimilarity - ] ++ lib.optionals stdenv.isLinux [ LinuxInotify2 ]; + ] ++ lib.optionals stdenv.hostPlatform.isLinux [ LinuxInotify2 ]; buildPhase = '' runHook preBuild diff --git a/pkgs/by-name/la/laszip/package.nix b/pkgs/by-name/la/laszip/package.nix index 65c2e6934a24..ded2abb03fec 100644 --- a/pkgs/by-name/la/laszip/package.nix +++ b/pkgs/by-name/la/laszip/package.nix @@ -18,7 +18,7 @@ stdenv.mkDerivation (finalAttrs: { nativeBuildInputs = [ cmake - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ fixDarwinDylibNames ]; diff --git a/pkgs/by-name/la/lazymc/package.nix b/pkgs/by-name/la/lazymc/package.nix index 9202d32b2e8a..8df8352d8a51 100644 --- a/pkgs/by-name/la/lazymc/package.nix +++ b/pkgs/by-name/la/lazymc/package.nix @@ -25,7 +25,7 @@ rustPlatform.buildRustPackage rec { }; }; - buildInputs = lib.optionals stdenv.isDarwin [ + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.CoreServices ]; diff --git a/pkgs/by-name/la/lazysql/package.nix b/pkgs/by-name/la/lazysql/package.nix index 9957de463d87..8d6e2c93fad0 100644 --- a/pkgs/by-name/la/lazysql/package.nix +++ b/pkgs/by-name/la/lazysql/package.nix @@ -19,7 +19,7 @@ buildGoModule rec { vendorHash = "sha256-celee8uyoirX+vtAww2iQJtRwJEHyfHL2mZA2muSRiQ="; - buildInputs = lib.optionals stdenv.isLinux [ xorg.libX11 ] ++ lib.optionals stdenv.isDarwin [ darwin.apple_sdk.frameworks.Cocoa ]; + buildInputs = lib.optionals stdenv.hostPlatform.isLinux [ xorg.libX11 ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.Cocoa ]; meta = with lib; { description = "A cross-platform TUI database management tool written in Go"; diff --git a/pkgs/by-name/lb/lbreakouthd/package.nix b/pkgs/by-name/lb/lbreakouthd/package.nix index 45911bacf770..267571846693 100644 --- a/pkgs/by-name/lb/lbreakouthd/package.nix +++ b/pkgs/by-name/lb/lbreakouthd/package.nix @@ -39,6 +39,6 @@ stdenv.mkDerivation (finalAttrs: { mainProgram = "lbreakouthd"; maintainers = with lib.maintainers; [ AndersonTorres ]; inherit (SDL2.meta) platforms; - broken = stdenv.isDarwin; + broken = stdenv.hostPlatform.isDarwin; }; }) diff --git a/pkgs/by-name/ld/ld64/package.nix b/pkgs/by-name/ld/ld64/package.nix index 2b00fdfb62db..4c9ed4c5f340 100644 --- a/pkgs/by-name/ld/ld64/package.nix +++ b/pkgs/by-name/ld/ld64/package.nix @@ -148,7 +148,7 @@ stdenv.mkDerivation (finalAttrs: { libunwind openssl xar - ] ++ lib.optionals stdenv.isDarwin [ darwin.dyld ] ++ lib.optionals stdenv.isLinux [ libdispatch ]; + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ darwin.dyld ] ++ lib.optionals stdenv.hostPlatform.isLinux [ libdispatch ]; # Note for overrides: ld64 cannot be built as a debug build because of UB in its iteration implementations, # which trigger libc++ debug assertions due to trying to take the address of the first element of an emtpy vector. diff --git a/pkgs/by-name/le/leaf/package.nix b/pkgs/by-name/le/leaf/package.nix index bda0c6d2afb0..1bd44f23d304 100644 --- a/pkgs/by-name/le/leaf/package.nix +++ b/pkgs/by-name/le/leaf/package.nix @@ -18,7 +18,7 @@ rustPlatform.buildRustPackage rec { cargoHash = "sha256-2I0XusAI98WLzGcwEorPmtcK3VkpwpkIn0JKwn3gT1c="; - buildInputs = lib.optionals stdenv.isDarwin [ + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.CoreFoundation darwin.apple_sdk.frameworks.SystemConfiguration ]; diff --git a/pkgs/by-name/le/legba/package.nix b/pkgs/by-name/le/legba/package.nix index 3f2453a13d86..efb9a351340b 100644 --- a/pkgs/by-name/le/legba/package.nix +++ b/pkgs/by-name/le/legba/package.nix @@ -23,7 +23,7 @@ rustPlatform.buildRustPackage rec { cargoHash = "sha256-viDfJ214Zf5segjrLSTbHav5T5e219NAF+MvuPow+JQ="; nativeBuildInputs = [ cmake pkg-config ]; - buildInputs = [ openssl.dev samba ] ++ lib.optionals stdenv.isDarwin [ + buildInputs = [ openssl.dev samba ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.SystemConfiguration ]; diff --git a/pkgs/by-name/li/liana/package.nix b/pkgs/by-name/li/liana/package.nix index ee5147b7d091..ab9b9e15cfd0 100644 --- a/pkgs/by-name/li/liana/package.nix +++ b/pkgs/by-name/li/liana/package.nix @@ -94,6 +94,6 @@ rustPlatform.buildRustPackage rec { license = licenses.bsd3; maintainers = with maintainers; [ dunxen ]; platforms = platforms.linux; - broken = stdenv.isAarch64; + broken = stdenv.hostPlatform.isAarch64; }; } diff --git a/pkgs/by-name/li/lianad/package.nix b/pkgs/by-name/li/lianad/package.nix index b2730c55a5bc..094044274699 100644 --- a/pkgs/by-name/li/lianad/package.nix +++ b/pkgs/by-name/li/lianad/package.nix @@ -38,6 +38,6 @@ rustPlatform.buildRustPackage rec { lib.maintainers.plebhash ]; platforms = lib.platforms.linux; - broken = stdenv.isAarch64; + broken = stdenv.hostPlatform.isAarch64; }; } diff --git a/pkgs/by-name/li/lib25519/package.nix b/pkgs/by-name/li/lib25519/package.nix index 90d377948f93..68d35a796a03 100644 --- a/pkgs/by-name/li/lib25519/package.nix +++ b/pkgs/by-name/li/lib25519/package.nix @@ -37,7 +37,7 @@ stdenv.mkDerivation (finalAttrs: { libcpucycles ]; - preFixup = lib.optionalString stdenv.isDarwin '' + preFixup = lib.optionalString stdenv.hostPlatform.isDarwin '' install_name_tool -id "$out/lib/lib25519.1.dylib" "$out/lib/lib25519.1.dylib" for f in $out/bin/*; do install_name_tool -change "lib25519.1.dylib" "$out/lib/lib25519.1.dylib" "$f" @@ -45,7 +45,7 @@ stdenv.mkDerivation (finalAttrs: { ''; # failure: crypto_pow does not handle p=q overlap - doInstallCheck = !stdenv.isDarwin; + doInstallCheck = !stdenv.hostPlatform.isDarwin; installCheckPhase = '' runHook preInstallCheck $out/bin/lib25519-test diff --git a/pkgs/by-name/li/libarchive/package.nix b/pkgs/by-name/li/libarchive/package.nix index 09a96e829e33..402514a64745 100644 --- a/pkgs/by-name/li/libarchive/package.nix +++ b/pkgs/by-name/li/libarchive/package.nix @@ -53,7 +53,7 @@ stdenv.mkDerivation (finalAttrs: { # access-time-related tests flakey on some systems "cpio/test/test_option_a.c" "cpio/test/test_option_t.c" - ] ++ lib.optionals (stdenv.isAarch64 && stdenv.isLinux) [ + ] ++ lib.optionals (stdenv.hostPlatform.isAarch64 && stdenv.hostPlatform.isLinux) [ # only on some aarch64-linux systems? "cpio/test/test_basic.c" "cpio/test/test_format_newc.c" @@ -82,15 +82,15 @@ stdenv.mkDerivation (finalAttrs: { zlib zstd ] ++ lib.optional stdenv.hostPlatform.isUnix sharutils - ++ lib.optionals stdenv.isLinux [ acl attr e2fsprogs ] + ++ lib.optionals stdenv.hostPlatform.isLinux [ acl attr e2fsprogs ] ++ lib.optional xarSupport libxml2; # Without this, pkg-config-based dependencies are unhappy - propagatedBuildInputs = lib.optionals stdenv.isLinux [ attr acl ]; + propagatedBuildInputs = lib.optionals stdenv.hostPlatform.isLinux [ attr acl ]; configureFlags = lib.optional (!xarSupport) "--without-xml2"; - preBuild = lib.optionalString stdenv.isCygwin '' + preBuild = lib.optionalString stdenv.hostPlatform.isCygwin '' echo "#include " >> config.h ''; diff --git a/pkgs/by-name/li/libaribcaption/package.nix b/pkgs/by-name/li/libaribcaption/package.nix index 7d39841ec6fe..936991ef6a87 100644 --- a/pkgs/by-name/li/libaribcaption/package.nix +++ b/pkgs/by-name/li/libaribcaption/package.nix @@ -27,10 +27,10 @@ stdenv.mkDerivation rec { cmakeFlags = [ "-DBUILD_SHARED_LIBS=ON" ]; - buildInputs = lib.optionals (!stdenv.isDarwin) [ + buildInputs = lib.optionals (!stdenv.hostPlatform.isDarwin) [ fontconfig freetype - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ ApplicationServices CoreFoundation CoreGraphics diff --git a/pkgs/by-name/li/libcaca/package.nix b/pkgs/by-name/li/libcaca/package.nix index 6b99439fe017..bb0d57168766 100644 --- a/pkgs/by-name/li/libcaca/package.nix +++ b/pkgs/by-name/li/libcaca/package.nix @@ -7,7 +7,7 @@ , ncurses , pkg-config , zlib -, x11Support ? !stdenv.isDarwin +, x11Support ? !stdenv.hostPlatform.isDarwin }: stdenv.mkDerivation rec { diff --git a/pkgs/by-name/li/libclipboard/package.nix b/pkgs/by-name/li/libclipboard/package.nix index 1febf35d1c8f..eec120bcd62d 100644 --- a/pkgs/by-name/li/libclipboard/package.nix +++ b/pkgs/by-name/li/libclipboard/package.nix @@ -22,7 +22,7 @@ stdenv.mkDerivation (finalAttrs: { }; buildInputs = [ libxcb libXau libXdmcp ] - ++ lib.optional stdenv.isDarwin [ darwin.apple_sdk.frameworks.Cocoa ]; + ++ lib.optional stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.Cocoa ]; nativeBuildInputs = [ cmake pkg-config ]; cmakeFlags = [ "-DBUILD_SHARED_LIBS=ON" ]; diff --git a/pkgs/by-name/li/libcpucycles/package.nix b/pkgs/by-name/li/libcpucycles/package.nix index 4e88903de66d..84292201640b 100644 --- a/pkgs/by-name/li/libcpucycles/package.nix +++ b/pkgs/by-name/li/libcpucycles/package.nix @@ -26,7 +26,7 @@ stdenv.mkDerivation (finalAttrs: { inherit (librandombytes) hardeningDisable configurePlatforms env; - preFixup = lib.optionalString stdenv.isDarwin '' + preFixup = lib.optionalString stdenv.hostPlatform.isDarwin '' install_name_tool -id "$out/lib/libcpucycles.1.dylib" "$out/lib/libcpucycles.1.dylib" install_name_tool -change "libcpucycles.1.dylib" "$out/lib/libcpucycles.1.dylib" "$out/bin/cpucycles-info" ''; diff --git a/pkgs/by-name/li/libdeltachat/package.nix b/pkgs/by-name/li/libdeltachat/package.nix index 360ac8a80e1f..237e48a7c3ea 100644 --- a/pkgs/by-name/li/libdeltachat/package.nix +++ b/pkgs/by-name/li/libdeltachat/package.nix @@ -50,7 +50,7 @@ in stdenv.mkDerivation rec { pkg-config rustPlatform.cargoSetupHook cargo - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ fixDarwinDylibNames ]; @@ -58,7 +58,7 @@ in stdenv.mkDerivation rec { openssl sqlcipher sqlite - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.CoreFoundation darwin.apple_sdk.frameworks.Security darwin.apple_sdk.frameworks.SystemConfiguration diff --git a/pkgs/by-name/li/libetebase/package.nix b/pkgs/by-name/li/libetebase/package.nix index d039cad84201..c76b5a2320f7 100644 --- a/pkgs/by-name/li/libetebase/package.nix +++ b/pkgs/by-name/li/libetebase/package.nix @@ -38,7 +38,7 @@ rustPlatform.buildRustPackage rec { description = "A C library for Etebase"; homepage = "https://www.etebase.com/"; license = licenses.bsd3; - broken = stdenv.isDarwin; + broken = stdenv.hostPlatform.isDarwin; maintainers = with maintainers; [ laalsaas ]; pkgConfigModules = [ "etebase" ]; }; diff --git a/pkgs/by-name/li/libewf-legacy/package.nix b/pkgs/by-name/li/libewf-legacy/package.nix index 3d2aee4d2874..fdd202f8c96d 100644 --- a/pkgs/by-name/li/libewf-legacy/package.nix +++ b/pkgs/by-name/li/libewf-legacy/package.nix @@ -19,7 +19,7 @@ stdenv.mkDerivation (finalAttrs: { nativeBuildInputs = [ pkg-config ]; buildInputs = [ zlib openssl libuuid ] - ++ lib.optionals stdenv.isDarwin [ bzip2 ]; + ++ lib.optionals stdenv.hostPlatform.isDarwin [ bzip2 ]; meta = { description = "Legacy library for support of the Expert Witness Compression Format"; diff --git a/pkgs/by-name/li/libgedit-amtk/package.nix b/pkgs/by-name/li/libgedit-amtk/package.nix index 76b5bfd5fcae..631e6e623b9e 100644 --- a/pkgs/by-name/li/libgedit-amtk/package.nix +++ b/pkgs/by-name/li/libgedit-amtk/package.nix @@ -52,7 +52,7 @@ stdenv.mkDerivation rec { dbus # For dbus-run-session ]; - doCheck = stdenv.isLinux; + doCheck = stdenv.hostPlatform.isLinux; checkPhase = '' runHook preCheck diff --git a/pkgs/by-name/li/libhttpserver/package.nix b/pkgs/by-name/li/libhttpserver/package.nix index 2a99246aab56..a61342b99d07 100644 --- a/pkgs/by-name/li/libhttpserver/package.nix +++ b/pkgs/by-name/li/libhttpserver/package.nix @@ -41,6 +41,6 @@ stdenv.mkDerivation rec { license = licenses.lgpl21Plus; maintainers = with maintainers; [ pongo1231 ]; platforms = platforms.unix; - broken = stdenv.isDarwin; # configure: error: cannot find required auxiliary files: ltmain.sh + broken = stdenv.hostPlatform.isDarwin; # configure: error: cannot find required auxiliary files: ltmain.sh }; } diff --git a/pkgs/by-name/li/libiconv-darwin/package.nix b/pkgs/by-name/li/libiconv-darwin/package.nix index 5792568852ff..e928cd999165 100644 --- a/pkgs/by-name/li/libiconv-darwin/package.nix +++ b/pkgs/by-name/li/libiconv-darwin/package.nix @@ -75,7 +75,7 @@ stdenv.mkDerivation (finalAttrs: { mesonFlags = [ (lib.mesonBool "tests" finalAttrs.doInstallCheck) ]; postInstall = - lib.optionalString (stdenv.isDarwin && !hostPlatform.isStatic) '' + lib.optionalString (stdenv.hostPlatform.isDarwin && !hostPlatform.isStatic) '' ${stdenv.cc.targetPrefix}install_name_tool "$out/lib/libiconv.2.dylib" \ -change '@rpath/libcharset.1.dylib' "$out/lib/libcharset.1.dylib" '' diff --git a/pkgs/by-name/li/libisoburn/package.nix b/pkgs/by-name/li/libisoburn/package.nix index 7fc8c6aff60f..498c3394d3e1 100644 --- a/pkgs/by-name/li/libisoburn/package.nix +++ b/pkgs/by-name/li/libisoburn/package.nix @@ -39,12 +39,12 @@ stdenv.mkDerivation (finalAttrs: { zlib libburn libisofs - ] ++ lib.optionals stdenv.isLinux [ + ] ++ lib.optionals stdenv.hostPlatform.isLinux [ acl attr ]; - propagatedBuildInputs = lib.optionals stdenv.isLinux [ + propagatedBuildInputs = lib.optionals stdenv.hostPlatform.isLinux [ acl ]; diff --git a/pkgs/by-name/li/libisofs/package.nix b/pkgs/by-name/li/libisofs/package.nix index ac9c606b5552..52b807c6c8d2 100644 --- a/pkgs/by-name/li/libisofs/package.nix +++ b/pkgs/by-name/li/libisofs/package.nix @@ -24,10 +24,10 @@ stdenv.mkDerivation (finalAttrs: { autoreconfHook ]; - buildInputs = lib.optionals stdenv.isLinux [ + buildInputs = lib.optionals stdenv.hostPlatform.isLinux [ acl attr - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ libiconv ] ++ [ zlib diff --git a/pkgs/by-name/li/libmpd/package.nix b/pkgs/by-name/li/libmpd/package.nix index bf2e6c70d2ad..bb6c9ed45f8c 100644 --- a/pkgs/by-name/li/libmpd/package.nix +++ b/pkgs/by-name/li/libmpd/package.nix @@ -42,6 +42,6 @@ stdenv.mkDerivation (finalAttrs: { maintainers = with maintainers; [ doronbehar ]; platforms = platforms.all; # Getting DARWIN_NULL related errors - broken = stdenv.isDarwin; + broken = stdenv.hostPlatform.isDarwin; }; }) diff --git a/pkgs/by-name/li/libmpdclient/package.nix b/pkgs/by-name/li/libmpdclient/package.nix index 691a1b76a2fb..297ca698b0c9 100644 --- a/pkgs/by-name/li/libmpdclient/package.nix +++ b/pkgs/by-name/li/libmpdclient/package.nix @@ -20,7 +20,7 @@ stdenv.mkDerivation (finalAttrs: { nativeBuildInputs = [ meson ninja - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ fixDarwinDylibNames ]; diff --git a/pkgs/by-name/li/libopus/package.nix b/pkgs/by-name/li/libopus/package.nix index cdf00a244ba4..f809c40000e9 100644 --- a/pkgs/by-name/li/libopus/package.nix +++ b/pkgs/by-name/li/libopus/package.nix @@ -54,7 +54,7 @@ stdenv.mkDerivation (finalAttrs: { (lib.mesonEnable "docs" false) ]; - doCheck = !stdenv.isi686 && !stdenv.isAarch32; # test_unit_LPC_inv_pred_gain fails + doCheck = !stdenv.hostPlatform.isi686 && !stdenv.hostPlatform.isAarch32; # test_unit_LPC_inv_pred_gain fails passthru = { updateScript = gitUpdater { diff --git a/pkgs/by-name/li/libplacebo_5/package.nix b/pkgs/by-name/li/libplacebo_5/package.nix index 5bc799ddf860..e75d44dcdf26 100644 --- a/pkgs/by-name/li/libplacebo_5/package.nix +++ b/pkgs/by-name/li/libplacebo_5/package.nix @@ -51,7 +51,7 @@ stdenv.mkDerivation rec { (lib.mesonBool "demos" false) # Don't build and install the demo programs (lib.mesonEnable "d3d11" false) # Disable the Direct3D 11 based renderer (lib.mesonEnable "glslang" false) # rely on shaderc for GLSL compilation instead - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ (lib.mesonEnable "unwind" false) # libplacebo doesn’t build with `darwin.libunwind` ]; diff --git a/pkgs/by-name/li/librandombytes/package.nix b/pkgs/by-name/li/librandombytes/package.nix index f36a94018e75..5bb8175420de 100644 --- a/pkgs/by-name/li/librandombytes/package.nix +++ b/pkgs/by-name/li/librandombytes/package.nix @@ -46,7 +46,7 @@ stdenv.mkDerivation (finalAttrs: { buildInputs = [ openssl ]; - preFixup = lib.optionalString stdenv.isDarwin '' + preFixup = lib.optionalString stdenv.hostPlatform.isDarwin '' install_name_tool -id "$out/lib/librandombytes-kernel.1.dylib" "$out/lib/librandombytes-kernel.1.dylib" install_name_tool -change "librandombytes-kernel.1.dylib" "$out/lib/librandombytes-kernel.1.dylib" "$out/bin/randombytes-info" ''; diff --git a/pkgs/by-name/li/librep/package.nix b/pkgs/by-name/li/librep/package.nix index 84f610ce2474..373f8232a857 100644 --- a/pkgs/by-name/li/librep/package.nix +++ b/pkgs/by-name/li/librep/package.nix @@ -35,7 +35,7 @@ stdenv.mkDerivation (finalAttrs: { strictDeps = true; # ensure libsystem/ctype functions don't get duplicated when using clang - configureFlags = lib.optionals stdenv.isDarwin [ "CFLAGS=-std=gnu89" ]; + configureFlags = lib.optionals stdenv.hostPlatform.isDarwin [ "CFLAGS=-std=gnu89" ]; setupHook = ./setup-hook.sh; diff --git a/pkgs/by-name/li/librum/package.nix b/pkgs/by-name/li/librum/package.nix index 2d6612c68098..40158f72a120 100644 --- a/pkgs/by-name/li/librum/package.nix +++ b/pkgs/by-name/li/librum/package.nix @@ -35,14 +35,14 @@ stdenv.mkDerivation rec { cmake qt6.qttools qt6.wrapQtAppsHook - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ desktopToDarwinBundle ]; buildInputs = [ qt6.qtbase qt6.qtsvg - ] ++ lib.optionals stdenv.isLinux [ + ] ++ lib.optionals stdenv.hostPlatform.isLinux [ qt6.qtwayland ]; diff --git a/pkgs/by-name/li/libsignal-ffi/package.nix b/pkgs/by-name/li/libsignal-ffi/package.nix index f2a8341a2097..797729d7caa0 100644 --- a/pkgs/by-name/li/libsignal-ffi/package.nix +++ b/pkgs/by-name/li/libsignal-ffi/package.nix @@ -32,12 +32,12 @@ rustPlatform.buildRustPackage rec { hash = "sha256-hQ3iWGLef1y3yyzjWH2MWcs32A7HxUSxGG8fCyMn/KE="; }; - buildInputs = lib.optional stdenv.isDarwin [ darwin.apple_sdk.frameworks.Security ]; + buildInputs = lib.optional stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.Security ]; nativeBuildInputs = [ protobuf rustPlatform.bindgenHook - ] ++ lib.optionals stdenv.isDarwin [ xcodebuild ]; + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ xcodebuild ]; env.BORING_BSSL_PATH = "${boringssl-wrapper}"; diff --git a/pkgs/by-name/li/libspatialindex/package.nix b/pkgs/by-name/li/libspatialindex/package.nix index ead9fe2b09e0..c420532351d9 100644 --- a/pkgs/by-name/li/libspatialindex/package.nix +++ b/pkgs/by-name/li/libspatialindex/package.nix @@ -21,7 +21,7 @@ stdenv.mkDerivation (finalAttrs: { patchShebangs test/ ''; - nativeBuildInputs = [ cmake ] ++ lib.optional stdenv.isDarwin fixDarwinDylibNames; + nativeBuildInputs = [ cmake ] ++ lib.optional stdenv.hostPlatform.isDarwin fixDarwinDylibNames; cmakeFlags = [ (lib.cmakeBool "BUILD_TESTING" finalAttrs.finalPackage.doCheck) @@ -37,7 +37,7 @@ stdenv.mkDerivation (finalAttrs: { doCheck = true; - postFixup = lib.optionalString stdenv.isDarwin '' + postFixup = lib.optionalString stdenv.hostPlatform.isDarwin '' install_name_tool -change "@rpath/libspatialindex.7.dylib" "$out/lib/libspatialindex.7.dylib" $out/lib/libspatialindex_c.dylib ''; diff --git a/pkgs/by-name/li/libtapi/package.nix b/pkgs/by-name/li/libtapi/package.nix index b11de1756c90..0e4f3db7611e 100644 --- a/pkgs/by-name/li/libtapi/package.nix +++ b/pkgs/by-name/li/libtapi/package.nix @@ -97,7 +97,7 @@ stdenv.mkDerivation (finalAttrs: { substituteInPlace tapi/test/CMakeLists.txt \ --replace-fail tapi-configs "" '' - + lib.optionalString stdenv.isLinux '' + + lib.optionalString stdenv.hostPlatform.isLinux '' # Remove Darwin-specific versioning flags. substituteInPlace tapi/tools/libtapi/CMakeLists.txt \ --replace-fail '-current_version ''${DYLIB_VERSION} -compatibility_version 1' "" diff --git a/pkgs/by-name/li/libtorrent-rasterbar-1_2_x/package.nix b/pkgs/by-name/li/libtorrent-rasterbar-1_2_x/package.nix index 9de8a04c34da..f5b388ea6270 100644 --- a/pkgs/by-name/li/libtorrent-rasterbar-1_2_x/package.nix +++ b/pkgs/by-name/li/libtorrent-rasterbar-1_2_x/package.nix @@ -25,7 +25,7 @@ in stdenv.mkDerivation { nativeBuildInputs = [ automake autoconf libtool pkg-config ]; buildInputs = [ boostPython openssl zlib python311 libiconv ncurses ] - ++ lib.optionals stdenv.isDarwin [ darwin.apple_sdk.frameworks.SystemConfiguration ]; + ++ lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.SystemConfiguration ]; preConfigure = "./autotool.sh"; @@ -48,7 +48,7 @@ in stdenv.mkDerivation { description = "C++ BitTorrent implementation focusing on efficiency and scalability"; license = licenses.bsd3; maintainers = [ ]; - broken = stdenv.isDarwin; + broken = stdenv.hostPlatform.isDarwin; platforms = platforms.unix; }; } diff --git a/pkgs/by-name/li/libtorrent-rasterbar-2_0_x/package.nix b/pkgs/by-name/li/libtorrent-rasterbar-2_0_x/package.nix index 4c76d021a405..3f85048e4eb7 100644 --- a/pkgs/by-name/li/libtorrent-rasterbar-2_0_x/package.nix +++ b/pkgs/by-name/li/libtorrent-rasterbar-2_0_x/package.nix @@ -23,7 +23,7 @@ in stdenv.mkDerivation { nativeBuildInputs = [ cmake ]; buildInputs = [ boostPython openssl zlib python3 ncurses ] - ++ lib.optionals stdenv.isDarwin [ darwin.apple_sdk.frameworks.SystemConfiguration ]; + ++ lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.SystemConfiguration ]; patches = [ # provide distutils alternative for python 3.12 diff --git a/pkgs/by-name/li/libtoxcore/package.nix b/pkgs/by-name/li/libtoxcore/package.nix index 6b3a2ffbcb01..6bad88293eb0 100644 --- a/pkgs/by-name/li/libtoxcore/package.nix +++ b/pkgs/by-name/li/libtoxcore/package.nix @@ -11,7 +11,7 @@ , pkg-config }: -let buildToxAV = !stdenv.isAarch32; +let buildToxAV = !stdenv.hostPlatform.isAarch32; in stdenv.mkDerivation rec { pname = "libtoxcore"; version = "0.2.19"; diff --git a/pkgs/by-name/li/libui-ng/package.nix b/pkgs/by-name/li/libui-ng/package.nix index b5b0812d0188..cc308d86c842 100644 --- a/pkgs/by-name/li/libui-ng/package.nix +++ b/pkgs/by-name/li/libui-ng/package.nix @@ -21,7 +21,7 @@ stdenv.mkDerivation rec { hash = "sha256-W9LnUBUKwx1x3+BEeUanisBGR2Q4dnbcMM5k8mCondM="; }; - postPatch = lib.optionalString (stdenv.isDarwin && stdenv.isx86_64) '' + postPatch = lib.optionalString (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isx86_64) '' substituteInPlace meson.build --replace "'-arch', 'arm64'" "" ''; @@ -33,7 +33,7 @@ stdenv.mkDerivation rec { ]; buildInputs = - if stdenv.isDarwin then [ + if stdenv.hostPlatform.isDarwin then [ darwin.libobjc darwin.apple_sdk_11_0.Libsystem darwin.apple_sdk_11_0.frameworks.Cocoa @@ -44,7 +44,7 @@ stdenv.mkDerivation rec { ]; mesonFlags = [ - (lib.mesonBool "examples" (!stdenv.isDarwin)) + (lib.mesonBool "examples" (!stdenv.hostPlatform.isDarwin)) ]; passthru.updateScript = unstableGitUpdater { diff --git a/pkgs/by-name/li/licensure/package.nix b/pkgs/by-name/li/licensure/package.nix index 8c7485ed0a43..97db16e1fcba 100644 --- a/pkgs/by-name/li/licensure/package.nix +++ b/pkgs/by-name/li/licensure/package.nix @@ -22,7 +22,7 @@ rustPlatform.buildRustPackage rec { cargoHash = "sha256-Ywfn+6qdKD9CG2/xdHR2XDsj5LF5XPJ2+XR5H1o2iXk="; nativeBuildInputs = [ pkg-config ]; buildInputs = [ openssl git gitls ] - ++ lib.optionals stdenv.isDarwin [ + ++ lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.SystemConfiguration ]; diff --git a/pkgs/by-name/li/lightning/package.nix b/pkgs/by-name/li/lightning/package.nix index f85020499047..ea99a5873dc8 100644 --- a/pkgs/by-name/li/lightning/package.nix +++ b/pkgs/by-name/li/lightning/package.nix @@ -46,6 +46,6 @@ stdenv.mkDerivation (finalAttrs: { maintainers = with lib.maintainers; [ AndersonTorres ]; license = with lib.licenses; [ lgpl3Plus ]; platforms = lib.platforms.unix; - broken = stdenv.isDarwin; # failing tests + broken = stdenv.hostPlatform.isDarwin; # failing tests }; }) diff --git a/pkgs/by-name/li/lightningcss/package.nix b/pkgs/by-name/li/lightningcss/package.nix index 1af974647cba..cee6f869d3cc 100644 --- a/pkgs/by-name/li/lightningcss/package.nix +++ b/pkgs/by-name/li/lightningcss/package.nix @@ -48,6 +48,6 @@ rustPlatform.buildRustPackage rec { maintainers = with lib.maintainers; [ johnrtitor toastal ]; mainProgram = "lightningcss"; # never built on aarch64-linux since first introduction in nixpkgs - broken = stdenv.isLinux && stdenv.isAarch64; + broken = stdenv.hostPlatform.isLinux && stdenv.hostPlatform.isAarch64; }; } diff --git a/pkgs/by-name/li/littlefs-fuse/package.nix b/pkgs/by-name/li/littlefs-fuse/package.nix index a4150b8786b5..f9a769308491 100644 --- a/pkgs/by-name/li/littlefs-fuse/package.nix +++ b/pkgs/by-name/li/littlefs-fuse/package.nix @@ -24,6 +24,6 @@ stdenv.mkDerivation rec { mainProgram = "littlefs-fuse"; inherit (fuse.meta) platforms; # fatal error: 'linux/fs.h' file not found - broken = stdenv.isDarwin; + broken = stdenv.hostPlatform.isDarwin; }; } diff --git a/pkgs/by-name/li/live-server/package.nix b/pkgs/by-name/li/live-server/package.nix index 1c430cad3be0..c218628eb162 100644 --- a/pkgs/by-name/li/live-server/package.nix +++ b/pkgs/by-name/li/live-server/package.nix @@ -25,7 +25,7 @@ rustPlatform.buildRustPackage rec { buildInputs = [ openssl ] - ++ lib.optionals stdenv.isDarwin ( + ++ lib.optionals stdenv.hostPlatform.isDarwin ( with darwin.apple_sdk.frameworks; [ CoreServices diff --git a/pkgs/by-name/li/live555/package.nix b/pkgs/by-name/li/live555/package.nix index c629ff54ea6f..c425b9743f89 100644 --- a/pkgs/by-name/li/live555/package.nix +++ b/pkgs/by-name/li/live555/package.nix @@ -30,7 +30,7 @@ stdenv.mkDerivation (finalAttrs: { }) ]; - nativeBuildInputs = lib.optionals stdenv.isDarwin [ + nativeBuildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ cctools ]; @@ -74,9 +74,9 @@ stdenv.mkDerivation (finalAttrs: { configurePhase = let platform = - if stdenv.isLinux then + if stdenv.hostPlatform.isLinux then "linux" - else if stdenv.isDarwin then + else if stdenv.hostPlatform.isDarwin then "macosx-catalina" else throw "Unsupported platform: ${stdenv.hostPlatform.system}"; diff --git a/pkgs/by-name/ll/llama-cpp/package.nix b/pkgs/by-name/ll/llama-cpp/package.nix index 6659122880e8..1a600461232a 100644 --- a/pkgs/by-name/ll/llama-cpp/package.nix +++ b/pkgs/by-name/ll/llama-cpp/package.nix @@ -20,7 +20,7 @@ , blas , pkg-config -, metalSupport ? stdenv.isDarwin && stdenv.isAarch64 && !openclSupport +, metalSupport ? stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isAarch64 && !openclSupport , vulkanSupport ? false , rpcSupport ? false , shaderc @@ -98,7 +98,7 @@ effectiveStdenv.mkDerivation (finalAttrs: { autoAddDriverRunpath ]; - buildInputs = optionals effectiveStdenv.isDarwin darwinBuildInputs + buildInputs = optionals effectiveStdenv.hostPlatform.isDarwin darwinBuildInputs ++ optionals cudaSupport cudaBuildInputs ++ optionals openclSupport [ clblast ] ++ optionals rocmSupport rocmBuildInputs @@ -163,6 +163,6 @@ effectiveStdenv.mkDerivation (finalAttrs: { maintainers = with maintainers; [ dit7ya elohmeier philiptaron ]; platforms = platforms.unix; badPlatforms = optionals (cudaSupport || openclSupport) lib.platforms.darwin; - broken = (metalSupport && !effectiveStdenv.isDarwin); + broken = (metalSupport && !effectiveStdenv.hostPlatform.isDarwin); }; }) diff --git a/pkgs/by-name/ll/llm-ls/package.nix b/pkgs/by-name/ll/llm-ls/package.nix index b1e759d29a55..c7a0aec58a22 100644 --- a/pkgs/by-name/ll/llm-ls/package.nix +++ b/pkgs/by-name/ll/llm-ls/package.nix @@ -42,7 +42,7 @@ rustPlatform.buildRustPackage { buildInputs = [ libiconv - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.Security ]; diff --git a/pkgs/by-name/lm/lmstudio/package.nix b/pkgs/by-name/lm/lmstudio/package.nix index 3619f799738e..6c672338493d 100644 --- a/pkgs/by-name/lm/lmstudio/package.nix +++ b/pkgs/by-name/lm/lmstudio/package.nix @@ -16,7 +16,7 @@ let sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ]; }; in - if stdenv.isDarwin + if stdenv.hostPlatform.isDarwin then callPackage ./darwin.nix { inherit pname version meta; } else callPackage ./linux.nix { inherit pname version meta; } diff --git a/pkgs/by-name/lo/localsend/package.nix b/pkgs/by-name/lo/localsend/package.nix index 504500cad7aa..b2cb74054cc1 100644 --- a/pkgs/by-name/lo/localsend/package.nix +++ b/pkgs/by-name/lo/localsend/package.nix @@ -112,4 +112,4 @@ let ]; }; in -if stdenv.isDarwin then darwin else linux +if stdenv.hostPlatform.isDarwin then darwin else linux diff --git a/pkgs/by-name/lo/logseq/package.nix b/pkgs/by-name/lo/logseq/package.nix index 6c0e0dd0d7bc..06fc0d3fd0a3 100644 --- a/pkgs/by-name/lo/logseq/package.nix +++ b/pkgs/by-name/lo/logseq/package.nix @@ -33,21 +33,21 @@ in { src = fetchurl { inherit hash; url = "https://github.com/logseq/logseq/releases/download/${version}/logseq-${suffix}"; - name = lib.optionalString stdenv.isLinux "logseq-${version}.AppImage"; + name = lib.optionalString stdenv.hostPlatform.isLinux "logseq-${version}.AppImage"; }; nativeBuildInputs = [ makeWrapper ] - ++ lib.optionals stdenv.isLinux [ autoPatchelfHook ] - ++ lib.optionals stdenv.isDarwin [ unzip ]; + ++ lib.optionals stdenv.hostPlatform.isLinux [ autoPatchelfHook ] + ++ lib.optionals stdenv.hostPlatform.isDarwin [ unzip ]; buildInputs = [ stdenv.cc.cc.lib ]; - dontUnpack = stdenv.isLinux; + dontUnpack = stdenv.hostPlatform.isLinux; dontConfigure = true; dontBuild = true; installPhase = '' runHook preInstall - '' + lib.optionalString stdenv.isLinux ( + '' + lib.optionalString stdenv.hostPlatform.isLinux ( let appimageContents = appimageTools.extract { inherit pname src version; }; in @@ -68,7 +68,7 @@ in { substituteInPlace $out/share/applications/logseq.desktop \ --replace Exec=Logseq Exec=logseq \ --replace Icon=Logseq Icon=logseq - '') + lib.optionalString stdenv.isDarwin '' + '') + lib.optionalString stdenv.hostPlatform.isDarwin '' mkdir -p $out/{Applications/Logseq.app,bin} cp -R . $out/Applications/Logseq.app makeWrapper $out/Applications/Logseq.app/Contents/MacOS/Logseq $out/bin/logseq @@ -76,7 +76,7 @@ in { runHook postInstall ''; - postFixup = lib.optionalString stdenv.isLinux '' + postFixup = lib.optionalString stdenv.hostPlatform.isLinux '' # set the env "LOCAL_GIT_DIRECTORY" for dugite so that we can use the git in nixpkgs makeWrapper ${electron}/bin/electron $out/bin/logseq \ --set "LOCAL_GIT_DIRECTORY" ${git} \ diff --git a/pkgs/by-name/lp/lpairs2/package.nix b/pkgs/by-name/lp/lpairs2/package.nix index 99a74382569a..f4ae2ad7fa17 100644 --- a/pkgs/by-name/lp/lpairs2/package.nix +++ b/pkgs/by-name/lp/lpairs2/package.nix @@ -37,6 +37,6 @@ stdenv.mkDerivation (finalAttrs: { mainProgram = "lpairs2"; maintainers = with lib.maintainers; [ AndersonTorres ]; platforms = lib.platforms.unix; - broken = stdenv.isDarwin; + broken = stdenv.hostPlatform.isDarwin; }; }) diff --git a/pkgs/by-name/lr/lrcget/package.nix b/pkgs/by-name/lr/lrcget/package.nix index 40da20efbcce..0d77c2d09f22 100644 --- a/pkgs/by-name/lr/lrcget/package.nix +++ b/pkgs/by-name/lr/lrcget/package.nix @@ -69,11 +69,11 @@ rustPlatform.buildRustPackage rec { openssl gtk3 ] - ++ lib.optionals (!stdenv.isDarwin) [ + ++ lib.optionals (!stdenv.hostPlatform.isDarwin) [ webkitgtk alsa-lib ] - ++ lib.optionals stdenv.isDarwin [ + ++ lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.CoreAudio darwin.apple_sdk.frameworks.WebKit ]; diff --git a/pkgs/by-name/ls/lsd/package.nix b/pkgs/by-name/ls/lsd/package.nix index 8cdf45c90d5a..9be5a2ef0dd6 100644 --- a/pkgs/by-name/ls/lsd/package.nix +++ b/pkgs/by-name/ls/lsd/package.nix @@ -28,7 +28,7 @@ rustPlatform.buildRustPackage rec { pandoc ]; - buildInputs = lib.optionals stdenv.isDarwin [ darwin.apple_sdk.frameworks.Security ]; + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.Security ]; postInstall = '' pandoc --standalone --to man doc/lsd.md -o lsd.1 diff --git a/pkgs/by-name/ls/lsd2dsl/package.nix b/pkgs/by-name/ls/lsd2dsl/package.nix index 4ab26b40a7c2..95663588edae 100644 --- a/pkgs/by-name/ls/lsd2dsl/package.nix +++ b/pkgs/by-name/ls/lsd2dsl/package.nix @@ -20,7 +20,7 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ cmake qt6.wrapQtAppsHook - ] ++ lib.optional stdenv.isLinux copyDesktopItems; + ] ++ lib.optional stdenv.hostPlatform.isLinux copyDesktopItems; buildInputs = [ boost diff --git a/pkgs/by-name/lt/ltris/package.nix b/pkgs/by-name/lt/ltris/package.nix index 82137b2fbec6..cb0da370cd8f 100644 --- a/pkgs/by-name/lt/ltris/package.nix +++ b/pkgs/by-name/lt/ltris/package.nix @@ -35,6 +35,6 @@ stdenv.mkDerivation (finalAttrs: { mainProgram = "ltris"; maintainers = with lib.maintainers; [ AndersonTorres ]; inherit (SDL.meta) platforms; - broken = stdenv.isDarwin; + broken = stdenv.hostPlatform.isDarwin; }; }) diff --git a/pkgs/by-name/lz/lzlib/package.nix b/pkgs/by-name/lz/lzlib/package.nix index b25f76871a0c..c44456bb45ca 100644 --- a/pkgs/by-name/lz/lzlib/package.nix +++ b/pkgs/by-name/lz/lzlib/package.nix @@ -13,7 +13,7 @@ stdenv.mkDerivation (finalAttrs: { # hash from release email }; - postPatch = lib.optionalString stdenv.isDarwin '' + postPatch = lib.optionalString stdenv.hostPlatform.isDarwin '' substituteInPlace Makefile.in --replace '-Wl,--soname=' '-Wl,-install_name,$(out)/lib/' ''; diff --git a/pkgs/by-name/ma/maa-assistant-arknights/package.nix b/pkgs/by-name/ma/maa-assistant-arknights/package.nix index b2c720f83551..7bb296ab611b 100644 --- a/pkgs/by-name/ma/maa-assistant-arknights/package.nix +++ b/pkgs/by-name/ma/maa-assistant-arknights/package.nix @@ -20,7 +20,7 @@ let sources = lib.importJSON ./pin.json; in # https://github.com/NixOS/nixpkgs/issues/314160 -(if stdenv.isDarwin then overrideSDK stdenv "11.0" else stdenv).mkDerivation (finalAttr: { +(if stdenv.hostPlatform.isDarwin then overrideSDK stdenv "11.0" else stdenv).mkDerivation (finalAttr: { pname = "maa-assistant-arknights" + lib.optionalString isBeta "-beta"; version = if isBeta then sources.beta.version else sources.stable.version; diff --git a/pkgs/by-name/ma/maa-cli/package.nix b/pkgs/by-name/ma/maa-cli/package.nix index 4b01e3631b64..69c54cafcad9 100644 --- a/pkgs/by-name/ma/maa-cli/package.nix +++ b/pkgs/by-name/ma/maa-cli/package.nix @@ -32,7 +32,7 @@ rustPlatform.buildRustPackage rec { buildInputs = [ openssl ] - ++ lib.optionals stdenv.isDarwin ( + ++ lib.optionals stdenv.hostPlatform.isDarwin ( with darwin.apple_sdk.frameworks; [ Security diff --git a/pkgs/by-name/ma/manga-tui/package.nix b/pkgs/by-name/ma/manga-tui/package.nix index e5784c15399f..aafae4ab8464 100644 --- a/pkgs/by-name/ma/manga-tui/package.nix +++ b/pkgs/by-name/ma/manga-tui/package.nix @@ -31,7 +31,7 @@ rustPlatform.buildRustPackage { openssl sqlite ] - ++ lib.optionals stdenv.isDarwin ( + ++ lib.optionals stdenv.hostPlatform.isDarwin ( with darwin.apple_sdk.frameworks; [ Security diff --git a/pkgs/by-name/ma/mapcache/package.nix b/pkgs/by-name/ma/mapcache/package.nix index e0859a91a2fe..5d38ce3f0362 100644 --- a/pkgs/by-name/ma/mapcache/package.nix +++ b/pkgs/by-name/ma/mapcache/package.nix @@ -68,7 +68,7 @@ stdenv.mkDerivation rec { (lib.cmakeFeature "APACHE_MODULE_DIR" "${placeholder "out"}/modules") ]; - env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.isDarwin "-std=c99"; + env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.hostPlatform.isDarwin "-std=c99"; meta = { description = "Server that implements tile caching to speed up access to WMS layers"; diff --git a/pkgs/by-name/ma/mariadb-galera/package.nix b/pkgs/by-name/ma/mariadb-galera/package.nix index 0d85c9f3d56b..ebb3eb23c954 100644 --- a/pkgs/by-name/ma/mariadb-galera/package.nix +++ b/pkgs/by-name/ma/mariadb-galera/package.nix @@ -53,6 +53,6 @@ stdenv.mkDerivation rec { license = licenses.lgpl2Only; maintainers = with maintainers; [ izorkin ] ++ teams.helsinki-systems.members; platforms = platforms.all; - broken = stdenv.isDarwin; + broken = stdenv.hostPlatform.isDarwin; }; } diff --git a/pkgs/by-name/ma/markuplinkchecker/package.nix b/pkgs/by-name/ma/markuplinkchecker/package.nix index f42ea53ff992..fac663fa9833 100644 --- a/pkgs/by-name/ma/markuplinkchecker/package.nix +++ b/pkgs/by-name/ma/markuplinkchecker/package.nix @@ -27,7 +27,7 @@ rustPlatform.buildRustPackage { buildInputs = [ openssl ] - ++ lib.optionals stdenv.isDarwin ( + ++ lib.optionals stdenv.hostPlatform.isDarwin ( with darwin.apple_sdk.frameworks; [ Security diff --git a/pkgs/by-name/ma/massdns/package.nix b/pkgs/by-name/ma/massdns/package.nix index 9b90c674adb7..b47e162861ce 100644 --- a/pkgs/by-name/ma/massdns/package.nix +++ b/pkgs/by-name/ma/massdns/package.nix @@ -18,7 +18,7 @@ stdenv.mkDerivation rec { "PREFIX=$(out)" "PROJECT_FLAGS=-DMASSDNS_REVISION='\"v${version}\"'" ]; - buildFlags = if stdenv.isLinux then "all" else "nolinux"; + buildFlags = if stdenv.hostPlatform.isLinux then "all" else "nolinux"; passthru.updateScript = nix-update-script { }; diff --git a/pkgs/by-name/ma/matrix-authentication-service/package.nix b/pkgs/by-name/ma/matrix-authentication-service/package.nix index 501bc3e8e4fd..c6de3b3a0a09 100644 --- a/pkgs/by-name/ma/matrix-authentication-service/package.nix +++ b/pkgs/by-name/ma/matrix-authentication-service/package.nix @@ -50,7 +50,7 @@ rustPlatform.buildRustPackage rec { buildInputs = [ sqlite zstd - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk_11_0.frameworks.CoreFoundation darwin.apple_sdk_11_0.frameworks.Security darwin.apple_sdk_11_0.frameworks.SystemConfiguration diff --git a/pkgs/by-name/ma/matrix-commander-rs/package.nix b/pkgs/by-name/ma/matrix-commander-rs/package.nix index 6215f7ddc69c..78e0abebe88e 100644 --- a/pkgs/by-name/ma/matrix-commander-rs/package.nix +++ b/pkgs/by-name/ma/matrix-commander-rs/package.nix @@ -25,7 +25,7 @@ rustPlatform.buildRustPackage rec { buildInputs = [ openssl ] - ++ lib.optionals stdenv.isDarwin [ + ++ lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.Security darwin.apple_sdk.frameworks.SystemConfiguration ]; diff --git a/pkgs/by-name/ma/matugen/package.nix b/pkgs/by-name/ma/matugen/package.nix index c4dffa14bc95..b147e74c2294 100644 --- a/pkgs/by-name/ma/matugen/package.nix +++ b/pkgs/by-name/ma/matugen/package.nix @@ -18,7 +18,7 @@ rustPlatform.buildRustPackage rec { cargoHash = "sha256-pD1NKUJmvMTnYKWjRrGnvbA0zVvGpWRIlf/9ovP9Jq4="; - buildInputs = lib.optionals stdenv.isDarwin [ + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.Security darwin.apple_sdk.frameworks.SystemConfiguration ]; diff --git a/pkgs/by-name/ma/maturin/package.nix b/pkgs/by-name/ma/maturin/package.nix index 91ed83ea9715..fa7eb781c1e4 100644 --- a/pkgs/by-name/ma/maturin/package.nix +++ b/pkgs/by-name/ma/maturin/package.nix @@ -24,7 +24,7 @@ rustPlatform.buildRustPackage rec { cargoHash = "sha256-ik6kFS66umiHf0M1fE+6++zpZF4gJrN9LQ2l+vi9SSY="; - buildInputs = lib.optionals stdenv.isDarwin [ + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.Security libiconv ]; diff --git a/pkgs/by-name/mc/mcumgr-client/package.nix b/pkgs/by-name/mc/mcumgr-client/package.nix index f8909e8e2018..db03704cbf26 100644 --- a/pkgs/by-name/mc/mcumgr-client/package.nix +++ b/pkgs/by-name/mc/mcumgr-client/package.nix @@ -27,8 +27,8 @@ rustPlatform.buildRustPackage rec { nativeBuildInputs = [ pkg-config ]; buildInputs = - lib.optionals stdenv.isLinux [ udev ] - ++ lib.optionals stdenv.isDarwin [ darwin.apple_sdk.frameworks.IOKit ]; + lib.optionals stdenv.hostPlatform.isLinux [ udev ] + ++ lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.IOKit ]; meta = with lib; { description = "Client for mcumgr commands"; diff --git a/pkgs/by-name/md/md-tui/package.nix b/pkgs/by-name/md/md-tui/package.nix index 8c74b4b29580..e781cd8a4f8d 100644 --- a/pkgs/by-name/md/md-tui/package.nix +++ b/pkgs/by-name/md/md-tui/package.nix @@ -23,7 +23,7 @@ rustPlatform.buildRustPackage rec { nativeBuildInputs = [ pkg-config ]; - buildInputs = lib.optionals stdenv.isDarwin [ + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.CoreFoundation darwin.apple_sdk.frameworks.CoreServices darwin.apple_sdk.frameworks.Security diff --git a/pkgs/by-name/md/mdbook-alerts/package.nix b/pkgs/by-name/md/mdbook-alerts/package.nix index 30f4cc3f6356..a36373848da1 100644 --- a/pkgs/by-name/md/mdbook-alerts/package.nix +++ b/pkgs/by-name/md/mdbook-alerts/package.nix @@ -22,7 +22,7 @@ rustPlatform.buildRustPackage { cargoHash = "sha256-nzVvktweqrow7P/I8DhDoVJNj1COCeEhx6HLY536hYE="; - buildInputs = lib.optionals stdenv.isDarwin [ CoreServices ]; + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ CoreServices ]; meta = { description = "Preprocessor for mdbook to support the inclusion of Markdown alerts"; diff --git a/pkgs/by-name/md/mdbook-d2/package.nix b/pkgs/by-name/md/mdbook-d2/package.nix index 8b30e7fea45c..8b8a032654df 100644 --- a/pkgs/by-name/md/mdbook-d2/package.nix +++ b/pkgs/by-name/md/mdbook-d2/package.nix @@ -19,7 +19,7 @@ rustPlatform.buildRustPackage rec { cargoHash = "sha256-lZ92vvRYXEBMx6ka8RP1wXctf73QNp5rNE8n7O96AEc="; doCheck = false; - buildInputs = lib.optionals stdenv.isDarwin [ + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.CoreFoundation darwin.apple_sdk.frameworks.CoreServices ]; diff --git a/pkgs/by-name/md/mdbook/package.nix b/pkgs/by-name/md/mdbook/package.nix index aa8ff3dec363..4734394cd7e7 100644 --- a/pkgs/by-name/md/mdbook/package.nix +++ b/pkgs/by-name/md/mdbook/package.nix @@ -26,7 +26,7 @@ rustPlatform.buildRustPackage { nativeBuildInputs = [ installShellFiles ]; - buildInputs = lib.optionals stdenv.isDarwin [ CoreServices ]; + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ CoreServices ]; postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) '' installShellCompletion --cmd mdbook \ diff --git a/pkgs/by-name/me/mediainfo-gui/package.nix b/pkgs/by-name/me/mediainfo-gui/package.nix index 3c9da25e33a5..b649afd83abe 100644 --- a/pkgs/by-name/me/mediainfo-gui/package.nix +++ b/pkgs/by-name/me/mediainfo-gui/package.nix @@ -16,7 +16,7 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ autoreconfHook pkg-config ]; buildInputs = [ libmediainfo wxGTK32 desktop-file-utils libSM imagemagick ] - ++ lib.optionals stdenv.isDarwin [ Cocoa ]; + ++ lib.optionals stdenv.hostPlatform.isDarwin [ Cocoa ]; sourceRoot = "MediaInfo/Project/GNU/GUI"; diff --git a/pkgs/by-name/me/megatools/package.nix b/pkgs/by-name/me/megatools/package.nix index 2fbd7e88466b..6e744f5d4b89 100644 --- a/pkgs/by-name/me/megatools/package.nix +++ b/pkgs/by-name/me/megatools/package.nix @@ -36,7 +36,7 @@ stdenv.mkDerivation rec { buildInputs = [ curl glib - ] ++ lib.optionals stdenv.isLinux [ fuse ]; + ] ++ lib.optionals stdenv.hostPlatform.isLinux [ fuse ]; enableParallelBuilding = true; strictDeps = true; diff --git a/pkgs/by-name/me/meli/package.nix b/pkgs/by-name/me/meli/package.nix index a9116aa6546f..0fc8b082ca31 100644 --- a/pkgs/by-name/me/meli/package.nix +++ b/pkgs/by-name/me/meli/package.nix @@ -87,7 +87,7 @@ rustPlatform.buildRustPackage rec { ]; meta = with lib; { - broken = (stdenv.isLinux && stdenv.isAarch64); + broken = (stdenv.hostPlatform.isLinux && stdenv.hostPlatform.isAarch64); description = "Terminal e-mail client and e-mail client library"; mainProgram = "meli"; homepage = "https://meli.delivery"; diff --git a/pkgs/by-name/me/melonDS/package.nix b/pkgs/by-name/me/melonDS/package.nix index bb4783e966a9..e6d1f3928842 100644 --- a/pkgs/by-name/me/melonDS/package.nix +++ b/pkgs/by-name/me/melonDS/package.nix @@ -54,7 +54,7 @@ stdenv.mkDerivation (finalAttrs: { qtmultimedia zstd ] - ++ lib.optionals stdenv.isLinux [ + ++ lib.optionals stdenv.hostPlatform.isLinux [ wayland qtwayland ]; @@ -64,7 +64,7 @@ stdenv.mkDerivation (finalAttrs: { strictDeps = true; qtWrapperArgs = - lib.optionals stdenv.isLinux [ + lib.optionals stdenv.hostPlatform.isLinux [ "--prefix LD_LIBRARY_PATH : ${ lib.makeLibraryPath [ libpcap @@ -72,7 +72,7 @@ stdenv.mkDerivation (finalAttrs: { ] }" ] - ++ lib.optionals stdenv.isDarwin [ + ++ lib.optionals stdenv.hostPlatform.isDarwin [ "--prefix DYLD_LIBRARY_PATH : ${lib.makeLibraryPath [ libpcap ]}" ]; diff --git a/pkgs/by-name/me/memtest_vulkan/package.nix b/pkgs/by-name/me/memtest_vulkan/package.nix index ee2001019716..cdbcc7982b83 100644 --- a/pkgs/by-name/me/memtest_vulkan/package.nix +++ b/pkgs/by-name/me/memtest_vulkan/package.nix @@ -32,6 +32,6 @@ rustPlatform.buildRustPackage rec { mainProgram = "memtest_vulkan"; broken = stdenv.system == "aarch64-linux" # error: linker `aarch64-linux-gnu-gcc` not found - || stdenv.isDarwin; # Can't find Vulkan; might work though? + || stdenv.hostPlatform.isDarwin; # Can't find Vulkan; might work though? }; } diff --git a/pkgs/by-name/me/merkaartor/package.nix b/pkgs/by-name/me/merkaartor/package.nix index 198992988741..8d3abd715a43 100644 --- a/pkgs/by-name/me/merkaartor/package.nix +++ b/pkgs/by-name/me/merkaartor/package.nix @@ -10,7 +10,7 @@ qt5, withGeoimage ? true, exiv2, - withGpsdlib ? (!stdenv.isDarwin), + withGpsdlib ? (!stdenv.hostPlatform.isDarwin), gpsd, withLibproxy ? false, libproxy, @@ -58,7 +58,7 @@ stdenv.mkDerivation rec { (lib.cmakeBool "ZBAR" withZbar) ]; - postInstall = lib.optionalString stdenv.isDarwin '' + postInstall = lib.optionalString stdenv.hostPlatform.isDarwin '' mkdir -p $out/{Applications,bin} mv $out/merkaartor.app $out/Applications # Prevent wrapping, otherwise plugins will not be loaded diff --git a/pkgs/by-name/me/meson/package.nix b/pkgs/by-name/me/meson/package.nix index d817c63708be..db59daf3a6a8 100644 --- a/pkgs/by-name/me/meson/package.nix +++ b/pkgs/by-name/me/meson/package.nix @@ -108,7 +108,7 @@ python3.pkgs.buildPythonApplication rec { checkInputs = [ zlib ] - ++ lib.optionals stdenv.isDarwin [ + ++ lib.optionals stdenv.hostPlatform.isDarwin [ AppKit Cocoa Foundation @@ -116,7 +116,7 @@ python3.pkgs.buildPythonApplication rec { OpenAL OpenGL openldap - ] ++ lib.optionals (stdenv.cc.isClang && !stdenv.isDarwin) [ + ] ++ lib.optionals (stdenv.cc.isClang && !stdenv.hostPlatform.isDarwin) [ # https://github.com/mesonbuild/meson/blob/bd3f1b2e0e70ef16dfa4f441686003212440a09b/test%20cases/common/184%20openmp/meson.build llvmPackages.openmp # https://github.com/mesonbuild/meson/blob/1670fca36fcb1a4fe4780e96731e954515501a35/test%20cases/frameworks/29%20blocks/meson.build @@ -144,10 +144,10 @@ python3.pkgs.buildPythonApplication rec { ''test cases/linuxlike/14 static dynamic linkage'' # Nixpkgs cctools does not have bitcode support. ''test cases/osx/7 bitcode'' - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ # requires llvmPackages.openmp, creating cyclic dependency ''test cases/common/184 openmp'' - ] ++ lib.optionals stdenv.isFreeBSD [ + ] ++ lib.optionals stdenv.hostPlatform.isFreeBSD [ # pch doesn't work quite right on FreeBSD, I think ''test cases/common/13 pch'' ])) diff --git a/pkgs/by-name/me/mesonlsp/package.nix b/pkgs/by-name/me/mesonlsp/package.nix index 70a7417ce958..e1e0a3b771c1 100644 --- a/pkgs/by-name/me/mesonlsp/package.nix +++ b/pkgs/by-name/me/mesonlsp/package.nix @@ -52,11 +52,11 @@ stdenv.mkDerivation (finalAttrs: { libpkgconf nlohmann_json ] - ++ lib.optionals stdenv.isDarwin [ + ++ lib.optionals stdenv.hostPlatform.isDarwin [ libossp_uuid pkgsStatic.fmt ] - ++ lib.optionals stdenv.isLinux [ libuuid ]; + ++ lib.optionals stdenv.hostPlatform.isLinux [ libuuid ]; mesonFlags = [ "-Dbenchmarks=false" ]; diff --git a/pkgs/by-name/me/metronome/package.nix b/pkgs/by-name/me/metronome/package.nix index f21a941a9e37..6c75f65dd3d7 100644 --- a/pkgs/by-name/me/metronome/package.nix +++ b/pkgs/by-name/me/metronome/package.nix @@ -48,7 +48,7 @@ stdenv.mkDerivation rec { gst_all_1.gstreamer gst_all_1.gst-plugins-base gst_all_1.gst-plugins-bad - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.Foundation ]; diff --git a/pkgs/by-name/mi/miru/package.nix b/pkgs/by-name/mi/miru/package.nix index 48f990e902c1..c842e475ca1a 100644 --- a/pkgs/by-name/mi/miru/package.nix +++ b/pkgs/by-name/mi/miru/package.nix @@ -36,7 +36,7 @@ let updateScript = ./update.sh; }; in -if stdenv.isDarwin then +if stdenv.hostPlatform.isDarwin then callPackage ./darwin.nix { inherit pname diff --git a/pkgs/by-name/mi/mistral-rs/package.nix b/pkgs/by-name/mi/mistral-rs/package.nix index 9f4bf825664f..35db87eb173a 100644 --- a/pkgs/by-name/mi/mistral-rs/package.nix +++ b/pkgs/by-name/mi/mistral-rs/package.nix @@ -63,7 +63,7 @@ let metalSupport = assert accelIsValid; - (acceleration == "metal") || (stdenv.isDarwin && stdenv.isAarch64 && (acceleration == null)); + (acceleration == "metal") || (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isAarch64 && (acceleration == null)); darwinBuildInputs = with darwin.apple_sdk.frameworks; @@ -114,7 +114,7 @@ rustPlatform.buildRustPackage rec { cudaPackages.libcurand ] ++ lib.optionals mklSupport [ mkl ] - ++ lib.optionals stdenv.isDarwin darwinBuildInputs; + ++ lib.optionals stdenv.hostPlatform.isDarwin darwinBuildInputs; cargoBuildFlags = [ @@ -125,7 +125,7 @@ rustPlatform.buildRustPackage rec { ] ++ lib.optionals cudaSupport [ "--features=cuda" ] ++ lib.optionals mklSupport [ "--features=mkl" ] - ++ lib.optionals (stdenv.isDarwin && metalSupport) [ "--features=metal" ]; + ++ lib.optionals (stdenv.hostPlatform.isDarwin && metalSupport) [ "--features=metal" ]; env = { @@ -186,7 +186,7 @@ rustPlatform.buildRustPackage rec { withMkl = lib.optionalAttrs (stdenv.hostPlatform == "x86_64-linux") ( mistral-rs.override { acceleration = "mkl"; } ); - withCuda = lib.optionalAttrs stdenv.isLinux (mistral-rs.override { acceleration = "cuda"; }); + withCuda = lib.optionalAttrs stdenv.hostPlatform.isLinux (mistral-rs.override { acceleration = "cuda"; }); withMetal = lib.optionalAttrs (stdenv.hostPlatform == "aarch64-darwin") ( mistral-rs.override { acceleration = "metal"; } ); diff --git a/pkgs/by-name/ml/mlx42/package.nix b/pkgs/by-name/ml/mlx42/package.nix index 1f485d42aab9..9c22c20144d9 100644 --- a/pkgs/by-name/ml/mlx42/package.nix +++ b/pkgs/by-name/ml/mlx42/package.nix @@ -30,7 +30,7 @@ stdenv.mkDerivation (finalAttrs: { nativeBuildInputs = [ cmake ]; buildInputs = [ glfw ] - ++ lib.optionals stdenv.isDarwin (with darwin.apple_sdk.frameworks; [ OpenGL Cocoa IOKit ]); + ++ lib.optionals stdenv.hostPlatform.isDarwin (with darwin.apple_sdk.frameworks; [ OpenGL Cocoa IOKit ]); cmakeFlags = [ "-DDEBUG=${toString enableDebug}" ]; diff --git a/pkgs/by-name/mo/modrinth-app-unwrapped/package.nix b/pkgs/by-name/mo/modrinth-app-unwrapped/package.nix index 46874c6b7b77..ca32e25fb03a 100644 --- a/pkgs/by-name/mo/modrinth-app-unwrapped/package.nix +++ b/pkgs/by-name/mo/modrinth-app-unwrapped/package.nix @@ -85,11 +85,11 @@ rustPlatform.buildRustPackage { buildInputs = [ openssl ] - ++ lib.optionals stdenv.isLinux [ + ++ lib.optionals stdenv.hostPlatform.isLinux [ libsoup webkitgtk ] - ++ lib.optionals stdenv.isDarwin ( + ++ lib.optionals stdenv.hostPlatform.isDarwin ( with darwin.apple_sdk.frameworks; [ AppKit @@ -149,13 +149,13 @@ rustPlatform.buildRustPackage { '' runHook preInstall '' - + lib.optionalString stdenv.isDarwin '' + + lib.optionalString stdenv.hostPlatform.isDarwin '' mkdir -p "$out"/bin cp -r target/release/bundle/macos "$out"/Applications mv "$out"/Applications/Modrinth\ App.app/Contents/MacOS/Modrinth\ App "$out"/bin/modrinth-app ln -s "$out"/bin/modrinth-app "$out"/Applications/Modrinth\ App.app/Contents/MacOS/Modrinth\ App '' - + lib.optionalString stdenv.isLinux '' + + lib.optionalString stdenv.hostPlatform.isLinux '' cp -r target/release/bundle/"$tauriBundle"/*/data/usr "$out" desktop-file-edit \ --set-comment "Modrinth's game launcher" \ @@ -189,6 +189,6 @@ rustPlatform.buildRustPackage { maintainers = with lib.maintainers; [ getchoo ]; platforms = lib.platforms.linux ++ lib.platforms.darwin; # this builds on architectures like aarch64, but the launcher itself does not support them yet - broken = !stdenv.isx86_64; + broken = !stdenv.hostPlatform.isx86_64; }; } diff --git a/pkgs/by-name/mo/modrinth-app/package.nix b/pkgs/by-name/mo/modrinth-app/package.nix index 12e13017ad33..c92b6319d5a5 100644 --- a/pkgs/by-name/mo/modrinth-app/package.nix +++ b/pkgs/by-name/mo/modrinth-app/package.nix @@ -37,7 +37,7 @@ symlinkJoin rec { wrapGAppsHook3 ]; - runtimeDependencies = lib.optionalString stdenv.isLinux (lib.makeLibraryPath [ + runtimeDependencies = lib.optionalString stdenv.hostPlatform.isLinux (lib.makeLibraryPath [ addDriverRunpath.driverLink flite # narrator support @@ -57,7 +57,7 @@ symlinkJoin rec { postBuild = '' gappsWrapperArgs+=( --prefix PATH : ${lib.makeSearchPath "bin/java" jdks} - ${lib.optionalString stdenv.isLinux '' + ${lib.optionalString stdenv.hostPlatform.isLinux '' --prefix PATH : ${lib.makeBinPath [xorg.xrandr]} --set LD_LIBRARY_PATH $runtimeDependencies ''} diff --git a/pkgs/by-name/mo/mold/package.nix b/pkgs/by-name/mo/mold/package.nix index 383abc8f77b8..dbd6fbd6a2a4 100644 --- a/pkgs/by-name/mo/mold/package.nix +++ b/pkgs/by-name/mo/mold/package.nix @@ -41,7 +41,7 @@ stdenv.mkDerivation rec { tbb zlib zstd - ] ++ lib.optionals (!stdenv.isDarwin) [ + ] ++ lib.optionals (!stdenv.hostPlatform.isDarwin) [ mimalloc ]; @@ -50,7 +50,7 @@ stdenv.mkDerivation rec { "-DMOLD_USE_SYSTEM_TBB:BOOL=ON" ]; - env.NIX_CFLAGS_COMPILE = toString (lib.optionals stdenv.isDarwin [ + env.NIX_CFLAGS_COMPILE = toString (lib.optionals stdenv.hostPlatform.isDarwin [ "-faligned-allocation" ]); @@ -91,7 +91,7 @@ stdenv.mkDerivation rec { in { version = testers.testVersion { package = mold; }; - } // lib.optionalAttrs stdenv.isLinux { + } // lib.optionalAttrs stdenv.hostPlatform.isLinux { adapter-gcc = helloTest "adapter-gcc" (hello.override (old: { stdenv = useMoldLinker gccStdenv; })); adapter-llvm = helloTest "adapter-llvm" (hello.override (old: { stdenv = useMoldLinker clangStdenv; })); wrapped = helloTest "wrapped" (hello.overrideAttrs (previousAttrs: { diff --git a/pkgs/by-name/mo/mollysocket/package.nix b/pkgs/by-name/mo/mollysocket/package.nix index c5772f2edc4b..6c9e18cc8f15 100644 --- a/pkgs/by-name/mo/mollysocket/package.nix +++ b/pkgs/by-name/mo/mollysocket/package.nix @@ -29,7 +29,7 @@ rustPlatform.buildRustPackage rec { buildInputs = [ openssl sqlite - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.Security ]; diff --git a/pkgs/by-name/mo/mongodb-ce/package.nix b/pkgs/by-name/mo/mongodb-ce/package.nix index d3dc490bdcfe..a7ee195c9874 100644 --- a/pkgs/by-name/mo/mongodb-ce/package.nix +++ b/pkgs/by-name/mo/mongodb-ce/package.nix @@ -45,7 +45,7 @@ stdenv.mkDerivation (finalAttrs: { or (throw "unsupported system: ${stdenv.hostPlatform.system}") ); - nativeBuildInputs = lib.optionals stdenv.isLinux [ autoPatchelfHook ]; + nativeBuildInputs = lib.optionals stdenv.hostPlatform.isLinux [ autoPatchelfHook ]; dontStrip = true; buildInputs = [ diff --git a/pkgs/by-name/mo/moonlight-qt/package.nix b/pkgs/by-name/mo/moonlight-qt/package.nix index a0ca66b61e64..62a3b556a3a3 100644 --- a/pkgs/by-name/mo/moonlight-qt/package.nix +++ b/pkgs/by-name/mo/moonlight-qt/package.nix @@ -32,7 +32,7 @@ let Cocoa VideoToolbox ; - stdenv' = if stdenv.isDarwin then overrideSDK stdenv "11.0" else stdenv; + stdenv' = if stdenv.hostPlatform.isDarwin then overrideSDK stdenv "11.0" else stdenv; in stdenv'.mkDerivation rec { @@ -64,7 +64,7 @@ stdenv'.mkDerivation rec { buildInputs = [ - (SDL2.override { drmSupport = stdenv.isLinux; }) + (SDL2.override { drmSupport = stdenv.hostPlatform.isLinux; }) SDL2_ttf ffmpeg libopus @@ -73,7 +73,7 @@ stdenv'.mkDerivation rec { qt6.qtsvg openssl ] - ++ lib.optionals stdenv.isLinux [ + ++ lib.optionals stdenv.hostPlatform.isLinux [ alsa-lib libpulseaudio libva @@ -83,7 +83,7 @@ stdenv'.mkDerivation rec { wayland libdrm ] - ++ lib.optionals stdenv.isDarwin [ + ++ lib.optionals stdenv.hostPlatform.isDarwin [ AVFoundation AppKit AudioUnit @@ -93,7 +93,7 @@ stdenv'.mkDerivation rec { qmakeFlags = [ "CONFIG+=disable-prebuilts" ]; - postInstall = lib.optionalString stdenv.isDarwin '' + postInstall = lib.optionalString stdenv.hostPlatform.isDarwin '' mkdir $out/Applications $out/bin mv app/Moonlight.app $out/Applications ln -s $out/Applications/Moonlight.app/Contents/MacOS/Moonlight $out/bin/moonlight diff --git a/pkgs/by-name/mp/mpris-notifier/package.nix b/pkgs/by-name/mp/mpris-notifier/package.nix index bf8bac180fc7..3b3016a1d248 100644 --- a/pkgs/by-name/mp/mpris-notifier/package.nix +++ b/pkgs/by-name/mp/mpris-notifier/package.nix @@ -18,7 +18,7 @@ rustPlatform.buildRustPackage rec { cargoHash = "sha256-f8BCnjgv7OLWQ/2X3dTUuAarCl+u+4CRARSQsO+09zE="; - buildInputs = lib.optionals stdenv.isDarwin [ + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.Security ]; diff --git a/pkgs/by-name/mq/mqtt-explorer/package.nix b/pkgs/by-name/mq/mqtt-explorer/package.nix index dec432204622..2aa7a6ba6891 100644 --- a/pkgs/by-name/mq/mqtt-explorer/package.nix +++ b/pkgs/by-name/mq/mqtt-explorer/package.nix @@ -51,13 +51,13 @@ stdenv.mkDerivation rec { typescript fixup-yarn-lock makeWrapper - ] ++ lib.optionals (!stdenv.isDarwin) [ copyDesktopItems ]; + ] ++ lib.optionals (!stdenv.hostPlatform.isDarwin) [ copyDesktopItems ]; env.ELECTRON_SKIP_BINARY_DOWNLOAD = "1"; # disable code signing on macos # https://github.com/electron-userland/electron-builder/blob/77f977435c99247d5db395895618b150f5006e8f/docs/code-signing.md#how-to-disable-code-signing-during-the-build-process-on-macos - postConfigure = lib.optionalString stdenv.isDarwin '' + postConfigure = lib.optionalString stdenv.hostPlatform.isDarwin '' export CSC_IDENTITY_AUTO_DISCOVERY=false ''; @@ -106,7 +106,7 @@ stdenv.mkDerivation rec { installPhase = '' runHook preInstall - ${lib.optionalString (!stdenv.isDarwin) '' + ${lib.optionalString (!stdenv.hostPlatform.isDarwin) '' mkdir -p "$out/share/mqtt-explorer"/{app,icons/hicolor} cp -r build/*-unpacked/{locales,resources{,.pak}} "$out/share/mqtt-explorer/app" @@ -128,7 +128,7 @@ stdenv.mkDerivation rec { --inherit-argv0 ''} - ${lib.optionalString stdenv.isDarwin '' + ${lib.optionalString stdenv.hostPlatform.isDarwin '' mkdir -p $out/{Applications,bin} mv "build/mac/MQTT Explorer.app" $out/Applications diff --git a/pkgs/by-name/mq/mqttui/package.nix b/pkgs/by-name/mq/mqttui/package.nix index e4bbd4974f31..d2617f51e1dd 100644 --- a/pkgs/by-name/mq/mqttui/package.nix +++ b/pkgs/by-name/mq/mqttui/package.nix @@ -28,7 +28,7 @@ rustPlatform.buildRustPackage rec { ln -sf ${./Cargo.lock} Cargo.lock ''; - buildInputs = lib.optional stdenv.isDarwin darwin.apple_sdk.frameworks.Security; + buildInputs = lib.optional stdenv.hostPlatform.isDarwin darwin.apple_sdk.frameworks.Security; meta = with lib; { description = "Terminal client for MQTT"; diff --git a/pkgs/by-name/mu/mujoco/package.nix b/pkgs/by-name/mu/mujoco/package.nix index 416de20426cf..291fe8e546cd 100644 --- a/pkgs/by-name/mu/mujoco/package.nix +++ b/pkgs/by-name/mu/mujoco/package.nix @@ -191,6 +191,6 @@ stdenv.mkDerivation rec { samuela tmplt ]; - broken = stdenv.isDarwin; + broken = stdenv.hostPlatform.isDarwin; }; } diff --git a/pkgs/by-name/mu/mullvad-browser/package.nix b/pkgs/by-name/mu/mullvad-browser/package.nix index 42cb084e0588..b4662af7b598 100644 --- a/pkgs/by-name/mu/mullvad-browser/package.nix +++ b/pkgs/by-name/mu/mullvad-browser/package.nix @@ -29,10 +29,10 @@ , pciutils , zlib -, libnotifySupport ? stdenv.isLinux +, libnotifySupport ? stdenv.hostPlatform.isLinux , libnotify -, waylandSupport ? stdenv.isLinux +, waylandSupport ? stdenv.hostPlatform.isLinux , libxkbcommon , libdrm , libGL diff --git a/pkgs/by-name/mu/mumps/package.nix b/pkgs/by-name/mu/mumps/package.nix index 17c005946f57..7d0e3e154cb4 100644 --- a/pkgs/by-name/mu/mumps/package.nix +++ b/pkgs/by-name/mu/mumps/package.nix @@ -32,7 +32,7 @@ stdenv.mkDerivation (finalAttrs: { # https://github.com/coin-or-tools/ThirdParty-Mumps/blob/stable/3.0/get.Mumps#L66 cp libseq/mpi.h libseq/mumps_mpi.h '' - + lib.optionalString stdenv.isDarwin '' + + lib.optionalString stdenv.hostPlatform.isDarwin '' substituteInPlace src/Makefile --replace-fail \ "-Wl,\''$(SONAME),libmumps_common" \ "-Wl,-install_name,$out/lib/libmumps_common" @@ -43,7 +43,7 @@ stdenv.mkDerivation (finalAttrs: { ''; makeFlags = - lib.optionals stdenv.isDarwin [ + lib.optionals stdenv.hostPlatform.isDarwin [ "SONAME=" "LIBEXT_SHARED=.dylib" ] @@ -73,7 +73,7 @@ stdenv.mkDerivation (finalAttrs: { scotch ]; - preFixup = lib.optionalString stdenv.isDarwin '' + preFixup = lib.optionalString stdenv.hostPlatform.isDarwin '' install_name_tool \ -change libmpiseq.dylib \ $out/lib/libmpiseq.dylib \ diff --git a/pkgs/by-name/mu/muon/package.nix b/pkgs/by-name/mu/muon/package.nix index a479dd23d29b..0e38f4f8e993 100644 --- a/pkgs/by-name/mu/muon/package.nix +++ b/pkgs/by-name/mu/muon/package.nix @@ -129,7 +129,7 @@ stdenv.mkDerivation (finalAttrs: { license = licenses.gpl3Only; maintainers = with maintainers; [ AndersonTorres ]; platforms = platforms.unix; - broken = stdenv.isDarwin; # typical `ar failure` + broken = stdenv.hostPlatform.isDarwin; # typical `ar failure` mainProgram = "muon"; }; }) diff --git a/pkgs/by-name/mu/music-player/package.nix b/pkgs/by-name/mu/music-player/package.nix index 776486e6928c..2f2a54d36fca 100644 --- a/pkgs/by-name/mu/music-player/package.nix +++ b/pkgs/by-name/mu/music-player/package.nix @@ -28,15 +28,15 @@ rustPlatform.buildRustPackage rec { protobuf rustPlatform.bindgenHook ] - ++ lib.optionals stdenv.isLinux [ + ++ lib.optionals stdenv.hostPlatform.isLinux [ pkg-config ]; buildInputs = - lib.optionals stdenv.isLinux [ + lib.optionals stdenv.hostPlatform.isLinux [ alsa-lib ] - ++ lib.optionals stdenv.isDarwin [ + ++ lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.AudioUnit ]; diff --git a/pkgs/by-name/mu/musikcube/package.nix b/pkgs/by-name/mu/musikcube/package.nix index 8eb5536f39ba..8c59e9833985 100644 --- a/pkgs/by-name/mu/musikcube/package.nix +++ b/pkgs/by-name/mu/musikcube/package.nix @@ -72,11 +72,11 @@ stdenv.mkDerivation (finalAttrs: { taglib ] ++ lib.optionals systemdSupport [ systemd ] - ++ lib.optionals stdenv.isLinux [ + ++ lib.optionals stdenv.hostPlatform.isLinux [ alsa-lib pulseaudio ] - ++ lib.optionals stdenv.isDarwin ( + ++ lib.optionals stdenv.hostPlatform.isDarwin ( with darwin.apple_sdk.frameworks; [ Cocoa @@ -89,7 +89,7 @@ stdenv.mkDerivation (finalAttrs: { cmakeFlags = [ "-DDISABLE_STRIP=true" ]; - postFixup = lib.optionalString stdenv.isDarwin '' + postFixup = lib.optionalString stdenv.hostPlatform.isDarwin '' install_name_tool -add_rpath $out/share/musikcube $out/share/musikcube/musikcube install_name_tool -add_rpath $out/share/musikcube $out/share/musikcube/musikcubed ''; diff --git a/pkgs/by-name/my/mycelium/package.nix b/pkgs/by-name/my/mycelium/package.nix index 266448a438eb..2669ff84d923 100644 --- a/pkgs/by-name/my/mycelium/package.nix +++ b/pkgs/by-name/my/mycelium/package.nix @@ -31,7 +31,7 @@ rustPlatform.buildRustPackage rec { }; nativeBuildInputs = [ versionCheckHook ]; - buildInputs = lib.optionals stdenv.isDarwin [ + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.Security darwin.apple_sdk.frameworks.SystemConfiguration ]; diff --git a/pkgs/by-name/my/mysql84/package.nix b/pkgs/by-name/my/mysql84/package.nix index b245404420d7..1c4d655efd4b 100644 --- a/pkgs/by-name/my/mysql84/package.nix +++ b/pkgs/by-name/my/mysql84/package.nix @@ -13,7 +13,7 @@ stdenv.mkDerivation (finalAttrs: { }; nativeBuildInputs = [ bison cmake pkg-config ] - ++ lib.optionals (!stdenv.isDarwin) [ rpcsvc-proto ]; + ++ lib.optionals (!stdenv.hostPlatform.isDarwin) [ rpcsvc-proto ]; patches = [ ./no-force-outline-atomics.patch # Do not force compilers to turn on -moutline-atomics switch @@ -28,9 +28,9 @@ stdenv.mkDerivation (finalAttrs: { buildInputs = [ (curl.override { inherit openssl; }) icu libedit libevent lz4 ncurses openssl protobuf_21 re2 readline zlib zstd libfido2 - ] ++ lib.optionals stdenv.isLinux [ + ] ++ lib.optionals stdenv.hostPlatform.isLinux [ numactl libtirpc - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ cctools darwin.apple_sdk.frameworks.CoreServices darwin.developer_cmds darwin.DarwinTools ]; diff --git a/pkgs/by-name/n8/n8n/package.nix b/pkgs/by-name/n8/n8n/package.nix index a95b3199b69b..0a57d8818d15 100644 --- a/pkgs/by-name/n8/n8n/package.nix +++ b/pkgs/by-name/n8/n8n/package.nix @@ -38,7 +38,7 @@ stdenv.mkDerivation (finalAttrs: { node-gyp # required to build sqlite3 bindings cacert # required for rustls-native-certs (dependency of turbo build tool) makeWrapper - ] ++ lib.optional stdenv.isDarwin [ xcbuild ]; + ] ++ lib.optional stdenv.hostPlatform.isDarwin [ xcbuild ]; buildInputs = [ nodejs diff --git a/pkgs/by-name/na/naja/package.nix b/pkgs/by-name/na/naja/package.nix index ba20cacf8d0c..a342c091f708 100644 --- a/pkgs/by-name/na/naja/package.nix +++ b/pkgs/by-name/na/naja/package.nix @@ -56,7 +56,7 @@ stdenv.mkDerivation { (lib.cmakeBool "CPPTRACE_USE_EXTERNAL_LIBDWARF" true) (lib.cmakeBool "CPPTRACE_USE_EXTERNAL_ZSTD" true) ] - ++ lib.optionals stdenv.isDarwin [ + ++ lib.optionals stdenv.hostPlatform.isDarwin [ (lib.cmakeFeature "CMAKE_OSX_DEPLOYMENT_TARGET" "10.14") # For aligned allocation ]; diff --git a/pkgs/by-name/na/naps2/package.nix b/pkgs/by-name/na/naps2/package.nix index 728445a1da2e..93161f889efd 100644 --- a/pkgs/by-name/na/naps2/package.nix +++ b/pkgs/by-name/na/naps2/package.nix @@ -55,7 +55,7 @@ buildDotnetModule rec { maintainers = with lib.maintainers; [ eliandoran ]; platforms = lib.platforms.linux; mainProgram = "naps2"; - broken = stdenv.isAarch64; # Google.Protobuf.Tools dependency fails to build. + broken = stdenv.hostPlatform.isAarch64; # Google.Protobuf.Tools dependency fails to build. }; } diff --git a/pkgs/by-name/na/navidrome/package.nix b/pkgs/by-name/na/navidrome/package.nix index 971471041b69..112523e1fb74 100644 --- a/pkgs/by-name/na/navidrome/package.nix +++ b/pkgs/by-name/na/navidrome/package.nix @@ -82,6 +82,6 @@ buildGoModule rec { sourceProvenance = with lib.sourceTypes; [ fromSource ]; maintainers = with lib.maintainers; [ aciceri squalus ]; # Broken on Darwin: sandbox-exec: pattern serialization length exceeds maximum (NixOS/nix#4119) - broken = stdenv.isDarwin; + broken = stdenv.hostPlatform.isDarwin; }; } diff --git a/pkgs/by-name/ne/neovide/package.nix b/pkgs/by-name/ne/neovide/package.nix index 232bc4664eea..dc49789cf5df 100644 --- a/pkgs/by-name/ne/neovide/package.nix +++ b/pkgs/by-name/ne/neovide/package.nix @@ -20,7 +20,7 @@ , darwin , libglvnd , libxkbcommon -, enableWayland ? stdenv.isLinux +, enableWayland ? stdenv.hostPlatform.isLinux , wayland }: @@ -66,7 +66,7 @@ rustPlatform.buildRustPackage.override { stdenv = clangStdenv; } rec { pkg-config python3 # skia removeReferencesTo - ] ++ lib.optionals stdenv.isDarwin [ xcbuild ]; + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ xcbuild ]; nativeCheckInputs = [ neovim ]; @@ -74,7 +74,7 @@ rustPlatform.buildRustPackage.override { stdenv = clangStdenv; } rec { SDL2 fontconfig rustPlatform.bindgenHook - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.AppKit ]; @@ -96,11 +96,11 @@ rustPlatform.buildRustPackage.override { stdenv = clangStdenv; } rec { --prefix LD_LIBRARY_PATH : ${libPath} ''; - postInstall = lib.optionalString stdenv.isDarwin '' + postInstall = lib.optionalString stdenv.hostPlatform.isDarwin '' mkdir -p $out/Applications cp -r extra/osx/Neovide.app $out/Applications ln -s $out/bin $out/Applications/Neovide.app/Contents/MacOS - '' + lib.optionalString stdenv.isLinux '' + '' + lib.optionalString stdenv.hostPlatform.isLinux '' for n in 16x16 32x32 48x48 256x256; do install -m444 -D "assets/neovide-$n.png" \ "$out/share/icons/hicolor/$n/apps/neovide.png" diff --git a/pkgs/by-name/ne/neovim-qt/package.nix b/pkgs/by-name/ne/neovim-qt/package.nix index aa7b2607fb70..6251559eba27 100644 --- a/pkgs/by-name/ne/neovim-qt/package.nix +++ b/pkgs/by-name/ne/neovim-qt/package.nix @@ -6,7 +6,7 @@ in libsForQt5.mkDerivation { pname = "neovim-qt"; version = unwrapped.version; - buildCommand = if stdenv.isDarwin then '' + buildCommand = if stdenv.hostPlatform.isDarwin then '' mkdir -p $out/Applications cp -r ${unwrapped}/bin/nvim-qt.app $out/Applications diff --git a/pkgs/by-name/ne/neovim-remote/package.nix b/pkgs/by-name/ne/neovim-remote/package.nix index ffb686abc8f1..e0f88180542f 100644 --- a/pkgs/by-name/ne/neovim-remote/package.nix +++ b/pkgs/by-name/ne/neovim-remote/package.nix @@ -35,7 +35,7 @@ with python3.pkgs; buildPythonApplication rec { pytestCheckHook ]; - doCheck = !stdenv.isDarwin; + doCheck = !stdenv.hostPlatform.isDarwin; preCheck = '' export HOME="$(mktemp -d)" diff --git a/pkgs/by-name/ne/neovim-unwrapped/package.nix b/pkgs/by-name/ne/neovim-unwrapped/package.nix index c66597da3ae8..b37ba7fd2d94 100644 --- a/pkgs/by-name/ne/neovim-unwrapped/package.nix +++ b/pkgs/by-name/ne/neovim-unwrapped/package.nix @@ -16,7 +16,7 @@ }: stdenv.mkDerivation (finalAttrs: let - nvim-lpeg-dylib = luapkgs: if stdenv.isDarwin + nvim-lpeg-dylib = luapkgs: if stdenv.hostPlatform.isDarwin then (luapkgs.lpeg.overrideAttrs (oa: { preConfigure = '' # neovim wants clang .dylib @@ -33,7 +33,7 @@ stdenv.mkDerivation (finalAttrs: nativeBuildInputs = oa.nativeBuildInputs ++ ( - lib.optional stdenv.isDarwin fixDarwinDylibNames + lib.optional stdenv.hostPlatform.isDarwin fixDarwinDylibNames ); })) else luapkgs.lpeg; @@ -104,7 +104,7 @@ in { neovimLuaEnv tree-sitter unibilium - ] ++ lib.optionals stdenv.isDarwin [ libiconv CoreServices ] + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ libiconv CoreServices ] ++ lib.optionals finalAttrs.finalPackage.doCheck [ glibcLocales procps ] ; @@ -168,7 +168,7 @@ in { "-DLUA_PRG=${neovimLuaEnvOnBuild}/bin/luajit" ]; - preConfigure = lib.optionalString stdenv.isDarwin '' + preConfigure = lib.optionalString stdenv.hostPlatform.isDarwin '' substituteInPlace src/nvim/CMakeLists.txt --replace " util" "" '' + '' mkdir -p $out/lib/nvim/parser diff --git a/pkgs/by-name/ne/netclient/package.nix b/pkgs/by-name/ne/netclient/package.nix index 9634c2b07a80..5ac4e9f7a451 100644 --- a/pkgs/by-name/ne/netclient/package.nix +++ b/pkgs/by-name/ne/netclient/package.nix @@ -19,8 +19,8 @@ buildGoModule rec { vendorHash = "sha256-DzTTESPxYuZYNGjEG3PufLoS02+R9275arVcUzImpBU="; - buildInputs = lib.optional stdenv.isDarwin darwin.apple_sdk.frameworks.Cocoa - ++ lib.optional stdenv.isLinux libX11; + buildInputs = lib.optional stdenv.hostPlatform.isDarwin darwin.apple_sdk.frameworks.Cocoa + ++ lib.optional stdenv.hostPlatform.isLinux libX11; hardeningEnabled = [ "pie" ]; diff --git a/pkgs/by-name/ne/neverest/package.nix b/pkgs/by-name/ne/neverest/package.nix index 9b51e9715906..5c4bd81fa83c 100644 --- a/pkgs/by-name/ne/neverest/package.nix +++ b/pkgs/by-name/ne/neverest/package.nix @@ -34,7 +34,7 @@ rustPlatform.buildRustPackage rec { ++ lib.optional (installManPages || installShellCompletions) installShellFiles; buildInputs = [ ] - ++ lib.optionals stdenv.isDarwin (with darwin.apple_sdk.frameworks; [ AppKit Cocoa Security ]) + ++ lib.optionals stdenv.hostPlatform.isDarwin (with darwin.apple_sdk.frameworks; [ AppKit Cocoa Security ]) ++ lib.optional (builtins.elem "notmuch" buildFeatures) notmuch; # TODO: unit tests temporarily broken, remove this line for the next diff --git a/pkgs/by-name/ne/nextpnr/package.nix b/pkgs/by-name/ne/nextpnr/package.nix index b6b2eb07bdc1..b6a3b6974d74 100644 --- a/pkgs/by-name/ne/nextpnr/package.nix +++ b/pkgs/by-name/ne/nextpnr/package.nix @@ -61,7 +61,7 @@ stdenv.mkDerivation rec { "-DHIMBAECHEL_GOWIN_DEVICES=all" ] ++ (lib.optional enableGui "-DBUILD_GUI=ON") - ++ (lib.optional (enableGui && stdenv.isDarwin) + ++ (lib.optional (enableGui && stdenv.hostPlatform.isDarwin) "-DOPENGL_INCLUDE_DIR=${OpenGL}/Library/Frameworks"); patchPhase = with builtins; '' diff --git a/pkgs/by-name/ng/ngrok/package.nix b/pkgs/by-name/ng/ngrok/package.nix index daf9da5c8f2f..bb47cd4d7367 100644 --- a/pkgs/by-name/ng/ngrok/package.nix +++ b/pkgs/by-name/ng/ngrok/package.nix @@ -7,20 +7,20 @@ let versions = lib.importJSON ./versions.json; arch = - if stdenv.isi686 then + if stdenv.hostPlatform.isi686 then "386" - else if stdenv.isx86_64 then + else if stdenv.hostPlatform.isx86_64 then "amd64" - else if stdenv.isAarch32 then + else if stdenv.hostPlatform.isAarch32 then "arm" - else if stdenv.isAarch64 then + else if stdenv.hostPlatform.isAarch64 then "arm64" else throw "Unsupported architecture"; os = - if stdenv.isLinux then + if stdenv.hostPlatform.isLinux then "linux" - else if stdenv.isDarwin then + else if stdenv.hostPlatform.isDarwin then "darwin" else throw "Unsupported os"; @@ -58,7 +58,7 @@ stdenv.mkDerivation { passthru.updateScript = ./update.sh; # Stripping causes SEGFAULT on darwin - dontStrip = stdenv.isDarwin; + dontStrip = stdenv.hostPlatform.isDarwin; meta = { description = "Allows you to expose a web server running on your local machine to the internet"; diff --git a/pkgs/by-name/nh/nh/package.nix b/pkgs/by-name/nh/nh/package.nix index 0d2ad0a0d338..58a9f84b07cf 100644 --- a/pkgs/by-name/nh/nh/package.nix +++ b/pkgs/by-name/nh/nh/package.nix @@ -31,7 +31,7 @@ rustPlatform.buildRustPackage { makeBinaryWrapper ]; - buildInputs = lib.optionals stdenv.isDarwin [ darwin.apple_sdk.frameworks.SystemConfiguration ]; + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.SystemConfiguration ]; preFixup = '' mkdir completions diff --git a/pkgs/by-name/ni/nicstat/package.nix b/pkgs/by-name/ni/nicstat/package.nix index d8da45a6082c..1e1e346b822b 100644 --- a/pkgs/by-name/ni/nicstat/package.nix +++ b/pkgs/by-name/ni/nicstat/package.nix @@ -44,6 +44,6 @@ stdenv.mkDerivation (finalAttrs: { maintainers = with lib.maintainers; [ juliusrickert ]; mainProgram = "nicstat"; platforms = lib.platforms.unix; - broken = stdenv.isDarwin; + broken = stdenv.hostPlatform.isDarwin; }; }) diff --git a/pkgs/by-name/ni/nix-btm/package.nix b/pkgs/by-name/ni/nix-btm/package.nix index 42496a5bff03..a7d94b4863b5 100644 --- a/pkgs/by-name/ni/nix-btm/package.nix +++ b/pkgs/by-name/ni/nix-btm/package.nix @@ -12,7 +12,7 @@ rustPlatform.buildRustPackage rec { cargoHash = "sha256-qUZ3zJjQrteFQerBKFH/+Ys0uOzvI7DH9rCaVtseJMM="; - buildInputs = lib.optionals stdenv.isDarwin + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin (with darwin.apple_sdk.frameworks; [ CoreServices SystemConfiguration ]); meta = with lib; { diff --git a/pkgs/by-name/ni/nix-health/package.nix b/pkgs/by-name/ni/nix-health/package.nix index 3cb4fc881c7b..2081714d50a9 100644 --- a/pkgs/by-name/ni/nix-health/package.nix +++ b/pkgs/by-name/ni/nix-health/package.nix @@ -23,7 +23,7 @@ rustPlatform.buildRustPackage rec { buildInputs = [ libiconv openssl ] # Use a newer SDK for CoreFoundation, because the sysinfo crate requires # it, https://github.com/GuillaumeGomez/sysinfo/issues/915 - ++ lib.optionals stdenv.isDarwin (with darwin.apple_sdk_11_0.frameworks; + ++ lib.optionals stdenv.hostPlatform.isDarwin (with darwin.apple_sdk_11_0.frameworks; [ IOKit CoreFoundation ]); diff --git a/pkgs/by-name/ni/nix-top/package.nix b/pkgs/by-name/ni/nix-top/package.nix index 55170ec40896..fa69693781e0 100644 --- a/pkgs/by-name/ni/nix-top/package.nix +++ b/pkgs/by-name/ni/nix-top/package.nix @@ -44,7 +44,7 @@ stdenv.mkDerivation rec { wrapProgram $out/bin/nix-top \ --prefix PATH : "$out/libexec/nix-top:${additionalPath}" '' - + lib.optionalString stdenv.isDarwin '' + + lib.optionalString stdenv.hostPlatform.isDarwin '' ln -s /bin/stty $out/libexec/nix-top '' + '' diff --git a/pkgs/by-name/ni/nix-weather/package.nix b/pkgs/by-name/ni/nix-weather/package.nix index ea552ca9e4f4..02f31ee19739 100644 --- a/pkgs/by-name/ni/nix-weather/package.nix +++ b/pkgs/by-name/ni/nix-weather/package.nix @@ -33,7 +33,7 @@ rustPlatform.buildRustPackage rec { openssl installShellFiles ] - ++ lib.optionals stdenv.isDarwin [ + ++ lib.optionals stdenv.hostPlatform.isDarwin [ libiconv darwin.apple_sdk.frameworks.Security darwin.apple_sdk.frameworks.SystemConfiguration diff --git a/pkgs/by-name/ni/nix-web/package.nix b/pkgs/by-name/ni/nix-web/package.nix index ad97b1356b3e..21d6c9f15d0c 100644 --- a/pkgs/by-name/ni/nix-web/package.nix +++ b/pkgs/by-name/ni/nix-web/package.nix @@ -26,8 +26,8 @@ rustPlatform.buildRustPackage rec { cargoHash = "sha256-romL/RALr/pmwUA8/SN4AOwc+Vndspd1Yrqs0AHPYRY="; nativeBuildInputs = [ pkg-config ]; - buildInputs = lib.optional (!stdenv.isDarwin) openssl - ++ lib.optionals stdenv.isDarwin (with darwin.apple_sdk.frameworks; [ Security SystemConfiguration ]); + buildInputs = lib.optional (!stdenv.hostPlatform.isDarwin) openssl + ++ lib.optionals stdenv.hostPlatform.isDarwin (with darwin.apple_sdk.frameworks; [ Security SystemConfiguration ]); postPatch = '' substituteInPlace nix-web/nix-web.service \ diff --git a/pkgs/by-name/ni/nixtract/package.nix b/pkgs/by-name/ni/nixtract/package.nix index e046e49d84f4..2885a13f300d 100644 --- a/pkgs/by-name/ni/nixtract/package.nix +++ b/pkgs/by-name/ni/nixtract/package.nix @@ -29,7 +29,7 @@ rustPlatform.buildRustPackage rec { buildInputs = [ openssl ] - ++ lib.optionals stdenv.isDarwin [ + ++ lib.optionals stdenv.hostPlatform.isDarwin [ libiconv darwin.apple_sdk.frameworks.SystemConfiguration ]; diff --git a/pkgs/by-name/nm/nmap/package.nix b/pkgs/by-name/nm/nmap/package.nix index 666f6bd84ecc..e90fc8ec322e 100644 --- a/pkgs/by-name/nm/nmap/package.nix +++ b/pkgs/by-name/nm/nmap/package.nix @@ -22,7 +22,7 @@ stdenv.mkDerivation rec { hash = "sha256-4Uq1MOR7Wv2I8ciiusf4nNj+a0eOItJVxbm923ocV3g="; }; - prePatch = lib.optionalString stdenv.isDarwin '' + prePatch = lib.optionalString stdenv.hostPlatform.isDarwin '' substituteInPlace libz/configure \ --replace /usr/bin/libtool ar \ --replace 'AR="libtool"' 'AR="ar"' \ @@ -39,7 +39,7 @@ stdenv.mkDerivation rec { install -m 444 -D nselib/data/passwords.lst $out/share/wordlists/nmap.lst ''; - postFixup = lib.optionalString stdenv.isDarwin '' + postFixup = lib.optionalString stdenv.hostPlatform.isDarwin '' install_name_tool -change liblinear.so.5 ${liblinear.out}/lib/liblinear.5.dylib $out/bin/nmap ''; diff --git a/pkgs/by-name/nn/nncp/package.nix b/pkgs/by-name/nn/nncp/package.nix index 13c4c4812b92..bbacef76fbb0 100644 --- a/pkgs/by-name/nn/nncp/package.nix +++ b/pkgs/by-name/nn/nncp/package.nix @@ -50,7 +50,7 @@ stdenv.mkDerivation (finalAttrs: { }; meta = { - broken = stdenv.isDarwin; + broken = stdenv.hostPlatform.isDarwin; changelog = "http://www.nncpgo.org/News.html"; description = "Secure UUCP-like store-and-forward exchanging"; downloadPage = "http://www.nncpgo.org/Tarballs.html"; diff --git a/pkgs/by-name/no/nomacs/package.nix b/pkgs/by-name/no/nomacs/package.nix index a5f17f4b365b..45333177d070 100644 --- a/pkgs/by-name/no/nomacs/package.nix +++ b/pkgs/by-name/no/nomacs/package.nix @@ -24,7 +24,7 @@ stdenv.mkDerivation (finalAttrs: { outputs = [ "out" ] # man pages are not installed on Darwin, see cmake/{Mac,Unix}BuildTarget.cmake - ++ lib.optionals (!stdenv.isDarwin) [ "man" ]; + ++ lib.optionals (!stdenv.hostPlatform.isDarwin) [ "man" ]; sourceRoot = "${finalAttrs.src.name}/ImageLounge"; @@ -60,7 +60,7 @@ stdenv.mkDerivation (finalAttrs: { (lib.cmakeBool "USE_SYSTEM_QUAZIP" true) ]; - postInstall = lib.optionalString stdenv.isDarwin '' + postInstall = lib.optionalString stdenv.hostPlatform.isDarwin '' mkdir -p $out/{Applications,lib} mv $out/nomacs.app $out/Applications/nomacs.app mv $out/libnomacsCore.dylib $out/lib/libnomacsCore.dylib diff --git a/pkgs/by-name/no/normcap/package.nix b/pkgs/by-name/no/normcap/package.nix index e862247b0df5..a93db6de0279 100644 --- a/pkgs/by-name/no/normcap/package.nix +++ b/pkgs/by-name/no/normcap/package.nix @@ -17,7 +17,7 @@ let leptonica tesseract4 libnotify - ] ++ lib.optionals stdenv.isLinux [ + ] ++ lib.optionals stdenv.hostPlatform.isLinux [ wl-clipboard ]; @@ -73,21 +73,21 @@ ps.buildPythonApplication rec { ps.pytestCheckHook ps.pytest-qt ps.toml - ] ++ lib.optionals stdenv.isLinux [ + ] ++ lib.optionals stdenv.hostPlatform.isLinux [ ps.pytest-xvfb xorg.xvfb ]; preCheck = '' export HOME=$(mktemp -d) - '' + lib.optionalString stdenv.isLinux '' + '' + lib.optionalString stdenv.hostPlatform.isLinux '' # setup a virtual x11 display export DISPLAY=:$((2000 + $RANDOM % 1000)) Xvfb $DISPLAY -screen 5 1024x768x8 & xvfb_pid=$! ''; - postCheck = lib.optionalString stdenv.isLinux '' + postCheck = lib.optionalString stdenv.hostPlatform.isLinux '' # cleanup the virtual x11 display sleep 0.5 kill $xvfb_pid @@ -106,7 +106,7 @@ ps.buildPythonApplication rec { "test_synchronized_capture" # flaky "test_normcap_ocr_testcases" - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ # requires impure pbcopy "test_get_copy_func_with_pbcopy" "test_get_copy_func_without_pbcopy" @@ -128,7 +128,7 @@ ps.buildPythonApplication rec { # RuntimeError("Internal C++ object (PySide6.QtGui.QHideEvent) already deleted.") # AttributeError("'LoadingIndicator' object has no attribute 'timer'") "tests/tests_gui/test_loading_indicator.py" - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ # requires a display "tests/integration/test_normcap.py" "tests/integration/test_tray_menu.py" @@ -142,6 +142,6 @@ ps.buildPythonApplication rec { license = licenses.gpl3Plus; maintainers = with maintainers; [ cafkafk pbsds ]; mainProgram = "normcap"; - broken = stdenv.isDarwin; + broken = stdenv.hostPlatform.isDarwin; }; } diff --git a/pkgs/by-name/no/nosql-workbench/package.nix b/pkgs/by-name/no/nosql-workbench/package.nix index bc9532c58d94..d3d3d4c4f4b9 100644 --- a/pkgs/by-name/no/nosql-workbench/package.nix +++ b/pkgs/by-name/no/nosql-workbench/package.nix @@ -41,7 +41,7 @@ let ]; }; in -if stdenv.isDarwin then +if stdenv.hostPlatform.isDarwin then stdenv.mkDerivation { inherit pname diff --git a/pkgs/by-name/no/nostui/package.nix b/pkgs/by-name/no/nostui/package.nix index 6fbd71ac2d05..9c4f32004849 100644 --- a/pkgs/by-name/no/nostui/package.nix +++ b/pkgs/by-name/no/nostui/package.nix @@ -17,7 +17,7 @@ rustPlatform.buildRustPackage rec { hash = "sha256-RCD11KdzM66Mkydc51r6fG+q8bmKl5eZma58YoARwPo="; }; - buildInputs = lib.optionals stdenv.isDarwin ( + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin ( with darwin.apple_sdk; [ frameworks.SystemConfiguration ] ); diff --git a/pkgs/by-name/no/notes/package.nix b/pkgs/by-name/no/notes/package.nix index c9ca49ffe745..83af624af20c 100644 --- a/pkgs/by-name/no/notes/package.nix +++ b/pkgs/by-name/no/notes/package.nix @@ -8,7 +8,7 @@ overrideSDK, }: let - stdenv' = if stdenv.isDarwin then overrideSDK stdenv "11.0" else stdenv; + stdenv' = if stdenv.hostPlatform.isDarwin then overrideSDK stdenv "11.0" else stdenv; in stdenv'.mkDerivation (finalAttrs: { pname = "notes"; @@ -34,11 +34,11 @@ stdenv'.mkDerivation (finalAttrs: { qt6.qtbase qt6.qtdeclarative ] - ++ lib.optionals stdenv.isDarwin [ + ++ lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk_11_0.frameworks.Cocoa ]; - postInstall = lib.optionalString stdenv.isDarwin '' + postInstall = lib.optionalString stdenv.hostPlatform.isDarwin '' mkdir $out/Applications mv $out/bin/Notes.app $out/Applications ''; diff --git a/pkgs/by-name/no/novelwriter/package.nix b/pkgs/by-name/no/novelwriter/package.nix index 9bf21b216aa0..f33aa1b03a42 100644 --- a/pkgs/by-name/no/novelwriter/package.nix +++ b/pkgs/by-name/no/novelwriter/package.nix @@ -36,7 +36,7 @@ python3.pkgs.buildPythonApplication { export QT_QPA_PLATFORM_PLUGIN_PATH=${qt5.qtbase.bin}/lib/qt-${qt5.qtbase.version}/plugins/platforms ''; - postInstall = lib.optionalString stdenv.isLinux '' + postInstall = lib.optionalString stdenv.hostPlatform.isLinux '' mkdir -p $out/share/{icons,applications,pixmaps,mime/packages} cp -r setup/data/hicolor $out/share/icons @@ -68,6 +68,6 @@ python3.pkgs.buildPythonApplication { mainProgram = "novelwriter"; platforms = with lib.platforms; unix ++ windows; - broken = stdenv.isDarwin; # TODO awaiting build instructions for Darwin + broken = stdenv.hostPlatform.isDarwin; # TODO awaiting build instructions for Darwin }; } diff --git a/pkgs/by-name/no/novops/package.nix b/pkgs/by-name/no/novops/package.nix index a254f734178a..44edb7f32953 100644 --- a/pkgs/by-name/no/novops/package.nix +++ b/pkgs/by-name/no/novops/package.nix @@ -24,7 +24,7 @@ rustPlatform.buildRustPackage rec { buildInputs = [ openssl # required for openssl-sys - ] ++ lib.optional stdenv.isDarwin [ + ] ++ lib.optional stdenv.hostPlatform.isDarwin [ libiconv darwin.apple_sdk.frameworks.SystemConfiguration ]; diff --git a/pkgs/by-name/nr/nrr/package.nix b/pkgs/by-name/nr/nrr/package.nix index 0cf4c2bb0b1f..0c7aa77aca1d 100644 --- a/pkgs/by-name/nr/nrr/package.nix +++ b/pkgs/by-name/nr/nrr/package.nix @@ -23,7 +23,7 @@ rustPlatform.buildRustPackage rec { cargoHash = "sha256-F2JlUErplSRQwSAEavQPNDMcXYc2waeYwjGuzmZq8sc="; - buildInputs = lib.optionals stdenv.isDarwin [ + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.CoreFoundation darwin.apple_sdk.frameworks.Security darwin.apple_sdk.frameworks.IOKit diff --git a/pkgs/by-name/ns/nsxiv/package.nix b/pkgs/by-name/ns/nsxiv/package.nix index ba267571a900..b54c8ce55f4e 100644 --- a/pkgs/by-name/ns/nsxiv/package.nix +++ b/pkgs/by-name/ns/nsxiv/package.nix @@ -30,13 +30,13 @@ stdenv.mkDerivation (finalAttrs: { libXft libexif libwebp - ] ++ lib.optional stdenv.isDarwin libinotify-kqueue; + ] ++ lib.optional stdenv.hostPlatform.isDarwin libinotify-kqueue; postPatch = lib.optionalString (conf != null) '' cp ${(builtins.toFile "config.def.h" conf)} config.def.h ''; - env.NIX_LDFLAGS = lib.optionalString stdenv.isDarwin "-linotify"; + env.NIX_LDFLAGS = lib.optionalString stdenv.hostPlatform.isDarwin "-linotify"; makeFlags = [ "CC:=$(CC)" ]; diff --git a/pkgs/by-name/nt/ntpd-rs/package.nix b/pkgs/by-name/nt/ntpd-rs/package.nix index 43df56ac024e..bc385466c8eb 100644 --- a/pkgs/by-name/nt/ntpd-rs/package.nix +++ b/pkgs/by-name/nt/ntpd-rs/package.nix @@ -25,7 +25,7 @@ rustPlatform.buildRustPackage rec { cargoHash = "sha256-9HLbGC6j0Wq/lG//CeEAfnYzlGG14CnDpmluL1moHWQ="; - buildInputs = lib.optionals stdenv.isDarwin [ darwin.apple_sdk_11_0.frameworks.Security ]; + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk_11_0.frameworks.Security ]; nativeBuildInputs = [ pandoc installShellFiles @@ -60,7 +60,7 @@ rustPlatform.buildRustPackage rec { passthru = { tests = { - nixos = lib.optionalAttrs stdenv.isLinux nixosTests.ntpd-rs; + nixos = lib.optionalAttrs stdenv.hostPlatform.isLinux nixosTests.ntpd-rs; version = testers.testVersion { package = ntpd-rs; inherit version; @@ -84,6 +84,6 @@ rustPlatform.buildRustPackage rec { ]; mainProgram = "ntp-ctl"; # note: Undefined symbols for architecture x86_64: "_ntp_adjtime" - broken = stdenv.isDarwin && stdenv.isx86_64; + broken = stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isx86_64; }; } diff --git a/pkgs/by-name/nu/nulloy/package.nix b/pkgs/by-name/nu/nulloy/package.nix index 8e82b6ae0638..203ddf84c409 100644 --- a/pkgs/by-name/nu/nulloy/package.nix +++ b/pkgs/by-name/nu/nulloy/package.nix @@ -61,6 +61,6 @@ stdenv.mkDerivation rec { mainProgram = "nulloy"; maintainers = with maintainers; [ aleksana ]; platforms = platforms.all; - broken = stdenv.isDarwin; + broken = stdenv.hostPlatform.isDarwin; }; } diff --git a/pkgs/by-name/nu/numbat/package.nix b/pkgs/by-name/nu/numbat/package.nix index 829b1bf8a4a4..ce3c954b88c2 100644 --- a/pkgs/by-name/nu/numbat/package.nix +++ b/pkgs/by-name/nu/numbat/package.nix @@ -20,7 +20,7 @@ rustPlatform.buildRustPackage rec { cargoHash = "sha256-t6vxJ0UIQJILCGv4PO5V4/QF5de/wtMQDkb8gPtE70E="; - buildInputs = lib.optionals stdenv.isDarwin [ + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.Security ]; diff --git a/pkgs/by-name/nv/nvidia-texture-tools/package.nix b/pkgs/by-name/nv/nvidia-texture-tools/package.nix index 3f2bd5ad36a3..13f285bc66e8 100644 --- a/pkgs/by-name/nv/nvidia-texture-tools/package.nix +++ b/pkgs/by-name/nv/nvidia-texture-tools/package.nix @@ -19,7 +19,7 @@ stdenv.mkDerivation { # Make a recently added pure virtual function just virtual, # to keep compatibility. sed -i 's/virtual void endImage() = 0;/virtual void endImage() {}/' src/nvtt/nvtt.h - '' + lib.optionalString stdenv.isAarch64 '' + '' + lib.optionalString stdenv.hostPlatform.isAarch64 '' # remove x86_64-only libraries sed -i '/bc1enc/d' src/nvtt/tests/CMakeLists.txt sed -i '/libsquish/d;/CMP_Core/d' extern/CMakeLists.txt diff --git a/pkgs/by-name/nw/nwjs-ffmpeg-prebuilt/package.nix b/pkgs/by-name/nw/nwjs-ffmpeg-prebuilt/package.nix index e0d721fd352e..6acad5ed2c12 100644 --- a/pkgs/by-name/nw/nwjs-ffmpeg-prebuilt/package.nix +++ b/pkgs/by-name/nw/nwjs-ffmpeg-prebuilt/package.nix @@ -6,7 +6,7 @@ }: let - bits = if stdenv.is64bit then "x64" else "ia32"; + bits = if stdenv.hostPlatform.is64bit then "x64" else "ia32"; version = "0.91.0"; in stdenv.mkDerivation { diff --git a/pkgs/by-name/oa/oauth2l/package.nix b/pkgs/by-name/oa/oauth2l/package.nix index 612575d2b266..c6d7070486bd 100644 --- a/pkgs/by-name/oa/oauth2l/package.nix +++ b/pkgs/by-name/oa/oauth2l/package.nix @@ -23,7 +23,7 @@ buildGoModule rec { preCheck = "export HOME=$(mktemp -d)"; # tests fail on linux for some reason - doCheck = stdenv.isDarwin; + doCheck = stdenv.hostPlatform.isDarwin; meta = with lib; { description = "Simple CLI for interacting with Google API authentication"; diff --git a/pkgs/by-name/oc/ocis-bin/package.nix b/pkgs/by-name/oc/ocis-bin/package.nix index a0b8a62ed462..e853e40b35bc 100644 --- a/pkgs/by-name/oc/ocis-bin/package.nix +++ b/pkgs/by-name/oc/ocis-bin/package.nix @@ -18,9 +18,9 @@ let ."${stdenv.hostPlatform.system}" or (throw "Unsupported system: ${stdenv.hostPlatform.system}"); os = - if stdenv.isLinux then + if stdenv.hostPlatform.isLinux then "linux" - else if stdenv.isDarwin then + else if stdenv.hostPlatform.isDarwin then "darwin" else throw "Unsupported OS"; diff --git a/pkgs/by-name/oc/ocsinventory-agent/package.nix b/pkgs/by-name/oc/ocsinventory-agent/package.nix index 7e5782cba0f1..d3f77414e049 100644 --- a/pkgs/by-name/oc/ocsinventory-agent/package.nix +++ b/pkgs/by-name/oc/ocsinventory-agent/package.nix @@ -32,7 +32,7 @@ perlPackages.buildPerlPackage rec { hash = "sha256-aFzBrUsVttUhpYGEYd/yYuXmE90PGCiBmBsVjtHcHLg="; }; - nativeBuildInputs = [ makeWrapper ] ++ lib.optional stdenv.isDarwin shortenPerlShebang; + nativeBuildInputs = [ makeWrapper ] ++ lib.optional stdenv.hostPlatform.isDarwin shortenPerlShebang; buildInputs = with perlPackages; [ perl @@ -48,9 +48,9 @@ perlPackages.buildPerlPackage rec { ProcDaemon ProcPIDFile XMLSimple - ] ++ lib.optionals stdenv.isLinux (with perlPackages; [ + ] ++ lib.optionals stdenv.hostPlatform.isLinux (with perlPackages; [ NetCUPS # cups-filters is broken on darwin - ]) ++ lib.optionals stdenv.isDarwin (with perlPackages; [ + ]) ++ lib.optionals stdenv.hostPlatform.isDarwin (with perlPackages; [ MacSysProfile ]); @@ -62,14 +62,14 @@ perlPackages.buildPerlPackage rec { ipmitool # ipmitool nmap # nmap pciutils # lspci - ] ++ lib.optionals stdenv.isLinux [ + ] ++ lib.optionals stdenv.hostPlatform.isLinux [ dmidecode # dmidecode iproute2 # ip lvm2 # pvs usbutils # lsusb util-linux # last, lsblk, mount ]; - in lib.optionalString stdenv.isDarwin '' + in lib.optionalString stdenv.hostPlatform.isDarwin '' shortenPerlShebang $out/bin/ocsinventory-agent '' + '' wrapProgram $out/bin/ocsinventory-agent --prefix PATH : ${lib.makeBinPath runtimeDependencies} diff --git a/pkgs/by-name/od/odin/package.nix b/pkgs/by-name/od/odin/package.nix index 305b9d329d02..4a14bfa443aa 100644 --- a/pkgs/by-name/od/odin/package.nix +++ b/pkgs/by-name/od/odin/package.nix @@ -25,7 +25,7 @@ stdenv.mkDerivation { }; postPatch = - lib.optionalString stdenv.isDarwin '' + lib.optionalString stdenv.hostPlatform.isDarwin '' substituteInPlace src/linker.cpp \ --replace-fail '/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk' ${MacOSX-SDK} '' @@ -46,7 +46,7 @@ stdenv.mkDerivation { which ]; - buildInputs = lib.optionals stdenv.isDarwin [ + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ libiconv Security ]; diff --git a/pkgs/by-name/og/oguri/package.nix b/pkgs/by-name/og/oguri/package.nix index 9156e6df39b0..b7cc17014ed3 100644 --- a/pkgs/by-name/og/oguri/package.nix +++ b/pkgs/by-name/og/oguri/package.nix @@ -37,6 +37,6 @@ stdenv.mkDerivation rec { license = licenses.mit; maintainers = with maintainers; [ AndersonTorres ]; inherit (wayland.meta) platforms; - broken = stdenv.isDarwin; # this should be enfoced by wayland platforms in the future + broken = stdenv.hostPlatform.isDarwin; # this should be enfoced by wayland platforms in the future }; } diff --git a/pkgs/by-name/ol/ollama/package.nix b/pkgs/by-name/ol/ollama/package.nix index f16103382494..d286c1569916 100644 --- a/pkgs/by-name/ol/ollama/package.nix +++ b/pkgs/by-name/ol/ollama/package.nix @@ -62,8 +62,8 @@ let rocmRequested = shouldEnable "rocm" config.rocmSupport; cudaRequested = shouldEnable "cuda" config.cudaSupport; - enableRocm = rocmRequested && stdenv.isLinux; - enableCuda = cudaRequested && stdenv.isLinux; + enableRocm = rocmRequested && stdenv.hostPlatform.isLinux; + enableCuda = cudaRequested && stdenv.hostPlatform.isLinux; rocmLibs = [ rocmPackages.clr @@ -144,12 +144,12 @@ goBuild { makeWrapper autoAddDriverRunpath ] - ++ lib.optionals stdenv.isDarwin metalFrameworks; + ++ lib.optionals stdenv.hostPlatform.isDarwin metalFrameworks; buildInputs = lib.optionals enableRocm (rocmLibs ++ [ libdrm ]) ++ lib.optionals enableCuda cudaLibs - ++ lib.optionals stdenv.isDarwin metalFrameworks; + ++ lib.optionals stdenv.hostPlatform.isDarwin metalFrameworks; patches = [ # disable uses of `git` in the `go generate` script @@ -209,7 +209,7 @@ goBuild { package = ollama; }; } - // lib.optionalAttrs stdenv.isLinux { + // lib.optionalAttrs stdenv.hostPlatform.isLinux { inherit ollama-rocm ollama-cuda; service = nixosTests.ollama; service-cuda = nixosTests.ollama-cuda; diff --git a/pkgs/by-name/on/onscripter-en/package.nix b/pkgs/by-name/on/onscripter-en/package.nix index 74b440b42773..64c7cd931fa2 100644 --- a/pkgs/by-name/on/onscripter-en/package.nix +++ b/pkgs/by-name/on/onscripter-en/package.nix @@ -62,6 +62,6 @@ stdenv.mkDerivation (finalAttrs: { mainProgram = "onscripter-en"; maintainers = with lib.maintainers; [ AndersonTorres ]; platforms = lib.platforms.unix; - broken = stdenv.isDarwin; + broken = stdenv.hostPlatform.isDarwin; }; }) diff --git a/pkgs/by-name/op/open-scq30/package.nix b/pkgs/by-name/op/open-scq30/package.nix index 33d4e47c76fb..1028cfb68250 100644 --- a/pkgs/by-name/op/open-scq30/package.nix +++ b/pkgs/by-name/op/open-scq30/package.nix @@ -42,7 +42,7 @@ rustPlatform.buildRustPackage rec { gtk4 libadwaita pango - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.AppKit darwin.apple_sdk.frameworks.CoreBluetooth darwin.apple_sdk.frameworks.CoreGraphics diff --git a/pkgs/by-name/op/openapi-python-client/package.nix b/pkgs/by-name/op/openapi-python-client/package.nix index 550fca6c7abb..a4445a6a5670 100644 --- a/pkgs/by-name/op/openapi-python-client/package.nix +++ b/pkgs/by-name/op/openapi-python-client/package.nix @@ -27,7 +27,7 @@ python3Packages.buildPythonApplication rec { [ installShellFiles ] - ++ lib.optionals stdenv.isDarwin [ + ++ lib.optionals stdenv.hostPlatform.isDarwin [ darwin.ps ]; diff --git a/pkgs/by-name/op/openctm/package.nix b/pkgs/by-name/op/openctm/package.nix index 169e4469abcd..4d380543857f 100644 --- a/pkgs/by-name/op/openctm/package.nix +++ b/pkgs/by-name/op/openctm/package.nix @@ -46,7 +46,7 @@ stdenv.mkDerivation (finalAttrs: { "MAN1DIR=$(man)/share/man//man1" ]; - makefile = if stdenv.isDarwin then "Makefile.macosx" else "Makefile.linux"; + makefile = if stdenv.hostPlatform.isDarwin then "Makefile.macosx" else "Makefile.linux"; preInstall = "mkdir -p $bin/bin $dev/include $out/lib $man/share/man/man1"; diff --git a/pkgs/by-name/op/openorienteering-mapper/package.nix b/pkgs/by-name/op/openorienteering-mapper/package.nix index 037364ed6263..5d9fb8e256cd 100644 --- a/pkgs/by-name/op/openorienteering-mapper/package.nix +++ b/pkgs/by-name/op/openorienteering-mapper/package.nix @@ -63,7 +63,7 @@ stdenv.mkDerivation rec { # See https://github.com/NixOS/nixpkgs/issues/85306 (lib.cmakeBool "LICENSING_PROVIDER" false) (lib.cmakeBool "Mapper_MANUAL_QTHELP" false) - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ # FindGDAL is broken and always finds /Library/Framework unless this is # specified (lib.cmakeFeature "GDAL_INCLUDE_DIR" "${gdal}/include") diff --git a/pkgs/by-name/op/openpgl/package.nix b/pkgs/by-name/op/openpgl/package.nix index 76e61b6658d6..db0ba62beb0f 100644 --- a/pkgs/by-name/op/openpgl/package.nix +++ b/pkgs/by-name/op/openpgl/package.nix @@ -31,7 +31,7 @@ stdenv.mkDerivation (finalAttrs: { "-DTBB_ROOT=${tbb.out}" ]; - env.NIX_CFLAGS_COMPILE = lib.optionalString (stdenv.isAarch64 && !stdenv.isDarwin) "-flax-vector-conversions"; + env.NIX_CFLAGS_COMPILE = lib.optionalString (stdenv.hostPlatform.isAarch64 && !stdenv.hostPlatform.isDarwin) "-flax-vector-conversions"; meta = { description = "Intel Open Path Guiding Library"; diff --git a/pkgs/by-name/op/openpgp-ca/package.nix b/pkgs/by-name/op/openpgp-ca/package.nix index e97087ccf596..e2397c5413db 100644 --- a/pkgs/by-name/op/openpgp-ca/package.nix +++ b/pkgs/by-name/op/openpgp-ca/package.nix @@ -39,7 +39,7 @@ rustPlatform.buildRustPackage rec { sqlite pcsclite nettle - ] ++ lib.optionals stdenv.isDarwin (with darwin.apple_sdk.frameworks; [ PCSC Security SystemConfiguration ]); + ] ++ lib.optionals stdenv.hostPlatform.isDarwin (with darwin.apple_sdk.frameworks; [ PCSC Security SystemConfiguration ]); # Most tests rely on gnupg being able to write to /run/user # gnupg refuses to respect the XDG_RUNTIME_DIR variable, so we skip the tests diff --git a/pkgs/by-name/op/openpgp-card-tools/package.nix b/pkgs/by-name/op/openpgp-card-tools/package.nix index 00a4be3e9ece..03d828204449 100644 --- a/pkgs/by-name/op/openpgp-card-tools/package.nix +++ b/pkgs/by-name/op/openpgp-card-tools/package.nix @@ -25,7 +25,7 @@ rustPlatform.buildRustPackage rec { nativeBuildInputs = [ pkg-config rustPlatform.bindgenHook ]; - buildInputs = [ pcsclite ] ++ lib.optionals stdenv.isDarwin [ + buildInputs = [ pcsclite ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.PCSC darwin.apple_sdk.frameworks.Security ]; diff --git a/pkgs/by-name/op/openscad-unstable/package.nix b/pkgs/by-name/op/openscad-unstable/package.nix index eb1dd005af46..8a96876d65dd 100644 --- a/pkgs/by-name/op/openscad-unstable/package.nix +++ b/pkgs/by-name/op/openscad-unstable/package.nix @@ -92,7 +92,7 @@ clangStdenv.mkDerivation rec { qtbase qtmultimedia ] - ++ lib.optionals clangStdenv.isLinux [ + ++ lib.optionals clangStdenv.hostPlatform.isLinux [ xorg.libXdmcp libICE libSM @@ -101,7 +101,7 @@ clangStdenv.mkDerivation rec { qtwayland libGLU ] - ++ lib.optional clangStdenv.isDarwin qtmacextras + ++ lib.optional clangStdenv.hostPlatform.isDarwin qtmacextras ; cmakeFlags = [ "-DEXPERIMENTAL=ON" # enable experimental options diff --git a/pkgs/by-name/op/opentelemetry-cpp/package.nix b/pkgs/by-name/op/opentelemetry-cpp/package.nix index e8f799f765ee..47f4d7b73155 100644 --- a/pkgs/by-name/op/opentelemetry-cpp/package.nix +++ b/pkgs/by-name/op/opentelemetry-cpp/package.nix @@ -32,7 +32,7 @@ stdenv.mkDerivation (finalAttrs: { patches = [ ./0001-Disable-tests-requiring-network-access.patch - ] ++ lib.optional stdenv.isDarwin ./0002-Disable-segfaulting-test-on-Darwin.patch; + ] ++ lib.optional stdenv.hostPlatform.isDarwin ./0002-Disable-segfaulting-test-on-Darwin.patch; nativeBuildInputs = [ cmake ]; diff --git a/pkgs/by-name/op/openturns/package.nix b/pkgs/by-name/op/openturns/package.nix index 58ca6a4139b5..5d62a61c2e95 100644 --- a/pkgs/by-name/op/openturns/package.nix +++ b/pkgs/by-name/op/openturns/package.nix @@ -65,7 +65,7 @@ stdenv.mkDerivation (finalAttrs: { python3Packages.psutil python3Packages.python ] - ++ lib.optionals stdenv.isDarwin [ + ++ lib.optionals stdenv.hostPlatform.isDarwin [ Accelerate ]; diff --git a/pkgs/by-name/op/openvr/package.nix b/pkgs/by-name/op/openvr/package.nix index 7d309065df9e..ed17bb7c8976 100644 --- a/pkgs/by-name/op/openvr/package.nix +++ b/pkgs/by-name/op/openvr/package.nix @@ -50,7 +50,7 @@ stdenv.mkDerivation (finalAttrs: { buildInputs = [ jsoncpp libGL - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ AppKit Foundation ]; @@ -60,7 +60,7 @@ stdenv.mkDerivation (finalAttrs: { passthru.updateScript = nix-update-script { }; meta = { - broken = stdenv.isDarwin; + broken = stdenv.hostPlatform.isDarwin; description = "API and runtime that allows access to VR hardware from multiple vendors without requiring that applications have specific knowledge of the hardware they are targeting"; homepage = "https://github.com/ValveSoftware/openvr"; license = lib.licenses.bsd3; diff --git a/pkgs/by-name/op/ophcrack/package.nix b/pkgs/by-name/op/ophcrack/package.nix index 13709ad9973a..1fbf6c180545 100644 --- a/pkgs/by-name/op/ophcrack/package.nix +++ b/pkgs/by-name/op/ophcrack/package.nix @@ -33,7 +33,7 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ pkg-config ] ++ lib.optional enableGui libsForQt5.wrapQtAppsHook; buildInputs = [ openssl ] - ++ (if enableGui then [ libsForQt5.qtcharts ] else [ expat ]) ++ lib.optional stdenv.isDarwin expat; + ++ (if enableGui then [ libsForQt5.qtcharts ] else [ expat ]) ++ lib.optional stdenv.hostPlatform.isDarwin expat; configureFlags = [ "--with-libssl" ] @@ -47,7 +47,7 @@ stdenv.mkDerivation rec { [ "--disable-gui" ] ); - installPhase = lib.optional stdenv.isDarwin '' + installPhase = lib.optional stdenv.hostPlatform.isDarwin '' mkdir -p $out/bin cp -R src/ophcrack $out/bin ''; diff --git a/pkgs/by-name/or/orbiton/package.nix b/pkgs/by-name/or/orbiton/package.nix index f8fbc3484e12..6e9cee2539fe 100644 --- a/pkgs/by-name/or/orbiton/package.nix +++ b/pkgs/by-name/or/orbiton/package.nix @@ -15,7 +15,7 @@ buildGoModule rec { vendorHash = null; - postPatch = lib.optionalString stdenv.isDarwin '' + postPatch = lib.optionalString stdenv.hostPlatform.isDarwin '' substituteInPlace Makefile \ --replace "-Wl,--as-needed" "" diff --git a/pkgs/by-name/or/ord/package.nix b/pkgs/by-name/or/ord/package.nix index 2d13cc585aed..cc5257d6189b 100644 --- a/pkgs/by-name/or/ord/package.nix +++ b/pkgs/by-name/or/ord/package.nix @@ -26,7 +26,7 @@ rustPlatform.buildRustPackage rec { buildInputs = [ openssl - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.Security darwin.apple_sdk.frameworks.SystemConfiguration ]; diff --git a/pkgs/by-name/os/osqp-eigen/package.nix b/pkgs/by-name/os/osqp-eigen/package.nix index 935bb0bfa659..016fbe8b0aca 100644 --- a/pkgs/by-name/os/osqp-eigen/package.nix +++ b/pkgs/by-name/os/osqp-eigen/package.nix @@ -22,7 +22,7 @@ stdenv.mkDerivation (finalAttrs: { cmakeFlags = [ (lib.cmakeBool "BUILD_TESTING" true) - (lib.cmakeBool "OSQPEIGEN_RUN_Valgrind_tests" stdenv.isLinux) + (lib.cmakeBool "OSQPEIGEN_RUN_Valgrind_tests" stdenv.hostPlatform.isLinux) ]; nativeBuildInputs = [ cmake ]; @@ -31,7 +31,7 @@ stdenv.mkDerivation (finalAttrs: { osqp ]; checkInputs = [ catch2 ]; - nativeCheckInputs = lib.optional stdenv.isLinux valgrind; + nativeCheckInputs = lib.optional stdenv.hostPlatform.isLinux valgrind; doCheck = true; diff --git a/pkgs/by-name/ow/owmods-cli/package.nix b/pkgs/by-name/ow/owmods-cli/package.nix index 23db01329511..92809dab6243 100644 --- a/pkgs/by-name/ow/owmods-cli/package.nix +++ b/pkgs/by-name/ow/owmods-cli/package.nix @@ -35,9 +35,9 @@ rustPlatform.buildRustPackage rec { buildInputs = [ zstd libsoup_3 - ] ++ lib.optionals stdenv.isLinux [ + ] ++ lib.optionals stdenv.hostPlatform.isLinux [ openssl - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.Security darwin.apple_sdk.frameworks.SystemConfiguration ]; diff --git a/pkgs/by-name/ow/owncloud-client/package.nix b/pkgs/by-name/ow/owncloud-client/package.nix index 31f2b52b00bb..0de43753d13f 100644 --- a/pkgs/by-name/ow/owncloud-client/package.nix +++ b/pkgs/by-name/ow/owncloud-client/package.nix @@ -42,7 +42,7 @@ stdenv.mkDerivation rec { qt6Packages.qtkeychain libre-graph-api-cpp-qt-client kdsingleapplication - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ libinotify-kqueue sparkleshare ]; diff --git a/pkgs/by-name/pa/pablodraw/package.nix b/pkgs/by-name/pa/pablodraw/package.nix index 793abf7f0158..012961c99b19 100644 --- a/pkgs/by-name/pa/pablodraw/package.nix +++ b/pkgs/by-name/pa/pablodraw/package.nix @@ -64,6 +64,6 @@ buildDotnetModule rec { mainProgram = "PabloDraw"; maintainers = with maintainers; [ aleksana kip93 ]; platforms = platforms.all; - broken = stdenv.isDarwin; # Eto.Platform.Mac64 not found in nugetSource + broken = stdenv.hostPlatform.isDarwin; # Eto.Platform.Mac64 not found in nugetSource }; } diff --git a/pkgs/by-name/pa/paper-plane/package.nix b/pkgs/by-name/pa/paper-plane/package.nix index d308a9325425..228c4aa638b0 100644 --- a/pkgs/by-name/pa/paper-plane/package.nix +++ b/pkgs/by-name/pa/paper-plane/package.nix @@ -101,7 +101,7 @@ stdenv.mkDerivation { gst_all_1.gst-libav gst_all_1.gst-plugins-base gst_all_1.gst-plugins-good - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.Foundation ]; diff --git a/pkgs/by-name/pa/paperlib/package.nix b/pkgs/by-name/pa/paperlib/package.nix index c03f0434b3d8..d39e35be942b 100644 --- a/pkgs/by-name/pa/paperlib/package.nix +++ b/pkgs/by-name/pa/paperlib/package.nix @@ -39,7 +39,7 @@ let sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ]; }; in -if stdenv.isDarwin then +if stdenv.hostPlatform.isDarwin then stdenv.mkDerivation { inherit pname diff --git a/pkgs/by-name/pa/papers/package.nix b/pkgs/by-name/pa/papers/package.nix index bfa2c5d6da2d..db943d8ea940 100644 --- a/pkgs/by-name/pa/papers/package.nix +++ b/pkgs/by-name/pa/papers/package.nix @@ -28,7 +28,7 @@ , gi-docgen , libgxps , withLibsecret ? true -, supportNautilus ? (!stdenv.isDarwin) +, supportNautilus ? (!stdenv.hostPlatform.isDarwin) , libadwaita , exempi , cargo @@ -95,7 +95,7 @@ stdenv.mkDerivation (finalAttrs: { libsecret ] ++ lib.optionals supportNautilus [ nautilus - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.Foundation ]; @@ -123,7 +123,7 @@ stdenv.mkDerivation (finalAttrs: { # https://gitlab.gnome.org/GNOME/Incubator/papers/-/issues/176 --prefix PATH : "$out/bin" ) - '' + lib.optionalString stdenv.isDarwin '' + '' + lib.optionalString stdenv.hostPlatform.isDarwin '' install_name_tool -add_rpath "$out/lib" "$out/bin/papers" ''; diff --git a/pkgs/by-name/pa/paru/package.nix b/pkgs/by-name/pa/paru/package.nix index b8c457f8b58c..d961826d1247 100644 --- a/pkgs/by-name/pa/paru/package.nix +++ b/pkgs/by-name/pa/paru/package.nix @@ -54,7 +54,7 @@ rustPlatform.buildRustPackage rec { ]; # https://aur.archlinux.org/packages/paru#comment-961914 - buildFeatures = lib.optionals stdenv.isAarch64 [ "generate" ]; + buildFeatures = lib.optionals stdenv.hostPlatform.isAarch64 [ "generate" ]; postBuild = '' sh ./scripts/mkmo locale/ diff --git a/pkgs/by-name/pa/passes/package.nix b/pkgs/by-name/pa/passes/package.nix index a20a1fe80b84..74d34f682b0d 100644 --- a/pkgs/by-name/pa/passes/package.nix +++ b/pkgs/by-name/pa/passes/package.nix @@ -63,6 +63,6 @@ stdenv.mkDerivation (finalAttrs: { license = licenses.gpl3Plus; maintainers = with maintainers; [ fgaz ]; platforms = platforms.all; - broken = stdenv.isDarwin; # Crashes + broken = stdenv.hostPlatform.isDarwin; # Crashes }; }) diff --git a/pkgs/by-name/pe/petsc/package.nix b/pkgs/by-name/pe/petsc/package.nix index 2ea48a54a793..498a14c96dc3 100644 --- a/pkgs/by-name/pe/petsc/package.nix +++ b/pkgs/by-name/pe/petsc/package.nix @@ -47,7 +47,7 @@ stdenv.mkDerivation rec { lapack ] ++ lib.optional hdf5-support hdf5 ++ lib.optional petsc-withp4est p4est ++ lib.optionals withParmetis [ metis parmetis ]; - prePatch = lib.optionalString stdenv.isDarwin '' + prePatch = lib.optionalString stdenv.hostPlatform.isDarwin '' substituteInPlace config/install.py \ --replace /usr/bin/install_name_tool ${cctools}/bin/install_name_tool ''; diff --git a/pkgs/by-name/pg/pgagroal/package.nix b/pkgs/by-name/pg/pgagroal/package.nix index 72eb5c153a48..2b89773af833 100644 --- a/pkgs/by-name/pg/pgagroal/package.nix +++ b/pkgs/by-name/pg/pgagroal/package.nix @@ -16,7 +16,7 @@ stdenv.mkDerivation (finalAttrs: { nativeBuildInputs = [ cmake docutils ]; buildInputs = [ cjson libev openssl ] - ++ lib.optionals stdenv.isLinux [ systemd ]; + ++ lib.optionals stdenv.hostPlatform.isLinux [ systemd ]; meta = with lib; { description = "High-performance connection pool for PostgreSQL"; diff --git a/pkgs/by-name/pg/pgcopydb/package.nix b/pkgs/by-name/pg/pgcopydb/package.nix index 0df2ab9c04f7..1fda00a750e9 100644 --- a/pkgs/by-name/pg/pgcopydb/package.nix +++ b/pkgs/by-name/pg/pgcopydb/package.nix @@ -34,7 +34,7 @@ stdenv.mkDerivation (finalAttrs: { readline sqlite zlib - ] ++ lib.optionals stdenv.isLinux [ + ] ++ lib.optionals stdenv.hostPlatform.isLinux [ pam ]; diff --git a/pkgs/by-name/ph/photoqt/package.nix b/pkgs/by-name/ph/photoqt/package.nix index ff80e9bc1542..6e66d6885efc 100644 --- a/pkgs/by-name/ph/photoqt/package.nix +++ b/pkgs/by-name/ph/photoqt/package.nix @@ -49,7 +49,7 @@ stdenv.mkDerivation rec { qt6Packages.poppler zxing-cpp ] - ++ lib.optionals stdenv.isLinux [ + ++ lib.optionals stdenv.hostPlatform.isLinux [ mpv qt6.qtwayland ]; @@ -59,12 +59,12 @@ stdenv.mkDerivation rec { (lib.cmakeBool "CHROMECAST" false) (lib.cmakeBool "FREEIMAGE" false) (lib.cmakeBool "IMAGEMAGICK" false) - (lib.cmakeBool "VIDEO_MPV" (!stdenv.isDarwin)) + (lib.cmakeBool "VIDEO_MPV" (!stdenv.hostPlatform.isDarwin)) ]; env.MAGICK_LOCATION = "${graphicsmagick}/include/GraphicsMagick"; - postInstall = lib.optionalString stdenv.isDarwin '' + postInstall = lib.optionalString stdenv.hostPlatform.isDarwin '' mkdir -p $out/Applications mv $out/bin/photoqt.app $out/Applications makeWrapper $out/{Applications/photoqt.app/Contents/MacOS,bin}/photoqt diff --git a/pkgs/by-name/pi/picocom/package.nix b/pkgs/by-name/pi/picocom/package.nix index 9e9d1380558a..4a549e27921c 100644 --- a/pkgs/by-name/pi/picocom/package.nix +++ b/pkgs/by-name/pi/picocom/package.nix @@ -35,7 +35,7 @@ stdenv.mkDerivation (finalAttrs: { buildInputs = [ linenoise - ] ++ lib.optionals stdenv.isDarwin [ darwin.apple_sdk.frameworks.IOKit ]; + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.IOKit ]; makeFlags = [ "HISTFILE=.cache/picocom_history" diff --git a/pkgs/by-name/pi/picocrypt/package.nix b/pkgs/by-name/pi/picocrypt/package.nix index 92ddceef7372..d77509135d0e 100644 --- a/pkgs/by-name/pi/picocrypt/package.nix +++ b/pkgs/by-name/pi/picocrypt/package.nix @@ -37,7 +37,7 @@ buildGoModule rec { # Depends on a vendored, patched GLFW. glfw.buildInputs or [ ] ++ glfw.propagatedBuildInputs or [ ] - ++ lib.optionals (!stdenv.isDarwin) [ + ++ lib.optionals (!stdenv.hostPlatform.isDarwin) [ gtk3 xorg.libXxf86vm ]; diff --git a/pkgs/by-name/pi/pietrasanta-traceroute/package.nix b/pkgs/by-name/pi/pietrasanta-traceroute/package.nix index 195ea1ad97b0..2c2b824f8616 100644 --- a/pkgs/by-name/pi/pietrasanta-traceroute/package.nix +++ b/pkgs/by-name/pi/pietrasanta-traceroute/package.nix @@ -36,6 +36,6 @@ stdenv.mkDerivation rec { mainProgram = "traceroute"; maintainers = with maintainers; [ nicoo ]; platforms = platforms.all; - broken = stdenv.isDarwin; + broken = stdenv.hostPlatform.isDarwin; }; } diff --git a/pkgs/by-name/pi/pinocchio/package.nix b/pkgs/by-name/pi/pinocchio/package.nix index e754078a3805..7284be49df7c 100644 --- a/pkgs/by-name/pi/pinocchio/package.nix +++ b/pkgs/by-name/pi/pinocchio/package.nix @@ -36,7 +36,7 @@ stdenv.mkDerivation (finalAttrs: { ]; # test failure, ref https://github.com/stack-of-tasks/pinocchio/issues/2277 - prePatch = lib.optionalString (stdenv.isLinux && stdenv.isAarch64) '' + prePatch = lib.optionalString (stdenv.hostPlatform.isLinux && stdenv.hostPlatform.isAarch64) '' substituteInPlace unittest/algorithm/utils/CMakeLists.txt \ --replace-fail "add_pinocchio_unit_test(force)" "" ''; diff --git a/pkgs/by-name/pi/pinokio/package.nix b/pkgs/by-name/pi/pinokio/package.nix index 97b9ad7514e7..f71f7800c462 100644 --- a/pkgs/by-name/pi/pinokio/package.nix +++ b/pkgs/by-name/pi/pinokio/package.nix @@ -31,7 +31,7 @@ let }; in -if stdenv.isDarwin then +if stdenv.hostPlatform.isDarwin then stdenv.mkDerivation { inherit pname version src meta; diff --git a/pkgs/by-name/pi/pio/package.nix b/pkgs/by-name/pi/pio/package.nix index 01aa886c3002..f79c12256e23 100644 --- a/pkgs/by-name/pi/pio/package.nix +++ b/pkgs/by-name/pi/pio/package.nix @@ -13,7 +13,7 @@ rustPlatform.buildRustPackage rec { cargoHash = "sha256-jVOpk+Z3yEEoDexvxT9I0aVHJKVq47y8km/9ltoqrDA="; - buildInputs = lib.optionals stdenv.isDarwin [ + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.Accelerate ]; diff --git a/pkgs/by-name/pi/piv-agent/package.nix b/pkgs/by-name/pi/piv-agent/package.nix index d1c35d815341..5a8f25000efc 100644 --- a/pkgs/by-name/pi/piv-agent/package.nix +++ b/pkgs/by-name/pi/piv-agent/package.nix @@ -24,10 +24,10 @@ buildGoModule rec { ldflags = [ "-s" "-w" "-X main.version=${version}" "-X main.shortCommit=${src.rev}" ]; - nativeBuildInputs = lib.optionals stdenv.isLinux [ pkg-config ]; + nativeBuildInputs = lib.optionals stdenv.hostPlatform.isLinux [ pkg-config ]; buildInputs = - if stdenv.isDarwin + if stdenv.hostPlatform.isDarwin then [ darwin.apple_sdk.frameworks.PCSC ] else [ pcsclite ]; diff --git a/pkgs/by-name/pi/pixi/package.nix b/pkgs/by-name/pi/pixi/package.nix index 6c0ed9ebc0e2..85413acc64ed 100644 --- a/pkgs/by-name/pi/pixi/package.nix +++ b/pkgs/by-name/pi/pixi/package.nix @@ -39,7 +39,7 @@ rustPlatform.buildRustPackage rec { buildInputs = [ libgit2 openssl - ] ++ lib.optionals stdenv.isDarwin ( + ] ++ lib.optionals stdenv.hostPlatform.isDarwin ( with darwin.apple_sdk_11_0.frameworks; [ CoreFoundation IOKit SystemConfiguration Security ] ); @@ -50,7 +50,7 @@ rustPlatform.buildRustPackage rec { # There are some CI failures with Rattler. Tests on Aarch64 has been skipped. # See https://github.com/prefix-dev/pixi/pull/241. - doCheck = !stdenv.isAarch64; + doCheck = !stdenv.hostPlatform.isAarch64; preCheck = '' export HOME="$(mktemp -d)" @@ -81,7 +81,7 @@ rustPlatform.buildRustPackage rec { "--skip=test_task_with_env" "--skip=test_pixi_only_env_activation" "--skip=cli::shell_hook::tests::test_environment_json" - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ "--skip=task::task_environment::tests::test_find_ambiguous_task" "--skip=task::task_environment::tests::test_find_task_dual_defined" "--skip=task::task_environment::tests::test_find_task_explicit_defined" diff --git a/pkgs/by-name/pi/pizauth/package.nix b/pkgs/by-name/pi/pizauth/package.nix index 811b74b9724f..31435c52f017 100644 --- a/pkgs/by-name/pi/pizauth/package.nix +++ b/pkgs/by-name/pi/pizauth/package.nix @@ -22,7 +22,7 @@ rustPlatform.buildRustPackage rec { nativeBuildInputs = [ installShellFiles ]; - buildInputs = lib.optionals stdenv.isDarwin [ darwin.apple_sdk.frameworks.Security ]; + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.Security ]; postInstall = '' installShellCompletion --cmd pizauth \ diff --git a/pkgs/by-name/pl/platformsh/package.nix b/pkgs/by-name/pl/platformsh/package.nix index 683e34a87a0b..730990f103ff 100644 --- a/pkgs/by-name/pl/platformsh/package.nix +++ b/pkgs/by-name/pl/platformsh/package.nix @@ -8,11 +8,11 @@ }: let versions = lib.importJSON ./versions.json; - arch = if stdenvNoCC.isx86_64 then "amd64" - else if stdenvNoCC.isAarch64 then "arm64" + arch = if stdenvNoCC.hostPlatform.isx86_64 then "amd64" + else if stdenvNoCC.hostPlatform.isAarch64 then "arm64" else throw "Unsupported architecture"; - os = if stdenvNoCC.isLinux then "linux" - else if stdenvNoCC.isDarwin then "darwin" + os = if stdenvNoCC.hostPlatform.isLinux then "linux" + else if stdenvNoCC.hostPlatform.isDarwin then "darwin" else throw "Unsupported os"; versionInfo = versions."${os}-${arch}"; inherit (versionInfo) hash url; diff --git a/pkgs/by-name/pl/pls/package.nix b/pkgs/by-name/pl/pls/package.nix index 1db958dcf6be..10463b6c968f 100644 --- a/pkgs/by-name/pl/pls/package.nix +++ b/pkgs/by-name/pl/pls/package.nix @@ -18,7 +18,7 @@ rustPlatform.buildRustPackage rec { cargoHash = "sha256-d6HfIEROudINn2Jbnc3EEDZCD833FFFeUk6mvlu0ErA="; - buildInputs = lib.optionals stdenv.isDarwin [ + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.Security ]; diff --git a/pkgs/by-name/pm/pmbootstrap/package.nix b/pkgs/by-name/pm/pmbootstrap/package.nix index a1c3717c2188..cee9a0b13b7e 100644 --- a/pkgs/by-name/pm/pmbootstrap/package.nix +++ b/pkgs/by-name/pm/pmbootstrap/package.nix @@ -24,7 +24,7 @@ python3Packages.buildPythonApplication rec { pmb_test = "${src}/test"; # Tests depend on sudo - doCheck = stdenv.isLinux; + doCheck = stdenv.hostPlatform.isLinux; build-system = [ python3Packages.setuptools diff --git a/pkgs/by-name/po/podman-tui/package.nix b/pkgs/by-name/po/podman-tui/package.nix index 8841cc3c1320..7f4f84948f3a 100644 --- a/pkgs/by-name/po/podman-tui/package.nix +++ b/pkgs/by-name/po/podman-tui/package.nix @@ -16,7 +16,7 @@ buildGoModule rec { CGO_ENABLED = 0; tags = [ "containers_image_openpgp" "remote" ] - ++ lib.optional stdenv.isDarwin "darwin"; + ++ lib.optional stdenv.hostPlatform.isDarwin "darwin"; ldflags = [ "-s" "-w" ]; diff --git a/pkgs/by-name/po/poke/package.nix b/pkgs/by-name/po/poke/package.nix index 6bd5786089ab..0f392f3cbe8d 100644 --- a/pkgs/by-name/po/poke/package.nix +++ b/pkgs/by-name/po/poke/package.nix @@ -6,7 +6,7 @@ , texinfo , boehmgc , readline -, nbdSupport ? !stdenv.isDarwin, libnbd +, nbdSupport ? !stdenv.hostPlatform.isDarwin, libnbd , textStylingSupport ? true, gettext , dejagnu @@ -86,6 +86,6 @@ stdenv.mkDerivation (finalAttrs: { license = lib.licenses.gpl3Plus; maintainers = with lib.maintainers; [ AndersonTorres kira-bruneau ]; platforms = lib.platforms.unix; - broken = stdenv.isDarwin && stdenv.isAarch64; + broken = stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isAarch64; }; }) diff --git a/pkgs/by-name/po/portablemc/package.nix b/pkgs/by-name/po/portablemc/package.nix index c8faf2b492a6..12872711f56a 100644 --- a/pkgs/by-name/po/portablemc/package.nix +++ b/pkgs/by-name/po/portablemc/package.nix @@ -17,7 +17,7 @@ openal, udev, - textToSpeechSupport ? stdenv.isLinux, + textToSpeechSupport ? stdenv.hostPlatform.isLinux, flite, }: diff --git a/pkgs/by-name/pr/presenterm/package.nix b/pkgs/by-name/pr/presenterm/package.nix index d2915f4f8a13..1ee721828e19 100644 --- a/pkgs/by-name/pr/presenterm/package.nix +++ b/pkgs/by-name/pr/presenterm/package.nix @@ -27,7 +27,7 @@ rustPlatform.buildRustPackage rec { # Crashes at runtime on darwin with: # Library not loaded: .../out/lib/libsixel.1.dylib - buildFeatures = lib.optionals (!stdenv.isDarwin) [ "sixel" ]; + buildFeatures = lib.optionals (!stdenv.hostPlatform.isDarwin) [ "sixel" ]; passthru = { updateScript = nix-update-script { }; diff --git a/pkgs/by-name/pr/prismlauncher-unwrapped/package.nix b/pkgs/by-name/pr/prismlauncher-unwrapped/package.nix index 2a0850069317..e5fb12a80c14 100644 --- a/pkgs/by-name/pr/prismlauncher-unwrapped/package.nix +++ b/pkgs/by-name/pr/prismlauncher-unwrapped/package.nix @@ -17,7 +17,7 @@ zlib, msaClientID ? null, - gamemodeSupport ? stdenv.isLinux, + gamemodeSupport ? stdenv.hostPlatform.isLinux, }: let @@ -30,7 +30,7 @@ let in assert lib.assertMsg ( - gamemodeSupport -> stdenv.isLinux + gamemodeSupport -> stdenv.hostPlatform.isLinux ) "gamemodeSupport is only available on Linux."; stdenv.mkDerivation (finalAttrs: { @@ -66,10 +66,10 @@ stdenv.mkDerivation (finalAttrs: { tomlplusplus zlib ] - ++ lib.optionals stdenv.isDarwin [ darwin.apple_sdk.frameworks.Cocoa ] + ++ lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.Cocoa ] ++ lib.optional gamemodeSupport gamemode; - hardeningEnable = lib.optionals stdenv.isLinux [ "pie" ]; + hardeningEnable = lib.optionals stdenv.hostPlatform.isLinux [ "pie" ]; cmakeFlags = [ @@ -82,7 +82,7 @@ stdenv.mkDerivation (finalAttrs: { ++ lib.optionals (lib.versionOlder kdePackages.qtbase.version "6") [ (lib.cmakeFeature "Launcher_QT_VERSION_MAJOR" "5") ] - ++ lib.optionals stdenv.isDarwin [ + ++ lib.optionals stdenv.hostPlatform.isDarwin [ # we wrap our binary manually (lib.cmakeFeature "INSTALL_BUNDLE" "nodeps") # disable built-in updater diff --git a/pkgs/by-name/pr/prismlauncher/package.nix b/pkgs/by-name/pr/prismlauncher/package.nix index b58622271b6e..ab9b7144b922 100644 --- a/pkgs/by-name/pr/prismlauncher/package.nix +++ b/pkgs/by-name/pr/prismlauncher/package.nix @@ -31,23 +31,23 @@ additionalLibs ? [ ], additionalPrograms ? [ ], - controllerSupport ? stdenv.isLinux, - gamemodeSupport ? stdenv.isLinux, + controllerSupport ? stdenv.hostPlatform.isLinux, + gamemodeSupport ? stdenv.hostPlatform.isLinux, jdks ? [ jdk21 jdk17 jdk8 ], msaClientID ? null, - textToSpeechSupport ? stdenv.isLinux, + textToSpeechSupport ? stdenv.hostPlatform.isLinux, }: assert lib.assertMsg ( - controllerSupport -> stdenv.isLinux + controllerSupport -> stdenv.hostPlatform.isLinux ) "controllerSupport only has an effect on Linux."; assert lib.assertMsg ( - textToSpeechSupport -> stdenv.isLinux + textToSpeechSupport -> stdenv.hostPlatform.isLinux ) "textToSpeechSupport only has an effect on Linux."; let @@ -67,7 +67,7 @@ symlinkJoin { kdePackages.qtsvg ] ++ lib.optional ( - lib.versionAtLeast kdePackages.qtbase.version "6" && stdenv.isLinux + lib.versionAtLeast kdePackages.qtbase.version "6" && stdenv.hostPlatform.isLinux ) kdePackages.qtwayland; postBuild = '' @@ -114,7 +114,7 @@ symlinkJoin { in [ "--prefix PRISMLAUNCHER_JAVA_PATHS : ${lib.makeSearchPath "bin/java" jdks}" ] - ++ lib.optionals stdenv.isLinux [ + ++ lib.optionals stdenv.hostPlatform.isLinux [ "--set LD_LIBRARY_PATH ${addDriverRunpath.driverLink}/lib:${lib.makeLibraryPath runtimeLibs}" "--prefix PATH : ${lib.makeBinPath runtimePrograms}" ]; diff --git a/pkgs/by-name/pr/probe-rs-tools/package.nix b/pkgs/by-name/pr/probe-rs-tools/package.nix index 64b014517c63..b072922e732f 100644 --- a/pkgs/by-name/pr/probe-rs-tools/package.nix +++ b/pkgs/by-name/pr/probe-rs-tools/package.nix @@ -34,9 +34,9 @@ rustPlatform.buildRustPackage rec { # https://github.com/probe-rs/probe-rs/pull/2492 gitMinimal pkg-config - ] ++ lib.optionals stdenv.isDarwin [ DarwinTools ]; + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ DarwinTools ]; - buildInputs = [ libusb1 openssl ] ++ lib.optionals stdenv.isDarwin [ AppKit ]; + buildInputs = [ libusb1 openssl ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ AppKit ]; checkFlags = [ # require a physical probe diff --git a/pkgs/by-name/pr/prometheus-node-exporter/package.nix b/pkgs/by-name/pr/prometheus-node-exporter/package.nix index 7ddf75a893aa..5f1e9c50cc6b 100644 --- a/pkgs/by-name/pr/prometheus-node-exporter/package.nix +++ b/pkgs/by-name/pr/prometheus-node-exporter/package.nix @@ -17,7 +17,7 @@ buildGoModule rec { # FIXME: tests fail due to read-only nix store doCheck = false; - buildInputs = lib.optionals stdenv.isDarwin (with darwin.apple_sdk.frameworks; [ CoreFoundation IOKit ]); + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin (with darwin.apple_sdk.frameworks; [ CoreFoundation IOKit ]); excludedPackages = [ "docs/node-mixin" ]; diff --git a/pkgs/by-name/pr/proto/package.nix b/pkgs/by-name/pr/proto/package.nix index 733567311649..dcd22825f736 100644 --- a/pkgs/by-name/pr/proto/package.nix +++ b/pkgs/by-name/pr/proto/package.nix @@ -21,7 +21,7 @@ rustPlatform.buildRustPackage rec { cargoHash = "sha256-yPXf6f4dwCaT0nKDWiZ+FIvOyWB/WqiwKi1b/rBtNIQ="; - buildInputs = lib.optionals stdenv.isDarwin [ + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.SystemConfiguration libiconv ]; diff --git a/pkgs/by-name/pr/protoc-gen-js/package.nix b/pkgs/by-name/pr/protoc-gen-js/package.nix index 5f3a592e0faa..debf368cdf19 100644 --- a/pkgs/by-name/pr/protoc-gen-js/package.nix +++ b/pkgs/by-name/pr/protoc-gen-js/package.nix @@ -17,7 +17,7 @@ buildBazelPackage rec { removeRulesCC = false; removeLocalConfigCC = false; - LIBTOOL = lib.optionalString stdenv.isDarwin "${cctools}/bin/libtool"; + LIBTOOL = lib.optionalString stdenv.hostPlatform.isDarwin "${cctools}/bin/libtool"; fetchAttrs.hash = "sha256-WOBlZ0XNrl5UxIaSDxZeOfzS2a8ZkrKdTLKHBDC9UNQ="; diff --git a/pkgs/by-name/pr/protonmail-desktop/package.nix b/pkgs/by-name/pr/protonmail-desktop/package.nix index 2d937677045d..a5dd3ce319f8 100644 --- a/pkgs/by-name/pr/protonmail-desktop/package.nix +++ b/pkgs/by-name/pr/protonmail-desktop/package.nix @@ -25,7 +25,7 @@ stdenv.mkDerivation rec { src = fetchurl { url = - if stdenv.isDarwin then + if stdenv.hostPlatform.isDarwin then "https://github.com/ProtonMail/inbox-desktop/releases/download/${version}/Proton.Mail-darwin-universal-${version}.zip" else "https://github.com/ProtonMail/inbox-desktop/releases/download/${version}/proton-mail_${version}_amd64.deb"; @@ -38,14 +38,14 @@ stdenv.mkDerivation rec { .${stdenv.hostPlatform.system} or (throw "unsupported system ${stdenv.hostPlatform.system}"); }; - sourceRoot = lib.optionalString stdenv.isDarwin "."; + sourceRoot = lib.optionalString stdenv.hostPlatform.isDarwin "."; dontConfigure = true; dontBuild = true; nativeBuildInputs = [ makeWrapper - ] ++ lib.optional stdenv.isLinux dpkg ++ lib.optional stdenv.isDarwin unzip; + ] ++ lib.optional stdenv.hostPlatform.isLinux dpkg ++ lib.optional stdenv.hostPlatform.isDarwin unzip; installPhase = let @@ -65,12 +65,12 @@ stdenv.mkDerivation rec { '' runHook preInstall - ${if stdenv.isDarwin then darwin else linux} + ${if stdenv.hostPlatform.isDarwin then darwin else linux} runHook postInstall ''; - preFixup = lib.optionalString stdenv.isLinux '' + preFixup = lib.optionalString stdenv.hostPlatform.isLinux '' makeWrapper ${lib.getExe electron} $out/bin/${mainProgram} \ --add-flags $out/share/app.asar \ --add-flags "\''${NIXOS_OZONE_WL:+\''${WAYLAND_DISPLAY:+--ozone-platform-hint=auto --enable-features=WaylandWindowDecorations}}" \ diff --git a/pkgs/by-name/pr/prr/package.nix b/pkgs/by-name/pr/prr/package.nix index 46576e1a1822..ba07cd6fe0c9 100644 --- a/pkgs/by-name/pr/prr/package.nix +++ b/pkgs/by-name/pr/prr/package.nix @@ -20,7 +20,7 @@ rustPlatform.buildRustPackage rec { cargoHash = "sha256-vCZjgmBYO+I6MZLCOMp50bWEeHwLbZsxSz5gRmBykvI="; - buildInputs = [ openssl ] ++ lib.optionals stdenv.isDarwin [ + buildInputs = [ openssl ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.Security darwin.apple_sdk.frameworks.SystemConfiguration ]; diff --git a/pkgs/by-name/pt/pterm/package.nix b/pkgs/by-name/pt/pterm/package.nix index c0d96e44f124..463a05ac0697 100644 --- a/pkgs/by-name/pt/pterm/package.nix +++ b/pkgs/by-name/pt/pterm/package.nix @@ -43,6 +43,6 @@ stdenv.mkDerivation rec { maintainers = with maintainers; [ sarcasticadmin ]; mainProgram = "pterm"; platforms = platforms.unix; - broken = stdenv.isDarwin; + broken = stdenv.hostPlatform.isDarwin; }; } diff --git a/pkgs/by-name/pw/pwndbg/package.nix b/pkgs/by-name/pw/pwndbg/package.nix index bad009b07ab2..5c612e7bfaa9 100644 --- a/pkgs/by-name/pw/pwndbg/package.nix +++ b/pkgs/by-name/pw/pwndbg/package.nix @@ -12,7 +12,7 @@ let binPath = lib.makeBinPath ([ python3.pkgs.pwntools # ref: https://github.com/pwndbg/pwndbg/blob/2022.12.19/pwndbg/wrappers/checksec.py#L8 - ] ++ lib.optionals stdenv.isLinux [ + ] ++ lib.optionals stdenv.hostPlatform.isLinux [ python3.pkgs.ropper # ref: https://github.com/pwndbg/pwndbg/blob/2022.12.19/pwndbg/commands/ropper.py#L30 python3.pkgs.ropgadget # ref: https://github.com/pwndbg/pwndbg/blob/2022.12.19/pwndbg/commands/rop.py#L32 ]); @@ -64,6 +64,6 @@ stdenv.mkDerivation { platforms = platforms.all; maintainers = with maintainers; [ mic92 patryk4815 msanft ]; # not supported on aarch64-darwin see: https://inbox.sourceware.org/gdb/3185c3b8-8a91-4beb-a5d5-9db6afb93713@Spark/ - broken = stdenv.isDarwin && stdenv.isAarch64; + broken = stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isAarch64; }; } diff --git a/pkgs/by-name/py/pylyzer/package.nix b/pkgs/by-name/py/pylyzer/package.nix index 6646a3b6d0b7..14b6608113d3 100644 --- a/pkgs/by-name/py/pylyzer/package.nix +++ b/pkgs/by-name/py/pylyzer/package.nix @@ -36,9 +36,9 @@ rustPlatform.buildRustPackage rec { git python3 makeWrapper - ] ++ lib.optionals stdenv.isDarwin [ (writeScriptBin "diskutil" "") ]; + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ (writeScriptBin "diskutil" "") ]; - buildInputs = [ python3 ] ++ lib.optionals stdenv.isDarwin [ darwin.apple_sdk.frameworks.Security ]; + buildInputs = [ python3 ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.Security ]; preBuild = '' export HOME=$TMPDIR diff --git a/pkgs/by-name/py/pyxel/package.nix b/pkgs/by-name/py/pyxel/package.nix index 23a7836164e4..1103dbba4619 100644 --- a/pkgs/by-name/py/pyxel/package.nix +++ b/pkgs/by-name/py/pyxel/package.nix @@ -46,7 +46,7 @@ python3.pkgs.buildPythonApplication rec { buildInputs = [ SDL2 ] - ++ lib.optionals stdenv.isDarwin [ + ++ lib.optionals stdenv.hostPlatform.isDarwin [ libiconv darwin.apple_sdk.frameworks.IOKit ]; diff --git a/pkgs/by-name/qg/qgrep/package.nix b/pkgs/by-name/qg/qgrep/package.nix index 57c3d20db283..f485aa0d9147 100644 --- a/pkgs/by-name/qg/qgrep/package.nix +++ b/pkgs/by-name/qg/qgrep/package.nix @@ -25,12 +25,12 @@ stdenv.mkDerivation rec { }) ]; - buildInputs = lib.optionals stdenv.isDarwin [ + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.CoreServices darwin.apple_sdk.frameworks.CoreFoundation ]; - env.NIX_CFLAGS_COMPILE = toString (lib.optionals stdenv.isDarwin [ + env.NIX_CFLAGS_COMPILE = toString (lib.optionals stdenv.hostPlatform.isDarwin [ "-Wno-error=unused-command-line-argument" "-Wno-error=unqualified-std-cast-call" ]); diff --git a/pkgs/by-name/qs/qsv/package.nix b/pkgs/by-name/qs/qsv/package.nix index ba0280c19bd8..c59ad323f86b 100644 --- a/pkgs/by-name/qs/qsv/package.nix +++ b/pkgs/by-name/qs/qsv/package.nix @@ -41,7 +41,7 @@ rustPlatform.buildRustPackage { sqlite zstd ] - ++ lib.optionals stdenv.isDarwin ( + ++ lib.optionals stdenv.hostPlatform.isDarwin ( with darwin.apple_sdk.frameworks; [ AppKit diff --git a/pkgs/by-name/qt/qtalarm/package.nix b/pkgs/by-name/qt/qtalarm/package.nix index f66c1040e5a2..457e6d1659c0 100644 --- a/pkgs/by-name/qt/qtalarm/package.nix +++ b/pkgs/by-name/qt/qtalarm/package.nix @@ -30,7 +30,7 @@ stdenv.mkDerivation (finalAttrs: { runHook preInstall '' + ( - if stdenv.isDarwin then + if stdenv.hostPlatform.isDarwin then '' mkdir -p $out/Applications mv qtalarm.app $out/Applications diff --git a/pkgs/by-name/qu/quickemu/package.nix b/pkgs/by-name/qu/quickemu/package.nix index 35ffc1694fef..cfd3838c9c51 100644 --- a/pkgs/by-name/qu/quickemu/package.nix +++ b/pkgs/by-name/qu/quickemu/package.nix @@ -48,7 +48,7 @@ let xrandr zsync ] - ++ lib.optionals stdenv.isLinux [ + ++ lib.optionals stdenv.hostPlatform.isLinux [ mesa-demos usbutils xdg-user-dirs diff --git a/pkgs/by-name/qu/quickjs-ng/package.nix b/pkgs/by-name/qu/quickjs-ng/package.nix index 35a71244cab6..6e434e9d9a99 100644 --- a/pkgs/by-name/qu/quickjs-ng/package.nix +++ b/pkgs/by-name/qu/quickjs-ng/package.nix @@ -29,7 +29,7 @@ stdenv.mkDerivation (finalAttrs: { (lib.cmakeBool "BUILD_STATIC_QJS_EXE" stdenv.hostPlatform.isStatic) ]; - env.NIX_CFLAGS_COMPILE = toString (lib.optionals (stdenv.isLinux && stdenv.isAarch64) [ + env.NIX_CFLAGS_COMPILE = toString (lib.optionals (stdenv.hostPlatform.isLinux && stdenv.hostPlatform.isAarch64) [ "-Wno-error=stringop-overflow" ]); diff --git a/pkgs/by-name/qu/quickjs/package.nix b/pkgs/by-name/qu/quickjs/package.nix index 447f486a0914..1366fd03cd55 100644 --- a/pkgs/by-name/qu/quickjs/package.nix +++ b/pkgs/by-name/qu/quickjs/package.nix @@ -13,7 +13,7 @@ stdenv.mkDerivation rec { hash = "sha256-PEv4+JW/pUvrSGyNEhgRJ3Hs/FrDvhA2hR70FWghLgM="; }; - postPatch = lib.optionalString stdenv.isDarwin '' + postPatch = lib.optionalString stdenv.hostPlatform.isDarwin '' substituteInPlace Makefile --replace "CONFIG_LTO=y" "" ''; diff --git a/pkgs/by-name/r0/r0vm/package.nix b/pkgs/by-name/r0/r0vm/package.nix index 36789e41921b..e47a41260b60 100644 --- a/pkgs/by-name/r0/r0vm/package.nix +++ b/pkgs/by-name/r0/r0vm/package.nix @@ -27,7 +27,7 @@ rustPlatform.buildRustPackage rec { buildInputs = [ openssl.dev - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.SystemConfiguration ]; diff --git a/pkgs/by-name/ra/rage/package.nix b/pkgs/by-name/ra/rage/package.nix index a6024ace3176..0c41c5a55368 100644 --- a/pkgs/by-name/ra/rage/package.nix +++ b/pkgs/by-name/ra/rage/package.nix @@ -23,7 +23,7 @@ rustPlatform.buildRustPackage rec { installShellFiles ]; - buildInputs = lib.optionals stdenv.isDarwin [ + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.Foundation ]; diff --git a/pkgs/by-name/ra/railway/package.nix b/pkgs/by-name/ra/railway/package.nix index 2e7cf3d90e05..ce17913cd06b 100644 --- a/pkgs/by-name/ra/railway/package.nix +++ b/pkgs/by-name/ra/railway/package.nix @@ -27,7 +27,7 @@ rustPlatform.buildRustPackage rec { buildInputs = [ openssl ] - ++ lib.optionals stdenv.isDarwin [ + ++ lib.optionals stdenv.hostPlatform.isDarwin [ CoreServices Security SystemConfiguration diff --git a/pkgs/by-name/ra/raspberrypi-eeprom/package.nix b/pkgs/by-name/ra/raspberrypi-eeprom/package.nix index 8f46010cce05..5d4580e46f25 100644 --- a/pkgs/by-name/ra/raspberrypi-eeprom/package.nix +++ b/pkgs/by-name/ra/raspberrypi-eeprom/package.nix @@ -48,7 +48,7 @@ stdenvNoCC.mkDerivation (finalAttrs: { for i in rpi-eeprom-update rpi-eeprom-config; do wrapProgram $out/bin/$i \ --set FIRMWARE_ROOT "$out/lib/firmware/raspberrypi/bootloader" \ - ${lib.optionalString stdenvNoCC.isAarch64 "--set VCMAILBOX ${libraspberrypi}/bin/vcmailbox"} \ + ${lib.optionalString stdenvNoCC.hostPlatform.isAarch64 "--set VCMAILBOX ${libraspberrypi}/bin/vcmailbox"} \ --prefix PATH : "${lib.makeBinPath ([ binutils-unwrapped findutils @@ -56,7 +56,7 @@ stdenvNoCC.mkDerivation (finalAttrs: { kmod pciutils (placeholder "out") - ] ++ lib.optionals stdenvNoCC.isAarch64 [ + ] ++ lib.optionals stdenvNoCC.hostPlatform.isAarch64 [ libraspberrypi ])}" done diff --git a/pkgs/by-name/ra/rathole/package.nix b/pkgs/by-name/ra/rathole/package.nix index 38d163daf8d8..51bc1cfedd55 100644 --- a/pkgs/by-name/ra/rathole/package.nix +++ b/pkgs/by-name/ra/rathole/package.nix @@ -26,7 +26,7 @@ rustPlatform.buildRustPackage { buildInputs = [ openssl - ] ++ lib.optionals stdenv.isDarwin (with darwin.apple_sdk.frameworks; [ CoreServices ]); + ] ++ lib.optionals stdenv.hostPlatform.isDarwin (with darwin.apple_sdk.frameworks; [ CoreServices ]); __darwinAllowLocalNetworking = true; diff --git a/pkgs/by-name/ra/rav1e/package.nix b/pkgs/by-name/ra/rav1e/package.nix index 50cf9bef9e1e..e8834ac131e4 100644 --- a/pkgs/by-name/ra/rav1e/package.nix +++ b/pkgs/by-name/ra/rav1e/package.nix @@ -37,14 +37,14 @@ rustPlatform.buildRustPackage rec { buildInputs = [ zlib ] - ++ lib.optionals stdenv.isDarwin [ + ++ lib.optionals stdenv.hostPlatform.isDarwin [ libiconv darwin.apple_sdk.frameworks.Security ]; # Darwin uses `llvm-strip`, which results in link errors when using `-x` to strip the asm library # and linking it with cctools ld64. - postPatch = lib.optionalString (stdenv.isDarwin && stdenv.isx86_64) '' + postPatch = lib.optionalString (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isx86_64) '' substituteInPlace build.rs --replace-fail '.arg("-x")' '.arg("-S")' # Thin LTO doesn’t appear to work with Rust 1.79. rav1e fail to build when building fern. substituteInPlace Cargo.toml --replace-fail 'lto = "thin"' 'lto = "fat"' diff --git a/pkgs/by-name/rc/rcp/package.nix b/pkgs/by-name/rc/rcp/package.nix index bafdf95b073f..bc4be1730178 100644 --- a/pkgs/by-name/rc/rcp/package.nix +++ b/pkgs/by-name/rc/rcp/package.nix @@ -16,7 +16,7 @@ rustPlatform.buildRustPackage rec { hash = "sha256-INLXVruiaK5yv5old0NOWFcg9y13M6Dm7bBMmcPFY1I="; }; - buildInputs = lib.optionals stdenv.isDarwin (with darwin.apple_sdk.frameworks; [ + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin (with darwin.apple_sdk.frameworks; [ IOKit ]); @@ -37,6 +37,6 @@ rustPlatform.buildRustPackage rec { mainProgram = "rcp"; maintainers = with maintainers; [ wykurz ]; # = note: Undefined symbols for architecture x86_64: "_utimensat" - broken = stdenv.isDarwin && stdenv.isx86_64; + broken = stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isx86_64; }; } diff --git a/pkgs/by-name/re/realm/package.nix b/pkgs/by-name/re/realm/package.nix index e76189e1ac8d..34914df2987e 100644 --- a/pkgs/by-name/re/realm/package.nix +++ b/pkgs/by-name/re/realm/package.nix @@ -20,7 +20,7 @@ rustPlatform.buildRustPackage rec { cargoHash = "sha256-EvXafTujqTdQwfK4NXgT7lGKGnrpyP9ouplD6DmJUKU="; - buildInputs = lib.optionals stdenv.isDarwin [ + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.Security ]; diff --git a/pkgs/by-name/re/realvnc-vnc-viewer/package.nix b/pkgs/by-name/re/realvnc-vnc-viewer/package.nix index 6e1dc6762b14..d6a916df0ae0 100644 --- a/pkgs/by-name/re/realvnc-vnc-viewer/package.nix +++ b/pkgs/by-name/re/realvnc-vnc-viewer/package.nix @@ -20,5 +20,5 @@ let mainProgram = "vncviewer"; }; in -if stdenv.isDarwin then callPackage ./darwin.nix { inherit pname version meta; } +if stdenv.hostPlatform.isDarwin then callPackage ./darwin.nix { inherit pname version meta; } else callPackage ./linux.nix { inherit pname version meta; } diff --git a/pkgs/by-name/re/redict/package.nix b/pkgs/by-name/re/redict/package.nix index 54820d6eb096..a916cfcd3ba7 100644 --- a/pkgs/by-name/re/redict/package.nix +++ b/pkgs/by-name/re/redict/package.nix @@ -37,7 +37,7 @@ stdenv.mkDerivation (finalAttrs: { ++ lib.optional withSystemd systemd ++ lib.optionals tlsSupport [ openssl ]; - preBuild = lib.optionalString stdenv.isDarwin '' + preBuild = lib.optionalString stdenv.hostPlatform.isDarwin '' substituteInPlace src/Makefile --replace "-flto" "" ''; @@ -49,12 +49,12 @@ stdenv.mkDerivation (finalAttrs: { enableParallelBuilding = true; - hardeningEnable = lib.optionals (!stdenv.isDarwin) [ "pie" ]; + hardeningEnable = lib.optionals (!stdenv.hostPlatform.isDarwin) [ "pie" ]; env.NIX_CFLAGS_COMPILE = toString (lib.optionals stdenv.cc.isClang [ "-std=c11" ]); # darwin currently lacks a pure `pgrep` which is extensively used here - doCheck = !stdenv.isDarwin; + doCheck = !stdenv.hostPlatform.isDarwin; nativeCheckInputs = [ which tcl ps ] ++ lib.optionals stdenv.hostPlatform.isStatic [ getconf ]; checkPhase = '' runHook preCheck diff --git a/pkgs/by-name/re/redlib/package.nix b/pkgs/by-name/re/redlib/package.nix index c1c661a9a330..51c80078e372 100644 --- a/pkgs/by-name/re/redlib/package.nix +++ b/pkgs/by-name/re/redlib/package.nix @@ -20,7 +20,7 @@ rustPlatform.buildRustPackage rec { cargoHash = "sha256-XSmeJAK18J9WxrG5orFbAB9hWVLQQ50oB223oHT3OOk="; - buildInputs = lib.optionals stdenv.isDarwin [ + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.Security ]; diff --git a/pkgs/by-name/re/refind/package.nix b/pkgs/by-name/re/refind/package.nix index 9c4cda573e58..2958d3be85fd 100644 --- a/pkgs/by-name/re/refind/package.nix +++ b/pkgs/by-name/re/refind/package.nix @@ -52,7 +52,7 @@ stdenv.mkDerivation rec { "EFICRT0=${gnu-efi}/lib" "HOSTARCH=${hostarch}" "ARCH=${hostarch}" - ] ++ lib.optional stdenv.isAarch64 [ + ] ++ lib.optional stdenv.hostPlatform.isAarch64 [ # aarch64 is special for GNU-EFI, see BUILDING.txt "GNUEFI_ARM64_TARGET_SUPPORT=y" ]; diff --git a/pkgs/by-name/re/refinery-cli/package.nix b/pkgs/by-name/re/refinery-cli/package.nix index c70e69bee988..59a5dd255ba6 100644 --- a/pkgs/by-name/re/refinery-cli/package.nix +++ b/pkgs/by-name/re/refinery-cli/package.nix @@ -15,7 +15,7 @@ rustPlatform.buildRustPackage rec { nativeBuildInputs = [ pkg-config ]; buildInputs = [ openssl ] - ++ lib.optionals stdenv.isDarwin [ darwin.apple_sdk.frameworks.SystemConfiguration ]; + ++ lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.SystemConfiguration ]; meta = with lib; { description = "Run migrations for the Refinery ORM for Rust via the CLI"; diff --git a/pkgs/by-name/re/release-plz/package.nix b/pkgs/by-name/re/release-plz/package.nix index da5b97c8ef47..d176accf9d56 100644 --- a/pkgs/by-name/re/release-plz/package.nix +++ b/pkgs/by-name/re/release-plz/package.nix @@ -41,6 +41,6 @@ rustPlatform.buildRustPackage rec { license = with lib.licenses; [ asl20 mit ]; maintainers = with lib.maintainers; [ dannixon ]; mainProgram = "release-plz"; - broken = stdenv.isDarwin; + broken = stdenv.hostPlatform.isDarwin; }; } diff --git a/pkgs/by-name/re/remind/package.nix b/pkgs/by-name/re/remind/package.nix index 78ae694b1659..2f630416995b 100644 --- a/pkgs/by-name/re/remind/package.nix +++ b/pkgs/by-name/re/remind/package.nix @@ -38,7 +38,7 @@ tcl.mkTclDerivation rec { --replace-fail 'set Rem2PDF "rem2pdf"' "set Rem2PDF \"$out/bin/rem2pdf\"" ''; - env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.isDarwin (toString [ + env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.hostPlatform.isDarwin (toString [ # On Darwin setenv and unsetenv are defined in stdlib.h from libSystem "-DHAVE_SETENV" "-DHAVE_UNSETENV" diff --git a/pkgs/by-name/re/rerun/package.nix b/pkgs/by-name/re/rerun/package.nix index 84324b4bb084..41d4f7828884 100644 --- a/pkgs/by-name/re/rerun/package.nix +++ b/pkgs/by-name/re/rerun/package.nix @@ -61,7 +61,7 @@ rustPlatform.buildRustPackage rec { libxkbcommon vulkan-loader ] - ++ lib.optionals stdenv.isDarwin [ + ++ lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.AppKit darwin.apple_sdk.frameworks.CoreFoundation darwin.apple_sdk.frameworks.CoreGraphics @@ -72,7 +72,7 @@ rustPlatform.buildRustPackage rec { darwin.apple_sdk.frameworks.QuartzCore darwin.apple_sdk.frameworks.Security ] - ++ lib.optionals stdenv.isLinux [ (lib.getLib wayland) ]; + ++ lib.optionals stdenv.hostPlatform.isLinux [ (lib.getLib wayland) ]; addDlopenRunpaths = map (p: "${lib.getLib p}/lib") ( lib.optionals stdenv.hostPlatform.isLinux [ diff --git a/pkgs/by-name/re/retool/package.nix b/pkgs/by-name/re/retool/package.nix index a22ce582b9eb..15e2c15a5e85 100644 --- a/pkgs/by-name/re/retool/package.nix +++ b/pkgs/by-name/re/retool/package.nix @@ -29,7 +29,7 @@ python3.pkgs.buildPythonApplication rec { buildInputs = [ qt6.qtbase ] ++ - lib.optionals (stdenv.isLinux) [ + lib.optionals (stdenv.hostPlatform.isLinux) [ qt6.qtwayland ]; diff --git a/pkgs/by-name/re/revolt-desktop/package.nix b/pkgs/by-name/re/revolt-desktop/package.nix index 7d8f0842a7a3..f941225770b2 100644 --- a/pkgs/by-name/re/revolt-desktop/package.nix +++ b/pkgs/by-name/re/revolt-desktop/package.nix @@ -31,7 +31,7 @@ let inherit (prev) pname version; in - if stdenvNoCC.isLinux then + if stdenvNoCC.hostPlatform.isLinux then { src = fetchurl { url = "https://github.com/revoltchat/desktop/releases/download/v${version}/Revolt-linux.AppImage"; @@ -64,7 +64,7 @@ ''; } else - assert stdenvNoCC.isDarwin; + assert stdenvNoCC.hostPlatform.isDarwin; { src = fetchzip { url = "https://github.com/revoltchat/desktop/releases/download/v${version}/Revolt-${version}-mac.zip"; diff --git a/pkgs/by-name/ri/ride/package.nix b/pkgs/by-name/ri/ride/package.nix index 9706b388dbf7..8c9f239dc1d8 100644 --- a/pkgs/by-name/ri/ride/package.nix +++ b/pkgs/by-name/ri/ride/package.nix @@ -89,14 +89,14 @@ buildNpmPackage rec { zip makeWrapper ] - ++ lib.optionals (!stdenv.isDarwin) [ copyDesktopItems ] - ++ lib.optionals stdenv.isDarwin [ cctools ]; + ++ lib.optionals (!stdenv.hostPlatform.isDarwin) [ copyDesktopItems ] + ++ lib.optionals stdenv.hostPlatform.isDarwin [ cctools ]; env.ELECTRON_SKIP_BINARY_DOWNLOAD = "1"; # Fix error: no member named 'aligned_alloc' in the global namespace env.NIX_CFLAGS_COMPILE = lib.optionalString ( - stdenv.isDarwin && lib.versionOlder stdenv.hostPlatform.darwinSdkVersion "11.0" + stdenv.hostPlatform.isDarwin && lib.versionOlder stdenv.hostPlatform.darwinSdkVersion "11.0" ) "-D_LIBCPP_HAS_NO_LIBRARY_ALIGNED_ALLOCATION=1"; npmBuildFlags = platformInfo.buildCmd; @@ -122,7 +122,7 @@ buildNpmPackage rec { install -Dm644 ThirdPartyNotices.txt -t $out/share/doc/ride - ${lib.optionalString (!stdenv.isDarwin) '' + ${lib.optionalString (!stdenv.hostPlatform.isDarwin) '' install -Dm644 $src/D.png $out/share/icons/hicolor/64x64/apps/ride.png install -Dm644 $src/D.svg $out/share/icons/hicolor/scalable/apps/ride.svg @@ -134,7 +134,7 @@ buildNpmPackage rec { --inherit-argv0 ''} - ${lib.optionalString stdenv.isDarwin '' + ${lib.optionalString stdenv.hostPlatform.isDarwin '' mkdir -p $out/Applications cp -r Ride-*.app $out/Applications makeWrapper $out/Applications/Ride-*.app/Contents/MacOS/Ride-* $out/bin/ride diff --git a/pkgs/by-name/ri/ringfairy/package.nix b/pkgs/by-name/ri/ringfairy/package.nix index 1b4295d1f634..67563b58315c 100644 --- a/pkgs/by-name/ri/ringfairy/package.nix +++ b/pkgs/by-name/ri/ringfairy/package.nix @@ -24,7 +24,7 @@ rustPlatform.buildRustPackage { buildInputs = [openssl] - ++ lib.optionals stdenv.isDarwin ( + ++ lib.optionals stdenv.hostPlatform.isDarwin ( with darwin.apple_sdk.frameworks; [ Security SystemConfiguration diff --git a/pkgs/by-name/ri/ripunzip/package.nix b/pkgs/by-name/ri/ripunzip/package.nix index 41d0594ebd5f..b8dfd3ff9c96 100644 --- a/pkgs/by-name/ri/ripunzip/package.nix +++ b/pkgs/by-name/ri/ripunzip/package.nix @@ -24,7 +24,7 @@ rustPlatform.buildRustPackage rec { cargoHash = "sha256-QyVhEHm1W4kb5b4dngBui3lT7vKBGDS5ZObMWua96KM="; buildInputs = [ openssl ] - ++ lib.optionals stdenv.isDarwin (with darwin.apple_sdk.frameworks; [ Security SystemConfiguration ]); + ++ lib.optionals stdenv.hostPlatform.isDarwin (with darwin.apple_sdk.frameworks; [ Security SystemConfiguration ]); nativeBuildInputs = [ pkg-config ]; setupHook = ./setup-hook.sh; diff --git a/pkgs/by-name/rk/rkboot/package.nix b/pkgs/by-name/rk/rkboot/package.nix index 5cf424a43c3a..f352446e7a1b 100644 --- a/pkgs/by-name/rk/rkboot/package.nix +++ b/pkgs/by-name/rk/rkboot/package.nix @@ -19,7 +19,7 @@ stdenv.mkDerivation { do # The proprietary, statically linked binaries to perform boot_merge are # x86_64 only. Though we use box64 to emulate if building on aarch64-linux - ${lib.optionalString stdenv.isAarch64 "${qemu}/bin/qemu-x86_64"} ./tools/boot_merger "$i" || true + ${lib.optionalString stdenv.hostPlatform.isAarch64 "${qemu}/bin/qemu-x86_64"} ./tools/boot_merger "$i" || true done ''; diff --git a/pkgs/by-name/rl/rl_json/package.nix b/pkgs/by-name/rl/rl_json/package.nix index 81076dd07677..ac6e7950f411 100644 --- a/pkgs/by-name/rl/rl_json/package.nix +++ b/pkgs/by-name/rl/rl_json/package.nix @@ -41,6 +41,6 @@ stdenv.mkDerivation (finalAttrs: { maintainers = with lib.maintainers; [ fgaz ]; platforms = tcl.meta.platforms; # From version 0.15.1: 'endian.h' file not found - broken = stdenv.isDarwin; + broken = stdenv.hostPlatform.isDarwin; }; }) diff --git a/pkgs/by-name/rm/rmg/package.nix b/pkgs/by-name/rm/rmg/package.nix index 4dd9ac30d648..50c6e4306ffe 100644 --- a/pkgs/by-name/rm/rmg/package.nix +++ b/pkgs/by-name/rm/rmg/package.nix @@ -73,7 +73,7 @@ stdenv.mkDerivation rec { "-DUSE_ANGRYLION=${lib.boolToString withAngrylionRdpPlus}" ]; - qtWrapperArgs = lib.optionals stdenv.isLinux [ + qtWrapperArgs = lib.optionals stdenv.hostPlatform.isLinux [ "--prefix LD_LIBRARY_PATH : ${lib.makeLibraryPath [ vulkan-loader ]}" ] ++ lib.optional withWayland "--set RMG_WAYLAND 1"; diff --git a/pkgs/by-name/rn/rnote/package.nix b/pkgs/by-name/rn/rnote/package.nix index 792c9faa0450..e2c569131ee2 100644 --- a/pkgs/by-name/rn/rnote/package.nix +++ b/pkgs/by-name/rn/rnote/package.nix @@ -75,9 +75,9 @@ stdenv.mkDerivation rec { libadwaita libxml2 poppler - ] ++ lib.optionals stdenv.isLinux [ + ] ++ lib.optionals stdenv.hostPlatform.isLinux [ alsa-lib - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.AudioUnit ]; @@ -94,6 +94,6 @@ stdenv.mkDerivation rec { maintainers = with maintainers; [ dotlambda gepbird yrd ]; platforms = platforms.unix; # compiler error since 2023-11-17 - broken = stdenv.isDarwin; + broken = stdenv.hostPlatform.isDarwin; }; } diff --git a/pkgs/by-name/ro/robodoc/package.nix b/pkgs/by-name/ro/robodoc/package.nix index bc64a8315fe3..466554811720 100644 --- a/pkgs/by-name/ro/robodoc/package.nix +++ b/pkgs/by-name/ro/robodoc/package.nix @@ -15,7 +15,7 @@ stdenv.mkDerivation (finalAttrs: { hash = "sha256-l3prSdaGhOvXmZfCPbsZJNocO7y20zJjLQpajRTJOqE="; }; - postConfigure = lib.optionalString stdenv.isDarwin '' + postConfigure = lib.optionalString stdenv.hostPlatform.isDarwin '' substituteInPlace Docs/makefile.am \ --replace 'man1_MANS = robodoc.1 robohdrs.1' 'man1_MANS =' ''; diff --git a/pkgs/by-name/ro/rootbar/package.nix b/pkgs/by-name/ro/rootbar/package.nix index a528cd4a94ad..1901a33f11ff 100644 --- a/pkgs/by-name/ro/rootbar/package.nix +++ b/pkgs/by-name/ro/rootbar/package.nix @@ -42,6 +42,6 @@ stdenv.mkDerivation rec { license = licenses.gpl3Plus; maintainers = with maintainers; [ AndersonTorres ]; platforms = platforms.unix; - broken = stdenv.isDarwin; + broken = stdenv.hostPlatform.isDarwin; }; } diff --git a/pkgs/by-name/ro/routinator/package.nix b/pkgs/by-name/ro/routinator/package.nix index e7199164ddd7..14adef52117a 100644 --- a/pkgs/by-name/ro/routinator/package.nix +++ b/pkgs/by-name/ro/routinator/package.nix @@ -18,7 +18,7 @@ rustPlatform.buildRustPackage rec { cargoHash = "sha256-1JxAbQPCQqDVry3wGIdY4q18rzCXlJ7Dnc8LIvhkW1g="; - buildInputs = lib.optionals stdenv.isDarwin (with darwin.apple_sdk.frameworks; [ Security SystemConfiguration ]); + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin (with darwin.apple_sdk.frameworks; [ Security SystemConfiguration ]); meta = with lib; { description = "RPKI Validator written in Rust"; diff --git a/pkgs/by-name/rp/rpi-imager/package.nix b/pkgs/by-name/rp/rpi-imager/package.nix index 05a893cd0536..39a07b53d3c3 100644 --- a/pkgs/by-name/rp/rpi-imager/package.nix +++ b/pkgs/by-name/rp/rpi-imager/package.nix @@ -51,7 +51,7 @@ stdenv.mkDerivation (finalAttrs: { qt5.qttools xz ] - ++ lib.optionals stdenv.isLinux [ + ++ lib.optionals stdenv.hostPlatform.isLinux [ qt5.qtwayland ]; @@ -81,6 +81,6 @@ stdenv.mkDerivation (finalAttrs: { ]; platforms = platforms.all; # does not build on darwin - broken = stdenv.isDarwin; + broken = stdenv.hostPlatform.isDarwin; }; }) diff --git a/pkgs/by-name/rq/rqbit/package.nix b/pkgs/by-name/rq/rqbit/package.nix index d02fe269203b..bdd27f02a896 100644 --- a/pkgs/by-name/rq/rqbit/package.nix +++ b/pkgs/by-name/rq/rqbit/package.nix @@ -18,10 +18,10 @@ rustPlatform.buildRustPackage rec { }; }; - nativeBuildInputs = lib.optionals stdenv.isLinux [ pkg-config ]; + nativeBuildInputs = lib.optionals stdenv.hostPlatform.isLinux [ pkg-config ]; - buildInputs = lib.optionals stdenv.isLinux [ openssl ] - ++ lib.optionals stdenv.isDarwin [ darwin.apple_sdk.frameworks.SystemConfiguration ]; + buildInputs = lib.optionals stdenv.hostPlatform.isLinux [ openssl ] + ++ lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.SystemConfiguration ]; doCheck = false; diff --git a/pkgs/by-name/rr/rrdtool/package.nix b/pkgs/by-name/rr/rrdtool/package.nix index 733b981e4247..1a66700b17d9 100644 --- a/pkgs/by-name/rr/rrdtool/package.nix +++ b/pkgs/by-name/rr/rrdtool/package.nix @@ -28,7 +28,7 @@ perl.pkgs.toPerlModule ( }; # Fix darwin build - patches = lib.optional stdenv.isDarwin (fetchpatch { + patches = lib.optional stdenv.hostPlatform.isDarwin (fetchpatch { url = "https://github.com/oetiker/rrdtool-1.x/pull/1262.patch"; hash = "sha256-aP0rmDlILn6VC8Tg7HpRXbxL9+KD/PRTbXnbQ7HgPEg="; }); @@ -47,7 +47,7 @@ perl.pkgs.toPerlModule ( cairo groff ] - ++ lib.optionals stdenv.isDarwin [ + ++ lib.optionals stdenv.hostPlatform.isDarwin [ tcl darwin.apple_sdk.frameworks.ApplicationServices ]; diff --git a/pkgs/by-name/rs/rs/package.nix b/pkgs/by-name/rs/rs/package.nix index 5edd417375e7..ab5e4fcb4ddd 100644 --- a/pkgs/by-name/rs/rs/package.nix +++ b/pkgs/by-name/rs/rs/package.nix @@ -68,6 +68,6 @@ stdenv.mkDerivation rec { license = licenses.bsd3; maintainers = with maintainers; [ AndersonTorres ]; platforms = platforms.unix; - broken = stdenv.isx86_64 && stdenv.isDarwin; # missing strtonum() + broken = stdenv.hostPlatform.isx86_64 && stdenv.hostPlatform.isDarwin; # missing strtonum() }; } diff --git a/pkgs/by-name/rt/rtl_fm_streamer/package.nix b/pkgs/by-name/rt/rtl_fm_streamer/package.nix index 3e3fcde3b5f9..beb45686508a 100644 --- a/pkgs/by-name/rt/rtl_fm_streamer/package.nix +++ b/pkgs/by-name/rt/rtl_fm_streamer/package.nix @@ -37,7 +37,7 @@ stdenv.mkDerivation (finalAttrs: { ]; cmakeFlags = [ - (lib.cmakeBool "INSTALL_UDEV_RULES" stdenv.isLinux) + (lib.cmakeBool "INSTALL_UDEV_RULES" stdenv.hostPlatform.isLinux) ]; meta = { @@ -45,6 +45,6 @@ stdenv.mkDerivation (finalAttrs: { homepage = "https://github.com/AlbrechtL/rtl_fm_streamer"; license = lib.licenses.gpl2Plus; maintainers = with lib.maintainers; [ doronbehar ]; - broken = stdenv.isDarwin && stdenv.isx86_64; + broken = stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isx86_64; }; }) diff --git a/pkgs/by-name/ru/ruff-lsp/package.nix b/pkgs/by-name/ru/ruff-lsp/package.nix index 7048c95859c8..344dce7755c6 100644 --- a/pkgs/by-name/ru/ruff-lsp/package.nix +++ b/pkgs/by-name/ru/ruff-lsp/package.nix @@ -40,7 +40,7 @@ python3.pkgs.buildPythonApplication rec { ]; # fails in linux sandbox - doCheck = stdenv.isDarwin; + doCheck = stdenv.hostPlatform.isDarwin; nativeCheckInputs = with python3.pkgs; [ pytestCheckHook diff --git a/pkgs/by-name/ru/ruff/package.nix b/pkgs/by-name/ru/ruff/package.nix index ab16ddf240d7..67099b3ecde1 100644 --- a/pkgs/by-name/ru/ruff/package.nix +++ b/pkgs/by-name/ru/ruff/package.nix @@ -35,7 +35,7 @@ rustPlatform.buildRustPackage rec { buildInputs = [ rust-jemalloc-sys - ] ++ lib.optionals stdenv.isDarwin [ darwin.apple_sdk.frameworks.CoreServices ]; + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.CoreServices ]; postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) '' installShellCompletion --cmd ruff \ @@ -53,7 +53,7 @@ rustPlatform.buildRustPackage rec { # Failing on darwin for an unclear reason. # According to the maintainers, those tests are from an experimental crate that isn't actually # used by ruff currently and can thus be safely skipped. - checkFlags = lib.optionals stdenv.isDarwin [ + checkFlags = lib.optionals stdenv.hostPlatform.isDarwin [ "--skip=changed_file" "--skip=changed_metadata" "--skip=changed_versions_file" diff --git a/pkgs/by-name/ru/rustdesk/package.nix b/pkgs/by-name/ru/rustdesk/package.nix index 5b838d39cff8..b038c6c38333 100644 --- a/pkgs/by-name/ru/rustdesk/package.nix +++ b/pkgs/by-name/ru/rustdesk/package.nix @@ -106,7 +106,7 @@ rustPlatform.buildRustPackage rec { wrapGAppsHook3 ]; - buildFeatures = lib.optionals stdenv.isLinux [ "linux-pkg-config" ]; + buildFeatures = lib.optionals stdenv.hostPlatform.isLinux [ "linux-pkg-config" ]; # Checks require an active X server doCheck = false; @@ -136,7 +136,7 @@ rustPlatform.buildRustPackage rec { zlib zstd ] - ++ lib.optionals stdenv.isDarwin ( + ++ lib.optionals stdenv.hostPlatform.isDarwin ( with darwin.apple_sdk.frameworks; [ AppKit @@ -149,7 +149,7 @@ rustPlatform.buildRustPackage rec { SystemConfiguration ] ) - ++ lib.optionals stdenv.isLinux [ + ++ lib.optionals stdenv.hostPlatform.isLinux [ alsa-lib xdotool ]; @@ -161,7 +161,7 @@ rustPlatform.buildRustPackage rec { # .so needs to be next to the executable mv $out/bin/rustdesk $out/lib/rustdesk - ${lib.optionalString stdenv.isLinux "ln -s ${libsciter}/lib/libsciter-gtk.so $out/lib/rustdesk"} + ${lib.optionalString stdenv.hostPlatform.isLinux "ln -s ${libsciter}/lib/libsciter-gtk.so $out/lib/rustdesk"} makeWrapper $out/lib/rustdesk/rustdesk $out/bin/rustdesk \ --chdir "$out/share" @@ -171,7 +171,7 @@ rustPlatform.buildRustPackage rec { install -Dm0644 $src/res/logo.svg $out/share/icons/hicolor/scalable/apps/rustdesk.svg ''; - postFixup = lib.optionalString stdenv.isLinux '' + postFixup = lib.optionalString stdenv.hostPlatform.isLinux '' patchelf --add-rpath "${libayatana-appindicator}/lib" "$out/lib/rustdesk/rustdesk" ''; diff --git a/pkgs/by-name/ru/rusti-cal/package.nix b/pkgs/by-name/ru/rusti-cal/package.nix index 97b5e107314d..f03783cbc5e2 100644 --- a/pkgs/by-name/ru/rusti-cal/package.nix +++ b/pkgs/by-name/ru/rusti-cal/package.nix @@ -18,7 +18,7 @@ rustPlatform.buildRustPackage rec { cargoHash = "sha256-5eS+OMaNAVNyDMKFNfb0J0rLsikw2LCXhWk7MS9UV2k="; - buildInputs = lib.optionals stdenv.isDarwin [ + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.Foundation ]; diff --git a/pkgs/by-name/ru/rustic/package.nix b/pkgs/by-name/ru/rustic/package.nix index 2578991fc8f4..14f1c30ace13 100644 --- a/pkgs/by-name/ru/rustic/package.nix +++ b/pkgs/by-name/ru/rustic/package.nix @@ -34,7 +34,7 @@ rustPlatform.buildRustPackage rec { nativeBuildInputs = [ installShellFiles ]; - buildInputs = lib.optionals stdenv.isDarwin [ + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ Security SystemConfiguration ]; diff --git a/pkgs/by-name/ru/rustlings/package.nix b/pkgs/by-name/ru/rustlings/package.nix index b66d2ced7e12..2d51df275234 100644 --- a/pkgs/by-name/ru/rustlings/package.nix +++ b/pkgs/by-name/ru/rustlings/package.nix @@ -36,7 +36,7 @@ rustPlatform.buildRustPackage { makeWrapper ]; - buildInputs = lib.optionals stdenv.isDarwin (with darwin.apple_sdk.frameworks; [ CoreServices ]); + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin (with darwin.apple_sdk.frameworks; [ CoreServices ]); postFixup = '' wrapProgram $out/bin/rustlings --suffix PATH : ${ diff --git a/pkgs/by-name/ru/rustls-ffi/package.nix b/pkgs/by-name/ru/rustls-ffi/package.nix index 015a3b9a72c9..e5317b40b78c 100644 --- a/pkgs/by-name/ru/rustls-ffi/package.nix +++ b/pkgs/by-name/ru/rustls-ffi/package.nix @@ -30,7 +30,7 @@ stdenv.mkDerivation (finalAttrs: { hash = "sha256-gDQ9AFrJuV7SrzKCAHQBkKj6clXuPLO0DHhnvcBqRLs="; }; - propagatedBuildInputs = lib.optionals stdenv.isDarwin [ libiconv darwin.apple_sdk.frameworks.Security ]; + propagatedBuildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ libiconv darwin.apple_sdk.frameworks.Security ]; nativeBuildInputs = [ cargo rustPlatform.cargoSetupHook cargo-c validatePkgConfig ]; diff --git a/pkgs/by-name/ru/rustmission/package.nix b/pkgs/by-name/ru/rustmission/package.nix index 8e8a21d8596b..241a0b71dc63 100644 --- a/pkgs/by-name/ru/rustmission/package.nix +++ b/pkgs/by-name/ru/rustmission/package.nix @@ -23,7 +23,7 @@ rustPlatform.buildRustPackage rec { nativeBuildInputs = [ pkg-config ]; buildInputs = [ openssl ] - ++ lib.optionals stdenv.isDarwin [ + ++ lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.CoreFoundation darwin.apple_sdk.frameworks.Security darwin.apple_sdk.frameworks.SystemConfiguration diff --git a/pkgs/by-name/ry/rye/package.nix b/pkgs/by-name/ry/rye/package.nix index 3719ae8988e8..c04802847f16 100644 --- a/pkgs/by-name/ry/rye/package.nix +++ b/pkgs/by-name/ry/rye/package.nix @@ -48,7 +48,7 @@ rustPlatform.buildRustPackage rec { buildInputs = [ openssl ] - ++ lib.optionals stdenv.isDarwin ( + ++ lib.optionals stdenv.hostPlatform.isDarwin ( with darwin.apple_sdk; [ frameworks.CoreServices diff --git a/pkgs/by-name/s3/s3proxy/package.nix b/pkgs/by-name/s3/s3proxy/package.nix index 72f18af79cc1..d24f3728da11 100644 --- a/pkgs/by-name/s3/s3proxy/package.nix +++ b/pkgs/by-name/s3/s3proxy/package.nix @@ -21,7 +21,7 @@ maven.buildMavenPackage { hash = "sha256-GhZPvo8wlXInHwg8rSmpwMMkZVw5SMpnZyKqFUYLbrE="; }; - doCheck = !stdenv.isDarwin; + doCheck = !stdenv.hostPlatform.isDarwin; nativeBuildInputs = [ makeWrapper ]; diff --git a/pkgs/by-name/sa/saga/package.nix b/pkgs/by-name/sa/saga/package.nix index 43af7ef6b649..ae4670a002bb 100644 --- a/pkgs/by-name/sa/saga/package.nix +++ b/pkgs/by-name/sa/saga/package.nix @@ -43,7 +43,7 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ cmake pkg-config - ] ++ lib.optional stdenv.isDarwin desktopToDarwinBundle; + ] ++ lib.optional stdenv.hostPlatform.isDarwin desktopToDarwinBundle; buildInputs = [ curl @@ -65,7 +65,7 @@ stdenv.mkDerivation rec { ] # See https://groups.google.com/forum/#!topic/nix-devel/h_vSzEJAPXs # for why the have additional buildInputs on darwin - ++ lib.optionals stdenv.isDarwin [ + ++ lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.Cocoa unixODBC poppler @@ -74,7 +74,7 @@ stdenv.mkDerivation rec { ]; cmakeFlags = [ - (lib.cmakeBool "OpenMP_SUPPORT" (!stdenv.isDarwin)) + (lib.cmakeBool "OpenMP_SUPPORT" (!stdenv.hostPlatform.isDarwin)) ]; meta = with lib; { diff --git a/pkgs/by-name/sa/salmon/package.nix b/pkgs/by-name/sa/salmon/package.nix index 09a2fec4c257..bfc12deedd6b 100644 --- a/pkgs/by-name/sa/salmon/package.nix +++ b/pkgs/by-name/sa/salmon/package.nix @@ -52,7 +52,7 @@ stdenv.mkDerivation (finalAttrs: { tbb_2021_11 xz zlib - ] ++ lib.optionals stdenv.isDarwin [ libiconv ]; + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ libiconv ]; nativeBuildInputs = [ cmake pkg-config ]; diff --git a/pkgs/by-name/sa/sanjuuni/package.nix b/pkgs/by-name/sa/sanjuuni/package.nix index 231714941462..f8577d3b8a15 100644 --- a/pkgs/by-name/sa/sanjuuni/package.nix +++ b/pkgs/by-name/sa/sanjuuni/package.nix @@ -52,7 +52,7 @@ stdenv.mkDerivation rec { changelog = "https://github.com/MCJack123/sanjuuni/releases/tag/${version}"; maintainers = [ maintainers.tomodachi94 ]; license = licenses.gpl2Plus; - broken = stdenv.isDarwin; + broken = stdenv.hostPlatform.isDarwin; mainProgram = "sanjuuni"; }; } diff --git a/pkgs/by-name/sa/sarif-fmt/package.nix b/pkgs/by-name/sa/sarif-fmt/package.nix index 37e59c4a332b..6e3a236ed4e9 100644 --- a/pkgs/by-name/sa/sarif-fmt/package.nix +++ b/pkgs/by-name/sa/sarif-fmt/package.nix @@ -20,7 +20,7 @@ rustPlatform.buildRustPackage rec { # `test_clippy` (the only test we enable) is broken on Darwin # because `--enable-profiler` is not enabled in rustc on Darwin # error[E0463]: can't find crate for profiler_builtins - doCheck = !stdenv.isDarwin; + doCheck = !stdenv.hostPlatform.isDarwin; checkFlags = [ # these tests use nix so...no go diff --git a/pkgs/by-name/sc/schemamap/package.nix b/pkgs/by-name/sc/schemamap/package.nix index 95908de6e1c6..081cee9a23f6 100644 --- a/pkgs/by-name/sc/schemamap/package.nix +++ b/pkgs/by-name/sc/schemamap/package.nix @@ -28,7 +28,7 @@ rustPlatform.buildRustPackage rec { buildInputs = [ openssl ] - ++ lib.optionals stdenv.isDarwin ( + ++ lib.optionals stdenv.hostPlatform.isDarwin ( with darwin.apple_sdk; [ frameworks.Security diff --git a/pkgs/by-name/sc/scrcpy/package.nix b/pkgs/by-name/sc/scrcpy/package.nix index 06779e7c761d..0deceb3f8c4a 100644 --- a/pkgs/by-name/sc/scrcpy/package.nix +++ b/pkgs/by-name/sc/scrcpy/package.nix @@ -58,7 +58,7 @@ stdenv.mkDerivation rec { # runtime dep on `adb` to push the server wrapProgram "$out/bin/scrcpy" --prefix PATH : "${android-tools}/bin" - '' + lib.optionalString stdenv.isLinux '' + '' + lib.optionalString stdenv.hostPlatform.isLinux '' substituteInPlace $out/share/applications/scrcpy-console.desktop \ --replace "/bin/bash" "${runtimeShell}" ''; diff --git a/pkgs/by-name/sc/screen-pipe/package.nix b/pkgs/by-name/sc/screen-pipe/package.nix index b851c49a5808..141eca8d82c7 100644 --- a/pkgs/by-name/sc/screen-pipe/package.nix +++ b/pkgs/by-name/sc/screen-pipe/package.nix @@ -49,7 +49,7 @@ rustPlatform.buildRustPackage rec { openssl sqlite ] - ++ lib.optionals stdenv.isDarwin ( + ++ lib.optionals stdenv.hostPlatform.isDarwin ( with darwin.apple_sdk_12_3.frameworks; [ CoreAudio @@ -65,12 +65,12 @@ rustPlatform.buildRustPackage rec { SystemConfiguration ] ) - ++ lib.optionals stdenv.isLinux [ + ++ lib.optionals stdenv.hostPlatform.isLinux [ alsa-lib xorg.libxcb ]; - buildFeatures = lib.optional stdenv.isDarwin "metal"; + buildFeatures = lib.optional stdenv.hostPlatform.isDarwin "metal"; env = { RUSTONIG_SYSTEM_LIBONIG = true; diff --git a/pkgs/by-name/sc/screenly-cli/package.nix b/pkgs/by-name/sc/screenly-cli/package.nix index 9cc2cd511ef8..b93266bbdc25 100644 --- a/pkgs/by-name/sc/screenly-cli/package.nix +++ b/pkgs/by-name/sc/screenly-cli/package.nix @@ -30,7 +30,7 @@ rustPlatform.buildRustPackage rec { buildInputs = [ openssl ] - ++ lib.optionals stdenv.isDarwin [ + ++ lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.CoreFoundation darwin.apple_sdk.frameworks.CoreServices darwin.apple_sdk.frameworks.Security diff --git a/pkgs/by-name/sc/scs/package.nix b/pkgs/by-name/sc/scs/package.nix index 49911355e2db..1ba3eb5912b8 100644 --- a/pkgs/by-name/sc/scs/package.nix +++ b/pkgs/by-name/sc/scs/package.nix @@ -29,7 +29,7 @@ stdenv.mkDerivation rec { --replace "gcc" "cc" ''; - nativeBuildInputs = lib.optional stdenv.isDarwin fixDarwinDylibNames; + nativeBuildInputs = lib.optional stdenv.hostPlatform.isDarwin fixDarwinDylibNames; buildInputs = [ blas diff --git a/pkgs/by-name/sd/SDL1/package.nix b/pkgs/by-name/sd/SDL1/package.nix index 7abff886d509..bd793b5885bb 100644 --- a/pkgs/by-name/sd/SDL1/package.nix +++ b/pkgs/by-name/sd/SDL1/package.nix @@ -16,11 +16,11 @@ , pkg-config , stdenv # Boolean flags -, alsaSupport ? stdenv.isLinux && !stdenv.hostPlatform.isAndroid +, alsaSupport ? stdenv.hostPlatform.isLinux && !stdenv.hostPlatform.isAndroid , libGLSupported ? lib.meta.availableOn stdenv.hostPlatform libGL , openglSupport ? libGLSupported -, pulseaudioSupport ? config.pulseaudio or stdenv.isLinux && !stdenv.hostPlatform.isAndroid && lib.meta.availableOn stdenv.hostPlatform libpulseaudio -, x11Support ? !stdenv.isCygwin && !stdenv.hostPlatform.isAndroid +, pulseaudioSupport ? config.pulseaudio or stdenv.hostPlatform.isLinux && !stdenv.hostPlatform.isAndroid && lib.meta.availableOn stdenv.hostPlatform libpulseaudio +, x11Support ? !stdenv.hostPlatform.isCygwin && !stdenv.hostPlatform.isAndroid }: # NOTE: When editing this expression see if the same change applies to @@ -30,13 +30,13 @@ let inherit (darwin.apple_sdk.frameworks) OpenGL CoreAudio CoreServices AudioUnit Kernel Cocoa GLUT; extraPropagatedBuildInputs = [ ] ++ lib.optionals x11Support [ libXext libICE libXrandr ] - ++ lib.optionals (openglSupport && stdenv.isLinux) [ libGL ] + ++ lib.optionals (openglSupport && stdenv.hostPlatform.isLinux) [ libGL ] # libGLU doesn’t work with Android's SDL - ++ lib.optionals (openglSupport && stdenv.isLinux && (!stdenv.hostPlatform.isAndroid)) [ libGLU ] - ++ lib.optionals (openglSupport && stdenv.isDarwin) [ OpenGL GLUT ] + ++ lib.optionals (openglSupport && stdenv.hostPlatform.isLinux && (!stdenv.hostPlatform.isAndroid)) [ libGLU ] + ++ lib.optionals (openglSupport && stdenv.hostPlatform.isDarwin) [ OpenGL GLUT ] ++ lib.optional alsaSupport alsa-lib ++ lib.optional pulseaudioSupport libpulseaudio - ++ lib.optional stdenv.isDarwin Cocoa; + ++ lib.optional stdenv.hostPlatform.isDarwin Cocoa; in stdenv.mkDerivation (finalAttrs: { pname = "SDL"; @@ -51,14 +51,14 @@ stdenv.mkDerivation (finalAttrs: { outputBin = "dev"; # sdl-config nativeBuildInputs = [ pkg-config ] - ++ lib.optional stdenv.isLinux libcap; + ++ lib.optional stdenv.hostPlatform.isLinux libcap; propagatedBuildInputs = [ libiconv ] ++ extraPropagatedBuildInputs; buildInputs = [ ] ++ lib.optionals (!stdenv.hostPlatform.isMinGW && alsaSupport) [ audiofile ] - ++ lib.optionals stdenv.isDarwin [ AudioUnit CoreAudio CoreServices Kernel OpenGL ]; + ++ lib.optionals stdenv.hostPlatform.isDarwin [ AudioUnit CoreAudio CoreServices Kernel OpenGL ]; configureFlags = [ "--disable-oss" @@ -70,7 +70,7 @@ stdenv.mkDerivation (finalAttrs: { # SDL_X11_SYM(int,_XData32,(Display *dpy,register long *data,unsigned len),(dpy,data,len),return) # # Please try revert the change that introduced this comment when updating SDL. - ] ++ lib.optional stdenv.isDarwin "--disable-x11-shared" + ] ++ lib.optional stdenv.hostPlatform.isDarwin "--disable-x11-shared" ++ lib.optional (!x11Support) "--without-x" ++ lib.optional alsaSupport "--with-alsa-prefix=${alsa-lib.out}/lib" ++ lib.optional stdenv.hostPlatform.isMusl "CFLAGS=-DICONV_INBUF_NONCONST"; diff --git a/pkgs/by-name/sd/SDL2_Pango/package.nix b/pkgs/by-name/sd/SDL2_Pango/package.nix index 9fbee142d6b9..755c0a1af463 100644 --- a/pkgs/by-name/sd/SDL2_Pango/package.nix +++ b/pkgs/by-name/sd/SDL2_Pango/package.nix @@ -31,7 +31,7 @@ stdenv.mkDerivation (finalAttrs: { SDL2 freetype pango - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ darwin.libobjc ]; diff --git a/pkgs/by-name/sd/SDL2_gfx/package.nix b/pkgs/by-name/sd/SDL2_gfx/package.nix index d74d859fefcb..b5a68c23e49b 100644 --- a/pkgs/by-name/sd/SDL2_gfx/package.nix +++ b/pkgs/by-name/sd/SDL2_gfx/package.nix @@ -7,7 +7,7 @@ testers, # Boolean flags enableMmx ? stdenv.hostPlatform.isx86, - enableSdltest ? (!stdenv.isDarwin), + enableSdltest ? (!stdenv.hostPlatform.isDarwin), }: stdenv.mkDerivation (finalAttrs: { @@ -27,7 +27,7 @@ stdenv.mkDerivation (finalAttrs: { buildInputs = [ SDL2 ] - ++ lib.optionals stdenv.isDarwin [ + ++ lib.optionals stdenv.hostPlatform.isDarwin [ darwin.libobjc ]; diff --git a/pkgs/by-name/sd/SDL2_image/package.nix b/pkgs/by-name/sd/SDL2_image/package.nix index 2af81bd18cb7..19028ab115a0 100644 --- a/pkgs/by-name/sd/SDL2_image/package.nix +++ b/pkgs/by-name/sd/SDL2_image/package.nix @@ -14,7 +14,7 @@ zlib, # Boolean flags ## Darwin headless will hang when trying to run the SDL test program - enableSdltest ? (!stdenv.isDarwin), + enableSdltest ? (!stdenv.hostPlatform.isDarwin), }: let @@ -43,7 +43,7 @@ stdenv.mkDerivation (finalAttrs: { libtiff libwebp zlib - ] ++ lib.optionals stdenv.isDarwin [ Foundation ]; + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ Foundation ]; configureFlags = [ # Disable dynamically loaded dependencies @@ -52,9 +52,9 @@ stdenv.mkDerivation (finalAttrs: { (lib.enableFeature false "tif-shared") (lib.enableFeature false "webp-shared") (lib.enableFeature enableSdltest "sdltest") - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ # Don't use native macOS frameworks - # Caution: do not set this as (!stdenv.isDarwin) since it would be true + # Caution: do not set this as (!stdenv.hostPlatform.isDarwin) since it would be true # outside Darwin - and ImageIO does not exist outisde Darwin (lib.enableFeature false "imageio") ]; diff --git a/pkgs/by-name/sd/SDL2_mixer/package.nix b/pkgs/by-name/sd/SDL2_mixer/package.nix index 976dc2f5fa92..bd2894f5583d 100644 --- a/pkgs/by-name/sd/SDL2_mixer/package.nix +++ b/pkgs/by-name/sd/SDL2_mixer/package.nix @@ -15,8 +15,8 @@ stdenv, timidity, # Boolean flags - enableSdltest ? (!stdenv.isDarwin), - enableSmpegtest ? (!stdenv.isDarwin), + enableSdltest ? (!stdenv.hostPlatform.isDarwin), + enableSmpegtest ? (!stdenv.hostPlatform.isDarwin), }: let @@ -38,7 +38,7 @@ stdenv.mkDerivation (finalAttrs: { pkg-config ]; - buildInputs = lib.optionals stdenv.isDarwin [ + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ AudioToolbox AudioUnit CoreServices diff --git a/pkgs/by-name/sd/SDL2_net/package.nix b/pkgs/by-name/sd/SDL2_net/package.nix index 0214e2cd5b4b..0325e6aa4c12 100644 --- a/pkgs/by-name/sd/SDL2_net/package.nix +++ b/pkgs/by-name/sd/SDL2_net/package.nix @@ -6,7 +6,7 @@ pkg-config, stdenv, # Boolean flags - enableSdltest ? (!stdenv.isDarwin), + enableSdltest ? (!stdenv.hostPlatform.isDarwin), }: stdenv.mkDerivation (finalAttrs: { @@ -27,7 +27,7 @@ stdenv.mkDerivation (finalAttrs: { pkg-config ]; - buildInputs = lib.optionals stdenv.isDarwin [ + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ darwin.libobjc ]; diff --git a/pkgs/by-name/sd/SDL2_sound/package.nix b/pkgs/by-name/sd/SDL2_sound/package.nix index d67db20695db..46517c42cb32 100644 --- a/pkgs/by-name/sd/SDL2_sound/package.nix +++ b/pkgs/by-name/sd/SDL2_sound/package.nix @@ -42,7 +42,7 @@ stdenv.mkDerivation rec { cmakeFlags = [ "-DSDLSOUND_DECODER_MIDI=1" ]; buildInputs = [ SDL2 flac libmikmod libvorbis timidity ] - ++ lib.optionals stdenv.isDarwin [ AudioToolbox CoreAudio ]; + ++ lib.optionals stdenv.hostPlatform.isDarwin [ AudioToolbox CoreAudio ]; meta = with lib; { description = "SDL2 sound library"; diff --git a/pkgs/by-name/sd/SDL2_ttf/package.nix b/pkgs/by-name/sd/SDL2_ttf/package.nix index 140c104bcb44..dcc5fee21f33 100644 --- a/pkgs/by-name/sd/SDL2_ttf/package.nix +++ b/pkgs/by-name/sd/SDL2_ttf/package.nix @@ -10,7 +10,7 @@ stdenv, testers, # Boolean flags - enableSdltest ? (!stdenv.isDarwin), + enableSdltest ? (!stdenv.hostPlatform.isDarwin), }: stdenv.mkDerivation (finalAttrs: { @@ -32,10 +32,10 @@ stdenv.mkDerivation (finalAttrs: { freetype harfbuzz ] - ++ lib.optionals (!stdenv.isDarwin) [ + ++ lib.optionals (!stdenv.hostPlatform.isDarwin) [ libGL ] - ++ lib.optionals stdenv.isDarwin [ + ++ lib.optionals stdenv.hostPlatform.isDarwin [ darwin.libobjc ]; diff --git a/pkgs/by-name/sd/SDL_Pango/package.nix b/pkgs/by-name/sd/SDL_Pango/package.nix index 8c4160d98684..78e5d40d0a90 100644 --- a/pkgs/by-name/sd/SDL_Pango/package.nix +++ b/pkgs/by-name/sd/SDL_Pango/package.nix @@ -8,7 +8,7 @@ pkg-config, stdenv, # Boolean flags - enableSdltest ? (!stdenv.isDarwin), + enableSdltest ? (!stdenv.hostPlatform.isDarwin), }: stdenv.mkDerivation (finalAttrs: { diff --git a/pkgs/by-name/sd/SDL_compat/package.nix b/pkgs/by-name/sd/SDL_compat/package.nix index a2ac5f6d2887..ac7d8ff68b81 100644 --- a/pkgs/by-name/sd/SDL_compat/package.nix +++ b/pkgs/by-name/sd/SDL_compat/package.nix @@ -29,7 +29,7 @@ stdenv.mkDerivation (finalAttrs: { }; nativeBuildInputs = [ cmake pkg-config ] - ++ lib.optionals (stdenv.isDarwin && stdenv.isAarch64) [ autoSignDarwinBinariesHook ]; + ++ lib.optionals (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isAarch64) [ autoSignDarwinBinariesHook ]; propagatedBuildInputs = [ SDL2 ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ libiconv Cocoa ] diff --git a/pkgs/by-name/sd/SDL_gfx/package.nix b/pkgs/by-name/sd/SDL_gfx/package.nix index 558e1943a14b..5677d62b7b93 100644 --- a/pkgs/by-name/sd/SDL_gfx/package.nix +++ b/pkgs/by-name/sd/SDL_gfx/package.nix @@ -4,7 +4,7 @@ fetchurl, stdenv, # Boolean flags - enableSdltest ? (!stdenv.isDarwin), + enableSdltest ? (!stdenv.hostPlatform.isDarwin), }: stdenv.mkDerivation (finalAttrs: { diff --git a/pkgs/by-name/sd/SDL_image/package.nix b/pkgs/by-name/sd/SDL_image/package.nix index ce6824b09d0b..fdd0b5f373ac 100644 --- a/pkgs/by-name/sd/SDL_image/package.nix +++ b/pkgs/by-name/sd/SDL_image/package.nix @@ -41,7 +41,7 @@ stdenv.mkDerivation (finalAttrs: { (lib.enableFeature false "png-shared") (lib.enableFeature false "tif-shared") (lib.enableFeature false "webp-shared") - (lib.enableFeature (!stdenv.isDarwin) "sdltest") + (lib.enableFeature (!stdenv.hostPlatform.isDarwin) "sdltest") ]; nativeBuildInputs = [ diff --git a/pkgs/by-name/sd/SDL_mixer/package.nix b/pkgs/by-name/sd/SDL_mixer/package.nix index 470bd5559d7c..84af162a7384 100644 --- a/pkgs/by-name/sd/SDL_mixer/package.nix +++ b/pkgs/by-name/sd/SDL_mixer/package.nix @@ -12,8 +12,8 @@ stdenv, # Boolean flags enableNativeMidi ? false, - enableSdltest ? (!stdenv.isDarwin), - enableSmpegtest ? (!stdenv.isDarwin), + enableSdltest ? (!stdenv.hostPlatform.isDarwin), + enableSmpegtest ? (!stdenv.hostPlatform.isDarwin), }: stdenv.mkDerivation (finalAttrs: { diff --git a/pkgs/by-name/sd/SDL_net/package.nix b/pkgs/by-name/sd/SDL_net/package.nix index 4d45ff624e8f..369f956fdf94 100644 --- a/pkgs/by-name/sd/SDL_net/package.nix +++ b/pkgs/by-name/sd/SDL_net/package.nix @@ -5,7 +5,7 @@ pkg-config, stdenv, # Boolean flags - enableSdltest ? (!stdenv.isDarwin) + enableSdltest ? (!stdenv.hostPlatform.isDarwin) }: stdenv.mkDerivation (finalAttrs: { diff --git a/pkgs/by-name/sd/SDL_sound/package.nix b/pkgs/by-name/sd/SDL_sound/package.nix index b5e93b3efdf2..e2fd8000c546 100644 --- a/pkgs/by-name/sd/SDL_sound/package.nix +++ b/pkgs/by-name/sd/SDL_sound/package.nix @@ -7,7 +7,7 @@ libvorbis, stdenv, # Boolean flags - enableSdltest ? (!stdenv.isDarwin) + enableSdltest ? (!stdenv.hostPlatform.isDarwin) }: stdenv.mkDerivation (finalAttrs: { diff --git a/pkgs/by-name/sd/SDL_ttf/package.nix b/pkgs/by-name/sd/SDL_ttf/package.nix index a44aeaa7f05b..bd40d331b9b9 100644 --- a/pkgs/by-name/sd/SDL_ttf/package.nix +++ b/pkgs/by-name/sd/SDL_ttf/package.nix @@ -6,7 +6,7 @@ freetype, stdenv, # Boolean flags - enableSdltest ? (!stdenv.isDarwin), + enableSdltest ? (!stdenv.hostPlatform.isDarwin), }: stdenv.mkDerivation (finalAttrs: { diff --git a/pkgs/by-name/se/selenium-manager/package.nix b/pkgs/by-name/se/selenium-manager/package.nix index 47b6e2c16c16..4877804ef897 100644 --- a/pkgs/by-name/se/selenium-manager/package.nix +++ b/pkgs/by-name/se/selenium-manager/package.nix @@ -20,7 +20,7 @@ rustPlatform.buildRustPackage rec { cargoHash = "sha256-1CPUOAfBfUeZt5S8t5SM3oyrNwXKHplhHG5idVy4YrE="; - buildInputs = lib.optionals stdenv.isDarwin [ + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.SystemConfiguration ]; diff --git a/pkgs/by-name/se/sendme/package.nix b/pkgs/by-name/se/sendme/package.nix index e355dd99f317..ea5d670af8a2 100644 --- a/pkgs/by-name/se/sendme/package.nix +++ b/pkgs/by-name/se/sendme/package.nix @@ -18,7 +18,7 @@ rustPlatform.buildRustPackage rec { cargoHash = "sha256-U2/GUpWtpTX+RCBojh3N6DsWB0gjFkH1mGA+AS+fH+o="; - buildInputs = lib.optionals stdenv.isDarwin ( + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin ( with darwin.apple_sdk.frameworks; [ SystemConfiguration ] diff --git a/pkgs/by-name/se/sequoia-sq/package.nix b/pkgs/by-name/se/sequoia-sq/package.nix index 4183e235286f..5de7ab47962c 100644 --- a/pkgs/by-name/se/sequoia-sq/package.nix +++ b/pkgs/by-name/se/sequoia-sq/package.nix @@ -36,7 +36,7 @@ rustPlatform.buildRustPackage rec { openssl sqlite nettle - ] ++ lib.optionals stdenv.isDarwin (with darwin.apple_sdk.frameworks; [ Security SystemConfiguration ]); + ] ++ lib.optionals stdenv.hostPlatform.isDarwin (with darwin.apple_sdk.frameworks; [ Security SystemConfiguration ]); checkFlags = [ # https://gitlab.com/sequoia-pgp/sequoia-sq/-/issues/297 diff --git a/pkgs/by-name/se/sequoia-wot/package.nix b/pkgs/by-name/se/sequoia-wot/package.nix index d95066972cb8..09ae4d8bd9f2 100644 --- a/pkgs/by-name/se/sequoia-wot/package.nix +++ b/pkgs/by-name/se/sequoia-wot/package.nix @@ -33,7 +33,7 @@ rustPlatform.buildRustPackage rec { buildInputs = [ openssl sqlite - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.SystemConfiguration # See comment near sequoia-openpgp/crypto- buildFeatures ] ++ lib.optionals (!stdenv.targetPlatform.isWindows) [ diff --git a/pkgs/by-name/se/serie/package.nix b/pkgs/by-name/se/serie/package.nix index 516756d12c77..e59723c24ec7 100644 --- a/pkgs/by-name/se/serie/package.nix +++ b/pkgs/by-name/se/serie/package.nix @@ -22,7 +22,7 @@ rustPlatform.buildRustPackage rec { cargoHash = "sha256-HxIyWlFKDRod5nSENZguNYz/vn+E9Ux0K3dMhX7I/zQ="; - buildInputs = lib.optionals stdenv.isDarwin ( + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin ( with darwin.apple_sdk.frameworks; [ CoreGraphics diff --git a/pkgs/by-name/se/servo/package.nix b/pkgs/by-name/se/servo/package.nix index de7efca2767f..fc586d5ddcd9 100644 --- a/pkgs/by-name/se/servo/package.nix +++ b/pkgs/by-name/se/servo/package.nix @@ -130,7 +130,7 @@ rustPlatform.buildRustPackage { libGL xorg.libX11 xorg.libxcb - ] ++ (lib.optionals stdenv.isDarwin [ darwin.apple_sdk.frameworks.AppKit ]); + ] ++ (lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.AppKit ]); # copy resources into `$out` to be used during runtime # link runtime libraries diff --git a/pkgs/by-name/sg/sgfutils/package.nix b/pkgs/by-name/sg/sgfutils/package.nix index f82bc4e59a6a..586a3ab1e096 100644 --- a/pkgs/by-name/sg/sgfutils/package.nix +++ b/pkgs/by-name/sg/sgfutils/package.nix @@ -18,7 +18,7 @@ stdenv.mkDerivation hash = "sha256-KWYgTxz32WK3MKouj1WAJtZmleKt5giCpzQPwfWruZQ="; }; nativeBuildInputs = [ makeWrapper ]; - buildInputs = [ openssl ] ++ lib.optionals stdenv.isDarwin [ libiconv ]; + buildInputs = [ openssl ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ libiconv ]; buildPhase = '' runHook preBuild make all diff --git a/pkgs/by-name/sh/share-preview/package.nix b/pkgs/by-name/sh/share-preview/package.nix index 093bbaf33270..4f3cda10bd76 100644 --- a/pkgs/by-name/sh/share-preview/package.nix +++ b/pkgs/by-name/sh/share-preview/package.nix @@ -46,13 +46,13 @@ stdenv.mkDerivation (finalAttrs: { buildInputs = [ libadwaita openssl - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.Foundation darwin.apple_sdk.frameworks.SystemConfiguration ]; env.NIX_CFLAGS_COMPILE = toString ( - lib.optionals stdenv.isDarwin [ "-Wno-error=incompatible-function-pointer-types" ] + lib.optionals stdenv.hostPlatform.isDarwin [ "-Wno-error=incompatible-function-pointer-types" ] ); meta = { diff --git a/pkgs/by-name/si/signal-backup-deduplicator/package.nix b/pkgs/by-name/si/signal-backup-deduplicator/package.nix index d5efff9e3f4d..5c098d7d46df 100644 --- a/pkgs/by-name/si/signal-backup-deduplicator/package.nix +++ b/pkgs/by-name/si/signal-backup-deduplicator/package.nix @@ -33,6 +33,6 @@ stdenv.mkDerivation { mainProgram = "signal_backup_deduplicate"; platforms = lib.platforms.all; # ld: symbol(s) not found for architecture ... - broken = stdenv.isDarwin; + broken = stdenv.hostPlatform.isDarwin; }; } diff --git a/pkgs/by-name/si/silicon/package.nix b/pkgs/by-name/si/silicon/package.nix index cba16e706b8c..0c77d93b5a00 100644 --- a/pkgs/by-name/si/silicon/package.nix +++ b/pkgs/by-name/si/silicon/package.nix @@ -40,8 +40,8 @@ rustPlatform.buildRustPackage rec { ''; buildInputs = [ expat freetype fira-code fontconfig harfbuzz ] - ++ lib.optionals stdenv.isLinux [ libxcb ] - ++ lib.optionals stdenv.isDarwin (with darwin.apple_sdk.frameworks; [ + ++ lib.optionals stdenv.hostPlatform.isLinux [ libxcb ] + ++ lib.optionals stdenv.hostPlatform.isDarwin (with darwin.apple_sdk.frameworks; [ libiconv AppKit CoreText @@ -49,7 +49,7 @@ rustPlatform.buildRustPackage rec { ]); nativeBuildInputs = [ cmake pkg-config rustPlatform.bindgenHook ] - ++ lib.optionals stdenv.isLinux [ python3 ]; + ++ lib.optionals stdenv.hostPlatform.isLinux [ python3 ]; preCheck = '' export HOME=$TMPDIR diff --git a/pkgs/by-name/si/single-file-cli/package.nix b/pkgs/by-name/si/single-file-cli/package.nix index d6aa4d28a7d8..0af72089592a 100644 --- a/pkgs/by-name/si/single-file-cli/package.nix +++ b/pkgs/by-name/si/single-file-cli/package.nix @@ -19,7 +19,7 @@ buildNpmPackage { npmDepsHash = "sha256-wiBpWw9nb/pWVGIc4Vl/IxxR5ic0LzLMMr3WxRNvYdM="; nativeCheckInputs = [chromium]; - doCheck = stdenv.isLinux; + doCheck = stdenv.hostPlatform.isLinux; postBuild = '' patchShebangs ./single-file diff --git a/pkgs/by-name/si/sirius/package.nix b/pkgs/by-name/si/sirius/package.nix index 34ee961d1404..d437eece8b21 100644 --- a/pkgs/by-name/si/sirius/package.nix +++ b/pkgs/by-name/si/sirius/package.nix @@ -84,7 +84,7 @@ stdenv.mkDerivation rec { ] ++ lib.optionals (gpuBackend == "rocm") [ rocmPackages.clr rocmPackages.rocblas - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ llvmPackages.openmp ] ++ lib.optionals enablePython (with pythonPackages; [ python diff --git a/pkgs/by-name/sk/sketchybar/package.nix b/pkgs/by-name/sk/sketchybar/package.nix index 0b1b4e21acd1..e0e2a004e6d7 100644 --- a/pkgs/by-name/sk/sketchybar/package.nix +++ b/pkgs/by-name/sk/sketchybar/package.nix @@ -29,7 +29,7 @@ let } .${system} or (throw "Unsupported system: ${system}"); - stdenv' = if stdenv.isDarwin then overrideSDK stdenv "11.0" else stdenv; + stdenv' = if stdenv.hostPlatform.isDarwin then overrideSDK stdenv "11.0" else stdenv; in stdenv'.mkDerivation (finalAttrs: { pname = "sketchybar"; diff --git a/pkgs/by-name/sk/skhd/package.nix b/pkgs/by-name/sk/skhd/package.nix index d3b3b9adb96a..1876a43916a7 100644 --- a/pkgs/by-name/sk/skhd/package.nix +++ b/pkgs/by-name/sk/skhd/package.nix @@ -10,7 +10,7 @@ let inherit (darwin.apple_sdk_11_0.frameworks) Carbon Cocoa; - stdenv' = if stdenv.isDarwin then overrideSDK stdenv "11.0" else stdenv; + stdenv' = if stdenv.hostPlatform.isDarwin then overrideSDK stdenv "11.0" else stdenv; in stdenv'.mkDerivation (finalAttrs: { pname = "skhd"; diff --git a/pkgs/by-name/sk/skia/package.nix b/pkgs/by-name/sk/skia/package.nix index a6972b628bd8..2790b77101d5 100644 --- a/pkgs/by-name/sk/skia/package.nix +++ b/pkgs/by-name/sk/skia/package.nix @@ -18,7 +18,7 @@ , vulkan-memory-allocator , xcbuild -, enableVulkan ? !stdenv.isDarwin +, enableVulkan ? !stdenv.hostPlatform.isDarwin }: stdenv.mkDerivation (finalAttrs: { @@ -46,7 +46,7 @@ stdenv.mkDerivation (finalAttrs: { gn ninja python3 - ] ++ lib.optional stdenv.isDarwin xcbuild; + ] ++ lib.optional stdenv.hostPlatform.isDarwin xcbuild; buildInputs = [ expat @@ -145,6 +145,6 @@ stdenv.mkDerivation (finalAttrs: { platforms = with lib.platforms; arm ++ aarch64 ++ x86 ++ x86_64; pkgConfigModules = [ "skia" ]; # https://github.com/NixOS/nixpkgs/pull/325871#issuecomment-2220610016 - broken = stdenv.isDarwin; + broken = stdenv.hostPlatform.isDarwin; }; }) diff --git a/pkgs/by-name/sk/skribilo/package.nix b/pkgs/by-name/sk/skribilo/package.nix index 9602ff7d167e..63083457bee5 100644 --- a/pkgs/by-name/sk/skribilo/package.nix +++ b/pkgs/by-name/sk/skribilo/package.nix @@ -11,8 +11,8 @@ , makeWrapper , pkg-config , enableEmacs ? false, emacs -, enableLout ? stdenv.isLinux, lout -, enablePloticus ? stdenv.isLinux, ploticus +, enableLout ? stdenv.hostPlatform.isLinux, lout +, enablePloticus ? stdenv.hostPlatform.isLinux, ploticus , enableTex ? true, texliveSmall }: diff --git a/pkgs/by-name/sl/slang/package.nix b/pkgs/by-name/sl/slang/package.nix index 162bc8395d99..7d67d22eb3e0 100644 --- a/pkgs/by-name/sl/slang/package.nix +++ b/pkgs/by-name/sl/slang/package.nix @@ -39,7 +39,7 @@ stdenv.mkDerivation rec { pcre readline zlib - ] ++ lib.optionals (stdenv.isDarwin) [ libiconv ]; + ] ++ lib.optionals (stdenv.hostPlatform.isDarwin) [ libiconv ]; propagatedBuildInputs = [ ncurses ]; diff --git a/pkgs/by-name/sl/slimserver/package.nix b/pkgs/by-name/sl/slimserver/package.nix index b88f72b0d118..abdb045e7ced 100644 --- a/pkgs/by-name/sl/slimserver/package.nix +++ b/pkgs/by-name/sl/slimserver/package.nix @@ -24,7 +24,7 @@ let sox wavpack ] - ++ (lib.optional stdenv.isLinux monkeysAudio) + ++ (lib.optional stdenv.hostPlatform.isLinux monkeysAudio) ); libPath = lib.makeLibraryPath [ zlib @@ -117,8 +117,8 @@ perlPackages.buildPerlPackage rec { XMLSimple YAMLLibYAML ] - # ++ (lib.optional stdenv.isDarwin perlPackages.MacFSEvents) - ++ (lib.optional stdenv.isLinux perlPackages.LinuxInotify2); + # ++ (lib.optional stdenv.hostPlatform.isDarwin perlPackages.MacFSEvents) + ++ (lib.optional stdenv.hostPlatform.isLinux perlPackages.LinuxInotify2); prePatch = '' # remove vendored binaries @@ -179,6 +179,6 @@ perlPackages.buildPerlPackage rec { jecaro ]; platforms = platforms.unix; - broken = stdenv.isDarwin; + broken = stdenv.hostPlatform.isDarwin; }; } diff --git a/pkgs/by-name/sl/slumber/package.nix b/pkgs/by-name/sl/slumber/package.nix index b65e041cdc24..aed0f3848c42 100644 --- a/pkgs/by-name/sl/slumber/package.nix +++ b/pkgs/by-name/sl/slumber/package.nix @@ -19,7 +19,7 @@ rustPlatform.buildRustPackage rec { cargoHash = "sha256-jLBid9MDQ2eMhG0knxU1gxbi+eRFlCPYRkzWnjCnyG0="; - buildInputs = lib.optionals stdenv.isDarwin [ darwin.apple_sdk.frameworks.AppKit ]; + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.AppKit ]; meta = with lib; { description = "Terminal-based HTTP/REST client"; diff --git a/pkgs/by-name/sm/smartcat/package.nix b/pkgs/by-name/sm/smartcat/package.nix index bc81bfd0a2db..fb7195bfeaee 100644 --- a/pkgs/by-name/sm/smartcat/package.nix +++ b/pkgs/by-name/sm/smartcat/package.nix @@ -30,7 +30,7 @@ rustPlatform.buildRustPackage rec { openssl libX11 ] - ++ lib.optionals stdenv.isDarwin [ + ++ lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.AppKit darwin.apple_sdk.frameworks.Security darwin.apple_sdk.frameworks.SystemConfiguration diff --git a/pkgs/by-name/sm/smuview/package.nix b/pkgs/by-name/sm/smuview/package.nix index 907e332279ca..a030d649992d 100644 --- a/pkgs/by-name/sm/smuview/package.nix +++ b/pkgs/by-name/sm/smuview/package.nix @@ -31,7 +31,7 @@ stdenv.mkDerivation rec { }; nativeBuildInputs = [ cmake pkg-config qt5.wrapQtAppsHook ] - ++ lib.optional stdenv.isDarwin desktopToDarwinBundle; + ++ lib.optional stdenv.hostPlatform.isDarwin desktopToDarwinBundle; buildInputs = [ glib @@ -45,7 +45,7 @@ stdenv.mkDerivation rec { python3 pcre libsForQt5.qwt - ] ++ lib.optionals stdenv.isLinux [ bluez ]; + ] ++ lib.optionals stdenv.hostPlatform.isLinux [ bluez ]; meta = with lib; { description = "Qt based source measure unit GUI for sigrok"; diff --git a/pkgs/by-name/sm/smuxi/package.nix b/pkgs/by-name/sm/smuxi/package.nix index 40ae39deee0f..72354275e398 100644 --- a/pkgs/by-name/sm/smuxi/package.nix +++ b/pkgs/by-name/sm/smuxi/package.nix @@ -17,7 +17,7 @@ stdenv.mkDerivation rec { pname = "smuxi"; version = "unstable-2023-07-01"; - runtimeLoaderEnvVariableName = if stdenv.isDarwin then + runtimeLoaderEnvVariableName = if stdenv.hostPlatform.isDarwin then "DYLD_FALLBACK_LIBRARY_PATH" else "LD_LIBRARY_PATH"; @@ -84,7 +84,7 @@ stdenv.mkDerivation rec { cp -a lib/Nini.dll $out/lib/smuxi/ # install GTK+ icon theme on Darwin - ${if guiSupport && stdenv.isDarwin then " + ${if guiSupport && stdenv.hostPlatform.isDarwin then " mkdir -p $out/lib/smuxi/icons/ cp -a images/Smuxi-Symbolic $out/lib/smuxi/icons/ " else ""} diff --git a/pkgs/by-name/sn/sn0int/package.nix b/pkgs/by-name/sn/sn0int/package.nix index 974f6a298d1e..6e9afcd4a149 100644 --- a/pkgs/by-name/sn/sn0int/package.nix +++ b/pkgs/by-name/sn/sn0int/package.nix @@ -31,9 +31,9 @@ rustPlatform.buildRustPackage rec { buildInputs = [ libsodium sqlite - ] ++ lib.optionals stdenv.isLinux [ + ] ++ lib.optionals stdenv.hostPlatform.isLinux [ libseccomp - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ pkgs.darwin.apple_sdk.frameworks.Security ]; diff --git a/pkgs/by-name/sn/snapcraft/package.nix b/pkgs/by-name/sn/snapcraft/package.nix index 9c6add8c197b..ad2eb1c0b7fc 100644 --- a/pkgs/by-name/sn/snapcraft/package.nix +++ b/pkgs/by-name/sn/snapcraft/package.nix @@ -196,7 +196,7 @@ python.pkgs.buildPythonApplication rec { "test_snap_command_fallback" "test_validate_architectures_supported" "test_validate_architectures_unsupported" - ] ++ lib.optionals stdenv.isAarch64 [ "test_load_project" ]; + ] ++ lib.optionals stdenv.hostPlatform.isAarch64 [ "test_load_project" ]; disabledTestPaths = [ "tests/unit/commands/test_remote.py" diff --git a/pkgs/by-name/sn/snes9x/package.nix b/pkgs/by-name/sn/snes9x/package.nix index 1888a2df4186..31aa73db6a92 100644 --- a/pkgs/by-name/sn/snes9x/package.nix +++ b/pkgs/by-name/sn/snes9x/package.nix @@ -58,7 +58,7 @@ stdenv.mkDerivation (finalAttrs: { minizip zlib ] - ++ lib.optionals stdenv.isLinux [ + ++ lib.optionals stdenv.hostPlatform.isLinux [ alsa-lib pulseaudio libselinux @@ -137,6 +137,6 @@ stdenv.mkDerivation (finalAttrs: { sugar700 ]; platforms = lib.platforms.unix; - broken = (withGtk && stdenv.isDarwin); + broken = (withGtk && stdenv.hostPlatform.isDarwin); }; }) diff --git a/pkgs/by-name/sn/sniffglue/package.nix b/pkgs/by-name/sn/sniffglue/package.nix index 9cedce67f64e..5bafa510776f 100644 --- a/pkgs/by-name/sn/sniffglue/package.nix +++ b/pkgs/by-name/sn/sniffglue/package.nix @@ -24,7 +24,7 @@ rustPlatform.buildRustPackage rec { buildInputs = [ libpcap - ] ++ lib.optionals stdenv.isLinux [ + ] ++ lib.optionals stdenv.hostPlatform.isLinux [ libseccomp ]; diff --git a/pkgs/by-name/sn/snyk/package.nix b/pkgs/by-name/sn/snyk/package.nix index b974fd0ee5f7..4c90ad105a6f 100644 --- a/pkgs/by-name/sn/snyk/package.nix +++ b/pkgs/by-name/sn/snyk/package.nix @@ -31,7 +31,7 @@ buildNpmPackage { env.NIX_CFLAGS_COMPILE = # Fix error: no member named 'aligned_alloc' in the global namespace lib.optionalString ( - stdenv.isDarwin && stdenv.isx86_64 + stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isx86_64 ) "-D_LIBCPP_HAS_NO_LIBRARY_ALIGNED_ALLOCATION=1"; npmBuildScript = "build:prod"; diff --git a/pkgs/by-name/so/so/package.nix b/pkgs/by-name/so/so/package.nix index 9c837f4ae269..12c978a9b3aa 100644 --- a/pkgs/by-name/so/so/package.nix +++ b/pkgs/by-name/so/so/package.nix @@ -31,7 +31,7 @@ let buildInputs = [ openssl ] - ++ lib.optionals stdenv.isDarwin [ + ++ lib.optionals stdenv.hostPlatform.isDarwin [ libiconv CoreServices Security diff --git a/pkgs/by-name/so/solana-cli/package.nix b/pkgs/by-name/so/solana-cli/package.nix index e82849b9685f..614be9acbc5f 100644 --- a/pkgs/by-name/so/solana-cli/package.nix +++ b/pkgs/by-name/so/solana-cli/package.nix @@ -70,8 +70,8 @@ rustPlatform.buildRustPackage rec { nativeBuildInputs = [ installShellFiles protobuf pkg-config ]; buildInputs = [ openssl rustPlatform.bindgenHook ] - ++ lib.optionals stdenv.isLinux [ udev ] - ++ lib.optionals stdenv.isDarwin [ + ++ lib.optionals stdenv.hostPlatform.isLinux [ udev ] + ++ lib.optionals stdenv.hostPlatform.isDarwin [ libcxx IOKit Security @@ -96,8 +96,8 @@ rustPlatform.buildRustPackage rec { # Require this on darwin otherwise the compiler starts rambling about missing # cmath functions - CPPFLAGS = lib.optionals stdenv.isDarwin "-isystem ${lib.getDev libcxx}/include/c++/v1"; - LDFLAGS = lib.optionals stdenv.isDarwin "-L${lib.getLib libcxx}/lib"; + CPPFLAGS = lib.optionals stdenv.hostPlatform.isDarwin "-isystem ${lib.getDev libcxx}/include/c++/v1"; + LDFLAGS = lib.optionals stdenv.hostPlatform.isDarwin "-L${lib.getLib libcxx}/lib"; # If set, always finds OpenSSL in the system, even if the vendored feature is enabled. OPENSSL_NO_VENDOR = 1; diff --git a/pkgs/by-name/so/sonic-server/package.nix b/pkgs/by-name/so/sonic-server/package.nix index 62857f464dfc..bc10180a540c 100644 --- a/pkgs/by-name/so/sonic-server/package.nix +++ b/pkgs/by-name/so/sonic-server/package.nix @@ -26,7 +26,7 @@ rustPlatform.buildRustPackage rec { rustPlatform.bindgenHook ]; - env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.isDarwin "-faligned-allocation"; + env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.hostPlatform.isDarwin "-faligned-allocation"; postPatch = '' substituteInPlace src/main.rs \ diff --git a/pkgs/by-name/so/sound-of-sorting/package.nix b/pkgs/by-name/so/sound-of-sorting/package.nix index c6cb6e6a1cf9..b7b14312e358 100644 --- a/pkgs/by-name/so/sound-of-sorting/package.nix +++ b/pkgs/by-name/so/sound-of-sorting/package.nix @@ -26,7 +26,7 @@ stdenv.mkDerivation (finalAttrs: { wxGTK32 SDL2 ] - ++ lib.optionals stdenv.isDarwin [ + ++ lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.Cocoa ]; diff --git a/pkgs/by-name/so/soupault/package.nix b/pkgs/by-name/so/soupault/package.nix index 615fd3dc7b9e..9912146eb165 100644 --- a/pkgs/by-name/so/soupault/package.nix +++ b/pkgs/by-name/so/soupault/package.nix @@ -21,7 +21,7 @@ ocamlPackages.buildDunePackage rec { hash = "sha256-UABbrNNcNaN9NgtAjCs4HUoNXMaK4QvCuWERuEnMG6I="; }; - nativeBuildInputs = lib.optionals (stdenv.isDarwin && stdenv.isAarch64) [ darwin.sigtool ]; + nativeBuildInputs = lib.optionals (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isAarch64) [ darwin.sigtool ]; buildInputs = with ocamlPackages; [ base64 diff --git a/pkgs/by-name/so/sourcery/package.nix b/pkgs/by-name/so/sourcery/package.nix index 79f469347a89..62cf70fde673 100644 --- a/pkgs/by-name/so/sourcery/package.nix +++ b/pkgs/by-name/so/sourcery/package.nix @@ -30,7 +30,7 @@ python3Packages.buildPythonApplication rec { inherit (platformInfo) platform hash; }; - nativeBuildInputs = lib.optionals stdenv.isLinux [ autoPatchelfHook ]; + nativeBuildInputs = lib.optionals stdenv.hostPlatform.isLinux [ autoPatchelfHook ]; buildInputs = [ zlib ]; diff --git a/pkgs/by-name/sp/spacedrive/package.nix b/pkgs/by-name/sp/spacedrive/package.nix index cf3ca6f0639a..89fa1d158208 100644 --- a/pkgs/by-name/sp/spacedrive/package.nix +++ b/pkgs/by-name/sp/spacedrive/package.nix @@ -59,7 +59,7 @@ let passthru.updateScript = nix-update-script { }; in -if stdenv.isDarwin then +if stdenv.hostPlatform.isDarwin then stdenv.mkDerivation { inherit pname diff --git a/pkgs/by-name/sp/spade/package.nix b/pkgs/by-name/sp/spade/package.nix index e154d7ccfd4e..6612f355a1fd 100644 --- a/pkgs/by-name/sp/spade/package.nix +++ b/pkgs/by-name/sp/spade/package.nix @@ -41,8 +41,8 @@ rustPlatform.buildRustPackage rec { '') ]; - buildInputs = lib.optionals stdenv.isDarwin [ python312 ]; - env.NIX_CFLAGS_LINK = lib.optionals stdenv.isDarwin "-L${python312}/lib/python3.12/config-3.12-darwin -lpython3.12"; + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ python312 ]; + env.NIX_CFLAGS_LINK = lib.optionals stdenv.hostPlatform.isDarwin "-L${python312}/lib/python3.12/config-3.12-darwin -lpython3.12"; meta = with lib; { description = "Better hardware description language"; diff --git a/pkgs/by-name/sp/spades/package.nix b/pkgs/by-name/sp/spades/package.nix index daa748087b3c..2270ba33909d 100644 --- a/pkgs/by-name/sp/spades/package.nix +++ b/pkgs/by-name/sp/spades/package.nix @@ -53,7 +53,7 @@ stdenv.mkDerivation (finalAttrs: { readline ]; - env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.isDarwin "-faligned-allocation"; + env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.hostPlatform.isDarwin "-faligned-allocation"; doCheck = true; diff --git a/pkgs/by-name/sp/spfft/package.nix b/pkgs/by-name/sp/spfft/package.nix index 65e98b92b4f2..9423978ed24e 100644 --- a/pkgs/by-name/sp/spfft/package.nix +++ b/pkgs/by-name/sp/spfft/package.nix @@ -46,7 +46,7 @@ stdenv.mkDerivation rec { rocmPackages.clr rocmPackages.rocfft rocmPackages.hipfft - ] ++ lib.optional stdenv.isDarwin llvmPackages.openmp + ] ++ lib.optional stdenv.hostPlatform.isDarwin llvmPackages.openmp ; cmakeFlags = [ diff --git a/pkgs/by-name/sp/spla/package.nix b/pkgs/by-name/sp/spla/package.nix index eccf87258ace..2e07da1cdb02 100644 --- a/pkgs/by-name/sp/spla/package.nix +++ b/pkgs/by-name/sp/spla/package.nix @@ -51,7 +51,7 @@ stdenv.mkDerivation rec { ++ lib.optionals (gpuBackend == "rocm") [ rocmPackages.clr rocmPackages.rocblas - ] ++ lib.optional stdenv.isDarwin llvmPackages.openmp + ] ++ lib.optional stdenv.hostPlatform.isDarwin llvmPackages.openmp ; cmakeFlags = [ diff --git a/pkgs/by-name/sp/spotifyd/package.nix b/pkgs/by-name/sp/spotifyd/package.nix index 2a9bd5394eb0..45cce2754754 100644 --- a/pkgs/by-name/sp/spotifyd/package.nix +++ b/pkgs/by-name/sp/spotifyd/package.nix @@ -6,15 +6,15 @@ rustPackages, pkg-config, openssl, - withALSA ? stdenv.isLinux, + withALSA ? stdenv.hostPlatform.isLinux, alsa-lib, - withJack ? stdenv.isLinux, + withJack ? stdenv.hostPlatform.isLinux, libjack2, - withPulseAudio ? config.pulseaudio or stdenv.isLinux, + withPulseAudio ? config.pulseaudio or stdenv.hostPlatform.isLinux, libpulseaudio, - withPortAudio ? stdenv.isDarwin, + withPortAudio ? stdenv.hostPlatform.isDarwin, portaudio, - withMpris ? stdenv.isLinux, + withMpris ? stdenv.hostPlatform.isLinux, withKeyring ? true, dbus, nix-update-script, @@ -38,14 +38,14 @@ rustPackages.rustPlatform.buildRustPackage rec { nativeBuildInputs = [ pkg-config ]; buildInputs = - lib.optionals stdenv.isLinux [ openssl ] + lib.optionals stdenv.hostPlatform.isLinux [ openssl ] ++ lib.optional (withALSA || withJack) alsa-lib ++ lib.optional withJack libjack2 ++ lib.optional withPulseAudio libpulseaudio ++ lib.optional withPortAudio portaudio # The `dbus_keying` feature works on other platforms, but only requires # `dbus` on Linux - ++ lib.optional ((withMpris || withKeyring) && stdenv.isLinux) dbus; + ++ lib.optional ((withMpris || withKeyring) && stdenv.hostPlatform.isLinux) dbus; buildNoDefaultFeatures = true; buildFeatures = diff --git a/pkgs/by-name/sp/spotube/package.nix b/pkgs/by-name/sp/spotube/package.nix index 38be57a23ebe..89b6a84b5174 100644 --- a/pkgs/by-name/sp/spotube/package.nix +++ b/pkgs/by-name/sp/spotube/package.nix @@ -122,4 +122,4 @@ let ''; }; in -if stdenv.isDarwin then darwin else linux +if stdenv.hostPlatform.isDarwin then darwin else linux diff --git a/pkgs/by-name/sp/spral/package.nix b/pkgs/by-name/sp/spral/package.nix index 720f0137338b..19fc5c5a5ff0 100644 --- a/pkgs/by-name/sp/spral/package.nix +++ b/pkgs/by-name/sp/spral/package.nix @@ -30,7 +30,7 @@ stdenv.mkDerivation rec { "subdir('ssids')" \ "" '' - + lib.optionalString stdenv.isDarwin '' + + lib.optionalString stdenv.hostPlatform.isDarwin '' # Skipped test: lsmrt, segfault substituteInPlace tests/meson.build --replace-fail \ "['lsmrt', files('lsmr.f90')]," \ @@ -47,11 +47,11 @@ stdenv.mkDerivation rec { blas lapack metis - ] ++ lib.optionals stdenv.isDarwin [ llvmPackages.openmp ]; + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ llvmPackages.openmp ]; mesonFlags = [ (lib.mesonBool "tests" true) ]; - LDFLAGS = lib.optionals stdenv.isDarwin [ "-lomp" ]; + LDFLAGS = lib.optionals stdenv.hostPlatform.isDarwin [ "-lomp" ]; doCheck = true; diff --git a/pkgs/by-name/sq/sqlite-vss/package.nix b/pkgs/by-name/sq/sqlite-vss/package.nix index 5f25699c9920..bc3612ceebe0 100644 --- a/pkgs/by-name/sq/sqlite-vss/package.nix +++ b/pkgs/by-name/sq/sqlite-vss/package.nix @@ -25,8 +25,8 @@ stdenv.mkDerivation (finalAttrs: { nativeBuildInputs = [ cmake ]; buildInputs = [ nlohmann_json faiss sqlite ] - ++ lib.optional stdenv.isLinux gomp - ++ lib.optional stdenv.isDarwin llvmPackages.openmp; + ++ lib.optional stdenv.hostPlatform.isLinux gomp + ++ lib.optional stdenv.hostPlatform.isDarwin llvmPackages.openmp; SQLITE_VSS_CMAKE_VERSION = finalAttrs.version; diff --git a/pkgs/by-name/sq/squeezelite/package.nix b/pkgs/by-name/sq/squeezelite/package.nix index 41d5f8c9d343..5a07d3da948d 100644 --- a/pkgs/by-name/sq/squeezelite/package.nix +++ b/pkgs/by-name/sq/squeezelite/package.nix @@ -9,8 +9,8 @@ libpulseaudio, libvorbis, mpg123, - audioBackend ? if stdenv.isLinux then "alsa" else "portaudio", - alsaSupport ? stdenv.isLinux, + audioBackend ? if stdenv.hostPlatform.isLinux then "alsa" else "portaudio", + alsaSupport ? stdenv.hostPlatform.isLinux, alsa-lib, dsdSupport ? true, faad2Support ? true, @@ -23,7 +23,7 @@ soxr, sslSupport ? true, openssl, - portaudioSupport ? stdenv.isDarwin, + portaudioSupport ? stdenv.hostPlatform.isDarwin, portaudio, slimserver, }: @@ -59,7 +59,7 @@ stdenv.mkDerivation { ++ optional pulseSupport libpulseaudio ++ optional alsaSupport alsa-lib ++ optional portaudioSupport portaudio - ++ optionals stdenv.isDarwin ( + ++ optionals stdenv.hostPlatform.isDarwin ( with darwin.apple_sdk_11_0.frameworks; [ CoreVideo @@ -75,7 +75,7 @@ stdenv.mkDerivation { ++ optional opusSupport opusfile ++ optional resampleSupport soxr ++ optional sslSupport openssl - ++ optional (stdenv.isAarch32 or stdenv.isAarch64) libgpiod; + ++ optional (stdenv.hostPlatform.isAarch32 or stdenv.hostPlatform.isAarch64) libgpiod; enableParallelBuilding = true; @@ -99,9 +99,9 @@ stdenv.mkDerivation { ++ optional pulseSupport "-DPULSEAUDIO" ++ optional resampleSupport "-DRESAMPLE" ++ optional sslSupport "-DUSE_SSL" - ++ optional (stdenv.isAarch32 or stdenv.isAarch64) "-DRPI"; + ++ optional (stdenv.hostPlatform.isAarch32 or stdenv.hostPlatform.isAarch64) "-DRPI"; - env = lib.optionalAttrs stdenv.isDarwin { LDADD = "-lportaudio -lpthread"; }; + env = lib.optionalAttrs stdenv.hostPlatform.isDarwin { LDADD = "-lportaudio -lpthread"; }; installPhase = '' runHook preInstall diff --git a/pkgs/by-name/ss/ssh-askpass-fullscreen/package.nix b/pkgs/by-name/ss/ssh-askpass-fullscreen/package.nix index e677562fe3ed..0b192024f239 100644 --- a/pkgs/by-name/ss/ssh-askpass-fullscreen/package.nix +++ b/pkgs/by-name/ss/ssh-askpass-fullscreen/package.nix @@ -32,7 +32,7 @@ stdenv.mkDerivation (finalAttrs: { meta = { homepage = "https://github.com/atj/ssh-askpass-fullscreen"; - broken = stdenv.isDarwin; + broken = stdenv.hostPlatform.isDarwin; description = "Small, fullscreen SSH askpass GUI using GTK+2"; license = with lib.licenses; [ gpl2Plus ]; mainProgram = "ssh-askpass-fullscreen"; diff --git a/pkgs/by-name/ss/ssh-openpgp-auth/generic.nix b/pkgs/by-name/ss/ssh-openpgp-auth/generic.nix index 47edd91a4f3c..4cfe2b6ec7c4 100644 --- a/pkgs/by-name/ss/ssh-openpgp-auth/generic.nix +++ b/pkgs/by-name/ss/ssh-openpgp-auth/generic.nix @@ -59,7 +59,7 @@ rustPlatform.buildRustPackage { nettle openssl sqlite - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk_11_0.frameworks.CoreFoundation darwin.apple_sdk_11_0.frameworks.IOKit darwin.apple_sdk_11_0.frameworks.Security diff --git a/pkgs/by-name/ss/sshesame/package.nix b/pkgs/by-name/ss/sshesame/package.nix index ac9f9b2a55f8..8f600712becc 100644 --- a/pkgs/by-name/ss/sshesame/package.nix +++ b/pkgs/by-name/ss/sshesame/package.nix @@ -20,7 +20,7 @@ buildGoModule rec { ldflags = [ "-s" "-w" ]; - hardeningEnable = lib.optionals (!stdenv.isDarwin) [ "pie" ]; + hardeningEnable = lib.optionals (!stdenv.hostPlatform.isDarwin) [ "pie" ]; passthru.updateScript = nix-update-script { }; diff --git a/pkgs/by-name/st/stalwart-mail/package.nix b/pkgs/by-name/st/stalwart-mail/package.nix index 7175714c8778..06392d8afc18 100644 --- a/pkgs/by-name/st/stalwart-mail/package.nix +++ b/pkgs/by-name/st/stalwart-mail/package.nix @@ -63,17 +63,17 @@ rustPlatform.buildRustPackage { openssl sqlite zstd - ] ++ lib.optionals stdenv.isLinux [ + ] ++ lib.optionals stdenv.hostPlatform.isLinux [ foundationdb - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.CoreFoundation darwin.apple_sdk.frameworks.Security darwin.apple_sdk.frameworks.SystemConfiguration ]; # skip defaults on darwin because foundationdb is not available - buildNoDefaultFeatures = stdenv.isDarwin; - buildFeatures = lib.optional (stdenv.isDarwin) [ "sqlite" "postgres" "mysql" "rocks" "elastic" "s3" "redis" ]; + buildNoDefaultFeatures = stdenv.hostPlatform.isDarwin; + buildFeatures = lib.optional (stdenv.hostPlatform.isDarwin) [ "sqlite" "postgres" "mysql" "rocks" "elastic" "s3" "redis" ]; env = { OPENSSL_NO_VENDOR = true; @@ -146,7 +146,7 @@ rustPlatform.buildRustPackage { "--skip=smtp::inbound::vrfy::vrfy_expn" ]; - doCheck = !(stdenv.isLinux && stdenv.isAarch64); + doCheck = !(stdenv.hostPlatform.isLinux && stdenv.hostPlatform.isAarch64); passthru = { webadmin = callPackage ./webadmin.nix { }; diff --git a/pkgs/by-name/st/static-server/package.nix b/pkgs/by-name/st/static-server/package.nix index 4ec8b8c20852..3be8eec4b80d 100644 --- a/pkgs/by-name/st/static-server/package.nix +++ b/pkgs/by-name/st/static-server/package.nix @@ -36,7 +36,7 @@ buildGoModule rec { ldflags = [ "-s" "-w" ]; # tests sometimes fail with SIGQUIT on darwin - doCheck = !stdenv.isDarwin; + doCheck = !stdenv.hostPlatform.isDarwin; passthru.tests = { version = testers.testVersion { diff --git a/pkgs/by-name/st/stormlib/package.nix b/pkgs/by-name/st/stormlib/package.nix index 90a748ca801f..090ada0d89f7 100644 --- a/pkgs/by-name/st/stormlib/package.nix +++ b/pkgs/by-name/st/stormlib/package.nix @@ -29,7 +29,7 @@ stdenv.mkDerivation (finalAttrs: { libtomcrypt zlib ] - ++ lib.optionals stdenv.isDarwin [ + ++ lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.Carbon ]; @@ -56,6 +56,6 @@ stdenv.mkDerivation (finalAttrs: { license = lib.licenses.mit; maintainers = with lib.maintainers; [ aanderse karolchmist ]; platforms = lib.platforms.all; - broken = stdenv.isDarwin; # installation directory mismatch + broken = stdenv.hostPlatform.isDarwin; # installation directory mismatch }; }) diff --git a/pkgs/by-name/st/streamdeck-ui/package.nix b/pkgs/by-name/st/streamdeck-ui/package.nix index 9f68a707bfca..c739ffa83e0b 100644 --- a/pkgs/by-name/st/streamdeck-ui/package.nix +++ b/pkgs/by-name/st/streamdeck-ui/package.nix @@ -52,7 +52,7 @@ python3Packages.buildPythonApplication rec { importlib-metadata evdev ] - ++ lib.optionals stdenv.isLinux [ qt6.qtwayland ]; + ++ lib.optionals stdenv.hostPlatform.isLinux [ qt6.qtwayland ]; nativeCheckInputs = [ xvfb-run ] diff --git a/pkgs/by-name/st/stu/package.nix b/pkgs/by-name/st/stu/package.nix index ab74d428cc50..95179b7bcf9e 100644 --- a/pkgs/by-name/st/stu/package.nix +++ b/pkgs/by-name/st/stu/package.nix @@ -23,7 +23,7 @@ rustPlatform.buildRustPackage { cargoHash = "sha256-/a91ONvKG6aRFAnHDkpOQQFtfGlO1WahWM9LdPs75iw="; - buildInputs = lib.optionals stdenv.isDarwin [ + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.AppKit darwin.apple_sdk.frameworks.CoreGraphics ]; diff --git a/pkgs/by-name/su/superscs/package.nix b/pkgs/by-name/su/superscs/package.nix index f558bec8a208..ae5fb5537be4 100644 --- a/pkgs/by-name/su/superscs/package.nix +++ b/pkgs/by-name/su/superscs/package.nix @@ -19,7 +19,7 @@ stdenv.mkDerivation (finalAttrs: { hash = "sha256-Qu7RM6Ew4hEmoIXO0utDDVmjmNX3yt3FxWZXCQ/Xjp4="; }; - postPatch = lib.optionalString stdenv.isDarwin '' + postPatch = lib.optionalString stdenv.hostPlatform.isDarwin '' substituteInPlace Makefile --replace-fail \ ".so" \ ".dylib" diff --git a/pkgs/by-name/su/supersonic/package.nix b/pkgs/by-name/su/supersonic/package.nix index a3674efe5d00..7964d31d9650 100644 --- a/pkgs/by-name/su/supersonic/package.nix +++ b/pkgs/by-name/su/supersonic/package.nix @@ -16,7 +16,7 @@ , waylandSupport ? false }: -assert waylandSupport -> stdenv.isLinux; +assert waylandSupport -> stdenv.hostPlatform.isLinux; buildGoModule rec { pname = "supersonic" + lib.optionalString waylandSupport "-wayland"; @@ -34,7 +34,7 @@ buildGoModule rec { nativeBuildInputs = [ copyDesktopItems pkg-config - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ desktopToDarwinBundle ]; @@ -44,20 +44,20 @@ buildGoModule rec { buildInputs = [ libglvnd mpv-unwrapped - ] ++ lib.optionals stdenv.isLinux [ + ] ++ lib.optionals stdenv.hostPlatform.isLinux [ xorg.libXxf86vm xorg.libX11 - ] ++ lib.optionals (stdenv.isLinux && !waylandSupport) [ + ] ++ lib.optionals (stdenv.hostPlatform.isLinux && !waylandSupport) [ xorg.libXrandr xorg.libXinerama xorg.libXcursor xorg.libXi xorg.libXext - ] ++ lib.optionals (stdenv.isLinux && waylandSupport) [ + ] ++ lib.optionals (stdenv.hostPlatform.isLinux && waylandSupport) [ wayland wayland-protocols libxkbcommon - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk_11_0.frameworks.Cocoa darwin.apple_sdk_11_0.frameworks.Kernel darwin.apple_sdk_11_0.frameworks.OpenGL diff --git a/pkgs/by-name/su/surrealdb/package.nix b/pkgs/by-name/su/surrealdb/package.nix index 9a0c443faa83..b12910e0a6d5 100644 --- a/pkgs/by-name/su/surrealdb/package.nix +++ b/pkgs/by-name/su/surrealdb/package.nix @@ -46,7 +46,7 @@ rustPlatform.buildRustPackage rec { ]; buildInputs = [ openssl ] - ++ lib.optionals stdenv.isDarwin [ darwin.apple_sdk.frameworks.SystemConfiguration ]; + ++ lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.SystemConfiguration ]; doCheck = false; diff --git a/pkgs/by-name/sv/svix-server/package.nix b/pkgs/by-name/sv/svix-server/package.nix index 16eaf01be24d..655214744904 100644 --- a/pkgs/by-name/sv/svix-server/package.nix +++ b/pkgs/by-name/sv/svix-server/package.nix @@ -27,7 +27,7 @@ rustPlatform.buildRustPackage rec { buildInputs = [ openssl protobuf - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.CoreServices darwin.apple_sdk.frameworks.Security darwin.apple_sdk.frameworks.SystemConfiguration @@ -50,6 +50,6 @@ rustPlatform.buildRustPackage rec { "https://github.com/svix/svix-webhooks/releases/tag/v${version}"; license = licenses.mit; maintainers = with maintainers; [ techknowlogick ]; - broken = stdenv.isx86_64 && stdenv.isDarwin; # aws-lc-sys currently broken on darwin x86_64 + broken = stdenv.hostPlatform.isx86_64 && stdenv.hostPlatform.isDarwin; # aws-lc-sys currently broken on darwin x86_64 }; } diff --git a/pkgs/by-name/sw/switcheroo/package.nix b/pkgs/by-name/sw/switcheroo/package.nix index 459f4a93793f..d61c2a722f69 100644 --- a/pkgs/by-name/sw/switcheroo/package.nix +++ b/pkgs/by-name/sw/switcheroo/package.nix @@ -50,7 +50,7 @@ stdenv.mkDerivation (finalAttrs: { glib gtk4 libadwaita - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.Foundation ]; diff --git a/pkgs/by-name/sy/symbolicator/package.nix b/pkgs/by-name/sy/symbolicator/package.nix index 35487a35401a..473f9d64d652 100644 --- a/pkgs/by-name/sy/symbolicator/package.nix +++ b/pkgs/by-name/sy/symbolicator/package.nix @@ -38,7 +38,7 @@ rustPlatform.buildRustPackage rec { bzip2 openssl zstd - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.Security darwin.apple_sdk.frameworks.SystemConfiguration ]; diff --git a/pkgs/by-name/sy/syncyomi/package.nix b/pkgs/by-name/sy/syncyomi/package.nix index ee2e6af318fc..81f2982a05be 100644 --- a/pkgs/by-name/sy/syncyomi/package.nix +++ b/pkgs/by-name/sy/syncyomi/package.nix @@ -70,7 +70,7 @@ buildGoModule rec { "-X main.version=v${version}" ]; - postInstall = lib.optionalString (!stdenvNoCC.isDarwin) '' + postInstall = lib.optionalString (!stdenvNoCC.hostPlatform.isDarwin) '' mv $out/bin/SyncYomi $out/bin/syncyomi ''; diff --git a/pkgs/by-name/sy/syntax/package.nix b/pkgs/by-name/sy/syntax/package.nix index eceffd5aa0b4..01b5ade160fb 100644 --- a/pkgs/by-name/sy/syntax/package.nix +++ b/pkgs/by-name/sy/syntax/package.nix @@ -25,6 +25,6 @@ buildNpmPackage rec { license = licenses.mit; maintainers = with maintainers; [ h7x4 ]; mainProgram = "syntax-cli"; - broken = stdenv.isDarwin; + broken = stdenv.hostPlatform.isDarwin; }; } diff --git a/pkgs/by-name/sy/systemctl-tui/package.nix b/pkgs/by-name/sy/systemctl-tui/package.nix index c2a1dbec6ff2..c220fcc8547a 100644 --- a/pkgs/by-name/sy/systemctl-tui/package.nix +++ b/pkgs/by-name/sy/systemctl-tui/package.nix @@ -20,7 +20,7 @@ rustPlatform.buildRustPackage rec { cargoHash = "sha256-6cFK1wMO5VICfi3tN140XH9inQOkkSfHVogKhTHtQb8="; - buildInputs = lib.optionals stdenv.isDarwin [ darwin.apple_sdk.frameworks.AppKit ]; + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.AppKit ]; passthru = { updateScript = nix-update-script; diff --git a/pkgs/by-name/t-/t-rex/package.nix b/pkgs/by-name/t-/t-rex/package.nix index f26592e052d0..7c92e49182dd 100644 --- a/pkgs/by-name/t-/t-rex/package.nix +++ b/pkgs/by-name/t-/t-rex/package.nix @@ -16,7 +16,7 @@ rustPlatform.buildRustPackage rec { nativeBuildInputs = [ pkg-config rustPlatform.bindgenHook ]; buildInputs = [ gdal openssl ] - ++ lib.optional stdenv.isDarwin darwin.apple_sdk.frameworks.Security; + ++ lib.optional stdenv.hostPlatform.isDarwin darwin.apple_sdk.frameworks.Security; meta = with lib; { description = "Vector tile server specialized on publishing MVT tiles"; diff --git a/pkgs/by-name/ta/tabby/package.nix b/pkgs/by-name/ta/tabby/package.nix index 4ebc77e741b1..df01b5c4940a 100644 --- a/pkgs/by-name/ta/tabby/package.nix +++ b/pkgs/by-name/ta/tabby/package.nix @@ -19,7 +19,7 @@ , rocmSupport ? config.rocmSupport , darwin -, metalSupport ? stdenv.isDarwin && stdenv.isAarch64 +, metalSupport ? stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isAarch64 # one of [ null "cpu" "rocm" "cuda" "metal" ]; , acceleration ? null @@ -55,16 +55,16 @@ let # If user did not not override the acceleration attribute, then try to use one of # - nixpkgs.config.cudaSupport # - nixpkgs.config.rocmSupport - # - metal if (stdenv.isDarwin && stdenv.isAarch64) + # - metal if (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isAarch64) # !! warn if multiple acceleration methods are enabled and default to the first one in the list featureDevice = if (builtins.isNull acceleration) then (warnIfMultipleAccelerationMethods availableAccelerations) else acceleration; - warnIfNotLinux = api: (lib.warnIfNot stdenv.isLinux + warnIfNotLinux = api: (lib.warnIfNot stdenv.hostPlatform.isLinux "building tabby with `${api}` is only supported on linux; falling back to cpu" - stdenv.isLinux); - warnIfNotDarwinAarch64 = api: (lib.warnIfNot (stdenv.isDarwin && stdenv.isAarch64) + stdenv.hostPlatform.isLinux); + warnIfNotDarwinAarch64 = api: (lib.warnIfNot (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isAarch64) "building tabby with `${api}` is only supported on Darwin-aarch64; falling back to cpu" - (stdenv.isDarwin && stdenv.isAarch64)); + (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isAarch64)); validAccel = lib.assertOneOf "tabby.featureDevice" featureDevice [ "cpu" "rocm" "cuda" "metal" ]; @@ -88,7 +88,7 @@ let # TODO(ghthor): some of this can be removed darwinBuildInputs = [ llamaccpPackage ] - ++ optionals stdenv.isDarwin (with darwin.apple_sdk.frameworks; [ + ++ optionals stdenv.hostPlatform.isDarwin (with darwin.apple_sdk.frameworks; [ Foundation Accelerate CoreVideo @@ -143,7 +143,7 @@ rustPlatform.buildRustPackage { ]; buildInputs = [ openssl ] - ++ optionals stdenv.isDarwin darwinBuildInputs + ++ optionals stdenv.hostPlatform.isDarwin darwinBuildInputs ++ optionals enableCuda cudaBuildInputs ++ optionals enableRocm rocmBuildInputs ; @@ -164,6 +164,6 @@ rustPlatform.buildRustPackage { mainProgram = "tabby"; license = licenses.asl20; maintainers = [ maintainers.ghthor ]; - broken = stdenv.isDarwin && !stdenv.isAarch64; + broken = stdenv.hostPlatform.isDarwin && !stdenv.hostPlatform.isAarch64; }; } diff --git a/pkgs/by-name/ta/tailscale-nginx-auth/package.nix b/pkgs/by-name/ta/tailscale-nginx-auth/package.nix index 919a2e77a66b..9423cb2e46a6 100644 --- a/pkgs/by-name/ta/tailscale-nginx-auth/package.nix +++ b/pkgs/by-name/ta/tailscale-nginx-auth/package.nix @@ -15,7 +15,7 @@ buildGo123Module { "-X tailscale.com/version.shortStamp=${tailscale.version}" ]; - postInstall = lib.optionalString stdenv.isLinux '' + postInstall = lib.optionalString stdenv.hostPlatform.isLinux '' mv $out/bin/nginx-auth $out/bin/tailscale.nginx-auth sed -i -e "s#/usr/sbin#$out/bin#" ./cmd/nginx-auth/tailscale.nginx-auth.service install -D -m0444 -t $out/lib/systemd/system ./cmd/nginx-auth/tailscale.nginx-auth.service diff --git a/pkgs/by-name/ta/tailwindcss-language-server/package.nix b/pkgs/by-name/ta/tailwindcss-language-server/package.nix index 06865660f79c..f536741b60d8 100644 --- a/pkgs/by-name/ta/tailwindcss-language-server/package.nix +++ b/pkgs/by-name/ta/tailwindcss-language-server/package.nix @@ -26,7 +26,7 @@ buildNpmPackage { npmDepsHash = "sha256-T7YNHunncSv+z86Td1QuBt4dMGF1ipo85ZhW7U9I0Zw="; npmWorkspace = "packages/tailwindcss-language-server"; - buildInputs = [ libsecret ] ++ lib.optionals stdenv.isDarwin (with darwin.apple_sdk.frameworks; [ Security AppKit ]); + buildInputs = [ libsecret ] ++ lib.optionals stdenv.hostPlatform.isDarwin (with darwin.apple_sdk.frameworks; [ Security AppKit ]); nativeBuildInputs = [ python3 pkg-config ]; diff --git a/pkgs/by-name/ta/talecast/package.nix b/pkgs/by-name/ta/talecast/package.nix index df0f994d5144..e18d5fd5f22c 100644 --- a/pkgs/by-name/ta/talecast/package.nix +++ b/pkgs/by-name/ta/talecast/package.nix @@ -25,7 +25,7 @@ rustPlatform.buildRustPackage rec { nativeBuildInputs = [ pkg-config ]; buildInputs = [ openssl ] - ++ lib.optionals stdenv.isDarwin [ darwin.apple_sdk.frameworks.SystemConfiguration ]; + ++ lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.SystemConfiguration ]; passthru = { updateScript = nix-update-script { }; diff --git a/pkgs/by-name/ta/taler-depolymerization/package.nix b/pkgs/by-name/ta/taler-depolymerization/package.nix index 49e14d438d77..d61478b32583 100644 --- a/pkgs/by-name/ta/taler-depolymerization/package.nix +++ b/pkgs/by-name/ta/taler-depolymerization/package.nix @@ -35,7 +35,7 @@ rustPlatform.buildRustPackage { cp docs/*.conf $out/share/examples ''; - buildInputs = lib.optionals stdenv.isDarwin ( + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin ( with darwin.apple_sdk.frameworks; [ CoreFoundation diff --git a/pkgs/by-name/ta/tangerine/package.nix b/pkgs/by-name/ta/tangerine/package.nix index 5615d441b80b..1ec2d6b362b9 100644 --- a/pkgs/by-name/ta/tangerine/package.nix +++ b/pkgs/by-name/ta/tangerine/package.nix @@ -34,7 +34,7 @@ stdenv.mkDerivation { homepage = "https://github.com/Aeva/tangerine"; license = licenses.asl20; maintainers = [ maintainers.viraptor ]; - broken = stdenv.isDarwin; # third_party/naive-surface-nets doesn't find std::execution + broken = stdenv.hostPlatform.isDarwin; # third_party/naive-surface-nets doesn't find std::execution }; } diff --git a/pkgs/by-name/ta/tartan/package.nix b/pkgs/by-name/ta/tartan/package.nix index d73ffdf99bb5..56c18653dfb2 100644 --- a/pkgs/by-name/ta/tartan/package.nix +++ b/pkgs/by-name/ta/tartan/package.nix @@ -44,7 +44,7 @@ stdenv.mkDerivation { }; meta = with lib; { - broken = stdenv.isDarwin; + broken = stdenv.hostPlatform.isDarwin; description = "Tools and Clang plugins for developing code with GLib"; homepage = "https://gitlab.freedesktop.org/tartan/tartan"; changelog = "https://gitlab.freedesktop.org/tartan/tartan/-/blob/main/NEWS"; diff --git a/pkgs/by-name/ta/taskwarrior3/package.nix b/pkgs/by-name/ta/taskwarrior3/package.nix index 26b8d8ecd32c..4be5fdd072c4 100644 --- a/pkgs/by-name/ta/taskwarrior3/package.nix +++ b/pkgs/by-name/ta/taskwarrior3/package.nix @@ -41,7 +41,7 @@ stdenv.mkDerivation rec { rustc rustPlatform.cargoSetupHook ] - ++ lib.optionals stdenv.isDarwin [ + ++ lib.optionals stdenv.hostPlatform.isDarwin [ # darwin dependencies darwin.apple_sdk.frameworks.Security darwin.apple_sdk.frameworks.SystemConfiguration diff --git a/pkgs/by-name/te/teams-for-linux/package.nix b/pkgs/by-name/te/teams-for-linux/package.nix index 4c532f453800..c1ecf1a4bb1e 100644 --- a/pkgs/by-name/te/teams-for-linux/package.nix +++ b/pkgs/by-name/te/teams-for-linux/package.nix @@ -29,9 +29,9 @@ buildNpmPackage rec { nativeBuildInputs = [ makeWrapper versionCheckHook - ] ++ lib.optionals (stdenv.isLinux) [ copyDesktopItems ]; + ] ++ lib.optionals (stdenv.hostPlatform.isLinux) [ copyDesktopItems ]; - doInstallCheck = stdenv.isLinux; + doInstallCheck = stdenv.hostPlatform.isLinux; env = { # disable code signing on Darwin @@ -60,7 +60,7 @@ buildNpmPackage rec { runHook preInstall '' - + lib.optionalString stdenv.isLinux '' + + lib.optionalString stdenv.hostPlatform.isLinux '' mkdir -p $out/share/{applications,teams-for-linux} cp dist/*-unpacked/resources/app.asar $out/share/teams-for-linux/ @@ -82,7 +82,7 @@ buildNpmPackage rec { --add-flags "$out/share/teams-for-linux/app.asar" \ --add-flags "\''${NIXOS_OZONE_WL:+\''${WAYLAND_DISPLAY:+--ozone-platform-hint=auto --enable-features=WaylandWindowDecorations}}" '' - + lib.optionalString stdenv.isDarwin '' + + lib.optionalString stdenv.hostPlatform.isDarwin '' mkdir -p $out/Applications cp -r dist/mac*/teams-for-linux.app $out/Applications makeWrapper $out/Applications/teams-for-linux.app/Contents/MacOS/teams-for-linux $out/bin/teams-for-linux diff --git a/pkgs/by-name/te/telegraf/package.nix b/pkgs/by-name/te/telegraf/package.nix index bda948d342aa..cb98c85bf45b 100644 --- a/pkgs/by-name/te/telegraf/package.nix +++ b/pkgs/by-name/te/telegraf/package.nix @@ -34,7 +34,7 @@ buildGo123Module rec { version = testers.testVersion { package = telegraf; }; - } // lib.optionalAttrs stdenv.isLinux { + } // lib.optionalAttrs stdenv.hostPlatform.isLinux { inherit (nixosTests) telegraf; }; diff --git a/pkgs/by-name/te/telescope/package.nix b/pkgs/by-name/te/telescope/package.nix index 1a4db30c9058..801cae0b123c 100644 --- a/pkgs/by-name/te/telescope/package.nix +++ b/pkgs/by-name/te/telescope/package.nix @@ -39,7 +39,7 @@ stdenv.mkDerivation rec { libgrapheme libressl ncurses - ] ++ lib.optional stdenv.isDarwin memstreamHook; + ] ++ lib.optional stdenv.hostPlatform.isDarwin memstreamHook; configureFlags = [ "HOSTCC=${buildPackages.stdenv.cc}/bin/${buildPackages.stdenv.cc.targetPrefix}cc" diff --git a/pkgs/by-name/th/the-legend-of-edgar/package.nix b/pkgs/by-name/th/the-legend-of-edgar/package.nix index 509c6e65524b..5ab2fd0858a6 100644 --- a/pkgs/by-name/th/the-legend-of-edgar/package.nix +++ b/pkgs/by-name/th/the-legend-of-edgar/package.nix @@ -68,6 +68,6 @@ stdenv.mkDerivation (finalAttrs: { mainProgram = "edgar"; maintainers = with lib.maintainers; [ AndersonTorres ]; platforms = lib.platforms.unix; - broken = stdenv.isDarwin; + broken = stdenv.hostPlatform.isDarwin; }; }) diff --git a/pkgs/by-name/th/the-powder-toy/package.nix b/pkgs/by-name/th/the-powder-toy/package.nix index 25da4e5d8818..771965b4068a 100644 --- a/pkgs/by-name/th/the-powder-toy/package.nix +++ b/pkgs/by-name/th/the-powder-toy/package.nix @@ -32,7 +32,7 @@ stdenv.mkDerivation rec { meson ninja pkg-config - ] ++ lib.optional stdenv.isLinux copyDesktopItems; + ] ++ lib.optional stdenv.hostPlatform.isLinux copyDesktopItems; buildInputs = [ bzip2 @@ -44,7 +44,7 @@ stdenv.mkDerivation rec { luajit SDL2 zlib - ] ++ lib.optional stdenv.isDarwin Cocoa; + ] ++ lib.optional stdenv.hostPlatform.isDarwin Cocoa; mesonFlags = [ "-Dworkaround_elusive_bzip2=false" ]; diff --git a/pkgs/by-name/th/thefuck/package.nix b/pkgs/by-name/th/thefuck/package.nix index 7d908b9f8d99..e0cd1b7b5d0c 100644 --- a/pkgs/by-name/th/thefuck/package.nix +++ b/pkgs/by-name/th/thefuck/package.nix @@ -33,7 +33,7 @@ python311Packages.buildPythonApplication rec { pytest-mock ]); - disabledTests = lib.optionals stdenv.isDarwin [ + disabledTests = lib.optionals stdenv.hostPlatform.isDarwin [ "test_settings_defaults" "test_from_file" "test_from_env" diff --git a/pkgs/by-name/th/thonny/package.nix b/pkgs/by-name/th/thonny/package.nix index 91c40a3c7b3c..445a7954dfdc 100644 --- a/pkgs/by-name/th/thonny/package.nix +++ b/pkgs/by-name/th/thonny/package.nix @@ -21,7 +21,7 @@ buildPythonApplication rec { hash = "sha256-/ms2RESnV3bsJpK1zYYLHNUu1FtA6PntaseTbKMfUMc="; }; - nativeBuildInputs = [ copyDesktopItems ] ++ lib.optional stdenv.isDarwin desktopToDarwinBundle; + nativeBuildInputs = [ copyDesktopItems ] ++ lib.optional stdenv.hostPlatform.isDarwin desktopToDarwinBundle; desktopItems = [ (makeDesktopItem { @@ -51,7 +51,7 @@ buildPythonApplication rec { asttokens send2trash ] - ++ lib.optionals stdenv.isLinux [ + ++ lib.optionals stdenv.hostPlatform.isLinux [ dbus-next ] ); diff --git a/pkgs/by-name/ti/tidgi/package.nix b/pkgs/by-name/ti/tidgi/package.nix index 20f0b4a194d1..0717dd8239f4 100644 --- a/pkgs/by-name/ti/tidgi/package.nix +++ b/pkgs/by-name/ti/tidgi/package.nix @@ -9,7 +9,7 @@ stdenv.mkDerivation rec { version = "0.9.6"; src = - if stdenv.isAarch64 + if stdenv.hostPlatform.isAarch64 then fetchurl { diff --git a/pkgs/by-name/ti/tinymist/package.nix b/pkgs/by-name/ti/tinymist/package.nix index 9928080dd117..53d749a50acb 100644 --- a/pkgs/by-name/ti/tinymist/package.nix +++ b/pkgs/by-name/ti/tinymist/package.nix @@ -44,7 +44,7 @@ rustPlatform.buildRustPackage rec { openssl zlib ] - ++ lib.optionals stdenv.isDarwin [ + ++ lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk_11_0.frameworks.CoreFoundation darwin.apple_sdk_11_0.frameworks.CoreServices darwin.apple_sdk_11_0.frameworks.Security diff --git a/pkgs/by-name/tl/tlclient/package.nix b/pkgs/by-name/tl/tlclient/package.nix index a789d391ccbe..04dc61b4e703 100644 --- a/pkgs/by-name/tl/tlclient/package.nix +++ b/pkgs/by-name/tl/tlclient/package.nix @@ -72,7 +72,7 @@ stdenv.mkDerivation ( changelog = "https://www.cendio.com/thinlinc/docs/relnotes/${version}/"; maintainers = with lib.maintainers; [ felixalbrigtsen ]; platforms = with lib.platforms; linux ++ darwin ++ windows; - broken = !(stdenv.isLinux && stdenv.isx86_64); + broken = !(stdenv.hostPlatform.isLinux && stdenv.hostPlatform.isx86_64); mainProgram = "tlclient"; }; } diff --git a/pkgs/by-name/tl/tlrc/package.nix b/pkgs/by-name/tl/tlrc/package.nix index e0e46552352a..86e9fe7861b8 100644 --- a/pkgs/by-name/tl/tlrc/package.nix +++ b/pkgs/by-name/tl/tlrc/package.nix @@ -21,7 +21,7 @@ rustPlatform.buildRustPackage rec { nativeBuildInputs = [ installShellFiles ]; - buildInputs = lib.optionals stdenv.isDarwin [ + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.Security ]; diff --git a/pkgs/by-name/to/tootik/package.nix b/pkgs/by-name/to/tootik/package.nix index 6eb9d0d715b3..1dc3a8db3c07 100644 --- a/pkgs/by-name/to/tootik/package.nix +++ b/pkgs/by-name/to/tootik/package.nix @@ -23,7 +23,7 @@ buildGoModule rec { tags = [ "fts5" ]; - doCheck = !(stdenv.isDarwin && stdenv.isAarch64); + doCheck = !(stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isAarch64); meta = { description = "Federated nanoblogging service with a Gemini frontend"; diff --git a/pkgs/by-name/to/tor-browser/package.nix b/pkgs/by-name/to/tor-browser/package.nix index 154f70c83e00..c0b1dfb33d42 100644 --- a/pkgs/by-name/to/tor-browser/package.nix +++ b/pkgs/by-name/to/tor-browser/package.nix @@ -29,10 +29,10 @@ , pciutils , zlib -, libnotifySupport ? stdenv.isLinux +, libnotifySupport ? stdenv.hostPlatform.isLinux , libnotify -, waylandSupport ? stdenv.isLinux +, waylandSupport ? stdenv.hostPlatform.isLinux , libxkbcommon , libdrm , libGL diff --git a/pkgs/by-name/to/toxic/package.nix b/pkgs/by-name/to/toxic/package.nix index 54462fdaade1..036c96dd47d5 100644 --- a/pkgs/by-name/to/toxic/package.nix +++ b/pkgs/by-name/to/toxic/package.nix @@ -18,7 +18,7 @@ stdenv.mkDerivation rec { buildInputs = [ libtoxcore libsodium ncurses curl gdk-pixbuf libnotify - ] ++ lib.optionals (!stdenv.isAarch32) [ + ] ++ lib.optionals (!stdenv.hostPlatform.isAarch32) [ openal libopus libvpx freealut qrencode ]; nativeBuildInputs = [ pkg-config libconfig ]; diff --git a/pkgs/by-name/tp/tpnote/package.nix b/pkgs/by-name/tp/tpnote/package.nix index a19eed1281dc..ea58c45f579b 100644 --- a/pkgs/by-name/tp/tpnote/package.nix +++ b/pkgs/by-name/tp/tpnote/package.nix @@ -33,7 +33,7 @@ rustPlatform.buildRustPackage rec { buildInputs = [ oniguruma - ] ++ lib.optionals stdenv.isDarwin (with darwin.apple_sdk.frameworks; [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin (with darwin.apple_sdk.frameworks; [ AppKit CoreServices SystemConfiguration diff --git a/pkgs/by-name/tr/tracker-miners/package.nix b/pkgs/by-name/tr/tracker-miners/package.nix index fb882da42b73..963df6517e35 100644 --- a/pkgs/by-name/tr/tracker-miners/package.nix +++ b/pkgs/by-name/tr/tracker-miners/package.nix @@ -105,12 +105,12 @@ stdenv.mkDerivation (finalAttrs: { libxml2 poppler taglib - ] ++ lib.optionals stdenv.isLinux [ + ] ++ lib.optionals stdenv.hostPlatform.isLinux [ libseccomp networkmanager systemd upower - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ e2fsprogs ]; @@ -122,7 +122,7 @@ stdenv.mkDerivation (finalAttrs: { # security issue since then. Despite a patch now being availab, we're opting # to be safe due to the general state of the project "-Dminer_rss=false" - ] ++ lib.optionals (!stdenv.isLinux) [ + ] ++ lib.optionals (!stdenv.hostPlatform.isLinux) [ "-Dbattery_detection=none" "-Dnetwork_manager=disabled" "-Dsystemd_user_services=false" diff --git a/pkgs/by-name/tr/tracy/package.nix b/pkgs/by-name/tr/tracy/package.nix index 1c726affff47..5f03796e50ac 100644 --- a/pkgs/by-name/tr/tracy/package.nix +++ b/pkgs/by-name/tr/tracy/package.nix @@ -11,7 +11,7 @@ , pkg-config , tbb -, withWayland ? stdenv.isLinux +, withWayland ? stdenv.hostPlatform.isLinux , libxkbcommon , wayland }: @@ -27,7 +27,7 @@ stdenv.mkDerivation rec { hash = "sha256-DN1ExvQ5wcIUyhMAfiakFbZkDsx+5l8VMtYGvSdboPA="; }; - patches = lib.optionals (stdenv.isDarwin && !(lib.versionAtLeast stdenv.hostPlatform.darwinMinVersion "11")) [ + patches = lib.optionals (stdenv.hostPlatform.isDarwin && !(lib.versionAtLeast stdenv.hostPlatform.darwinMinVersion "11")) [ ./0001-remove-unifiedtypeidentifiers-framework ]; @@ -37,25 +37,25 @@ stdenv.mkDerivation rec { capstone freetype glfw - ] ++ lib.optionals (stdenv.isLinux && withWayland) [ + ] ++ lib.optionals (stdenv.hostPlatform.isLinux && withWayland) [ libxkbcommon wayland - ] ++ lib.optionals stdenv.isLinux [ + ] ++ lib.optionals stdenv.hostPlatform.isLinux [ dbus hicolor-icon-theme tbb - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.AppKit darwin.apple_sdk.frameworks.Carbon - ] ++ lib.optionals (stdenv.isDarwin && lib.versionAtLeast stdenv.hostPlatform.darwinMinVersion "11") [ + ] ++ lib.optionals (stdenv.hostPlatform.isDarwin && lib.versionAtLeast stdenv.hostPlatform.darwinMinVersion "11") [ darwin.apple_sdk.frameworks.UniformTypeIdentifiers ]; env.NIX_CFLAGS_COMPILE = toString ([ ] # Apple's compiler finds a format string security error on # ../../../server/TracyView.cpp:649:34, preventing building. - ++ lib.optional stdenv.isDarwin "-Wno-format-security" - ++ lib.optional stdenv.isLinux "-ltbb" + ++ lib.optional stdenv.hostPlatform.isDarwin "-Wno-format-security" + ++ lib.optional stdenv.hostPlatform.isLinux "-ltbb" ++ lib.optional stdenv.cc.isClang "-faligned-allocation"); buildPhase = '' @@ -66,7 +66,7 @@ stdenv.mkDerivation rec { make -j $NIX_BUILD_CORES -C import-chrome/build/unix release make -j $NIX_BUILD_CORES -C library/unix release make -j $NIX_BUILD_CORES -C profiler/build/unix release \ - ${lib.optionalString (stdenv.isLinux && !withWayland) "LEGACY=1"} + ${lib.optionalString (stdenv.hostPlatform.isLinux && !withWayland) "LEGACY=1"} make -j $NIX_BUILD_CORES -C update/build/unix release runHook postBuild @@ -89,7 +89,7 @@ stdenv.mkDerivation rec { cp -p public/client/*.{h,hpp} $out/include/Tracy/client cp -p public/common/*.{h,hpp} $out/include/Tracy/common cp -p public/tracy/*.{h,hpp} $out/include/Tracy/tracy - '' + lib.optionalString stdenv.isLinux '' + '' + lib.optionalString stdenv.hostPlatform.isLinux '' substituteInPlace extra/desktop/tracy.desktop \ --replace Exec=/usr/bin/tracy Exec=tracy @@ -102,7 +102,7 @@ stdenv.mkDerivation rec { runHook postInstall ''; - postFixup = lib.optionalString stdenv.isDarwin '' + postFixup = lib.optionalString stdenv.hostPlatform.isDarwin '' install_name_tool -change libcapstone.4.dylib ${capstone}/lib/libcapstone.4.dylib $out/bin/tracy ''; diff --git a/pkgs/by-name/tr/transmission_3/package.nix b/pkgs/by-name/tr/transmission_3/package.nix index 9372ef6dcf5f..a97e2cbb3e7f 100644 --- a/pkgs/by-name/tr/transmission_3/package.nix +++ b/pkgs/by-name/tr/transmission_3/package.nix @@ -88,8 +88,8 @@ stdenv.mkDerivation (finalAttrs: { ++ lib.optionals enableQt [ qt5.qttools qt5.qtbase ] ++ lib.optionals enableGTK3 [ gtk3 xorg.libpthreadstubs ] ++ lib.optionals enableSystemd [ systemd ] - ++ lib.optionals stdenv.isLinux [ inotify-tools ] - ++ lib.optionals stdenv.isDarwin [ libiconv ]; + ++ lib.optionals stdenv.hostPlatform.isLinux [ inotify-tools ] + ++ lib.optionals stdenv.hostPlatform.isDarwin [ libiconv ]; postInstall = '' mkdir $apparmor @@ -102,7 +102,7 @@ stdenv.mkDerivation (finalAttrs: { include "${apparmorRulesFromClosure { name = "transmission-daemon"; } ([ curl libevent openssl pcre zlib libnatpmp miniupnpc ] ++ lib.optionals enableSystemd [ systemd ] - ++ lib.optionals stdenv.isLinux [ inotify-tools ] + ++ lib.optionals stdenv.hostPlatform.isLinux [ inotify-tools ] )}" r @{PROC}/sys/kernel/random/uuid, r @{PROC}/sys/vm/overcommit_memory, diff --git a/pkgs/by-name/tr/trealla/package.nix b/pkgs/by-name/tr/trealla/package.nix index 8a3650638312..288b89a04ae6 100644 --- a/pkgs/by-name/tr/trealla/package.nix +++ b/pkgs/by-name/tr/trealla/package.nix @@ -100,6 +100,6 @@ stdenv.mkDerivation (finalAttrs: { ]; mainProgram = "tpl"; platforms = lib.platforms.all; - broken = stdenv.isDarwin && stdenv.isx86_64; + broken = stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isx86_64; }; }) diff --git a/pkgs/by-name/tr/trigger-control/package.nix b/pkgs/by-name/tr/trigger-control/package.nix index 3398a3fe0aab..838aae472d64 100644 --- a/pkgs/by-name/tr/trigger-control/package.nix +++ b/pkgs/by-name/tr/trigger-control/package.nix @@ -36,7 +36,7 @@ stdenv.mkDerivation (finalAttrs: { SDL2 dbus libnotify - ] ++ lib.optionals stdenv.isLinux [ + ] ++ lib.optionals stdenv.hostPlatform.isLinux [ libdecor ]; @@ -62,7 +62,7 @@ stdenv.mkDerivation (finalAttrs: { runHook postInstall ''; - postInstall = lib.optionalString stdenv.isLinux '' + postInstall = lib.optionalString stdenv.hostPlatform.isLinux '' wrapProgram $out/bin/trigger-control \ --prefix PATH : ${lib.makeBinPath [ zenity ]} ''; diff --git a/pkgs/by-name/tr/triton-llvm/package.nix b/pkgs/by-name/tr/triton-llvm/package.nix index 90a45c133c73..d45aa2fafe65 100644 --- a/pkgs/by-name/tr/triton-llvm/package.nix +++ b/pkgs/by-name/tr/triton-llvm/package.nix @@ -149,7 +149,7 @@ in stdenv.mkDerivation (finalAttrs: { substituteInPlace unittests/Support/CMakeLists.txt \ --replace "Path.cpp" "" - '' + lib.optionalString stdenv.isAarch64 '' + '' + lib.optionalString stdenv.hostPlatform.isAarch64 '' # Not sure why this fails rm test/tools/llvm-exegesis/AArch64/latency-by-opcode-name.s ''; @@ -161,7 +161,7 @@ in stdenv.mkDerivation (finalAttrs: { doCheck = buildTests; nativeCheckInputs = [ which ] - ++ lib.optionals stdenv.isDarwin [ sysctl ]; + ++ lib.optionals stdenv.hostPlatform.isDarwin [ sysctl ]; checkTarget = "check-all"; requiredSystemFeatures = [ "big-parallel" ]; diff --git a/pkgs/by-name/tr/trunk-ng/package.nix b/pkgs/by-name/tr/trunk-ng/package.nix index 3a7f9bd5ba05..73af1faaba29 100644 --- a/pkgs/by-name/tr/trunk-ng/package.nix +++ b/pkgs/by-name/tr/trunk-ng/package.nix @@ -13,7 +13,7 @@ rustPlatform.buildRustPackage rec { }; nativeBuildInputs = [ pkg-config ]; - buildInputs = if stdenv.isDarwin + buildInputs = if stdenv.hostPlatform.isDarwin then [ libiconv CoreServices Security SystemConfiguration ] else [ openssl ]; diff --git a/pkgs/by-name/ts/tsukimi/package.nix b/pkgs/by-name/ts/tsukimi/package.nix index fc984dde21a0..7d8889079a7f 100644 --- a/pkgs/by-name/ts/tsukimi/package.nix +++ b/pkgs/by-name/ts/tsukimi/package.nix @@ -91,6 +91,6 @@ rustPlatform.buildRustPackage rec { platforms = lib.platforms.linux; # libmpv2 crate fail to compile # expected raw pointer `*const u8` found raw pointer `*const i8` - broken = stdenv.isAarch64; + broken = stdenv.hostPlatform.isAarch64; }; } diff --git a/pkgs/by-name/tu/tuifimanager/package.nix b/pkgs/by-name/tu/tuifimanager/package.nix index 15706439a30a..26b30a477da0 100644 --- a/pkgs/by-name/tu/tuifimanager/package.nix +++ b/pkgs/by-name/tu/tuifimanager/package.nix @@ -6,9 +6,9 @@ , gnome-themes-extra , qt6 , makeWrapper -, x11Support ? stdenv.isLinux +, x11Support ? stdenv.hostPlatform.isLinux # pypinput is marked as broken for darwin -, pynputSupport ? stdenv.isLinux +, pynputSupport ? stdenv.hostPlatform.isLinux # Experimental Drag & Drop support requires x11 & pyinput suport , hasDndSupport ? x11Support && pynputSupport , enableDragAndDrop ? false diff --git a/pkgs/by-name/tu/tup/package.nix b/pkgs/by-name/tu/tup/package.nix index c6614db17832..db6a6058a00b 100644 --- a/pkgs/by-name/tu/tup/package.nix +++ b/pkgs/by-name/tu/tup/package.nix @@ -1,7 +1,7 @@ { lib, stdenv, fetchFromGitHub, fuse3, macfuse-stubs, pkg-config, sqlite, pcre2 }: let - fuse = if stdenv.isDarwin then macfuse-stubs else fuse3; + fuse = if stdenv.hostPlatform.isDarwin then macfuse-stubs else fuse3; in stdenv.mkDerivation rec { pname = "tup"; version = "0.8"; @@ -71,6 +71,6 @@ in stdenv.mkDerivation rec { # ../../../../os-specific/darwin/apple-sdk/default.nix # # https://github.com/gittup/tup/commit/3697c74 - broken = stdenv.isDarwin; + broken = stdenv.hostPlatform.isDarwin; }; } diff --git a/pkgs/by-name/tu/turbo-unwrapped/package.nix b/pkgs/by-name/tu/turbo-unwrapped/package.nix index d3f0959577d1..f9228f310cc1 100644 --- a/pkgs/by-name/tu/turbo-unwrapped/package.nix +++ b/pkgs/by-name/tu/turbo-unwrapped/package.nix @@ -42,7 +42,7 @@ rustPlatform.buildRustPackage rec { protobuf ] # https://github.com/vercel/turbo/blob/ea740706e0592b3906ab34c7cfa1768daafc2a84/CONTRIBUTING.md#linux-dependencies - ++ lib.optional stdenv.isLinux llvmPackages.bintools; + ++ lib.optional stdenv.hostPlatform.isLinux llvmPackages.bintools; buildInputs = [ @@ -51,7 +51,7 @@ rustPlatform.buildRustPackage rec { rust-jemalloc-sys zlib ] - ++ lib.optionals stdenv.isDarwin ( + ++ lib.optionals stdenv.hostPlatform.isDarwin ( with darwin.apple_sdk_11_0.frameworks; [ CoreFoundation diff --git a/pkgs/by-name/ty/typst-live/package.nix b/pkgs/by-name/ty/typst-live/package.nix index 8968adbb5e1b..3912ed217b51 100644 --- a/pkgs/by-name/ty/typst-live/package.nix +++ b/pkgs/by-name/ty/typst-live/package.nix @@ -22,7 +22,7 @@ rustPlatform.buildRustPackage rec { makeWrapper ]; - buildInputs = lib.optionals stdenv.isDarwin [ + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.CoreServices ]; diff --git a/pkgs/by-name/ty/typst-lsp/package.nix b/pkgs/by-name/ty/typst-lsp/package.nix index cc8e2d203e66..bb4d0b12f39b 100644 --- a/pkgs/by-name/ty/typst-lsp/package.nix +++ b/pkgs/by-name/ty/typst-lsp/package.nix @@ -39,14 +39,14 @@ rustPlatform.buildRustPackage rec { ln -s ${./Cargo.lock} Cargo.lock ''; - buildInputs = lib.optionals stdenv.isDarwin [ darwin.apple_sdk.frameworks.SystemConfiguration ]; + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.SystemConfiguration ]; checkFlags = [ # requires internet access "--skip=workspace::package::external::remote_repo::test::full_download" ] - ++ lib.optionals stdenv.isDarwin [ + ++ lib.optionals stdenv.hostPlatform.isDarwin [ # both tests fail on darwin with 'Attempted to create a NULL object.' "--skip=workspace::fs::local::test::read" "--skip=workspace::package::external::manager::test::local_package" diff --git a/pkgs/by-name/ty/typst/package.nix b/pkgs/by-name/ty/typst/package.nix index aa71277fefab..de06edfee2f3 100644 --- a/pkgs/by-name/ty/typst/package.nix +++ b/pkgs/by-name/ty/typst/package.nix @@ -36,7 +36,7 @@ rustPlatform.buildRustPackage rec { buildInputs = [ openssl xz - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.CoreFoundation darwin.apple_sdk.frameworks.CoreServices darwin.apple_sdk.frameworks.Security diff --git a/pkgs/by-name/ty/typstyle/package.nix b/pkgs/by-name/ty/typstyle/package.nix index 906a9738f7cd..ec84a2a2d526 100644 --- a/pkgs/by-name/ty/typstyle/package.nix +++ b/pkgs/by-name/ty/typstyle/package.nix @@ -31,7 +31,7 @@ rustPlatform.buildRustPackage rec { buildInputs = [ libgit2 zlib - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.CoreFoundation darwin.apple_sdk.frameworks.CoreServices darwin.apple_sdk.frameworks.Security diff --git a/pkgs/by-name/uc/ucg/package.nix b/pkgs/by-name/uc/ucg/package.nix index 99d1b90c43df..7ac909b25686 100644 --- a/pkgs/by-name/uc/ucg/package.nix +++ b/pkgs/by-name/uc/ucg/package.nix @@ -48,7 +48,7 @@ stdenv.mkDerivation (finalAttrs: { mainProgram = "ucg"; maintainers = with lib.maintainers; [ AndersonTorres ]; platforms = lib.platforms.unix; - broken = stdenv.isAarch64 || stdenv.isDarwin; + broken = stdenv.hostPlatform.isAarch64 || stdenv.hostPlatform.isDarwin; }; }) # TODO: report upstream diff --git a/pkgs/by-name/uc/uclibc-ng/package.nix b/pkgs/by-name/uc/uclibc-ng/package.nix index 011c6bfd8737..8869dce9d187 100644 --- a/pkgs/by-name/uc/uclibc-ng/package.nix +++ b/pkgs/by-name/uc/uclibc-ng/package.nix @@ -49,7 +49,7 @@ let KERNEL_HEADERS "${linuxHeaders}/include" '' + lib.optionalString (stdenv.hostPlatform.gcc.float or "" == "soft") '' UCLIBC_HAS_FPU n - '' + lib.optionalString (stdenv.isAarch32 && isCross) '' + '' + lib.optionalString (stdenv.hostPlatform.isAarch32 && isCross) '' CONFIG_ARM_EABI y ARCH_WANTS_BIG_ENDIAN n ARCH_BIG_ENDIAN n diff --git a/pkgs/by-name/ue/ueberzugpp/package.nix b/pkgs/by-name/ue/ueberzugpp/package.nix index 78c1f817ad6a..0422c54a9d16 100644 --- a/pkgs/by-name/ue/ueberzugpp/package.nix +++ b/pkgs/by-name/ue/ueberzugpp/package.nix @@ -18,14 +18,14 @@ , cli11 , libexif , range-v3 -, enableOpencv ? stdenv.isLinux +, enableOpencv ? stdenv.hostPlatform.isLinux , opencv -, enableWayland ? stdenv.isLinux +, enableWayland ? stdenv.hostPlatform.isLinux , extra-cmake-modules , wayland , wayland-protocols , wayland-scanner -, enableX11 ? stdenv.isLinux +, enableX11 ? stdenv.hostPlatform.isLinux , xorg }: @@ -85,7 +85,7 @@ stdenv.mkDerivation rec { ]; # error: aligned deallocation function of type 'void (void *, std::align_val_t) noexcept' is only available on macOS 10.14 or newer - preBuild = lib.optionalString (stdenv.isDarwin && lib.versionOlder stdenv.hostPlatform.darwinMinVersion "11.0") '' + preBuild = lib.optionalString (stdenv.hostPlatform.isDarwin && lib.versionOlder stdenv.hostPlatform.darwinMinVersion "11.0") '' export MACOSX_DEPLOYMENT_TARGET=10.14 ''; diff --git a/pkgs/by-name/ui/uiua/package.nix b/pkgs/by-name/ui/uiua/package.nix index a3d6dd08bbab..5bcf16fdd8aa 100644 --- a/pkgs/by-name/ui/uiua/package.nix +++ b/pkgs/by-name/ui/uiua/package.nix @@ -30,16 +30,16 @@ rustPlatform.buildRustPackage rec { cargoHash = "sha256-4XHKcmOeaeSGfl7uvQQdhm29DBWEdZLX021d9+Ebrww="; nativeBuildInputs = - lib.optionals stdenv.isDarwin [ rustPlatform.bindgenHook ] + lib.optionals stdenv.hostPlatform.isDarwin [ rustPlatform.bindgenHook ] ++ lib.optionals audioSupport [ pkg-config ]; buildInputs = - lib.optionals stdenv.isDarwin [ + lib.optionals stdenv.hostPlatform.isDarwin [ AppKit CoreServices ] - ++ lib.optionals (audioSupport && stdenv.isDarwin) [ AudioUnit ] - ++ lib.optionals (audioSupport && stdenv.isLinux) [ alsa-lib ]; + ++ lib.optionals (audioSupport && stdenv.hostPlatform.isDarwin) [ AudioUnit ] + ++ lib.optionals (audioSupport && stdenv.hostPlatform.isLinux) [ alsa-lib ]; buildFeatures = lib.optional audioSupport "audio"; diff --git a/pkgs/by-name/un/unbound/package.nix b/pkgs/by-name/un/unbound/package.nix index 0d827159358f..9c789a3b0564 100644 --- a/pkgs/by-name/un/unbound/package.nix +++ b/pkgs/by-name/un/unbound/package.nix @@ -36,7 +36,7 @@ , withRedis ? false # Avoid .lib depending on lib.getLib openssl # The build gets a little hacky, so in some cases we disable this approach. -, withSlimLib ? stdenv.isLinux && !stdenv.hostPlatform.isMusl && !withDNSTAP +, withSlimLib ? stdenv.hostPlatform.isLinux && !stdenv.hostPlatform.isMusl && !withDNSTAP # enable support for python plugins in unbound: note this is distinct from pyunbound # see https://unbound.docs.nlnetlabs.nl/en/latest/developer/python-modules.html , withPythonModule ? false diff --git a/pkgs/by-name/un/unciv/package.nix b/pkgs/by-name/un/unciv/package.nix index ff72272c6c53..5188209732f5 100644 --- a/pkgs/by-name/un/unciv/package.nix +++ b/pkgs/by-name/un/unciv/package.nix @@ -26,7 +26,7 @@ let hash = "sha256-Zuz+HGfxjGviGBKTiHdIFXF8UMRLEIfM8f+LIB/xonk="; }; - envLibPath = lib.makeLibraryPath (lib.optionals stdenv.isLinux [ + envLibPath = lib.makeLibraryPath (lib.optionals stdenv.hostPlatform.isLinux [ libGL libpulseaudio libXxf86vm diff --git a/pkgs/by-name/un/unimap/package.nix b/pkgs/by-name/un/unimap/package.nix index 7563c1f50535..eafe26962cec 100644 --- a/pkgs/by-name/un/unimap/package.nix +++ b/pkgs/by-name/un/unimap/package.nix @@ -30,16 +30,16 @@ rustPlatform.buildRustPackage rec { nativeBuildInputs = [ installShellFiles makeBinaryWrapper - ] ++ lib.optionals (stdenv.hostPlatform.isAarch && stdenv.isLinux) [ + ] ++ lib.optionals (stdenv.hostPlatform.isAarch && stdenv.hostPlatform.isLinux) [ pkg-config ]; # only depends on openssl on aarch/arm linux - buildInputs = lib.optionals (stdenv.hostPlatform.isAarch && stdenv.isLinux) [ + buildInputs = lib.optionals (stdenv.hostPlatform.isAarch && stdenv.hostPlatform.isLinux) [ openssl ]; - env = lib.optionalAttrs (stdenv.hostPlatform.isAarch && stdenv.isLinux) { + env = lib.optionalAttrs (stdenv.hostPlatform.isAarch && stdenv.hostPlatform.isLinux) { OPENSSL_NO_VENDOR = true; }; diff --git a/pkgs/by-name/un/unison-fsmonitor/package.nix b/pkgs/by-name/un/unison-fsmonitor/package.nix index b351071b6d30..84d367285c02 100644 --- a/pkgs/by-name/un/unison-fsmonitor/package.nix +++ b/pkgs/by-name/un/unison-fsmonitor/package.nix @@ -17,7 +17,7 @@ rustPlatform.buildRustPackage rec { }; cargoHash = "sha256-eKRayFU3xq2uo6YeFqcTPLInZYlympH6Z01vOCVsVqQ="; - buildInputs = lib.optionals stdenv.isDarwin [ + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.CoreServices ]; diff --git a/pkgs/by-name/un/unison/package.nix b/pkgs/by-name/un/unison/package.nix index 400c73e105b4..d0298c7f1584 100644 --- a/pkgs/by-name/un/unison/package.nix +++ b/pkgs/by-name/un/unison/package.nix @@ -6,7 +6,7 @@ , makeDesktopItem , wrapGAppsHook3 , gsettings-desktop-schemas -, enableX11 ? !stdenv.isDarwin +, enableX11 ? !stdenv.hostPlatform.isDarwin }: stdenv.mkDerivation (finalAttrs: { @@ -58,7 +58,7 @@ stdenv.mkDerivation (finalAttrs: { license = licenses.gpl3Plus; maintainers = with maintainers; [ nevivurn ]; platforms = platforms.unix; - broken = stdenv.isDarwin && enableX11; # unison-gui and uimac are broken on darwin + broken = stdenv.hostPlatform.isDarwin && enableX11; # unison-gui and uimac are broken on darwin mainProgram = if enableX11 then "unison-gui" else "unison"; }; }) diff --git a/pkgs/by-name/un/universal-ctags/package.nix b/pkgs/by-name/un/universal-ctags/package.nix index 09186886d507..eda2fc6a8176 100644 --- a/pkgs/by-name/un/universal-ctags/package.nix +++ b/pkgs/by-name/un/universal-ctags/package.nix @@ -43,8 +43,8 @@ stdenv.mkDerivation (finalAttrs: { libxml2 jansson ] - ++ lib.optional stdenv.isDarwin libiconv - ++ lib.optional stdenv.isLinux libseccomp; + ++ lib.optional stdenv.hostPlatform.isDarwin libiconv + ++ lib.optional stdenv.hostPlatform.isLinux libseccomp; configureFlags = [ "--enable-tmpdir=/tmp" ]; diff --git a/pkgs/by-name/un/unrar-free/package.nix b/pkgs/by-name/un/unrar-free/package.nix index 176a01a45640..72ca626c8933 100644 --- a/pkgs/by-name/un/unrar-free/package.nix +++ b/pkgs/by-name/un/unrar-free/package.nix @@ -37,6 +37,6 @@ stdenv.mkDerivation (finalAttrs: { mainProgram = "unrar-free"; maintainers = with lib.maintainers; [ thiagokokada ]; platforms = lib.platforms.unix; - broken = stdenv.isDarwin; + broken = stdenv.hostPlatform.isDarwin; }; }) diff --git a/pkgs/by-name/up/upsun/package.nix b/pkgs/by-name/up/upsun/package.nix index 378226a1cbd4..fd1242e59330 100644 --- a/pkgs/by-name/up/upsun/package.nix +++ b/pkgs/by-name/up/upsun/package.nix @@ -8,11 +8,11 @@ }: let versions = lib.importJSON ./versions.json; - arch = if stdenvNoCC.isx86_64 then "amd64" - else if stdenvNoCC.isAarch64 then "arm64" + arch = if stdenvNoCC.hostPlatform.isx86_64 then "amd64" + else if stdenvNoCC.hostPlatform.isAarch64 then "arm64" else throw "Unsupported architecture"; - os = if stdenvNoCC.isLinux then "linux" - else if stdenvNoCC.isDarwin then "darwin" + os = if stdenvNoCC.hostPlatform.isLinux then "linux" + else if stdenvNoCC.hostPlatform.isDarwin then "darwin" else throw "Unsupported os"; versionInfo = versions."${os}-${arch}"; inherit (versionInfo) hash url; diff --git a/pkgs/by-name/ut/ut1999/package.nix b/pkgs/by-name/ut/ut1999/package.nix index 98f4690eb21c..db063696996f 100644 --- a/pkgs/by-name/ut/ut1999/package.nix +++ b/pkgs/by-name/ut/ut1999/package.nix @@ -63,21 +63,21 @@ in stdenv.mkDerivation { stdenv.cc.cc ]; - nativeBuildInputs = lib.optionals stdenv.isLinux [ + nativeBuildInputs = lib.optionals stdenv.hostPlatform.isLinux [ copyDesktopItems autoPatchelfHook imagemagick - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ undmg ]; installPhase = let - outPrefix = if stdenv.isDarwin then "$out/UnrealTournament.app/Contents/MacOS" else "$out"; + outPrefix = if stdenv.hostPlatform.isDarwin then "$out/UnrealTournament.app/Contents/MacOS" else "$out"; in '' runHook preInstall mkdir -p $out/bin - cp -r ${if stdenv.isDarwin then "UnrealTournament.app" else "./*"} $out + cp -r ${if stdenv.hostPlatform.isDarwin then "UnrealTournament.app" else "./*"} $out chmod -R 755 $out cd ${outPrefix} @@ -86,7 +86,7 @@ in stdenv.mkDerivation { cp -n ${unpackGog}/Textures/* ./Textures || true cp -n ${unpackGog}/System/*.{u,int} ./System || true - '' + lib.optionalString (stdenv.isLinux) '' + '' + lib.optionalString (stdenv.hostPlatform.isLinux) '' ln -s "$out/${systemDir}/ut-bin" "$out/bin/ut1999" ln -s "$out/${systemDir}/ucc-bin" "$out/bin/ut1999-ucc" diff --git a/pkgs/by-name/uv/uv/package.nix b/pkgs/by-name/uv/uv/package.nix index 96e5941d73f0..7b507ceebd62 100644 --- a/pkgs/by-name/uv/uv/package.nix +++ b/pkgs/by-name/uv/uv/package.nix @@ -46,7 +46,7 @@ python3Packages.buildPythonApplication rec { buildInputs = [ libiconv - ] ++ lib.optionals stdenv.isDarwin [ darwin.apple_sdk.frameworks.SystemConfiguration ]; + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.SystemConfiguration ]; dontUseCmakeConfigure = true; diff --git a/pkgs/by-name/ux/uxn/package.nix b/pkgs/by-name/ux/uxn/package.nix index 721d82c6fdd6..0a9db5026aa3 100644 --- a/pkgs/by-name/ux/uxn/package.nix +++ b/pkgs/by-name/ux/uxn/package.nix @@ -64,6 +64,6 @@ stdenv.mkDerivation (finalAttrs: { maintainers = with lib.maintainers; [ AndersonTorres ]; mainProgram = "uxnemu"; inherit (SDL2.meta) platforms; - broken = stdenv.isDarwin; + broken = stdenv.hostPlatform.isDarwin; }; }) diff --git a/pkgs/by-name/va/vale-ls/package.nix b/pkgs/by-name/va/vale-ls/package.nix index a6a84d4a2ce0..0a09952d51af 100644 --- a/pkgs/by-name/va/vale-ls/package.nix +++ b/pkgs/by-name/va/vale-ls/package.nix @@ -28,14 +28,14 @@ rustPlatform.buildRustPackage rec { buildInputs = [ openssl - ] ++ lib.optionals stdenv.isDarwin (with darwin.apple_sdk.frameworks; [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin (with darwin.apple_sdk.frameworks; [ SystemConfiguration ]); checkFlags = [ # The following tests are reaching to the network. "--skip=vale::tests" - ] ++ lib.optionals (stdenv.isLinux && stdenv.isAarch64) [ + ] ++ lib.optionals (stdenv.hostPlatform.isLinux && stdenv.hostPlatform.isAarch64) [ # This test does not account for the existence of aarch64-linux machines, # despite upstream shipping artifacts for that architecture "--skip=utils::tests::arch" diff --git a/pkgs/by-name/va/valkey/package.nix b/pkgs/by-name/va/valkey/package.nix index 1a97c09ebd29..d44232121660 100644 --- a/pkgs/by-name/va/valkey/package.nix +++ b/pkgs/by-name/va/valkey/package.nix @@ -30,7 +30,7 @@ stdenv.mkDerivation (finalAttrs: { ++ lib.optional withSystemd systemd ++ lib.optional tlsSupport openssl; - preBuild = lib.optionalString stdenv.isDarwin '' + preBuild = lib.optionalString stdenv.hostPlatform.isDarwin '' substituteInPlace src/Makefile --replace-fail "-flto" "" ''; @@ -42,12 +42,12 @@ stdenv.mkDerivation (finalAttrs: { enableParallelBuilding = true; - hardeningEnable = lib.optionals (!stdenv.isDarwin) [ "pie" ]; + hardeningEnable = lib.optionals (!stdenv.hostPlatform.isDarwin) [ "pie" ]; env.NIX_CFLAGS_COMPILE = toString (lib.optionals stdenv.cc.isClang [ "-std=c11" ]); # darwin currently lacks a pure `pgrep` which is extensively used here - doCheck = !stdenv.isDarwin; + doCheck = !stdenv.hostPlatform.isDarwin; nativeCheckInputs = [ which tcl ps ] ++ lib.optionals stdenv.hostPlatform.isStatic [ getconf ]; checkPhase = '' runHook preCheck diff --git a/pkgs/by-name/va/vapoursynth/package.nix b/pkgs/by-name/va/vapoursynth/package.nix index 278cf1e56778..7a40f1eba1c2 100644 --- a/pkgs/by-name/va/vapoursynth/package.nix +++ b/pkgs/by-name/va/vapoursynth/package.nix @@ -47,7 +47,7 @@ stdenv.mkDerivation rec { ] )) ] - ++ lib.optionals stdenv.isDarwin [ + ++ lib.optionals stdenv.hostPlatform.isDarwin [ libiconv ApplicationServices ]; @@ -93,7 +93,7 @@ stdenv.mkDerivation rec { ''; meta = with lib; { - broken = stdenv.isDarwin; # see https://github.com/NixOS/nixpkgs/pull/189446 for partial fix + broken = stdenv.hostPlatform.isDarwin; # see https://github.com/NixOS/nixpkgs/pull/189446 for partial fix description = "Video processing framework with the future in mind"; homepage = "http://www.vapoursynth.com/"; license = licenses.lgpl21; diff --git a/pkgs/by-name/va/vatprism/package.nix b/pkgs/by-name/va/vatprism/package.nix index c13e0b0cf082..bdc406091d00 100644 --- a/pkgs/by-name/va/vatprism/package.nix +++ b/pkgs/by-name/va/vatprism/package.nix @@ -60,7 +60,7 @@ maven.buildMavenPackage rec { ]; mvnHash = - if (stdenv.isLinux && stdenv.isAarch64) then + if (stdenv.hostPlatform.isLinux && stdenv.hostPlatform.isAarch64) then "sha256-x0nFt2C7dZqMdllI1+Io9SPBY2J/dVgBTVb9T24vFFI=" else "sha256-9uyNCUqnMgpiwm2kz544pWNB/SkRpASm2Dln0e4yZos="; diff --git a/pkgs/by-name/ve/vesktop/package.nix b/pkgs/by-name/ve/vesktop/package.nix index 6d65fe99d89a..4979bd32bd80 100644 --- a/pkgs/by-name/ve/vesktop/package.nix +++ b/pkgs/by-name/ve/vesktop/package.nix @@ -48,7 +48,7 @@ stdenv.mkDerivation (finalAttrs: { nodejs pnpm_9.configHook ] - ++ lib.optionals stdenv.isLinux [ + ++ lib.optionals stdenv.hostPlatform.isLinux [ # vesktop uses venmic, which is a shipped as a prebuilt node module # and needs to be patched autoPatchelfHook @@ -57,12 +57,12 @@ stdenv.mkDerivation (finalAttrs: { # https://github.com/NixOS/nixpkgs/issues/172583 makeWrapper ] - ++ lib.optionals stdenv.isDarwin [ + ++ lib.optionals stdenv.hostPlatform.isDarwin [ # on macos we don't need to expand variables, so we can use the faster binary wrapper makeBinaryWrapper ]; - buildInputs = lib.optionals stdenv.isLinux [ + buildInputs = lib.optionals stdenv.hostPlatform.isLinux [ libpulseaudio pipewire stdenv.cc.cc.lib @@ -81,12 +81,12 @@ stdenv.mkDerivation (finalAttrs: { # disable code signing on macos # https://github.com/electron-userland/electron-builder/blob/77f977435c99247d5db395895618b150f5006e8f/docs/code-signing.md#how-to-disable-code-signing-during-the-build-process-on-macos - postConfigure = lib.optionalString stdenv.isDarwin '' + postConfigure = lib.optionalString stdenv.hostPlatform.isDarwin '' export CSC_IDENTITY_AUTO_DISCOVERY=false ''; # electron builds must be writable on darwin - preBuild = lib.optionalString stdenv.isDarwin '' + preBuild = lib.optionalString stdenv.hostPlatform.isDarwin '' cp -r ${electron.dist}/Electron.app . chmod -R u+w Electron.app ''; @@ -98,13 +98,13 @@ stdenv.mkDerivation (finalAttrs: { pnpm exec electron-builder \ --dir \ -c.asarUnpack="**/*.node" \ - -c.electronDist=${if stdenv.isDarwin then "." else electron.dist} \ + -c.electronDist=${if stdenv.hostPlatform.isDarwin then "." else electron.dist} \ -c.electronVersion=${electron.version} runHook postBuild ''; - postBuild = lib.optionalString stdenv.isLinux '' + postBuild = lib.optionalString stdenv.hostPlatform.isLinux '' pushd build ${libicns}/bin/icns2png -x icon.icns popd @@ -114,7 +114,7 @@ stdenv.mkDerivation (finalAttrs: { '' runHook preInstall '' - + lib.optionalString stdenv.isLinux '' + + lib.optionalString stdenv.hostPlatform.isLinux '' mkdir -p $out/opt/Vesktop cp -r dist/*unpacked/resources $out/opt/Vesktop/ @@ -123,7 +123,7 @@ stdenv.mkDerivation (finalAttrs: { install -Dm0644 $file $out/share/icons/hicolor/''${file_suffix//x32.png}/apps/vesktop.png done '' - + lib.optionalString stdenv.isDarwin '' + + lib.optionalString stdenv.hostPlatform.isDarwin '' mkdir -p $out/{Applications,bin} mv dist/mac*/Vesktop.App $out/Applications '' @@ -132,18 +132,18 @@ stdenv.mkDerivation (finalAttrs: { ''; postFixup = - lib.optionalString stdenv.isLinux '' + lib.optionalString stdenv.hostPlatform.isLinux '' makeWrapper ${electron}/bin/electron $out/bin/vesktop \ --add-flags $out/opt/Vesktop/resources/app.asar \ ${lib.optionalString withTTS "--add-flags \"--enable-speech-dispatcher\""} \ ${lib.optionalString withMiddleClickScroll "--add-flags \"--enable-blink-features=MiddleClickAutoscroll\""} \ --add-flags "\''${NIXOS_OZONE_WL:+\''${WAYLAND_DISPLAY:+--ozone-platform-hint=auto --enable-features=WaylandWindowDecorations --enable-wayland-ime}}" '' - + lib.optionalString stdenv.isDarwin '' + + lib.optionalString stdenv.hostPlatform.isDarwin '' makeWrapper $out/Applications/Vesktop.app/Contents/MacOS/Vesktop $out/bin/vesktop ''; - desktopItems = lib.optional stdenv.isLinux (makeDesktopItem { + desktopItems = lib.optional stdenv.hostPlatform.isLinux (makeDesktopItem { name = "vesktop"; desktopName = "Vesktop"; exec = "vesktop %U"; diff --git a/pkgs/by-name/vi/vieb/package.nix b/pkgs/by-name/vi/vieb/package.nix index 6927cb3e24af..af524a450e4d 100644 --- a/pkgs/by-name/vi/vieb/package.nix +++ b/pkgs/by-name/vi/vieb/package.nix @@ -20,7 +20,7 @@ buildNpmPackage rec { dontNpmBuild = true; env.ELECTRON_SKIP_BINARY_DOWNLOAD = 1; - nativeBuildInputs = [ makeWrapper ] ++ lib.optional stdenv.isAarch64 python3; + nativeBuildInputs = [ makeWrapper ] ++ lib.optional stdenv.hostPlatform.isAarch64 python3; desktopItem = makeDesktopItem { name = "vieb"; diff --git a/pkgs/by-name/vi/vis/package.nix b/pkgs/by-name/vi/vis/package.nix index f16f717e7dc8..7d37d022a86a 100644 --- a/pkgs/by-name/vi/vis/package.nix +++ b/pkgs/by-name/vi/vis/package.nix @@ -25,7 +25,7 @@ stdenv.mkDerivation rec { libtermkey luaEnv tre - ] ++ lib.optionals stdenv.isLinux [ + ] ++ lib.optionals stdenv.hostPlatform.isLinux [ acl libselinux ]; diff --git a/pkgs/by-name/vl/vlc-bin/package.nix b/pkgs/by-name/vl/vlc-bin/package.nix index 275e768c7ea2..9e496883ccb8 100644 --- a/pkgs/by-name/vl/vlc-bin/package.nix +++ b/pkgs/by-name/vl/vlc-bin/package.nix @@ -4,9 +4,9 @@ , stdenv , undmg , variant ? - if (stdenv.isDarwin && stdenv.isAarch64) + if (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isAarch64) then "arm64" - else if (stdenv.isDarwin && stdenv.isx86_64) + else if (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isx86_64) then "intel64" else "universal" # not reachable by normal means }: diff --git a/pkgs/by-name/vo/volk_2/package.nix b/pkgs/by-name/vo/volk_2/package.nix index 447922865cbf..57b849fcc28b 100644 --- a/pkgs/by-name/vo/volk_2/package.nix +++ b/pkgs/by-name/vo/volk_2/package.nix @@ -37,13 +37,13 @@ stdenv.mkDerivation (finalAttrs: { cmakeFlags = [ (lib.cmakeBool "ENABLE_MODTOOL" enableModTool) ] - ++ lib.optionals (stdenv.isDarwin && stdenv.isAarch64) [ + ++ lib.optionals (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isAarch64) [ # offset 14335 in1: -1.03372 in2: -1.03371 tolerance was: 1e-05 # volk_32f_log2_32f: fail on arch neon "-DCMAKE_CTEST_ARGUMENTS=--exclude-regex;qa_volk_32f_log2_32f" ]; - postInstall = lib.optionalString (!stdenv.isDarwin) '' + postInstall = lib.optionalString (!stdenv.hostPlatform.isDarwin) '' remove-references-to -t ${stdenv.cc} $(readlink -f $out/lib/libvolk.so) ''; diff --git a/pkgs/by-name/vs/vsce/package.nix b/pkgs/by-name/vs/vsce/package.nix index 873b4e2c1af3..1ecf3d9204d6 100644 --- a/pkgs/by-name/vs/vsce/package.nix +++ b/pkgs/by-name/vs/vsce/package.nix @@ -30,7 +30,7 @@ buildNpmPackage rec { nativeBuildInputs = [ pkg-config python3 ]; buildInputs = [ libsecret ] - ++ lib.optionals stdenv.isDarwin (with darwin.apple_sdk.frameworks; [ AppKit Security ]); + ++ lib.optionals stdenv.hostPlatform.isDarwin (with darwin.apple_sdk.frameworks; [ AppKit Security ]); makeCacheWritable = true; npmFlags = [ "--legacy-peer-deps" ]; diff --git a/pkgs/by-name/vs/vscode-js-debug/package.nix b/pkgs/by-name/vs/vscode-js-debug/package.nix index b16717bf5d52..bde7ae221517 100644 --- a/pkgs/by-name/vs/vscode-js-debug/package.nix +++ b/pkgs/by-name/vs/vscode-js-debug/package.nix @@ -30,11 +30,11 @@ buildNpmPackage rec { nativeBuildInputs = [ pkg-config node-gyp - ] ++ lib.optionals stdenv.isDarwin [ xcbuild ]; + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ xcbuild ]; buildInputs = - lib.optionals (!stdenv.isDarwin) [ libsecret ] - ++ lib.optionals stdenv.isDarwin [ + lib.optionals (!stdenv.hostPlatform.isDarwin) [ libsecret ] + ++ lib.optionals stdenv.hostPlatform.isDarwin [ Security AppKit ]; diff --git a/pkgs/by-name/vv/vvvvvv/package.nix b/pkgs/by-name/vv/vvvvvv/package.nix index c4ed05616620..471a84eecb89 100644 --- a/pkgs/by-name/vv/vvvvvv/package.nix +++ b/pkgs/by-name/vv/vvvvvv/package.nix @@ -45,7 +45,7 @@ stdenv.mkDerivation rec { physfs SDL2 tinyxml-2 - ] ++ lib.optionals stdenv.isDarwin [ Foundation IOKit ]; + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ Foundation IOKit ]; cmakeDir = "../desktop_version"; diff --git a/pkgs/by-name/wa/wapm/package.nix b/pkgs/by-name/wa/wapm/package.nix index 94d97dbfc285..420baa5baeb3 100644 --- a/pkgs/by-name/wa/wapm/package.nix +++ b/pkgs/by-name/wa/wapm/package.nix @@ -24,7 +24,7 @@ rustPlatform.buildRustPackage rec { nativeBuildInputs = [ perl ]; buildInputs = [ libiconv openssl ] - ++ lib.optionals stdenv.isDarwin (with darwin.apple_sdk.frameworks; [ Security SystemConfiguration ]); + ++ lib.optionals stdenv.hostPlatform.isDarwin (with darwin.apple_sdk.frameworks; [ Security SystemConfiguration ]); doCheck = false; diff --git a/pkgs/by-name/wa/warp-terminal/package.nix b/pkgs/by-name/wa/warp-terminal/package.nix index 71c23dc8f751..adb2b2614e82 100644 --- a/pkgs/by-name/wa/warp-terminal/package.nix +++ b/pkgs/by-name/wa/warp-terminal/package.nix @@ -109,6 +109,6 @@ meta = with lib; { }; in -if stdenvNoCC.isDarwin +if stdenvNoCC.hostPlatform.isDarwin then darwin else linux diff --git a/pkgs/by-name/wa/wash-cli/package.nix b/pkgs/by-name/wa/wash-cli/package.nix index d5b3ebecf8cd..663273e54e4b 100644 --- a/pkgs/by-name/wa/wash-cli/package.nix +++ b/pkgs/by-name/wa/wash-cli/package.nix @@ -24,7 +24,7 @@ in rustPlatform.buildRustPackage rec { nativeBuildInputs = [ pkg-config ]; buildInputs = [ openssl ] - ++ lib.optionals stdenv.isDarwin [ + ++ lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.SystemConfiguration darwin.apple_sdk.frameworks.CoreServices ]; diff --git a/pkgs/by-name/wa/wasm-bindgen-cli/package.nix b/pkgs/by-name/wa/wasm-bindgen-cli/package.nix index 517b2813478f..d9b997805440 100644 --- a/pkgs/by-name/wa/wasm-bindgen-cli/package.nix +++ b/pkgs/by-name/wa/wasm-bindgen-cli/package.nix @@ -24,7 +24,7 @@ rustPlatform.buildRustPackage rec { buildInputs = [ openssl ] - ++ lib.optionals stdenv.isDarwin [ + ++ lib.optionals stdenv.hostPlatform.isDarwin [ curl darwin.apple_sdk.frameworks.Security ]; diff --git a/pkgs/by-name/wa/wastebin/package.nix b/pkgs/by-name/wa/wastebin/package.nix index cdc5feb24b80..f63429bff248 100644 --- a/pkgs/by-name/wa/wastebin/package.nix +++ b/pkgs/by-name/wa/wastebin/package.nix @@ -29,7 +29,7 @@ rustPlatform.buildRustPackage rec { buildInputs = [ sqlite zstd - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.SystemConfiguration ]; diff --git a/pkgs/by-name/wa/waybar/package.nix b/pkgs/by-name/wa/waybar/package.nix index fe8143c2eb49..e0eb7a76eda0 100644 --- a/pkgs/by-name/wa/waybar/package.nix +++ b/pkgs/by-name/wa/waybar/package.nix @@ -53,7 +53,7 @@ inputSupport ? true, jackSupport ? true, mpdSupport ? true, - mprisSupport ? stdenv.isLinux, + mprisSupport ? stdenv.hostPlatform.isLinux, nlSupport ? true, pipewireSupport ? true, pulseSupport ? true, @@ -158,7 +158,7 @@ stdenv.mkDerivation (finalAttrs: { ++ lib.optional upowerSupport upower ++ lib.optional wireplumberSupport wireplumber ++ lib.optional (cavaSupport || pipewireSupport) pipewire - ++ lib.optional (!stdenv.isLinux) libinotify-kqueue; + ++ lib.optional (!stdenv.hostPlatform.isLinux) libinotify-kqueue; nativeCheckInputs = [ catch2_3 ]; doCheck = runTests; diff --git a/pkgs/by-name/we/weaver/package.nix b/pkgs/by-name/we/weaver/package.nix index 22b5c9ef93a8..7734b0d6f585 100644 --- a/pkgs/by-name/we/weaver/package.nix +++ b/pkgs/by-name/we/weaver/package.nix @@ -21,7 +21,7 @@ rustPlatform.buildRustPackage rec { cargoHash = "sha256-4rHDulSsFvKly5M5bo1AtEAl280N/hxhznTngCxw36Y="; - buildInputs = lib.optionals stdenv.isDarwin ( + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin ( with darwin.apple_sdk_11_0.frameworks; [ SystemConfiguration ] ); diff --git a/pkgs/by-name/we/werf/package.nix b/pkgs/by-name/we/werf/package.nix index aa914fdd8f7a..9f55f565d525 100644 --- a/pkgs/by-name/we/werf/package.nix +++ b/pkgs/by-name/we/werf/package.nix @@ -29,10 +29,10 @@ buildGoModule rec { nativeBuildInputs = [ installShellFiles ]; buildInputs = - lib.optionals stdenv.isLinux [ btrfs-progs ] + lib.optionals stdenv.hostPlatform.isLinux [ btrfs-progs ] ++ lib.optionals stdenv.hostPlatform.isGnu [ stdenv.cc.libc.static ]; - CGO_ENABLED = if stdenv.isLinux then 1 else 0; + CGO_ENABLED = if stdenv.hostPlatform.isLinux then 1 else 0; ldflags = [ diff --git a/pkgs/by-name/wi/wiliwili/package.nix b/pkgs/by-name/wi/wiliwili/package.nix index 302b47b65b4e..85cc143f45f6 100644 --- a/pkgs/by-name/wi/wiliwili/package.nix +++ b/pkgs/by-name/wi/wiliwili/package.nix @@ -31,7 +31,7 @@ stdenv.mkDerivation (finalAttrs: { nativeBuildInputs = [ cmake pkg-config - ] ++ lib.optionals stdenv.isLinux [ + ] ++ lib.optionals stdenv.hostPlatform.isLinux [ wayland-scanner ]; @@ -41,7 +41,7 @@ stdenv.mkDerivation (finalAttrs: { curl libxkbcommon dbus - ] ++ lib.optionals stdenv.isLinux [ + ] ++ lib.optionals stdenv.hostPlatform.isLinux [ libffi # needed for wayland wayland egl-wayland @@ -55,8 +55,8 @@ stdenv.mkDerivation (finalAttrs: { cmakeFlags = [ (lib.cmakeBool "PLATFORM_DESKTOP" true) (lib.cmakeBool "INSTALL" true) - (lib.cmakeBool "GLFW_BUILD_WAYLAND" stdenv.isLinux) - (lib.cmakeBool "GLFW_BUILD_X11" stdenv.isLinux) + (lib.cmakeBool "GLFW_BUILD_WAYLAND" stdenv.hostPlatform.isLinux) + (lib.cmakeBool "GLFW_BUILD_X11" stdenv.hostPlatform.isLinux) # Otherwise cpr cmake will try to download zlib (lib.cmakeBool "CPR_FORCE_USE_SYSTEM_CURL" true) ]; diff --git a/pkgs/by-name/wi/wiper/package.nix b/pkgs/by-name/wi/wiper/package.nix index 3eb069de236a..1540bbda4bc4 100644 --- a/pkgs/by-name/wi/wiper/package.nix +++ b/pkgs/by-name/wi/wiper/package.nix @@ -21,7 +21,7 @@ rustPlatform.buildRustPackage { cargoHash = "sha256-gYWTv0AXOmpx9Nc8akBMVWkESI0AtnGgvfH9hQZ0peo="; - buildInputs = lib.optionals stdenv.isDarwin [ darwin.apple_sdk.frameworks.Foundation ]; + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.Foundation ]; meta = { description = "Disk analyser and cleanup tool"; diff --git a/pkgs/by-name/wl/wl-clip-persist/package.nix b/pkgs/by-name/wl/wl-clip-persist/package.nix index 3b31f14f8c20..cfa8eced287f 100644 --- a/pkgs/by-name/wl/wl-clip-persist/package.nix +++ b/pkgs/by-name/wl/wl-clip-persist/package.nix @@ -25,7 +25,7 @@ rustPlatform.buildRustPackage rec { buildInputs = [ wayland ]; meta = with lib; { - broken = stdenv.isDarwin; + broken = stdenv.hostPlatform.isDarwin; description = "Keep Wayland clipboard even after programs close"; homepage = "https://github.com/Linus789/wl-clip-persist"; inherit (wayland.meta) platforms; diff --git a/pkgs/by-name/wl/wlx-overlay-s/package.nix b/pkgs/by-name/wl/wlx-overlay-s/package.nix index c5fa7e2ffcb9..36d6ca6fa11d 100644 --- a/pkgs/by-name/wl/wlx-overlay-s/package.nix +++ b/pkgs/by-name/wl/wlx-overlay-s/package.nix @@ -98,7 +98,7 @@ rustPlatform.buildRustPackage rec { license = lib.licenses.gpl3Only; maintainers = with lib.maintainers; [ Scrumplex ]; platforms = lib.platforms.linux; - broken = stdenv.isAarch64; + broken = stdenv.hostPlatform.isAarch64; mainProgram = "wlx-overlay-s"; }; } diff --git a/pkgs/by-name/ws/wslay/package.nix b/pkgs/by-name/ws/wslay/package.nix index 45054f8130f1..85f3294ebabe 100644 --- a/pkgs/by-name/ws/wslay/package.nix +++ b/pkgs/by-name/ws/wslay/package.nix @@ -39,7 +39,7 @@ stdenv.mkDerivation rec { checkInputs = [ cunit ]; - preCheck = lib.optionalString stdenv.isDarwin '' + preCheck = lib.optionalString stdenv.hostPlatform.isDarwin '' export DYLD_LIBRARY_PATH=$(pwd)/lib/.libs ''; diff --git a/pkgs/by-name/wt/wttrbar/package.nix b/pkgs/by-name/wt/wttrbar/package.nix index b844b826a932..0110caec8e50 100644 --- a/pkgs/by-name/wt/wttrbar/package.nix +++ b/pkgs/by-name/wt/wttrbar/package.nix @@ -17,7 +17,7 @@ rustPlatform.buildRustPackage rec { hash = "sha256-fuLKWooXn966RORH20D9wwbjNtyLEZOO8Y8RcjsFwqM="; }; - buildInputs = lib.optionals stdenv.isDarwin (with darwin.apple_sdk_11_0.frameworks; [ Security SystemConfiguration ]); + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin (with darwin.apple_sdk_11_0.frameworks; [ Security SystemConfiguration ]); cargoHash = "sha256-Of1tHKIL2XbzA6YFxtvaP9sa+KMw8uJTFG0n84g2Eog="; diff --git a/pkgs/by-name/wt/wtwitch/package.nix b/pkgs/by-name/wt/wtwitch/package.nix index 0035e184540c..73bfe1c3fd62 100644 --- a/pkgs/by-name/wt/wtwitch/package.nix +++ b/pkgs/by-name/wt/wtwitch/package.nix @@ -47,7 +47,7 @@ stdenv.mkDerivation rec { install -Dm755 src/wtwitch $out/bin/wtwitch wrapProgram $out/bin/wtwitch \ --set-default LANG en_US.UTF-8 \ - --prefix PATH : ${lib.makeBinPath (lib.optionals stdenv.isLinux [ vlc ] ++ [ + --prefix PATH : ${lib.makeBinPath (lib.optionals stdenv.hostPlatform.isLinux [ vlc ] ++ [ bash coreutils-prefixed curl diff --git a/pkgs/by-name/x1/x16/package.nix b/pkgs/by-name/x1/x16/package.nix index b6f8926a4d1c..26a12e480e7f 100644 --- a/pkgs/by-name/x1/x16/package.nix +++ b/pkgs/by-name/x1/x16/package.nix @@ -57,6 +57,6 @@ stdenv.mkDerivation (finalAttrs: { maintainers = with lib.maintainers; [ AndersonTorres ]; mainProgram = "x16emu"; inherit (SDL2.meta) platforms; - broken = stdenv.isAarch64; # ofborg fails to compile it + broken = stdenv.hostPlatform.isAarch64; # ofborg fails to compile it }; }) diff --git a/pkgs/by-name/x1/x16/rom.nix b/pkgs/by-name/x1/x16/rom.nix index 989e81094159..ed85dd5108ac 100644 --- a/pkgs/by-name/x1/x16/rom.nix +++ b/pkgs/by-name/x1/x16/rom.nix @@ -54,6 +54,6 @@ stdenv.mkDerivation (finalAttrs: { license = lib.licenses.bsd2; maintainers = with lib.maintainers; [ AndersonTorres ]; inherit (cc65.meta) platforms; - broken = stdenv.isDarwin && stdenv.isAarch64; + broken = stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isAarch64; }; }) diff --git a/pkgs/by-name/xd/xdg-user-dirs/package.nix b/pkgs/by-name/xd/xdg-user-dirs/package.nix index 5d141eb8049c..98d95290ca1e 100644 --- a/pkgs/by-name/xd/xdg-user-dirs/package.nix +++ b/pkgs/by-name/xd/xdg-user-dirs/package.nix @@ -18,13 +18,13 @@ stdenv.mkDerivation (finalAttrs: { hash = "sha256-7G8G10lc26N6cyA5+bXhV4vLKWV2/eDaQO2y9SIg3zw="; }; - buildInputs = lib.optionals stdenv.isDarwin [ libiconv ]; + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ libiconv ]; nativeBuildInputs = [ makeWrapper libxslt docbook_xsl - ] ++ lib.optionals stdenv.isDarwin [ gettext ]; + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ gettext ]; preFixup = '' # fallback values need to be last diff --git a/pkgs/by-name/xe/xevd/package.nix b/pkgs/by-name/xe/xevd/package.nix index d5ba1995bb14..fc5c80e31bbb 100644 --- a/pkgs/by-name/xe/xevd/package.nix +++ b/pkgs/by-name/xe/xevd/package.nix @@ -99,6 +99,6 @@ stdenv.mkDerivation (finalAttrs: { pkgConfigModules = [ "xevd" ]; maintainers = with lib.maintainers; [ jopejoe1 ]; platforms = lib.platforms.all; - broken = stdenv.isLinux && stdenv.isAarch64; + broken = stdenv.hostPlatform.isLinux && stdenv.hostPlatform.isAarch64; }; }) diff --git a/pkgs/by-name/xe/xeve/package.nix b/pkgs/by-name/xe/xeve/package.nix index f8acbee0acc0..2f9f2b029d21 100644 --- a/pkgs/by-name/xe/xeve/package.nix +++ b/pkgs/by-name/xe/xeve/package.nix @@ -102,6 +102,6 @@ stdenv.mkDerivation (finalAttrs: { mainProgram = "xeve_app"; maintainers = with lib.maintainers; [ jopejoe1 ]; platforms = lib.platforms.all; - broken = stdenv.isLinux && stdenv.isAarch64; + broken = stdenv.hostPlatform.isLinux && stdenv.hostPlatform.isAarch64; }; }) diff --git a/pkgs/by-name/xi/xiu/package.nix b/pkgs/by-name/xi/xiu/package.nix index 30b692690124..fe5ab564e9f7 100644 --- a/pkgs/by-name/xi/xiu/package.nix +++ b/pkgs/by-name/xi/xiu/package.nix @@ -29,9 +29,9 @@ rustPlatform.buildRustPackage rec { buildInputs = [ libopus - ] ++ lib.optionals stdenv.isLinux [ + ] ++ lib.optionals stdenv.hostPlatform.isLinux [ openssl - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.SystemConfiguration ]; diff --git a/pkgs/by-name/xm/xml-tooling-c/package.nix b/pkgs/by-name/xm/xml-tooling-c/package.nix index 921175c3e879..709bfee14bb4 100644 --- a/pkgs/by-name/xm/xml-tooling-c/package.nix +++ b/pkgs/by-name/xm/xml-tooling-c/package.nix @@ -36,7 +36,7 @@ stdenv.mkDerivation rec { pkg-config ]; - env.NIX_CFLAGS_COMPILE = lib.optionalString (!stdenv.isDarwin) "-std=c++14"; + env.NIX_CFLAGS_COMPILE = lib.optionalString (!stdenv.hostPlatform.isDarwin) "-std=c++14"; enableParallelBuilding = true; diff --git a/pkgs/by-name/xp/xplr/package.nix b/pkgs/by-name/xp/xplr/package.nix index 0bdfdfbc8a2c..b75adabdfdc7 100644 --- a/pkgs/by-name/xp/xplr/package.nix +++ b/pkgs/by-name/xp/xplr/package.nix @@ -14,7 +14,7 @@ rustPlatform.buildRustPackage rec { cargoHash = "sha256-RZgdWhVBZozYxbbNslCBLhN6EnogpyVXvht6GbzLnPs="; # fixes `thread 'main' panicked at 'cannot find strip'` on x86_64-darwin - env = lib.optionalAttrs (stdenv.isx86_64 && stdenv.isDarwin) { + env = lib.optionalAttrs (stdenv.hostPlatform.isx86_64 && stdenv.hostPlatform.isDarwin) { TARGET_STRIP = "${stdenv.cc.targetPrefix}strip"; }; diff --git a/pkgs/by-name/xs/xsimd/package.nix b/pkgs/by-name/xs/xsimd/package.nix index 8f8c72bc3f6a..622f11f400bc 100644 --- a/pkgs/by-name/xs/xsimd/package.nix +++ b/pkgs/by-name/xs/xsimd/package.nix @@ -23,7 +23,7 @@ stdenv.mkDerivation (finalAttrs: { url = "https://github.com/xtensor-stack/xsimd/commit/c8a87ed6e04b6782f48f94713adfb0cad6c11ddf.patch"; hash = "sha256-2/FvBGdqTPcayD7rdHPSzL+F8IYKAfMW0WBJ0cW9EZ0="; }) - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ # https://github.com/xtensor-stack/xsimd/issues/1030 ./disable-test_error_gamma.patch ]; diff --git a/pkgs/by-name/ya/yabai/package.nix b/pkgs/by-name/ya/yabai/package.nix index 9cc32a64fff7..863b3b4fafad 100644 --- a/pkgs/by-name/ya/yabai/package.nix +++ b/pkgs/by-name/ya/yabai/package.nix @@ -23,7 +23,7 @@ let SkyLight ; - stdenv' = if stdenv.isDarwin then overrideSDK stdenv "11.0" else stdenv; + stdenv' = if stdenv.hostPlatform.isDarwin then overrideSDK stdenv "11.0" else stdenv; in stdenv'.mkDerivation (finalAttrs: { pname = "yabai"; @@ -40,12 +40,12 @@ stdenv'.mkDerivation (finalAttrs: { nativeBuildInputs = [ installShellFiles ] - ++ lib.optionals stdenv.isx86_64 [ + ++ lib.optionals stdenv.hostPlatform.isx86_64 [ xcodebuild xxd ]; - buildInputs = lib.optionals stdenv.isx86_64 [ + buildInputs = lib.optionals stdenv.hostPlatform.isx86_64 [ Carbon Cocoa ScriptingBridge @@ -53,7 +53,7 @@ stdenv'.mkDerivation (finalAttrs: { ]; dontConfigure = true; - dontBuild = stdenv.isAarch64; + dontBuild = stdenv.hostPlatform.isAarch64; enableParallelBuilding = true; installPhase = '' @@ -62,14 +62,14 @@ stdenv'.mkDerivation (finalAttrs: { mkdir -p $out/{bin,share/icons/hicolor/scalable/apps} cp ./bin/yabai $out/bin/yabai - ${lib.optionalString stdenv.isx86_64 "cp ./assets/icon/icon.svg $out/share/icons/hicolor/scalable/apps/yabai.svg"} + ${lib.optionalString stdenv.hostPlatform.isx86_64 "cp ./assets/icon/icon.svg $out/share/icons/hicolor/scalable/apps/yabai.svg"} installManPage ./doc/yabai.1 runHook postInstall ''; postPatch = - lib.optionalString stdenv.isx86_64 # bash + lib.optionalString stdenv.hostPlatform.isx86_64 # bash '' # aarch64 code is compiled on all targets, which causes our Apple SDK headers to error out. # Since multilib doesn't work on darwin i dont know of a better way of handling this. @@ -146,6 +146,6 @@ stdenv'.mkDerivation (finalAttrs: { ]; sourceProvenance = with lib.sourceTypes; - lib.optionals stdenv.isx86_64 [ fromSource ] ++ lib.optionals stdenv.isAarch64 [ binaryNativeCode ]; + lib.optionals stdenv.hostPlatform.isx86_64 [ fromSource ] ++ lib.optionals stdenv.hostPlatform.isAarch64 [ binaryNativeCode ]; }; }) diff --git a/pkgs/by-name/ya/yapesdl/package.nix b/pkgs/by-name/ya/yapesdl/package.nix index 44bb2a0dbaf8..9b974c3eebe2 100644 --- a/pkgs/by-name/ya/yapesdl/package.nix +++ b/pkgs/by-name/ya/yapesdl/package.nix @@ -47,6 +47,6 @@ stdenv.mkDerivation (finalAttrs: { mainProgram = "yapesdl"; maintainers = with lib.maintainers; [ AndersonTorres ]; platforms = lib.platforms.unix; - broken = stdenv.isDarwin; + broken = stdenv.hostPlatform.isDarwin; }; }) diff --git a/pkgs/by-name/ya/yazi-unwrapped/package.nix b/pkgs/by-name/ya/yazi-unwrapped/package.nix index 3245be8f3144..561eea7fdb0d 100644 --- a/pkgs/by-name/ya/yazi-unwrapped/package.nix +++ b/pkgs/by-name/ya/yazi-unwrapped/package.nix @@ -27,7 +27,7 @@ rustPlatform.buildRustPackage rec { env.VERGEN_BUILD_DATE = "2024-09-04"; nativeBuildInputs = [ installShellFiles ]; - buildInputs = [ rust-jemalloc-sys ] ++ lib.optionals stdenv.isDarwin [ Foundation ]; + buildInputs = [ rust-jemalloc-sys ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ Foundation ]; postInstall = '' installShellCompletion --cmd yazi \ diff --git a/pkgs/by-name/yc/ycmd/package.nix b/pkgs/by-name/yc/ycmd/package.nix index 325a8d95e6bc..56a384df64f5 100644 --- a/pkgs/by-name/yc/ycmd/package.nix +++ b/pkgs/by-name/yc/ycmd/package.nix @@ -35,7 +35,7 @@ stdenv.mkDerivation { ++ lib.optional stdenv.hostPlatform.isDarwin fixDarwinDylibNames; buildInputs = with python.pkgs; with llvmPackages; [ abseil-cpp boost libllvm.all libclang.all ] ++ [ jedi jedi-language-server pybind11 ] - ++ lib.optional stdenv.isDarwin Cocoa; + ++ lib.optional stdenv.hostPlatform.isDarwin Cocoa; buildPhase = '' export EXTRA_CMAKE_ARGS="-DPATH_TO_LLVM_ROOT=${llvmPackages.libllvm} -DUSE_SYSTEM_ABSEIL=true" diff --git a/pkgs/by-name/ye/yesplaymusic/package.nix b/pkgs/by-name/ye/yesplaymusic/package.nix index 9a20e9ecf312..077ba8775879 100644 --- a/pkgs/by-name/ye/yesplaymusic/package.nix +++ b/pkgs/by-name/ye/yesplaymusic/package.nix @@ -74,7 +74,7 @@ let platforms = builtins.attrNames srcs; }; in -if stdenv.isDarwin +if stdenv.hostPlatform.isDarwin then stdenv.mkDerivation { inherit pname version src meta; diff --git a/pkgs/by-name/yt/ytui-music/package.nix b/pkgs/by-name/yt/ytui-music/package.nix index 3c460082b27e..0e520955e057 100644 --- a/pkgs/by-name/yt/ytui-music/package.nix +++ b/pkgs/by-name/yt/ytui-music/package.nix @@ -38,7 +38,7 @@ rustPlatform.buildRustPackage rec { openssl sqlite mpv - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.CoreFoundation darwin.apple_sdk.frameworks.Security ]; diff --git a/pkgs/by-name/yu/yubico-piv-tool/package.nix b/pkgs/by-name/yu/yubico-piv-tool/package.nix index ba0476862841..69665583f2e4 100644 --- a/pkgs/by-name/yu/yubico-piv-tool/package.nix +++ b/pkgs/by-name/yu/yubico-piv-tool/package.nix @@ -13,7 +13,7 @@ stdenv, testers, zlib, - withApplePCSC ? stdenv.isDarwin, + withApplePCSC ? stdenv.hostPlatform.isDarwin, }: stdenv.mkDerivation (finalAttrs: { diff --git a/pkgs/by-name/za/zapret/package.nix b/pkgs/by-name/za/zapret/package.nix index 658d525bf36f..4cb0f099e08f 100644 --- a/pkgs/by-name/za/zapret/package.nix +++ b/pkgs/by-name/za/zapret/package.nix @@ -77,6 +77,6 @@ stdenv.mkDerivation { mainProgram = "zapret"; # probably gonna work on darwin, but untested - broken = stdenv.isDarwin; + broken = stdenv.hostPlatform.isDarwin; }; } diff --git a/pkgs/by-name/zc/zchunk/package.nix b/pkgs/by-name/zc/zchunk/package.nix index 0e7df32c08a9..e0450116f5b9 100644 --- a/pkgs/by-name/zc/zchunk/package.nix +++ b/pkgs/by-name/zc/zchunk/package.nix @@ -32,7 +32,7 @@ stdenv.mkDerivation (finalAttrs: { buildInputs = [ curl zstd - ] ++ lib.optionals stdenv.isDarwin [ argp-standalone ]; + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ argp-standalone ]; outputs = [ "out" diff --git a/pkgs/by-name/ze/zed-editor/package.nix b/pkgs/by-name/ze/zed-editor/package.nix index 2088a1ac98f5..9ee49b8ef6e2 100644 --- a/pkgs/by-name/ze/zed-editor/package.nix +++ b/pkgs/by-name/ze/zed-editor/package.nix @@ -35,7 +35,7 @@ withGLES ? false, }: -assert withGLES -> stdenv.isLinux; +assert withGLES -> stdenv.hostPlatform.isLinux; let executableName = "zeditor"; @@ -130,7 +130,7 @@ rustPlatform.buildRustPackage rec { protobuf rustPlatform.bindgenHook cargo-about - ] ++ lib.optionals stdenv.isDarwin [ xcbuild.xcrun ]; + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ xcbuild.xcrun ]; buildInputs = [ @@ -143,13 +143,13 @@ rustPlatform.buildRustPackage rec { zlib zstd ] - ++ lib.optionals stdenv.isLinux [ + ++ lib.optionals stdenv.hostPlatform.isLinux [ alsa-lib libxkbcommon wayland xorg.libxcb ] - ++ lib.optionals stdenv.isDarwin ( + ++ lib.optionals stdenv.hostPlatform.isDarwin ( with darwin.apple_sdk.frameworks; [ AppKit @@ -196,7 +196,7 @@ rustPlatform.buildRustPackage rec { bash script/generate-licenses ''; - postFixup = lib.optionalString stdenv.isLinux '' + postFixup = lib.optionalString stdenv.hostPlatform.isLinux '' patchelf --add-rpath ${gpu-lib}/lib $out/libexec/* patchelf --add-rpath ${wayland}/lib $out/libexec/* ''; @@ -265,6 +265,6 @@ rustPlatform.buildRustPackage rec { mainProgram = "zeditor"; platforms = lib.platforms.all; # Currently broken on darwin: https://github.com/NixOS/nixpkgs/pull/303233#issuecomment-2048650618 - broken = stdenv.isDarwin; + broken = stdenv.hostPlatform.isDarwin; }; } diff --git a/pkgs/by-name/ze/zerotierone/package.nix b/pkgs/by-name/ze/zerotierone/package.nix index eb09f58e888a..728ec4ee3c37 100644 --- a/pkgs/by-name/ze/zerotierone/package.nix +++ b/pkgs/by-name/ze/zerotierone/package.nix @@ -77,7 +77,7 @@ in stdenv.mkDerivation { lzo openssl zlib - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ libiconv darwin.apple_sdk.frameworks.SystemConfiguration darwin.apple_sdk.frameworks.CoreServices @@ -88,7 +88,7 @@ in stdenv.mkDerivation { # Ensure Rust compiles for the right target env.CARGO_BUILD_TARGET = stdenv.hostPlatform.rust.rustcTarget; - preBuild = if stdenv.isDarwin then '' + preBuild = if stdenv.hostPlatform.isDarwin then '' makeFlagsArray+=("ARCH_FLAGS=") # disable multi-arch build if ! grep -q MACOS_VERSION_MIN=10.13 make-mac.mk; then echo "You may need to update MACOSX_DEPLOYMENT_TARGET to match the value in make-mac.mk" diff --git a/pkgs/by-name/zo/zola/package.nix b/pkgs/by-name/zo/zola/package.nix index e6fc773a2127..5f658eed3960 100644 --- a/pkgs/by-name/zo/zola/package.nix +++ b/pkgs/by-name/zo/zola/package.nix @@ -30,7 +30,7 @@ rustPlatform.buildRustPackage rec { buildInputs = [ oniguruma - ] ++ lib.optionals stdenv.isDarwin (with darwin.apple_sdk.frameworks; [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin (with darwin.apple_sdk.frameworks; [ CoreServices SystemConfiguration ]); diff --git a/pkgs/by-name/zo/zoom-us/package.nix b/pkgs/by-name/zo/zoom-us/package.nix index 230825c93564..e64b20fce6d3 100644 --- a/pkgs/by-name/zo/zoom-us/package.nix +++ b/pkgs/by-name/zo/zoom-us/package.nix @@ -119,8 +119,8 @@ stdenv.mkDerivation rec { src = srcs.${system} or throwSystem; - dontUnpack = stdenv.isLinux; - unpackPhase = lib.optionalString stdenv.isDarwin '' + dontUnpack = stdenv.hostPlatform.isLinux; + unpackPhase = lib.optionalString stdenv.hostPlatform.isDarwin '' xar -xf $src zcat < zoomus.pkg/Payload | cpio -i ''; @@ -128,7 +128,7 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ makeWrapper ] - ++ lib.optionals stdenv.isDarwin [ + ++ lib.optionals stdenv.hostPlatform.isDarwin [ xar cpio ]; @@ -151,9 +151,9 @@ stdenv.mkDerivation rec { runHook postInstall ''; - postFixup = lib.optionalString stdenv.isDarwin '' + postFixup = lib.optionalString stdenv.hostPlatform.isDarwin '' makeWrapper $out/Applications/zoom.us.app/Contents/MacOS/zoom.us $out/bin/zoom - '' + lib.optionalString stdenv.isLinux '' + '' + lib.optionalString stdenv.hostPlatform.isLinux '' # Desktop File substituteInPlace $out/share/applications/Zoom.desktop \ --replace-fail "Exec=/usr/bin/zoom" "Exec=$out/bin/zoom" diff --git a/pkgs/by-name/zu/zutty/package.nix b/pkgs/by-name/zu/zutty/package.nix index 4a931a1c4eb0..bca3a376467f 100644 --- a/pkgs/by-name/zu/zutty/package.nix +++ b/pkgs/by-name/zu/zutty/package.nix @@ -46,7 +46,7 @@ stdenv.mkDerivation (finalAttrs: { ]; passthru = { - tests = lib.optionalAttrs stdenv.isLinux { default = nixosTests.terminal-emulators.zutty; }; + tests = lib.optionalAttrs stdenv.hostPlatform.isLinux { default = nixosTests.terminal-emulators.zutty; }; }; meta = { diff --git a/pkgs/data/fonts/iosevka/default.nix b/pkgs/data/fonts/iosevka/default.nix index d563ff2ee344..7f7979c5bec5 100644 --- a/pkgs/data/fonts/iosevka/default.nix +++ b/pkgs/data/fonts/iosevka/default.nix @@ -69,7 +69,7 @@ buildNpmPackage rec { nativeBuildInputs = [ remarshal ttfautohint-nox - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ # libtool cctools ]; diff --git a/pkgs/data/fonts/uni-vga/default.nix b/pkgs/data/fonts/uni-vga/default.nix index 1239b1238831..5be5a817b857 100644 --- a/pkgs/data/fonts/uni-vga/default.nix +++ b/pkgs/data/fonts/uni-vga/default.nix @@ -13,7 +13,7 @@ stdenv.mkDerivation { nativeBuildInputs = [ bdftopcf libfaketime xorg.fonttosfnt xorg.mkfontscale - ] ++ lib.optionals stdenv.isLinux [ perl kbd ]; + ] ++ lib.optionals stdenv.hostPlatform.isLinux [ perl kbd ]; postPatch = "patchShebangs ."; @@ -24,7 +24,7 @@ stdenv.mkDerivation { # convert bdf font to otb faketime -f "1970-01-01 00:00:01" \ fonttosfnt -v -o u_vga16.otb u_vga16.bdf - '' + lib.optionalString stdenv.isLinux '' + '' + lib.optionalString stdenv.hostPlatform.isLinux '' # convert font to compressed psf ./bdf2psf.pl -s UniCyrX.sfm u_vga16.bdf \ | psfaddtable - UniCyrX.sfm - \ @@ -40,7 +40,7 @@ stdenv.mkDerivation { install -m 644 -D *.bdf -t "$bdf/share/fonts" mkfontdir "$bdf/share/fonts" - '' + lib.optionalString stdenv.isLinux '' + '' + lib.optionalString stdenv.hostPlatform.isLinux '' # install psf (for linux virtual terminal) install -m 644 -D *.psf.gz -t "$out/share/consolefonts" ''; diff --git a/pkgs/data/icons/gnome-icon-theme/default.nix b/pkgs/data/icons/gnome-icon-theme/default.nix index 44b92c465bbe..22289b73c466 100644 --- a/pkgs/data/icons/gnome-icon-theme/default.nix +++ b/pkgs/data/icons/gnome-icon-theme/default.nix @@ -34,6 +34,6 @@ stdenv.mkDerivation rec { license = licenses.gpl3Plus; platforms = platforms.unix; maintainers = [ maintainers.romildo ]; - broken = stdenv.isDarwin; # never built on Hydra https://hydra.nixos.org/job/nixpkgs/trunk/gnome-icon-theme.x86_64-darwin + broken = stdenv.hostPlatform.isDarwin; # never built on Hydra https://hydra.nixos.org/job/nixpkgs/trunk/gnome-icon-theme.x86_64-darwin }; } diff --git a/pkgs/data/icons/volantes-cursors/default.nix b/pkgs/data/icons/volantes-cursors/default.nix index 0e0871a00038..d76a0eda4cf0 100644 --- a/pkgs/data/icons/volantes-cursors/default.nix +++ b/pkgs/data/icons/volantes-cursors/default.nix @@ -28,6 +28,6 @@ stdenv.mkDerivation { license = licenses.gpl2; maintainers = with maintainers; [ jordanisaacs ]; platforms = platforms.unix; - broken = stdenv.isDarwin && stdenv.isAarch64; # build timeout + broken = stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isAarch64; # build timeout }; } diff --git a/pkgs/data/misc/scowl/default.nix b/pkgs/data/misc/scowl/default.nix index 4bfe201beb48..53988a728de3 100644 --- a/pkgs/data/misc/scowl/default.nix +++ b/pkgs/data/misc/scowl/default.nix @@ -19,7 +19,7 @@ stdenv.mkDerivation rec { ''; nativeBuildInputs = [ unzip zip perl aspell dos2unix ]; - buildInputs = lib.optional (!stdenv.isLinux) libiconv; + buildInputs = lib.optional (!stdenv.hostPlatform.isLinux) libiconv; env.NIX_CFLAGS_COMPILE = "-Wno-narrowing"; diff --git a/pkgs/data/themes/adwaita-qt/default.nix b/pkgs/data/themes/adwaita-qt/default.nix index 7a7f151c382b..90069dc48c35 100644 --- a/pkgs/data/themes/adwaita-qt/default.nix +++ b/pkgs/data/themes/adwaita-qt/default.nix @@ -31,7 +31,7 @@ stdenv.mkDerivation rec { buildInputs = [ qtbase - ] ++ lib.optionals stdenv.isLinux [ + ] ++ lib.optionals stdenv.hostPlatform.isLinux [ xorg.libxcb ] ++ lib.optionals (!useQt6) [ qt5.qtx11extras diff --git a/pkgs/desktops/enlightenment/enlightenment/default.nix b/pkgs/desktops/enlightenment/enlightenment/default.nix index 25faa26687ae..198dae282dfa 100644 --- a/pkgs/desktops/enlightenment/enlightenment/default.nix +++ b/pkgs/desktops/enlightenment/enlightenment/default.nix @@ -16,7 +16,7 @@ , udisks2 , waylandSupport ? false, wayland-protocols, xwayland , bluetoothSupport ? true, bluez5 -, pulseSupport ? !stdenv.isDarwin, libpulseaudio +, pulseSupport ? !stdenv.hostPlatform.isDarwin, libpulseaudio , directoryListingUpdater }: diff --git a/pkgs/desktops/gnome-2/default.nix b/pkgs/desktops/gnome-2/default.nix index 3f8d7c634096..67af761d3a38 100644 --- a/pkgs/desktops/gnome-2/default.nix +++ b/pkgs/desktops/gnome-2/default.nix @@ -5,7 +5,7 @@ lib.makeScope pkgs.newScope (self: with self; { #### PLATFORM libIDL = callPackage ./platform/libIDL { - gettext = if stdenv.isDarwin then pkgs.gettext else null; + gettext = if stdenv.hostPlatform.isDarwin then pkgs.gettext else null; }; ORBit2 = callPackage ./platform/ORBit2 { }; diff --git a/pkgs/desktops/gnome-2/desktop/gtksourceview/default.nix b/pkgs/desktops/gnome-2/desktop/gtksourceview/default.nix index 902178d16706..94c3d49a97e0 100644 --- a/pkgs/desktops/gnome-2/desktop/gtksourceview/default.nix +++ b/pkgs/desktops/gnome-2/desktop/gtksourceview/default.nix @@ -15,7 +15,7 @@ stdenv.mkDerivation (finalAttrs: { sha256 = "c585773743b1df8a04b1be7f7d90eecdf22681490d6810be54c81a7ae152191e"; }; - patches = lib.optionals stdenv.isDarwin [ + patches = lib.optionals stdenv.hostPlatform.isDarwin [ (fetchpatch { name = "change-igemacintegration-to-gtkosxapplication.patch"; url = "https://gitlab.gnome.org/GNOME/gtksourceview/commit/e88357c5f210a8796104505c090fb6a04c213902.patch"; @@ -28,16 +28,16 @@ stdenv.mkDerivation (finalAttrs: { }) ]; - nativeBuildInputs = [ pkg-config intltool ] ++ lib.optionals stdenv.isDarwin [ autoreconfHook ]; + nativeBuildInputs = [ pkg-config intltool ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ autoreconfHook ]; buildInputs = [ atk cairo glib gtk2 pango libxml2Python perl gettext - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ gnome-common gtk-mac-integration-gtk2 ]; - preConfigure = lib.optionalString stdenv.isDarwin '' + preConfigure = lib.optionalString stdenv.hostPlatform.isDarwin '' intltoolize --force ''; diff --git a/pkgs/desktops/gnome-2/platform/GConf/default.nix b/pkgs/desktops/gnome-2/platform/GConf/default.nix index 33430f453ab5..ea6730f88e2e 100644 --- a/pkgs/desktops/gnome-2/platform/GConf/default.nix +++ b/pkgs/desktops/gnome-2/platform/GConf/default.nix @@ -16,7 +16,7 @@ stdenv.mkDerivation rec { buildInputs = [ ORBit2 libxml2 ] # polkit requires pam, which requires shadow.h, which is not available on # darwin - ++ lib.optional (!stdenv.isDarwin) polkit; + ++ lib.optional (!stdenv.hostPlatform.isDarwin) polkit; propagatedBuildInputs = [ glib dbus-glib ]; @@ -24,7 +24,7 @@ stdenv.mkDerivation rec { configureFlags = # fixes the "libgconfbackend-oldxml.so is not portable" error on darwin - lib.optionals stdenv.isDarwin [ "--enable-static" ]; + lib.optionals stdenv.hostPlatform.isDarwin [ "--enable-static" ]; postPatch = '' 2to3 --write --nobackup gsettings/gsettings-schema-convert diff --git a/pkgs/desktops/gnustep/libobjc2/default.nix b/pkgs/desktops/gnustep/libobjc2/default.nix index ce83250fe678..ccbbdec13ac0 100644 --- a/pkgs/desktops/gnustep/libobjc2/default.nix +++ b/pkgs/desktops/gnustep/libobjc2/default.nix @@ -23,7 +23,7 @@ stdenv.mkDerivation (finalAttrs: { cmakeFlags = [ "-DCMAKE_INSTALL_LIBDIR=lib" ]; meta = with lib; { - broken = stdenv.isDarwin; + broken = stdenv.hostPlatform.isDarwin; description = "Objective-C runtime for use with GNUstep"; homepage = "https://gnustep.github.io/"; license = licenses.mit; diff --git a/pkgs/desktops/lxqt/compton-conf/default.nix b/pkgs/desktops/lxqt/compton-conf/default.nix index be6d593b4177..2403975b481b 100644 --- a/pkgs/desktops/lxqt/compton-conf/default.nix +++ b/pkgs/desktops/lxqt/compton-conf/default.nix @@ -45,7 +45,7 @@ stdenv.mkDerivation rec { passthru.updateScript = gitUpdater { }; meta = with lib; { - broken = stdenv.isDarwin; + broken = stdenv.hostPlatform.isDarwin; homepage = "https://github.com/lxqt/compton-conf"; description = "GUI configuration tool for compton X composite manager"; mainProgram = "compton-conf"; diff --git a/pkgs/desktops/lxqt/libdbusmenu-lxqt/default.nix b/pkgs/desktops/lxqt/libdbusmenu-lxqt/default.nix index 9a49c10a1be9..62504bb33b54 100644 --- a/pkgs/desktops/lxqt/libdbusmenu-lxqt/default.nix +++ b/pkgs/desktops/lxqt/libdbusmenu-lxqt/default.nix @@ -30,7 +30,7 @@ stdenv.mkDerivation rec { passthru.updateScript = gitUpdater { }; meta = with lib; { - broken = stdenv.isDarwin; + broken = stdenv.hostPlatform.isDarwin; description = "Qt implementation of the DBusMenu protocol"; homepage = "https://github.com/lxqt/libdbusmenu-lxqt"; license = licenses.lgpl21Plus; diff --git a/pkgs/desktops/lxqt/libsysstat/default.nix b/pkgs/desktops/lxqt/libsysstat/default.nix index 6f809629eaaa..daaad022edf5 100644 --- a/pkgs/desktops/lxqt/libsysstat/default.nix +++ b/pkgs/desktops/lxqt/libsysstat/default.nix @@ -32,7 +32,7 @@ stdenv.mkDerivation rec { passthru.updateScript = gitUpdater { }; meta = with lib; { - broken = stdenv.isDarwin; + broken = stdenv.hostPlatform.isDarwin; description = "Library used to query system info and statistics"; homepage = "https://github.com/lxqt/libsysstat"; license = licenses.lgpl21Plus; diff --git a/pkgs/desktops/lxqt/qtermwidget/default.nix b/pkgs/desktops/lxqt/qtermwidget/default.nix index 51b9cef886ae..30fe20ebeefe 100644 --- a/pkgs/desktops/lxqt/qtermwidget/default.nix +++ b/pkgs/desktops/lxqt/qtermwidget/default.nix @@ -38,7 +38,7 @@ stdenv.mkDerivation rec { passthru.updateScript = gitUpdater { }; meta = with lib; { - broken = stdenv.isDarwin; + broken = stdenv.hostPlatform.isDarwin; homepage = "https://github.com/lxqt/qtermwidget"; description = "Terminal emulator widget for Qt, used by QTerminal"; license = licenses.gpl2Plus; diff --git a/pkgs/desktops/mate/libmatemixer/default.nix b/pkgs/desktops/mate/libmatemixer/default.nix index ebdd3eb07dda..25b99584429f 100644 --- a/pkgs/desktops/mate/libmatemixer/default.nix +++ b/pkgs/desktops/mate/libmatemixer/default.nix @@ -5,7 +5,7 @@ , pkg-config , gettext , glib -, alsaSupport ? stdenv.isLinux +, alsaSupport ? stdenv.hostPlatform.isLinux , alsa-lib , udev , pulseaudioSupport ? config.pulseaudio or true diff --git a/pkgs/desktops/mate/mate-menus/default.nix b/pkgs/desktops/mate/mate-menus/default.nix index 9328147e642c..31854538fb5e 100644 --- a/pkgs/desktops/mate/mate-menus/default.nix +++ b/pkgs/desktops/mate/mate-menus/default.nix @@ -39,7 +39,7 @@ stdenv.mkDerivation rec { passthru.updateScript = mateUpdateScript { inherit pname; }; meta = with lib; { - broken = stdenv.isDarwin; + broken = stdenv.hostPlatform.isDarwin; description = "Menu system for MATE"; homepage = "https://github.com/mate-desktop/mate-menus"; license = with licenses; [ gpl2Plus lgpl2Plus ]; diff --git a/pkgs/development/ada-modules/gnatcoll/bindings.nix b/pkgs/development/ada-modules/gnatcoll/bindings.nix index 0b7efb60deb9..32d490c1e1ba 100644 --- a/pkgs/development/ada-modules/gnatcoll/bindings.nix +++ b/pkgs/development/ada-modules/gnatcoll/bindings.nix @@ -48,7 +48,7 @@ stdenv.mkDerivation rec { python3 ]; - buildInputs = lib.optionals stdenv.isDarwin [ + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.CoreFoundation ]; diff --git a/pkgs/development/ada-modules/gprbuild/default.nix b/pkgs/development/ada-modules/gprbuild/default.nix index f1cf28f00af3..3965789d742e 100644 --- a/pkgs/development/ada-modules/gprbuild/default.nix +++ b/pkgs/development/ada-modules/gprbuild/default.nix @@ -39,7 +39,7 @@ stdenv.mkDerivation { "LIBRARY_TYPE=relocatable" ]; - env = lib.optionalAttrs stdenv.isDarwin { + env = lib.optionalAttrs stdenv.hostPlatform.isDarwin { # Ensure that there is enough space for the `fixDarwinDylibNames` hook to # update the install names of the output dylibs. NIX_LDFLAGS = "-headerpad_max_install_names"; diff --git a/pkgs/development/beam-modules/erlang-ls/default.nix b/pkgs/development/beam-modules/erlang-ls/default.nix index a2ea7c8bd449..e3a189adf220 100644 --- a/pkgs/development/beam-modules/erlang-ls/default.nix +++ b/pkgs/development/beam-modules/erlang-ls/default.nix @@ -45,7 +45,7 @@ rebar3Relx { HOME=. rebar3 proper --constraint_tries 100 ''; # tests seem to be a bit flaky on darwin, skip them for now - doCheck = !stdenv.isDarwin; + doCheck = !stdenv.hostPlatform.isDarwin; installFlags = [ "PREFIX=$(out)" ]; meta = with lib; { homepage = "https://github.com/erlang-ls/erlang_ls"; diff --git a/pkgs/development/compilers/bfc/default.nix b/pkgs/development/compilers/bfc/default.nix index 83710df4c13b..660f130225c8 100644 --- a/pkgs/development/compilers/bfc/default.nix +++ b/pkgs/development/compilers/bfc/default.nix @@ -38,6 +38,6 @@ rustPlatform.buildRustPackage rec { homepage = "https://bfc.wilfred.me.uk"; license = licenses.gpl2Plus; maintainers = with maintainers; [ figsoda ]; - broken = stdenv.isAarch64 && stdenv.isLinux; + broken = stdenv.hostPlatform.isAarch64 && stdenv.hostPlatform.isLinux; }; } diff --git a/pkgs/development/compilers/bigloo/default.nix b/pkgs/development/compilers/bigloo/default.nix index 9bf22ba6dcf2..b52d3fa6a31c 100644 --- a/pkgs/development/compilers/bigloo/default.nix +++ b/pkgs/development/compilers/bigloo/default.nix @@ -13,7 +13,7 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ autoconf automake libtool ]; - buildInputs = lib.optionals stdenv.isDarwin [ + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.ApplicationServices libunistring ]; @@ -22,7 +22,7 @@ stdenv.mkDerivation rec { preConfigure = # For libuv on darwin - lib.optionalString stdenv.isDarwin '' + lib.optionalString stdenv.hostPlatform.isDarwin '' export LIBTOOLIZE=libtoolize '' + # Help libgc's configure. @@ -46,7 +46,7 @@ stdenv.mkDerivation rec { checkTarget = "test"; # remove forbidden references to $TMPDIR - preFixup = lib.optionalString stdenv.isLinux '' + preFixup = lib.optionalString stdenv.hostPlatform.isLinux '' for f in "$out"/bin/*; do if isELF "$f"; then patchelf --shrink-rpath --allowed-rpath-prefixes "$NIX_STORE" "$f" @@ -60,7 +60,7 @@ stdenv.mkDerivation rec { license = lib.licenses.gpl2Plus; platforms = lib.platforms.unix; maintainers = with lib.maintainers; [ thoughtpolice ]; - broken = stdenv.isDarwin && stdenv.isAarch64; # segfault during build + broken = stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isAarch64; # segfault during build longDescription = '' Bigloo is a Scheme implementation devoted to one goal: enabling diff --git a/pkgs/development/compilers/binaryen/default.nix b/pkgs/development/compilers/binaryen/default.nix index d6c1442a8b8b..7d78c1d65972 100644 --- a/pkgs/development/compilers/binaryen/default.nix +++ b/pkgs/development/compilers/binaryen/default.nix @@ -37,7 +37,7 @@ stdenv.mkDerivation rec { # "binaryenjs" "binaryenjs_wasm" # not building this "lit" "gtest" ]; - doCheck = stdenv.isLinux; + doCheck = stdenv.hostPlatform.isLinux; meta = with lib; { homepage = "https://github.com/WebAssembly/binaryen"; diff --git a/pkgs/development/compilers/blueprint/default.nix b/pkgs/development/compilers/blueprint/default.nix index 5c1aa1b2a2cd..95903e2e76d1 100644 --- a/pkgs/development/compilers/blueprint/default.nix +++ b/pkgs/development/compilers/blueprint/default.nix @@ -45,7 +45,7 @@ stdenv.mkDerivation (finalAttrs: { ]; # requires xvfb-run - doCheck = !stdenv.isDarwin + doCheck = !stdenv.hostPlatform.isDarwin && false; # tests time out checkPhase = '' diff --git a/pkgs/development/compilers/c0/default.nix b/pkgs/development/compilers/c0/default.nix index 4c3f5ba201de..8dbb1627db3a 100644 --- a/pkgs/development/compilers/c0/default.nix +++ b/pkgs/development/compilers/c0/default.nix @@ -35,7 +35,7 @@ stdenv.mkDerivation rec { --replace '`../get_version.sh`' '${version}' \ --replace '`date`' '1970-01-01T00:00:00Z' \ --replace '`hostname`' 'nixpkgs' - '' + lib.optionalString stdenv.isDarwin '' + '' + lib.optionalString stdenv.hostPlatform.isDarwin '' for f in cc0/compiler/bin/coin-o0-support cc0/compiler/bin/cc0-o0-support; do substituteInPlace $f --replace '$(brew --prefix gnu-getopt)' '${getopt}' done @@ -49,7 +49,7 @@ stdenv.mkDerivation rec { getopt mlton pkg-config - ] ++ lib.optionals stdenv.isDarwin [ darwin.sigtool ]; + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ darwin.sigtool ]; buildInputs = [ boehmgc @@ -80,6 +80,6 @@ stdenv.mkDerivation rec { platforms = platforms.unix; # line 1: ../../bin/wrappergen: cannot execute: required file not found # make[2]: *** [../../lib.mk:83: - broken = stdenv.isLinux; + broken = stdenv.hostPlatform.isLinux; }; } diff --git a/pkgs/development/compilers/c3c/default.nix b/pkgs/development/compilers/c3c/default.nix index 01cc7fa28ce3..9058e1af264b 100644 --- a/pkgs/development/compilers/c3c/default.nix +++ b/pkgs/development/compilers/c3c/default.nix @@ -35,7 +35,7 @@ llvmPackages.stdenv.mkDerivation (finalAttrs: { curl libxml2 libffi - ] ++ lib.optionals llvmPackages.stdenv.isDarwin [ xar ]; + ] ++ lib.optionals llvmPackages.stdenv.hostPlatform.isDarwin [ xar ]; nativeCheckInputs = [ python3 ]; diff --git a/pkgs/development/compilers/cakelisp/default.nix b/pkgs/development/compilers/cakelisp/default.nix index c52c93c5e6c7..48e3e9efa5fb 100644 --- a/pkgs/development/compilers/cakelisp/default.nix +++ b/pkgs/development/compilers/cakelisp/default.nix @@ -18,7 +18,7 @@ stdenv.mkDerivation { --replace '"/usr/bin/g++"' '"${gcc}/bin/g++"' substituteInPlace src/ModuleManager.cpp \ --replace '"/usr/bin/g++"' '"${gcc}/bin/g++"' - '' + lib.optionalString stdenv.isDarwin '' + '' + lib.optionalString stdenv.hostPlatform.isDarwin '' substituteInPlace Build.sh --replace '--export-dynamic' '-export_dynamic' substituteInPlace runtime/HotReloading.cake --replace '--export-dynamic' '-export_dynamic' substituteInPlace Bootstrap.cake --replace '--export-dynamic' '-export_dynamic' @@ -50,6 +50,6 @@ stdenv.mkDerivation { platforms = platforms.darwin ++ platforms.linux; maintainers = [ maintainers.sbond75 ]; # never built on aarch64-darwin since first introduction in nixpkgs - broken = stdenv.isDarwin && stdenv.isAarch64; + broken = stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isAarch64; }; } diff --git a/pkgs/development/compilers/ccl/default.nix b/pkgs/development/compilers/ccl/default.nix index 9fe1a8aa8e56..ae82b0ccfda2 100644 --- a/pkgs/development/compilers/ccl/default.nix +++ b/pkgs/development/compilers/ccl/default.nix @@ -40,12 +40,12 @@ in stdenv.mkDerivation rec { sha256 = cfg.sha256; }; - buildInputs = if stdenv.isDarwin then [ bootstrap_cmds m4 ] else [ glibc m4 ]; + buildInputs = if stdenv.hostPlatform.isDarwin then [ bootstrap_cmds m4 ] else [ glibc m4 ]; CCL_RUNTIME = cfg.runtime; CCL_KERNEL = cfg.kernel; - postPatch = if stdenv.isDarwin then '' + postPatch = if stdenv.hostPlatform.isDarwin then '' substituteInPlace lisp-kernel/${CCL_KERNEL}/Makefile \ --replace "M4 = gm4" "M4 = m4" \ --replace "dtrace" "/usr/sbin/dtrace" \ @@ -88,7 +88,7 @@ in stdenv.mkDerivation rec { maintainers = lib.teams.lisp.members; platforms = attrNames options; # assembler failures during build, x86_64-darwin broken since 2020-10-14 - broken = (stdenv.isDarwin && stdenv.isx86_64); + broken = (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isx86_64); license = licenses.asl20; }; } diff --git a/pkgs/development/compilers/chez-racket/shared.nix b/pkgs/development/compilers/chez-racket/shared.nix index b9368dd4ebea..e9a9e42346d6 100644 --- a/pkgs/development/compilers/chez-racket/shared.nix +++ b/pkgs/development/compilers/chez-racket/shared.nix @@ -23,7 +23,7 @@ stdenv.mkDerivation (args // { export LZ4="$(find ${lz4.out}/lib -type f | sort | head -n1)" ''; - nativeBuildInputs = lib.optionals stdenv.isDarwin ([ cctools darwin.autoSignDarwinBinariesHook ]); + nativeBuildInputs = lib.optionals stdenv.hostPlatform.isDarwin ([ cctools darwin.autoSignDarwinBinariesHook ]); buildInputs = [ libiconv libX11 lz4 ncurses zlib ]; enableParallelBuilding = true; diff --git a/pkgs/development/compilers/chez/default.nix b/pkgs/development/compilers/chez/default.nix index 9002db42abc2..de998e550b41 100644 --- a/pkgs/development/compilers/chez/default.nix +++ b/pkgs/development/compilers/chez/default.nix @@ -13,9 +13,9 @@ stdenv.mkDerivation (finalAttrs: { hash = "sha256-03GZASte0ZhcQGnWqH/xjl4fWi3yfkApkfr0XcTyIyw="; }; - nativeBuildInputs = lib.optionals stdenv.isDarwin [ + nativeBuildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ cctools - ] ++ lib.optionals (stdenv.isDarwin && stdenv.isAarch64) [ + ] ++ lib.optionals (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isAarch64) [ darwin.autoSignDarwinBinariesHook ]; buildInputs = [ ncurses libiconv libX11 libuuid ]; diff --git a/pkgs/development/compilers/chicken/4/chicken.nix b/pkgs/development/compilers/chicken/4/chicken.nix index b96a1d459d71..a36ef4569e30 100644 --- a/pkgs/development/compilers/chicken/4/chicken.nix +++ b/pkgs/development/compilers/chicken/4/chicken.nix @@ -20,7 +20,7 @@ stdenv.mkDerivation { sha256 = "0hvckhi5gfny3mlva6d7y9pmx7cbwvq0r7mk11k3sdiik9hlkmdd"; }; - postPatch = lib.optionalString stdenv.isDarwin '' + postPatch = lib.optionalString stdenv.hostPlatform.isDarwin '' # There is not enough space in the load command to accomodate a full path to the store, # so use `@executable_path` to specify a relative path to chicken’s lib folder. sed -e '/POSTINSTALL_PROGRAM_FLAGS = /{s|$(LIBDIR)|@executable_path/../lib|}' \ @@ -30,12 +30,12 @@ stdenv.mkDerivation { setupHook = lib.optional (bootstrap-chicken != null) ./setup-hook.sh; # -fno-strict-overflow is not a supported argument in clang on darwin - hardeningDisable = lib.optionals stdenv.isDarwin ["strictoverflow"]; + hardeningDisable = lib.optionals stdenv.hostPlatform.isDarwin ["strictoverflow"]; makeFlags = [ "PLATFORM=${platform}" "PREFIX=$(out)" "VARDIR=$(out)/var/lib" - ] ++ (lib.optionals stdenv.isDarwin [ + ] ++ (lib.optionals stdenv.hostPlatform.isDarwin [ "XCODE_TOOL_PATH=${darwin.binutils.bintools}/bin" "C_COMPILER=$(CC)" "POSTINSTALL_PROGRAM=${stdenv.cc.targetPrefix}install_name_tool" @@ -49,7 +49,7 @@ stdenv.mkDerivation { nativeBuildInputs = [ makeWrapper - ] ++ lib.optionals (stdenv.isDarwin && stdenv.isAarch64) [ + ] ++ lib.optionals (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isAarch64) [ darwin.autoSignDarwinBinariesHook ]; diff --git a/pkgs/development/compilers/chicken/5/chicken.nix b/pkgs/development/compilers/chicken/5/chicken.nix index 2f0b8316ae8b..53b4cc9024d5 100644 --- a/pkgs/development/compilers/chicken/5/chicken.nix +++ b/pkgs/development/compilers/chicken/5/chicken.nix @@ -35,7 +35,7 @@ stdenv.mkDerivation (finalAttrs: { "PREFIX=$(out)" "C_COMPILER=$(CC)" "CXX_COMPILER=$(CXX)" - ] ++ (lib.optionals stdenv.isDarwin [ + ] ++ (lib.optionals stdenv.hostPlatform.isDarwin [ "XCODE_TOOL_PATH=${darwin.binutils.bintools}/bin" "LINKER_OPTIONS=-headerpad_max_install_names" "POSTINSTALL_PROGRAM=install_name_tool" @@ -47,7 +47,7 @@ stdenv.mkDerivation (finalAttrs: { nativeBuildInputs = [ makeWrapper - ] ++ lib.optionals (stdenv.isDarwin && stdenv.isAarch64) [ + ] ++ lib.optionals (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isAarch64) [ darwin.autoSignDarwinBinariesHook ]; @@ -55,7 +55,7 @@ stdenv.mkDerivation (finalAttrs: { bootstrap-chicken ]; - doCheck = !stdenv.isDarwin; + doCheck = !stdenv.hostPlatform.isDarwin; postCheck = '' ./csi -R chicken.pathname -R chicken.platform \ -p "(assert (equal? \"${toString finalAttrs.binaryVersion}\" (pathname-file (car (repository-path)))))" diff --git a/pkgs/development/compilers/chicken/5/overrides.nix b/pkgs/development/compilers/chicken/5/overrides.nix index b132036bbae4..0aaf24b86ea1 100644 --- a/pkgs/development/compilers/chicken/5/overrides.nix +++ b/pkgs/development/compilers/chicken/5/overrides.nix @@ -19,7 +19,7 @@ let addToPropagatedBuildInputsWithPkgConfig = pkg: old: (addPkgConfig old) // (addToPropagatedBuildInputs pkg old); broken = addMetaAttrs { broken = true; }; - brokenOnDarwin = addMetaAttrs { broken = stdenv.isDarwin; }; + brokenOnDarwin = addMetaAttrs { broken = stdenv.hostPlatform.isDarwin; }; addToCscOptions = opt: old: { CSC_OPTIONS = lib.concatStringsSep " " ([ old.CSC_OPTIONS or "" ] ++ lib.toList opt); }; @@ -27,8 +27,8 @@ in { allegro = old: ((addToBuildInputsWithPkgConfig ([ pkgs.allegro5 pkgs.libglvnd pkgs.libGLU ] - ++ lib.optionals stdenv.isDarwin [ pkgs.darwin.apple_sdk.frameworks.OpenGL ] - ++ lib.optionals stdenv.isLinux [ pkgs.xorg.libX11 ])) old) // { + ++ lib.optionals stdenv.hostPlatform.isDarwin [ pkgs.darwin.apple_sdk.frameworks.OpenGL ] + ++ lib.optionals stdenv.hostPlatform.isLinux [ pkgs.xorg.libX11 ])) old) // { # depends on 'chicken' egg, which doesn't exist, # so we specify all the deps here propagatedBuildInputs = [ @@ -72,12 +72,12 @@ in gl-utils = addPkgConfig; glfw3 = addToBuildInputsWithPkgConfig pkgs.glfw3; glls = addPkgConfig; - iconv = addToBuildInputs (lib.optional stdenv.isDarwin pkgs.libiconv); + iconv = addToBuildInputs (lib.optional stdenv.hostPlatform.isDarwin pkgs.libiconv); icu = addToBuildInputsWithPkgConfig pkgs.icu; imlib2 = addToBuildInputsWithPkgConfig pkgs.imlib2; inotify = old: - (addToBuildInputs (lib.optional stdenv.isDarwin pkgs.libinotify-kqueue) old) - // lib.optionalAttrs stdenv.isDarwin (addToCscOptions "-L -linotify" old); + (addToBuildInputs (lib.optional stdenv.hostPlatform.isDarwin pkgs.libinotify-kqueue) old) + // lib.optionalAttrs stdenv.hostPlatform.isDarwin (addToCscOptions "-L -linotify" old); leveldb = addToBuildInputs pkgs.leveldb; magic = addToBuildInputs pkgs.file; mdh = old: @@ -94,7 +94,7 @@ in nanomsg = addToBuildInputs pkgs.nanomsg; ncurses = addToBuildInputsWithPkgConfig [ pkgs.ncurses ]; opencl = addToBuildInputs ([ pkgs.opencl-headers pkgs.ocl-icd ] - ++ lib.optionals stdenv.isDarwin [ pkgs.darwin.apple_sdk.frameworks.OpenCL ]); + ++ lib.optionals stdenv.hostPlatform.isDarwin [ pkgs.darwin.apple_sdk.frameworks.OpenCL ]); openssl = addToBuildInputs pkgs.openssl; plot = addToBuildInputs pkgs.plotutils; postgresql = addToBuildInputsWithPkgConfig pkgs.postgresql; @@ -154,8 +154,8 @@ in }; opengl = old: (addToBuildInputsWithPkgConfig - (lib.optionals (!stdenv.isDarwin) [ pkgs.libGL pkgs.libGLU ] - ++ lib.optionals stdenv.isDarwin [ pkgs.darwin.apple_sdk.frameworks.Foundation pkgs.darwin.apple_sdk.frameworks.OpenGL ]) + (lib.optionals (!stdenv.hostPlatform.isDarwin) [ pkgs.libGL pkgs.libGLU ] + ++ lib.optionals stdenv.hostPlatform.isDarwin [ pkgs.darwin.apple_sdk.frameworks.Foundation pkgs.darwin.apple_sdk.frameworks.OpenGL ]) old) // { postPatch = '' @@ -164,7 +164,7 @@ in ''; }; posix-shm = old: { - postPatch = lib.optionalString stdenv.isDarwin '' + postPatch = lib.optionalString stdenv.hostPlatform.isDarwin '' substituteInPlace build.scm \ --replace "-lrt" "" ''; diff --git a/pkgs/development/compilers/ciao/default.nix b/pkgs/development/compilers/ciao/default.nix index 29e103226022..c68b5fe06547 100644 --- a/pkgs/development/compilers/ciao/default.nix +++ b/pkgs/development/compilers/ciao/default.nix @@ -28,6 +28,6 @@ stdenv.mkDerivation rec { license = licenses.lgpl21; maintainers = with maintainers; [ suhr ]; platforms = platforms.unix; - broken = stdenv.isDarwin; # never built on Hydra https://hydra.nixos.org/job/nixpkgs/staging-next/ciao.x86_64-darwin + broken = stdenv.hostPlatform.isDarwin; # never built on Hydra https://hydra.nixos.org/job/nixpkgs/staging-next/ciao.x86_64-darwin }; } diff --git a/pkgs/development/compilers/circt/circt-llvm.nix b/pkgs/development/compilers/circt/circt-llvm.nix index 0043702fd847..8375ccc22f8f 100644 --- a/pkgs/development/compilers/circt/circt-llvm.nix +++ b/pkgs/development/compilers/circt/circt-llvm.nix @@ -34,7 +34,7 @@ # Get rid of ${extra_libdir} (which ends up containing a path to circt-llvm.dev # in circt) so that we only have to remove the one fixed rpath. - postPatch = lib.optionalString stdenv.isDarwin '' + postPatch = lib.optionalString stdenv.hostPlatform.isDarwin '' substituteInPlace llvm/llvm/cmake/modules/AddLLVM.cmake \ --replace-fail 'set(_install_rpath "@loader_path/../lib''${LLVM_LIBDIR_SUFFIX}" ''${extra_libdir})' \ 'set(_install_rpath "@loader_path/../lib''${LLVM_LIBDIR_SUFFIX}")' @@ -69,7 +69,7 @@ # it hasn't been populated yet. # # Inspired by fixDarwinDylibNames. - postFixup = lib.optionalString stdenv.isDarwin '' + postFixup = lib.optionalString stdenv.hostPlatform.isDarwin '' local flags=(-delete_rpath @loader_path/../lib) for file in "$lib"/lib/*.dylib; do flags+=(-change @rpath/"$(basename "$file")" "$file") diff --git a/pkgs/development/compilers/clasp/default.nix b/pkgs/development/compilers/clasp/default.nix index d5d56546b576..4613357ded3b 100644 --- a/pkgs/development/compilers/clasp/default.nix +++ b/pkgs/development/compilers/clasp/default.nix @@ -70,7 +70,7 @@ stdenv.mkDerivation rec { platforms = ["x86_64-linux" "x86_64-darwin"]; # Upstream claims support, but breaks with: # error: use of undeclared identifier 'aligned_alloc' - broken = stdenv.isDarwin; + broken = stdenv.hostPlatform.isDarwin; homepage = "https://github.com/clasp-developers/clasp"; mainProgram = "clasp"; }; diff --git a/pkgs/development/compilers/cmdstan/default.nix b/pkgs/development/compilers/cmdstan/default.nix index a6b6833289b7..5199d457f4df 100644 --- a/pkgs/development/compilers/cmdstan/default.nix +++ b/pkgs/development/compilers/cmdstan/default.nix @@ -45,7 +45,7 @@ stdenv.mkDerivation rec { makeFlags = [ "build" - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ "arch=${stdenv.hostPlatform.darwinArch}" ]; diff --git a/pkgs/development/compilers/codon/default.nix b/pkgs/development/compilers/codon/default.nix index 520c6386490b..88d3c01d713a 100644 --- a/pkgs/development/compilers/codon/default.nix +++ b/pkgs/development/compilers/codon/default.nix @@ -125,7 +125,7 @@ stdenv.mkDerivation { "-DLLVM_USE_LINKER=lld" ]; - postInstall = lib.optionalString stdenv.isDarwin '' + postInstall = lib.optionalString stdenv.hostPlatform.isDarwin '' ln -s $out/lib/codon/*.dylib $out/lib/ ''; diff --git a/pkgs/development/compilers/corretto/mk-corretto.nix b/pkgs/development/compilers/corretto/mk-corretto.nix index 1059935ce20f..37ac9006515d 100644 --- a/pkgs/development/compilers/corretto/mk-corretto.nix +++ b/pkgs/development/compilers/corretto/mk-corretto.nix @@ -53,7 +53,7 @@ jdk.overrideAttrs (finalAttrs: oldAttrs: { # The Linux installer is placed at linux/universal/tar whereas the MacOS # one is at mac/tar. gradleBuildTask = - if stdenv.isDarwin then + if stdenv.hostPlatform.isDarwin then ":installers:mac:tar:build" else ":installers:linux:universal:tar:packageBuildResults"; diff --git a/pkgs/development/compilers/crystal/default.nix b/pkgs/development/compilers/crystal/default.nix index c95298cbfe2a..0907c1c4d68d 100644 --- a/pkgs/development/compilers/crystal/default.nix +++ b/pkgs/development/compilers/crystal/default.nix @@ -144,7 +144,7 @@ let substituteInPlace spec/std/socket/udp_socket_spec.cr \ --replace 'it "joins and transmits to multicast groups"' 'pending "joins and transmits to multicast groups"' - '' + lib.optionalString (stdenv.isDarwin && lib.versionAtLeast version "1.3.0" && lib.versionOlder version "1.7.0") '' + '' + lib.optionalString (stdenv.hostPlatform.isDarwin && lib.versionAtLeast version "1.3.0" && lib.versionOlder version "1.7.0") '' # See https://github.com/NixOS/nixpkgs/pull/195606#issuecomment-1356491277 substituteInPlace spec/compiler/loader/unix_spec.cr \ --replace 'it "parses file paths"' 'pending "parses file paths"' @@ -175,7 +175,7 @@ let libxml2 openssl ] ++ extraBuildInputs - ++ lib.optionals stdenv.isDarwin [ libiconv ]; + ++ lib.optionals stdenv.hostPlatform.isDarwin [ libiconv ]; makeFlags = [ "CRYSTAL_CONFIG_VERSION=${version}" diff --git a/pkgs/development/compilers/dart/default.nix b/pkgs/development/compilers/dart/default.nix index 9a08b3d51732..d6d538d5c844 100644 --- a/pkgs/development/compilers/dart/default.nix +++ b/pkgs/development/compilers/dart/default.nix @@ -22,7 +22,7 @@ stdenv.mkDerivation (finalAttrs: { mkdir -p $out cp -R * $out/ echo $libPath - '' + lib.optionalString (stdenv.isLinux) '' + '' + lib.optionalString (stdenv.hostPlatform.isLinux) '' find $out/bin -executable -type f -exec patchelf --set-interpreter $(cat $NIX_CC/nix-support/dynamic-linker) {} \; ''; @@ -42,7 +42,7 @@ stdenv.mkDerivation (finalAttrs: { testCompile = runCommand "dart-test-compile" { nativeBuildInputs = [ finalAttrs.finalPackage ] - ++ lib.optionals stdenv.isDarwin [ cctools darwin.sigtool ]; + ++ lib.optionals stdenv.hostPlatform.isDarwin [ cctools darwin.sigtool ]; } '' HELLO_MESSAGE="Hello, world!" echo "void main() => print('$HELLO_MESSAGE');" > hello.dart diff --git a/pkgs/development/compilers/dictu/default.nix b/pkgs/development/compilers/dictu/default.nix index b58d86871374..fedf3deed62c 100644 --- a/pkgs/development/compilers/dictu/default.nix +++ b/pkgs/development/compilers/dictu/default.nix @@ -84,6 +84,6 @@ stdenv.mkDerivation rec { license = licenses.mit; maintainers = with maintainers; [ luc65r ]; platforms = platforms.all; - broken = stdenv.isDarwin; # never built on Hydra https://hydra.nixos.org/job/nixpkgs/staging-next/dictu.x86_64-darwin + broken = stdenv.hostPlatform.isDarwin; # never built on Hydra https://hydra.nixos.org/job/nixpkgs/staging-next/dictu.x86_64-darwin }; } diff --git a/pkgs/development/compilers/dotnet/build-dotnet.nix b/pkgs/development/compilers/dotnet/build-dotnet.nix index 0c9de3f05cab..bba31fe394ca 100644 --- a/pkgs/development/compilers/dotnet/build-dotnet.nix +++ b/pkgs/development/compilers/dotnet/build-dotnet.nix @@ -61,7 +61,7 @@ let - '' + lib.optionalString stdenv.isDarwin '' + '' + lib.optionalString stdenv.hostPlatform.isDarwin '' '' + '' @@ -74,8 +74,8 @@ mkCommon type rec { # Some of these dependencies are `dlopen()`ed. nativeBuildInputs = [ makeWrapper - ] ++ lib.optional stdenv.isLinux autoPatchelfHook - ++ lib.optionals (type == "sdk" && stdenv.isDarwin) [ + ] ++ lib.optional stdenv.hostPlatform.isLinux autoPatchelfHook + ++ lib.optionals (type == "sdk" && stdenv.hostPlatform.isDarwin) [ xmlstarlet sigtool ]; @@ -87,7 +87,7 @@ mkCommon type rec { libkrb5 curl xmlstarlet - ] ++ lib.optional stdenv.isLinux lttng-ust_2_12; + ] ++ lib.optional stdenv.hostPlatform.isLinux lttng-ust_2_12; src = fetchurl ( srcs."${stdenv.hostPlatform.system}" or (throw @@ -102,7 +102,7 @@ mkCommon type rec { -s //_:Project -t elem -n Import \ -i \$prev -t attr -n Project -v "${extraTargets}" \ sdk/*/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.Sdk.targets - '' + lib.optionalString stdenv.isDarwin '' + '' + lib.optionalString stdenv.hostPlatform.isDarwin '' codesign --remove-signature packs/Microsoft.NETCore.App.Host.osx-*/*/runtimes/osx-*/native/{apphost,singlefilehost} '') else null; @@ -144,7 +144,7 @@ mkCommon type rec { ''; # fixes: Could not load ICU data. UErrorCode: 2 - propagatedSandboxProfile = lib.optionalString stdenv.isDarwin '' + propagatedSandboxProfile = lib.optionalString stdenv.hostPlatform.isDarwin '' (allow file-read* (subpath "/usr/share/icu")) (allow file-read* (subpath "/private/var/db/mds/system")) (allow mach-lookup (global-name "com.apple.SecurityServer") diff --git a/pkgs/development/compilers/dotnet/common.nix b/pkgs/development/compilers/dotnet/common.nix index 9fcd79c752d1..b4891a83e41f 100644 --- a/pkgs/development/compilers/dotnet/common.nix +++ b/pkgs/development/compilers/dotnet/common.nix @@ -90,7 +90,7 @@ src = built; nativeBuildInputs = [ built ] ++ runInputs; passthru = { inherit built; }; - } // lib.optionalAttrs (stdenv.isDarwin && runAllowNetworking) { + } // lib.optionalAttrs (stdenv.hostPlatform.isDarwin && runAllowNetworking) { sandboxProfile = '' (allow network-inbound (local ip)) (allow mach-lookup (global-name "com.apple.FSEvents")) @@ -180,12 +180,12 @@ } // lib.optionalAttrs finalAttrs.finalPackage.hasILCompiler { aot = mkDotnetTest { name = "aot"; - stdenv = if stdenv.isDarwin then swiftPackages.stdenv else stdenv; + stdenv = if stdenv.hostPlatform.isDarwin then swiftPackages.stdenv else stdenv; template = "console"; usePackageSource = true; buildInputs = [ zlib - ] ++ lib.optional stdenv.isDarwin (with darwin; with apple_sdk.frameworks; [ + ] ++ lib.optional stdenv.hostPlatform.isDarwin (with darwin; with apple_sdk.frameworks; [ swiftPackages.swift Foundation CryptoKit diff --git a/pkgs/development/compilers/dotnet/patch-nupkgs.nix b/pkgs/development/compilers/dotnet/patch-nupkgs.nix index c351ea7b32ef..528b236239e4 100644 --- a/pkgs/development/compilers/dotnet/patch-nupkgs.nix +++ b/pkgs/development/compilers/dotnet/patch-nupkgs.nix @@ -20,7 +20,7 @@ let libunwind libuuid openssl - ] ++ lib.optional stdenv.isLinux lttng-ust_2_12); + ] ++ lib.optional stdenv.hostPlatform.isLinux lttng-ust_2_12); in writeShellScriptBin "patch-nupkgs" ('' set -euo pipefail @@ -35,7 +35,7 @@ in writeShellScriptBin "patch-nupkgs" ('' if [ "$magic" = $'\177ELF' ]; then return 0; else return 1; fi } cd "$1" -'' + lib.optionalString stdenv.isLinux '' +'' + lib.optionalString stdenv.hostPlatform.isLinux '' for x in */* */*; do # .nupkg.metadata is written last, so we know the packages is complete [[ -d "$x" ]] && [[ -f "$x"/.nupkg.metadata ]] \ @@ -68,7 +68,7 @@ in writeShellScriptBin "patch-nupkgs" ('' done touch "$x"/.nix-patched done -'' + lib.optionalString stdenv.isDarwin '' +'' + lib.optionalString stdenv.hostPlatform.isDarwin '' for x in microsoft.dotnet.ilcompiler/*; do # .nupkg.metadata is written last, so we know the packages is complete [[ -d "$x" ]] && [[ -f "$x"/.nupkg.metadata ]] \ diff --git a/pkgs/development/compilers/dotnet/vmr.nix b/pkgs/development/compilers/dotnet/vmr.nix index d6cfcd9035d9..41b0eac15734 100644 --- a/pkgs/development/compilers/dotnet/vmr.nix +++ b/pkgs/development/compilers/dotnet/vmr.nix @@ -32,7 +32,7 @@ }: let - stdenv = if clangStdenv.isDarwin + stdenv = if clangStdenv.hostPlatform.isDarwin then swiftPackages.stdenv else clangStdenv; @@ -59,7 +59,7 @@ in stdenv.mkDerivation rec { version = release; # TODO: fix this in the binary sdk packages - preHook = lib.optionalString stdenv.isDarwin '' + preHook = lib.optionalString stdenv.hostPlatform.isDarwin '' addToSearchPath DYLD_LIBRARY_PATH "${_icu}/lib" export DYLD_LIBRARY_PATH ''; diff --git a/pkgs/development/compilers/dtc/default.nix b/pkgs/development/compilers/dtc/default.nix index d244fc62aef4..5fbf929d5e52 100644 --- a/pkgs/development/compilers/dtc/default.nix +++ b/pkgs/development/compilers/dtc/default.nix @@ -108,7 +108,7 @@ stdenv.mkDerivation (finalAttrs: { doCheck = # Checks are broken on aarch64 darwin # https://github.com/NixOS/nixpkgs/pull/118700#issuecomment-885892436 - !stdenv.isDarwin && + !stdenv.hostPlatform.isDarwin && # Checks are broken when building statically on x86_64 linux with musl # One of the test tries to build a shared library and this causes the linker: # x86_64-unknown-linux-musl-ld: /nix/store/h9gcvnp90mpniyx2v0d0p3s06hkx1v2p-x86_64-unknown-linux-musl-gcc-13.3.0/lib/gcc/x86_64-unknown-linux-musl/13.3.0/crtbeginT.o: relocation R_X86_64_32 against hidden symbol `__TMC_END__' can not be used when making a shared object diff --git a/pkgs/development/compilers/ecl/16.1.2.nix b/pkgs/development/compilers/ecl/16.1.2.nix index 75055130ada2..121935df5f05 100644 --- a/pkgs/development/compilers/ecl/16.1.2.nix +++ b/pkgs/development/compilers/ecl/16.1.2.nix @@ -94,6 +94,6 @@ stdenv.mkDerivation rec { maintainers = lib.teams.lisp.members; platforms = platforms.unix; # never built on aarch64-darwin since first introduction in nixpkgs - broken = stdenv.isDarwin && stdenv.isAarch64; + broken = stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isAarch64; }; } diff --git a/pkgs/development/compilers/elm/packages/elm-json/default.nix b/pkgs/development/compilers/elm/packages/elm-json/default.nix index efb3fbfcc5cd..bc456d2479c1 100644 --- a/pkgs/development/compilers/elm/packages/elm-json/default.nix +++ b/pkgs/development/compilers/elm/packages/elm-json/default.nix @@ -24,7 +24,7 @@ rustPlatform.buildRustPackage rec { buildInputs = [ curl openssl - ] ++ lib.optionals stdenv.isDarwin [ darwin.apple_sdk.frameworks.Security ]; + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.Security ]; cargoHash = "sha256-8SOpL8nfhYen9vza0LYpB/5fgVmBwG7vGMmFOaJskIc="; diff --git a/pkgs/development/compilers/elm/packages/elm-test-rs/default.nix b/pkgs/development/compilers/elm/packages/elm-test-rs/default.nix index a457a422cf85..5ff6d4117b10 100644 --- a/pkgs/development/compilers/elm/packages/elm-test-rs/default.nix +++ b/pkgs/development/compilers/elm/packages/elm-test-rs/default.nix @@ -19,8 +19,8 @@ rustPlatform.buildRustPackage rec { }; buildInputs = - lib.optionals (!stdenv.isDarwin) [ openssl ] - ++ lib.optionals stdenv.isDarwin ( + lib.optionals (!stdenv.hostPlatform.isDarwin) [ openssl ] + ++ lib.optionals stdenv.hostPlatform.isDarwin ( with darwin.apple_sdk.frameworks; [ Security diff --git a/pkgs/development/compilers/elm/packages/lamdera/default.nix b/pkgs/development/compilers/elm/packages/lamdera/default.nix index 79101092e788..eca3fcd48040 100644 --- a/pkgs/development/compilers/elm/packages/lamdera/default.nix +++ b/pkgs/development/compilers/elm/packages/lamdera/default.nix @@ -4,8 +4,8 @@ }: let - os = if stdenv.isDarwin then "macos" else "linux"; - arch = if stdenv.isAarch64 then "arm64" else "x86_64"; + os = if stdenv.hostPlatform.isDarwin then "macos" else "linux"; + arch = if stdenv.hostPlatform.isAarch64 then "arm64" else "x86_64"; hashes = { "x86_64-linux" = "a51d5b9a011c54b0001ff3273cee027774686e233adadb20b1978d2cabfe32a6"; diff --git a/pkgs/development/compilers/elm/packages/node/node-composition.nix b/pkgs/development/compilers/elm/packages/node/node-composition.nix index 1580d1f43fdd..0ab5a28046c2 100644 --- a/pkgs/development/compilers/elm/packages/node/node-composition.nix +++ b/pkgs/development/compilers/elm/packages/node/node-composition.nix @@ -8,7 +8,7 @@ let nodeEnv = import ../../../../node-packages/node-env.nix { inherit (pkgs) stdenv lib python2 runCommand writeTextFile writeShellScript; inherit pkgs nodejs; - libtool = if pkgs.stdenv.isDarwin then pkgs.cctools or pkgs.darwin.cctools else null; + libtool = if pkgs.stdenv.hostPlatform.isDarwin then pkgs.cctools or pkgs.darwin.cctools else null; }; in import ./node-packages.nix { diff --git a/pkgs/development/compilers/erg/default.nix b/pkgs/development/compilers/erg/default.nix index 9276a311a581..06bcc8d14700 100644 --- a/pkgs/development/compilers/erg/default.nix +++ b/pkgs/development/compilers/erg/default.nix @@ -30,7 +30,7 @@ rustPlatform.buildRustPackage rec { env = { BUILD_DATE = "1970/01/01 00:00:00"; - CASE_SENSITIVE = lib.boolToString (!stdenv.isDarwin); + CASE_SENSITIVE = lib.boolToString (!stdenv.hostPlatform.isDarwin); GIT_HASH_SHORT = src.rev; }; diff --git a/pkgs/development/compilers/fasm/bin.nix b/pkgs/development/compilers/fasm/bin.nix index f23e9540928a..71e2146a7004 100644 --- a/pkgs/development/compilers/fasm/bin.nix +++ b/pkgs/development/compilers/fasm/bin.nix @@ -12,7 +12,7 @@ stdenvNoCC.mkDerivation (finalAttrs: { installPhase = '' runHook preInstall - install -D fasm${lib.optionalString stdenvNoCC.isx86_64 ".x64"} $out/bin/fasm + install -D fasm${lib.optionalString stdenvNoCC.hostPlatform.isx86_64 ".x64"} $out/bin/fasm runHook postInstall ''; diff --git a/pkgs/development/compilers/flutter/engine/package.nix b/pkgs/development/compilers/flutter/engine/package.nix index 443db6af3680..d9b20898886c 100644 --- a/pkgs/development/compilers/flutter/engine/package.nix +++ b/pkgs/development/compilers/flutter/engine/package.nix @@ -114,7 +114,7 @@ stdenv.mkDerivation (finalAttrs: { paths = expandDeps ( - lib.optionals (stdenv.isLinux) [ + lib.optionals (stdenv.hostPlatform.isLinux) [ gtk3 wayland libepoxy @@ -139,7 +139,7 @@ stdenv.mkDerivation (finalAttrs: { xorg.xorgproto zlib ] - ++ lib.optionals (stdenv.isDarwin) [ + ++ lib.optionals (stdenv.hostPlatform.isDarwin) [ clang llvm ] @@ -161,7 +161,7 @@ stdenv.mkDerivation (finalAttrs: { "-I${finalAttrs.toolchain}/include" ] ++ lib.optional (!isOptimized) "-U_FORTIFY_SOURCE"; - nativeCheckInputs = lib.optionals stdenv.isLinux [ + nativeCheckInputs = lib.optionals stdenv.hostPlatform.isLinux [ xorg.xorgserver openbox ]; @@ -175,8 +175,8 @@ stdenv.mkDerivation (finalAttrs: { ninja dart ] - ++ lib.optionals (stdenv.isLinux) [ patchelf ] - ++ lib.optionals (stdenv.isDarwin) [ + ++ lib.optionals (stdenv.hostPlatform.isLinux) [ patchelf ] + ++ lib.optionals (stdenv.hostPlatform.isDarwin) [ darwin.system_cmds darwin.xcode tools.xcode-select @@ -214,7 +214,7 @@ stdenv.mkDerivation (finalAttrs: { mkdir -p src/${dartPath}/tools/sdks ln -s ${dart} src/${dartPath}/tools/sdks/dart-sdk - ${lib.optionalString (stdenv.isLinux) '' + ${lib.optionalString (stdenv.hostPlatform.isLinux) '' for patchtool in ''${patchtools[@]}; do patchelf src/$patchtool --set-interpreter $(cat $NIX_CC/nix-support/dynamic-linker) done @@ -269,7 +269,7 @@ stdenv.mkDerivation (finalAttrs: { export PYTHONPATH=$src/src/build '' - + lib.optionalString stdenv.isDarwin '' + + lib.optionalString stdenv.hostPlatform.isDarwin '' export PATH=${darwin.xcode}/Contents/Developer/usr/bin/:$PATH '' + '' @@ -322,7 +322,7 @@ stdenv.mkDerivation (finalAttrs: { meta = with lib; { # Very broken on Darwin - broken = stdenv.isDarwin; + broken = stdenv.hostPlatform.isDarwin; description = "The Flutter engine"; homepage = "https://flutter.dev"; maintainers = with maintainers; [ RossComputerGuy ]; diff --git a/pkgs/development/compilers/flutter/flutter-tools.nix b/pkgs/development/compilers/flutter/flutter-tools.nix index 306765cd0a42..1639d54a869e 100644 --- a/pkgs/development/compilers/flutter/flutter-tools.nix +++ b/pkgs/development/compilers/flutter/flutter-tools.nix @@ -28,7 +28,7 @@ buildDartApplication.override { inherit dart; } rec { popd '' # Use arm64 instead of arm64e. - + lib.optionalString stdenv.isDarwin '' + + lib.optionalString stdenv.hostPlatform.isDarwin '' substituteInPlace lib/src/ios/xcodeproj.dart \ --replace-fail arm64e arm64 ''; diff --git a/pkgs/development/compilers/fpc/binary.nix b/pkgs/development/compilers/fpc/binary.nix index e4c8a2358fc8..6f8acae7f916 100644 --- a/pkgs/development/compilers/fpc/binary.nix +++ b/pkgs/development/compilers/fpc/binary.nix @@ -20,7 +20,7 @@ stdenv.mkDerivation rec { url = "mirror://sourceforge/project/freepascal/Linux/${version}/fpc-${version}.aarch64-linux.tar"; sha256 = "b39470f9b6b5b82f50fc8680a5da37d2834f2129c65c24c5628a80894d565451"; } - else if stdenv.isDarwin then + else if stdenv.hostPlatform.isDarwin then fetchurl { url = "mirror://sourceforge/project/freepascal/Mac%20OS%20X/${version}/fpc-${version}.intelarm64-macosx.dmg"; sha256 = "05d4510c8c887e3c68de20272abf62171aa5b2ef1eba6bce25e4c0bc41ba8b7d"; diff --git a/pkgs/development/compilers/fpc/default.nix b/pkgs/development/compilers/fpc/default.nix index 3c9eb60d57c7..70f3b60efb8d 100644 --- a/pkgs/development/compilers/fpc/default.nix +++ b/pkgs/development/compilers/fpc/default.nix @@ -12,7 +12,7 @@ stdenv.mkDerivation rec { }; buildInputs = [ startFPC gawk ] - ++ lib.optionals stdenv.isDarwin [ + ++ lib.optionals stdenv.hostPlatform.isDarwin [ libiconv darwin.apple_sdk.frameworks.CoreFoundation ]; @@ -22,7 +22,7 @@ stdenv.mkDerivation rec { # Patch paths for linux systems. Other platforms will need their own patches. patches = [ ./mark-paths.patch # mark paths for later substitution in postPatch - ] ++ lib.optional stdenv.isAarch64 (fetchpatch { + ] ++ lib.optional stdenv.hostPlatform.isAarch64 (fetchpatch { # backport upstream patch for aarch64 glibc 2.34 url = "https://gitlab.com/freepascal.org/fpc/source/-/commit/a20a7e3497bccf3415bf47ccc55f133eb9d6d6a0.patch"; hash = "sha256-xKTBwuOxOwX9KCazQbBNLhMXCqkuJgIFvlXewHY63GM="; @@ -47,7 +47,7 @@ stdenv.mkDerivation rec { ''; NIX_LDFLAGS = lib.optionalString - stdenv.isDarwin (with darwin.apple_sdk.frameworks; "-F${CoreFoundation}/Library/Frameworks"); + stdenv.hostPlatform.isDarwin (with darwin.apple_sdk.frameworks; "-F${CoreFoundation}/Library/Frameworks"); makeFlags = [ "NOGDB=1" "FPC=${startFPC}/bin/fpc" ]; diff --git a/pkgs/development/compilers/gambit/build.nix b/pkgs/development/compilers/gambit/build.nix index 05d92d434faf..78c98fe50f21 100644 --- a/pkgs/development/compilers/gambit/build.nix +++ b/pkgs/development/compilers/gambit/build.nix @@ -78,9 +78,9 @@ gccStdenv.mkDerivation rec { ] ++ gambit-params.extraOptions # TODO: pick an appropriate architecture to optimize on on x86-64? # https://gcc.gnu.org/onlinedocs/gcc-4.8.4/gcc/i386-and-x86-64-Options.html#i386-and-x86-64-Options - # ++ lib.optional pkgs.stdenv.isx86_64 "--enable-march=core-avx2" + # ++ lib.optional pkgs.stdenv.hostPlatform.isx86_64 "--enable-march=core-avx2" # Do not enable poll on darwin due to https://github.com/gambit/gambit/issues/498 - ++ lib.optional (!gccStdenv.isDarwin) "--enable-poll"; + ++ lib.optional (!gccStdenv.hostPlatform.isDarwin) "--enable-poll"; configurePhase = '' export CC=${gccStdenv.cc}/bin/${gccStdenv.cc.targetPrefix}gcc \ @@ -97,7 +97,7 @@ gccStdenv.mkDerivation rec { # OS-specific paths are hardcoded in ./configure substituteInPlace config.status \ - ${lib.optionalString (gccStdenv.isDarwin && !gambit-params.stable) + ${lib.optionalString (gccStdenv.hostPlatform.isDarwin && !gambit-params.stable) ''--replace "/usr/local/opt/openssl@1.1" "${lib.getLib openssl}"''} \ --replace "/usr/local/opt/openssl" "${lib.getLib openssl}" diff --git a/pkgs/development/compilers/gcc/all.nix b/pkgs/development/compilers/gcc/all.nix index 232241989b9a..5d5abb82c3eb 100644 --- a/pkgs/development/compilers/gcc/all.nix +++ b/pkgs/development/compilers/gcc/all.nix @@ -24,7 +24,7 @@ let profiledCompiler = false; libcCross = if stdenv.targetPlatform != stdenv.buildPlatform then args.libcCross else null; threadsCross = if stdenv.targetPlatform != stdenv.buildPlatform then threadsCross else { }; - isl = if stdenv.isDarwin then null + isl = if stdenv.hostPlatform.isDarwin then null else if atLeast "9" then isl_0_20 else /* atLeast "7" */ isl_0_17; } // lib.optionalAttrs (!(atLeast "9")) { diff --git a/pkgs/development/compilers/gcc/patches/default.nix b/pkgs/development/compilers/gcc/patches/default.nix index b226975ef034..9c756ccfa4ee 100644 --- a/pkgs/development/compilers/gcc/patches/default.nix +++ b/pkgs/development/compilers/gcc/patches/default.nix @@ -120,16 +120,16 @@ in ## Darwin # Fixes detection of Darwin on x86_64-darwin. Otherwise, GCC uses a deployment target of 10.5, which crashes ld64. -++ optional (atLeast14 && stdenv.isDarwin && stdenv.isx86_64) ../patches/14/libgcc-darwin-detection.patch +++ optional (atLeast14 && stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isx86_64) ../patches/14/libgcc-darwin-detection.patch # Fix detection of bootstrap compiler Ada support (cctools as) on Nix Darwin -++ optional (atLeast12 && stdenv.isDarwin && langAda) ./ada-cctools-as-detection-configure.patch +++ optional (atLeast12 && stdenv.hostPlatform.isDarwin && langAda) ./ada-cctools-as-detection-configure.patch # Remove CoreServices on Darwin, as it is only needed for macOS SDK 14+ -++ optional (atLeast14 && stdenv.isDarwin && langAda) ../patches/14/gcc-darwin-remove-coreservices.patch +++ optional (atLeast14 && stdenv.hostPlatform.isDarwin && langAda) ../patches/14/gcc-darwin-remove-coreservices.patch # Use absolute path in GNAT dylib install names on Darwin -++ optionals (stdenv.isDarwin && langAda) ({ +++ optionals (stdenv.hostPlatform.isDarwin && langAda) ({ "14" = [ ../patches/14/gnat-darwin-dylib-install-name-14.patch ]; "13" = [ ./gnat-darwin-dylib-install-name-13.patch ]; "12" = [ ./gnat-darwin-dylib-install-name.patch ]; @@ -137,7 +137,7 @@ in # We only apply this patch when building a native toolchain for aarch64-darwin, as it breaks building # a foreign one: https://github.com/iains/gcc-12-branch/issues/18 -++ optionals (stdenv.isDarwin && stdenv.isAarch64 && buildPlatform == hostPlatform && hostPlatform == targetPlatform) ({ +++ optionals (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isAarch64 && buildPlatform == hostPlatform && hostPlatform == targetPlatform) ({ "14" = [ (fetchpatch { # There are no upstream release tags in https://github.com/iains/gcc-14-branch. # 04696df09633baf97cdbbdd6e9929b9d472161d3 is the commit from https://github.com/gcc-mirror/gcc/releases/tag/releases%2Fgcc-14.2.0 @@ -170,7 +170,7 @@ in }.${majorVersion} or []) # Work around newer AvailabilityInternal.h when building older versions of GCC. -++ optionals (stdenv.isDarwin) ({ +++ optionals (stdenv.hostPlatform.isDarwin) ({ "9" = [ ../patches/9/AvailabilityInternal.h-fixincludes.patch ]; "8" = [ ../patches/8/AvailabilityInternal.h-fixincludes.patch ]; "7" = [ ../patches/7/AvailabilityInternal.h-fixincludes.patch ]; @@ -202,7 +202,7 @@ in ## gcc 11.0 and older ############################################################################## # libgcc’s `configure` script misdetects aarch64-darwin, resulting in an invalid deployment target. -++ optional (is11 && stdenv.isDarwin && stdenv.isAarch64) ./11/libgcc-aarch64-darwin-detection.patch +++ optional (is11 && stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isAarch64) ./11/libgcc-aarch64-darwin-detection.patch # openjdk build fails without this on -march=opteron; is upstream in gcc12 ++ optionals (is11) [ ./11/gcc-issue-103910.patch ] diff --git a/pkgs/development/compilers/gerbil/build.nix b/pkgs/development/compilers/gerbil/build.nix index c71ea137eadc..5ed7339c31be 100644 --- a/pkgs/development/compilers/gerbil/build.nix +++ b/pkgs/development/compilers/gerbil/build.nix @@ -106,7 +106,7 @@ stdenv.mkDerivation rec { ./install.sh (cd $out/bin ; ln -s ../gerbil/bin/* .) runHook postInstall - '' + lib.optionalString stdenv.isDarwin '' + '' + lib.optionalString stdenv.hostPlatform.isDarwin '' libgerbil="$(realpath "$out/gerbil/lib/libgerbil.so")" install_name_tool -id "$libgerbil" "$libgerbil" ''; diff --git a/pkgs/development/compilers/gforth/boot-forth.nix b/pkgs/development/compilers/gforth/boot-forth.nix index 657847164bb0..9a4d676f5130 100644 --- a/pkgs/development/compilers/gforth/boot-forth.nix +++ b/pkgs/development/compilers/gforth/boot-forth.nix @@ -13,7 +13,7 @@ stdenv.mkDerivation { buildInputs = [ m4 ]; - configureFlags = lib.optionals stdenv.isDarwin [ "--build=x86_64-apple-darwin" ]; + configureFlags = lib.optionals stdenv.hostPlatform.isDarwin [ "--build=x86_64-apple-darwin" ]; meta = { description = "Forth implementation of the GNU project (outdated version used to bootstrap)"; diff --git a/pkgs/development/compilers/gforth/default.nix b/pkgs/development/compilers/gforth/default.nix index 56d89fd628f2..6b68f7b47c5c 100644 --- a/pkgs/development/compilers/gforth/default.nix +++ b/pkgs/development/compilers/gforth/default.nix @@ -29,7 +29,7 @@ in stdenv.mkDerivation rec { configureFlags = [ "--with-lispdir=${lispDir}" - ] ++ lib.optionals (stdenv.isDarwin && stdenv.isx86_64) [ + ] ++ lib.optionals (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isx86_64) [ "--build=x86_64-apple-darwin" ]; @@ -41,7 +41,7 @@ in stdenv.mkDerivation rec { description = "Forth implementation of the GNU project"; homepage = "https://github.com/forthy42/gforth"; license = lib.licenses.gpl3; - broken = stdenv.isDarwin && stdenv.isAarch64; # segfault when running ./gforthmi + broken = stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isAarch64; # segfault when running ./gforthmi platforms = lib.platforms.all; }; } diff --git a/pkgs/development/compilers/ghc/8.10.7-binary.nix b/pkgs/development/compilers/ghc/8.10.7-binary.nix index a4602c9a645c..20ad72462401 100644 --- a/pkgs/development/compilers/ghc/8.10.7-binary.nix +++ b/pkgs/development/compilers/ghc/8.10.7-binary.nix @@ -199,7 +199,7 @@ stdenv.mkDerivation rec { # rcodesign is used to replace the signature instead of sigtool because it # supports setting the linker-signed flag, which will ensure future processing # of the binaries does not invalidate their signatures. - ++ lib.optionals (stdenv.isDarwin && stdenv.isAarch64) [ rcodesign ]; + ++ lib.optionals (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isAarch64) [ rcodesign ]; # Set LD_LIBRARY_PATH or equivalent so that the programs running as part # of the bindist installer can find the libraries they expect. @@ -245,14 +245,14 @@ stdenv.mkDerivation rec { ]) # GHC has dtrace probes, which causes ld to try to open /usr/lib/libdtrace.dylib # during linking - + lib.optionalString stdenv.isDarwin ('' + + lib.optionalString stdenv.hostPlatform.isDarwin ('' export NIX_LDFLAGS+=" -no_dtrace_dof" # not enough room in the object files for the full path to libiconv :( for exe in $(find . -type f -executable); do isScript $exe && continue ln -fs ${libiconv}/lib/libiconv.dylib $(dirname $exe)/libiconv.dylib install_name_tool -change /usr/lib/libiconv.2.dylib @executable_path/libiconv.dylib -change /usr/local/lib/gcc/6/libgcc_s.1.dylib ${gcc.cc.lib}/lib/libgcc_s.1.dylib $exe - '' + lib.optionalString stdenv.isAarch64 '' + '' + lib.optionalString stdenv.hostPlatform.isAarch64 '' # Resign the binary and set the linker-signed flag. Ignore failures when the file is an object file. # Object files don’t have signatures, so ignoring the failures is harmless. rcodesign sign --code-signature-flags linker-signed $exe || true @@ -274,7 +274,7 @@ stdenv.mkDerivation rec { '' find . -name integer-gmp.buildinfo \ -exec sed -i "s@extra-lib-dirs: @extra-lib-dirs: ${gmp.out}/lib@" {} \; - '' + lib.optionalString stdenv.isDarwin '' + '' + lib.optionalString stdenv.hostPlatform.isDarwin '' find . -name base.buildinfo \ -exec sed -i "s@extra-lib-dirs: @extra-lib-dirs: ${libiconv}/lib@" {} \; '' + @@ -285,7 +285,7 @@ stdenv.mkDerivation rec { -exec sed -i "s@FFI_LIB_DIR@FFI_LIB_DIR ${numactl.out}/lib@g" {} \; '' + # Rename needed libraries and binaries, fix interpreter - lib.optionalString stdenv.isLinux '' + lib.optionalString stdenv.hostPlatform.isLinux '' find . -type f -executable -exec patchelf \ --interpreter ${stdenv.cc.bintools.dynamicLinker} {} \; '' + @@ -314,7 +314,7 @@ stdenv.mkDerivation rec { "--with-gmp-includes=${lib.getDev gmp}/include" # Note `--with-gmp-libraries` does nothing for GHC bindists: # https://gitlab.haskell.org/ghc/ghc/-/merge_requests/6124 - ] ++ lib.optional stdenv.isDarwin "--with-gcc=${./gcc-clang-wrapper.sh}" + ] ++ lib.optional stdenv.hostPlatform.isDarwin "--with-gcc=${./gcc-clang-wrapper.sh}" # From: https://github.com/NixOS/nixpkgs/pull/43369/commits ++ lib.optional stdenv.hostPlatform.isMusl "--disable-ld-override"; @@ -349,7 +349,7 @@ stdenv.mkDerivation rec { # On Linux, use patchelf to modify the executables so that they can # find editline/gmp. - postFixup = lib.optionalString stdenv.isLinux + postFixup = lib.optionalString stdenv.hostPlatform.isLinux (if stdenv.hostPlatform.isAarch64 then # Keep rpath as small as possible on aarch64 for patchelf#244. All Elfs # are 2 directories deep from $out/lib, so pooling symlinks there makes @@ -377,7 +377,7 @@ stdenv.mkDerivation rec { patchelf --set-rpath "${libPath}:$(patchelf --print-rpath $p)" $p fi done - '') + lib.optionalString stdenv.isDarwin '' + '') + lib.optionalString stdenv.hostPlatform.isDarwin '' # not enough room in the object files for the full path to libiconv :( for exe in $(find "$out" -type f -executable); do isScript $exe && continue diff --git a/pkgs/development/compilers/ghc/8.10.7.nix b/pkgs/development/compilers/ghc/8.10.7.nix index a6694e2e99c9..d0f9130ff3fe 100644 --- a/pkgs/development/compilers/ghc/8.10.7.nix +++ b/pkgs/development/compilers/ghc/8.10.7.nix @@ -69,7 +69,7 @@ assert !enableIntegerSimple -> gmp != null; assert (stdenv.targetPlatform != stdenv.hostPlatform) -> !enableHaddockProgram; let - libffi_name = if stdenv.isDarwin && stdenv.isAarch64 then "libffi" else "libffi_3_3"; + libffi_name = if stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isAarch64 then "libffi" else "libffi_3_3"; inherit (stdenv) buildPlatform hostPlatform targetPlatform; inherit (bootPkgs) ghc; @@ -253,7 +253,7 @@ stdenv.mkDerivation (rec { url = "https://gitlab.haskell.org/ghc/ghc/-/commit/8f7dd5710b80906ea7a3e15b7bb56a883a49fed8.patch"; hash = "sha256-C636Nq2U8YOG/av7XQmG3L1rU0bmC9/7m7Hty5pm5+s="; }) - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ # Make Block.h compile with c++ compilers. Remove with the next release (fetchpatch { url = "https://gitlab.haskell.org/ghc/ghc/-/commit/97d0b0a367e4c6a52a17c3299439ac7de129da24.patch"; @@ -302,9 +302,9 @@ stdenv.mkDerivation (rec { echo -n "${buildMK}" > mk/build.mk sed -i -e 's|-isysroot /Developer/SDKs/MacOSX10.5.sdk||' configure - '' + lib.optionalString (!stdenv.isDarwin) '' + '' + lib.optionalString (!stdenv.hostPlatform.isDarwin) '' export NIX_LDFLAGS+=" -rpath $out/lib/ghc-${version}" - '' + lib.optionalString stdenv.isDarwin '' + '' + lib.optionalString stdenv.hostPlatform.isDarwin '' export NIX_LDFLAGS+=" -no_dtrace_dof" # GHC tries the host xattr /usr/bin/xattr by default which fails since it expects python to be 2.7 @@ -366,7 +366,7 @@ stdenv.mkDerivation (rec { nativeBuildInputs = [ perl autoreconfHook autoconf automake m4 python3 ghc bootPkgs.alex bootPkgs.happy bootPkgs.hscolour - ] ++ lib.optionals (stdenv.isDarwin && stdenv.isAarch64) [ + ] ++ lib.optionals (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isAarch64) [ autoSignDarwinBinariesHook ] ++ lib.optionals enableDocs [ sphinx diff --git a/pkgs/development/compilers/ghc/8.6.5-binary.nix b/pkgs/development/compilers/ghc/8.6.5-binary.nix index d66f47b661a5..eef0cba9f00b 100644 --- a/pkgs/development/compilers/ghc/8.6.5-binary.nix +++ b/pkgs/development/compilers/ghc/8.6.5-binary.nix @@ -26,7 +26,7 @@ let libEnvVar = lib.optionalString stdenv.hostPlatform.isDarwin "DY" + "LD_LIBRARY_PATH"; - glibcDynLinker = assert stdenv.isLinux; + glibcDynLinker = assert stdenv.hostPlatform.isLinux; if stdenv.hostPlatform.libc == "glibc" then # Could be stdenv.cc.bintools.dynamicLinker, keeping as-is to avoid rebuild. ''"$(cat $NIX_CC/nix-support/dynamic-linker)"'' @@ -88,7 +88,7 @@ stdenv.mkDerivation rec { postUnpack = # GHC has dtrace probes, which causes ld to try to open /usr/lib/libdtrace.dylib # during linking - lib.optionalString stdenv.isDarwin '' + lib.optionalString stdenv.hostPlatform.isDarwin '' export NIX_LDFLAGS+=" -no_dtrace_dof" # not enough room in the object files for the full path to libiconv :( for exe in $(find . -type f -executable); do @@ -110,15 +110,15 @@ stdenv.mkDerivation rec { '' find . -name integer-gmp.buildinfo \ -exec sed -i "s@extra-lib-dirs: @extra-lib-dirs: ${gmp.out}/lib@" {} \; - '' + lib.optionalString stdenv.isDarwin '' + '' + lib.optionalString stdenv.hostPlatform.isDarwin '' find . -name base.buildinfo \ -exec sed -i "s@extra-lib-dirs: @extra-lib-dirs: ${libiconv}/lib@" {} \; '' + # Rename needed libraries and binaries, fix interpreter - lib.optionalString stdenv.isLinux '' + lib.optionalString stdenv.hostPlatform.isLinux '' find . -type f -perm -0100 \ -exec patchelf \ - --replace-needed libncurses${lib.optionalString stdenv.is64bit "w"}.so.5 libncurses.so \ + --replace-needed libncurses${lib.optionalString stdenv.hostPlatform.is64bit "w"}.so.5 libncurses.so \ ${ # This isn't required for x86_64-linux where we use ncurses6 lib.optionalString (!useNcurses6) "--replace-needed libtinfo.so libtinfo.so.5" } \ @@ -142,7 +142,7 @@ stdenv.mkDerivation rec { "--with-gmp-includes=${lib.getDev gmp}/include" # Note `--with-gmp-libraries` does nothing for GHC bindists: # https://gitlab.haskell.org/ghc/ghc/-/merge_requests/6124 - ] ++ lib.optional stdenv.isDarwin "--with-gcc=${./gcc-clang-wrapper.sh}" + ] ++ lib.optional stdenv.hostPlatform.isDarwin "--with-gcc=${./gcc-clang-wrapper.sh}" ++ lib.optional stdenv.hostPlatform.isMusl "--disable-ld-override"; # No building is necessary, but calling make without flags ironically @@ -160,14 +160,14 @@ stdenv.mkDerivation rec { # On Linux, use patchelf to modify the executables so that they can # find editline/gmp. - postFixup = lib.optionalString stdenv.isLinux '' + postFixup = lib.optionalString stdenv.hostPlatform.isLinux '' for p in $(find "$out" -type f -executable); do if isELF "$p"; then echo "Patchelfing $p" patchelf --set-rpath "${libPath}:$(patchelf --print-rpath $p)" $p fi done - '' + lib.optionalString stdenv.isDarwin '' + '' + lib.optionalString stdenv.hostPlatform.isDarwin '' # not enough room in the object files for the full path to libiconv :( for exe in $(find "$out" -type f -executable); do isScript $exe && continue diff --git a/pkgs/development/compilers/ghc/9.2.4-binary.nix b/pkgs/development/compilers/ghc/9.2.4-binary.nix index 920b63ce4eab..e8c6d83ea82f 100644 --- a/pkgs/development/compilers/ghc/9.2.4-binary.nix +++ b/pkgs/development/compilers/ghc/9.2.4-binary.nix @@ -222,7 +222,7 @@ stdenv.mkDerivation rec { ]) # GHC has dtrace probes, which causes ld to try to open /usr/lib/libdtrace.dylib # during linking - + lib.optionalString stdenv.isDarwin '' + + lib.optionalString stdenv.hostPlatform.isDarwin '' export NIX_LDFLAGS+=" -no_dtrace_dof" # not enough room in the object files for the full path to libiconv :( for exe in $(find . -type f -executable); do @@ -247,7 +247,7 @@ stdenv.mkDerivation rec { # we need to modify the package db directly for hadrian bindists find . -name 'ghc-bignum*.conf' \ -exec sed -e '/^[a-z-]*library-dirs/a \ ${lib.getLib gmpUsed}/lib' -i {} \; - '' + lib.optionalString stdenv.isDarwin '' + '' + lib.optionalString stdenv.hostPlatform.isDarwin '' # we need to modify the package db directly for hadrian bindists # (all darwin bindists are hadrian-based for 9.2.2) find . -name 'base*.conf' \ @@ -266,7 +266,7 @@ stdenv.mkDerivation rec { -exec sed -i "s@FFI_LIB_DIR@FFI_LIB_DIR ${numactl.out}/lib@g" {} \; '' + # Rename needed libraries and binaries, fix interpreter - lib.optionalString stdenv.isLinux '' + lib.optionalString stdenv.hostPlatform.isLinux '' find . -type f -executable -exec patchelf \ --interpreter ${stdenv.cc.bintools.dynamicLinker} {} \; ''; @@ -281,7 +281,7 @@ stdenv.mkDerivation rec { "--with-gmp-includes=${lib.getDev gmpUsed}/include" # Note `--with-gmp-libraries` does nothing for GHC bindists: # https://gitlab.haskell.org/ghc/ghc/-/merge_requests/6124 - ] ++ lib.optional stdenv.isDarwin "--with-gcc=${./gcc-clang-wrapper.sh}" + ] ++ lib.optional stdenv.hostPlatform.isDarwin "--with-gcc=${./gcc-clang-wrapper.sh}" # From: https://github.com/NixOS/nixpkgs/pull/43369/commits ++ lib.optional stdenv.hostPlatform.isMusl "--disable-ld-override"; @@ -316,7 +316,7 @@ stdenv.mkDerivation rec { # On Linux, use patchelf to modify the executables so that they can # find editline/gmp. - postFixup = lib.optionalString (stdenv.isLinux && !(binDistUsed.isStatic or false)) + postFixup = lib.optionalString (stdenv.hostPlatform.isLinux && !(binDistUsed.isStatic or false)) (if stdenv.hostPlatform.isAarch64 then # Keep rpath as small as possible on aarch64 for patchelf#244. All Elfs # are 2 directories deep from $out/lib, so pooling symlinks there makes @@ -344,7 +344,7 @@ stdenv.mkDerivation rec { patchelf --set-rpath "${libPath}:$(patchelf --print-rpath $p)" $p fi done - '') + lib.optionalString stdenv.isDarwin '' + '') + lib.optionalString stdenv.hostPlatform.isDarwin '' # not enough room in the object files for the full path to libiconv :( for exe in $(find "$out" -type f -executable); do isScript $exe && continue diff --git a/pkgs/development/compilers/ghc/9.6.3-binary.nix b/pkgs/development/compilers/ghc/9.6.3-binary.nix index d67e9f47ac48..6d8f195bb9d3 100644 --- a/pkgs/development/compilers/ghc/9.6.3-binary.nix +++ b/pkgs/development/compilers/ghc/9.6.3-binary.nix @@ -218,7 +218,7 @@ stdenv.mkDerivation rec { ]) # GHC has dtrace probes, which causes ld to try to open /usr/lib/libdtrace.dylib # during linking - + lib.optionalString stdenv.isDarwin '' + + lib.optionalString stdenv.hostPlatform.isDarwin '' export NIX_LDFLAGS+=" -no_dtrace_dof" # not enough room in the object files for the full path to libiconv :( for exe in $(find . -type f -executable); do @@ -235,7 +235,7 @@ stdenv.mkDerivation rec { -exec sed -e '/^[a-z-]*library-dirs/a \ ${lib.getLib gmpUsed}/lib' -i {} \; '' # Similar for iconv and libffi on darwin - + lib.optionalString stdenv.isDarwin '' + + lib.optionalString stdenv.hostPlatform.isDarwin '' find . -name 'base*.conf' \ -exec sed -e '/^[a-z-]*library-dirs/a \ ${lib.getLib libiconv}/lib' -i {} \; @@ -252,7 +252,7 @@ stdenv.mkDerivation rec { -exec sed -i "s@FFI_LIB_DIR@FFI_LIB_DIR ${numactl.out}/lib@g" {} \; '' + # Rename needed libraries and binaries, fix interpreter - lib.optionalString stdenv.isLinux '' + lib.optionalString stdenv.hostPlatform.isLinux '' find . -type f -executable -exec patchelf \ --interpreter ${stdenv.cc.bintools.dynamicLinker} {} \; ''; @@ -267,7 +267,7 @@ stdenv.mkDerivation rec { configurePlatforms = [ ]; configureFlags = - lib.optional stdenv.isDarwin "--with-gcc=${./gcc-clang-wrapper.sh}" + lib.optional stdenv.hostPlatform.isDarwin "--with-gcc=${./gcc-clang-wrapper.sh}" # From: https://github.com/NixOS/nixpkgs/pull/43369/commits ++ lib.optional stdenv.hostPlatform.isMusl "--disable-ld-override"; @@ -308,7 +308,7 @@ stdenv.mkDerivation rec { # On Linux, use patchelf to modify the executables so that they can # find editline/gmp. - postFixup = lib.optionalString (stdenv.isLinux && !(binDistUsed.isStatic or false)) + postFixup = lib.optionalString (stdenv.hostPlatform.isLinux && !(binDistUsed.isStatic or false)) (if stdenv.hostPlatform.isAarch64 then # Keep rpath as small as possible on aarch64 for patchelf#244. All Elfs # are 2 directories deep from $out/lib, so pooling symlinks there makes @@ -336,7 +336,7 @@ stdenv.mkDerivation rec { patchelf --set-rpath "${libPath}:$(patchelf --print-rpath $p)" $p fi done - '') + lib.optionalString stdenv.isDarwin '' + '') + lib.optionalString stdenv.hostPlatform.isDarwin '' # not enough room in the object files for the full path to libiconv :( for exe in $(find "$out" -type f -executable); do isMachO $exe || continue diff --git a/pkgs/development/compilers/ghc/common-hadrian.nix b/pkgs/development/compilers/ghc/common-hadrian.nix index b6d4d7236fe6..31d1e52ea95b 100644 --- a/pkgs/development/compilers/ghc/common-hadrian.nix +++ b/pkgs/development/compilers/ghc/common-hadrian.nix @@ -368,11 +368,11 @@ stdenv.mkDerivation ({ # LLVM backend on Darwin needs clang: https://downloads.haskell.org/~ghc/latest/docs/html/users_guide/codegens.html#llvm-code-generator-fllvm export CLANG="${buildTargetLlvmPackages.clang}/bin/${buildTargetLlvmPackages.clang.targetPrefix}clang" '' + - lib.optionalString (stdenv.isLinux && hostPlatform.libc == "glibc") '' + lib.optionalString (stdenv.hostPlatform.isLinux && hostPlatform.libc == "glibc") '' export LOCALE_ARCHIVE="${glibcLocales}/lib/locale/locale-archive" - '' + lib.optionalString (!stdenv.isDarwin) '' + '' + lib.optionalString (!stdenv.hostPlatform.isDarwin) '' export NIX_LDFLAGS+=" -rpath $out/lib/ghc-${version}" - '' + lib.optionalString stdenv.isDarwin '' + '' + lib.optionalString stdenv.hostPlatform.isDarwin '' export NIX_LDFLAGS+=" -no_dtrace_dof" # GHC tries the host xattr /usr/bin/xattr by default which fails since it expects python to be 2.7 @@ -476,7 +476,7 @@ stdenv.mkDerivation ({ autoconf automake m4 # Python is used in a few scripts invoked by hadrian to generate e.g. rts headers. python3 - ] ++ lib.optionals (stdenv.isDarwin && stdenv.isAarch64) [ + ] ++ lib.optionals (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isAarch64) [ autoSignDarwinBinariesHook ] ++ lib.optionals enableDocs [ sphinx diff --git a/pkgs/development/compilers/ghc/common-make-native-bignum.nix b/pkgs/development/compilers/ghc/common-make-native-bignum.nix index 2b23cd75a0ed..f6b6c33e9f9f 100644 --- a/pkgs/development/compilers/ghc/common-make-native-bignum.nix +++ b/pkgs/development/compilers/ghc/common-make-native-bignum.nix @@ -309,13 +309,13 @@ stdenv.mkDerivation (rec { '' + lib.optionalString (lib.versionOlder version "9.2" || lib.versionAtLeast version "9.4") '' sed -i -e 's|-isysroot /Developer/SDKs/MacOSX10.5.sdk||' configure - '' + lib.optionalString (stdenv.isLinux && hostPlatform.libc == "glibc") '' + '' + lib.optionalString (stdenv.hostPlatform.isLinux && hostPlatform.libc == "glibc") '' export LOCALE_ARCHIVE="${glibcLocales}/lib/locale/locale-archive" - '' + lib.optionalString (!stdenv.isDarwin) '' + '' + lib.optionalString (!stdenv.hostPlatform.isDarwin) '' export NIX_LDFLAGS+=" -rpath $out/lib/ghc-${version}" - '' + lib.optionalString stdenv.isDarwin '' + '' + lib.optionalString stdenv.hostPlatform.isDarwin '' export NIX_LDFLAGS+=" -no_dtrace_dof" - '' + lib.optionalString (stdenv.isDarwin && lib.versionAtLeast version "9.2") '' + '' + lib.optionalString (stdenv.hostPlatform.isDarwin && lib.versionAtLeast version "9.2") '' # GHC tries the host xattr /usr/bin/xattr by default which fails since it expects python to be 2.7 export XATTR=${lib.getBin xattr}/bin/xattr @@ -383,11 +383,11 @@ stdenv.mkDerivation (rec { nativeBuildInputs = [ perl autoconf automake m4 python3 ghc bootPkgs.alex bootPkgs.happy bootPkgs.hscolour - ] ++ lib.optionals (stdenv.isDarwin && stdenv.isAarch64) [ + ] ++ lib.optionals (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isAarch64) [ autoSignDarwinBinariesHook ] ++ lib.optionals enableDocs [ sphinx - ] ++ lib.optionals (stdenv.isDarwin && lib.versions.majorMinor version == "9.0") [ + ] ++ lib.optionals (stdenv.hostPlatform.isDarwin && lib.versions.majorMinor version == "9.0") [ # TODO(@sternenseemann): backport addition of XATTR env var like # https://gitlab.haskell.org/ghc/ghc/-/merge_requests/6447 xattr diff --git a/pkgs/development/compilers/ghcjs/8.10/default.nix b/pkgs/development/compilers/ghcjs/8.10/default.nix index 9a648f838406..aea58c62b6d1 100644 --- a/pkgs/development/compilers/ghcjs/8.10/default.nix +++ b/pkgs/development/compilers/ghcjs/8.10/default.nix @@ -74,7 +74,7 @@ in stdenv.mkDerivation { xorg.lndir gmp pkg-config - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ gcc # https://github.com/ghcjs/ghcjs/issues/663 ]; dontConfigure = true; diff --git a/pkgs/development/compilers/gleam/default.nix b/pkgs/development/compilers/gleam/default.nix index 075088306de6..279136ac60e2 100644 --- a/pkgs/development/compilers/gleam/default.nix +++ b/pkgs/development/compilers/gleam/default.nix @@ -24,7 +24,7 @@ rustPlatform.buildRustPackage rec { nativeBuildInputs = [ git pkg-config ]; buildInputs = [ openssl ] ++ - lib.optionals stdenv.isDarwin [ Security SystemConfiguration ]; + lib.optionals stdenv.hostPlatform.isDarwin [ Security SystemConfiguration ]; cargoHash = "sha256-0Vtf9UXLPW5HuqNIAGNyqIXCMTITdG7PuFdw4H4v6a4="; diff --git a/pkgs/development/compilers/go/1.21.nix b/pkgs/development/compilers/go/1.21.nix index 7c8f1fbd9cde..a4cb04351031 100644 --- a/pkgs/development/compilers/go/1.21.nix +++ b/pkgs/development/compilers/go/1.21.nix @@ -55,7 +55,7 @@ stdenv.mkDerivation (finalAttrs: { strictDeps = true; buildInputs = [ ] - ++ lib.optionals stdenv.isLinux [ stdenv.cc.libc.out ] + ++ lib.optionals stdenv.hostPlatform.isLinux [ stdenv.cc.libc.out ] ++ lib.optionals (stdenv.hostPlatform.libc == "glibc") [ stdenv.cc.libc.static ]; depsTargetTargetPropagated = lib.optionals stdenv.targetPlatform.isDarwin [ Foundation Security xcbuild ]; diff --git a/pkgs/development/compilers/go/1.22.nix b/pkgs/development/compilers/go/1.22.nix index 4060a6cf6975..afda23ba96d8 100644 --- a/pkgs/development/compilers/go/1.22.nix +++ b/pkgs/development/compilers/go/1.22.nix @@ -56,7 +56,7 @@ stdenv.mkDerivation (finalAttrs: { strictDeps = true; buildInputs = [ ] - ++ lib.optionals stdenv.isLinux [ stdenv.cc.libc.out ] + ++ lib.optionals stdenv.hostPlatform.isLinux [ stdenv.cc.libc.out ] ++ lib.optionals (stdenv.hostPlatform.libc == "glibc") [ stdenv.cc.libc.static ]; depsTargetTargetPropagated = lib.optionals stdenv.targetPlatform.isDarwin [ Foundation Security xcbuild ]; diff --git a/pkgs/development/compilers/go/1.23.nix b/pkgs/development/compilers/go/1.23.nix index d4486ff319e4..65c562389b9b 100644 --- a/pkgs/development/compilers/go/1.23.nix +++ b/pkgs/development/compilers/go/1.23.nix @@ -56,7 +56,7 @@ stdenv.mkDerivation (finalAttrs: { strictDeps = true; buildInputs = [ ] - ++ lib.optionals stdenv.isLinux [ stdenv.cc.libc.out ] + ++ lib.optionals stdenv.hostPlatform.isLinux [ stdenv.cc.libc.out ] ++ lib.optionals (stdenv.hostPlatform.libc == "glibc") [ stdenv.cc.libc.static ]; depsTargetTargetPropagated = lib.optionals stdenv.targetPlatform.isDarwin [ Foundation Security xcbuild ]; diff --git a/pkgs/development/compilers/gprolog/default.nix b/pkgs/development/compilers/gprolog/default.nix index 6868ca9f8d8f..3cd5c1bcfa4c 100644 --- a/pkgs/development/compilers/gprolog/default.nix +++ b/pkgs/development/compilers/gprolog/default.nix @@ -12,7 +12,7 @@ stdenv.mkDerivation rec { sha256 = "sha256-ZwZCtDwPqifr1olh77F+vnB2iPkbaAlWbd1gYTlRLAE="; }; - hardeningDisable = lib.optional stdenv.isi686 "pic"; + hardeningDisable = lib.optional stdenv.hostPlatform.isi686 "pic"; patchPhase = '' sed -i -e "s|/tmp/make.log|$TMPDIR/make.log|g" src/Pl2Wam/check_boot diff --git a/pkgs/development/compilers/graalvm/community-edition/buildGraalvm.nix b/pkgs/development/compilers/graalvm/community-edition/buildGraalvm.nix index 83d60202a4fc..04f45c1ccddf 100644 --- a/pkgs/development/compilers/graalvm/community-edition/buildGraalvm.nix +++ b/pkgs/development/compilers/graalvm/community-edition/buildGraalvm.nix @@ -18,12 +18,12 @@ , zlib # extra params , extraCLibs ? [ ] -, gtkSupport ? stdenv.isLinux +, gtkSupport ? stdenv.hostPlatform.isLinux , useMusl ? false , ... } @ args: -assert useMusl -> stdenv.isLinux; +assert useMusl -> stdenv.hostPlatform.isLinux; let extraArgs = builtins.removeAttrs args [ "lib" @@ -51,7 +51,7 @@ let "meta" ]; - cLibs = lib.optionals stdenv.isLinux ( + cLibs = lib.optionals stdenv.hostPlatform.isLinux ( [ glibc zlib.static ] ++ lib.optionals (!useMusl) [ glibc.static ] ++ lib.optionals useMusl [ musl ] @@ -86,7 +86,7 @@ let # # We therefor use --strip-components=1 vs 3 depending on the platform. tar xf "$src" -C "$out" --strip-components=${ - if stdenv.isLinux then "1" else "3" + if stdenv.hostPlatform.isLinux then "1" else "3" } # Sanity check @@ -104,12 +104,12 @@ let dontStrip = true; nativeBuildInputs = [ unzip makeWrapper ] - ++ lib.optional stdenv.isLinux autoPatchelfHook; + ++ lib.optional stdenv.hostPlatform.isLinux autoPatchelfHook; propagatedBuildInputs = [ setJavaClassPath zlib ] - ++ lib.optional stdenv.isDarwin darwin.apple_sdk_11_0.frameworks.Foundation; + ++ lib.optional stdenv.hostPlatform.isDarwin darwin.apple_sdk_11_0.frameworks.Foundation; - buildInputs = lib.optionals stdenv.isLinux [ + buildInputs = lib.optionals stdenv.hostPlatform.isLinux [ alsa-lib # libasound.so wanted by lib/libjsound.so fontconfig stdenv.cc.cc.lib # libstdc++.so.6 @@ -136,7 +136,7 @@ let ${toString (map (l: "--add-flags '-H:CLibraryPath=${l}/lib'") cLibs)} ''; - preFixup = lib.optionalString (stdenv.isLinux) '' + preFixup = lib.optionalString (stdenv.hostPlatform.isLinux) '' for bin in $(find "$out/bin" -executable -type f); do wrapProgram "$bin" --prefix LD_LIBRARY_PATH : "${runtimeLibraryPath}" done @@ -147,7 +147,7 @@ let runHook preInstallCheck ${# broken in darwin - lib.optionalString stdenv.isLinux '' + lib.optionalString stdenv.hostPlatform.isLinux '' echo "Testing Jshell" echo '1 + 1' | $out/bin/jshell ''} @@ -172,14 +172,14 @@ let ./helloworld | fgrep 'Hello World' ${# -H:+StaticExecutableWithDynamicLibC is only available in Linux - lib.optionalString (stdenv.isLinux && !useMusl) '' + lib.optionalString (stdenv.hostPlatform.isLinux && !useMusl) '' echo "Ahead-Of-Time compilation with -H:+StaticExecutableWithDynamicLibC" $out/bin/native-image -H:+UnlockExperimentalVMOptions -H:+StaticExecutableWithDynamicLibC -march=compatibility $extraNativeImageArgs HelloWorld ./helloworld | fgrep 'Hello World' ''} ${# --static is only available in Linux - lib.optionalString (stdenv.isLinux && useMusl) '' + lib.optionalString (stdenv.hostPlatform.isLinux && useMusl) '' echo "Ahead-Of-Time compilation with --static and --libc=musl" $out/bin/native-image $extraNativeImageArgs -march=compatibility --libc=musl --static HelloWorld ./helloworld | fgrep 'Hello World' diff --git a/pkgs/development/compilers/graalvm/community-edition/buildGraalvmProduct.nix b/pkgs/development/compilers/graalvm/community-edition/buildGraalvmProduct.nix index 907441ff68c4..2c8220d89a0a 100644 --- a/pkgs/development/compilers/graalvm/community-edition/buildGraalvmProduct.nix +++ b/pkgs/development/compilers/graalvm/community-edition/buildGraalvmProduct.nix @@ -33,7 +33,7 @@ stdenv.mkDerivation ({ pname = product; nativeBuildInputs = [ makeWrapper ] - ++ lib.optional stdenv.isLinux autoPatchelfHook + ++ lib.optional stdenv.hostPlatform.isLinux autoPatchelfHook ++ extraNativeBuildInputs; buildInputs = [ @@ -41,7 +41,7 @@ stdenv.mkDerivation ({ zlib libxcrypt-legacy # libcrypt.so.1 (default is .2 now) ] - ++ lib.optional stdenv.isDarwin darwin.apple_sdk.frameworks.Foundation + ++ lib.optional stdenv.hostPlatform.isDarwin darwin.apple_sdk.frameworks.Foundation ++ extraBuildInputs; unpackPhase = '' diff --git a/pkgs/development/compilers/graalvm/community-edition/default.nix b/pkgs/development/compilers/graalvm/community-edition/default.nix index bfc9c729689c..c546d65ef02c 100644 --- a/pkgs/development/compilers/graalvm/community-edition/default.nix +++ b/pkgs/development/compilers/graalvm/community-edition/default.nix @@ -5,7 +5,7 @@ lib.makeScope pkgs.newScope (self: { stdenv = - if pkgs.stdenv.isDarwin then + if pkgs.stdenv.hostPlatform.isDarwin then pkgs.darwin.apple_sdk_11_0.stdenv else pkgs.stdenv; diff --git a/pkgs/development/compilers/graalvm/community-edition/truffleruby/default.nix b/pkgs/development/compilers/graalvm/community-edition/truffleruby/default.nix index 95e9c56fc23c..da971347652e 100644 --- a/pkgs/development/compilers/graalvm/community-edition/truffleruby/default.nix +++ b/pkgs/development/compilers/graalvm/community-edition/truffleruby/default.nix @@ -17,7 +17,7 @@ graalvmCEPackages.buildGraalvmProduct { openssl ]; - preFixup = lib.optionalString stdenv.isLinux '' + preFixup = lib.optionalString stdenv.hostPlatform.isLinux '' patchelf $out/lib/mri/openssl.so \ --replace-needed libssl.so.10 libssl.so \ --replace-needed libcrypto.so.10 libcrypto.so @@ -31,7 +31,7 @@ graalvmCEPackages.buildGraalvmProduct { export LC_ALL=C $out/bin/ruby -e 'puts(1 + 1)' ${# broken in darwin with sandbox enabled - lib.optionalString stdenv.isLinux '' + lib.optionalString stdenv.hostPlatform.isLinux '' echo '1 + 1' | $out/bin/irb ''} ''; diff --git a/pkgs/development/compilers/halide/default.nix b/pkgs/development/compilers/halide/default.nix index 738ecc81a156..d34ee3af9163 100644 --- a/pkgs/development/compilers/halide/default.nix +++ b/pkgs/development/compilers/halide/default.nix @@ -38,7 +38,7 @@ stdenv.mkDerivation rec { # Note: on x86_64-darwin, clang fails to find AvailabilityVersions.h, so we remove it. # Halide uses AvailabilityVersions.h and TargetConditionals.h to determine whether # ::aligned_alloc is available. For us, it isn't. - + lib.optionalString (stdenv.isDarwin && stdenv.isx86_64) '' + + lib.optionalString (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isx86_64) '' substituteInPlace 'src/runtime/HalideBuffer.h' \ --replace '#ifdef __APPLE__ #include @@ -84,7 +84,7 @@ stdenv.mkDerivation rec { libjpeg eigen openblas - ] ++ lib.optionals (!stdenv.isDarwin) [ + ] ++ lib.optionals (!stdenv.hostPlatform.isDarwin) [ mesa libGL ]; diff --git a/pkgs/development/compilers/haxe/default.nix b/pkgs/development/compilers/haxe/default.nix index 78e5770cc68e..4613b90113ef 100644 --- a/pkgs/development/compilers/haxe/default.nix +++ b/pkgs/development/compilers/haxe/default.nix @@ -65,7 +65,7 @@ let ] ++ (if lib.versionAtLeast version "4.3" then [ pcre2 ] else [ pcre ]) ++ lib.optional (lib.versionAtLeast version "4.1") mbedtls_2 - ++ lib.optional (lib.versionAtLeast version "4.1" && stdenv.isDarwin) Security + ++ lib.optional (lib.versionAtLeast version "4.1" && stdenv.hostPlatform.isDarwin) Security ++ ocamlDependencies version; src = fetchFromGitHub { diff --git a/pkgs/development/compilers/idris2/idris2.nix b/pkgs/development/compilers/idris2/idris2.nix index 2d5ec9a28368..6f39eea61868 100644 --- a/pkgs/development/compilers/idris2/idris2.nix +++ b/pkgs/development/compilers/idris2/idris2.nix @@ -40,7 +40,7 @@ stdenv.mkDerivation rec { makeWrapper clang platformChez - ] ++ lib.optionals stdenv.isDarwin [ zsh ]; + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ zsh ]; buildInputs = [ platformChez gmp @@ -50,7 +50,7 @@ stdenv.mkDerivation rec { patchShebangs --build tests ''; - makeFlags = [ "PREFIX=$(out)" ] ++ lib.optional stdenv.isDarwin "OS="; + makeFlags = [ "PREFIX=$(out)" ] ++ lib.optional stdenv.hostPlatform.isDarwin "OS="; # The name of the main executable of pkgs.chez is `scheme` buildFlags = [ diff --git a/pkgs/development/compilers/idris2/tests.nix b/pkgs/development/compilers/idris2/tests.nix index bb5cd140c90c..b4193286d49c 100644 --- a/pkgs/development/compilers/idris2/tests.nix +++ b/pkgs/development/compilers/idris2/tests.nix @@ -28,7 +28,7 @@ let # is not the case with pure nix environments. Thus, we need to include zsh # when we build for darwin in tests. While this is impure, this is also what # we find in real darwin hosts. - nativeBuildInputs = lib.optionals stdenv.isDarwin [ zsh ]; + nativeBuildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ zsh ]; } '' set -eo pipefail diff --git a/pkgs/development/compilers/inform7/default.nix b/pkgs/development/compilers/inform7/default.nix index cb464e3484c2..b4b97af52417 100644 --- a/pkgs/development/compilers/inform7/default.nix +++ b/pkgs/development/compilers/inform7/default.nix @@ -29,6 +29,6 @@ in stdenv.mkDerivation { maintainers = with maintainers; [ mbbx6spp ]; platforms = platforms.unix; # never built on aarch64-darwin since first introduction in nixpkgs - broken = (stdenv.isDarwin && stdenv.isAarch64) || (stdenv.isLinux && stdenv.isAarch64); + broken = (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isAarch64) || (stdenv.hostPlatform.isLinux && stdenv.hostPlatform.isAarch64); }; } diff --git a/pkgs/development/compilers/ispc/default.nix b/pkgs/development/compilers/ispc/default.nix index b8c48c5c6a01..2aa173fdde24 100644 --- a/pkgs/development/compilers/ispc/default.nix +++ b/pkgs/development/compilers/ispc/default.nix @@ -1,7 +1,7 @@ { lib, stdenv, fetchFromGitHub , cmake, which, m4, python3, bison, flex, llvmPackages, ncurses, xcode, tbb # the default test target is sse4, but that is not supported by all Hydra agents -, testedTargets ? if stdenv.isAarch64 || stdenv.isAarch32 then [ "neon-i32x4" ] else [ "sse2-i32x4" ] +, testedTargets ? if stdenv.hostPlatform.isAarch64 || stdenv.hostPlatform.isAarch32 then [ "neon-i32x4" ] else [ "sse2-i32x4" ] }: stdenv.mkDerivation rec { @@ -17,7 +17,7 @@ stdenv.mkDerivation rec { sha256 = "sha256-1Ns8w34fXgYrSu3XE89uowjaVoW3MOgKYV1Jb/XRj1Q="; }; - nativeBuildInputs = [ cmake which m4 bison flex python3 llvmPackages.libllvm.dev tbb ] ++ lib.lists.optionals stdenv.isDarwin [ xcode ]; + nativeBuildInputs = [ cmake which m4 bison flex python3 llvmPackages.libllvm.dev tbb ] ++ lib.lists.optionals stdenv.hostPlatform.isDarwin [ xcode ]; buildInputs = with llvmPackages; [ libllvm libclang openmp ncurses @@ -61,9 +61,9 @@ stdenv.mkDerivation rec { "-DCLANGPP_EXECUTABLE=${llvmPackages.clang}/bin/clang++" "-DISPC_INCLUDE_EXAMPLES=OFF" "-DISPC_INCLUDE_UTILS=OFF" - ("-DARM_ENABLED=" + (if stdenv.isAarch64 || stdenv.isAarch32 then "TRUE" else "FALSE")) - ("-DX86_ENABLED=" + (if stdenv.isx86_64 || stdenv.isx86_32 then "TRUE" else "FALSE")) - ] ++ lib.lists.optionals stdenv.isDarwin [ + ("-DARM_ENABLED=" + (if stdenv.hostPlatform.isAarch64 || stdenv.hostPlatform.isAarch32 then "TRUE" else "FALSE")) + ("-DX86_ENABLED=" + (if stdenv.hostPlatform.isx86_64 || stdenv.hostPlatform.isx86_32 then "TRUE" else "FALSE")) + ] ++ lib.lists.optionals stdenv.hostPlatform.isDarwin [ "-DISPC_MACOS_SDK_PATH=${xcode}/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk" ]; diff --git a/pkgs/development/compilers/jetbrains-jdk/17.nix b/pkgs/development/compilers/jetbrains-jdk/17.nix index 76d4079baafb..a868a441ba4c 100644 --- a/pkgs/development/compilers/jetbrains-jdk/17.nix +++ b/pkgs/development/compilers/jetbrains-jdk/17.nix @@ -147,7 +147,7 @@ openjdk17.overrideAttrs (oldAttrs: rec { inherit (openjdk17.meta) license platforms mainProgram; maintainers = with maintainers; [ edwtjo ]; - broken = stdenv.isDarwin; + broken = stdenv.hostPlatform.isDarwin; }; passthru = oldAttrs.passthru // { diff --git a/pkgs/development/compilers/jetbrains-jdk/default.nix b/pkgs/development/compilers/jetbrains-jdk/default.nix index 59a6704e3103..77ac8e904d47 100644 --- a/pkgs/development/compilers/jetbrains-jdk/default.nix +++ b/pkgs/development/compilers/jetbrains-jdk/default.nix @@ -147,7 +147,7 @@ jdk.overrideAttrs (oldAttrs: rec { inherit (jdk.meta) license platforms mainProgram; maintainers = with maintainers; [ edwtjo ]; - broken = stdenv.isDarwin; + broken = stdenv.hostPlatform.isDarwin; }; passthru = oldAttrs.passthru // { diff --git a/pkgs/development/compilers/jetbrains-jdk/jcef.nix b/pkgs/development/compilers/jetbrains-jdk/jcef.nix index 537133524a2c..9cda4fc51623 100644 --- a/pkgs/development/compilers/jetbrains-jdk/jcef.nix +++ b/pkgs/development/compilers/jetbrains-jdk/jcef.nix @@ -45,7 +45,7 @@ , thrift }: -assert !stdenv.isDarwin; +assert !stdenv.hostPlatform.isDarwin; # I can't test darwin let diff --git a/pkgs/development/compilers/jsonnet/default.nix b/pkgs/development/compilers/jsonnet/default.nix index 8e723cdb8211..4dc7557d1379 100644 --- a/pkgs/development/compilers/jsonnet/default.nix +++ b/pkgs/development/compilers/jsonnet/default.nix @@ -18,7 +18,7 @@ stdenv.mkDerivation rec { cmakeFlags = [ "-DUSE_SYSTEM_GTEST=ON" "-DBUILD_STATIC_LIBS=${if stdenv.hostPlatform.isStatic then "ON" else "OFF"}" - ] ++ lib.optionals (!stdenv.isDarwin) [ + ] ++ lib.optionals (!stdenv.hostPlatform.isDarwin) [ "-DBUILD_SHARED_BINARIES=${if stdenv.hostPlatform.isStatic then "OFF" else "ON"}" ]; diff --git a/pkgs/development/compilers/julia/generic-bin.nix b/pkgs/development/compilers/julia/generic-bin.nix index 09a8c2bce3bf..fd78e6113850 100644 --- a/pkgs/development/compilers/julia/generic-bin.nix +++ b/pkgs/development/compilers/julia/generic-bin.nix @@ -24,14 +24,14 @@ let "REPL" # Test flaky "ccall" - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ # Test flaky on ofborg "FileWatching" # Test requires pbcopy "InteractiveUtils" # Test requires network access "Sockets" - ] ++ lib.optionals (stdenv.isDarwin && stdenv.isx86_64) [ + ] ++ lib.optionals (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isx86_64) [ # Test Failed at $out/share/julia/stdlib/v1.8/LinearAlgebra/test/blas.jl:702 "LinearAlgebra/blas" # Test Failed at $out/share/julia/test/misc.jl:724 @@ -71,7 +71,7 @@ stdenv.mkDerivation { '@test_skip ca_roots_path() != bundled_ca_roots()' ''; - nativeBuildInputs = lib.optionals stdenv.isLinux [ + nativeBuildInputs = lib.optionals stdenv.hostPlatform.isLinux [ autoPatchelfHook # https://github.com/JuliaLang/julia/blob/v1.9.0/NEWS.md#external-dependencies stdenv.cc.cc diff --git a/pkgs/development/compilers/julia/generic.nix b/pkgs/development/compilers/julia/generic.nix index e3360137ca74..53a5067e783a 100644 --- a/pkgs/development/compilers/julia/generic.nix +++ b/pkgs/development/compilers/julia/generic.nix @@ -53,10 +53,10 @@ stdenv.mkDerivation rec { makeFlags = [ "prefix=$(out)" "USE_BINARYBUILDER=0" - ] ++ lib.optionals stdenv.isx86_64 [ + ] ++ lib.optionals stdenv.hostPlatform.isx86_64 [ # https://github.com/JuliaCI/julia-buildkite/blob/main/utilities/build_envs.sh "JULIA_CPU_TARGET=generic;sandybridge,-xsaveopt,clone_all;haswell,-rdrnd,base(1);x86-64-v4,-rdrnd,base(1)" - ] ++ lib.optionals stdenv.isAarch64 [ + ] ++ lib.optionals stdenv.hostPlatform.isAarch64 [ "JULIA_CPU_TARGET=generic;cortex-a57;thunderx2t99;carmel,clone_all;apple-m1,base(3);neoverse-512tvb,base(3)" ]; diff --git a/pkgs/development/compilers/kind2/default.nix b/pkgs/development/compilers/kind2/default.nix index 617f86880363..a5a8585d020e 100644 --- a/pkgs/development/compilers/kind2/default.nix +++ b/pkgs/development/compilers/kind2/default.nix @@ -16,7 +16,7 @@ rustPlatform.buildRustPackage rec { cargoHash = "sha256-KzoEh/kMKsHx9K3t1/uQZ7fdsZEM+v8UOft8JjEB1Zw="; - buildInputs = lib.optionals stdenv.isDarwin [ + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk_11_0.frameworks.Security ]; diff --git a/pkgs/development/compilers/ligo/default.nix b/pkgs/development/compilers/ligo/default.nix index 8a76de022283..b472eb921cfa 100644 --- a/pkgs/development/compilers/ligo/default.nix +++ b/pkgs/development/compilers/ligo/default.nix @@ -113,7 +113,7 @@ ocamlPackages.buildDunePackage rec { seqes stdint tezt - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.Security ]; diff --git a/pkgs/development/compilers/llvm/common/compiler-rt/default.nix b/pkgs/development/compilers/llvm/common/compiler-rt/default.nix index e43ff09931b8..a6d727739d27 100644 --- a/pkgs/development/compilers/llvm/common/compiler-rt/default.nix +++ b/pkgs/development/compilers/llvm/common/compiler-rt/default.nix @@ -68,7 +68,7 @@ stdenv.mkDerivation ({ nativeBuildInputs = [ cmake ] ++ (lib.optional (lib.versionAtLeast release_version "15") ninja) ++ [ python3 libllvm.dev ] - ++ lib.optional stdenv.isDarwin xcbuild.xcrun; + ++ lib.optional stdenv.hostPlatform.isDarwin xcbuild.xcrun; buildInputs = lib.optional (stdenv.hostPlatform.isLinux && stdenv.hostPlatform.isRiscV) linuxHeaders ++ lib.optional (stdenv.hostPlatform.isFreeBSD) freebsd.include; @@ -133,7 +133,7 @@ stdenv.mkDerivation ({ # `COMPILER_RT_DEFAULT_TARGET_ONLY` does not apply to Darwin: # https://github.com/llvm/llvm-project/blob/27ef42bec80b6c010b7b3729ed0528619521a690/compiler-rt/cmake/base-config-ix.cmake#L153 "-DCOMPILER_RT_ENABLE_IOS=OFF" - ]) ++ lib.optionals (lib.versionAtLeast version "19" && stdenv.isDarwin && lib.versionOlder stdenv.hostPlatform.darwinMinVersion "10.13") [ + ]) ++ lib.optionals (lib.versionAtLeast version "19" && stdenv.hostPlatform.isDarwin && lib.versionOlder stdenv.hostPlatform.darwinMinVersion "10.13") [ "-DSANITIZER_MIN_OSX_VERSION=10.10" ] ++ lib.optionals (noSanitizers && lib.versionAtLeast release_version "19") [ "-DCOMPILER_RT_BUILD_CTX_PROFILE=OFF" @@ -146,10 +146,10 @@ stdenv.mkDerivation ({ # can build this. If we didn't do it, basically the entire nixpkgs on Darwin would have an unfree dependency and we'd # get no binary cache for the entire platform. If you really find yourself wanting the TSAN, make this controllable by # a flag and turn the flag off during the stdenv build. - postPatch = lib.optionalString (!stdenv.isDarwin) '' + postPatch = lib.optionalString (!stdenv.hostPlatform.isDarwin) '' substituteInPlace cmake/builtin-config-ix.cmake \ --replace 'set(X86 i386)' 'set(X86 i386 i486 i586 i686)' - '' + lib.optionalString stdenv.isDarwin '' + '' + lib.optionalString stdenv.hostPlatform.isDarwin '' substituteInPlace cmake/config-ix.cmake \ --replace 'set(COMPILER_RT_HAS_TSAN TRUE)' 'set(COMPILER_RT_HAS_TSAN FALSE)' '' + lib.optionalString (!haveLibc) ((lib.optionalString (lib.versionAtLeast release_version "18") '' diff --git a/pkgs/development/compilers/llvm/common/default.nix b/pkgs/development/compilers/llvm/common/default.nix index 689ea9f7cb7b..2a5d3c9dcdbc 100644 --- a/pkgs/development/compilers/llvm/common/default.nix +++ b/pkgs/development/compilers/llvm/common/default.nix @@ -1058,7 +1058,7 @@ let lib.optional ( lib.versions.major metadata.release_version == "17" - && stdenv.isDarwin + && stdenv.hostPlatform.isDarwin && lib.versionOlder stdenv.hostPlatform.darwinMinVersion "10.13" ) # https://github.com/llvm/llvm-project/issues/64226 @@ -1073,7 +1073,7 @@ let lib.optional ( lib.versionAtLeast metadata.release_version "18" - && stdenv.isDarwin + && stdenv.hostPlatform.isDarwin && lib.versionOlder stdenv.hostPlatform.darwinMinVersion "10.13" ) # https://github.com/llvm/llvm-project/issues/64226 diff --git a/pkgs/development/compilers/llvm/common/libcxx/default.nix b/pkgs/development/compilers/llvm/common/libcxx/default.nix index 2893d012151d..17c687f88394 100644 --- a/pkgs/development/compilers/llvm/common/libcxx/default.nix +++ b/pkgs/development/compilers/llvm/common/libcxx/default.nix @@ -121,7 +121,7 @@ stdenv.mkDerivation (rec { ''; nativeBuildInputs = [ cmake ninja python3 ] - ++ lib.optional stdenv.isDarwin fixDarwinDylibNames + ++ lib.optional stdenv.hostPlatform.isDarwin fixDarwinDylibNames ++ lib.optional (cxxabi != null) lndir; buildInputs = [ cxxabi ] diff --git a/pkgs/development/compilers/llvm/common/lld/default.nix b/pkgs/development/compilers/llvm/common/lld/default.nix index 2c87d4cfa96f..d5c0f7cb3a09 100644 --- a/pkgs/development/compilers/llvm/common/lld/default.nix +++ b/pkgs/development/compilers/llvm/common/lld/default.nix @@ -33,7 +33,7 @@ let '(''${LLVM_MAIN_SRC_DIR}/' '(' mkdir -p libunwind/include tar -xf "${libunwind.src}" --wildcards -C libunwind/include --strip-components=2 "libunwind-*/include/" - '' + lib.optionalString (lib.versions.major release_version == "13" && stdenv.isDarwin) '' + '' + lib.optionalString (lib.versions.major release_version == "13" && stdenv.hostPlatform.isDarwin) '' substituteInPlace MachO/CMakeLists.txt --replace \ '(''${LLVM_MAIN_SRC_DIR}/' '(../' ''; diff --git a/pkgs/development/compilers/llvm/common/lldb.nix b/pkgs/development/compilers/llvm/common/lldb.nix index d174570c1f34..4f679f4dcff1 100644 --- a/pkgs/development/compilers/llvm/common/lldb.nix +++ b/pkgs/development/compilers/llvm/common/lldb.nix @@ -54,7 +54,7 @@ stdenv.mkDerivation (rec { # LLDB expects to find the path to `bin` relative to `lib` on Darwin. It can’t be patched with the location of # the `lib` output because that would create a cycle between it and the `out` output. - outputs = [ "out" "dev" ] ++ lib.optionals (!stdenv.isDarwin) [ "lib" ]; + outputs = [ "out" "dev" ] ++ lib.optionals (!stdenv.hostPlatform.isDarwin) [ "lib" ]; sourceRoot = lib.optional (lib.versionAtLeast release_version "13") "${src.name}/${pname}"; @@ -87,7 +87,7 @@ stdenv.mkDerivation (rec { # libclang into the rpath of the lldb executables. By putting it into # buildInputs cc-wrapper will set up rpath correctly for us. (lib.getLib libclang) - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ darwin.libobjc darwin.apple_sdk.libs.xpc darwin.apple_sdk.frameworks.Foundation @@ -123,9 +123,9 @@ stdenv.mkDerivation (rec { "-DLLVM_ENABLE_RTTI=OFF" "-DClang_DIR=${lib.getDev libclang}/lib/cmake" "-DLLVM_EXTERNAL_LIT=${lit}/bin/lit" - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ "-DLLDB_USE_SYSTEM_DEBUGSERVER=ON" - ] ++ lib.optionals (!stdenv.isDarwin) [ + ] ++ lib.optionals (!stdenv.hostPlatform.isDarwin) [ "-DLLDB_CODESIGN_IDENTITY=" # codesigning makes nondeterministic ] ++ lib.optionals (lib.versionAtLeast release_version "17") [ "-DCLANG_RESOURCE_DIR=../../../../${libclang.lib}" diff --git a/pkgs/development/compilers/llvm/common/llvm/default.nix b/pkgs/development/compilers/llvm/common/llvm/default.nix index e39ba171373f..281a21ca1524 100644 --- a/pkgs/development/compilers/llvm/common/llvm/default.nix +++ b/pkgs/development/compilers/llvm/common/llvm/default.nix @@ -28,13 +28,13 @@ , sysctl , buildLlvmTools , debugVersion ? false -, doCheck ? !stdenv.isAarch32 && (if lib.versionOlder release_version "15" then stdenv.isLinux else true) - && (!stdenv.isx86_32 /* TODO: why */) && (!stdenv.hostPlatform.isMusl) +, doCheck ? !stdenv.hostPlatform.isAarch32 && (if lib.versionOlder release_version "15" then stdenv.hostPlatform.isLinux else true) + && (!stdenv.hostPlatform.isx86_32 /* TODO: why */) && (!stdenv.hostPlatform.isMusl) && !(stdenv.hostPlatform.isPower64 && stdenv.hostPlatform.isBigEndian) && (stdenv.hostPlatform == stdenv.buildPlatform) , enableManpages ? false , enableSharedLibraries ? !stdenv.hostPlatform.isStatic -, enablePFM ? stdenv.isLinux /* PFM only supports Linux */ +, enablePFM ? stdenv.hostPlatform.isLinux /* PFM only supports Linux */ # broken for Ampere eMAG 8180 (c2.large.arm on Packet) #56245 # broken for the armv7l builder && !stdenv.hostPlatform.isAarch @@ -126,7 +126,7 @@ stdenv.mkDerivation (rec { propagatedBuildInputs = (lib.optional (lib.versionAtLeast release_version "14" || stdenv.buildPlatform == stdenv.hostPlatform) ncurses) ++ [ zlib ]; - postPatch = optionalString stdenv.isDarwin ('' + postPatch = optionalString stdenv.hostPlatform.isDarwin ('' substituteInPlace cmake/modules/AddLLVM.cmake \ --replace 'set(_install_name_dir INSTALL_NAME_DIR "@rpath")' "set(_install_name_dir)" \ --replace 'set(_install_rpath "@loader_path/../''${CMAKE_INSTALL_LIBDIR}''${LLVM_LIBDIR_SUFFIX}" ''${extra_libdir})' "" @@ -167,7 +167,7 @@ stdenv.mkDerivation (rec { --replace "PhysicalFileSystemWorkingDirFailure" "DISABLED_PhysicalFileSystemWorkingDirFailure" ''))) + # dup of above patch with different conditions - optionalString (stdenv.isDarwin && stdenv.hostPlatform.isx86 && lib.versionAtLeast release_version "15") (optionalString (lib.versionOlder release_version "16") '' + optionalString (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isx86 && lib.versionAtLeast release_version "15") (optionalString (lib.versionOlder release_version "16") '' substituteInPlace test/ExecutionEngine/Interpreter/intrinsics.ll \ --replace "%roundeven32 = call float @llvm.roundeven.f32(float 0.000000e+00)" "" \ --replace "%roundeven64 = call double @llvm.roundeven.f64(double 0.000000e+00)" "" @@ -267,7 +267,7 @@ stdenv.mkDerivation (rec { # It seems to reference /usr/local/lib/libfile.a, which is clearly a problem. # 2. This test fails for the same reason it fails on MacOS, but the fix is # not trivial to apply. - optionalString stdenv.isFreeBSD '' + optionalString stdenv.hostPlatform.isFreeBSD '' rm test/tools/llvm-libtool-darwin/L-and-l.test rm test/ExecutionEngine/Interpreter/intrinsics.ll '' + '' @@ -319,7 +319,7 @@ stdenv.mkDerivation (rec { ''; # E.g. Mesa uses the build-id as a cache key (see #93946): - LDFLAGS = optionalString (enableSharedLibraries && !stdenv.isDarwin) "-Wl,--build-id=sha1"; + LDFLAGS = optionalString (enableSharedLibraries && !stdenv.hostPlatform.isDarwin) "-Wl,--build-id=sha1"; cmakeBuildType = if debugVersion then "Debug" else "Release"; @@ -367,7 +367,7 @@ stdenv.mkDerivation (rec { "-DSPHINX_WARNINGS_AS_ERRORS=OFF" ] ++ optionals (enableGoldPlugin) [ "-DLLVM_BINUTILS_INCDIR=${libbfd.dev}/include" - ] ++ optionals stdenv.isDarwin [ + ] ++ optionals stdenv.hostPlatform.isDarwin [ "-DLLVM_ENABLE_LIBCXX=ON" "-DCAN_TARGET_i386=false" ] ++ optionals ((stdenv.hostPlatform != stdenv.buildPlatform) && !(stdenv.buildPlatform.canExecute stdenv.hostPlatform)) [ @@ -416,10 +416,10 @@ stdenv.mkDerivation (rec { substituteInPlace "$dev/lib/cmake/llvm/LLVMConfig.cmake" \ --replace 'set(LLVM_BINARY_DIR "''${LLVM_INSTALL_PREFIX}")' 'set(LLVM_BINARY_DIR "'"$lib"'")' '') - + optionalString (stdenv.isDarwin && enableSharedLibraries && lib.versionOlder release_version "18") '' + + optionalString (stdenv.hostPlatform.isDarwin && enableSharedLibraries && lib.versionOlder release_version "18") '' ln -s $lib/lib/libLLVM.dylib $lib/lib/libLLVM-${shortVersion}.dylib '' - + optionalString (stdenv.isDarwin && enableSharedLibraries) '' + + optionalString (stdenv.hostPlatform.isDarwin && enableSharedLibraries) '' ln -s $lib/lib/libLLVM.dylib $lib/lib/libLLVM-${release_version}.dylib '' + optionalString (stdenv.buildPlatform != stdenv.hostPlatform) (if stdenv.buildPlatform.canExecute stdenv.hostPlatform then '' @@ -495,7 +495,7 @@ stdenv.mkDerivation (rec { mv polly-* $sourceRoot/tools/polly ''; } // lib.optionalAttrs (lib.versionAtLeast release_version "13") { - nativeCheckInputs = [ which ] ++ lib.optional (stdenv.isDarwin && lib.versionAtLeast release_version "15") sysctl; + nativeCheckInputs = [ which ] ++ lib.optional (stdenv.hostPlatform.isDarwin && lib.versionAtLeast release_version "15") sysctl; } // lib.optionalAttrs (lib.versionOlder release_version "15") { # hacky fix: created binaries need to be run before installation preBuild = '' diff --git a/pkgs/development/compilers/llvm/common/mlir/default.nix b/pkgs/development/compilers/llvm/common/mlir/default.nix index 3ef689b7fefe..e4dd12d69e58 100644 --- a/pkgs/development/compilers/llvm/common/mlir/default.nix +++ b/pkgs/development/compilers/llvm/common/mlir/default.nix @@ -9,7 +9,7 @@ , libxml2 , libllvm , version -, doCheck ? (!stdenv.isx86_32 /* TODO: why */) && (!stdenv.hostPlatform.isMusl) +, doCheck ? (!stdenv.hostPlatform.isx86_32 /* TODO: why */) && (!stdenv.hostPlatform.isMusl) , devExtraCmakeFlags ? [] }: diff --git a/pkgs/development/compilers/lobster/default.nix b/pkgs/development/compilers/lobster/default.nix index 645e7019aa73..2ebe573cf513 100644 --- a/pkgs/development/compilers/lobster/default.nix +++ b/pkgs/development/compilers/lobster/default.nix @@ -28,7 +28,7 @@ stdenv.mkDerivation (finalAttrs: { }; nativeBuildInputs = [ cmake ]; - buildInputs = if stdenv.isDarwin + buildInputs = if stdenv.hostPlatform.isDarwin then [ CoreFoundation Cocoa @@ -50,7 +50,7 @@ stdenv.mkDerivation (finalAttrs: { passthru.tests.can-run-hello-world = callPackage ./test-can-run-hello-world.nix {}; meta = with lib; { - broken = stdenv.isDarwin; + broken = stdenv.hostPlatform.isDarwin; homepage = "https://strlen.com/lobster/"; description = "Lobster programming language"; mainProgram = "lobster"; diff --git a/pkgs/development/compilers/minimacy/default.nix b/pkgs/development/compilers/minimacy/default.nix index ae4da0d5b027..6f4d14b27901 100644 --- a/pkgs/development/compilers/minimacy/default.nix +++ b/pkgs/development/compilers/minimacy/default.nix @@ -22,18 +22,18 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ makeBinaryWrapper ]; - buildInputs = [ libGL libGLU ] ++ lib.optionals stdenv.isLinux [ alsa-lib libX11 libXext ]; + buildInputs = [ libGL libGLU ] ++ lib.optionals stdenv.hostPlatform.isLinux [ alsa-lib libX11 libXext ]; enableParallelBuilding = true; env.NIX_CFLAGS_COMPILE = "-Wno-unused-result"; preBuild = '' - pushd ${if stdenv.isDarwin then "macos/cmdline" else "unix"} + pushd ${if stdenv.hostPlatform.isDarwin then "macos/cmdline" else "unix"} ''; # TODO: build graphic version for darwin - buildFlags = (if stdenv.isDarwin then [ "nox" ] else [ "all" ]) ++ [ "CC=${stdenv.cc.targetPrefix}cc" ]; + buildFlags = (if stdenv.hostPlatform.isDarwin then [ "nox" ] else [ "all" ]) ++ [ "CC=${stdenv.cc.targetPrefix}cc" ]; postBuild = '' popd @@ -44,7 +44,7 @@ stdenv.mkDerivation rec { checkPhase = '' runHook preCheck - bin/${if stdenv.isDarwin then "minimacyMac" else "minimacy"} system/demo/demo.fun.mandelbrot.mcy + bin/${if stdenv.hostPlatform.isDarwin then "minimacyMac" else "minimacy"} system/demo/demo.fun.mandelbrot.mcy runHook postCheck ''; diff --git a/pkgs/development/compilers/mit-scheme/default.nix b/pkgs/development/compilers/mit-scheme/default.nix index 1abbac512aa7..c9fc962e30b4 100644 --- a/pkgs/development/compilers/mit-scheme/default.nix +++ b/pkgs/development/compilers/mit-scheme/default.nix @@ -15,9 +15,9 @@ let version = "12.1"; - bootstrapFromC = ! ((stdenv.isLinux && stdenv.isAarch64) || stdenv.isx86_64); + bootstrapFromC = ! ((stdenv.hostPlatform.isLinux && stdenv.hostPlatform.isAarch64) || stdenv.hostPlatform.isx86_64); - arch = if stdenv.isLinux && stdenv.isAarch64 then + arch = if stdenv.hostPlatform.isLinux && stdenv.hostPlatform.isAarch64 then "-aarch64le" else "-x86-64"; @@ -31,7 +31,7 @@ stdenv.mkDerivation { # leads to more efficient code than when building the tarball that contains # generated C code instead of those binaries. src = - if stdenv.isLinux && stdenv.isAarch64 + if stdenv.hostPlatform.isLinux && stdenv.hostPlatform.isAarch64 then fetchurl { url = "mirror://gnu/mit-scheme/stable.pkg/${version}/mit-scheme-${version}-aarch64le.tar.gz"; sha256 = "12ra9bc93x8g07impbd8jr6djjzwpb9qvh9zhxvvrba3332zx3vh"; diff --git a/pkgs/development/compilers/mkcl/default.nix b/pkgs/development/compilers/mkcl/default.nix index 0b95f3e9b2a6..ae2d11feb765 100644 --- a/pkgs/development/compilers/mkcl/default.nix +++ b/pkgs/development/compilers/mkcl/default.nix @@ -55,7 +55,7 @@ stdenv.mkDerivation rec { enableParallelBuilding = true; meta = with lib; { - broken = (stdenv.isLinux && stdenv.isAarch64); + broken = (stdenv.hostPlatform.isLinux && stdenv.hostPlatform.isAarch64); description = "ANSI Common Lisp Implementation"; homepage = "https://common-lisp.net/project/mkcl/"; license = licenses.lgpl2Plus; diff --git a/pkgs/development/compilers/mlton/20130715.nix b/pkgs/development/compilers/mlton/20130715.nix index 98b4aeda5516..90285bf08982 100644 --- a/pkgs/development/compilers/mlton/20130715.nix +++ b/pkgs/development/compilers/mlton/20130715.nix @@ -3,7 +3,7 @@ let version = "20130715"; - usr_prefix = if stdenv.isDarwin then "usr/local" else "usr"; + usr_prefix = if stdenv.hostPlatform.isDarwin then "usr/local" else "usr"; dynamic_linker = stdenv.cc.bintools.dynamicLinker; in @@ -38,7 +38,7 @@ stdenv.mkDerivation rec { sourceRoot = "${pname}-${version}"; buildInputs = [ gmp ]; - nativeBuildInputs = lib.optional stdenv.isLinux patchelf; + nativeBuildInputs = lib.optional stdenv.hostPlatform.isLinux patchelf; makeFlags = [ "all-no-docs" ]; @@ -63,7 +63,7 @@ stdenv.mkDerivation rec { substituteInPlace $(pwd)/../${usr_prefix}/bin/mlton --replace '/${usr_prefix}/lib/mlton' $(pwd)/../${usr_prefix}/lib/mlton '' + lib.optionalString stdenv.cc.isClang '' sed -i "s_ patch -s -p0 config/srcarchiveurl patch --verbose config/_heap2exec ${./heap2exec.diff} - '' + lib.optionalString stdenv.isDarwin '' + '' + lib.optionalString stdenv.hostPlatform.isDarwin '' # Locate standard headers like substituteInPlace base/runtime/config/gen-posix-names.sh \ --replace "\$SDK_PATH/usr" "${Libsystem}" @@ -89,6 +89,6 @@ in stdenv.mkDerivation { maintainers = with maintainers; [ thoughtpolice ]; mainProgram = "sml"; # never built on x86_64-darwin since first introduction in nixpkgs - broken = stdenv.isDarwin && stdenv.isx86_64; + broken = stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isx86_64; }; } diff --git a/pkgs/development/compilers/solc/default.nix b/pkgs/development/compilers/solc/default.nix index 2147d59ffd93..73476c939ce8 100644 --- a/pkgs/development/compilers/solc/default.nix +++ b/pkgs/development/compilers/solc/default.nix @@ -8,7 +8,7 @@ , python3 , z3Support ? true , z3_4_11 ? null -, cvc4Support ? gccStdenv.isLinux +, cvc4Support ? gccStdenv.hostPlatform.isLinux , cvc4 ? null , cln ? null , gmp ? null @@ -52,7 +52,7 @@ let maintainers = with maintainers; [ dbrock akru lionello sifmelcara ]; }; - solc = if gccStdenv.isLinux then gccStdenv.mkDerivation rec { + solc = if gccStdenv.hostPlatform.isLinux then gccStdenv.mkDerivation rec { inherit pname version meta; # upstream suggests avoid using archive generated by github diff --git a/pkgs/development/compilers/souffle/default.nix b/pkgs/development/compilers/souffle/default.nix index b851ac2c1403..f279ce475a4e 100644 --- a/pkgs/development/compilers/souffle/default.nix +++ b/pkgs/development/compilers/souffle/default.nix @@ -24,7 +24,7 @@ stdenv.mkDerivation rec { ./includes.patch ]; - hardeningDisable = lib.optionals stdenv.isDarwin [ "strictoverflow" ]; + hardeningDisable = lib.optionals stdenv.hostPlatform.isDarwin [ "strictoverflow" ]; nativeBuildInputs = [ bison cmake flex mcpp doxygen graphviz makeWrapper perl ]; buildInputs = [ bash-completion ncurses zlib sqlite libffi python3 ]; diff --git a/pkgs/development/compilers/spirv-llvm-translator/default.nix b/pkgs/development/compilers/spirv-llvm-translator/default.nix index 20adaf5f559b..89e4452e7d4b 100644 --- a/pkgs/development/compilers/spirv-llvm-translator/default.nix +++ b/pkgs/development/compilers/spirv-llvm-translator/default.nix @@ -105,7 +105,7 @@ stdenv.mkDerivation { postInstall = '' install -D tools/llvm-spirv/llvm-spirv $out/bin/llvm-spirv - '' + lib.optionalString stdenv.isDarwin '' + '' + lib.optionalString stdenv.hostPlatform.isDarwin '' install_name_tool $out/bin/llvm-spirv \ -change @rpath/libLLVMSPIRVLib.dylib $out/lib/libLLVMSPIRVLib.dylib ''; diff --git a/pkgs/development/compilers/swi-prolog/default.nix b/pkgs/development/compilers/swi-prolog/default.nix index 628e69eb5bc9..c104cca2cfdb 100644 --- a/pkgs/development/compilers/swi-prolog/default.nix +++ b/pkgs/development/compilers/swi-prolog/default.nix @@ -74,7 +74,7 @@ let packInstall = swiplPath: pack: ''${swiplPath}/bin/swipl -g "pack_install(${pack}, [package_directory(\"${swiplPath}/lib/swipl/extra-pack\"), silent(true), interactive(false)])." -t "halt." ''; - withGui' = withGui && !stdenv.isDarwin; + withGui' = withGui && !stdenv.hostPlatform.isDarwin; optionalDependencies = [] ++ (lib.optional withDb db) ++ (lib.optional withJava jdk) @@ -85,7 +85,7 @@ let ++ (lib.optionals withGui' [ libXt libXext libXpm libXft libXinerama libjpeg libSM freetype fontconfig ]) - ++ (lib.optional stdenv.isDarwin Security) + ++ (lib.optional stdenv.hostPlatform.isDarwin Security) ++ extraLibraries'; in stdenv.mkDerivation { @@ -126,8 +126,8 @@ stdenv.mkDerivation { cmakeFlags = [ "-DSWIPL_INSTALL_IN_LIB=ON" ] ++ lib.optionals (!withNativeCompiler) [ # without these options, the build will embed full compiler paths - "-DSWIPL_CC=${if stdenv.isDarwin then "clang" else "gcc"}" - "-DSWIPL_CXX=${if stdenv.isDarwin then "clang++" else "g++"}" + "-DSWIPL_CC=${if stdenv.hostPlatform.isDarwin then "clang" else "gcc"}" + "-DSWIPL_CXX=${if stdenv.hostPlatform.isDarwin then "clang++" else "g++"}" ]; preInstall = '' diff --git a/pkgs/development/compilers/swift/compiler/default.nix b/pkgs/development/compilers/swift/compiler/default.nix index d3e2017958fd..c74ee850f4a5 100644 --- a/pkgs/development/compilers/swift/compiler/default.nix +++ b/pkgs/development/compilers/swift/compiler/default.nix @@ -50,7 +50,7 @@ let sources = callPackage ../sources.nix { }; # Tools invoked by swift at run-time. - runtimeDeps = lib.optionals stdenv.isDarwin [ + runtimeDeps = lib.optionals stdenv.hostPlatform.isDarwin [ # libtool is used for static linking. This is part of cctools, but adding # that as a build input puts an unwrapped linker in PATH, and breaks # builds. This small derivation exposes just libtool. @@ -78,7 +78,7 @@ let else targetPlatform.parsed.kernel.name; # Apple Silicon uses a different CPU name in the target triple. - swiftArch = if stdenv.isDarwin && stdenv.isAarch64 then "arm64" + swiftArch = if stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isAarch64 then "arm64" else targetPlatform.parsed.cpu.name; # On Darwin, a `.swiftmodule` is a subdirectory in `lib/swift/`, @@ -109,7 +109,7 @@ let "toolchain-tools" "toolchain-dev-tools" "license" - (if stdenv.isDarwin then "sourcekit-xpc-service" else "sourcekit-inproc") + (if stdenv.hostPlatform.isDarwin then "sourcekit-xpc-service" else "sourcekit-inproc") "swift-remote-mirror" "swift-remote-mirror-headers" ]; @@ -205,7 +205,7 @@ in stdenv.mkDerivation { makeClangWrapper makeSwiftcWrapper ] - ++ lib.optionals stdenv.isDarwin [ + ++ lib.optionals stdenv.hostPlatform.isDarwin [ xcbuild sigtool # codesign DarwinTools # sw_vers @@ -218,10 +218,10 @@ in stdenv.mkDerivation { swig libxml2 ] - ++ lib.optionals stdenv.isLinux [ + ++ lib.optionals stdenv.hostPlatform.isLinux [ libuuid ] - ++ lib.optionals stdenv.isDarwin [ + ++ lib.optionals stdenv.hostPlatform.isDarwin [ CoreServices Foundation Combine @@ -262,7 +262,7 @@ in stdenv.mkDerivation { ${copySource "swift-experimental-string-processing"} ${copySource "swift-syntax"} ${lib.optionalString - (!stdenv.isDarwin) + (!stdenv.hostPlatform.isDarwin) (copySource "swift-corelibs-libdispatch")} chmod -R u+w . @@ -272,7 +272,7 @@ in stdenv.mkDerivation { # Just patch all the things for now, we can focus this later. # TODO: eliminate use of env. find -type f -print0 | xargs -0 sed -i \ - ${lib.optionalString stdenv.isDarwin + ${lib.optionalString stdenv.hostPlatform.isDarwin "-e 's|/usr/libexec/PlistBuddy|${xcbuild}/bin/PlistBuddy|g'"} \ -e 's|/usr/bin/env|${coreutils}/bin/env|g' \ -e 's|/usr/bin/make|${gnumake}/bin/make|g' \ @@ -345,7 +345,7 @@ in stdenv.mkDerivation { hash = "sha256-nkRPWx8gNvYr7mlvEUiOAb1rTrf+skCZjAydJVUHrcI="; }} - ${lib.optionalString stdenv.isLinux '' + ${lib.optionalString stdenv.hostPlatform.isLinux '' substituteInPlace llvm-project/clang/lib/Driver/ToolChains/Linux.cpp \ --replace 'SysRoot + "/lib' '"${glibc}/lib" "' \ --replace 'SysRoot + "/usr/lib' '"${glibc}/lib" "' \ @@ -384,7 +384,7 @@ in stdenv.mkDerivation { patchShebangs . - ${lib.optionalString (!stdenv.isDarwin) '' + ${lib.optionalString (!stdenv.hostPlatform.isDarwin) '' # NOTE: This interferes with ABI stability on Darwin, which uses the system # libraries in the hardcoded path /usr/lib/swift. fixCmakeFiles . @@ -392,7 +392,7 @@ in stdenv.mkDerivation { ''; # > clang-15-unwrapped: error: unsupported option '-fzero-call-used-regs=used-gpr' for target 'arm64-apple-macosx10.9.0' - hardeningDisable = lib.optional stdenv.isAarch64 "zerocallusedregs"; + hardeningDisable = lib.optional stdenv.hostPlatform.isAarch64 "zerocallusedregs"; configurePhase = '' export SWIFT_SOURCE_ROOT="$PWD" @@ -451,7 +451,7 @@ in stdenv.mkDerivation { " buildProject llvm llvm-project/llvm - '' + lib.optionalString stdenv.isDarwin '' + '' + lib.optionalString stdenv.hostPlatform.isDarwin '' # Add appleSwiftCore to the search paths. We can't simply add it to # buildInputs, because it is potentially an older stdlib than the one we're # building. We have to remove it again after the main Swift build, or later @@ -477,7 +477,7 @@ in stdenv.mkDerivation { # Fixed in: https://github.com/apple/swift/commit/84083afef1de5931904d5c815d53856cdb3fb232 cmakeFlags=" -GNinja - -DBOOTSTRAPPING_MODE=BOOTSTRAPPING${lib.optionalString stdenv.isDarwin "-WITH-HOSTLIBS"} + -DBOOTSTRAPPING_MODE=BOOTSTRAPPING${lib.optionalString stdenv.hostPlatform.isDarwin "-WITH-HOSTLIBS"} -DSWIFT_ENABLE_EXPERIMENTAL_DIFFERENTIABLE_PROGRAMMING=ON -DSWIFT_ENABLE_EXPERIMENTAL_CONCURRENCY=ON -DSWIFT_ENABLE_EXPERIMENTAL_DISTRIBUTED=ON @@ -490,11 +490,11 @@ in stdenv.mkDerivation { -DSWIFT_PATH_TO_SWIFT_SYNTAX_SOURCE=$SWIFT_SOURCE_ROOT/swift-syntax -DSWIFT_PATH_TO_STRING_PROCESSING_SOURCE=$SWIFT_SOURCE_ROOT/swift-experimental-string-processing -DSWIFT_INSTALL_COMPONENTS=${lib.concatStringsSep ";" swiftInstallComponents} - -DSWIFT_STDLIB_ENABLE_OBJC_INTEROP=${if stdenv.isDarwin then "ON" else "OFF"} + -DSWIFT_STDLIB_ENABLE_OBJC_INTEROP=${if stdenv.hostPlatform.isDarwin then "ON" else "OFF"} " buildProject swift - '' + lib.optionalString stdenv.isDarwin '' + '' + lib.optionalString stdenv.hostPlatform.isDarwin '' # Restore search paths to remove appleSwiftCore. export NIX_SWIFTFLAGS_COMPILE="$OLD_NIX_SWIFTFLAGS_COMPILE" export NIX_LDFLAGS="$OLD_NIX_LDFLAGS" @@ -526,18 +526,18 @@ in stdenv.mkDerivation { -DLLDB_ENABLE_LUA=OFF -DLLDB_INCLUDE_TESTS=OFF -DCMAKE_BUILD_WITH_INSTALL_NAME_DIR=ON - ${lib.optionalString stdenv.isDarwin '' + ${lib.optionalString stdenv.hostPlatform.isDarwin '' -DLLDB_USE_SYSTEM_DEBUGSERVER=ON ''} -DLibEdit_INCLUDE_DIRS=${libedit.dev}/include -DLibEdit_LIBRARIES=${libedit}/lib/libedit${stdenv.hostPlatform.extensions.sharedLibrary} - -DCURSES_INCLUDE_DIRS=${if stdenv.isDarwin then "/var/empty" else ncurses.dev}/include + -DCURSES_INCLUDE_DIRS=${if stdenv.hostPlatform.isDarwin then "/var/empty" else ncurses.dev}/include -DCURSES_LIBRARIES=${ncurses}/lib/libncurses${stdenv.hostPlatform.extensions.sharedLibrary} -DPANEL_LIBRARIES=${ncurses}/lib/libpanel${stdenv.hostPlatform.extensions.sharedLibrary} "; buildProject lldb llvm-project/lldb - ${lib.optionalString stdenv.isDarwin '' + ${lib.optionalString stdenv.hostPlatform.isDarwin '' # Need to do a standalone build of concurrency for Darwin back deployment. # Based on: utils/swift_build_support/swift_build_support/products/backdeployconcurrency.py cmakeFlags=" @@ -641,7 +641,7 @@ in stdenv.mkDerivation { cd $SWIFT_BUILD_ROOT/swift ninjaInstallPhase - ${lib.optionalString stdenv.isDarwin '' + ${lib.optionalString stdenv.hostPlatform.isDarwin '' cd $SWIFT_BUILD_ROOT/swift-concurrency-backdeploy installTargets=install-back-deployment ninjaInstallPhase @@ -669,20 +669,20 @@ in stdenv.mkDerivation { mkdir $lib/lib/swift/clang cp -P ${clang}/resource-root/* $lib/lib/swift/clang/ - ${lib.optionalString stdenv.isDarwin '' + ${lib.optionalString stdenv.hostPlatform.isDarwin '' # Install required library for ObjC interop. # TODO: Is there no source code for this available? cp -r ${CLTools_Executables}/usr/lib/arc $out/lib/arc ''} ''; - preFixup = lib.optionalString stdenv.isLinux '' + preFixup = lib.optionalString stdenv.hostPlatform.isLinux '' # This is cheesy, but helps the patchelf hook remove /build from RPATH. cd $SWIFT_BUILD_ROOT/.. mv build buildx ''; - postFixup = lib.optionalString stdenv.isDarwin '' + postFixup = lib.optionalString stdenv.hostPlatform.isDarwin '' # These libraries need to use the system install name. The official SDK # does the same (as opposed to using rpath). Presumably, they are part of # the stable ABI. Not using the system libraries at run-time is known to diff --git a/pkgs/development/compilers/swift/default.nix b/pkgs/development/compilers/swift/default.nix index e55465e952d5..76db695b08c3 100644 --- a/pkgs/development/compilers/swift/default.nix +++ b/pkgs/development/compilers/swift/default.nix @@ -25,7 +25,7 @@ let # # The following selects the correct Clang version, matching the version # used in Swift, and applies the same libc overrides as `apple_sdk.stdenv`. - clang = if pkgs.stdenv.isDarwin + clang = if pkgs.stdenv.hostPlatform.isDarwin then swiftLlvmPackages.clang.override rec { libc = apple_sdk.Libsystem; @@ -68,11 +68,11 @@ let useSwiftDriver = false; }; - Dispatch = if stdenv.isDarwin + Dispatch = if stdenv.hostPlatform.isDarwin then null # part of libsystem else callPackage ./libdispatch { swift = swiftNoSwiftDriver; }; - Foundation = if stdenv.isDarwin + Foundation = if stdenv.hostPlatform.isDarwin then apple_sdk.frameworks.Foundation else callPackage ./foundation { swift = swiftNoSwiftDriver; }; diff --git a/pkgs/development/compilers/swift/sourcekit-lsp/default.nix b/pkgs/development/compilers/swift/sourcekit-lsp/default.nix index f0c08a41e43e..2d1cd6dd0440 100644 --- a/pkgs/development/compilers/swift/sourcekit-lsp/default.nix +++ b/pkgs/development/compilers/swift/sourcekit-lsp/default.nix @@ -21,7 +21,7 @@ let # are part of libsystem. Adding its headers to the search path causes strange # mixing and errors. # TODO: Find a better way to prevent this conflict. - ncursesInput = if stdenv.isDarwin then ncurses.out else ncurses; + ncursesInput = if stdenv.hostPlatform.isDarwin then ncurses.out else ncurses; in stdenv.mkDerivation { pname = "sourcekit-lsp"; @@ -35,7 +35,7 @@ stdenv.mkDerivation { XCTest sqlite ncursesInput - ] ++ lib.optionals stdenv.isDarwin [ CryptoKit LocalAuthentication ]; + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ CryptoKit LocalAuthentication ]; configurePhase = generated.configure + '' swiftpmMakeMutable indexstore-db diff --git a/pkgs/development/compilers/swift/swift-docc/default.nix b/pkgs/development/compilers/swift/swift-docc/default.nix index 2645f07aa4ec..13595882241b 100644 --- a/pkgs/development/compilers/swift/swift-docc/default.nix +++ b/pkgs/development/compilers/swift/swift-docc/default.nix @@ -24,7 +24,7 @@ stdenv.mkDerivation { nativeBuildInputs = [ swift swiftpm ]; buildInputs = [ Foundation XCTest ] - ++ lib.optionals stdenv.isDarwin [ CryptoKit LocalAuthentication ]; + ++ lib.optionals stdenv.hostPlatform.isDarwin [ CryptoKit LocalAuthentication ]; configurePhase = generated.configure; diff --git a/pkgs/development/compilers/swift/swift-driver/default.nix b/pkgs/development/compilers/swift/swift-driver/default.nix index ca2b88046c86..03c7898fe112 100644 --- a/pkgs/development/compilers/swift/swift-driver/default.nix +++ b/pkgs/development/compilers/swift/swift-driver/default.nix @@ -19,7 +19,7 @@ let # are part of libsystem. Adding its headers to the search path causes strange # mixing and errors. # TODO: Find a better way to prevent this conflict. - ncursesInput = if stdenv.isDarwin then ncurses.out else ncurses; + ncursesInput = if stdenv.hostPlatform.isDarwin then ncurses.out else ncurses; in stdenv.mkDerivation { pname = "swift-driver"; diff --git a/pkgs/development/compilers/swift/swiftpm/default.nix b/pkgs/development/compilers/swift/swiftpm/default.nix index 712bc01777a5..b8d8d2fe7bba 100644 --- a/pkgs/development/compilers/swift/swiftpm/default.nix +++ b/pkgs/development/compilers/swift/swiftpm/default.nix @@ -81,7 +81,7 @@ let # Tools invoked by swiftpm at run-time. runtimeDeps = [ git ] - ++ lib.optionals stdenv.isDarwin [ + ++ lib.optionals stdenv.hostPlatform.isDarwin [ xcbuild.xcrun # These tools are part of cctools, but adding that as a build input puts # an unwrapped linker in PATH, and breaks builds. This small derivation @@ -99,13 +99,13 @@ let mkBootstrapDerivation = attrs: stdenv.mkDerivation (attrs // { nativeBuildInputs = (attrs.nativeBuildInputs or [ ]) ++ [ cmake ninja swift ] - ++ lib.optionals stdenv.isDarwin [ DarwinTools ]; + ++ lib.optionals stdenv.hostPlatform.isDarwin [ DarwinTools ]; buildInputs = (attrs.buildInputs or [ ]) ++ [ Foundation ]; postPatch = (attrs.postPatch or "") - + lib.optionalString stdenv.isDarwin '' + + lib.optionalString stdenv.hostPlatform.isDarwin '' # On Darwin only, Swift uses arm64 as cpu arch. if [ -e cmake/modules/SwiftSupport.cmake ]; then substituteInPlace cmake/modules/SwiftSupport.cmake \ @@ -121,7 +121,7 @@ let ''; postInstall = (attrs.postInstall or "") - + lib.optionalString stdenv.isDarwin '' + + lib.optionalString stdenv.hostPlatform.isDarwin '' # The install name of libraries is incorrectly set to lib/ (via our # CMake setup hook) instead of lib/swift/. This'd be easily fixed by # fixDarwinDylibNames, but some builds create libraries that reference @@ -149,7 +149,7 @@ let # are part of libsystem. Adding its headers to the search path causes strange # mixing and errors. # TODO: Find a better way to prevent this conflict. - ncursesInput = if stdenv.isDarwin then ncurses.out else ncurses; + ncursesInput = if stdenv.hostPlatform.isDarwin then ncurses.out else ncurses; # Derivations for bootstrapping dependencies using CMake. # This is based on the `swiftpm/Utilities/bootstrap` script. @@ -168,7 +168,7 @@ let src = generated.sources.swift-system; postInstall = cmakeGlue.SwiftSystem - + lib.optionalString (!stdenv.isDarwin) '' + + lib.optionalString (!stdenv.hostPlatform.isDarwin) '' # The cmake rules apparently only use the Darwin install convention. # Fix up the installation so the module can be found on non-Darwin. mkdir -p $out/${swiftStaticModuleSubdir} @@ -188,7 +188,7 @@ let ''; postInstall = cmakeGlue.SwiftCollections - + lib.optionalString (!stdenv.isDarwin) '' + + lib.optionalString (!stdenv.hostPlatform.isDarwin) '' # The cmake rules apparently only use the Darwin install convention. # Fix up the installation so the module can be found on non-Darwin. mkdir -p $out/${swiftStaticModuleSubdir} @@ -245,7 +245,7 @@ let ]; postInstall = cmakeGlue.ArgumentParser - + lib.optionalString stdenv.isLinux '' + + lib.optionalString stdenv.hostPlatform.isLinux '' # Fix rpath so ArgumentParserToolInfo can be found. patchelf --add-rpath "$out/lib/swift/${swiftOs}" \ $out/lib/swift/${swiftOs}/libArgumentParser.so @@ -266,7 +266,7 @@ let name = "llbuild"; src = generated.sources.swift-llbuild; - nativeBuildInputs = lib.optional stdenv.isDarwin xcbuild; + nativeBuildInputs = lib.optional stdenv.hostPlatform.isDarwin xcbuild; buildInputs = [ ncursesInput sqlite ]; patches = [ @@ -389,7 +389,7 @@ in stdenv.mkDerivation (commonAttrs // { sqlite XCTest ] - ++ lib.optionals stdenv.isDarwin [ + ++ lib.optionals stdenv.hostPlatform.isDarwin [ CryptoKit LocalAuthentication ]; diff --git a/pkgs/development/compilers/swift/xctest/default.nix b/pkgs/development/compilers/swift/xctest/default.nix index d50d11706cbd..f6f4cdacaed1 100644 --- a/pkgs/development/compilers/swift/xctest/default.nix +++ b/pkgs/development/compilers/swift/xctest/default.nix @@ -19,10 +19,10 @@ in stdenv.mkDerivation { outputs = [ "out" ]; nativeBuildInputs = [ cmake ninja swift ] - ++ lib.optional stdenv.isDarwin DarwinTools; # sw_vers + ++ lib.optional stdenv.hostPlatform.isDarwin DarwinTools; # sw_vers buildInputs = [ Foundation ]; - postPatch = lib.optionalString stdenv.isDarwin '' + postPatch = lib.optionalString stdenv.hostPlatform.isDarwin '' # On Darwin only, Swift uses arm64 as cpu arch. substituteInPlace cmake/modules/SwiftSupport.cmake \ --replace '"aarch64" PARENT_SCOPE' '"arm64" PARENT_SCOPE' @@ -34,9 +34,9 @@ in stdenv.mkDerivation { export MACOSX_DEPLOYMENT_TARGET=10.12 ''; - cmakeFlags = lib.optional stdenv.isDarwin "-DUSE_FOUNDATION_FRAMEWORK=ON"; + cmakeFlags = lib.optional stdenv.hostPlatform.isDarwin "-DUSE_FOUNDATION_FRAMEWORK=ON"; - postInstall = lib.optionalString stdenv.isDarwin '' + postInstall = lib.optionalString stdenv.hostPlatform.isDarwin '' # Darwin normally uses the Xcode version of XCTest. Installing # swift-corelibs-xctest is probably not officially supported, but we have # no alternative. Fix up the installation here. diff --git a/pkgs/development/compilers/temurin-bin/jdk-linux-base.nix b/pkgs/development/compilers/temurin-bin/jdk-linux-base.nix index 9da96aee8d5a..29cdf778f541 100644 --- a/pkgs/development/compilers/temurin-bin/jdk-linux-base.nix +++ b/pkgs/development/compilers/temurin-bin/jdk-linux-base.nix @@ -66,7 +66,7 @@ let xorg.libXrender xorg.libXtst zlib - ] ++ lib.optional stdenv.isAarch32 libffi; + ] ++ lib.optional stdenv.hostPlatform.isAarch32 libffi; nativeBuildInputs = [ autoPatchelfHook makeWrapper ]; diff --git a/pkgs/development/compilers/terra/default.nix b/pkgs/development/compilers/terra/default.nix index 1d50d6e23ddb..4193ab53164c 100644 --- a/pkgs/development/compilers/terra/default.nix +++ b/pkgs/development/compilers/terra/default.nix @@ -45,8 +45,8 @@ in stdenv.mkDerivation rec { nativeBuildInputs = [ cmake ]; buildInputs = [ llvmMerged ncurses libffi libxml2 ] ++ lib.optionals enableCUDA [ cuda ] - ++ lib.optional (!stdenv.isDarwin) libpfm - ++ lib.optionals stdenv.isDarwin [ libobjc Cocoa Foundation ]; + ++ lib.optional (!stdenv.hostPlatform.isDarwin) libpfm + ++ lib.optionals stdenv.hostPlatform.isDarwin [ libobjc Cocoa Foundation ]; cmakeFlags = let resourceDir = "${llvmMerged}/lib/clang/" + ( @@ -100,6 +100,6 @@ in stdenv.mkDerivation rec { # never built on aarch64-darwin since first introduction in nixpkgs # Linux Aarch64 broken above LLVM11 # https://github.com/terralang/terra/issues/597 - broken = stdenv.isAarch64; + broken = stdenv.hostPlatform.isAarch64; }; } diff --git a/pkgs/development/compilers/tinycc/default.nix b/pkgs/development/compilers/tinycc/default.nix index b36eb44229d1..65eea0a48e46 100644 --- a/pkgs/development/compilers/tinycc/default.nix +++ b/pkgs/development/compilers/tinycc/default.nix @@ -72,7 +72,7 @@ stdenv.mkDerivation (finalAttrs: { builtins.match "^[0-9]\\.+[0-9]+\\.[0-9]+" version != null; in '' ${ - if stdenv.isDarwin && ! versionIsClean finalAttrs.version + if stdenv.hostPlatform.isDarwin && ! versionIsClean finalAttrs.version then "echo 'not overwriting VERSION since it would upset ld'" else "echo ${finalAttrs.version} > VERSION" } @@ -89,7 +89,7 @@ stdenv.mkDerivation (finalAttrs: { checkTarget = "test"; # https://www.mail-archive.com/tinycc-devel@nongnu.org/msg10142.html - preCheck = lib.optionalString (stdenv.isDarwin && stdenv.isx86_64) '' + preCheck = lib.optionalString (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isx86_64) '' rm tests/tests2/{108,114}* ''; @@ -122,7 +122,7 @@ stdenv.mkDerivation (finalAttrs: { maintainers = with lib.maintainers; [ joachifm AndersonTorres ]; platforms = lib.platforms.unix; # https://www.mail-archive.com/tinycc-devel@nongnu.org/msg10199.html - broken = stdenv.isDarwin && stdenv.isAarch64; + broken = stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isAarch64; }; }) # TODO: more multiple outputs diff --git a/pkgs/development/compilers/tinygo/default.nix b/pkgs/development/compilers/tinygo/default.nix index a32e516633a8..386322780cca 100644 --- a/pkgs/development/compilers/tinygo/default.nix +++ b/pkgs/development/compilers/tinygo/default.nix @@ -54,7 +54,7 @@ buildGoModule rec { nativeCheckInputs = [ binaryen ]; nativeBuildInputs = [ makeWrapper lld ]; buildInputs = [ llvm clang.cc ] - ++ lib.optionals stdenv.isDarwin [ xar ]; + ++ lib.optionals stdenv.hostPlatform.isDarwin [ xar ]; doCheck = (stdenv.buildPlatform.canExecute stdenv.hostPlatform); inherit tinygoTests; @@ -112,7 +112,7 @@ buildGoModule rec { # GDB upstream does not support ARM darwin runtimeDeps = [ go clang.cc lld avrdude openocd binaryen ] - ++ lib.optionals (!(stdenv.isDarwin && stdenv.isAarch64)) [ gdb ]; + ++ lib.optionals (!(stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isAarch64)) [ gdb ]; installPhase = '' runHook preInstall diff --git a/pkgs/development/compilers/uasm/default.nix b/pkgs/development/compilers/uasm/default.nix index 21d9a2bf5d48..59332fa41f03 100644 --- a/pkgs/development/compilers/uasm/default.nix +++ b/pkgs/development/compilers/uasm/default.nix @@ -31,7 +31,7 @@ stdenv.mkDerivation rec { enableParallelBuilding = true; makefile = - if stdenv.isDarwin then + if stdenv.hostPlatform.isDarwin then "ClangOSX64.mak" else "gccLinux64.mak"; diff --git a/pkgs/development/compilers/unison/default.nix b/pkgs/development/compilers/unison/default.nix index 2dd2b7a15897..5a8e57d2131b 100644 --- a/pkgs/development/compilers/unison/default.nix +++ b/pkgs/development/compilers/unison/default.nix @@ -15,7 +15,7 @@ stdenv.mkDerivation (finalAttrs: { pname = "unison-code-manager"; version = "0.5.26"; - src = if stdenv.isDarwin then + src = if stdenv.hostPlatform.isDarwin then fetchurl { url = "https://github.com/unisonweb/unison/releases/download/release/${finalAttrs.version}/ucm-macos.tar.gz"; hash = "sha256-RF2Q5sCxT9F3IGM/8UP6bEe9sOjtpMVYHREuAPOzh8g="; @@ -32,8 +32,8 @@ stdenv.mkDerivation (finalAttrs: { dontConfigure = true; nativeBuildInputs = [ makeWrapper ] - ++ lib.optional (!stdenv.isDarwin) autoPatchelfHook; - buildInputs = lib.optionals (!stdenv.isDarwin) [ gmp ncurses6 zlib ]; + ++ lib.optional (!stdenv.hostPlatform.isDarwin) autoPatchelfHook; + buildInputs = lib.optionals (!stdenv.hostPlatform.isDarwin) [ gmp ncurses6 zlib ]; installPhase = '' mkdir -p $out/{bin,lib} diff --git a/pkgs/development/compilers/vala/default.nix b/pkgs/development/compilers/vala/default.nix index 1b880b61a05a..96b995d64b6c 100644 --- a/pkgs/development/compilers/vala/default.nix +++ b/pkgs/development/compilers/vala/default.nix @@ -50,7 +50,7 @@ let nativeBuildInputs = [ pkg-config flex bison libxslt gobject-introspection - ] ++ lib.optional (stdenv.isDarwin) expat + ] ++ lib.optional (stdenv.hostPlatform.isDarwin) expat ++ lib.optional disableGraphviz autoreconfHook # if we changed our ./configure script, need to reconfigure ++ lib.optionals (stdenv.buildPlatform != stdenv.hostPlatform) [ vala ] ++ extraNativeBuildInputs; diff --git a/pkgs/development/compilers/vlang/default.nix b/pkgs/development/compilers/vlang/default.nix index a0acfd263474..267f473274a5 100644 --- a/pkgs/development/compilers/vlang/default.nix +++ b/pkgs/development/compilers/vlang/default.nix @@ -19,7 +19,7 @@ let }; # patch the ptrace reference for darwin - installPhase = lib.optionalString stdenv.isDarwin '' + installPhase = lib.optionalString stdenv.hostPlatform.isDarwin '' substituteInPlace v.c \ --replace "#include " "${ptraceSubstitution}" '' + '' @@ -56,9 +56,9 @@ stdenv.mkDerivation { buildInputs = [ binaryen - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.Cocoa - ] ++ lib.optionals stdenv.isLinux [ + ] ++ lib.optionals stdenv.hostPlatform.isLinux [ xorg.libX11 xorg.libXau xorg.libXdmcp diff --git a/pkgs/development/compilers/yap/default.nix b/pkgs/development/compilers/yap/default.nix index db7d9b05b7fb..d58f2e9d728d 100644 --- a/pkgs/development/compilers/yap/default.nix +++ b/pkgs/development/compilers/yap/default.nix @@ -21,7 +21,7 @@ stdenv.mkDerivation rec { meta = { # the linux 32 bit build fails. - broken = (stdenv.isLinux && stdenv.isAarch64) || !stdenv.is64bit; + broken = (stdenv.hostPlatform.isLinux && stdenv.hostPlatform.isAarch64) || !stdenv.hostPlatform.is64bit; homepage = "http://www.dcc.fc.up.pt/~vsc/Yap/"; description = "ISO-compatible high-performance Prolog compiler"; license = lib.licenses.artistic2; diff --git a/pkgs/development/compilers/zig/0.12/default.nix b/pkgs/development/compilers/zig/0.12/default.nix index 1a730d4c0ce7..f359140df234 100644 --- a/pkgs/development/compilers/zig/0.12/default.nix +++ b/pkgs/development/compilers/zig/0.12/default.nix @@ -43,7 +43,7 @@ stdenv.mkDerivation (finalAttrs: { # /System/Library/CoreServices/.SystemVersionPlatform.plist to determine the # OS version. This causes the build to fail during stage 3 with # OSVersionDetectionFail when the sandbox is enabled. - __impureHostDeps = lib.optionals stdenv.isDarwin [ + __impureHostDeps = lib.optionals stdenv.hostPlatform.isDarwin [ "/System/Library/CoreServices/.SystemVersionPlatform.plist" "/System/Library/CoreServices/SystemVersion.plist" ]; diff --git a/pkgs/development/compilers/zig/0.13/default.nix b/pkgs/development/compilers/zig/0.13/default.nix index 43093c822f02..8ec68f20260f 100644 --- a/pkgs/development/compilers/zig/0.13/default.nix +++ b/pkgs/development/compilers/zig/0.13/default.nix @@ -43,7 +43,7 @@ stdenv.mkDerivation (finalAttrs: { # /System/Library/CoreServices/.SystemVersionPlatform.plist to determine the # OS version. This causes the build to fail during stage 3 with # OSVersionDetectionFail when the sandbox is enabled. - __impureHostDeps = lib.optionals stdenv.isDarwin [ + __impureHostDeps = lib.optionals stdenv.hostPlatform.isDarwin [ "/System/Library/CoreServices/.SystemVersionPlatform.plist" "/System/Library/CoreServices/SystemVersion.plist" ]; diff --git a/pkgs/development/compilers/zig/generic.nix b/pkgs/development/compilers/zig/generic.nix index cde1a61e3583..27c193c0567d 100644 --- a/pkgs/development/compilers/zig/generic.nix +++ b/pkgs/development/compilers/zig/generic.nix @@ -41,7 +41,7 @@ stdenv.mkDerivation (finalAttrs: { # /System/Library/CoreServices/.SystemVersionPlatform.plist to determine the # OS version. This causes the build to fail during stage 3 with # OSVersionDetectionFail when the sandbox is enabled. - __impureHostDeps = lib.optionals stdenv.isDarwin [ + __impureHostDeps = lib.optionals stdenv.hostPlatform.isDarwin [ "/System/Library/CoreServices/.SystemVersionPlatform.plist" "/System/Library/CoreServices/SystemVersion.plist" ]; diff --git a/pkgs/development/compilers/zulu/common.nix b/pkgs/development/compilers/zulu/common.nix index c9056236ea6a..f1d0f43325f4 100644 --- a/pkgs/development/compilers/zulu/common.nix +++ b/pkgs/development/compilers/zulu/common.nix @@ -16,7 +16,7 @@ # runtime dependencies , cups # runtime dependencies for GTK+ Look and Feel -, gtkSupport ? stdenv.isLinux +, gtkSupport ? stdenv.hostPlatform.isLinux , cairo , glib , gtk2 @@ -48,7 +48,7 @@ let gtk3 ] ++ lib.optionals (gtkSupport && lib.versionOlder dist.jdkVersion "17") [ gtk2 - ] ++ lib.optionals (stdenv.isLinux && enableJavaFX) [ + ] ++ lib.optionals (stdenv.hostPlatform.isLinux && enableJavaFX) [ ffmpeg.lib ]; @@ -75,12 +75,12 @@ let nativeBuildInputs = [ unzip - ] ++ lib.optionals stdenv.isLinux [ + ] ++ lib.optionals stdenv.hostPlatform.isLinux [ autoPatchelfHook makeWrapper ]; - buildInputs = lib.optionals stdenv.isLinux [ + buildInputs = lib.optionals stdenv.hostPlatform.isLinux [ alsa-lib # libasound.so wanted by lib/libjsound.so fontconfig freetype @@ -92,9 +92,9 @@ let xorg.libXtst xorg.libXxf86vm zlib - ] ++ lib.optionals (stdenv.isLinux && enableJavaFX) runtimeDependencies; + ] ++ lib.optionals (stdenv.hostPlatform.isLinux && enableJavaFX) runtimeDependencies; - autoPatchelfIgnoreMissingDeps = if (stdenv.isLinux && enableJavaFX) then [ + autoPatchelfIgnoreMissingDeps = if (stdenv.hostPlatform.isLinux && enableJavaFX) then [ "libavcodec*.so.*" "libavformat*.so.*" ] else null; @@ -126,7 +126,7 @@ let cat <> $out/nix-support/setup-hook if [ -z "\''${JAVA_HOME-}" ]; then export JAVA_HOME=$out; fi EOF - '' + lib.optionalString stdenv.isLinux '' + '' + lib.optionalString stdenv.hostPlatform.isLinux '' # We cannot use -exec since wrapProgram is a function but not a command. # # jspawnhelper is executed from JVM, so it doesn't need to wrap it, and it @@ -138,14 +138,14 @@ let done '' # FIXME: move all of the above to installPhase. - + lib.optionalString stdenv.isLinux '' + + lib.optionalString stdenv.hostPlatform.isLinux '' find "$out" -name libfontmanager.so -exec \ patchelf --add-needed libfontconfig.so {} \; ''; # fixupPhase is moving the man to share/man which breaks it because it's a # relative symlink. - postFixup = lib.optionalString stdenv.isDarwin '' + postFixup = lib.optionalString stdenv.hostPlatform.isDarwin '' ln -nsf ../zulu-${lib.versions.major version}.jdk/Contents/Home/man $out/share/man ''; diff --git a/pkgs/development/embedded/arduino/arduino-language-server/default.nix b/pkgs/development/embedded/arduino/arduino-language-server/default.nix index 6c0a2885b433..d1be96454eec 100644 --- a/pkgs/development/embedded/arduino/arduino-language-server/default.nix +++ b/pkgs/development/embedded/arduino/arduino-language-server/default.nix @@ -26,7 +26,7 @@ buildGoModule rec { "-w" "-X github.com/arduino/arduino-language-server/version.versionString=${version}" "-X github.com/arduino/arduino-language-server/version.commit=unknown" - ] ++ lib.optionals stdenv.isLinux [ + ] ++ lib.optionals stdenv.hostPlatform.isLinux [ "-extldflags '-static'" ]; diff --git a/pkgs/development/embedded/blisp/default.nix b/pkgs/development/embedded/blisp/default.nix index ba1f42a90b0d..b6add8db9b8a 100644 --- a/pkgs/development/embedded/blisp/default.nix +++ b/pkgs/development/embedded/blisp/default.nix @@ -25,14 +25,14 @@ stdenv.mkDerivation (finalAttrs: { buildInputs = [ argtable libserialport - ] ++ lib.optional stdenv.isDarwin IOKit; + ] ++ lib.optional stdenv.hostPlatform.isDarwin IOKit; cmakeFlags = [ "-DBLISP_BUILD_CLI=ON" "-DBLISP_USE_SYSTEM_LIBRARIES=ON" ]; - env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.isDarwin "-Wno-error=implicit-function-declaration"; + env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.hostPlatform.isDarwin "-Wno-error=implicit-function-declaration"; passthru.tests.version = testers.testVersion { package = finalAttrs.finalPackage; diff --git a/pkgs/development/embedded/bossa/default.nix b/pkgs/development/embedded/bossa/default.nix index 3f55ccdd2e8b..f50b91ddbb09 100644 --- a/pkgs/development/embedded/bossa/default.nix +++ b/pkgs/development/embedded/bossa/default.nix @@ -51,7 +51,7 @@ stdenv.mkDerivation rec { wxGTK32 libX11 readline - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.Cocoa ]; diff --git a/pkgs/development/embedded/easypdkprog/default.nix b/pkgs/development/embedded/easypdkprog/default.nix index 28f06db9f35d..4e9b8f1722bc 100644 --- a/pkgs/development/embedded/easypdkprog/default.nix +++ b/pkgs/development/embedded/easypdkprog/default.nix @@ -13,7 +13,7 @@ stdenv.mkDerivation rec { installPhase = '' install -Dm755 -t $out/bin easypdkprog - '' + lib.optionalString stdenv.isLinux '' + '' + lib.optionalString stdenv.hostPlatform.isLinux '' install -Dm644 -t $out/etc/udev/rules.d Linux_udevrules/70-stm32vcp.rules ''; diff --git a/pkgs/development/embedded/edl/default.nix b/pkgs/development/embedded/edl/default.nix index 570fda02d8e5..77ac43762492 100644 --- a/pkgs/development/embedded/edl/default.nix +++ b/pkgs/development/embedded/edl/default.nix @@ -57,6 +57,6 @@ python3Packages.buildPythonPackage { xddxdd ]; # Case-sensitive files in 'Loader' submodule - broken = stdenv.isDarwin; + broken = stdenv.hostPlatform.isDarwin; }; } diff --git a/pkgs/development/embedded/elf2uf2-rs/default.nix b/pkgs/development/embedded/elf2uf2-rs/default.nix index b3091df1e3f6..239ffbbeb96b 100644 --- a/pkgs/development/embedded/elf2uf2-rs/default.nix +++ b/pkgs/development/embedded/elf2uf2-rs/default.nix @@ -13,8 +13,8 @@ rustPlatform.buildRustPackage rec { pkg-config ]; - buildInputs = lib.optional stdenv.isLinux udev - ++ lib.optionals stdenv.isDarwin [ + buildInputs = lib.optional stdenv.hostPlatform.isLinux udev + ++ lib.optionals stdenv.hostPlatform.isDarwin [ CoreFoundation DiskArbitration Foundation diff --git a/pkgs/development/embedded/fpga/ecpdap/default.nix b/pkgs/development/embedded/fpga/ecpdap/default.nix index ef1ba75c45b1..6d43f107563a 100644 --- a/pkgs/development/embedded/fpga/ecpdap/default.nix +++ b/pkgs/development/embedded/fpga/ecpdap/default.nix @@ -16,7 +16,7 @@ rustPlatform.buildRustPackage rec { nativeBuildInputs = [ pkg-config ]; buildInputs = [ libusb1 ] - ++ lib.optional stdenv.isDarwin AppKit; + ++ lib.optional stdenv.hostPlatform.isDarwin AppKit; postInstall = '' mkdir -p $out/etc/udev/rules.d diff --git a/pkgs/development/embedded/fpga/fujprog/default.nix b/pkgs/development/embedded/fpga/fujprog/default.nix index 69c23f2a71cd..bdac1033053a 100644 --- a/pkgs/development/embedded/fpga/fujprog/default.nix +++ b/pkgs/development/embedded/fpga/fujprog/default.nix @@ -26,7 +26,7 @@ stdenv.mkDerivation rec { buildInputs = [ libftdi1 libusb-compat-0_1 - ] ++ lib.optionals stdenv.isDarwin [ IOKit ]; + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ IOKit ]; meta = with lib; { description = "JTAG programmer for the ULX3S and ULX2S open hardware FPGA development boards"; diff --git a/pkgs/development/embedded/fpga/trellis/default.nix b/pkgs/development/embedded/fpga/trellis/default.nix index b652f57fa81a..5726465311e5 100644 --- a/pkgs/development/embedded/fpga/trellis/default.nix +++ b/pkgs/development/embedded/fpga/trellis/default.nix @@ -42,7 +42,7 @@ in stdenv.mkDerivation rec { cd libtrellis ''; - postInstall = lib.optionalString stdenv.isDarwin '' + postInstall = lib.optionalString stdenv.hostPlatform.isDarwin '' for f in $out/bin/* ; do install_name_tool -change "$out/lib/libtrellis.dylib" "$out/lib/trellis/libtrellis.dylib" "$f" done diff --git a/pkgs/development/embedded/openocd/default.nix b/pkgs/development/embedded/openocd/default.nix index 366d1ed832c2..86dfd687ed2f 100644 --- a/pkgs/development/embedded/openocd/default.nix +++ b/pkgs/development/embedded/openocd/default.nix @@ -33,7 +33,7 @@ stdenv.mkDerivation rec { ++ lib.optionals notWindows [ hidapi jimtcl libftdi1 libjaylink ] ++ # tracking issue for v2 api changes https://sourceforge.net/p/openocd/tickets/306/ - lib.optional stdenv.isLinux libgpiod_1; + lib.optional stdenv.hostPlatform.isLinux libgpiod_1; configureFlags = [ "--disable-werror" @@ -41,8 +41,8 @@ stdenv.mkDerivation rec { "--enable-remote-bitbang" (lib.enableFeature notWindows "buspirate") (lib.enableFeature (notWindows && enableFtdi) "ftdi") - (lib.enableFeature stdenv.isLinux "linuxgpiod") - (lib.enableFeature stdenv.isLinux "sysfsgpio") + (lib.enableFeature stdenv.hostPlatform.isLinux "linuxgpiod") + (lib.enableFeature stdenv.hostPlatform.isLinux "sysfsgpio") (lib.enableFeature isWindows "internal-jimtcl") (lib.enableFeature isWindows "internal-libjaylink") ] ++ @@ -56,7 +56,7 @@ stdenv.mkDerivation rec { "-Wno-error=strict-prototypes" # fixes build failure with hidapi 0.10.0 ]); - postInstall = lib.optionalString stdenv.isLinux '' + postInstall = lib.optionalString stdenv.hostPlatform.isLinux '' mkdir -p "$out/etc/udev/rules.d" rules="$out/share/openocd/contrib/60-openocd.rules" if [ ! -f "$rules" ]; then diff --git a/pkgs/development/embedded/platformio/core.nix b/pkgs/development/embedded/platformio/core.nix index 6890a2b1b35e..eb20e0f6a3e7 100644 --- a/pkgs/development/embedded/platformio/core.nix +++ b/pkgs/development/embedded/platformio/core.nix @@ -79,7 +79,7 @@ with python3Packages; buildPythonApplication rec { uvicorn wsproto zeroconf - ] ++ lib.optionals (stdenv.isDarwin && stdenv.isAarch64) [ + ] ++ lib.optionals (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isAarch64) [ chardet ]; diff --git a/pkgs/development/gnuradio-modules/ais/default.nix b/pkgs/development/gnuradio-modules/ais/default.nix index 66a6e82fff8b..a86fce043d97 100644 --- a/pkgs/development/gnuradio-modules/ais/default.nix +++ b/pkgs/development/gnuradio-modules/ais/default.nix @@ -60,7 +60,7 @@ mkDerivation rec { platforms = platforms.unix; # rpcserver_aggregator.h:111:54: error: no template named 'unary_function' # in namespace 'std'; did you mean '__unary_function'? - broken = stdenv.isDarwin; + broken = stdenv.hostPlatform.isDarwin; maintainers = with maintainers; [ mog ]; }; } diff --git a/pkgs/development/gnuradio-modules/osmosdr/default.nix b/pkgs/development/gnuradio-modules/osmosdr/default.nix index dbf7513cacc1..663ffafd7f3b 100644 --- a/pkgs/development/gnuradio-modules/osmosdr/default.nix +++ b/pkgs/development/gnuradio-modules/osmosdr/default.nix @@ -71,7 +71,7 @@ in mkDerivation { ] ++ lib.optionals (gnuradio.hasFeature "python-support") [ python.pkgs.numpy python.pkgs.pybind11 - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.IOKit darwin.apple_sdk.frameworks.Security ]; diff --git a/pkgs/development/guile-modules/guile-gcrypt/default.nix b/pkgs/development/guile-modules/guile-gcrypt/default.nix index ff31b009da31..3b6aa220ae92 100644 --- a/pkgs/development/guile-modules/guile-gcrypt/default.nix +++ b/pkgs/development/guile-modules/guile-gcrypt/default.nix @@ -34,7 +34,7 @@ stdenv.mkDerivation rec { doCheck = true; # In procedure bytevector-u8-ref: Argument 2 out of range - dontStrip = stdenv.isDarwin; + dontStrip = stdenv.hostPlatform.isDarwin; meta = with lib; { description = "Bindings to Libgcrypt for GNU Guile"; diff --git a/pkgs/development/guile-modules/guile-git/default.nix b/pkgs/development/guile-modules/guile-git/default.nix index b91d13a63745..f092238929bf 100644 --- a/pkgs/development/guile-modules/guile-git/default.nix +++ b/pkgs/development/guile-modules/guile-git/default.nix @@ -30,7 +30,7 @@ stdenv.mkDerivation rec { propagatedBuildInputs = [ libgit2 scheme-bytestructures ]; - doCheck = !stdenv.isDarwin; + doCheck = !stdenv.hostPlatform.isDarwin; makeFlags = [ "GUILE_AUTO_COMPILE=0" ]; enableParallelBuilding = true; diff --git a/pkgs/development/guile-modules/guile-lib/default.nix b/pkgs/development/guile-modules/guile-lib/default.nix index 1e5ddbd49143..5143c959ccd5 100644 --- a/pkgs/development/guile-modules/guile-lib/default.nix +++ b/pkgs/development/guile-modules/guile-lib/default.nix @@ -35,7 +35,7 @@ stdenv.mkDerivation rec { makeFlags = [ "GUILE_AUTO_COMPILE=0" ]; - doCheck = !stdenv.isDarwin; + doCheck = !stdenv.hostPlatform.isDarwin; preCheck = '' # Make `libgcc_s.so' visible for `pthread_cancel'. diff --git a/pkgs/development/guile-modules/guile-ssh/default.nix b/pkgs/development/guile-modules/guile-ssh/default.nix index a1928c78ce75..ad3a8c547442 100644 --- a/pkgs/development/guile-modules/guile-ssh/default.nix +++ b/pkgs/development/guile-modules/guile-ssh/default.nix @@ -49,7 +49,7 @@ stdenv.mkDerivation (finalAttrs: { enableParallelBuilding = true; # FAIL: server-client.scm - doCheck = !stdenv.isDarwin; + doCheck = !stdenv.hostPlatform.isDarwin; postInstall = '' mv $out/bin/*.scm $out/share/guile-ssh diff --git a/pkgs/development/haskell-modules/configuration-common.nix b/pkgs/development/haskell-modules/configuration-common.nix index 3abbd578e5c4..e1d70248acfb 100644 --- a/pkgs/development/haskell-modules/configuration-common.nix +++ b/pkgs/development/haskell-modules/configuration-common.nix @@ -387,7 +387,7 @@ self: super: { numerals-base = dontCheck (doJailbreak super.numerals-base); # This test keeps being aborted because it runs too quietly for too long - Lazy-Pbkdf2 = if pkgs.stdenv.isi686 then dontCheck super.Lazy-Pbkdf2 else super.Lazy-Pbkdf2; + Lazy-Pbkdf2 = if pkgs.stdenv.hostPlatform.isi686 then dontCheck super.Lazy-Pbkdf2 else super.Lazy-Pbkdf2; # check requires mysql server mysql-simple = dontCheck super.mysql-simple; @@ -901,12 +901,12 @@ self: super: { Cabal-ide-backend = dontCheck super.Cabal-ide-backend; # This package can't be built on non-Windows systems. - Win32 = overrideCabal (drv: { broken = !pkgs.stdenv.isCygwin; }) super.Win32; + Win32 = overrideCabal (drv: { broken = !pkgs.stdenv.hostPlatform.isCygwin; }) super.Win32; inline-c-win32 = dontDistribute super.inline-c-win32; Southpaw = dontDistribute super.Southpaw; # https://ghc.haskell.org/trac/ghc/ticket/9825 - vimus = overrideCabal (drv: { broken = pkgs.stdenv.isLinux && pkgs.stdenv.isi686; }) super.vimus; + vimus = overrideCabal (drv: { broken = pkgs.stdenv.hostPlatform.isLinux && pkgs.stdenv.hostPlatform.isi686; }) super.vimus; # https://github.com/kazu-yamamoto/logger/issues/42 logger = dontCheck super.logger; diff --git a/pkgs/development/haskell-modules/configuration-darwin.nix b/pkgs/development/haskell-modules/configuration-darwin.nix index 5933627583a6..0c5b9106643e 100644 --- a/pkgs/development/haskell-modules/configuration-darwin.nix +++ b/pkgs/development/haskell-modules/configuration-darwin.nix @@ -359,7 +359,7 @@ self: super: ({ ''; }) super.di-core; -} // lib.optionalAttrs pkgs.stdenv.isAarch64 { # aarch64-darwin +} // lib.optionalAttrs pkgs.stdenv.hostPlatform.isAarch64 { # aarch64-darwin # Workarounds for justStaticExecutables on aarch64-darwin. Since dead code # elimination barely works on aarch64-darwin, any package that has a @@ -429,7 +429,7 @@ self: super: ({ rivet-adaptor-postgresql = dontCheck super.rivet-adaptor-postgresql; tmp-proc-postgres = dontCheck super.tmp-proc-postgres; -} // lib.optionalAttrs pkgs.stdenv.isx86_64 { # x86_64-darwin +} // lib.optionalAttrs pkgs.stdenv.hostPlatform.isx86_64 { # x86_64-darwin # tests appear to be failing to link or something: # https://hydra.nixos.org/build/174540882/nixlog/9 diff --git a/pkgs/development/haskell-modules/configuration-nix.nix b/pkgs/development/haskell-modules/configuration-nix.nix index 8477d68dfaf5..6400e5246aea 100644 --- a/pkgs/development/haskell-modules/configuration-nix.nix +++ b/pkgs/development/haskell-modules/configuration-nix.nix @@ -300,7 +300,7 @@ self: super: builtins.intersectAttrs super { [ (disableHardening ["fortify"]) (addBuildTool self.buildHaskellPackages.gtk2hs-buildtools) ] ++ - ( if pkgs.stdenv.isDarwin then [(appendConfigureFlag "-fhave-quartz-gtk")] else [] ) + ( if pkgs.stdenv.hostPlatform.isDarwin then [(appendConfigureFlag "-fhave-quartz-gtk")] else [] ) ); gtksourceview2 = addPkgconfigDepend pkgs.gtk2 super.gtksourceview2; gtk-traymanager = addPkgconfigDepend pkgs.gtk3 super.gtk-traymanager; @@ -585,7 +585,7 @@ self: super: builtins.intersectAttrs super { # # Additional note: nixpkgs' freeglut and macOS's OpenGL implementation do not cooperate, # so disable this on Darwin only - ${if pkgs.stdenv.isDarwin then null else "GLUT"} = overrideCabal (drv: { + ${if pkgs.stdenv.hostPlatform.isDarwin then null else "GLUT"} = overrideCabal (drv: { pkg-configDepends = drv.pkg-configDepends or [] ++ [ pkgs.freeglut ]; @@ -823,9 +823,9 @@ self: super: builtins.intersectAttrs super { # https://git-annex.branchable.com/git-annex-shell/ passthru.shellPath = "/bin/git-annex-shell"; }) (super.git-annex.override { - dbus = if pkgs.stdenv.isLinux then self.dbus else null; - fdo-notify = if pkgs.stdenv.isLinux then self.fdo-notify else null; - hinotify = if pkgs.stdenv.isLinux then self.hinotify else self.fsnotify; + dbus = if pkgs.stdenv.hostPlatform.isLinux then self.dbus else null; + fdo-notify = if pkgs.stdenv.hostPlatform.isLinux then self.fdo-notify else null; + hinotify = if pkgs.stdenv.hostPlatform.isLinux then self.hinotify else self.fsnotify; }); # The test suite has undeclared dependencies on git. diff --git a/pkgs/development/haskell-modules/generic-builder.nix b/pkgs/development/haskell-modules/generic-builder.nix index 23dc5054a854..92c2451a5df1 100644 --- a/pkgs/development/haskell-modules/generic-builder.nix +++ b/pkgs/development/haskell-modules/generic-builder.nix @@ -53,7 +53,7 @@ in # TODO enable shared libs for cross-compiling , enableSharedExecutables ? false , enableSharedLibraries ? !stdenv.hostPlatform.isStatic && (ghc.enableShared or false) -, enableDeadCodeElimination ? (!stdenv.isDarwin) # TODO: use -dead_strip for darwin +, enableDeadCodeElimination ? (!stdenv.hostPlatform.isDarwin) # TODO: use -dead_strip for darwin # Disabling this for ghcjs prevents this crash: https://gitlab.haskell.org/ghc/ghc/-/issues/23235 , enableStaticLibraries ? !(stdenv.hostPlatform.isWindows || stdenv.hostPlatform.isWasm || stdenv.hostPlatform.isGhcjs) , enableHsc2hsViaAsm ? stdenv.hostPlatform.isWindows @@ -242,8 +242,8 @@ let "--with-gcc=$CC" # Clang won't work without that extra information. ] ++ [ "--package-db=$packageConfDir" - (optionalString (enableSharedExecutables && stdenv.isLinux) "--ghc-option=-optl=-Wl,-rpath=$out/${ghcLibdir}/${pname}-${version}") - (optionalString (enableSharedExecutables && stdenv.isDarwin) "--ghc-option=-optl=-Wl,-headerpad_max_install_names") + (optionalString (enableSharedExecutables && stdenv.hostPlatform.isLinux) "--ghc-option=-optl=-Wl,-rpath=$out/${ghcLibdir}/${pname}-${version}") + (optionalString (enableSharedExecutables && stdenv.hostPlatform.isDarwin) "--ghc-option=-optl=-Wl,-headerpad_max_install_names") (optionalString enableParallelBuilding (makeGhcOptions [ "-j$NIX_BUILD_CORES" "+RTS" "-A64M" "-RTS" ])) (optionalString useCpphs ("--with-cpphs=${cpphs}/bin/cpphs " + (makeGhcOptions [ "-cpp" "-pgmP${cpphs}/bin/cpphs" "-optP--cpp" ]))) (enableFeature enableLibraryProfiling "library-profiling") @@ -501,7 +501,7 @@ stdenv.mkDerivation ({ # the `$out/lib/links` directory to read-only when the build is done after the # dist directory has already been exported, which triggers an unnecessary # rebuild of modules included in the exported dist directory. - + (optionalString (stdenv.isDarwin && (enableSharedLibraries || enableSharedExecutables) && !enableSeparateIntermediatesOutput) '' + + (optionalString (stdenv.hostPlatform.isDarwin && (enableSharedLibraries || enableSharedExecutables) && !enableSeparateIntermediatesOutput) '' # Work around a limit in the macOS Sierra linker on the number of paths # referenced by any one dynamic library: # diff --git a/pkgs/development/interpreters/bats/default.nix b/pkgs/development/interpreters/bats/default.nix index 17d22a14cae5..1cdf6369914d 100644 --- a/pkgs/development/interpreters/bats/default.nix +++ b/pkgs/development/interpreters/bats/default.nix @@ -69,7 +69,7 @@ resholve.mkDerivation rec { external = [ "greadlink" "shlock" - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ "pkill" # procps doesn't supply this on darwin ]; }; @@ -119,7 +119,7 @@ resholve.mkDerivation rec { "cannot:libexec/bats-core/bats-exec-file" "cannot:libexec/bats-core/bats-exec-suite" "cannot:libexec/bats-core/bats-gather-tests" - ] ++ lib.optionals (!stdenv.isDarwin) [ + ] ++ lib.optionals (!stdenv.hostPlatform.isDarwin) [ # checked invocations for exec "cannot:${procps}/bin/pkill" ]; @@ -196,7 +196,7 @@ resholve.mkDerivation rec { parallel # skips some tests if it can't detect flock # skips some tests if it can't detect procps - ] ++ lib.optionals stdenv.isDarwin [ lsof ]; + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ lsof ]; inherit doInstallCheck; installCheckPhase = '' # TODO: cut if https://github.com/bats-core/bats-core/issues/418 allows @@ -225,7 +225,7 @@ resholve.mkDerivation rec { # aren't massive builds) inherit bash-preexec locate-dominating-file packcc; resholve = resholve.tests.cli; - } // lib.optionalAttrs (!stdenv.isDarwin) { + } // lib.optionalAttrs (!stdenv.hostPlatform.isDarwin) { # TODO: kikit's kicad dependency is marked broken on darwin atm # may be able to fold this up if that resolves. inherit kikit; diff --git a/pkgs/development/interpreters/bic/default.nix b/pkgs/development/interpreters/bic/default.nix index 669cb4f723ac..1571e93e071f 100644 --- a/pkgs/development/interpreters/bic/default.nix +++ b/pkgs/development/interpreters/bic/default.nix @@ -40,6 +40,6 @@ stdenv.mkDerivation rec { platforms = platforms.unix; maintainers = with maintainers; [ hexagonal-sun ]; # never built on aarch64-darwin since first introduction in nixpkgs - broken = stdenv.isDarwin && stdenv.isAarch64; + broken = stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isAarch64; }; } diff --git a/pkgs/development/interpreters/chibi/default.nix b/pkgs/development/interpreters/chibi/default.nix index b220ed834029..9cdd21a6b955 100644 --- a/pkgs/development/interpreters/chibi/default.nix +++ b/pkgs/development/interpreters/chibi/default.nix @@ -20,7 +20,7 @@ stdenv.mkDerivation rec { fixupPhase = '' wrapProgram "$out/bin/chibi-scheme" \ --prefix CHIBI_MODULE_PATH : "$out/share/chibi:$out/lib/chibi" \ - ${lib.optionalString stdenv.isDarwin "--prefix DYLD_LIBRARY_PATH : $out/lib"} + ${lib.optionalString stdenv.hostPlatform.isDarwin "--prefix DYLD_LIBRARY_PATH : $out/lib"} for f in chibi-doc chibi-ffi snow-chibi; do substituteInPlace "$out/bin/$f" \ diff --git a/pkgs/development/interpreters/cling/default.nix b/pkgs/development/interpreters/cling/default.nix index f1cbd213b871..86e43de5945a 100644 --- a/pkgs/development/interpreters/cling/default.nix +++ b/pkgs/development/interpreters/cling/default.nix @@ -26,7 +26,7 @@ # Build with libc++ (LLVM) rather than stdlibc++ (GCC). # This is experimental and not all features work. -, useLLVMLibcxx ? clangStdenv.isDarwin +, useLLVMLibcxx ? clangStdenv.hostPlatform.isDarwin }: let @@ -97,7 +97,7 @@ let CPPFLAGS = if useLLVMLibcxx then [ "-stdlib=libc++" ] else []; - postInstall = lib.optionalString (!stdenv.isDarwin) '' + postInstall = lib.optionalString (!stdenv.hostPlatform.isDarwin) '' mkdir -p $out/share/Jupyter cp -r /build/clang/tools/cling/tools/Jupyter/kernel $out/share/Jupyter ''; diff --git a/pkgs/development/interpreters/clisp/default.nix b/pkgs/development/interpreters/clisp/default.nix index f6218ef8f3b2..c0f0e2c5c2f8 100644 --- a/pkgs/development/interpreters/clisp/default.nix +++ b/pkgs/development/interpreters/clisp/default.nix @@ -33,7 +33,7 @@ "pcre" "rawsock" ] - ++ lib.optionals stdenv.isLinux [ "bindings/glibc" "zlib" ] + ++ lib.optionals stdenv.hostPlatform.isLinux [ "bindings/glibc" "zlib" ] ++ lib.optional x11Support "clx/new-clx" }: @@ -41,7 +41,7 @@ assert x11Support -> (libX11 != null && libXau != null && libXt != null && libXpm != null && xorgproto != null && libXext != null); let - ffcallAvailable = stdenv.isLinux && (libffcall != null); + ffcallAvailable = stdenv.hostPlatform.isLinux && (libffcall != null); # Some modules need autoreconf called in their directory. shouldReconfModule = name: name != "asdf"; in @@ -85,7 +85,7 @@ stdenv.mkDerivation { find . -type f | xargs sed -e 's/-lICE/-lXau &/' -i ''; - preConfigure = lib.optionalString stdenv.isDarwin ('' + preConfigure = lib.optionalString stdenv.hostPlatform.isDarwin ('' ( cd src autoreconf -f -i -I m4 -I glm4 @@ -121,7 +121,7 @@ stdenv.mkDerivation { (''./clisp-link add "$out"/lib/clisp*/base "$(dirname "$out"/lib/clisp*/base)"/full'' + lib.concatMapStrings (x: " " + x) withModules); - env.NIX_CFLAGS_COMPILE = "-O0 -falign-functions=${if stdenv.is64bit then "8" else "4"}"; + env.NIX_CFLAGS_COMPILE = "-O0 -falign-functions=${if stdenv.hostPlatform.is64bit then "8" else "4"}"; meta = { description = "ANSI Common Lisp Implementation"; diff --git a/pkgs/development/interpreters/cyber/default.nix b/pkgs/development/interpreters/cyber/default.nix index 2ef863de5dfa..19d266da0e41 100644 --- a/pkgs/development/interpreters/cyber/default.nix +++ b/pkgs/development/interpreters/cyber/default.nix @@ -34,6 +34,6 @@ stdenv.mkDerivation rec { license = licenses.mit; maintainers = with maintainers; [ figsoda ]; inherit (zig_0_11.meta) platforms; - broken = stdenv.isDarwin; + broken = stdenv.hostPlatform.isDarwin; }; } diff --git a/pkgs/development/interpreters/cyclone/default.nix b/pkgs/development/interpreters/cyclone/default.nix index 643ee3a63216..75a4b763ae7d 100644 --- a/pkgs/development/interpreters/cyclone/default.nix +++ b/pkgs/development/interpreters/cyclone/default.nix @@ -15,7 +15,7 @@ let enableParallelBuilding = true; - nativeBuildInputs = lib.optionals stdenv.isDarwin [ cctools ]; + nativeBuildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ cctools ]; buildInputs = [ libck ]; @@ -36,7 +36,7 @@ stdenv.mkDerivation { enableParallelBuilding = true; nativeBuildInputs = [ bootstrap ] - ++ lib.optionals stdenv.isDarwin [ cctools ]; + ++ lib.optionals stdenv.hostPlatform.isDarwin [ cctools ]; buildInputs = [ libck ]; diff --git a/pkgs/development/interpreters/dzaima-apl/default.nix b/pkgs/development/interpreters/dzaima-apl/default.nix index 75e49ed602df..a607fb0fefe4 100644 --- a/pkgs/development/interpreters/dzaima-apl/default.nix +++ b/pkgs/development/interpreters/dzaima-apl/default.nix @@ -64,7 +64,7 @@ stdenv.mkDerivation rec { license = licenses.mit; maintainers = with maintainers; [ AndersonTorres ]; inherit (jdk.meta) platforms; - broken = stdenv.isDarwin; # never built on Hydra https://hydra.nixos.org/job/nixpkgs/staging-next/dapl-native.x86_64-darwin + broken = stdenv.hostPlatform.isDarwin; # never built on Hydra https://hydra.nixos.org/job/nixpkgs/staging-next/dapl-native.x86_64-darwin }; } # TODO: Processing app diff --git a/pkgs/development/interpreters/erlang/generic-builder.nix b/pkgs/development/interpreters/erlang/generic-builder.nix index b5502a036247..38af8a6e0926 100644 --- a/pkgs/development/interpreters/erlang/generic-builder.nix +++ b/pkgs/development/interpreters/erlang/generic-builder.nix @@ -74,7 +74,7 @@ , meta ? { } }: -assert wxSupport -> (if stdenv.isDarwin +assert wxSupport -> (if stdenv.hostPlatform.isDarwin then wxGTK != null else libGL != null && libGLU != null && wxGTK != null && xorg != null); @@ -84,7 +84,7 @@ assert ex_docSupport -> ex_doc != null; let inherit (lib) optional optionals optionalAttrs optionalString; - wxPackages2 = if stdenv.isDarwin then [ wxGTK ] else wxPackages; + wxPackages2 = if stdenv.hostPlatform.isDarwin then [ wxGTK ] else wxPackages; in stdenv.mkDerivation ({ @@ -105,7 +105,7 @@ stdenv.mkDerivation ({ ++ optionals odbcSupport odbcPackages ++ optionals javacSupport javacPackages ++ optional systemdSupport systemd - ++ optionals stdenv.isDarwin (with pkgs.darwin.apple_sdk.frameworks; [ AGL Carbon Cocoa WebKit ]); + ++ optionals stdenv.hostPlatform.isDarwin (with pkgs.darwin.apple_sdk.frameworks; [ AGL Carbon Cocoa WebKit ]); debugInfo = enableDebugInfo; @@ -148,9 +148,9 @@ stdenv.mkDerivation ({ ++ optional odbcSupport "--with-odbc=${unixODBC}" ++ optional wxSupport "--enable-wx" ++ optional systemdSupport "--enable-systemd" - ++ optional stdenv.isDarwin "--enable-darwin-64bit" + ++ optional stdenv.hostPlatform.isDarwin "--enable-darwin-64bit" # make[3]: *** [yecc.beam] Segmentation fault: 11 - ++ optional (stdenv.isDarwin && stdenv.isx86_64) "--disable-jit" + ++ optional (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isx86_64) "--disable-jit" ++ configureFlags; # install-docs will generate and install manpages and html docs diff --git a/pkgs/development/interpreters/evcxr/default.nix b/pkgs/development/interpreters/evcxr/default.nix index 6d64e76b816c..a95e45fc6536 100644 --- a/pkgs/development/interpreters/evcxr/default.nix +++ b/pkgs/development/interpreters/evcxr/default.nix @@ -17,7 +17,7 @@ rustPlatform.buildRustPackage rec { RUST_SRC_PATH = "${rustPlatform.rustLibSrc}"; nativeBuildInputs = [ pkg-config makeWrapper cmake ]; - buildInputs = lib.optionals stdenv.isDarwin + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ libiconv CoreServices Security ]; checkFlags = [ diff --git a/pkgs/development/interpreters/femtolisp/default.nix b/pkgs/development/interpreters/femtolisp/default.nix index 7bf0ea7c7540..3e35f7edc657 100644 --- a/pkgs/development/interpreters/femtolisp/default.nix +++ b/pkgs/development/interpreters/femtolisp/default.nix @@ -34,7 +34,7 @@ stdenv.mkDerivation { homepage = "https://git.sr.ht/~ft/femtolisp"; license = with lib.licenses; [ mit bsd3 ]; maintainers = with lib.maintainers; [ moody ]; - broken = stdenv.isDarwin; + broken = stdenv.hostPlatform.isDarwin; platforms = lib.platforms.unix; mainProgram = "flisp"; }; diff --git a/pkgs/development/interpreters/gauche/default.nix b/pkgs/development/interpreters/gauche/default.nix index 62903de6bb8b..3fb736ff7e38 100644 --- a/pkgs/development/interpreters/gauche/default.nix +++ b/pkgs/development/interpreters/gauche/default.nix @@ -40,7 +40,7 @@ stdenv.mkDerivation rec { zlib mbedtls cacert - ] ++ lib.optionals stdenv.isDarwin [ CoreServices ]; + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ CoreServices ]; autoreconfPhase = '' ./DIST gen diff --git a/pkgs/development/interpreters/gnu-apl/default.nix b/pkgs/development/interpreters/gnu-apl/default.nix index 85e86de1d6b2..ee4d8482cd41 100644 --- a/pkgs/development/interpreters/gnu-apl/default.nix +++ b/pkgs/development/interpreters/gnu-apl/default.nix @@ -27,7 +27,7 @@ stdenv.mkDerivation rec { "-Wno-error=use-after-free" ]) ++ lib.optional stdenv.cc.isClang "-Wno-error=null-dereference"); - patchPhase = lib.optionalString stdenv.isDarwin '' + patchPhase = lib.optionalString stdenv.hostPlatform.isDarwin '' substituteInPlace src/LApack.cc --replace "malloc.h" "malloc/malloc.h" ''; @@ -37,7 +37,7 @@ stdenv.mkDerivation rec { ''; meta = with lib; { - broken = stdenv.isDarwin; + broken = stdenv.hostPlatform.isDarwin; description = "Free interpreter for the APL programming language"; homepage = "https://www.gnu.org/software/apl/"; license = licenses.gpl3Plus; diff --git a/pkgs/development/interpreters/gnudatalanguage/default.nix b/pkgs/development/interpreters/gnudatalanguage/default.nix index 41f15afbee30..d9acb974df88 100644 --- a/pkgs/development/interpreters/gnudatalanguage/default.nix +++ b/pkgs/development/interpreters/gnudatalanguage/default.nix @@ -24,16 +24,16 @@ , libgeotiff , libjpeg # eccodes is broken on darwin -, enableGRIB ? stdenv.isLinux +, enableGRIB ? stdenv.hostPlatform.isLinux , eccodes -, enableGLPK ? stdenv.isLinux +, enableGLPK ? stdenv.hostPlatform.isLinux , glpk # We enable it in hdf4 and use libtirpc as a dependency here from the passthru # of hdf4 -, enableLibtirpc ? stdenv.isLinux +, enableLibtirpc ? stdenv.hostPlatform.isLinux , libtirpc , python3 -, enableMPI ? (stdenv.isLinux || stdenv.isDarwin) +, enableMPI ? (stdenv.hostPlatform.isLinux || stdenv.hostPlatform.isDarwin) # Choose MPICH over OpenMPI because it currently builds on AArch and Darwin , mpi # Unfree optional dependency for hdf4 and hdf5 @@ -57,11 +57,11 @@ , plplot-forced ? null # wxWidgets is preferred over X11 for this project but we only have it on Linux # and Darwin. -, enableWX ? (stdenv.isLinux || stdenv.isDarwin) +, enableWX ? (stdenv.hostPlatform.isLinux || stdenv.hostPlatform.isDarwin) , wxGTK32 , Cocoa # X11: OFF by default for platform consistency. Use X where WX is not available -, enableXWin ? (!stdenv.isLinux && !stdenv.isDarwin) +, enableXWin ? (!stdenv.hostPlatform.isLinux && !stdenv.hostPlatform.isDarwin) }: let @@ -146,7 +146,7 @@ stdenv.mkDerivation rec { ++ lib.optional enableGRIB eccodes ++ lib.optional enableGLPK glpk ++ lib.optional enableWX wxGTK32 - ++ lib.optional (enableWX && stdenv.isDarwin) Cocoa + ++ lib.optional (enableWX && stdenv.hostPlatform.isDarwin) Cocoa ++ lib.optional enableMPI mpi ++ lib.optional enableLibtirpc hdf4-custom.libtirpc ++ lib.optional enableSzip szip; @@ -172,7 +172,7 @@ stdenv.mkDerivation rec { # Tests are failing on Hydra: # ./src/common/dpycmn.cpp(137): assert ""IsOk()"" failed in GetClientArea(): invalid wxDisplay object - doCheck = stdenv.isLinux; + doCheck = stdenv.hostPlatform.isLinux; # Opt-out unstable tests # https://github.com/gnudatalanguage/gdl/issues/482 diff --git a/pkgs/development/interpreters/guile/2.0.nix b/pkgs/development/interpreters/guile/2.0.nix index 57ff88025690..510834df4046 100644 --- a/pkgs/development/interpreters/guile/2.0.nix +++ b/pkgs/development/interpreters/guile/2.0.nix @@ -79,7 +79,7 @@ builder rec { sha256 = "0p6c1lmw1iniq03z7x5m65kg3lq543kgvdb4nrxsaxjqf3zhl77v"; })] ++ (lib.optional (coverageAnalysis != null) ./gcov-file-name.patch) - ++ lib.optionals stdenv.isDarwin [ + ++ lib.optionals stdenv.hostPlatform.isDarwin [ ./filter-mkostemp-darwin.patch (fetchpatch { url = "https://gitlab.gnome.org/GNOME/gtk-osx/raw/52898977f165777ad9ef169f7d4818f2d4c9b731/patches/guile-clocktime.patch"; @@ -92,11 +92,11 @@ builder rec { # don't have "libgcc_s.so.1" on darwin LDFLAGS = lib.optionalString - (!stdenv.isDarwin && !stdenv.hostPlatform.isMusl) "-lgcc_s"; + (!stdenv.hostPlatform.isDarwin && !stdenv.hostPlatform.isMusl) "-lgcc_s"; configureFlags = [ "--with-libreadline-prefix" - ] ++ lib.optionals stdenv.isSunOS [ + ] ++ lib.optionals stdenv.hostPlatform.isSunOS [ # Make sure the right is found, and not the incompatible # /usr/include/mp.h from OpenSolaris. See # @@ -159,7 +159,7 @@ builder rec { // -(lib.optionalAttrs (!stdenv.isLinux) { +(lib.optionalAttrs (!stdenv.hostPlatform.isLinux) { # Work around . SHELL = stdenv.shell; CONFIG_SHELL = stdenv.shell; diff --git a/pkgs/development/interpreters/guile/2.2.nix b/pkgs/development/interpreters/guile/2.2.nix index 9dd102012068..6c75540dae0c 100644 --- a/pkgs/development/interpreters/guile/2.2.nix +++ b/pkgs/development/interpreters/guile/2.2.nix @@ -73,7 +73,7 @@ builder rec { # Read the header of the patch to more info ./eai_system.patch ] ++ lib.optional (coverageAnalysis != null) ./gcov-file-name.patch - ++ lib.optional stdenv.isDarwin + ++ lib.optional stdenv.hostPlatform.isDarwin (fetchpatch { url = "https://gitlab.gnome.org/GNOME/gtk-osx/raw/52898977f165777ad9ef169f7d4818f2d4c9b731/patches/guile-clocktime.patch"; sha256 = "12wvwdna9j8795x59ldryv9d84c1j3qdk2iskw09306idfsis207"; @@ -88,7 +88,7 @@ builder rec { configureFlags = [ "--with-libreadline-prefix=${lib.getDev readline}" - ] ++ lib.optionals stdenv.isSunOS [ + ] ++ lib.optionals stdenv.hostPlatform.isSunOS [ # Make sure the right is found, and not the incompatible # /usr/include/mp.h from OpenSolaris. See # diff --git a/pkgs/development/interpreters/guile/3.0.nix b/pkgs/development/interpreters/guile/3.0.nix index f7797a7c8ad2..1eeda97b0f8b 100644 --- a/pkgs/development/interpreters/guile/3.0.nix +++ b/pkgs/development/interpreters/guile/3.0.nix @@ -49,7 +49,7 @@ builder rec { libtool libunistring readline - ] ++ lib.optionals stdenv.isLinux [ + ] ++ lib.optionals stdenv.hostPlatform.isLinux [ libxcrypt ]; propagatedBuildInputs = [ @@ -62,7 +62,7 @@ builder rec { # flags, see below. libtool libunistring - ] ++ lib.optionals stdenv.isLinux [ + ] ++ lib.optionals stdenv.hostPlatform.isLinux [ libxcrypt ]; @@ -75,7 +75,7 @@ builder rec { patches = [ ./eai_system.patch ] ++ lib.optional (coverageAnalysis != null) ./gcov-file-name.patch - ++ lib.optional stdenv.isDarwin + ++ lib.optional stdenv.hostPlatform.isDarwin (fetchpatch { url = "https://gitlab.gnome.org/GNOME/gtk-osx/raw/52898977f165777ad9ef169f7d4818f2d4c9b731/patches/guile-clocktime.patch"; sha256 = "12wvwdna9j8795x59ldryv9d84c1j3qdk2iskw09306idfsis207"; @@ -90,7 +90,7 @@ builder rec { configureFlags = [ "--with-libreadline-prefix=${lib.getDev readline}" - ] ++ lib.optionals stdenv.isSunOS [ + ] ++ lib.optionals stdenv.hostPlatform.isSunOS [ # Make sure the right is found, and not the incompatible # /usr/include/mp.h from OpenSolaris. See # @@ -105,7 +105,7 @@ builder rec { ] # At least on x86_64-darwin '-flto' autodetection is not correct: # https://github.com/NixOS/nixpkgs/pull/160051#issuecomment-1046193028 - ++ lib.optional (stdenv.isDarwin) "--disable-lto"; + ++ lib.optional (stdenv.hostPlatform.isDarwin) "--disable-lto"; postInstall = '' wrapProgram $out/bin/guile-snarf --prefix PATH : "${gawk}/bin" @@ -129,7 +129,7 @@ builder rec { doInstallCheck = doCheck; # In procedure bytevector-u8-ref: Argument 2 out of range - dontStrip = stdenv.isDarwin; + dontStrip = stdenv.hostPlatform.isDarwin; setupHook = ./setup-hook-3.0.sh; diff --git a/pkgs/development/interpreters/hashlink/default.nix b/pkgs/development/interpreters/hashlink/default.nix index f017e1a43c86..6ecb4913dbc8 100644 --- a/pkgs/development/interpreters/hashlink/default.nix +++ b/pkgs/development/interpreters/hashlink/default.nix @@ -53,7 +53,7 @@ stdenv.mkDerivation rec { cp -r other/haxelib/* "${haxelibPath}" ''; - postFixup = lib.optionalString stdenv.isDarwin '' + postFixup = lib.optionalString stdenv.hostPlatform.isDarwin '' install_name_tool -change libhl.dylib $out/lib/libhl.dylib $out/bin/hl ''; diff --git a/pkgs/development/interpreters/hugs/default.nix b/pkgs/development/interpreters/hugs/default.nix index d8ee5726ef33..ab48ef91b362 100644 --- a/pkgs/development/interpreters/hugs/default.nix +++ b/pkgs/development/interpreters/hugs/default.nix @@ -40,7 +40,7 @@ stdenv.mkDerivation rec { ]; meta = with lib; { - broken = stdenv.isDarwin; + broken = stdenv.hostPlatform.isDarwin; mainProgram = "hugs"; homepage = "https://www.haskell.org/hugs"; description = "Haskell interpreter"; diff --git a/pkgs/development/interpreters/icon-lang/default.nix b/pkgs/development/interpreters/icon-lang/default.nix index e5c486ed8de2..2ea8a20d4f6c 100644 --- a/pkgs/development/interpreters/icon-lang/default.nix +++ b/pkgs/development/interpreters/icon-lang/default.nix @@ -21,11 +21,11 @@ stdenv.mkDerivation rec { let target = if withGraphics then "X-Configure" else "Configure"; platform = - if stdenv.isLinux then "linux" - else if stdenv.isDarwin then "macintosh" - else if stdenv.isBSD then "bsd" - else if stdenv.isCygwin then "cygwin" - else if stdenv.isSunOS then "solaris" + if stdenv.hostPlatform.isLinux then "linux" + else if stdenv.hostPlatform.isDarwin then "macintosh" + else if stdenv.hostPlatform.isBSD then "bsd" + else if stdenv.hostPlatform.isCygwin then "cygwin" + else if stdenv.hostPlatform.isSunOS then "solaris" else throw "unsupported system"; in "make ${target} name=${platform}"; diff --git a/pkgs/development/interpreters/janet/default.nix b/pkgs/development/interpreters/janet/default.nix index 34388c8c033b..1efb95bcade8 100644 --- a/pkgs/development/interpreters/janet/default.nix +++ b/pkgs/development/interpreters/janet/default.nix @@ -21,7 +21,7 @@ stdenv.mkDerivation (finalAttrs: { postPatch = '' substituteInPlace janet.1 \ --replace /usr/local/ $out/ - '' + lib.optionalString stdenv.isDarwin '' + '' + lib.optionalString stdenv.hostPlatform.isDarwin '' # error: Socket is not connected substituteInPlace meson.build \ --replace "'test/suite-ev.janet'," "" diff --git a/pkgs/development/interpreters/kerf/default.nix b/pkgs/development/interpreters/kerf/default.nix index d019743bfb4d..e11a683082ed 100644 --- a/pkgs/development/interpreters/kerf/default.nix +++ b/pkgs/development/interpreters/kerf/default.nix @@ -18,9 +18,9 @@ stdenv.mkDerivation rec { sourceRoot = "${src.name}/src"; buildInputs = [ libedit zlib ncurses ] - ++ lib.optionals stdenv.isDarwin ([ + ++ lib.optionals stdenv.hostPlatform.isDarwin ([ Accelerate - ] ++ lib.optionals stdenv.isx86_64 /* && isDarwin */ [ + ] ++ lib.optionals stdenv.hostPlatform.isx86_64 /* && isDarwin */ [ CoreGraphics CoreVideo ]); @@ -36,7 +36,7 @@ stdenv.mkDerivation rec { "implicit-function-declaration" "gnu-variable-sized-type-not-at-end" "unused-result" - ] ++ lib.optionals stdenv.isDarwin [ "-fcommon" ]); + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ "-fcommon" ]); patchPhase = '' substituteInPlace ./Makefile \ @@ -88,6 +88,6 @@ stdenv.mkDerivation rec { # aarch64-linux seems hopeless, with over 2,000 warnings # generated? - broken = (stdenv.isLinux && stdenv.isAarch64); + broken = (stdenv.hostPlatform.isLinux && stdenv.hostPlatform.isAarch64); }; } diff --git a/pkgs/development/interpreters/lua-5/default.nix b/pkgs/development/interpreters/lua-5/default.nix index 7f1e5ccb7313..30ce00d44e61 100644 --- a/pkgs/development/interpreters/lua-5/default.nix +++ b/pkgs/development/interpreters/lua-5/default.nix @@ -86,7 +86,7 @@ rec { makeWrapper = makeBinaryWrapper; inherit passthruFun; - patches = lib.optional stdenv.isDarwin ./5.4.darwin.patch; + patches = lib.optional stdenv.hostPlatform.isDarwin ./5.4.darwin.patch; }; lua5_4_compat = lua5_4.override({ @@ -102,7 +102,7 @@ rec { inherit passthruFun; patches = - lib.optionals stdenv.isDarwin [ ./5.2.darwin.patch ]; + lib.optionals stdenv.hostPlatform.isDarwin [ ./5.2.darwin.patch ]; }; lua5_3_compat = lua5_3.override({ @@ -119,7 +119,7 @@ rec { inherit passthruFun; patches = [ ./CVE-2022-28805.patch - ] ++ lib.optional stdenv.isDarwin ./5.2.darwin.patch; + ] ++ lib.optional stdenv.hostPlatform.isDarwin ./5.2.darwin.patch; }; lua5_2_compat = lua5_2.override({ @@ -134,7 +134,7 @@ rec { hash = "2640fc56a795f29d28ef15e13c34a47e223960b0240e8cb0a82d9b0738695333"; makeWrapper = makeBinaryWrapper; inherit passthruFun; - patches = (lib.optional stdenv.isDarwin ./5.1.darwin.patch) + patches = (lib.optional stdenv.hostPlatform.isDarwin ./5.1.darwin.patch) ++ [ ./CVE-2014-5461.patch ]; }; diff --git a/pkgs/development/interpreters/lua-5/interpreter.nix b/pkgs/development/interpreters/lua-5/interpreter.nix index 497307d57b3f..0f7b65df95ef 100644 --- a/pkgs/development/interpreters/lua-5/interpreter.nix +++ b/pkgs/development/interpreters/lua-5/interpreter.nix @@ -25,12 +25,12 @@ stdenv.mkDerivation (finalAttrs: luaversion = lib.versions.majorMinor finalAttrs.version; - plat = if (stdenv.isLinux && lib.versionOlder self.luaversion "5.4") then "linux" - else if (stdenv.isLinux && lib.versionAtLeast self.luaversion "5.4") then "linux-readline" - else if stdenv.isDarwin then "macosx" + plat = if (stdenv.hostPlatform.isLinux && lib.versionOlder self.luaversion "5.4") then "linux" + else if (stdenv.hostPlatform.isLinux && lib.versionAtLeast self.luaversion "5.4") then "linux-readline" + else if stdenv.hostPlatform.isDarwin then "macosx" else if stdenv.hostPlatform.isMinGW then "mingw" - else if stdenv.isFreeBSD then "freebsd" - else if stdenv.isSunOS then "solaris" + else if stdenv.hostPlatform.isFreeBSD then "freebsd" + else if stdenv.hostPlatform.isSunOS then "solaris" else if stdenv.hostPlatform.isBSD then "bsd" else if stdenv.hostPlatform.isUnix then "posix" else "generic"; @@ -67,7 +67,7 @@ stdenv.mkDerivation (finalAttrs: # abort if patching didn't work grep $out src/luaconf.h - '' + lib.optionalString (!stdenv.isDarwin && !staticOnly) '' + '' + lib.optionalString (!stdenv.hostPlatform.isDarwin && !staticOnly) '' # Add a target for a shared library to the Makefile. sed -e '1s/^/LUA_SO = liblua.so/' \ -e 's/ALL_T *= */&$(LUA_SO) /' \ @@ -96,10 +96,10 @@ stdenv.mkDerivation (finalAttrs: makeFlagsArray+=(CFLAGS='-O2 -fPIC${lib.optionalString compat compatFlags} $(${ if lib.versionAtLeast luaversion "5.2" then "SYSCFLAGS" else "MYCFLAGS"})' ) - makeFlagsArray+=(${lib.optionalString stdenv.isDarwin "CC=\"$CC\""}${lib.optionalString (stdenv.buildPlatform != stdenv.hostPlatform) " 'AR=${stdenv.cc.targetPrefix}ar rcu'"}) + makeFlagsArray+=(${lib.optionalString stdenv.hostPlatform.isDarwin "CC=\"$CC\""}${lib.optionalString (stdenv.buildPlatform != stdenv.hostPlatform) " 'AR=${stdenv.cc.targetPrefix}ar rcu'"}) installFlagsArray=( TO_BIN="lua luac" INSTALL_DATA='cp -d' \ - TO_LIB="${if stdenv.isDarwin then "liblua.${finalAttrs.version}.dylib" + TO_LIB="${if stdenv.hostPlatform.isDarwin then "liblua.${finalAttrs.version}.dylib" else ("liblua.a" + lib.optionalString (!staticOnly) " liblua.so liblua.so.${luaversion} liblua.so.${finalAttrs.version}" )}" ) runHook postConfigure diff --git a/pkgs/development/interpreters/luajit/default.nix b/pkgs/development/interpreters/luajit/default.nix index f5e25b6261bc..22574dd2b389 100644 --- a/pkgs/development/interpreters/luajit/default.nix +++ b/pkgs/development/interpreters/luajit/default.nix @@ -58,7 +58,7 @@ let # TODO support also other build architectures. The ideal way would be to use # stdenv_32bit but that doesn't work due to host platform mismatch: # https://github.com/NixOS/nixpkgs/issues/212494 - buildStdenv = if buildPackages.stdenv.isx86_64 && stdenv.is32bit + buildStdenv = if buildPackages.stdenv.hostPlatform.isx86_64 && stdenv.hostPlatform.is32bit then buildPackages.pkgsi686Linux.buildPackages.stdenv else buildPackages.stdenv; diff --git a/pkgs/development/interpreters/lunatic/default.nix b/pkgs/development/interpreters/lunatic/default.nix index 4ad07f6a1e33..6ccee2b8de76 100644 --- a/pkgs/development/interpreters/lunatic/default.nix +++ b/pkgs/development/interpreters/lunatic/default.nix @@ -26,7 +26,7 @@ rustPlatform.buildRustPackage rec { buildInputs = [ openssl - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.Security ]; diff --git a/pkgs/development/interpreters/lune/default.nix b/pkgs/development/interpreters/lune/default.nix index 3d84ac9ba521..d010361a931c 100644 --- a/pkgs/development/interpreters/lune/default.nix +++ b/pkgs/development/interpreters/lune/default.nix @@ -29,7 +29,7 @@ rustPlatform.buildRustPackage rec { cmake # required for libz-ng-sys ]; - buildInputs = lib.optionals stdenv.isDarwin [ + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ Security SystemConfiguration ]; @@ -64,6 +64,6 @@ rustPlatform.buildRustPackage rec { license = licenses.mpl20; maintainers = with maintainers; [ lammermann ]; # note: Undefined symbols for architecture x86_64 - broken = stdenv.isDarwin; + broken = stdenv.hostPlatform.isDarwin; }; } diff --git a/pkgs/development/interpreters/maude/default.nix b/pkgs/development/interpreters/maude/default.nix index f8d4e98c90b2..667c797cd093 100644 --- a/pkgs/development/interpreters/maude/default.nix +++ b/pkgs/development/interpreters/maude/default.nix @@ -23,7 +23,7 @@ stdenv.mkDerivation { ]; hardeningDisable = [ "stackprotector" ] ++ - lib.optionals stdenv.isi686 [ "pic" "fortify" ]; + lib.optionals stdenv.hostPlatform.isi686 [ "pic" "fortify" ]; # Fix for glibc-2.34, see # https://gitweb.gentoo.org/repo/gentoo.git/commit/dev-lang/maude/maude-3.1-r1.ebuild?id=f021cc6cfa1e35eb9c59955830f1fd89bfcb26b4 diff --git a/pkgs/development/interpreters/micropython/default.nix b/pkgs/development/interpreters/micropython/default.nix index 98ef61f82195..df34036a9423 100644 --- a/pkgs/development/interpreters/micropython/default.nix +++ b/pkgs/development/interpreters/micropython/default.nix @@ -43,8 +43,8 @@ stdenv.mkDerivation rec { __darwinAllowLocalNetworking = true; # needed for select_poll_eintr test skippedTests = " -e select_poll_fd" - + lib.optionalString (stdenv.isDarwin && stdenv.isAarch64) " -e ffi_callback -e float_parse -e float_parse_doubleproc" - + lib.optionalString (stdenv.isLinux && stdenv.isAarch64) " -e float_parse" + + lib.optionalString (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isAarch64) " -e ffi_callback -e float_parse -e float_parse_doubleproc" + + lib.optionalString (stdenv.hostPlatform.isLinux && stdenv.hostPlatform.isAarch64) " -e float_parse" ; checkPhase = '' diff --git a/pkgs/development/interpreters/mujs/default.nix b/pkgs/development/interpreters/mujs/default.nix index 225146b33fe7..9bffafe4bd73 100644 --- a/pkgs/development/interpreters/mujs/default.nix +++ b/pkgs/development/interpreters/mujs/default.nix @@ -17,7 +17,7 @@ stdenv.mkDerivation rec { buildInputs = [ readline ]; - nativeBuildInputs = lib.optionals stdenv.isDarwin [ fixDarwinDylibNames ]; + nativeBuildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ fixDarwinDylibNames ]; makeFlags = [ "prefix=$(out)" ]; diff --git a/pkgs/development/interpreters/nextflow/default.nix b/pkgs/development/interpreters/nextflow/default.nix index ed07f175b653..0408bf243121 100644 --- a/pkgs/development/interpreters/nextflow/default.nix +++ b/pkgs/development/interpreters/nextflow/default.nix @@ -67,7 +67,7 @@ stdenv.mkDerivation rec { }; }; in -if stdenv.isLinux then +if stdenv.hostPlatform.isLinux then buildFHSEnv { name = "nextflow"; diff --git a/pkgs/development/interpreters/octave/default.nix b/pkgs/development/interpreters/octave/default.nix index 8bf1c43d1239..72895919383d 100644 --- a/pkgs/development/interpreters/octave/default.nix +++ b/pkgs/development/interpreters/octave/default.nix @@ -136,9 +136,9 @@ in stdenv.mkDerivation (finalAttrs: { libsForQt5.qscintilla ] ++ lib.optionals (enableJava) [ jdk - ] ++ lib.optionals (!stdenv.isDarwin) [ + ] ++ lib.optionals (!stdenv.hostPlatform.isDarwin) [ libGL libGLU libX11 - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ libiconv darwin.apple_sdk.frameworks.Accelerate darwin.apple_sdk.frameworks.Cocoa @@ -153,12 +153,12 @@ in stdenv.mkDerivation (finalAttrs: { libsForQt5.qttools ]; - doCheck = !stdenv.isDarwin; + doCheck = !stdenv.hostPlatform.isDarwin; enableParallelBuilding = true; # Fix linker error on Darwin (see https://trac.macports.org/ticket/61865) - NIX_LDFLAGS = lib.optionalString stdenv.isDarwin "-lobjc"; + NIX_LDFLAGS = lib.optionalString stdenv.hostPlatform.isDarwin "-lobjc"; # See https://savannah.gnu.org/bugs/?50339 F77_INTEGER_8_FLAG = lib.optionalString use64BitIdx "-fdefault-integer-8"; @@ -168,9 +168,9 @@ in stdenv.mkDerivation (finalAttrs: { "--with-lapack=lapack" (if use64BitIdx then "--enable-64" else "--disable-64") ] - ++ lib.optionals stdenv.isDarwin [ "--enable-link-all-dependencies" ] + ++ lib.optionals stdenv.hostPlatform.isDarwin [ "--enable-link-all-dependencies" ] ++ lib.optionals enableReadline [ "--enable-readline" ] - ++ lib.optionals stdenv.isDarwin [ "--with-x=no" ] + ++ lib.optionals stdenv.hostPlatform.isDarwin [ "--with-x=no" ] ++ lib.optionals enableQt [ "--with-qt=5" ] ; diff --git a/pkgs/development/interpreters/perl/interpreter.nix b/pkgs/development/interpreters/perl/interpreter.nix index 2afdcded3db4..23336cb8f478 100644 --- a/pkgs/development/interpreters/perl/interpreter.nix +++ b/pkgs/development/interpreters/perl/interpreter.nix @@ -58,7 +58,7 @@ stdenv.mkDerivation (rec { # the libxcrypt port has been installed. # # Without libxcrypt, Perl will still find FreeBSD's crypt functions. - propagatedBuildInputs = lib.optional (enableCrypt && !stdenv.isFreeBSD) libxcrypt; + propagatedBuildInputs = lib.optional (enableCrypt && !stdenv.hostPlatform.isFreeBSD) libxcrypt; disallowedReferences = [ stdenv.cc ]; @@ -70,8 +70,8 @@ stdenv.mkDerivation (rec { ++ lib.optional (lib.versionOlder version "5.38.0") ./no-sys-dirs-5.31.patch ++ lib.optional (lib.versionAtLeast version "5.38.0") ./no-sys-dirs-5.38.0.patch - ++ lib.optional stdenv.isSunOS ./ld-shared.patch - ++ lib.optionals stdenv.isDarwin [ ./cpp-precomp.patch ./sw_vers.patch ] + ++ lib.optional stdenv.hostPlatform.isSunOS ./ld-shared.patch + ++ lib.optionals stdenv.hostPlatform.isDarwin [ ./cpp-precomp.patch ./sw_vers.patch ] ++ lib.optional crossCompiling ./cross.patch; # This is not done for native builds because pwd may need to come from @@ -107,7 +107,7 @@ stdenv.mkDerivation (rec { "-Dloclibpth=${libcLib}/lib" ] ++ lib.optionals ((builtins.match ''5\.[0-9]*[13579]\..+'' version) != null) [ "-Dusedevel" "-Uversiononly" ] - ++ lib.optional stdenv.isSunOS "-Dcc=gcc" + ++ lib.optional stdenv.hostPlatform.isSunOS "-Dcc=gcc" ++ lib.optional enableThreading "-Dusethreads" ++ lib.optional (!enableCrypt) "-A clear:d_crypt_r" ++ lib.optional stdenv.hostPlatform.isStatic "--all-static" @@ -116,7 +116,7 @@ stdenv.mkDerivation (rec { "-Dman1dir=${placeholder "out"}/share/man/man1" "-Dman3dir=${placeholder "out"}/share/man/man3" ] - ++ lib.optionals (stdenv.isFreeBSD && crossCompiling && enableCrypt) [ + ++ lib.optionals (stdenv.hostPlatform.isFreeBSD && crossCompiling && enableCrypt) [ # https://github.com/Perl/perl5/issues/22295 # configure cannot figure out that we have crypt automatically, but we really do "-Dd_crypt" @@ -157,7 +157,7 @@ stdenv.mkDerivation (rec { GZIP_OS_CODE = AUTO_DETECT USE_ZLIB_NG = False EOF - '' + lib.optionalString stdenv.isDarwin '' + '' + lib.optionalString stdenv.hostPlatform.isDarwin '' substituteInPlace hints/darwin.sh --replace "env MACOSX_DEPLOYMENT_TARGET=10.3" "" '' + lib.optionalString (!enableThreading) '' # We need to do this because the bootstrap doesn't have a static libpthread diff --git a/pkgs/development/interpreters/php/generic.nix b/pkgs/development/interpreters/php/generic.nix index 458804e2e51d..13e10103f54f 100644 --- a/pkgs/development/interpreters/php/generic.nix +++ b/pkgs/development/interpreters/php/generic.nix @@ -58,7 +58,7 @@ let , zendSignalsSupport ? true , zendMaxExecutionTimersSupport ? false , systemdSupport ? lib.meta.availableOn stdenv.hostPlatform systemd - , valgrindSupport ? !stdenv.isDarwin && lib.meta.availableOn stdenv.hostPlatform valgrind + , valgrindSupport ? !stdenv.hostPlatform.isDarwin && lib.meta.availableOn stdenv.hostPlatform valgrind , ztsSupport ? apxs2Support }@args: @@ -213,7 +213,7 @@ let enableParallelBuilding = true; nativeBuildInputs = [ autoconf automake bison flex libtool pkg-config re2c ] - ++ lib.optional stdenv.isDarwin xcbuild; + ++ lib.optional stdenv.hostPlatform.isDarwin xcbuild; buildInputs = # PCRE extension @@ -285,7 +285,7 @@ let if [ -f "scripts/dev/genfiles" ]; then ./scripts/dev/genfiles fi - '' + lib.optionalString stdenv.isDarwin '' + '' + lib.optionalString stdenv.hostPlatform.isDarwin '' substituteInPlace configure --replace-fail "-lstdc++" "-lc++" ''; diff --git a/pkgs/development/interpreters/picoc/default.nix b/pkgs/development/interpreters/picoc/default.nix index d27efe1f2b82..eaf08de7b994 100644 --- a/pkgs/development/interpreters/picoc/default.nix +++ b/pkgs/development/interpreters/picoc/default.nix @@ -15,7 +15,7 @@ stdenv.mkDerivation { makeFlags = [ "CC=${stdenv.cc.targetPrefix}cc" ]; - env.NIX_CFLAGS_COMPILE = toString (lib.optionals stdenv.isDarwin [ + env.NIX_CFLAGS_COMPILE = toString (lib.optionals stdenv.hostPlatform.isDarwin [ "-Wno-error=implicit-function-declaration" ]); @@ -23,7 +23,7 @@ stdenv.mkDerivation { # Tests are currently broken on i686 see # https://hydra.nixos.org/build/24003763/nixlog/1 - doCheck = !stdenv.isi686 && !stdenv.isAarch64; + doCheck = !stdenv.hostPlatform.isi686 && !stdenv.hostPlatform.isAarch64; checkTarget = "test"; installPhase = '' diff --git a/pkgs/development/interpreters/python/cpython/2.7/default.nix b/pkgs/development/interpreters/python/cpython/2.7/default.nix index af9bbc47475b..abb66b38e3cc 100644 --- a/pkgs/development/interpreters/python/cpython/2.7/default.nix +++ b/pkgs/development/interpreters/python/cpython/2.7/default.nix @@ -137,14 +137,14 @@ let revert = true; hash = "sha256-Lp5fGlcfJJ6p6vKmcLckJiAA2AZz4prjFE0aMEJxotw="; }) - ] ++ lib.optionals (x11Support && stdenv.isDarwin) [ + ] ++ lib.optionals (x11Support && stdenv.hostPlatform.isDarwin) [ ./use-correct-tcl-tk-on-darwin.patch - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ # Fix darwin build https://bugs.python.org/issue34027 ../3.7/darwin-libutil.patch - ] ++ lib.optionals stdenv.isLinux [ + ] ++ lib.optionals stdenv.hostPlatform.isLinux [ # Disable the use of ldconfig in ctypes.util.find_library (since # ldconfig doesn't work on NixOS), and don't use @@ -188,7 +188,7 @@ let for i in Lib/plat-*/regen; do substituteInPlace $i --replace /usr/include/ ${stdenv.cc.libc}/include/ done - '' + lib.optionalString stdenv.isDarwin '' + '' + lib.optionalString stdenv.hostPlatform.isDarwin '' substituteInPlace configure --replace '`/usr/bin/arch`' '"i386"' substituteInPlace Lib/multiprocessing/__init__.py \ --replace 'os.popen(comm)' 'os.popen("${coreutils}/bin/nproc")' @@ -205,7 +205,7 @@ let "--enable-unicode=ucs${toString ucsEncoding}" ] ++ lib.optionals stdenv.hostPlatform.isCygwin [ "ac_cv_func_bind_textdomain_codeset=yes" - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ "--disable-toolbox-glue" ] ++ lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) [ "PYTHON_FOR_BUILD=${lib.getBin buildPackages.python}/bin/python" @@ -240,7 +240,7 @@ let lib.optional (stdenv ? cc && stdenv.cc.libc != null) stdenv.cc.libc ++ [ bzip2 openssl zlib libffi expat db gdbm ncurses sqlite readline ] ++ lib.optionals x11Support [ tcl tk libX11 ] - ++ lib.optional (stdenv.isDarwin && configd != null) configd; + ++ lib.optional (stdenv.hostPlatform.isDarwin && configd != null) configd; nativeBuildInputs = [ autoreconfHook ] ++ lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) @@ -264,7 +264,7 @@ in with passthru; stdenv.mkDerivation ({ inherit src patches buildInputs nativeBuildInputs preConfigure configureFlags; - LDFLAGS = lib.optionalString (!stdenv.isDarwin) "-lgcc_s"; + LDFLAGS = lib.optionalString (!stdenv.hostPlatform.isDarwin) "-lgcc_s"; inherit (mkPaths buildInputs) C_INCLUDE_PATH LIBRARY_PATH; env.NIX_CFLAGS_COMPILE = lib.optionalString (stdenv.targetPlatform.system == "x86_64-darwin") "-msse2" diff --git a/pkgs/development/interpreters/python/cpython/default.nix b/pkgs/development/interpreters/python/cpython/default.nix index 56e0be3ea59c..bb3dba534b79 100644 --- a/pkgs/development/interpreters/python/cpython/default.nix +++ b/pkgs/development/interpreters/python/cpython/default.nix @@ -70,7 +70,7 @@ , enableNoSemanticInterposition ? true # enabling LTO on 32bit arch causes downstream packages to fail when linking -, enableLTO ? stdenv.isDarwin || (stdenv.is64bit && stdenv.isLinux) +, enableLTO ? stdenv.hostPlatform.isDarwin || (stdenv.hostPlatform.is64bit && stdenv.hostPlatform.isLinux) # enable asserts to ensure the build remains reproducible , reproducibleBuild ? false @@ -95,7 +95,7 @@ assert x11Support -> tcl != null assert bluezSupport -> bluez != null; -assert lib.assertMsg (enableFramework -> stdenv.isDarwin) +assert lib.assertMsg (enableFramework -> stdenv.hostPlatform.isDarwin) "Framework builds are only supported on Darwin."; assert lib.assertMsg (reproducibleBuild -> stripBytecode) @@ -152,7 +152,7 @@ let nativeBuildInputs = [ nukeReferences - ] ++ optionals (!stdenv.isDarwin) [ + ] ++ optionals (!stdenv.hostPlatform.isDarwin) [ autoconf-archive # needed for AX_CHECK_COMPILE_FLAG autoreconfHook pkg-config @@ -181,7 +181,7 @@ let ] ++ optionals stdenv.hostPlatform.isMinGW [ windows.dlfcn windows.mingw_w64_pthreads - ] ++ optionals stdenv.isDarwin [ + ] ++ optionals stdenv.hostPlatform.isDarwin [ configd ] ++ optionals tzdataSupport [ tzdata @@ -293,9 +293,9 @@ in with passthru; stdenv.mkDerivation (finalAttrs: { bash # only required for patchShebangs ] ++ buildInputs; - prePatch = optionalString stdenv.isDarwin '' + prePatch = optionalString stdenv.hostPlatform.isDarwin '' substituteInPlace configure --replace-fail '`/usr/bin/arch`' '"i386"' - '' + optionalString (pythonOlder "3.9" && stdenv.isDarwin && x11Support) '' + '' + optionalString (pythonOlder "3.9" && stdenv.hostPlatform.isDarwin && x11Support) '' # Broken on >= 3.9; replaced with ./3.9/darwin-tcl-tk.patch substituteInPlace setup.py --replace-fail /Library/Frameworks /no-such-path ''; @@ -307,7 +307,7 @@ in with passthru; stdenv.mkDerivation (finalAttrs: { # (since it will do a futile invocation of gcc (!) to find # libuuid, slowing down program startup a lot). noldconfigPatch - ] ++ optionals (stdenv.hostPlatform != stdenv.buildPlatform && stdenv.isFreeBSD) [ + ] ++ optionals (stdenv.hostPlatform != stdenv.buildPlatform && stdenv.hostPlatform.isFreeBSD) [ # Cross compilation only supports a limited number of "known good" # configurations. If you're reading this and it's been a long time # since this diff, consider submitting this patch upstream! @@ -327,7 +327,7 @@ in with passthru; stdenv.mkDerivation (finalAttrs: { ./3.7/darwin-libutil.patch ] ++ optionals (pythonAtLeast "3.11") [ ./3.11/darwin-libutil.patch - ] ++ optionals (pythonAtLeast "3.9" && pythonOlder "3.11" && stdenv.isDarwin) [ + ] ++ optionals (pythonAtLeast "3.9" && pythonOlder "3.11" && stdenv.hostPlatform.isDarwin) [ # Stop checking for TCL/TK in global macOS locations ./3.9/darwin-tcl-tk.patch ] ++ optionals (hasDistutilsCxxPatch && pythonOlder "3.12") [ @@ -384,7 +384,7 @@ in with passthru; stdenv.mkDerivation (finalAttrs: { env = { CPPFLAGS = concatStringsSep " " (map (p: "-I${getDev p}/include") buildInputs); LDFLAGS = concatStringsSep " " (map (p: "-L${getLib p}/lib") buildInputs); - LIBS = "${optionalString (!stdenv.isDarwin) "-lcrypt"}"; + LIBS = "${optionalString (!stdenv.hostPlatform.isDarwin) "-lcrypt"}"; NIX_LDFLAGS = lib.optionalString (stdenv.cc.isGNU && !stdenv.hostPlatform.isStatic) ({ "glibc" = "-lgcc_s"; "musl" = "-lgcc_eh"; @@ -414,7 +414,7 @@ in with passthru; stdenv.mkDerivation (finalAttrs: { (enableFeature enableGIL "gil") ] ++ optionals enableOptimizations [ "--enable-optimizations" - ] ++ optionals (stdenv.isDarwin && configd == null) [ + ] ++ optionals (stdenv.hostPlatform.isDarwin && configd == null) [ # Make conditional on Darwin for now to avoid causing Linux rebuilds. "py_cv_module__scproxy=n/a" ] ++ optionals (sqlite != null) [ @@ -467,16 +467,16 @@ in with passthru; stdenv.mkDerivation (finalAttrs: { for path in /usr /sw /opt /pkg; do substituteInPlace ./setup.py --replace-warn $path /no-such-path done - '' + optionalString stdenv.isDarwin '' + '' + optionalString stdenv.hostPlatform.isDarwin '' # Override the auto-detection in setup.py, which assumes a universal build - export PYTHON_DECIMAL_WITH_MACHINE=${if stdenv.isAarch64 then "uint128" else "x64"} + export PYTHON_DECIMAL_WITH_MACHINE=${if stdenv.hostPlatform.isAarch64 then "uint128" else "x64"} # Ensure that modern platform features are enabled on Darwin in spite of having no version suffix. sed -E -i -e 's|Darwin/\[12\]\[0-9\]\.\*|Darwin/*|' configure '' + optionalString (pythonAtLeast "3.11") '' # Also override the auto-detection in `configure`. substituteInPlace configure \ - --replace-fail 'libmpdec_machine=universal' 'libmpdec_machine=${if stdenv.isAarch64 then "uint128" else "x64"}' - '' + optionalString (stdenv.isDarwin && x11Support && pythonAtLeast "3.11") '' + --replace-fail 'libmpdec_machine=universal' 'libmpdec_machine=${if stdenv.hostPlatform.isAarch64 then "uint128" else "x64"}' + '' + optionalString (stdenv.hostPlatform.isDarwin && x11Support && pythonAtLeast "3.11") '' export TCLTK_LIBS="-L${tcl}/lib -L${tk}/lib -l${tcl.libPrefix} -l${tk.libPrefix}" export TCLTK_CFLAGS="-I${tcl}/include -I${tk}/include" '' + optionalString stdenv.hostPlatform.isMusl '' diff --git a/pkgs/development/interpreters/python/default.nix b/pkgs/development/interpreters/python/default.nix index e70816a90eee..3f8338845d63 100644 --- a/pkgs/development/interpreters/python/default.nix +++ b/pkgs/development/interpreters/python/default.nix @@ -139,7 +139,7 @@ in { hash = "sha256-3WHYjaJ0ws4s7HdmfUo9+aZSvMUOJvkJkdTdCvZrzPQ="; pythonVersion = "2.7"; - db = db.override { dbmSupport = !stdenv.isDarwin; }; + db = db.override { dbmSupport = !stdenv.hostPlatform.isDarwin; }; python = __splicedPackages.pythonInterpreters.pypy27_prebuilt; inherit passthruFun; inherit (darwin) libunwind; @@ -156,7 +156,7 @@ in { hash = "sha256-56IEbH5sJfw4aru1Ey6Sp8wkkeOTVpmpRstdy7NCwqo="; pythonVersion = "3.9"; - db = db.override { dbmSupport = !stdenv.isDarwin; }; + db = db.override { dbmSupport = !stdenv.hostPlatform.isDarwin; }; python = __splicedPackages.pypy27; inherit passthruFun; inherit (darwin) libunwind; diff --git a/pkgs/development/interpreters/python/mk-python-derivation.nix b/pkgs/development/interpreters/python/mk-python-derivation.nix index d75fea0eaef1..086ebfb3ed04 100644 --- a/pkgs/development/interpreters/python/mk-python-derivation.nix +++ b/pkgs/development/interpreters/python/mk-python-derivation.nix @@ -307,7 +307,7 @@ let inherit strictDeps; - LANG = "${if python.stdenv.isDarwin then "en_US" else "C"}.UTF-8"; + LANG = "${if python.stdenv.hostPlatform.isDarwin then "en_US" else "C"}.UTF-8"; # Python packages don't have a checkPhase, only an installCheckPhase doCheck = false; diff --git a/pkgs/development/interpreters/python/pypy/default.nix b/pkgs/development/interpreters/python/pypy/default.nix index 0380c29e9e75..3dcbce42cf0a 100644 --- a/pkgs/development/interpreters/python/pypy/default.nix +++ b/pkgs/development/interpreters/python/pypy/default.nix @@ -63,7 +63,7 @@ in with passthru; stdenv.mkDerivation rec { zlib ] ++ lib.optionals (lib.any (l: l == optimizationLevel) [ "0" "1" "2" "3"]) [ boehmgc - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ libunwind Security ]; @@ -132,9 +132,9 @@ in with passthru; stdenv.mkDerivation rec { runHook postInstall ''; - preFixup = lib.optionalString (stdenv.isDarwin) '' + preFixup = lib.optionalString (stdenv.hostPlatform.isDarwin) '' install_name_tool -change @rpath/lib${executable}-c.dylib $out/lib/lib${executable}-c.dylib $out/bin/${executable} - '' + lib.optionalString (stdenv.isDarwin && stdenv.isAarch64) '' + '' + lib.optionalString (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isAarch64) '' mkdir -p $out/${executable}-c/pypy/bin mv $out/bin/${executable} $out/${executable}-c/pypy/bin/${executable} ln -s $out/${executable}-c/pypy/bin/${executable} $out/bin/${executable} diff --git a/pkgs/development/interpreters/python/pypy/prebuilt.nix b/pkgs/development/interpreters/python/pypy/prebuilt.nix index 4b47c642eca4..95e392bc37b7 100644 --- a/pkgs/development/interpreters/python/pypy/prebuilt.nix +++ b/pkgs/development/interpreters/python/pypy/prebuilt.nix @@ -71,15 +71,15 @@ in with passthru; stdenv.mkDerivation { sqlite zlib stdenv.cc.cc.libgcc or null - ] ++ lib.optionals stdenv.isLinux [ + ] ++ lib.optionals stdenv.hostPlatform.isLinux [ tcl-8_5 tk-8_5 - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ tcl-8_6 tk-8_6 ]; - nativeBuildInputs = lib.optionals stdenv.isLinux [ autoPatchelfHook ]; + nativeBuildInputs = lib.optionals stdenv.hostPlatform.isLinux [ autoPatchelfHook ]; installPhase = '' runHook preInstall @@ -88,7 +88,7 @@ in with passthru; stdenv.mkDerivation { echo "Moving files to $out" mv -t $out bin include lib mv $out/bin/libpypy*-c${stdenv.hostPlatform.extensions.sharedLibrary} $out/lib/ - ${lib.optionalString stdenv.isLinux '' + ${lib.optionalString stdenv.hostPlatform.isLinux '' rm $out/bin/*.debug ''} @@ -101,12 +101,12 @@ in with passthru; stdenv.mkDerivation { runHook postInstall ''; - preFixup = lib.optionalString stdenv.isLinux '' + preFixup = lib.optionalString stdenv.hostPlatform.isLinux '' find $out/{lib,lib_pypy*} -name "*.so" \ -exec patchelf \ --replace-needed libtinfow.so.6 libncursesw.so.6 \ --replace-needed libgdbm.so.4 libgdbm_compat.so.4 {} \; - '' + lib.optionalString stdenv.isDarwin '' + '' + lib.optionalString stdenv.hostPlatform.isDarwin '' install_name_tool \ -change \ @rpath/lib${libPrefix}-c.dylib \ @@ -119,12 +119,12 @@ in with passthru; stdenv.mkDerivation { $out/bin/${libPrefix} install_name_tool \ -change \ - /opt/homebrew${lib.optionalString stdenv.isx86_64 "_x86_64"}/opt/tcl-tk/lib/libtcl8.6.dylib \ + /opt/homebrew${lib.optionalString stdenv.hostPlatform.isx86_64 "_x86_64"}/opt/tcl-tk/lib/libtcl8.6.dylib \ ${tcl-8_6}/lib/libtcl8.6.dylib \ $out/lib/${libPrefix}/_tkinter/*.so install_name_tool \ -change \ - /opt/homebrew${lib.optionalString stdenv.isx86_64 "_x86_64"}/opt/tcl-tk/lib/libtk8.6.dylib \ + /opt/homebrew${lib.optionalString stdenv.hostPlatform.isx86_64 "_x86_64"}/opt/tcl-tk/lib/libtk8.6.dylib \ ${tk-8_6}/lib/libtk8.6.dylib \ $out/lib/${libPrefix}/_tkinter/*.so ''; diff --git a/pkgs/development/interpreters/python/pypy/prebuilt_2_7.nix b/pkgs/development/interpreters/python/pypy/prebuilt_2_7.nix index 37a06f9f61ed..0d7e2d131abc 100644 --- a/pkgs/development/interpreters/python/pypy/prebuilt_2_7.nix +++ b/pkgs/development/interpreters/python/pypy/prebuilt_2_7.nix @@ -71,15 +71,15 @@ in with passthru; stdenv.mkDerivation { sqlite zlib stdenv.cc.cc.libgcc or null - ] ++ lib.optionals stdenv.isLinux [ + ] ++ lib.optionals stdenv.hostPlatform.isLinux [ tcl-8_5 tk-8_5 - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ tcl-8_6 tk-8_6 ]; - nativeBuildInputs = lib.optionals stdenv.isLinux [ autoPatchelfHook ]; + nativeBuildInputs = lib.optionals stdenv.hostPlatform.isLinux [ autoPatchelfHook ]; installPhase = '' runHook preInstall @@ -88,7 +88,7 @@ in with passthru; stdenv.mkDerivation { echo "Moving files to $out" mv -t $out bin include lib-python lib_pypy site-packages mv $out/bin/libpypy*-c${stdenv.hostPlatform.extensions.sharedLibrary} $out/lib/ - ${lib.optionalString stdenv.isLinux '' + ${lib.optionalString stdenv.hostPlatform.isLinux '' mv lib/libffi.so.6* $out/lib/ rm $out/bin/*.debug ''} @@ -102,12 +102,12 @@ in with passthru; stdenv.mkDerivation { runHook postInstall ''; - preFixup = lib.optionalString (stdenv.isLinux) '' + preFixup = lib.optionalString (stdenv.hostPlatform.isLinux) '' find $out/{lib,lib_pypy*} -name "*.so" \ -exec patchelf \ --replace-needed libtinfow.so.6 libncursesw.so.6 \ --replace-needed libgdbm.so.4 libgdbm_compat.so.4 {} \; - '' + lib.optionalString (stdenv.isDarwin) '' + '' + lib.optionalString (stdenv.hostPlatform.isDarwin) '' install_name_tool \ -change \ @rpath/lib${executable}-c.dylib \ @@ -115,12 +115,12 @@ in with passthru; stdenv.mkDerivation { $out/bin/${executable} install_name_tool \ -change \ - /opt/homebrew${lib.optionalString stdenv.isx86_64 "_x86_64"}/opt/tcl-tk/lib/libtcl8.6.dylib \ + /opt/homebrew${lib.optionalString stdenv.hostPlatform.isx86_64 "_x86_64"}/opt/tcl-tk/lib/libtcl8.6.dylib \ ${tcl-8_6}/lib/libtcl8.6.dylib \ $out/lib_pypy/_tkinter/*.so install_name_tool \ -change \ - /opt/homebrew${lib.optionalString stdenv.isx86_64 "_x86_64"}/opt/tcl-tk/lib/libtk8.6.dylib \ + /opt/homebrew${lib.optionalString stdenv.hostPlatform.isx86_64 "_x86_64"}/opt/tcl-tk/lib/libtk8.6.dylib \ ${tk-8_6}/lib/libtk8.6.dylib \ $out/lib_pypy/_tkinter/*.so ''; diff --git a/pkgs/development/interpreters/python/python2/mk-python-derivation.nix b/pkgs/development/interpreters/python/python2/mk-python-derivation.nix index 0fb6a5d57f22..427c94241070 100644 --- a/pkgs/development/interpreters/python/python2/mk-python-derivation.nix +++ b/pkgs/development/interpreters/python/python2/mk-python-derivation.nix @@ -204,7 +204,7 @@ let inherit strictDeps; - LANG = "${if python.stdenv.isDarwin then "en_US" else "C"}.UTF-8"; + LANG = "${if python.stdenv.hostPlatform.isDarwin then "en_US" else "C"}.UTF-8"; # Python packages don't have a checkPhase, only an installCheckPhase doCheck = false; diff --git a/pkgs/development/interpreters/python/rustpython/default.nix b/pkgs/development/interpreters/python/rustpython/default.nix index febb7f5cfa24..98d3ed7c0efb 100644 --- a/pkgs/development/interpreters/python/rustpython/default.nix +++ b/pkgs/development/interpreters/python/rustpython/default.nix @@ -28,7 +28,7 @@ rustPlatform.buildRustPackage rec { # freeze the stdlib into the rustpython binary cargoBuildFlags = [ "--features=freeze-stdlib" ]; - buildInputs = lib.optionals stdenv.isDarwin [ SystemConfiguration ]; + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ SystemConfiguration ]; nativeCheckInputs = [ python3 ]; @@ -41,6 +41,6 @@ rustPlatform.buildRustPackage rec { # "_utimensat", referenced from: # rustpython_vm::function::builtin::IntoPyNativeFn::into_func::... in # rustpython-10386d81555652a7.rustpython_vm-f0b5bedfcf056d0b.rustpython_vm.7926b68e665728ca-cgu.08.rcgu.o.rcgu.o - broken = stdenv.isDarwin && stdenv.isx86_64; + broken = stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isx86_64; }; } diff --git a/pkgs/development/interpreters/python/tests.nix b/pkgs/development/interpreters/python/tests.nix index 99bc38890c6a..6574b6295744 100644 --- a/pkgs/development/interpreters/python/tests.nix +++ b/pkgs/development/interpreters/python/tests.nix @@ -38,7 +38,7 @@ let is_nixenv = "False"; is_virtualenv = "False"; }; - } // lib.optionalAttrs (!python.isPyPy && !stdenv.isDarwin) { + } // lib.optionalAttrs (!python.isPyPy && !stdenv.hostPlatform.isDarwin) { # Use virtualenv from a Nix env. # Fails on darwin with # virtualenv: error: argument dest: the destination . is not write-able at /nix/store @@ -106,7 +106,7 @@ let # Integration tests involving the package set. # All PyPy package builds are broken at the moment integrationTests = lib.optionalAttrs (!python.isPyPy) ( - lib.optionalAttrs (python.isPy3k && !stdenv.isDarwin) { # darwin has no split-debug + lib.optionalAttrs (python.isPy3k && !stdenv.hostPlatform.isDarwin) { # darwin has no split-debug cpython-gdb = callPackage ./tests/test_cpython_gdb { interpreter = python; }; @@ -222,7 +222,7 @@ let } ) {}; pythonWithRequests = requests.pythonModule.withPackages (ps: [ requests ]); - in lib.optionalAttrs (python.isPy3k && stdenv.isLinux) + in lib.optionalAttrs (python.isPy3k && stdenv.hostPlatform.isLinux) { condaExamplePackage = runCommand "import-requests" {} '' ${pythonWithRequests.interpreter} -c "import requests" > $out diff --git a/pkgs/development/interpreters/racket/default.nix b/pkgs/development/interpreters/racket/default.nix index 6f06b31b56a6..4a16416374ff 100644 --- a/pkgs/development/interpreters/racket/default.nix +++ b/pkgs/development/interpreters/racket/default.nix @@ -56,7 +56,7 @@ let readline sqlite ] - ++ lib.optionals (!stdenv.isDarwin) [ + ++ lib.optionals (!stdenv.hostPlatform.isDarwin) [ libGL libGLU ] @@ -83,7 +83,7 @@ stdenv.mkDerivation rec { FONTCONFIG_FILE = fontsConf; LD_LIBRARY_PATH = libPath; NIX_LDFLAGS = lib.concatStringsSep " " [ - (lib.optionalString (stdenv.cc.isGNU && !stdenv.isDarwin) "-lgcc_s") + (lib.optionalString (stdenv.cc.isGNU && !stdenv.hostPlatform.isDarwin) "-lgcc_s") ]; nativeBuildInputs = [ @@ -101,7 +101,7 @@ stdenv.mkDerivation rec { gtk3 ncurses ] - ++ lib.optionals stdenv.isDarwin [ + ++ lib.optionals stdenv.hostPlatform.isDarwin [ libiconv CoreFoundation ]; @@ -141,15 +141,15 @@ stdenv.mkDerivation rec { cd src/build '' - + lib.optionalString stdenv.isLinux '' + + lib.optionalString stdenv.hostPlatform.isLinux '' gappsWrapperArgs+=("--prefix" "LD_LIBRARY_PATH" ":" ${libPath}) gappsWrapperArgs+=("--set" "LOCALE_ARCHIVE" "${glibcLocales}/lib/locale/locale-archive") '' - + lib.optionalString stdenv.isDarwin '' + + lib.optionalString stdenv.hostPlatform.isDarwin '' gappsWrapperArgs+=("--prefix" "DYLD_LIBRARY_PATH" ":" ${libPath}) ''; - preBuild = lib.optionalString stdenv.isDarwin '' + preBuild = lib.optionalString stdenv.hostPlatform.isDarwin '' # Cannot set DYLD_LIBRARY_PATH as an attr of this drv, becasue dynamic # linker environment variables like this are purged. # See: https://apple.stackexchange.com/a/212954/167199 @@ -163,14 +163,14 @@ stdenv.mkDerivation rec { export DYLD_FALLBACK_LIBRARY_PATH="${libPath}" ''; - shared = if stdenv.isDarwin then "dylib" else "shared"; + shared = if stdenv.hostPlatform.isDarwin then "dylib" else "shared"; configureFlags = [ "--enable-${shared}" "--enable-lt=${libtool}/bin/libtool" ] ++ lib.optionals disableDocs [ "--disable-docs" ] - ++ lib.optionals stdenv.isDarwin [ + ++ lib.optionals stdenv.hostPlatform.isDarwin [ "--disable-strip" "--enable-xonx" ]; @@ -179,7 +179,7 @@ stdenv.mkDerivation rec { enableParallelBuilding = false; - dontStrip = stdenv.isDarwin; + dontStrip = stdenv.hostPlatform.isDarwin; meta = with lib; { description = "Programmable programming language"; diff --git a/pkgs/development/interpreters/racket/racket_7_9.nix b/pkgs/development/interpreters/racket/racket_7_9.nix index 91f7654fcad2..c82d232e11a4 100644 --- a/pkgs/development/interpreters/racket/racket_7_9.nix +++ b/pkgs/development/interpreters/racket/racket_7_9.nix @@ -76,8 +76,8 @@ stdenv.mkDerivation rec { FONTCONFIG_FILE = fontsConf; LD_LIBRARY_PATH = libPath; NIX_LDFLAGS = lib.concatStringsSep " " [ - (lib.optionalString (stdenv.cc.isGNU && !stdenv.isDarwin) "-lgcc_s") - (lib.optionalString stdenv.isDarwin "-framework CoreFoundation") + (lib.optionalString (stdenv.cc.isGNU && !stdenv.hostPlatform.isDarwin) "-lgcc_s") + (lib.optionalString stdenv.hostPlatform.isDarwin "-framework CoreFoundation") ]; nativeBuildInputs = [ @@ -94,7 +94,7 @@ stdenv.mkDerivation rec { gsettings-desktop-schemas gtk3 ] - ++ lib.optionals stdenv.isDarwin [ + ++ lib.optionals stdenv.hostPlatform.isDarwin [ libiconv CoreFoundation ]; @@ -110,14 +110,14 @@ stdenv.mkDerivation rec { gappsWrapperArgs+=("--prefix" "LD_LIBRARY_PATH" ":" ${LD_LIBRARY_PATH}) ''; - shared = if stdenv.isDarwin then "dylib" else "shared"; + shared = if stdenv.hostPlatform.isDarwin then "dylib" else "shared"; configureFlags = [ "--enable-${shared}" "--enable-lt=${libtool}/bin/libtool" ] ++ lib.optionals disableDocs [ "--disable-docs" ] - ++ lib.optionals stdenv.isDarwin [ "--enable-xonx" ]; + ++ lib.optionals stdenv.hostPlatform.isDarwin [ "--enable-xonx" ]; configureScript = "../configure"; @@ -145,6 +145,6 @@ stdenv.mkDerivation rec { "x86_64-linux" "aarch64-linux" ]; - broken = stdenv.isDarwin; # No support yet for setting FFI lookup path + broken = stdenv.hostPlatform.isDarwin; # No support yet for setting FFI lookup path }; } diff --git a/pkgs/development/interpreters/rakudo/moarvm.nix b/pkgs/development/interpreters/rakudo/moarvm.nix index e4b0da036233..5537f13041d7 100644 --- a/pkgs/development/interpreters/rakudo/moarvm.nix +++ b/pkgs/development/interpreters/rakudo/moarvm.nix @@ -21,7 +21,7 @@ stdenv.mkDerivation rec { postPatch = '' patchShebangs . - '' + lib.optionalString stdenv.isDarwin '' + '' + lib.optionalString stdenv.hostPlatform.isDarwin '' substituteInPlace Configure.pl \ --replace '`/usr/bin/arch`' '"${stdenv.hostPlatform.darwinArch}"' \ --replace '/usr/bin/arch' "$(type -P true)" \ @@ -30,7 +30,7 @@ stdenv.mkDerivation rec { --replace '`sw_vers -productVersion`' '"11.0"' ''; - buildInputs = [ perl ] ++ lib.optionals stdenv.isDarwin [ CoreServices ApplicationServices ]; + buildInputs = [ perl ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ CoreServices ApplicationServices ]; doCheck = false; # MoarVM does not come with its own test suite configureScript = "${perl}/bin/perl ./Configure.pl"; diff --git a/pkgs/development/interpreters/ruby/default.nix b/pkgs/development/interpreters/ruby/default.nix index 596c778c0ff5..369d242192ac 100644 --- a/pkgs/development/interpreters/ruby/default.nix +++ b/pkgs/development/interpreters/ruby/default.nix @@ -78,7 +78,7 @@ let nativeBuildInputs = [ autoreconfHook bison removeReferencesTo ] ++ (op docSupport groff) - ++ (ops (dtraceSupport && stdenv.isLinux) [ systemtap libsystemtap ]) + ++ (ops (dtraceSupport && stdenv.hostPlatform.isLinux) [ systemtap libsystemtap ]) ++ ops yjitSupport [ rustPlatform.cargoSetupHook cargo rustc ] ++ op useBaseRuby baseRuby; buildInputs = [ autoconf ] @@ -92,8 +92,8 @@ let # support is not enabled, so add readline to the build inputs if curses # support is disabled (if it's enabled, we already have it) and we're # running on darwin - ++ op (!cursesSupport && stdenv.isDarwin) readline - ++ ops stdenv.isDarwin [ libiconv libobjc libunwind Foundation ]; + ++ op (!cursesSupport && stdenv.hostPlatform.isDarwin) readline + ++ ops stdenv.hostPlatform.isDarwin [ libiconv libobjc libunwind Foundation ]; propagatedBuildInputs = op jemallocSupport jemalloc; enableParallelBuilding = true; @@ -156,7 +156,7 @@ let # overrides that by enabling `-O2` which is the minimum optimization # needed for `_FORTIFY_SOURCE`. ] ++ lib.optional stdenv.cc.isGNU "CFLAGS=-O3" ++ [ - ] ++ ops stdenv.isDarwin [ + ] ++ ops stdenv.hostPlatform.isDarwin [ # on darwin, we have /usr/include/tk.h -- so the configure script detects # that tk is installed "--with-out-ext=tk" diff --git a/pkgs/development/interpreters/rune/default.nix b/pkgs/development/interpreters/rune/default.nix index f4dc8ef1f745..41d61aa9cc8b 100644 --- a/pkgs/development/interpreters/rune/default.nix +++ b/pkgs/development/interpreters/rune/default.nix @@ -17,7 +17,7 @@ rustPlatform.buildRustPackage rec { cargoHash = "sha256-yMqxd7PlpEEVS0jJwProaVjKUsU5TuebGTMrWiMFsM8="; - buildInputs = lib.optionals stdenv.isDarwin [ + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.CoreServices darwin.apple_sdk.frameworks.SystemConfiguration ]; diff --git a/pkgs/development/interpreters/snobol4/default.nix b/pkgs/development/interpreters/snobol4/default.nix index 2d276e6a0362..c0edda03dc64 100644 --- a/pkgs/development/interpreters/snobol4/default.nix +++ b/pkgs/development/interpreters/snobol4/default.nix @@ -34,7 +34,7 @@ stdenv.mkDerivation rec { # enable all features (undocumented, based on manual review of configure script) buildInputs = [ bzip2 libffi openssl readline sqlite tcl xz zlib ] # ndbm compat library - ++ lib.optional stdenv.isLinux gdbm; + ++ lib.optional stdenv.hostPlatform.isLinux gdbm; configureFlags = lib.optional (tcl != null) "--with-tcl=${tcl}/lib/tclConfig.sh"; # INSTALL says "parallel make will fail" diff --git a/pkgs/development/interpreters/spidermonkey/common.nix b/pkgs/development/interpreters/spidermonkey/common.nix index cc1d3923fef9..5feca82f6cf1 100644 --- a/pkgs/development/interpreters/spidermonkey/common.nix +++ b/pkgs/development/interpreters/spidermonkey/common.nix @@ -106,7 +106,7 @@ stdenv.mkDerivation (finalAttrs: rec { ] ++ lib.optionals (lib.versionOlder version "91") [ autoconf213 yasm # to buid icu? seems weird - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ xcbuild ]; @@ -115,7 +115,7 @@ stdenv.mkDerivation (finalAttrs: rec { nspr readline zlib - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ libobjc libiconv ]; @@ -213,7 +213,7 @@ stdenv.mkDerivation (finalAttrs: rec { homepage = "https://spidermonkey.dev/"; license = licenses.mpl20; # TODO: MPL/GPL/LGPL tri-license for 78. maintainers = with maintainers; [ abbradar lostnet catap ]; - broken = stdenv.isDarwin && versionAtLeast version "115"; # Requires SDK 13.3 (see #242666). + broken = stdenv.hostPlatform.isDarwin && versionAtLeast version "115"; # Requires SDK 13.3 (see #242666). platforms = platforms.unix; }; }) diff --git a/pkgs/development/interpreters/supercollider/default.nix b/pkgs/development/interpreters/supercollider/default.nix index 7eb0de6f689f..344d00703164 100644 --- a/pkgs/development/interpreters/supercollider/default.nix +++ b/pkgs/development/interpreters/supercollider/default.nix @@ -29,7 +29,7 @@ mkDerivation rec { nativeBuildInputs = [ cmake pkg-config qttools ]; buildInputs = [ gcc libjack2 libsndfile fftw curl libXt qtbase qtwebengine qtwebsockets readline ] - ++ lib.optional (!stdenv.isDarwin) alsa-lib + ++ lib.optional (!stdenv.hostPlatform.isDarwin) alsa-lib ++ lib.optional useSCEL emacs; hardeningDisable = [ "stackprotector" ]; diff --git a/pkgs/development/interpreters/tcl/generic.nix b/pkgs/development/interpreters/tcl/generic.nix index 63eafd9c3e81..5df6fb28a304 100644 --- a/pkgs/development/interpreters/tcl/generic.nix +++ b/pkgs/development/interpreters/tcl/generic.nix @@ -36,7 +36,7 @@ let # Don't install tzdata because NixOS already has a more up-to-date copy. "--with-tzdata=no" "tcl_cv_strtod_unbroken=ok" - ] ++ lib.optional stdenv.is64bit "--enable-64bit"; + ] ++ lib.optional stdenv.hostPlatform.is64bit "--enable-64bit"; enableParallelBuilding = true; diff --git a/pkgs/development/interpreters/tclreadline/default.nix b/pkgs/development/interpreters/tclreadline/default.nix index de671bab5739..de5f3174506b 100644 --- a/pkgs/development/interpreters/tclreadline/default.nix +++ b/pkgs/development/interpreters/tclreadline/default.nix @@ -41,7 +41,7 @@ tcl.mkTclDerivation rec { # The provided makefile leaves a wrong reference to /build/ in RPATH, # so we fix it after checking that everything is also present in $out - preFixup = lib.optionalString stdenv.isLinux '' + preFixup = lib.optionalString stdenv.hostPlatform.isLinux '' needed_libraries=$(ls .libs | grep '\.\(so\|la\)$') for lib in $needed_libraries; do if ! ls $out/lib | grep "$lib"; then diff --git a/pkgs/development/interpreters/unicon-lang/default.nix b/pkgs/development/interpreters/unicon-lang/default.nix index f0a45495d70d..4435b9c02925 100644 --- a/pkgs/development/interpreters/unicon-lang/default.nix +++ b/pkgs/development/interpreters/unicon-lang/default.nix @@ -42,7 +42,7 @@ stdenv.mkDerivation { ''; meta = with lib; { - broken = (stdenv.isLinux && stdenv.isAarch64); + broken = (stdenv.hostPlatform.isLinux && stdenv.hostPlatform.isAarch64); description = "Very high level, goal-directed, object-oriented, general purpose applications language"; maintainers = [ ]; platforms = platforms.linux; diff --git a/pkgs/development/interpreters/wamr/default.nix b/pkgs/development/interpreters/wamr/default.nix index e5b9b904a061..36a484b2ddce 100644 --- a/pkgs/development/interpreters/wamr/default.nix +++ b/pkgs/development/interpreters/wamr/default.nix @@ -17,14 +17,14 @@ stdenv.mkDerivation (finalAttrs: { nativeBuildInputs = [ cmake ]; - cmakeFlags = lib.optionals stdenv.isDarwin [ + cmakeFlags = lib.optionals stdenv.hostPlatform.isDarwin [ "-DCMAKE_OSX_DEPLOYMENT_TARGET=${stdenv.hostPlatform.darwinSdkVersion}" ]; sourceRoot = let - platform = if stdenv.isLinux then + platform = if stdenv.hostPlatform.isLinux then "linux" - else if stdenv.isDarwin then + else if stdenv.hostPlatform.isDarwin then "darwin" else throw "unsupported platform"; in "${finalAttrs.src.name}/product-mini/platforms/${platform}"; diff --git a/pkgs/development/interpreters/wasmer/default.nix b/pkgs/development/interpreters/wasmer/default.nix index 2256851c3d2f..64ff6306d2ee 100644 --- a/pkgs/development/interpreters/wasmer/default.nix +++ b/pkgs/development/interpreters/wasmer/default.nix @@ -8,8 +8,8 @@ , CoreFoundation , SystemConfiguration , Security -, withLLVM ? !stdenv.isDarwin -, withSinglepass ? !(stdenv.isDarwin && stdenv.isx86_64) +, withLLVM ? !stdenv.hostPlatform.isDarwin +, withSinglepass ? !(stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isx86_64) }: rustPlatform.buildRustPackage rec { @@ -33,7 +33,7 @@ rustPlatform.buildRustPackage rec { llvmPackages.llvm libffi libxml2 - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ CoreFoundation SystemConfiguration Security diff --git a/pkgs/development/interpreters/wasmtime/default.nix b/pkgs/development/interpreters/wasmtime/default.nix index 19b309208bc7..dc4bfced92cb 100644 --- a/pkgs/development/interpreters/wasmtime/default.nix +++ b/pkgs/development/interpreters/wasmtime/default.nix @@ -19,7 +19,7 @@ rustPlatform.buildRustPackage rec { outputs = [ "out" "dev" ]; - buildInputs = lib.optional stdenv.isDarwin Security; + buildInputs = lib.optional stdenv.hostPlatform.isDarwin Security; # rustfmt is brought into scope to fix the following # warning: cranelift-codegen@0.108.0: @@ -45,7 +45,7 @@ rustPlatform.buildRustPackage rec { install -d -m0755 $dev/include/wasmtime install -m0644 $src/crates/c-api/include/*.h $dev/include install -m0644 $src/crates/c-api/include/wasmtime/*.h $dev/include/wasmtime - '' + lib.optionalString stdenv.isDarwin '' + '' + lib.optionalString stdenv.hostPlatform.isDarwin '' install_name_tool -id \ $dev/lib/libwasmtime.dylib \ $dev/lib/libwasmtime.dylib diff --git a/pkgs/development/libraries/SDL2/default.nix b/pkgs/development/libraries/SDL2/default.nix index 3b423e79ed13..bc7ffd7b991b 100644 --- a/pkgs/development/libraries/SDL2/default.nix +++ b/pkgs/development/libraries/SDL2/default.nix @@ -8,7 +8,7 @@ libGLSupported ? lib.elem stdenv.hostPlatform.system mesa.meta.platforms, openglSupport ? libGLSupported, libGL, - alsaSupport ? stdenv.isLinux && !stdenv.hostPlatform.isAndroid, + alsaSupport ? stdenv.hostPlatform.isLinux && !stdenv.hostPlatform.isAndroid, alsa-lib, x11Support ? !stdenv.hostPlatform.isWindows && !stdenv.hostPlatform.isAndroid, libX11, @@ -21,7 +21,7 @@ libXext, libXxf86vm, libXrandr, - waylandSupport ? stdenv.isLinux && !stdenv.hostPlatform.isAndroid, + waylandSupport ? stdenv.hostPlatform.isLinux && !stdenv.hostPlatform.isAndroid, wayland, wayland-protocols, wayland-scanner, @@ -29,17 +29,17 @@ libdrm, mesa, libxkbcommon, - dbusSupport ? stdenv.isLinux && !stdenv.hostPlatform.isAndroid, + dbusSupport ? stdenv.hostPlatform.isLinux && !stdenv.hostPlatform.isAndroid, dbus, - udevSupport ? stdenv.isLinux && !stdenv.hostPlatform.isAndroid, + udevSupport ? stdenv.hostPlatform.isLinux && !stdenv.hostPlatform.isAndroid, udev, ibusSupport ? false, ibus, - libdecorSupport ? stdenv.isLinux && !stdenv.hostPlatform.isAndroid, + libdecorSupport ? stdenv.hostPlatform.isLinux && !stdenv.hostPlatform.isAndroid, libdecor, - pipewireSupport ? stdenv.isLinux && !stdenv.hostPlatform.isAndroid, + pipewireSupport ? stdenv.hostPlatform.isLinux && !stdenv.hostPlatform.isAndroid, pipewire, # NOTE: must be built with SDL2 without pipewire support - pulseaudioSupport ? config.pulseaudio or stdenv.isLinux && !stdenv.hostPlatform.isAndroid, + pulseaudioSupport ? config.pulseaudio or stdenv.hostPlatform.isLinux && !stdenv.hostPlatform.isAndroid, libpulseaudio, AudioUnit, Cocoa, @@ -112,7 +112,7 @@ stdenv.mkDerivation (finalAttrs: { dlopenPropagatedBuildInputs = [ ] # Propagated for #include in SDL_opengles.h. - ++ lib.optional (openglSupport && !stdenv.isDarwin) libGL + ++ lib.optional (openglSupport && !stdenv.hostPlatform.isDarwin) libGL # Propagated for #include and in SDL_syswm.h. ++ lib.optionals x11Support [ libX11 ]; @@ -153,7 +153,7 @@ stdenv.mkDerivation (finalAttrs: { ++ finalAttrs.dlopenBuildInputs ++ lib.optional ibusSupport ibus ++ lib.optionals waylandSupport [ wayland-protocols ] - ++ lib.optionals stdenv.isDarwin [ + ++ lib.optionals stdenv.hostPlatform.isDarwin [ AudioUnit Cocoa CoreAudio @@ -169,7 +169,7 @@ stdenv.mkDerivation (finalAttrs: { ++ lib.optional (!x11Support) "--without-x" ++ lib.optional alsaSupport "--with-alsa-prefix=${alsa-lib.out}/lib" ++ lib.optional stdenv.hostPlatform.isWindows "--disable-video-opengles" - ++ lib.optional stdenv.isDarwin "--disable-sdltest"; + ++ lib.optional stdenv.hostPlatform.isDarwin "--disable-sdltest"; # We remove libtool .la files when static libs are requested, # because they make the builds of downstream libs like `SDL_tff` diff --git a/pkgs/development/libraries/aalib/default.nix b/pkgs/development/libraries/aalib/default.nix index 903364ea27f6..3ba1620fe8f3 100644 --- a/pkgs/development/libraries/aalib/default.nix +++ b/pkgs/development/libraries/aalib/default.nix @@ -13,7 +13,7 @@ stdenv.mkDerivation rec { setOutputFlags = false; # Doesn't support all the flags patches = [ ./clang.patch ] # Fix implicit `int` on `main` error with newer versions of clang - ++ lib.optionals stdenv.isDarwin [ ./darwin.patch ]; + ++ lib.optionals stdenv.hostPlatform.isDarwin [ ./darwin.patch ]; # The fuloong2f is not supported by aalib still preConfigure = '' diff --git a/pkgs/development/libraries/abseil-cpp/202103.nix b/pkgs/development/libraries/abseil-cpp/202103.nix index 04af3153719a..0dfd60d17507 100644 --- a/pkgs/development/libraries/abseil-cpp/202103.nix +++ b/pkgs/development/libraries/abseil-cpp/202103.nix @@ -39,7 +39,7 @@ stdenv.mkDerivation rec { url = "https://github.com/abseil/abseil-cpp/commit/808bc202fc13e85a7948db0d7fb58f0f051200b1.patch"; sha256 = "sha256-ayY/aV/xWOdEyFSDqV7B5WDGvZ0ASr/aeBeYwP5RZVc="; }) - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ # Don’t propagate the path to CoreFoundation. Otherwise, it’s impossible to build packages # that require a different SDK other than the default one. ./cmake-core-foundation.patch diff --git a/pkgs/development/libraries/abseil-cpp/202301.nix b/pkgs/development/libraries/abseil-cpp/202301.nix index 62d98d77a38f..502437280246 100644 --- a/pkgs/development/libraries/abseil-cpp/202301.nix +++ b/pkgs/development/libraries/abseil-cpp/202301.nix @@ -18,7 +18,7 @@ stdenv.mkDerivation (finalAttrs: { hash = "sha256-7C/QIXYRyUyNVVE0tqmv8b5g/uWc58iBI5jzdtddQ+U="; }; - patches = lib.optionals stdenv.isDarwin [ + patches = lib.optionals stdenv.hostPlatform.isDarwin [ # Don’t propagate the path to CoreFoundation. Otherwise, it’s impossible to build packages # that require a different SDK other than the default one. ./cmake-core-foundation.patch diff --git a/pkgs/development/libraries/adns/default.nix b/pkgs/development/libraries/adns/default.nix index 60de8957d088..eeb6c07bf11d 100644 --- a/pkgs/development/libraries/adns/default.nix +++ b/pkgs/development/libraries/adns/default.nix @@ -17,7 +17,7 @@ stdenv.mkDerivation rec { configureFlags = lib.optional stdenv.hostPlatform.isStatic "--disable-dynamic"; preConfigure = - lib.optionalString stdenv.isDarwin "sed -i -e 's|-Wl,-soname=$(SHLIBSONAME)||' configure"; + lib.optionalString stdenv.hostPlatform.isDarwin "sed -i -e 's|-Wl,-soname=$(SHLIBSONAME)||' configure"; # Autogenerated headers miss interdependencies in Makefile, fail parallel build: # https://debbugs.gnu.org/cgi/bugreport.cgi?bug=51329 @@ -27,12 +27,12 @@ stdenv.mkDerivation rec { doCheck = false; postInstall = let suffix = lib.versions.majorMinor version; - in lib.optionalString stdenv.isDarwin '' + in lib.optionalString stdenv.hostPlatform.isDarwin '' install_name_tool -id $out/lib/libadns.so.${suffix} $out/lib/libadns.so.${suffix} ''; # darwin executables fail, but I don't want to fail the 100-500 packages depending on this lib - doInstallCheck = !stdenv.isDarwin; + doInstallCheck = !stdenv.hostPlatform.isDarwin; installCheckPhase = '' set -eo pipefail diff --git a/pkgs/development/libraries/aemu/default.nix b/pkgs/development/libraries/aemu/default.nix index 0a2f6fa8b8b2..c39c68cbce1e 100644 --- a/pkgs/development/libraries/aemu/default.nix +++ b/pkgs/development/libraries/aemu/default.nix @@ -17,7 +17,7 @@ stdenv.mkDerivation { ]; nativeBuildInputs = [ cmake ]; - buildInputs = lib.optionals stdenv.isDarwin [ + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.Cocoa ]; diff --git a/pkgs/development/libraries/afflib/default.nix b/pkgs/development/libraries/afflib/default.nix index e82c3c8dfe77..eff94a276cd8 100644 --- a/pkgs/development/libraries/afflib/default.nix +++ b/pkgs/development/libraries/afflib/default.nix @@ -16,7 +16,7 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ autoreconfHook ]; buildInputs = [ zlib curl expat openssl python3 ] ++ lib.optionals (with stdenv; isLinux || isDarwin) [ fuse ] - ++ lib.optionals stdenv.isDarwin [ libiconv ]; + ++ lib.optionals stdenv.hostPlatform.isDarwin [ libiconv ]; meta = { homepage = "http://afflib.sourceforge.net/"; diff --git a/pkgs/development/libraries/agg/default.nix b/pkgs/development/libraries/agg/default.nix index bfa7449b04c6..020c2dce95d8 100644 --- a/pkgs/development/libraries/agg/default.nix +++ b/pkgs/development/libraries/agg/default.nix @@ -17,7 +17,7 @@ stdenv.mkDerivation rec { buildInputs = [ freetype SDL - ] ++ lib.optionals stdenv.isLinux [ + ] ++ lib.optionals stdenv.hostPlatform.isLinux [ libX11 ]; @@ -33,9 +33,9 @@ stdenv.mkDerivation rec { ''; configureFlags = [ - (lib.strings.enableFeature stdenv.isLinux "platform") + (lib.strings.enableFeature stdenv.hostPlatform.isLinux "platform") "--enable-examples=no" - ] ++ lib.optionals stdenv.isLinux [ + ] ++ lib.optionals stdenv.hostPlatform.isLinux [ "--x-includes=${lib.getDev libX11}/include" "--x-libraries=${lib.getLib libX11}/lib" ]; diff --git a/pkgs/development/libraries/allegro/5.nix b/pkgs/development/libraries/allegro/5.nix index 94dd96dae0e7..ee337673ee07 100644 --- a/pkgs/development/libraries/allegro/5.nix +++ b/pkgs/development/libraries/allegro/5.nix @@ -71,7 +71,7 @@ stdenv.mkDerivation rec { physfs texinfo zlib - ] ++ lib.optionals stdenv.isLinux [ + ] ++ lib.optionals stdenv.hostPlatform.isLinux [ alsa-lib libpthreadstubs libpulseaudio diff --git a/pkgs/development/libraries/aml/default.nix b/pkgs/development/libraries/aml/default.nix index 1a6900d298c6..19f3b2826223 100644 --- a/pkgs/development/libraries/aml/default.nix +++ b/pkgs/development/libraries/aml/default.nix @@ -19,6 +19,6 @@ stdenv.mkDerivation rec { license = licenses.isc; platforms = platforms.unix; maintainers = with maintainers; [ primeos ]; - broken = stdenv.isDarwin; + broken = stdenv.hostPlatform.isDarwin; }; } diff --git a/pkgs/development/libraries/apr-util/default.nix b/pkgs/development/libraries/apr-util/default.nix index 9490ff1fb6a3..ea7c9cf8c168 100644 --- a/pkgs/development/libraries/apr-util/default.nix +++ b/pkgs/development/libraries/apr-util/default.nix @@ -1,7 +1,7 @@ { lib, stdenv, fetchurl, makeWrapper, apr, expat, gnused , sslSupport ? true, openssl , bdbSupport ? true, db -, ldapSupport ? !stdenv.isCygwin, openldap +, ldapSupport ? !stdenv.hostPlatform.isCygwin, openldap , libiconv, libxcrypt , cyrus_sasl, autoreconfHook }: @@ -23,7 +23,7 @@ stdenv.mkDerivation rec { ./fix-libxcrypt-build.patch # Fix incorrect Berkeley DB detection with newer versions of clang due to implicit `int` on main errors. ./clang-bdb.patch - ] ++ lib.optional stdenv.isFreeBSD ./include-static-dependencies.patch; + ] ++ lib.optional stdenv.hostPlatform.isFreeBSD ./include-static-dependencies.patch; NIX_CFLAGS_LINK = [ "-lcrypt" ]; @@ -33,11 +33,11 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ makeWrapper autoreconfHook ]; configureFlags = [ "--with-apr=${apr.dev}" "--with-expat=${expat.dev}" ] - ++ lib.optional (!stdenv.isCygwin) "--with-crypto" + ++ lib.optional (!stdenv.hostPlatform.isCygwin) "--with-crypto" ++ lib.optional sslSupport "--with-openssl=${openssl.dev}" ++ lib.optional bdbSupport "--with-berkeley-db=${db.dev}" ++ lib.optional ldapSupport "--with-ldap=ldap" - ++ lib.optionals stdenv.isCygwin + ++ lib.optionals stdenv.hostPlatform.isCygwin [ "--without-pgsql" "--without-sqlite2" "--without-sqlite3" "--without-freetds" "--without-berkeley-db" "--without-crypto" ] ; @@ -59,7 +59,7 @@ stdenv.mkDerivation rec { ++ lib.optional sslSupport openssl ++ lib.optional bdbSupport db ++ lib.optional ldapSupport openldap - ++ lib.optional stdenv.isFreeBSD cyrus_sasl; + ++ lib.optional stdenv.hostPlatform.isFreeBSD cyrus_sasl; postInstall = '' for f in $out/lib/*.la $out/lib/apr-util-1/*.la $dev/bin/apu-1-config; do diff --git a/pkgs/development/libraries/aribb25/default.nix b/pkgs/development/libraries/aribb25/default.nix index 743850c5fdc3..4079f6278235 100644 --- a/pkgs/development/libraries/aribb25/default.nix +++ b/pkgs/development/libraries/aribb25/default.nix @@ -26,8 +26,8 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ autoreconfHook pkg-config - ] ++ lib.optional stdenv.isDarwin xcbuild; - buildInputs = if stdenv.isDarwin then [ PCSC ] else [ pcsclite ]; + ] ++ lib.optional stdenv.hostPlatform.isDarwin xcbuild; + buildInputs = if stdenv.hostPlatform.isDarwin then [ PCSC ] else [ pcsclite ]; patches = let url = commit: "https://code.videolan.org/videolan/${pname}/-/commit/${commit}.diff"; @@ -45,7 +45,7 @@ stdenv.mkDerivation rec { ]; buildFlags = - lib.optional stdenv.isDarwin "pcsclite_CFLAGS=-I${PCSC}/Library/Frameworks/PCSC.framework/Headers"; + lib.optional stdenv.hostPlatform.isDarwin "pcsclite_CFLAGS=-I${PCSC}/Library/Frameworks/PCSC.framework/Headers"; meta = with lib; { description = "Sample implementation of the ARIB STD-B25 standard"; diff --git a/pkgs/development/libraries/arrayfire/default.nix b/pkgs/development/libraries/arrayfire/default.nix index 5ea144ef9bc3..eb928f99e88a 100644 --- a/pkgs/development/libraries/arrayfire/default.nix +++ b/pkgs/development/libraries/arrayfire/default.nix @@ -29,7 +29,7 @@ , cpuSupport ? true , cudaSupport ? config.cudaSupport # OpenCL needs mesa which is broken on Darwin -, openclSupport ? !stdenv.isDarwin +, openclSupport ? !stdenv.hostPlatform.isDarwin # This argument lets one run CUDA & OpenCL tests on non-NixOS systems by # telling Nix where to find the drivers. If you know the version of the # Nvidia driver that is installed on your system, you can do: diff --git a/pkgs/development/libraries/asio/generic.nix b/pkgs/development/libraries/asio/generic.nix index cb9f1eb30246..44dd9e056874 100644 --- a/pkgs/development/libraries/asio/generic.nix +++ b/pkgs/development/libraries/asio/generic.nix @@ -19,7 +19,7 @@ stdenv.mkDerivation { homepage = "http://asio.sourceforge.net/"; description = "Cross-platform C++ library for network and low-level I/O programming"; license = licenses.boost; - broken = stdenv.isDarwin && lib.versionOlder version "1.16.1"; + broken = stdenv.hostPlatform.isDarwin && lib.versionOlder version "1.16.1"; platforms = platforms.unix; }; } diff --git a/pkgs/development/libraries/audio/cubeb/default.nix b/pkgs/development/libraries/audio/cubeb/default.nix index dd7033b1910e..478e8478382a 100644 --- a/pkgs/development/libraries/audio/cubeb/default.nix +++ b/pkgs/development/libraries/audio/cubeb/default.nix @@ -9,10 +9,10 @@ , AudioUnit , CoreAudio , CoreServices -, lazyLoad ? !stdenv.isDarwin +, lazyLoad ? !stdenv.hostPlatform.isDarwin }: -assert lib.assertMsg (stdenv.isDarwin -> !lazyLoad) "cubeb: lazyLoad is inert on Darwin"; +assert lib.assertMsg (stdenv.hostPlatform.isDarwin -> !lazyLoad) "cubeb: lazyLoad is inert on Darwin"; let backendLibs = [ @@ -39,7 +39,7 @@ in stdenv.mkDerivation { ]; buildInputs = [ speexdsp ] ++ ( - if stdenv.isDarwin then [ AudioUnit CoreAudio CoreServices ] + if stdenv.hostPlatform.isDarwin then [ AudioUnit CoreAudio CoreServices ] else backendLibs ); diff --git a/pkgs/development/libraries/audio/game-music-emu/default.nix b/pkgs/development/libraries/audio/game-music-emu/default.nix index 94b8d1cbc375..050f47545438 100644 --- a/pkgs/development/libraries/audio/game-music-emu/default.nix +++ b/pkgs/development/libraries/audio/game-music-emu/default.nix @@ -16,7 +16,7 @@ stdenv.mkDerivation rec { # it doesn't. disallowedReferences = [ stdenv.cc.cc ]; - postFixup = lib.optionalString stdenv.isLinux '' + postFixup = lib.optionalString stdenv.hostPlatform.isLinux '' remove-references-to -t ${stdenv.cc.cc} "$(readlink -f $out/lib/libgme.so)" ''; diff --git a/pkgs/development/libraries/audio/libopenmpt/default.nix b/pkgs/development/libraries/audio/libopenmpt/default.nix index a08b93a9b0e5..500533ce8203 100644 --- a/pkgs/development/libraries/audio/libopenmpt/default.nix +++ b/pkgs/development/libraries/audio/libopenmpt/default.nix @@ -10,7 +10,7 @@ , portaudio , libsndfile , flac -, usePulseAudio ? config.pulseaudio or stdenv.isLinux +, usePulseAudio ? config.pulseaudio or stdenv.hostPlatform.isLinux , libpulseaudio }: diff --git a/pkgs/development/libraries/audio/lv2/default.nix b/pkgs/development/libraries/audio/lv2/default.nix index 8391c93cc594..c9ddffbff227 100644 --- a/pkgs/development/libraries/audio/lv2/default.nix +++ b/pkgs/development/libraries/audio/lv2/default.nix @@ -41,7 +41,7 @@ stdenv.mkDerivation rec { "-Dtests=disabled" # Avoid heavyweight python dependencies. "-Ddocs=disabled" - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ "-Dlv2dir=${placeholder "out"}/lib/lv2" ]; diff --git a/pkgs/development/libraries/audio/suil/default.nix b/pkgs/development/libraries/audio/suil/default.nix index 350adc8a4583..099c3ca42793 100644 --- a/pkgs/development/libraries/audio/suil/default.nix +++ b/pkgs/development/libraries/audio/suil/default.nix @@ -18,7 +18,7 @@ gtk3, withQt5 ? true, qt5, - withX11 ? !stdenv.isDarwin, + withX11 ? !stdenv.hostPlatform.isDarwin, }: let diff --git a/pkgs/development/libraries/audiofile/default.nix b/pkgs/development/libraries/audiofile/default.nix index f9974e2ca253..3a65f2535b7c 100644 --- a/pkgs/development/libraries/audiofile/default.nix +++ b/pkgs/development/libraries/audiofile/default.nix @@ -15,9 +15,9 @@ stdenv.mkDerivation rec { version = "0.3.6"; buildInputs = - lib.optionals stdenv.isLinux [ + lib.optionals stdenv.hostPlatform.isLinux [ alsa-lib - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ CoreServices AudioUnit ]; diff --git a/pkgs/development/libraries/avahi/default.nix b/pkgs/development/libraries/avahi/default.nix index 95f82d8def2b..3e9be1f5fc71 100644 --- a/pkgs/development/libraries/avahi/default.nix +++ b/pkgs/development/libraries/avahi/default.nix @@ -141,7 +141,7 @@ stdenv.mkDerivation rec { expat libiconv libevent - ] ++ lib.optionals stdenv.isFreeBSD [ + ] ++ lib.optionals stdenv.hostPlatform.isFreeBSD [ libpcap ] ++ lib.optionals gtk3Support [ gtk3 @@ -171,7 +171,7 @@ stdenv.mkDerivation rec { "--with-systemdsystemunitdir=no" ] ++ lib.optionals withLibdnssdCompat [ "--enable-compat-libdns_sd" - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ # autoipd won't build on darwin "--disable-autoipd" ]; @@ -183,7 +183,7 @@ stdenv.mkDerivation rec { "sysconfdir=${placeholder "out"}/etc" ]; - preBuild = lib.optionalString stdenv.isDarwin '' + preBuild = lib.optionalString stdenv.hostPlatform.isDarwin '' sed -i '20 i\ #define __APPLE_USE_RFC_2292' \ avahi-core/socket.c diff --git a/pkgs/development/libraries/aws-sdk-cpp/default.nix b/pkgs/development/libraries/aws-sdk-cpp/default.nix index 631c5a90faf5..6e549526a14c 100644 --- a/pkgs/development/libraries/aws-sdk-cpp/default.nix +++ b/pkgs/development/libraries/aws-sdk-cpp/default.nix @@ -58,7 +58,7 @@ stdenv.mkDerivation rec { rm tests/aws-cpp-sdk-core-tests/aws/auth/AWSAuthSignerTest.cpp # TestRandomURLMultiThreaded fails rm tests/aws-cpp-sdk-core-tests/http/HttpClientTest.cpp - '' + lib.optionalString stdenv.isi686 '' + '' + lib.optionalString stdenv.hostPlatform.isi686 '' # EPSILON is exceeded rm tests/aws-cpp-sdk-core-tests/aws/client/AdaptiveRetryStrategyTest.cpp ''; @@ -71,7 +71,7 @@ stdenv.mkDerivation rec { buildInputs = [ curl openssl zlib - ] ++ lib.optionals (stdenv.isDarwin && + ] ++ lib.optionals (stdenv.hostPlatform.isDarwin && ((builtins.elem "text-to-speech" apis) || (builtins.elem "*" apis))) [ CoreAudio AudioToolbox ]; diff --git a/pkgs/development/libraries/azmq/default.nix b/pkgs/development/libraries/azmq/default.nix index 7317c51aabde..83bbd9f98f9e 100644 --- a/pkgs/development/libraries/azmq/default.nix +++ b/pkgs/development/libraries/azmq/default.nix @@ -31,7 +31,7 @@ stdenv.mkDerivation { ]; # Broken for some reason on this platform. - doCheck = !(stdenv.isAarch64 && stdenv.isLinux); + doCheck = !(stdenv.hostPlatform.isAarch64 && stdenv.hostPlatform.isLinux); meta = with lib; { homepage = "https://github.com/zeromq/azmq"; diff --git a/pkgs/development/libraries/blitz/default.nix b/pkgs/development/libraries/blitz/default.nix index d48669845485..4351e0ac729c 100644 --- a/pkgs/development/libraries/blitz/default.nix +++ b/pkgs/development/libraries/blitz/default.nix @@ -54,11 +54,11 @@ stdenv.mkDerivation rec { cmakeFlags = optional enablePadding "-DARRAY_LENGTH_PADDING=ON" ++ optional enableSerialization "-DENABLE_SERIALISATION=ON" - ++ optional stdenv.is64bit "-DBZ_FULLY64BIT=ON"; + ++ optional stdenv.hostPlatform.is64bit "-DBZ_FULLY64BIT=ON"; # FIXME ++ optional doCheck "-DBUILD_TESTING=ON"; # skip broken library name detection - ax_boost_user_serialization_lib = lib.optionalString stdenv.isDarwin "boost_serialization"; + ax_boost_user_serialization_lib = lib.optionalString stdenv.hostPlatform.isDarwin "boost_serialization"; enableParallelBuilding = true; diff --git a/pkgs/development/libraries/blst/default.nix b/pkgs/development/libraries/blst/default.nix index 2bf2e2c614e7..50d080b9bf91 100644 --- a/pkgs/development/libraries/blst/default.nix +++ b/pkgs/development/libraries/blst/default.nix @@ -59,9 +59,9 @@ stdenv.mkDerivation ( finalAttrs: { # ensure we have the right install id set. Otherwise the library # wouldn't be found during install. The alternative would be to work - # lib.optional stdenv.isDarwin "LDFLAGS=-Wl,-install_name,$(out)/lib/libblst.dylib"; + # lib.optional stdenv.hostPlatform.isDarwin "LDFLAGS=-Wl,-install_name,$(out)/lib/libblst.dylib"; # into the setup.sh - postFixup = lib.optionalString stdenv.isDarwin '' + postFixup = lib.optionalString stdenv.hostPlatform.isDarwin '' install_name_tool -id $out/lib/libblst.dylib $out/lib/libblst.dylib ''; diff --git a/pkgs/development/libraries/boost/generic.nix b/pkgs/development/libraries/boost/generic.nix index 4362bdcb6dab..9c6fb3e67203 100644 --- a/pkgs/development/libraries/boost/generic.nix +++ b/pkgs/development/libraries/boost/generic.nix @@ -52,7 +52,7 @@ let # To avoid library name collisions layout = if taggedLayout then "tagged" else "system"; - needUserConfig = stdenv.hostPlatform != stdenv.buildPlatform || useMpi || (stdenv.isDarwin && enableShared); + needUserConfig = stdenv.hostPlatform != stdenv.buildPlatform || useMpi || (stdenv.hostPlatform.isDarwin && enableShared); b2Args = lib.concatStringsSep " " ([ "--includedir=$dev/include" @@ -107,7 +107,7 @@ stdenv.mkDerivation { patchFlags = []; patches = patches - ++ lib.optional stdenv.isDarwin ./darwin-no-system-python.patch + ++ lib.optional stdenv.hostPlatform.isDarwin ./darwin-no-system-python.patch ++ [ ./cmake-paths-173.patch ] ++ lib.optional (version == "1.77.0") (fetchpatch { url = "https://github.com/boostorg/math/commit/7d482f6ebc356e6ec455ccb5f51a23971bf6ce5b.patch"; @@ -177,7 +177,7 @@ stdenv.mkDerivation { # On darwin we need to add the `$out/lib` to the libraries' rpath explicitly, # otherwise the dynamic linker is unable to resolve the reference to @rpath # when the boost libraries want to load each other at runtime. - + lib.optionalString (stdenv.isDarwin && enableShared) '' + + lib.optionalString (stdenv.hostPlatform.isDarwin && enableShared) '' cat << EOF >> user-config.jam using clang-darwin : : ${stdenv.cc.targetPrefix}c++ : "-rpath $out/lib/" @@ -214,7 +214,7 @@ stdenv.mkDerivation { ''; env = { - NIX_CFLAGS_LINK = lib.optionalString stdenv.isDarwin "-headerpad_max_install_names"; + NIX_CFLAGS_LINK = lib.optionalString stdenv.hostPlatform.isDarwin "-headerpad_max_install_names"; # copyPkgconfigItems will substitute these in the pkg-config file includedir = "${placeholder "dev"}/include"; libdir = "${placeholder "out"}/lib"; diff --git a/pkgs/development/libraries/boringssl/default.nix b/pkgs/development/libraries/boringssl/default.nix index 9bb0967bd5c6..01c3884c428f 100644 --- a/pkgs/development/libraries/boringssl/default.nix +++ b/pkgs/development/libraries/boringssl/default.nix @@ -41,7 +41,7 @@ buildGoModule { ''; # CMAKE_OSX_ARCHITECTURES is set to x86_64 by Nix, but it confuses boringssl on aarch64-linux. - cmakeFlags = [ "-GNinja" ] ++ lib.optionals (stdenv.isLinux) [ "-DCMAKE_OSX_ARCHITECTURES=" ]; + cmakeFlags = [ "-GNinja" ] ++ lib.optionals (stdenv.hostPlatform.isLinux) [ "-DCMAKE_OSX_ARCHITECTURES=" ]; installPhase = '' mkdir -p $bin/bin $dev $out/lib diff --git a/pkgs/development/libraries/botan/default.nix b/pkgs/development/libraries/botan/default.nix index 81c38c2d982b..976144b1b5ca 100644 --- a/pkgs/development/libraries/botan/default.nix +++ b/pkgs/development/libraries/botan/default.nix @@ -50,7 +50,7 @@ let bzip2 zlib ] - ++ lib.optionals stdenv.isDarwin ( + ++ lib.optionals stdenv.hostPlatform.isDarwin ( with darwin.apple_sdk.frameworks; [ CoreServices diff --git a/pkgs/development/libraries/box2d/default.nix b/pkgs/development/libraries/box2d/default.nix index a445a0c53315..acc2d96caf4a 100644 --- a/pkgs/development/libraries/box2d/default.nix +++ b/pkgs/development/libraries/box2d/default.nix @@ -46,7 +46,7 @@ stdenv.mkDerivation (finalAttrs: { libXrandr xorgproto libXi - ] ++ optionals stdenv.isDarwin [ + ] ++ optionals stdenv.hostPlatform.isDarwin [ Carbon Cocoa Kernel OpenGL ]; diff --git a/pkgs/development/libraries/brunsli/default.nix b/pkgs/development/libraries/brunsli/default.nix index 03c9b02f7f9f..e9d379a74d31 100644 --- a/pkgs/development/libraries/brunsli/default.nix +++ b/pkgs/development/libraries/brunsli/default.nix @@ -35,7 +35,7 @@ stdenv.mkDerivation rec { postPatch = '' rm -r third_party - '' + lib.optionalString stdenv.isDarwin '' + '' + lib.optionalString stdenv.hostPlatform.isDarwin '' rm -r build ''; diff --git a/pkgs/development/libraries/bullet/default.nix b/pkgs/development/libraries/bullet/default.nix index 5ba9186dcac9..4a161423c7d3 100644 --- a/pkgs/development/libraries/bullet/default.nix +++ b/pkgs/development/libraries/bullet/default.nix @@ -21,13 +21,13 @@ stdenv.mkDerivation rec { }; nativeBuildInputs = [ cmake ]; - buildInputs = lib.optionals stdenv.isLinux [ libGLU libGL libglut ] - ++ lib.optionals stdenv.isDarwin [ Cocoa OpenGL ]; + buildInputs = lib.optionals stdenv.hostPlatform.isLinux [ libGLU libGL libglut ] + ++ lib.optionals stdenv.hostPlatform.isDarwin [ Cocoa OpenGL ]; postPatch = '' substituteInPlace examples/ThirdPartyLibs/Gwen/CMakeLists.txt \ --replace "-DGLEW_STATIC" "-DGLEW_STATIC -Wno-narrowing" - '' + lib.optionalString stdenv.isDarwin '' + '' + lib.optionalString stdenv.hostPlatform.isDarwin '' sed -i 's/FIND_PACKAGE(OpenGL)//' CMakeLists.txt sed -i 's/FIND_LIBRARY(COCOA_LIBRARY Cocoa)//' CMakeLists.txt ''; @@ -36,7 +36,7 @@ stdenv.mkDerivation rec { "-DBUILD_SHARED_LIBS=ON" "-DBUILD_CPU_DEMOS=OFF" "-DINSTALL_EXTRA_LIBS=ON" - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ "-DOPENGL_FOUND=true" "-DOPENGL_LIBRARIES=${OpenGL}/Library/Frameworks/OpenGL.framework" "-DOPENGL_INCLUDE_DIR=${OpenGL}/Library/Frameworks/OpenGL.framework" diff --git a/pkgs/development/libraries/bullet/roboschool-fork.nix b/pkgs/development/libraries/bullet/roboschool-fork.nix index c5f6f3a436d2..bcc963f5b466 100644 --- a/pkgs/development/libraries/bullet/roboschool-fork.nix +++ b/pkgs/development/libraries/bullet/roboschool-fork.nix @@ -18,12 +18,12 @@ stdenv.mkDerivation { }; nativeBuildInputs = [ cmake ]; - buildInputs = lib.optionals stdenv.isLinux [ libGLU libGL libglut ] - ++ lib.optionals stdenv.isDarwin [ Cocoa OpenGL ]; + buildInputs = lib.optionals stdenv.hostPlatform.isLinux [ libGLU libGL libglut ] + ++ lib.optionals stdenv.hostPlatform.isDarwin [ Cocoa OpenGL ]; patches = [ ./gwen-narrowing.patch ]; - postPatch = lib.optionalString stdenv.isDarwin '' + postPatch = lib.optionalString stdenv.hostPlatform.isDarwin '' sed -i 's/FIND_PACKAGE(OpenGL)//' CMakeLists.txt sed -i 's/FIND_LIBRARY(COCOA_LIBRARY Cocoa)//' CMakeLists.txt ''; @@ -32,7 +32,7 @@ stdenv.mkDerivation { "-DBUILD_SHARED_LIBS=ON" "-DBUILD_CPU_DEMOS=OFF" "-DINSTALL_EXTRA_LIBS=ON" - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ "-DOPENGL_FOUND=true" "-DOPENGL_LIBRARIES=${OpenGL}/Library/Frameworks/OpenGL.framework" "-DOPENGL_INCLUDE_DIR=${OpenGL}/Library/Frameworks/OpenGL.framework" @@ -53,6 +53,6 @@ stdenv.mkDerivation { platforms = platforms.unix; # /tmp/nix-build-bullet-2019-03-27.drv-0/source/src/Bullet3Common/b3Vector3.h:297:7: error: argument value 10880 is outside the valid range [0, 255] [-Wargument-outside-range] # y = b3_splat_ps(y, 0x80); - broken = (stdenv.isDarwin && stdenv.isx86_64); + broken = (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isx86_64); }; } diff --git a/pkgs/development/libraries/caf/default.nix b/pkgs/development/libraries/caf/default.nix index 854032d56157..9180457a3165 100644 --- a/pkgs/development/libraries/caf/default.nix +++ b/pkgs/development/libraries/caf/default.nix @@ -19,9 +19,9 @@ stdenv.mkDerivation rec { "-DCAF_ENABLE_EXAMPLES:BOOL=OFF" ]; - env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.isDarwin "-faligned-allocation"; + env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.hostPlatform.isDarwin "-faligned-allocation"; - doCheck = !stdenv.isDarwin; + doCheck = !stdenv.hostPlatform.isDarwin; checkTarget = "test"; meta = with lib; { diff --git a/pkgs/development/libraries/cairo/default.nix b/pkgs/development/libraries/cairo/default.nix index 28809ade8ae4..4368965d4f18 100644 --- a/pkgs/development/libraries/cairo/default.nix +++ b/pkgs/development/libraries/cairo/default.nix @@ -1,6 +1,6 @@ { lib, stdenv, fetchurl, gtk-doc, meson, ninja, pkg-config, python3 , docbook_xsl, fontconfig, freetype, libpng, pixman, zlib -, x11Support? !stdenv.isDarwin || true, libXext, libXrender +, x11Support? !stdenv.hostPlatform.isDarwin || true, libXext, libXrender , gobjectSupport ? true, glib , xcbSupport ? x11Support, libxcb , darwin @@ -34,7 +34,7 @@ in { buildInputs = [ docbook_xsl - ] ++ optionals stdenv.isDarwin (with darwin.apple_sdk.frameworks; [ + ] ++ optionals stdenv.hostPlatform.isDarwin (with darwin.apple_sdk.frameworks; [ CoreGraphics CoreText ApplicationServices @@ -87,7 +87,7 @@ in { # `-I' flags to be propagated. sed -i "$out/lib/pkgconfig/cairo.pc" \ -es'|^Cflags:\(.*\)$|Cflags: \1 -I${freetype.dev}/include/freetype2 -I${freetype.dev}/include|g' - '' + lib.optionalString stdenv.isDarwin glib.flattenInclude; + '' + lib.optionalString stdenv.hostPlatform.isDarwin glib.flattenInclude; passthru.tests.pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage; diff --git a/pkgs/development/libraries/cairomm/1.16.nix b/pkgs/development/libraries/cairomm/1.16.nix index 83428f0fef9b..cd561d009187 100644 --- a/pkgs/development/libraries/cairomm/1.16.nix +++ b/pkgs/development/libraries/cairomm/1.16.nix @@ -31,7 +31,7 @@ stdenv.mkDerivation rec { buildInputs = [ boost # for tests fontconfig - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ ApplicationServices ]; @@ -45,7 +45,7 @@ stdenv.mkDerivation rec { ]; # Tests fail on Darwin, possibly because of sandboxing. - doCheck = !stdenv.isDarwin; + doCheck = !stdenv.hostPlatform.isDarwin; meta = with lib; { description = "C++ bindings for the Cairo vector graphics library"; diff --git a/pkgs/development/libraries/cairomm/default.nix b/pkgs/development/libraries/cairomm/default.nix index 957cfa26ac73..382770e144f5 100644 --- a/pkgs/development/libraries/cairomm/default.nix +++ b/pkgs/development/libraries/cairomm/default.nix @@ -31,7 +31,7 @@ stdenv.mkDerivation rec { buildInputs = [ boost # for tests fontconfig - ] ++ lib.optionals stdenv.isDarwin (with darwin.apple_sdk.frameworks; [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin (with darwin.apple_sdk.frameworks; [ ApplicationServices ]); @@ -44,7 +44,7 @@ stdenv.mkDerivation rec { "-Dbuild-tests=true" ]; - doCheck = !stdenv.isDarwin; + doCheck = !stdenv.hostPlatform.isDarwin; meta = with lib; { description = "C++ bindings for the Cairo vector graphics library"; diff --git a/pkgs/development/libraries/capstone/4.nix b/pkgs/development/libraries/capstone/4.nix index dd31e9feaf62..836bb47568c3 100644 --- a/pkgs/development/libraries/capstone/4.nix +++ b/pkgs/development/libraries/capstone/4.nix @@ -18,7 +18,7 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ cmake - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ fixDarwinDylibNames ]; diff --git a/pkgs/development/libraries/capstone/default.nix b/pkgs/development/libraries/capstone/default.nix index b78b007bc597..1aed26cec87d 100644 --- a/pkgs/development/libraries/capstone/default.nix +++ b/pkgs/development/libraries/capstone/default.nix @@ -20,7 +20,7 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ cmake - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ fixDarwinDylibNames ]; diff --git a/pkgs/development/libraries/catboost/default.nix b/pkgs/development/libraries/catboost/default.nix index 3824cf046b95..ca0d22ff002c 100644 --- a/pkgs/development/libraries/catboost/default.nix +++ b/pkgs/development/libraries/catboost/default.nix @@ -68,7 +68,7 @@ stdenv.mkDerivation (finalAttrs: { buildInputs = [ openssl zlib - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ libiconv ] ++ lib.optionals cudaSupport (with cudaPackages; [ cuda_cudart @@ -81,7 +81,7 @@ stdenv.mkDerivation (finalAttrs: { # after bumping the default version of llvm, check for compatibility with the cuda backend and pin it. # see https://catboost.ai/en/docs/installation/build-environment-setup-for-cmake#compilers,-linkers-and-related-tools CUDAHOSTCXX = lib.optionalString cudaSupport "${llvmPackages_12.stdenv.cc}/bin/cc"; - NIX_CFLAGS_LINK = lib.optionalString stdenv.isLinux "-fuse-ld=lld"; + NIX_CFLAGS_LINK = lib.optionalString stdenv.hostPlatform.isLinux "-fuse-ld=lld"; NIX_LDFLAGS = "-lc -lm"; }; diff --git a/pkgs/development/libraries/catch2/3.nix b/pkgs/development/libraries/catch2/3.nix index 5985ec519ae4..c7d2296d9629 100644 --- a/pkgs/development/libraries/catch2/3.nix +++ b/pkgs/development/libraries/catch2/3.nix @@ -25,13 +25,13 @@ stdenv.mkDerivation rec { cmakeFlags = [ "-DCATCH_DEVELOPMENT_BUILD=ON" "-DCATCH_BUILD_TESTING=${if doCheck then "ON" else "OFF"}" - ] ++ lib.optionals (stdenv.isDarwin && doCheck) [ + ] ++ lib.optionals (stdenv.hostPlatform.isDarwin && doCheck) [ # test has a faulty path normalization technique that won't work in # our darwin build environment https://github.com/catchorg/Catch2/issues/1691 "-DCMAKE_CTEST_ARGUMENTS=-E;ApprovalTests" ]; - env = lib.optionalAttrs stdenv.isx86_32 { + env = lib.optionalAttrs stdenv.hostPlatform.isx86_32 { # Tests fail on x86_32 if compiled with x87 floats: https://github.com/catchorg/Catch2/issues/2796 NIX_CFLAGS_COMPILE = "-msse2 -mfpmath=sse"; } // lib.optionalAttrs (stdenv.hostPlatform.isRiscV || stdenv.hostPlatform.isAarch32) { diff --git a/pkgs/development/libraries/cctag/default.nix b/pkgs/development/libraries/cctag/default.nix index 238821b6af91..8b37633acfcb 100644 --- a/pkgs/development/libraries/cctag/default.nix +++ b/pkgs/development/libraries/cctag/default.nix @@ -53,7 +53,7 @@ stdenv.mkDerivation rec { ]; # Tests are broken on Darwin (linking issue) - doCheck = !stdenv.isDarwin; + doCheck = !stdenv.hostPlatform.isDarwin; meta = with lib; { description = "Detection of CCTag markers made up of concentric circles"; diff --git a/pkgs/development/libraries/cctz/default.nix b/pkgs/development/libraries/cctz/default.nix index c0f8a58a18d9..4ad0bf6b8034 100644 --- a/pkgs/development/libraries/cctz/default.nix +++ b/pkgs/development/libraries/cctz/default.nix @@ -13,13 +13,13 @@ stdenv.mkDerivation rec { makeFlags = [ "PREFIX=$(out)" ]; - buildInputs = lib.optional stdenv.isDarwin Foundation; + buildInputs = lib.optional stdenv.hostPlatform.isDarwin Foundation; installTargets = [ "install_hdrs" ] ++ lib.optional (!stdenv.hostPlatform.isStatic) "install_shared_lib" ++ lib.optional stdenv.hostPlatform.isStatic "install_lib"; - postInstall = lib.optionalString stdenv.isDarwin '' + postInstall = lib.optionalString stdenv.hostPlatform.isDarwin '' install_name_tool -id $out/lib/libcctz.so $out/lib/libcctz.so ''; diff --git a/pkgs/development/libraries/cdo/default.nix b/pkgs/development/libraries/cdo/default.nix index 3de126d111ef..3c63b23d1ce2 100644 --- a/pkgs/development/libraries/cdo/default.nix +++ b/pkgs/development/libraries/cdo/default.nix @@ -32,7 +32,7 @@ stdenv.mkDerivation rec { # evaluates to 0 [-Werror,-Wundef-prefix=TARGET_OS_] # we don't want to appear to be a catalyst build; # we are a TARGET_OS_MAC - env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.isDarwin "-DTARGET_OS_MACCATALYST=0"; + env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.hostPlatform.isDarwin "-DTARGET_OS_MACCATALYST=0"; meta = with lib; { description = "Collection of command line Operators to manipulate and analyse Climate and NWP model Data"; diff --git a/pkgs/development/libraries/cegui/default.nix b/pkgs/development/libraries/cegui/default.nix index af52aabca79b..e92ddafc4322 100644 --- a/pkgs/development/libraries/cegui/default.nix +++ b/pkgs/development/libraries/cegui/default.nix @@ -33,7 +33,7 @@ stdenv.mkDerivation { freetype boost expat - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.Cocoa darwin.apple_sdk.frameworks.Foundation libiconv diff --git a/pkgs/development/libraries/check/default.nix b/pkgs/development/libraries/check/default.nix index 14b4e549264b..10030f5653c2 100644 --- a/pkgs/development/libraries/check/default.nix +++ b/pkgs/development/libraries/check/default.nix @@ -17,7 +17,7 @@ stdenv.mkDerivation rec { # Test can randomly fail: https://hydra.nixos.org/build/7243912 doCheck = false; - buildInputs = lib.optional stdenv.isDarwin CoreServices; + buildInputs = lib.optional stdenv.hostPlatform.isDarwin CoreServices; meta = with lib; { description = "Unit testing framework for C"; diff --git a/pkgs/development/libraries/chromaprint/default.nix b/pkgs/development/libraries/chromaprint/default.nix index 934a4b04a96b..e264693ceab8 100644 --- a/pkgs/development/libraries/chromaprint/default.nix +++ b/pkgs/development/libraries/chromaprint/default.nix @@ -42,7 +42,7 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ cmake ninja ]; - buildInputs = [ ffmpeg_7 ] ++ lib.optionals stdenv.isDarwin + buildInputs = [ ffmpeg_7 ] ++ lib.optionals stdenv.hostPlatform.isDarwin (with darwin.apple_sdk.frameworks; [ Accelerate CoreGraphics CoreVideo zlib ]); cmakeFlags = [ "-DBUILD_EXAMPLES=ON" "-DBUILD_TOOLS=ON" ]; diff --git a/pkgs/development/libraries/classads/default.nix b/pkgs/development/libraries/classads/default.nix index bbe342d98198..0442c7d21209 100644 --- a/pkgs/development/libraries/classads/default.nix +++ b/pkgs/development/libraries/classads/default.nix @@ -18,7 +18,7 @@ stdenv.mkDerivation rec { ]; # error: use of undeclared identifier 'finite'; did you mean 'isfinite'? - env.NIX_CFLAGS_COMPILE = lib.optionalString (stdenv.isDarwin && stdenv.isAarch64) "-Dfinite=isfinite"; + env.NIX_CFLAGS_COMPILE = lib.optionalString (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isAarch64) "-Dfinite=isfinite"; meta = { homepage = "http://www.cs.wisc.edu/condor/classad/"; diff --git a/pkgs/development/libraries/clfft/default.nix b/pkgs/development/libraries/clfft/default.nix index 824449b0fafc..5843c1b1fcca 100644 --- a/pkgs/development/libraries/clfft/default.nix +++ b/pkgs/development/libraries/clfft/default.nix @@ -23,8 +23,8 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ cmake ]; buildInputs = [ fftw fftwFloat boost ] - ++ lib.optionals stdenv.isLinux [ opencl-clhpp ocl-icd ] - ++ lib.optionals stdenv.isDarwin [ OpenCL ]; + ++ lib.optionals stdenv.hostPlatform.isLinux [ opencl-clhpp ocl-icd ] + ++ lib.optionals stdenv.hostPlatform.isDarwin [ OpenCL ]; # https://github.com/clMathLibraries/clFFT/issues/237 CXXFLAGS = "-std=c++98"; diff --git a/pkgs/development/libraries/clucene-core/2.x.nix b/pkgs/development/libraries/clucene-core/2.x.nix index d6049d284513..6fc4ac289677 100644 --- a/pkgs/development/libraries/clucene-core/2.x.nix +++ b/pkgs/development/libraries/clucene-core/2.x.nix @@ -40,7 +40,7 @@ stdenv.mkDerivation rec { # required for darwin and linux-musl ./pthread-include.patch - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ ./fix-darwin.patch # see https://bugs.gentoo.org/869170 @@ -51,7 +51,7 @@ stdenv.mkDerivation rec { ]; # see https://github.com/macports/macports-ports/commit/236d43f2450c6be52dc42fd3a2bbabbaa5136201 - postPatch = lib.optionalString stdenv.isDarwin '' + postPatch = lib.optionalString stdenv.hostPlatform.isDarwin '' substituteInPlace src/shared/CMakeLists.txt --replace 'fstati64;_fstati64;fstat64;fstat;_fstat' 'fstat;_fstat' substituteInPlace src/shared/CMakeLists.txt --replace 'stati64;_stati64;stat64;stat;_stat' 'stat;_stat' ''; diff --git a/pkgs/development/libraries/clutter/default.nix b/pkgs/development/libraries/clutter/default.nix index d6720eb181f4..bb7ddf08957f 100644 --- a/pkgs/development/libraries/clutter/default.nix +++ b/pkgs/development/libraries/clutter/default.nix @@ -45,7 +45,7 @@ stdenv.mkDerivation rec { atk json-glib gobject-introspection - ] ++ lib.optionals (!stdenv.isDarwin) [ + ] ++ lib.optionals (!stdenv.hostPlatform.isDarwin) [ libX11 libGL libGLU @@ -62,7 +62,7 @@ stdenv.mkDerivation rec { configureFlags = [ "--enable-introspection" # needed by muffin AFAIK - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ "--without-x" "--enable-x11-backend=no" "--enable-quartz-backend=yes" diff --git a/pkgs/development/libraries/cmark/default.nix b/pkgs/development/libraries/cmark/default.nix index a118ecf1adda..83407c64384d 100644 --- a/pkgs/development/libraries/cmark/default.nix +++ b/pkgs/development/libraries/cmark/default.nix @@ -22,7 +22,7 @@ stdenv.mkDerivation rec { doCheck = true; preCheck = let - lib_path = if stdenv.isDarwin then "DYLD_FALLBACK_LIBRARY_PATH" else "LD_LIBRARY_PATH"; + lib_path = if stdenv.hostPlatform.isDarwin then "DYLD_FALLBACK_LIBRARY_PATH" else "LD_LIBRARY_PATH"; in '' export ${lib_path}=$(readlink -f ./src) ''; diff --git a/pkgs/development/libraries/cminpack/default.nix b/pkgs/development/libraries/cminpack/default.nix index 20782c8499cb..81224c0fdaa3 100644 --- a/pkgs/development/libraries/cminpack/default.nix +++ b/pkgs/development/libraries/cminpack/default.nix @@ -25,7 +25,7 @@ stdenv.mkDerivation rec { buildInputs = lib.optionals withBlas [ blas - ] ++ lib.optionals (withBlas && stdenv.isDarwin) [ + ] ++ lib.optionals (withBlas && stdenv.hostPlatform.isDarwin) [ darwin.apple_sdk.frameworks.Accelerate darwin.apple_sdk.frameworks.CoreGraphics darwin.apple_sdk.frameworks.CoreVideo diff --git a/pkgs/development/libraries/cmrt/default.nix b/pkgs/development/libraries/cmrt/default.nix index 87c692b42cea..2e3fc7a3a198 100644 --- a/pkgs/development/libraries/cmrt/default.nix +++ b/pkgs/development/libraries/cmrt/default.nix @@ -16,7 +16,7 @@ stdenv.mkDerivation rec { buildInputs = [ libdrm libva ]; meta = with lib; { - broken = (stdenv.isLinux && stdenv.isAarch64); + broken = (stdenv.hostPlatform.isLinux && stdenv.hostPlatform.isAarch64); homepage = "https://01.org/linuxmedia"; description = "Intel C for Media Runtime"; longDescription = "Media GPU kernel manager for Intel G45 & HD Graphics family"; diff --git a/pkgs/development/libraries/cogl/default.nix b/pkgs/development/libraries/cogl/default.nix index b233113e951f..db34dc1669b1 100644 --- a/pkgs/development/libraries/cogl/default.nix +++ b/pkgs/development/libraries/cogl/default.nix @@ -46,7 +46,7 @@ stdenv.mkDerivation rec { configureFlags = [ "--enable-introspection" - ] ++ lib.optionals (!stdenv.isDarwin) [ + ] ++ lib.optionals (!stdenv.hostPlatform.isDarwin) [ "--enable-kms-egl-platform" "--enable-wayland-egl-platform" "--enable-wayland-egl-server" @@ -55,7 +55,7 @@ stdenv.mkDerivation rec { # Force linking against libGL. # Otherwise, it tries to load it from the runtime library path. "LIBS=-lGL" - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ "--disable-glx" "--without-x" ] ++ lib.optionals gstreamerSupport [ @@ -68,7 +68,7 @@ stdenv.mkDerivation rec { glib gdk-pixbuf gobject-introspection - ] ++ lib.optionals stdenv.isLinux [ + ] ++ lib.optionals stdenv.hostPlatform.isLinux [ wayland mesa libGL @@ -82,10 +82,10 @@ stdenv.mkDerivation rec { ]; buildInputs = lib.optionals pangoSupport [ pango cairo harfbuzz ] - ++ lib.optionals stdenv.isDarwin [ OpenGL ]; + ++ lib.optionals stdenv.hostPlatform.isDarwin [ OpenGL ]; env = { - COGL_PANGO_DEP_CFLAGS = toString (lib.optionals (stdenv.isDarwin && pangoSupport) [ + COGL_PANGO_DEP_CFLAGS = toString (lib.optionals (stdenv.hostPlatform.isDarwin && pangoSupport) [ "-I${pango.dev}/include/pango-1.0" "-I${cairo.dev}/include/cairo" "-I${harfbuzz.dev}/include/harfbuzz" diff --git a/pkgs/development/libraries/coin3d/default.nix b/pkgs/development/libraries/coin3d/default.nix index 3261a848e3a6..a0d1ae07d636 100644 --- a/pkgs/development/libraries/coin3d/default.nix +++ b/pkgs/development/libraries/coin3d/default.nix @@ -25,7 +25,7 @@ stdenv.mkDerivation (finalAttrs: { boost libGL libGLU - ] ++ lib.optional stdenv.isLinux libX11; + ] ++ lib.optional stdenv.hostPlatform.isLinux libX11; cmakeFlags = [ "-DCOIN_USE_CPACK=OFF" ]; diff --git a/pkgs/development/libraries/cpp-utilities/default.nix b/pkgs/development/libraries/cpp-utilities/default.nix index d2fbecf8e61b..1d838b0ba2a2 100644 --- a/pkgs/development/libraries/cpp-utilities/default.nix +++ b/pkgs/development/libraries/cpp-utilities/default.nix @@ -19,7 +19,7 @@ stdenv.mkDerivation (finalAttrs: { nativeBuildInputs = [ cmake ]; nativeCheckInputs = [ cppunit ]; - buildInputs = lib.optionals stdenv.isDarwin [ + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ libiconv # needed on Darwin, see https://github.com/Martchus/cpp-utilities/issues/4 ]; @@ -32,7 +32,7 @@ stdenv.mkDerivation (finalAttrs: { ) ''; # tests fail on Darwin - doCheck = !stdenv.isDarwin; + doCheck = !stdenv.hostPlatform.isDarwin; meta = with lib; { homepage = "https://github.com/Martchus/cpp-utilities"; diff --git a/pkgs/development/libraries/cracklib/default.nix b/pkgs/development/libraries/cracklib/default.nix index 2ccb2988305e..bc69141bb988 100644 --- a/pkgs/development/libraries/cracklib/default.nix +++ b/pkgs/development/libraries/cracklib/default.nix @@ -15,7 +15,7 @@ stdenv.mkDerivation rec { hash = "sha256-cAw5YMplCx6vAhfWmskZuBHyB1o4dGd7hMceOG3V51Y="; }; - patches = lib.optionals stdenv.isDarwin [ + patches = lib.optionals stdenv.hostPlatform.isDarwin [ # Fixes build failure on Darwin due to missing byte order functions. # https://github.com/cracklib/cracklib/pull/96 (fetchpatch2 { diff --git a/pkgs/development/libraries/crc32c/default.nix b/pkgs/development/libraries/crc32c/default.nix index 3b27601bcbfd..07da71e32670 100644 --- a/pkgs/development/libraries/crc32c/default.nix +++ b/pkgs/development/libraries/crc32c/default.nix @@ -21,7 +21,7 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ cmake ]; buildInputs = [ gflags ]; - env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.isAarch64 "-march=armv8-a+crc"; + env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.hostPlatform.isAarch64 "-march=armv8-a+crc"; cmakeFlags = [ "-DCRC32C_INSTALL=1" diff --git a/pkgs/development/libraries/crossguid/default.nix b/pkgs/development/libraries/crossguid/default.nix index c4c015d92481..cd8f95957c4e 100644 --- a/pkgs/development/libraries/crossguid/default.nix +++ b/pkgs/development/libraries/crossguid/default.nix @@ -22,7 +22,7 @@ stdenv.mkDerivation rec { ]; nativeBuildInputs = [ cmake ]; - buildInputs = lib.optional stdenv.isLinux libuuid; + buildInputs = lib.optional stdenv.hostPlatform.isLinux libuuid; passthru.updateScript = unstableGitUpdater { tagPrefix = "v"; diff --git a/pkgs/development/libraries/ctranslate2/default.nix b/pkgs/development/libraries/ctranslate2/default.nix index 4668404f9794..b126cff5b24a 100644 --- a/pkgs/development/libraries/ctranslate2/default.nix +++ b/pkgs/development/libraries/ctranslate2/default.nix @@ -52,7 +52,7 @@ stdenv.mkDerivation rec { "-DWITH_RUY=${cmakeBool withRuy}" "-DWITH_MKL=${cmakeBool withMkl}" ] - ++ lib.optional stdenv.isDarwin "-DWITH_ACCELERATE=ON"; + ++ lib.optional stdenv.hostPlatform.isDarwin "-DWITH_ACCELERATE=ON"; buildInputs = lib.optionals withMkl [ mkl @@ -67,10 +67,10 @@ stdenv.mkDerivation rec { oneDNN ] ++ lib.optionals withOpenblas [ openblas - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ llvmPackages.openmp darwin.apple_sdk.frameworks.Accelerate - ] ++ lib.optionals (stdenv.isDarwin && stdenv.isx86_64) [ + ] ++ lib.optionals (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isx86_64) [ darwin.apple_sdk.frameworks.CoreGraphics darwin.apple_sdk.frameworks.CoreVideo ]; diff --git a/pkgs/development/libraries/cyrus-sasl/default.nix b/pkgs/development/libraries/cyrus-sasl/default.nix index 0b151bfc719a..60a0d8569a13 100644 --- a/pkgs/development/libraries/cyrus-sasl/default.nix +++ b/pkgs/development/libraries/cyrus-sasl/default.nix @@ -33,7 +33,7 @@ stdenv.mkDerivation rec { buildInputs = [ openssl db gettext libkrb5 libxcrypt ] ++ lib.optional enableLdap openldap - ++ lib.optional stdenv.isLinux pam; + ++ lib.optional stdenv.hostPlatform.isLinux pam; configureFlags = [ "--with-openssl=${openssl.dev}" @@ -47,7 +47,7 @@ stdenv.mkDerivation rec { "CFLAGS=-DTIME_WITH_SYS_TIME" ]; - installFlags = lib.optionals stdenv.isDarwin [ "framedir=$(out)/Library/Frameworks/SASL2.framework" ]; + installFlags = lib.optionals stdenv.hostPlatform.isDarwin [ "framedir=$(out)/Library/Frameworks/SASL2.framework" ]; passthru.tests = { inherit (nixosTests) parsedmarc postfix; diff --git a/pkgs/development/libraries/db/generic.nix b/pkgs/development/libraries/db/generic.nix index d715c1ffc8b1..936aed633a44 100644 --- a/pkgs/development/libraries/db/generic.nix +++ b/pkgs/development/libraries/db/generic.nix @@ -67,7 +67,7 @@ stdenv.mkDerivation (rec { (if compat185 then "--enable-compat185" else "--disable-compat185") ] ++ lib.optional dbmSupport "--enable-dbm" - ++ lib.optional stdenv.isFreeBSD "--with-pic"; + ++ lib.optional stdenv.hostPlatform.isFreeBSD "--with-pic"; preConfigure = '' cd build_unix diff --git a/pkgs/development/libraries/dbus/default.nix b/pkgs/development/libraries/dbus/default.nix index cb5fe9e4fbd3..017c83c5b11d 100644 --- a/pkgs/development/libraries/dbus/default.nix +++ b/pkgs/development/libraries/dbus/default.nix @@ -13,7 +13,7 @@ , xmlto , autoreconfHook , autoconf-archive -, x11Support ? (stdenv.isLinux || stdenv.isDarwin) +, x11Support ? (stdenv.hostPlatform.isLinux || stdenv.hostPlatform.isDarwin) , xorg }: @@ -26,7 +26,7 @@ stdenv.mkDerivation rec { sha256 = "sha256-uh8h0r2dM52i1KqHgMCd8y/qh5mLc9ok9Jq53x42pQ8="; }; - patches = lib.optional stdenv.isSunOS ./implement-getgrouplist.patch; + patches = lib.optional stdenv.hostPlatform.isSunOS ./implement-getgrouplist.patch; postPatch = '' substituteInPlace bus/Makefile.am \ @@ -65,7 +65,7 @@ stdenv.mkDerivation rec { libICE libSM ]) ++ lib.optional enableSystemd systemdMinimal - ++ lib.optionals stdenv.isLinux [ audit libapparmor ]; + ++ lib.optionals stdenv.hostPlatform.isLinux [ audit libapparmor ]; # ToDo: optional selinux? __darwinAllowLocalNetworking = true; @@ -84,10 +84,10 @@ stdenv.mkDerivation rec { "--with-systemdsystemunitdir=${placeholder "out"}/etc/systemd/system" "--with-systemduserunitdir=${placeholder "out"}/etc/systemd/user" ] ++ lib.optional (!x11Support) "--without-x" - ++ lib.optionals stdenv.isLinux [ "--enable-apparmor" "--enable-libaudit" ] + ++ lib.optionals stdenv.hostPlatform.isLinux [ "--enable-apparmor" "--enable-libaudit" ] ++ lib.optionals enableSystemd [ "SYSTEMCTL=${systemdMinimal}/bin/systemctl" ]; - NIX_CFLAGS_LINK = lib.optionalString (!stdenv.isDarwin) "-Wl,--as-needed"; + NIX_CFLAGS_LINK = lib.optionalString (!stdenv.hostPlatform.isDarwin) "-Wl,--as-needed"; enableParallelBuilding = true; diff --git a/pkgs/development/libraries/dclxvi/default.nix b/pkgs/development/libraries/dclxvi/default.nix index ac2664a1c9f9..34340a406a50 100644 --- a/pkgs/development/libraries/dclxvi/default.nix +++ b/pkgs/development/libraries/dclxvi/default.nix @@ -16,7 +16,7 @@ stdenv.mkDerivation { patchPhase = '' substituteInPlace Makefile \ --replace "gcc" "cc" - '' + lib.optionalString stdenv.isDarwin '' + '' + lib.optionalString stdenv.hostPlatform.isDarwin '' substituteInPlace Makefile \ --replace "-soname=libdclxvipairing.so" "-install_name,libdclxvipairing.so" ''; diff --git a/pkgs/development/libraries/dconf/default.nix b/pkgs/development/libraries/dconf/default.nix index 0dddcb5d6482..1aad769c6db2 100644 --- a/pkgs/development/libraries/dconf/default.nix +++ b/pkgs/development/libraries/dconf/default.nix @@ -61,7 +61,7 @@ stdenv.mkDerivation rec { dbus # for dbus-daemon ]; - doCheck = !stdenv.isAarch32 && !stdenv.isAarch64 && !stdenv.isDarwin; + doCheck = !stdenv.hostPlatform.isAarch32 && !stdenv.hostPlatform.isAarch64 && !stdenv.hostPlatform.isDarwin; postPatch = '' chmod +x meson_post_install.py tests/test-dconf.py diff --git a/pkgs/development/libraries/discord-rpc/default.nix b/pkgs/development/libraries/discord-rpc/default.nix index f0c60e9506d5..05837c823c56 100644 --- a/pkgs/development/libraries/discord-rpc/default.nix +++ b/pkgs/development/libraries/discord-rpc/default.nix @@ -23,7 +23,7 @@ stdenv.mkDerivation rec { buildInputs = [ rapidjson - ] ++ lib.optional stdenv.isDarwin AppKit; + ] ++ lib.optional stdenv.hostPlatform.isDarwin AppKit; cmakeFlags = [ "-DBUILD_SHARED_LIBS=true" diff --git a/pkgs/development/libraries/double-conversion/default.nix b/pkgs/development/libraries/double-conversion/default.nix index 212b854c1e33..857bb48c1154 100644 --- a/pkgs/development/libraries/double-conversion/default.nix +++ b/pkgs/development/libraries/double-conversion/default.nix @@ -16,7 +16,7 @@ stdenv.mkDerivation rec { cmakeFlags = lib.optional (! enableStatic) "-DBUILD_SHARED_LIBS=ON"; # Case sensitivity issue - preConfigure = lib.optionalString stdenv.isDarwin '' + preConfigure = lib.optionalString stdenv.hostPlatform.isDarwin '' rm BUILD ''; diff --git a/pkgs/development/libraries/duckdb/default.nix b/pkgs/development/libraries/duckdb/default.nix index c222b117fff9..ea7b2535f329 100644 --- a/pkgs/development/libraries/duckdb/default.nix +++ b/pkgs/development/libraries/duckdb/default.nix @@ -98,12 +98,12 @@ stdenv.mkDerivation (finalAttrs: { # wants http connection "test/sql/copy/csv/recursive_query_csv.test" "test/sql/copy/csv/test_mixed_lines.test" - ] ++ lib.optionals stdenv.isAarch64 [ + ] ++ lib.optionals stdenv.hostPlatform.isAarch64 [ "test/sql/aggregate/aggregates/test_kurtosis.test" "test/sql/aggregate/aggregates/test_skewness.test" "test/sql/function/list/aggregates/skewness.test" ]); - LD_LIBRARY_PATH = lib.optionalString stdenv.isDarwin "DY" + "LD_LIBRARY_PATH"; + LD_LIBRARY_PATH = lib.optionalString stdenv.hostPlatform.isDarwin "DY" + "LD_LIBRARY_PATH"; in '' runHook preInstallCheck diff --git a/pkgs/development/libraries/easyloggingpp/default.nix b/pkgs/development/libraries/easyloggingpp/default.nix index 0923d2b450bc..a3b891253bf4 100644 --- a/pkgs/development/libraries/easyloggingpp/default.nix +++ b/pkgs/development/libraries/easyloggingpp/default.nix @@ -16,7 +16,7 @@ stdenv.mkDerivation rec { buildInputs = [gtest]; cmakeFlags = [ "-Dtest=ON" ]; env.NIX_CFLAGS_COMPILE = "-std=c++14" + - lib.optionalString stdenv.isLinux " -pthread"; + lib.optionalString stdenv.hostPlatform.isLinux " -pthread"; postInstall = '' mkdir -p $out/include cp ../src/easylogging++.cc $out/include diff --git a/pkgs/development/libraries/edencommon/default.nix b/pkgs/development/libraries/edencommon/default.nix index fa10344826af..ce26bc6f7125 100644 --- a/pkgs/development/libraries/edencommon/default.nix +++ b/pkgs/development/libraries/edencommon/default.nix @@ -20,14 +20,14 @@ stdenv.mkDerivation rec { sha256 = "sha256-1z4QicS98juv4bUEbHBkCjVJHEhnoJyLYp4zMHmDbMg="; }; - patches = lib.optionals (stdenv.isDarwin && stdenv.isx86_64) [ + patches = lib.optionals (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isx86_64) [ # Test discovery timeout is bizarrely flaky on `x86_64-darwin` ./increase-test-discovery-timeout.patch ]; nativeBuildInputs = [ cmake ]; - cmakeFlags = lib.optionals stdenv.isDarwin [ + cmakeFlags = lib.optionals stdenv.hostPlatform.isDarwin [ "-DCMAKE_OSX_DEPLOYMENT_TARGET=10.14" # For aligned allocation ]; diff --git a/pkgs/development/libraries/embree/default.nix b/pkgs/development/libraries/embree/default.nix index b53be3ae7cf5..f45ea3dc7d3d 100644 --- a/pkgs/development/libraries/embree/default.nix +++ b/pkgs/development/libraries/embree/default.nix @@ -30,7 +30,7 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ ispc pkg-config cmake ]; buildInputs = [ tbb glfw openimageio libjpeg libpng libX11 libpthreadstubs ] - ++ lib.optionals stdenv.isDarwin [ glib ]; + ++ lib.optionals stdenv.hostPlatform.isDarwin [ glib ]; meta = with lib; { description = "High performance ray tracing kernels from Intel"; diff --git a/pkgs/development/libraries/enchant/2.x.nix b/pkgs/development/libraries/enchant/2.x.nix index 69cab2ca5b61..dbd7cefacb67 100644 --- a/pkgs/development/libraries/enchant/2.x.nix +++ b/pkgs/development/libraries/enchant/2.x.nix @@ -14,12 +14,12 @@ , withAspell ? true , withHunspell ? true , withNuspell ? true -, withAppleSpell ? stdenv.isDarwin +, withAppleSpell ? stdenv.hostPlatform.isDarwin , Cocoa }: -assert withAppleSpell -> stdenv.isDarwin; +assert withAppleSpell -> stdenv.hostPlatform.isDarwin; stdenv.mkDerivation rec { pname = "enchant"; diff --git a/pkgs/development/libraries/exempi/default.nix b/pkgs/development/libraries/exempi/default.nix index 96d8d1db7a9a..ccdd0048e2aa 100644 --- a/pkgs/development/libraries/exempi/default.nix +++ b/pkgs/development/libraries/exempi/default.nix @@ -16,9 +16,9 @@ stdenv.mkDerivation rec { ]; buildInputs = [ expat zlib boost ] - ++ lib.optionals stdenv.isDarwin [ libiconv darwin.apple_sdk.frameworks.CoreServices ]; + ++ lib.optionals stdenv.hostPlatform.isDarwin [ libiconv darwin.apple_sdk.frameworks.CoreServices ]; - doCheck = stdenv.isLinux && stdenv.is64bit; + doCheck = stdenv.hostPlatform.isLinux && stdenv.hostPlatform.is64bit; dontDisableStatic = doCheck; enableParallelBuilding = true; diff --git a/pkgs/development/libraries/exiv2/default.nix b/pkgs/development/libraries/exiv2/default.nix index 1591b8021501..56edbdab5d53 100644 --- a/pkgs/development/libraries/exiv2/default.nix +++ b/pkgs/development/libraries/exiv2/default.nix @@ -39,7 +39,7 @@ stdenv.mkDerivation rec { removeReferencesTo ]; - buildInputs = lib.optionals stdenv.isDarwin [ + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ libiconv ]; @@ -76,7 +76,7 @@ stdenv.mkDerivation rec { # Fix tests on arm # https://github.com/Exiv2/exiv2/issues/933 rm -f ../tests/bugfixes/github/test_CVE_2018_12265.py - '' + lib.optionalString stdenv.isDarwin '' + '' + lib.optionalString stdenv.hostPlatform.isDarwin '' export DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH''${DYLD_LIBRARY_PATH:+:}$PWD/lib export LC_ALL=C diff --git a/pkgs/development/libraries/expat/default.nix b/pkgs/development/libraries/expat/default.nix index bb97ca8728e0..50ae45f38e9a 100644 --- a/pkgs/development/libraries/expat/default.nix +++ b/pkgs/development/libraries/expat/default.nix @@ -37,7 +37,7 @@ stdenv.mkDerivation (finalAttrs: { enableParallelBuilding = true; - configureFlags = lib.optional stdenv.isFreeBSD "--with-pic"; + configureFlags = lib.optional stdenv.hostPlatform.isFreeBSD "--with-pic"; outputMan = "dev"; # tiny page for a dev tool diff --git a/pkgs/development/libraries/fb303/default.nix b/pkgs/development/libraries/fb303/default.nix index 059e666027a0..659497d690f6 100644 --- a/pkgs/development/libraries/fb303/default.nix +++ b/pkgs/development/libraries/fb303/default.nix @@ -27,7 +27,7 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ cmake ]; cmakeFlags = [ "-DPYTHON_EXTENSIONS=OFF" - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ "-DCMAKE_OSX_DEPLOYMENT_TARGET=10.14" # For aligned allocation ]; diff --git a/pkgs/development/libraries/fbthrift/default.nix b/pkgs/development/libraries/fbthrift/default.nix index 5ac08f2c6cc3..04bce085c088 100644 --- a/pkgs/development/libraries/fbthrift/default.nix +++ b/pkgs/development/libraries/fbthrift/default.nix @@ -39,8 +39,8 @@ stdenv.mkDerivation rec { ]; cmakeFlags = [ - "-DBUILD_SHARED_LIBS=${if stdenv.isDarwin then "OFF" else "ON"}" - ] ++ lib.optionals stdenv.isDarwin [ + "-DBUILD_SHARED_LIBS=${if stdenv.hostPlatform.isDarwin then "OFF" else "ON"}" + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ "-DCMAKE_OSX_DEPLOYMENT_TARGET=10.14" # For aligned allocation ]; diff --git a/pkgs/development/libraries/fflas-ffpack/default.nix b/pkgs/development/libraries/fflas-ffpack/default.nix index 65c29f9319ce..1d8c87ba45d1 100644 --- a/pkgs/development/libraries/fflas-ffpack/default.nix +++ b/pkgs/development/libraries/fflas-ffpack/default.nix @@ -32,7 +32,7 @@ stdenv.mkDerivation rec { "--with-blas-libs=-lcblas" "--with-lapack-libs=-llapacke" "--without-archnative" - ] ++ lib.optionals stdenv.isx86_64 [ + ] ++ lib.optionals stdenv.hostPlatform.isx86_64 [ # disable SIMD instructions (which are enabled *when available* by default) # for now we need to be careful to disable *all* relevant versions of an instruction set explicitly (https://github.com/linbox-team/fflas-ffpack/issues/284) "--${if stdenv.hostPlatform.sse3Support then "enable" else "disable"}-sse3" diff --git a/pkgs/development/libraries/ffmpeg/generic.nix b/pkgs/development/libraries/ffmpeg/generic.nix index 4e8226c1904a..dc471944654a 100644 --- a/pkgs/development/libraries/ffmpeg/generic.nix +++ b/pkgs/development/libraries/ffmpeg/generic.nix @@ -33,14 +33,14 @@ , fetchpatch2 # Feature flags -, withAlsa ? withHeadlessDeps && stdenv.isLinux # Alsa in/output supporT +, withAlsa ? withHeadlessDeps && stdenv.hostPlatform.isLinux # Alsa in/output supporT , withAmf ? lib.meta.availableOn stdenv.hostPlatform amf # AMD Media Framework video encoding , withAom ? withHeadlessDeps # AV1 reference encoder -, withAppKit ? withHeadlessDeps && stdenv.isDarwin # Apple AppKit framework +, withAppKit ? withHeadlessDeps && stdenv.hostPlatform.isDarwin # Apple AppKit framework , withAribcaption ? withFullDeps && lib.versionAtLeast version "6.1" # ARIB STD-B24 Caption Decoder/Renderer , withAss ? withHeadlessDeps && stdenv.hostPlatform == stdenv.buildPlatform # (Advanced) SubStation Alpha subtitle rendering -, withAudioToolbox ? withHeadlessDeps && stdenv.isDarwin # Apple AudioToolbox -, withAvFoundation ? withHeadlessDeps && stdenv.isDarwin # Apple AVFoundation framework +, withAudioToolbox ? withHeadlessDeps && stdenv.hostPlatform.isDarwin # Apple AudioToolbox +, withAvFoundation ? withHeadlessDeps && stdenv.hostPlatform.isDarwin # Apple AVFoundation framework , withAvisynth ? withFullDeps # AviSynth script files reading , withBluray ? withFullDeps # BluRay reading , withBs2b ? withFullDeps # bs2b DSP library @@ -49,12 +49,12 @@ , withCelt ? withHeadlessDeps # CELT decoder , withChromaprint ? withFullDeps # Audio fingerprinting , withCodec2 ? withFullDeps # codec2 en/decoding -, withCoreImage ? withHeadlessDeps && stdenv.isDarwin # Apple CoreImage framework +, withCoreImage ? withHeadlessDeps && stdenv.hostPlatform.isDarwin # Apple CoreImage framework , withCuda ? withFullDeps && withNvcodec , withCudaLLVM ? withFullDeps , withCuvid ? withHeadlessDeps && withNvcodec , withDav1d ? withHeadlessDeps # AV1 decoder (focused on speed and correctness) -, withDc1394 ? withFullDeps && !stdenv.isDarwin # IIDC-1394 grabbing (ieee 1394) +, withDc1394 ? withFullDeps && !stdenv.hostPlatform.isDarwin # IIDC-1394 grabbing (ieee 1394) , withDrm ? withHeadlessDeps && (with stdenv; isLinux || isFreeBSD) # libdrm support , withDvdnav ? withFullDeps && withGPL && lib.versionAtLeast version "7" # needed for DVD demuxing , withDvdread ? withFullDeps && withGPL && lib.versionAtLeast version "7" # needed for DVD demuxing @@ -71,14 +71,14 @@ , withHarfbuzz ? withHeadlessDeps && lib.versionAtLeast version "6.1" # Needed for drawtext filter , withIconv ? withHeadlessDeps , withIlbc ? withFullDeps # iLBC de/encoding -, withJack ? withFullDeps && !stdenv.isDarwin # Jack audio +, withJack ? withFullDeps && !stdenv.hostPlatform.isDarwin # Jack audio , withJxl ? withFullDeps && lib.versionAtLeast version "5" # JPEG XL de/encoding , withLadspa ? withFullDeps # LADSPA audio filtering , withLcms2 ? withFullDeps # ICC profile support via lcms2 , withLzma ? withHeadlessDeps # xz-utils , withMetal ? false # Unfree and requires manual downloading of files , withMfx ? withFullDeps && (with stdenv.hostPlatform; isLinux && !isAarch) # Hardware acceleration via intel-media-sdk/libmfx -, withModplug ? withFullDeps && !stdenv.isDarwin # ModPlug support +, withModplug ? withFullDeps && !stdenv.hostPlatform.isDarwin # ModPlug support , withMp3lame ? withHeadlessDeps # LAME MP3 encoder , withMysofa ? withFullDeps # HRTF support via SOFAlizer , withNvdec ? withHeadlessDeps && withNvcodec @@ -88,21 +88,21 @@ , withOpencl ? withFullDeps , withOpencoreAmrnb ? withFullDeps && withVersion3 # AMR-NB de/encoder , withOpencoreAmrwb ? withFullDeps && withVersion3 # AMR-WB decoder -, withOpengl ? withFullDeps && !stdenv.isDarwin # OpenGL rendering +, withOpengl ? withFullDeps && !stdenv.hostPlatform.isDarwin # OpenGL rendering , withOpenh264 ? withFullDeps # H.264/AVC encoder , withOpenjpeg ? withHeadlessDeps # JPEG 2000 de/encoder , withOpenmpt ? withFullDeps # Tracked music files decoder , withOpus ? withHeadlessDeps # Opus de/encoder -, withPlacebo ? withFullDeps && !stdenv.isDarwin # libplacebo video processing library -, withPulse ? withSmallDeps && stdenv.isLinux # Pulseaudio input support +, withPlacebo ? withFullDeps && !stdenv.hostPlatform.isDarwin # libplacebo video processing library +, withPulse ? withSmallDeps && stdenv.hostPlatform.isLinux # Pulseaudio input support , withQrencode ? withFullDeps && lib.versionAtLeast version "7" # QR encode generation , withQuirc ? withFullDeps && lib.versionAtLeast version "7" # QR decoding , withRav1e ? withFullDeps # AV1 encoder (focused on speed and safety) , withRtmp ? withFullDeps # RTMP[E] support , withRubberband ? withFullDeps && withGPL # Rubberband filter -, withSamba ? withFullDeps && !stdenv.isDarwin && withGPLv3 # Samba protocol +, withSamba ? withFullDeps && !stdenv.hostPlatform.isDarwin && withGPLv3 # Samba protocol , withSdl2 ? withSmallDeps -, withShaderc ? withFullDeps && !stdenv.isDarwin && lib.versionAtLeast version "5.0" +, withShaderc ? withFullDeps && !stdenv.hostPlatform.isDarwin && lib.versionAtLeast version "5.0" , withShine ? withFullDeps # Fixed-point MP3 encoding , withSnappy ? withFullDeps # Snappy compression, needed for hap encoding , withSoxr ? withHeadlessDeps # Resampling via soxr @@ -110,22 +110,22 @@ , withSrt ? withHeadlessDeps # Secure Reliable Transport (SRT) protocol , withSsh ? withHeadlessDeps # SFTP protocol , withSvg ? withFullDeps # SVG protocol -, withSvtav1 ? withHeadlessDeps && !stdenv.isAarch64 && !stdenv.hostPlatform.isMinGW # AV1 encoder/decoder (focused on speed and correctness) +, withSvtav1 ? withHeadlessDeps && !stdenv.hostPlatform.isAarch64 && !stdenv.hostPlatform.isMinGW # AV1 encoder/decoder (focused on speed and correctness) , withTensorflow ? false # Tensorflow dnn backend support (Increases closure size by ~390 MiB) , withTheora ? withHeadlessDeps # Theora encoder , withTwolame ? withFullDeps # MP2 encoding -, withV4l2 ? withHeadlessDeps && stdenv.isLinux # Video 4 Linux support +, withV4l2 ? withHeadlessDeps && stdenv.hostPlatform.isLinux # Video 4 Linux support , withV4l2M2m ? withV4l2 , withVaapi ? withHeadlessDeps && (with stdenv; isLinux || isFreeBSD) # Vaapi hardware acceleration , withVdpau ? withSmallDeps && !stdenv.hostPlatform.isMinGW # Vdpau hardware acceleration -, withVideoToolbox ? withHeadlessDeps && stdenv.isDarwin # Apple VideoToolbox +, withVideoToolbox ? withHeadlessDeps && stdenv.hostPlatform.isDarwin # Apple VideoToolbox , withVidStab ? withFullDeps && withGPL # Video stabilization -, withVmaf ? withFullDeps && !stdenv.isAarch64 && lib.versionAtLeast version "5" # Netflix's VMAF (Video Multi-Method Assessment Fusion) +, withVmaf ? withFullDeps && !stdenv.hostPlatform.isAarch64 && lib.versionAtLeast version "5" # Netflix's VMAF (Video Multi-Method Assessment Fusion) , withVoAmrwbenc ? withFullDeps && withVersion3 # AMR-WB encoder , withVorbis ? withHeadlessDeps # Vorbis de/encoding, native encoder exists , withVpl ? false # Hardware acceleration via intel libvpl , withVpx ? withHeadlessDeps && stdenv.buildPlatform == stdenv.hostPlatform # VP8 & VP9 de/encoding -, withVulkan ? withSmallDeps && !stdenv.isDarwin +, withVulkan ? withSmallDeps && !stdenv.hostPlatform.isDarwin , withWebp ? withHeadlessDeps # WebP encoder , withX264 ? withHeadlessDeps && withGPL # H.264/AVC encoder , withX265 ? withHeadlessDeps && withGPL # H.265/HEVC encoder @@ -827,7 +827,7 @@ stdenv.mkDerivation (finalAttrs: { # Fails with SIGABRT otherwise FIXME: Why? checkPhase = let - ldLibraryPathEnv = if stdenv.isDarwin then "DYLD_LIBRARY_PATH" else "LD_LIBRARY_PATH"; + ldLibraryPathEnv = if stdenv.hostPlatform.isDarwin then "DYLD_LIBRARY_PATH" else "LD_LIBRARY_PATH"; libsToLink = [ ] ++ optional buildAvcodec "libavcodec" ++ optional buildAvdevice "libavdevice" @@ -856,7 +856,7 @@ stdenv.mkDerivation (finalAttrs: { # Set RUNPATH so that libnvcuvid and libcuda in /run/opengl-driver(-32)/lib can be found. # See the explanation in addDriverRunpath. - postFixup = optionalString (stdenv.isLinux && withLib) '' + postFixup = optionalString (stdenv.hostPlatform.isLinux && withLib) '' addDriverRunpath ${placeholder "lib"}/lib/libavcodec.so addDriverRunpath ${placeholder "lib"}/lib/libavutil.so '' diff --git a/pkgs/development/libraries/fftw/default.nix b/pkgs/development/libraries/fftw/default.nix index 7c06a346e4bb..b6107f3ef91a 100644 --- a/pkgs/development/libraries/fftw/default.nix +++ b/pkgs/development/libraries/fftw/default.nix @@ -54,7 +54,7 @@ stdenv.mkDerivation (finalAttrs: { ++ lib.optional (precision != "double") "--enable-${precision}" # https://www.fftw.org/fftw3_doc/SIMD-alignment-and-fftw_005fmalloc.html # FFTW will try to detect at runtime whether the CPU supports these extensions - ++ lib.optional (stdenv.isx86_64 && (precision == "single" || precision == "double")) + ++ lib.optional (stdenv.hostPlatform.isx86_64 && (precision == "single" || precision == "double")) "--enable-sse2 --enable-avx --enable-avx2 --enable-avx512 --enable-avx128-fma" ++ lib.optional enableMpi "--enable-mpi" # doc generation causes Fortran wrapper generation which hard-codes gcc diff --git a/pkgs/development/libraries/fizz/default.nix b/pkgs/development/libraries/fizz/default.nix index cc7a249cf76f..4c38c54316b7 100644 --- a/pkgs/development/libraries/fizz/default.nix +++ b/pkgs/development/libraries/fizz/default.nix @@ -35,7 +35,7 @@ stdenv.mkDerivation (finalAttrs: { cmakeFlags = [ "-Wno-dev" (lib.cmakeBool "BUILD_TESTS" finalAttrs.finalPackage.doCheck) - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ "-DCMAKE_OSX_DEPLOYMENT_TARGET=10.14" # For aligned allocation ]; diff --git a/pkgs/development/libraries/folks/default.nix b/pkgs/development/libraries/folks/default.nix index edbebdb1b8da..777bef924662 100644 --- a/pkgs/development/libraries/folks/default.nix +++ b/pkgs/development/libraries/folks/default.nix @@ -78,7 +78,7 @@ stdenv.mkDerivation (finalAttrs: { mesonFlags = [ "-Ddocs=true" "-Dtelepathy_backend=${lib.boolToString telepathySupport}" - "-Dtests=${lib.boolToString (finalAttrs.finalPackage.doCheck && stdenv.isLinux)}" + "-Dtests=${lib.boolToString (finalAttrs.finalPackage.doCheck && stdenv.hostPlatform.isLinux)}" ]; # backends/eds/lib/libfolks-eds.so.26.0.0.p/edsf-persona-store.c:10697:4: diff --git a/pkgs/development/libraries/folly/default.nix b/pkgs/development/libraries/folly/default.nix index 532fc4847715..8a601382f8ea 100644 --- a/pkgs/development/libraries/folly/default.nix +++ b/pkgs/development/libraries/folly/default.nix @@ -55,10 +55,10 @@ stdenv.mkDerivation rec { libunwind fmt_8 zstd - ] ++ lib.optional stdenv.isLinux jemalloc; + ] ++ lib.optional stdenv.hostPlatform.isLinux jemalloc; # jemalloc headers are required in include/folly/portability/Malloc.h - propagatedBuildInputs = lib.optional stdenv.isLinux jemalloc; + propagatedBuildInputs = lib.optional stdenv.hostPlatform.isLinux jemalloc; env.NIX_CFLAGS_COMPILE = toString [ "-DFOLLY_MOBILE=${if follyMobile then "1" else "0"}" "-fpermissive" ]; cmakeFlags = [ @@ -66,13 +66,13 @@ stdenv.mkDerivation rec { # temporary hack until folly builds work on aarch64, # see https://github.com/facebook/folly/issues/1880 - "-DCMAKE_LIBRARY_ARCHITECTURE=${if stdenv.isx86_64 then "x86_64" else "dummy"}" + "-DCMAKE_LIBRARY_ARCHITECTURE=${if stdenv.hostPlatform.isx86_64 then "x86_64" else "dummy"}" # ensure correct dirs in $dev/lib/pkgconfig/libfolly.pc # see https://github.com/NixOS/nixpkgs/issues/144170 "-DCMAKE_INSTALL_INCLUDEDIR=include" "-DCMAKE_INSTALL_LIBDIR=lib" - ] ++ lib.optional (stdenv.isDarwin && stdenv.isx86_64) [ + ] ++ lib.optional (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isx86_64) [ "-DCMAKE_OSX_DEPLOYMENT_TARGET=10.13" ]; diff --git a/pkgs/development/libraries/fontconfig/default.nix b/pkgs/development/libraries/fontconfig/default.nix index 83c5e3afc271..4f7f3c0fe1e9 100644 --- a/pkgs/development/libraries/fontconfig/default.nix +++ b/pkgs/development/libraries/fontconfig/default.nix @@ -34,7 +34,7 @@ stdenv.mkDerivation (finalAttrs: { buildInputs = [ expat - ] ++ lib.optional stdenv.isDarwin CoreFoundation; + ] ++ lib.optional stdenv.hostPlatform.isDarwin CoreFoundation; propagatedBuildInputs = [ freetype diff --git a/pkgs/development/libraries/fontconfig/make-fonts-conf.nix b/pkgs/development/libraries/fontconfig/make-fonts-conf.nix index ff0d95ba4451..669b66267f87 100644 --- a/pkgs/development/libraries/fontconfig/make-fonts-conf.nix +++ b/pkgs/development/libraries/fontconfig/make-fonts-conf.nix @@ -9,13 +9,13 @@ let fontconfig_ = fontconfig; in # nix user profile "~/.nix-profile/lib/X11/fonts" "~/.nix-profile/share/fonts" ] - ++ lib.optional stdenv.isDarwin "~/Library/Fonts" + ++ lib.optional stdenv.hostPlatform.isDarwin "~/Library/Fonts" ++ [ # FHS paths for non-NixOS platforms "/usr/share/fonts" "/usr/local/share/fonts" ] # darwin paths - ++ lib.optionals stdenv.isDarwin [ "/Library/Fonts" "/System/Library/Fonts" ] + ++ lib.optionals stdenv.hostPlatform.isDarwin [ "/Library/Fonts" "/System/Library/Fonts" ] # nix default profile ++ [ "/nix/var/nix/profiles/default/lib/X11/fonts" "/nix/var/nix/profiles/default/share/fonts" ] diff --git a/pkgs/development/libraries/fox/fox-1.6.nix b/pkgs/development/libraries/fox/fox-1.6.nix index 4ceb6261231e..e10d01d2c842 100644 --- a/pkgs/development/libraries/fox/fox-1.6.nix +++ b/pkgs/development/libraries/fox/fox-1.6.nix @@ -30,7 +30,7 @@ stdenv.mkDerivation rec { buildInputs = [ libpng libjpeg libtiff zlib bzip2 libXcursor libXrandr libXext libXft libGLU libGL libXfixes xinput - ] ++ lib.optional stdenv.isDarwin CoreServices; + ] ++ lib.optional stdenv.hostPlatform.isDarwin CoreServices; doCheck = true; @@ -39,7 +39,7 @@ stdenv.mkDerivation rec { hardeningDisable = [ "format" ]; meta = { - broken = stdenv.isDarwin; + broken = stdenv.hostPlatform.isDarwin; branch = "1.6"; description = "C++ based class library for building Graphical User Interfaces"; longDescription = '' diff --git a/pkgs/development/libraries/freealut/default.nix b/pkgs/development/libraries/freealut/default.nix index dbae2b20b61c..2f98b1c8e7a2 100644 --- a/pkgs/development/libraries/freealut/default.nix +++ b/pkgs/development/libraries/freealut/default.nix @@ -12,7 +12,7 @@ stdenv.mkDerivation (finalAttrs: { }; buildInputs = [ openal - ] ++ lib.optional stdenv.isDarwin + ] ++ lib.optional stdenv.hostPlatform.isDarwin darwin.apple_sdk.frameworks.OpenAL ; diff --git a/pkgs/development/libraries/freeglut/default.nix b/pkgs/development/libraries/freeglut/default.nix index c3a0fdb797f6..590167fc7036 100644 --- a/pkgs/development/libraries/freeglut/default.nix +++ b/pkgs/development/libraries/freeglut/default.nix @@ -16,7 +16,7 @@ stdenv.mkDerivation (finalAttrs: { nativeBuildInputs = [ cmake ]; buildInputs = [ libICE libXext libXi libXrandr libXxf86vm libGLU ]; - cmakeFlags = lib.optionals stdenv.isDarwin [ + cmakeFlags = lib.optionals stdenv.hostPlatform.isDarwin [ "-DOPENGL_INCLUDE_DIR=${libGLX.dev}/include" "-DOPENGL_gl_LIBRARY:FILEPATH=${libGLX}/lib/libGL.dylib" "-DOPENGL_glu_LIBRARY:FILEPATH=${libGLU}/lib/libGLU.dylib" diff --git a/pkgs/development/libraries/freeimage/default.nix b/pkgs/development/libraries/freeimage/default.nix index 20ced14ace6e..dd63935b23fd 100644 --- a/pkgs/development/libraries/freeimage/default.nix +++ b/pkgs/development/libraries/freeimage/default.nix @@ -30,22 +30,22 @@ stdenv.mkDerivation (finalAttrs: { --replace "pkg-config" "$PKG_CONFIG" substituteInPlace Makefile.gnu \ --replace "pkg-config" "$PKG_CONFIG" - '' + lib.optionalString (stdenv.isDarwin && stdenv.isAarch64) '' + '' + lib.optionalString (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isAarch64) '' # Upstream Makefile hardcodes i386 and x86_64 architectures only substituteInPlace Makefile.osx --replace "x86_64" "arm64" ''; nativeBuildInputs = [ pkg-config - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ cctools fixDarwinDylibNames - ] ++ lib.optionals (stdenv.isDarwin && stdenv.isAarch64) [ + ] ++ lib.optionals (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isAarch64) [ autoSignDarwinBinariesHook ]; buildInputs = [ libtiff libtiff.dev_private libpng zlib libwebp libraw openexr openjpeg libjpeg libjpeg.dev_private jxrlib ]; - postBuild = lib.optionalString (!stdenv.isDarwin) '' + postBuild = lib.optionalString (!stdenv.hostPlatform.isDarwin) '' make -f Makefile.fip ''; @@ -56,13 +56,13 @@ stdenv.mkDerivation (finalAttrs: { mkdir -p $INCDIR $INSTALLDIR '' # Workaround for Makefiles.osx not using ?= - + lib.optionalString stdenv.isDarwin '' + + lib.optionalString stdenv.hostPlatform.isDarwin '' makeFlagsArray+=( "INCDIR=$INCDIR" "INSTALLDIR=$INSTALLDIR" ) ''; - postInstall = lib.optionalString (!stdenv.isDarwin) '' + postInstall = lib.optionalString (!stdenv.hostPlatform.isDarwin) '' make -f Makefile.fip install - '' + lib.optionalString stdenv.isDarwin '' + '' + lib.optionalString stdenv.hostPlatform.isDarwin '' ln -s $out/lib/libfreeimage.3.dylib $out/lib/libfreeimage.dylib ''; diff --git a/pkgs/development/libraries/freenect/default.nix b/pkgs/development/libraries/freenect/default.nix index 4be38fbef062..f58785c1e1bd 100644 --- a/pkgs/development/libraries/freenect/default.nix +++ b/pkgs/development/libraries/freenect/default.nix @@ -14,7 +14,7 @@ stdenv.mkDerivation rec { }; buildInputs = [ libusb1 libglut libGLU libGL libXi libXmu ] - ++ lib.optionals stdenv.isDarwin [ GLUT Cocoa ]; + ++ lib.optionals stdenv.hostPlatform.isDarwin [ GLUT Cocoa ]; nativeBuildInputs = [ cmake pkg-config ]; diff --git a/pkgs/development/libraries/freetype/default.nix b/pkgs/development/libraries/freetype/default.nix index 8ff0005d0ff0..34e156256afd 100644 --- a/pkgs/development/libraries/freetype/default.nix +++ b/pkgs/development/libraries/freetype/default.nix @@ -51,7 +51,7 @@ stdenv.mkDerivation (finalAttrs: { nativeBuildInputs = [ pkg-config which ] ++ lib.optional (!stdenv.hostPlatform.isWindows) makeWrapper # FreeType requires GNU Make, which is not part of stdenv on FreeBSD. - ++ lib.optional (!stdenv.isLinux) gnumake; + ++ lib.optional (!stdenv.hostPlatform.isLinux) gnumake; patches = [ ./enable-table-validation.patch @@ -65,7 +65,7 @@ stdenv.mkDerivation (finalAttrs: { CC_BUILD = "${buildPackages.stdenv.cc}/bin/cc"; # The asm for armel is written with the 'asm' keyword. - CFLAGS = lib.optionalString stdenv.isAarch32 "-std=gnu99" + CFLAGS = lib.optionalString stdenv.hostPlatform.isAarch32 "-std=gnu99" + lib.optionalString stdenv.hostPlatform.is32bit " -D_FILE_OFFSET_BITS=64"; enableParallelBuilding = true; diff --git a/pkgs/development/libraries/freexl/default.nix b/pkgs/development/libraries/freexl/default.nix index 74d4a646b074..ffcf81e92f58 100644 --- a/pkgs/development/libraries/freexl/default.nix +++ b/pkgs/development/libraries/freexl/default.nix @@ -23,7 +23,7 @@ stdenv.mkDerivation rec { expat minizip zlib - ] ++ lib.optional stdenv.isDarwin libiconv; + ] ++ lib.optional stdenv.hostPlatform.isDarwin libiconv; enableParallelBuilding = true; diff --git a/pkgs/development/libraries/fribidi/default.nix b/pkgs/development/libraries/fribidi/default.nix index f5d6bcc7df34..691b826e3af5 100644 --- a/pkgs/development/libraries/fribidi/default.nix +++ b/pkgs/development/libraries/fribidi/default.nix @@ -26,7 +26,7 @@ stdenv.mkDerivation (finalAttrs: { ''; nativeBuildInputs = [ meson ninja pkg-config ] - ++ lib.optional stdenv.isDarwin fixDarwinDylibNames; + ++ lib.optional stdenv.hostPlatform.isDarwin fixDarwinDylibNames; depsBuildBuild = [ buildPackages.stdenv.cc ]; diff --git a/pkgs/development/libraries/g2o/default.nix b/pkgs/development/libraries/g2o/default.nix index 7ff0c207060c..6f6560ea9f3f 100644 --- a/pkgs/development/libraries/g2o/default.nix +++ b/pkgs/development/libraries/g2o/default.nix @@ -28,7 +28,7 @@ mkDerivation rec { # Detection script is broken "-DQGLVIEWER_INCLUDE_DIR=${libqglviewer}/include/QGLViewer" "-DG2O_BUILD_EXAMPLES=OFF" - ] ++ lib.optionals stdenv.isx86_64 [ + ] ++ lib.optionals stdenv.hostPlatform.isx86_64 [ "-DDO_SSE_AUTODETECT=OFF" "-DDISABLE_SSE3=${ if stdenv.hostPlatform.sse3Support then "OFF" else "ON"}" "-DDISABLE_SSE4_1=${if stdenv.hostPlatform.sse4_1Support then "OFF" else "ON"}" @@ -43,6 +43,6 @@ mkDerivation rec { maintainers = with maintainers; [ lopsided98 ]; platforms = platforms.all; # fatal error: 'qglviewer.h' file not found - broken = stdenv.isDarwin; + broken = stdenv.hostPlatform.isDarwin; }; } diff --git a/pkgs/development/libraries/galario/default.nix b/pkgs/development/libraries/galario/default.nix index 8b54cfb7b879..add2445f4462 100644 --- a/pkgs/development/libraries/galario/default.nix +++ b/pkgs/development/libraries/galario/default.nix @@ -31,7 +31,7 @@ stdenv.mkDerivation rec { buildInputs = [ fftw fftwFloat ] ++ lib.optional enablePython pythonPackages.python - ++ lib.optional stdenv.isDarwin llvmPackages.openmp + ++ lib.optional stdenv.hostPlatform.isDarwin llvmPackages.openmp ; propagatedBuildInputs = lib.optionals enablePython [ @@ -49,7 +49,7 @@ stdenv.mkDerivation rec { ''; preCheck = '' - ${if stdenv.isDarwin then "export DYLD_LIBRARY_PATH=$(pwd)/src/" else "export LD_LIBRARY_PATH=$(pwd)/src/"} + ${if stdenv.hostPlatform.isDarwin then "export DYLD_LIBRARY_PATH=$(pwd)/src/" else "export LD_LIBRARY_PATH=$(pwd)/src/"} ${lib.optionalString enablePython "sed -i -e 's|^#!.*|#!${stdenv.shell}|' python/py.test.sh"} ''; @@ -60,7 +60,7 @@ stdenv.mkDerivation rec { doCheck = true; - postInstall = lib.optionalString (stdenv.isDarwin && enablePython) '' + postInstall = lib.optionalString (stdenv.hostPlatform.isDarwin && enablePython) '' install_name_tool -change libgalario.dylib $out/lib/libgalario.dylib $out/lib/python*/site-packages/galario/double/libcommon.so install_name_tool -change libgalario_single.dylib $out/lib/libgalario_single.dylib $out/lib/python*/site-packages/galario/single/libcommon.so ''; diff --git a/pkgs/development/libraries/garmintools/default.nix b/pkgs/development/libraries/garmintools/default.nix index e183a24c8128..2c5740692f4b 100644 --- a/pkgs/development/libraries/garmintools/default.nix +++ b/pkgs/development/libraries/garmintools/default.nix @@ -14,6 +14,6 @@ stdenv.mkDerivation rec { maintainers = [ ]; platforms = lib.platforms.unix; # never built on aarch64-darwin since first introduction in nixpkgs - broken = stdenv.isDarwin && stdenv.isAarch64; + broken = stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isAarch64; }; } diff --git a/pkgs/development/libraries/gbenchmark/default.nix b/pkgs/development/libraries/gbenchmark/default.nix index bf60ec5e4297..be39b0d7cbdd 100644 --- a/pkgs/development/libraries/gbenchmark/default.nix +++ b/pkgs/development/libraries/gbenchmark/default.nix @@ -30,7 +30,7 @@ stdenv.mkDerivation rec { ''; # Tests fail on 32-bit due to not enough precision - doCheck = stdenv.is64bit; + doCheck = stdenv.hostPlatform.is64bit; passthru.tests = { inherit prometheus-cpp; diff --git a/pkgs/development/libraries/gcc/libstdc++/5.nix b/pkgs/development/libraries/gcc/libstdc++/5.nix index 48a034aebceb..455c84e5dc18 100644 --- a/pkgs/development/libraries/gcc/libstdc++/5.nix +++ b/pkgs/development/libraries/gcc/libstdc++/5.nix @@ -114,6 +114,6 @@ stdenv.mkDerivation rec { platforms = platforms.linux; maintainers = with maintainers; [ abbradar ]; # never built on aarch64-linux since first introduction in nixpkgs - broken = stdenv.isLinux && stdenv.isAarch64; + broken = stdenv.hostPlatform.isLinux && stdenv.hostPlatform.isAarch64; }; } diff --git a/pkgs/development/libraries/gd/default.nix b/pkgs/development/libraries/gd/default.nix index 0a74d6122ee2..6b1a471d4aac 100644 --- a/pkgs/development/libraries/gd/default.nix +++ b/pkgs/development/libraries/gd/default.nix @@ -40,7 +40,7 @@ stdenv.mkDerivation rec { "--enable-gd-formats" ] # -pthread gets passed to clang, causing warnings - ++ lib.optional stdenv.isDarwin "--enable-werror=no"; + ++ lib.optional stdenv.hostPlatform.isDarwin "--enable-werror=no"; nativeBuildInputs = [ autoconf automake pkg-config ]; diff --git a/pkgs/development/libraries/gdal/default.nix b/pkgs/development/libraries/gdal/default.nix index cf2ff67acf41..18f82b99afa0 100644 --- a/pkgs/development/libraries/gdal/default.nix +++ b/pkgs/development/libraries/gdal/default.nix @@ -4,7 +4,7 @@ , fetchFromGitHub , useMinimalFeatures ? false -, useTiledb ? (!useMinimalFeatures) && !(stdenv.isDarwin && stdenv.isx86_64) +, useTiledb ? (!useMinimalFeatures) && !(stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isx86_64) , useLibHEIF ? (!useMinimalFeatures) , useLibJXL ? (!useMinimalFeatures) , useMysql ? (!useMinimalFeatures) @@ -107,9 +107,9 @@ stdenv.mkDerivation (finalAttrs: { "-DMYSQL_LIBRARY=${lib.getLib libmysqlclient}/lib/${lib.optionalString (libmysqlclient.pname != "mysql") "mysql/"}libmysqlclient${stdenv.hostPlatform.extensions.sharedLibrary}" ] ++ lib.optionals finalAttrs.doInstallCheck [ "-DBUILD_TESTING=ON" - ] ++ lib.optionals (!stdenv.isDarwin) [ + ] ++ lib.optionals (!stdenv.hostPlatform.isDarwin) [ "-DCMAKE_SKIP_BUILD_RPATH=ON" # without, libgdal.so can't find libmariadb.so - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ "-DCMAKE_BUILD_WITH_INSTALL_NAME_DIR=ON" ] ++ lib.optionals (!useTiledb) [ "-DGDAL_USE_TILEDB=OFF" @@ -145,8 +145,8 @@ stdenv.mkDerivation (finalAttrs: { netCdfDeps = lib.optionals useNetCDF [ netcdf ]; armadilloDeps = lib.optionals useArmadillo [ armadillo ]; - darwinDeps = lib.optionals stdenv.isDarwin [ libiconv ]; - nonDarwinDeps = lib.optionals (!stdenv.isDarwin) ([ + darwinDeps = lib.optionals stdenv.hostPlatform.isDarwin [ libiconv ]; + nonDarwinDeps = lib.optionals (!stdenv.hostPlatform.isDarwin) ([ # tests for formats enabled by these packages fail on macos openexr xercesc @@ -256,10 +256,10 @@ stdenv.mkDerivation (finalAttrs: { # failing with PROJ 9.3.1 # https://github.com/OSGeo/gdal/issues/8908 "test_osr_esri_28" - ] ++ lib.optionals (!stdenv.isx86_64) [ + ] ++ lib.optionals (!stdenv.hostPlatform.isx86_64) [ # likely precision-related expecting x87 behaviour "test_jp2openjpeg_22" - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ # flaky on macos "test_rda_download_queue" ] ++ lib.optionals (lib.versionOlder proj.version "8") [ diff --git a/pkgs/development/libraries/gdcm/default.nix b/pkgs/development/libraries/gdcm/default.nix index 33afe0ea7c54..50ad7bdd9fd6 100644 --- a/pkgs/development/libraries/gdcm/default.nix +++ b/pkgs/development/libraries/gdcm/default.nix @@ -51,7 +51,7 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ cmake pkg-config - ] ++ lib.optional stdenv.isDarwin DarwinTools; + ] ++ lib.optional stdenv.hostPlatform.isDarwin DarwinTools; buildInputs = [ expat @@ -60,7 +60,7 @@ stdenv.mkDerivation rec { zlib ] ++ lib.optionals enableVTK [ vtk - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ ApplicationServices Cocoa libiconv @@ -77,7 +77,7 @@ stdenv.mkDerivation rec { "TestSCUValidation" # errors because 3 classes not wrapped: "TestWrapPython" - ] ++ lib.optionals (stdenv.isAarch64 && stdenv.isLinux) [ + ] ++ lib.optionals (stdenv.hostPlatform.isAarch64 && stdenv.hostPlatform.isLinux) [ "TestRescaler2" ]; diff --git a/pkgs/development/libraries/gdk-pixbuf/default.nix b/pkgs/development/libraries/gdk-pixbuf/default.nix index 59760504f98e..b7ba12245362 100644 --- a/pkgs/development/libraries/gdk-pixbuf/default.nix +++ b/pkgs/development/libraries/gdk-pixbuf/default.nix @@ -61,7 +61,7 @@ stdenv.mkDerivation (finalAttrs: { # for man pages docutils - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ fixDarwinDylibNames ] ++ lib.optionals withIntrospection [ gi-docgen @@ -105,7 +105,7 @@ stdenv.mkDerivation (finalAttrs: { moveToOutput "bin" "$dev" moveToOutput "bin/gdk-pixbuf-thumbnailer" "$out" - '' + lib.optionalString stdenv.isDarwin '' + '' + lib.optionalString stdenv.hostPlatform.isDarwin '' # meson erroneously installs loaders with .dylib extension on Darwin. # Their @rpath has to be replaced before gdk-pixbuf-query-loaders looks at them. for f in $out/${finalAttrs.passthru.moduleDir}/*.dylib; do @@ -118,7 +118,7 @@ stdenv.mkDerivation (finalAttrs: { ''; # The fixDarwinDylibNames hook doesn't patch binaries. - preFixup = lib.optionalString stdenv.isDarwin '' + preFixup = lib.optionalString stdenv.hostPlatform.isDarwin '' for f in $out/bin/* $dev/bin/*; do install_name_tool -change @rpath/libgdk_pixbuf-2.0.0.dylib $out/lib/libgdk_pixbuf-2.0.0.dylib $f done @@ -134,7 +134,7 @@ stdenv.mkDerivation (finalAttrs: { setupHook = ./setup-hook.sh; - separateDebugInfo = stdenv.isLinux; + separateDebugInfo = stdenv.hostPlatform.isLinux; passthru = { updateScript = gnome.updateScript { diff --git a/pkgs/development/libraries/gegl/default.nix b/pkgs/development/libraries/gegl/default.nix index addc4a9dbe44..95cdef473467 100644 --- a/pkgs/development/libraries/gegl/default.nix +++ b/pkgs/development/libraries/gegl/default.nix @@ -74,7 +74,7 @@ stdenv.mkDerivation rec { gexiv2 openexr suitesparse - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ OpenCL ] ++ lib.optionals stdenv.cc.isClang [ llvmPackages.openmp @@ -114,7 +114,7 @@ stdenv.mkDerivation rec { ''; # tests fail to connect to the com.apple.fonts daemon in sandboxed mode - doCheck = !stdenv.isDarwin; + doCheck = !stdenv.hostPlatform.isDarwin; meta = with lib; { description = "Graph-based image processing framework"; diff --git a/pkgs/development/libraries/gensio/default.nix b/pkgs/development/libraries/gensio/default.nix index 8a895c36e865..6a183035efbe 100644 --- a/pkgs/development/libraries/gensio/default.nix +++ b/pkgs/development/libraries/gensio/default.nix @@ -28,7 +28,7 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ autoreconfHook pkg-config ]; - buildInputs = lib.optionals stdenv.isDarwin [ openssl ]; + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ openssl ]; meta = with lib; { description = "General Stream I/O"; diff --git a/pkgs/development/libraries/geoclue/default.nix b/pkgs/development/libraries/geoclue/default.nix index 3c6a40eeb5cb..84fa20f8efad 100644 --- a/pkgs/development/libraries/geoclue/default.nix +++ b/pkgs/development/libraries/geoclue/default.nix @@ -66,7 +66,7 @@ stdenv.mkDerivation rec { avahi ] ++ lib.optionals withDemoAgent [ libnotify gdk-pixbuf - ] ++ lib.optionals (!stdenv.isDarwin) [ + ] ++ lib.optionals (!stdenv.hostPlatform.isDarwin) [ modemmanager ]; @@ -83,7 +83,7 @@ stdenv.mkDerivation rec { "-Dmozilla-api-key=5c28d1f4-9511-47ff-b11a-2bef80fc177c" "-Ddbus-srv-user=geoclue" "-Ddbus-sys-dir=${placeholder "out"}/share/dbus-1/system.d" - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ "-D3g-source=false" "-Dcdma-source=false" "-Dmodem-gps-source=false" @@ -96,7 +96,7 @@ stdenv.mkDerivation rec { ''; meta = with lib; { - broken = stdenv.isDarwin && withDemoAgent; + broken = stdenv.hostPlatform.isDarwin && withDemoAgent; description = "Geolocation framework and some data providers"; homepage = "https://gitlab.freedesktop.org/geoclue/geoclue/wikis/home"; maintainers = with maintainers; [ raskin mimame ]; diff --git a/pkgs/development/libraries/geogram/default.nix b/pkgs/development/libraries/geogram/default.nix index 619b5dfcdf57..444975de853c 100644 --- a/pkgs/development/libraries/geogram/default.nix +++ b/pkgs/development/libraries/geogram/default.nix @@ -65,7 +65,7 @@ stdenv.mkDerivation rec { ./replace-bundled-zlib.patch ]; - postPatch = lib.optionalString stdenv.isAarch64 '' + postPatch = lib.optionalString stdenv.hostPlatform.isAarch64 '' substituteInPlace cmake/platforms/*/config.cmake \ --replace "-m64" "" ''; @@ -120,7 +120,7 @@ stdenv.mkDerivation rec { # Broken on aarch64-linux as of version 1.8.3 # See https://github.com/BrunoLevy/geogram/issues/74 - broken = stdenv.isLinux && stdenv.isAarch64; + broken = stdenv.hostPlatform.isLinux && stdenv.hostPlatform.isAarch64; platforms = [ "x86_64-linux" "aarch64-linux" "x86_64-darwin" "aarch64-darwin" ]; maintainers = with maintainers; [ tmarkus ]; diff --git a/pkgs/development/libraries/geos/3.11.nix b/pkgs/development/libraries/geos/3.11.nix index fb3eccf997a1..32e1f39965d7 100644 --- a/pkgs/development/libraries/geos/3.11.nix +++ b/pkgs/development/libraries/geos/3.11.nix @@ -30,7 +30,7 @@ stdenv.mkDerivation (finalAttrs: { nativeBuildInputs = [ cmake ]; # https://github.com/libgeos/geos/issues/930 - cmakeFlags = lib.optionals (stdenv.isDarwin && stdenv.isx86_64) [ + cmakeFlags = lib.optionals (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isx86_64) [ "-DCMAKE_CTEST_ARGUMENTS=--exclude-regex;unit-geom-Envelope" ]; diff --git a/pkgs/development/libraries/geos/default.nix b/pkgs/development/libraries/geos/default.nix index 849fe64634a5..0cd143a1ded4 100644 --- a/pkgs/development/libraries/geos/default.nix +++ b/pkgs/development/libraries/geos/default.nix @@ -19,7 +19,7 @@ stdenv.mkDerivation (finalAttrs: { nativeBuildInputs = [ cmake ]; # https://github.com/libgeos/geos/issues/930 - cmakeFlags = lib.optionals (stdenv.isDarwin && stdenv.isx86_64) [ + cmakeFlags = lib.optionals (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isx86_64) [ "-DCMAKE_CTEST_ARGUMENTS=--exclude-regex;unit-geom-Envelope" ]; diff --git a/pkgs/development/libraries/getdns/default.nix b/pkgs/development/libraries/getdns/default.nix index 69d7f17dafe7..b85dc689d96c 100644 --- a/pkgs/development/libraries/getdns/default.nix +++ b/pkgs/development/libraries/getdns/default.nix @@ -62,7 +62,7 @@ in rec { nativeBuildInputs = [ cmake doxygen yq ]; buildInputs = [ getdns libyaml openssl systemd ] - ++ lib.optionals stdenv.isDarwin [ darwin.Security ]; + ++ lib.optionals stdenv.hostPlatform.isDarwin [ darwin.Security ]; postInstall = '' rm -r $out/share/doc diff --git a/pkgs/development/libraries/gettext/default.nix b/pkgs/development/libraries/gettext/default.nix index abb692aebc1e..0518a40c2930 100644 --- a/pkgs/development/libraries/gettext/default.nix +++ b/pkgs/development/libraries/gettext/default.nix @@ -25,7 +25,7 @@ stdenv.mkDerivation rec { hardeningDisable = [ "format" ]; - LDFLAGS = lib.optionalString stdenv.isSunOS "-lm -lmd -lmp -luutil -lnvpair -lnsl -lidmap -lavl -lsec"; + LDFLAGS = lib.optionalString stdenv.hostPlatform.isSunOS "-lm -lmd -lmp -luutil -lnvpair -lnsl -lidmap -lavl -lsec"; configureFlags = [ "--disable-csharp" @@ -56,7 +56,7 @@ stdenv.mkDerivation rec { buildInputs = lib.optionals (!stdenv.hostPlatform.isMinGW) [ bash ] - ++ lib.optionals (!stdenv.isLinux && !stdenv.hostPlatform.isCygwin) [ + ++ lib.optionals (!stdenv.hostPlatform.isLinux && !stdenv.hostPlatform.isCygwin) [ # HACK, see #10874 (and 14664) libiconv ]; @@ -102,6 +102,6 @@ stdenv.mkDerivation rec { }; } -// lib.optionalAttrs stdenv.isDarwin { +// lib.optionalAttrs stdenv.hostPlatform.isDarwin { makeFlags = [ "CFLAGS=-D_FORTIFY_SOURCE=0" ]; } diff --git a/pkgs/development/libraries/gexiv2/default.nix b/pkgs/development/libraries/gexiv2/default.nix index c560a3fc10e9..7a0e61cbf2b0 100644 --- a/pkgs/development/libraries/gexiv2/default.nix +++ b/pkgs/development/libraries/gexiv2/default.nix @@ -57,7 +57,7 @@ stdenv.mkDerivation rec { doCheck = true; preCheck = let - libSuffix = if stdenv.isDarwin then "2.dylib" else "so.2"; + libSuffix = if stdenv.hostPlatform.isDarwin then "2.dylib" else "so.2"; in '' # Our gobject-introspection patches make the shared library paths absolute # in the GIR files. When running unit tests, the library is not yet installed, diff --git a/pkgs/development/libraries/gfxstream/default.nix b/pkgs/development/libraries/gfxstream/default.nix index e3164c95a4c6..6dd5a11e841f 100644 --- a/pkgs/development/libraries/gfxstream/default.nix +++ b/pkgs/development/libraries/gfxstream/default.nix @@ -22,7 +22,7 @@ stdenv.mkDerivation { ]; # Ensure that meson can find an Objective-C compiler on Darwin. - postPatch = lib.optionalString stdenv.isDarwin '' + postPatch = lib.optionalString stdenv.hostPlatform.isDarwin '' substituteInPlace meson.build \ --replace-fail "project('gfxstream_backend', 'cpp', 'c'" "project('gfxstream_backend', 'cpp', 'c', 'objc'" ''; @@ -30,7 +30,7 @@ stdenv.mkDerivation { nativeBuildInputs = [ meson ninja pkg-config python3 ]; buildInputs = [ aemu libglvnd vulkan-headers vulkan-loader xorg.libX11 ] ++ lib.optionals (lib.meta.availableOn stdenv.hostPlatform libdrm) [ libdrm ] - ++ lib.optionals stdenv.isDarwin [ + ++ lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.Cocoa darwin.apple_sdk.frameworks.CoreGraphics darwin.apple_sdk.frameworks.IOKit @@ -39,7 +39,7 @@ stdenv.mkDerivation { darwin.apple_sdk.frameworks.QuartzCore ]; - env = lib.optionalAttrs stdenv.isDarwin { + env = lib.optionalAttrs stdenv.hostPlatform.isDarwin { NIX_LDFLAGS = toString [ "-framework Cocoa" "-framework IOKit" @@ -51,7 +51,7 @@ stdenv.mkDerivation { }; # dlopens libvulkan. - preConfigure = lib.optionalString (!stdenv.isDarwin) '' + preConfigure = lib.optionalString (!stdenv.hostPlatform.isDarwin) '' mesonFlagsArray=(-Dcpp_link_args="-Wl,--push-state -Wl,--no-as-needed -lvulkan -Wl,--pop-state") ''; diff --git a/pkgs/development/libraries/giflib/default.nix b/pkgs/development/libraries/giflib/default.nix index cc5ef6f64369..c6dd7c81833f 100644 --- a/pkgs/development/libraries/giflib/default.nix +++ b/pkgs/development/libraries/giflib/default.nix @@ -27,7 +27,7 @@ stdenv.mkDerivation rec { ./mingw-install-exes.patch ]; - nativeBuildInputs = lib.optionals stdenv.isDarwin [ + nativeBuildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ fixDarwinDylibNames ]; diff --git a/pkgs/development/libraries/givaro/default.nix b/pkgs/development/libraries/givaro/default.nix index 44fe14396836..a77cc10e2e36 100644 --- a/pkgs/development/libraries/givaro/default.nix +++ b/pkgs/development/libraries/givaro/default.nix @@ -40,7 +40,7 @@ stdenv.mkDerivation rec { configureFlags = [ "--without-archnative" - ] ++ lib.optionals stdenv.isx86_64 [ + ] ++ lib.optionals stdenv.hostPlatform.isx86_64 [ # disable SIMD instructions (which are enabled *when available* by default) "--${if stdenv.hostPlatform.sse3Support then "enable" else "disable"}-sse3" "--${if stdenv.hostPlatform.ssse3Support then "enable" else "disable"}-ssse3" diff --git a/pkgs/development/libraries/gjs/default.nix b/pkgs/development/libraries/gjs/default.nix index 604435cee510..99fb182bc88d 100644 --- a/pkgs/development/libraries/gjs/default.nix +++ b/pkgs/development/libraries/gjs/default.nix @@ -83,11 +83,11 @@ in stdenv.mkDerivation (finalAttrs: { mesonFlags = [ "-Dinstalled_test_prefix=${placeholder "installedTests"}" - ] ++ lib.optionals (!stdenv.isLinux || stdenv.hostPlatform.isMusl) [ + ] ++ lib.optionals (!stdenv.hostPlatform.isLinux || stdenv.hostPlatform.isMusl) [ "-Dprofiler=disabled" ]; - doCheck = !stdenv.isDarwin; + doCheck = !stdenv.hostPlatform.isDarwin; postPatch = '' patchShebangs build/choose-tests-locale.sh @@ -130,7 +130,7 @@ in stdenv.mkDerivation (finalAttrs: { runHook postCheck ''; - separateDebugInfo = stdenv.isLinux; + separateDebugInfo = stdenv.hostPlatform.isLinux; passthru = { tests = { diff --git a/pkgs/development/libraries/gl2ps/default.nix b/pkgs/development/libraries/gl2ps/default.nix index f1d67c8c8855..eec23cef70bc 100644 --- a/pkgs/development/libraries/gl2ps/default.nix +++ b/pkgs/development/libraries/gl2ps/default.nix @@ -26,11 +26,11 @@ stdenv.mkDerivation rec { buildInputs = [ zlib libpng - ] ++ lib.optionals (!stdenv.isDarwin) [ + ] ++ lib.optionals (!stdenv.hostPlatform.isDarwin) [ libGL libGLU libglut - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.OpenGL ]; diff --git a/pkgs/development/libraries/glew/1.10.nix b/pkgs/development/libraries/glew/1.10.nix index 5d8f155a5c61..a675eebaa342 100644 --- a/pkgs/development/libraries/glew/1.10.nix +++ b/pkgs/development/libraries/glew/1.10.nix @@ -13,8 +13,8 @@ stdenv.mkDerivation (finalAttrs: { sha256 = "01zki46dr5khzlyywr3cg615bcal32dazfazkf360s1znqh17i4r"; }; - buildInputs = if stdenv.isDarwin then [ AGL ] else [ libXmu libXi libXext ]; - propagatedBuildInputs = if stdenv.isDarwin then [ OpenGL ] else [ libGLU ]; # GL/glew.h includes GL/glu.h + buildInputs = if stdenv.hostPlatform.isDarwin then [ AGL ] else [ libXmu libXi libXext ]; + propagatedBuildInputs = if stdenv.hostPlatform.isDarwin then [ OpenGL ] else [ libGLU ]; # GL/glew.h includes GL/glu.h outputs = [ "out" "dev" ]; diff --git a/pkgs/development/libraries/glew/default.nix b/pkgs/development/libraries/glew/default.nix index 5b774f58717c..8d68ad086764 100644 --- a/pkgs/development/libraries/glew/default.nix +++ b/pkgs/development/libraries/glew/default.nix @@ -8,7 +8,7 @@ , libXi , libXext , OpenGL -, enableEGL ? (!stdenv.isDarwin) +, enableEGL ? (!stdenv.hostPlatform.isDarwin) , testers , mesa }: @@ -40,8 +40,8 @@ stdenv.mkDerivation (finalAttrs: { ]; nativeBuildInputs = [ cmake ]; - buildInputs = lib.optionals (!stdenv.isDarwin) [ libXmu libXi libXext ]; - propagatedBuildInputs = if stdenv.isDarwin then [ OpenGL ] else [ libGLU ]; # GL/glew.h includes GL/glu.h + buildInputs = lib.optionals (!stdenv.hostPlatform.isDarwin) [ libXmu libXi libXext ]; + propagatedBuildInputs = if stdenv.hostPlatform.isDarwin then [ OpenGL ] else [ libGLU ]; # GL/glew.h includes GL/glu.h cmakeDir = "cmake"; cmakeFlags = [ diff --git a/pkgs/development/libraries/glib/default.nix b/pkgs/development/libraries/glib/default.nix index 22df229d47cc..f44b6385b8f1 100644 --- a/pkgs/development/libraries/glib/default.nix +++ b/pkgs/development/libraries/glib/default.nix @@ -30,7 +30,7 @@ stdenv.hostPlatform.isLittleEndian == stdenv.buildPlatform.isLittleEndian }: -assert stdenv.isLinux -> util-linuxMinimal != null; +assert stdenv.hostPlatform.isLinux -> util-linuxMinimal != null; let # Some packages don't get "Cflags" from pkg-config correctly @@ -68,7 +68,7 @@ stdenv.mkDerivation (finalAttrs: { hash = "sha256-JOApxd/JtE5Fc2l63zMHipgnxIk4VVAEs7kJb6TqA08="; }; - patches = lib.optionals stdenv.isDarwin [ + patches = lib.optionals stdenv.hostPlatform.isDarwin [ ./darwin-compilation.patch # FIXME: remove when https://gitlab.gnome.org/GNOME/glib/-/merge_requests/4088 is merged and is in the tagged release (fetchpatch { @@ -142,10 +142,10 @@ stdenv.mkDerivation (finalAttrs: { bash gnum4 # install glib-gettextize and m4 macros for other apps to use ] ++ lib.optionals (lib.meta.availableOn stdenv.hostPlatform elfutils) [ elfutils - ] ++ lib.optionals stdenv.isLinux [ + ] ++ lib.optionals stdenv.hostPlatform.isLinux [ libselinux util-linuxMinimal # for libmount - ] ++ lib.optionals stdenv.isDarwin (with darwin.apple_sdk.frameworks; [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin (with darwin.apple_sdk.frameworks; [ AppKit Carbon Cocoa CoreFoundation CoreServices Foundation ]); @@ -185,7 +185,7 @@ stdenv.mkDerivation (finalAttrs: { "-Dtests=${lib.boolToString (!stdenv.hostPlatform.isStatic)}" ] ++ lib.optionals (!lib.meta.availableOn stdenv.hostPlatform elfutils) [ "-Dlibelf=disabled" - ] ++ lib.optionals stdenv.isFreeBSD [ + ] ++ lib.optionals stdenv.hostPlatform.isFreeBSD [ "-Db_lundef=false" "-Dxattr=false" ]; @@ -291,7 +291,7 @@ stdenv.mkDerivation (finalAttrs: { rm $out/lib/libglib-${librarySuffix} ''; - separateDebugInfo = stdenv.isLinux; + separateDebugInfo = stdenv.hostPlatform.isLinux; passthru = rec { gioModuleDir = "lib/gio/modules"; diff --git a/pkgs/development/libraries/glibc/common.nix b/pkgs/development/libraries/glibc/common.nix index be55dd89b7c6..6ab9d2bed560 100644 --- a/pkgs/development/libraries/glibc/common.nix +++ b/pkgs/development/libraries/glibc/common.nix @@ -205,7 +205,7 @@ stdenv.mkDerivation ({ env = { linuxHeaders = lib.optionalString withLinuxHeaders linuxHeaders; - inherit (stdenv) is64bit; + inherit (stdenv.hostPlatform) is64bit; # Needed to install share/zoneinfo/zone.tab. Set to impure /bin/sh to # prevent a retained dependency on the bootstrap tools in the stdenv-linux # bootstrap. diff --git a/pkgs/development/libraries/glibmm/2.68.nix b/pkgs/development/libraries/glibmm/2.68.nix index acace1c6a5bf..7662e5f7f190 100644 --- a/pkgs/development/libraries/glibmm/2.68.nix +++ b/pkgs/development/libraries/glibmm/2.68.nix @@ -30,7 +30,7 @@ stdenv.mkDerivation rec { glib # for glib-compile-schemas ]; - buildInputs = lib.optionals stdenv.isDarwin [ + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ Cocoa ]; diff --git a/pkgs/development/libraries/glibmm/default.nix b/pkgs/development/libraries/glibmm/default.nix index f9f8a4568a57..668f60ec10ec 100644 --- a/pkgs/development/libraries/glibmm/default.nix +++ b/pkgs/development/libraries/glibmm/default.nix @@ -19,7 +19,7 @@ stdenv.mkDerivation rec { glib # for glib-compile-schemas ]; - buildInputs = lib.optionals stdenv.isDarwin (with darwin.apple_sdk.frameworks; [ + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin (with darwin.apple_sdk.frameworks; [ Cocoa ]); propagatedBuildInputs = [ glib libsigcxx ]; diff --git a/pkgs/development/libraries/glog/default.nix b/pkgs/development/libraries/glog/default.nix index 53377022ad69..ac425092128c 100644 --- a/pkgs/development/libraries/glog/default.nix +++ b/pkgs/development/libraries/glog/default.nix @@ -43,7 +43,7 @@ stdenv.mkDerivation rec { # Clang optimizes an expected allocation away. # See https://github.com/google/glog/issues/937 "DeathNoAllocNewHook.logging" - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ "LogBacktraceAt.DoesBacktraceAtRightLineWhenEnabled" ]; in @@ -51,9 +51,9 @@ stdenv.mkDerivation rec { checkPhase = let - excludedTests = lib.optionals stdenv.isDarwin [ + excludedTests = lib.optionals stdenv.hostPlatform.isDarwin [ "mock-log" - ] ++ lib.optionals (stdenv.isDarwin && stdenv.isAarch64) [ + ] ++ lib.optionals (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isAarch64) [ "logging" # works around segfaults on aarch64-darwin for now ]; excludedTestsRegex = lib.optionalString (excludedTests != [ ]) "(${lib.concatStringsSep "|" excludedTests})"; diff --git a/pkgs/development/libraries/gmime/3.nix b/pkgs/development/libraries/gmime/3.nix index 0d1997cf1afc..f21dd724c95e 100644 --- a/pkgs/development/libraries/gmime/3.nix +++ b/pkgs/development/libraries/gmime/3.nix @@ -53,7 +53,7 @@ stdenv.mkDerivation rec { substituteInPlace tests/testsuite.c \ --replace /bin/rm rm '' - + lib.optionalString stdenv.isDarwin '' + + lib.optionalString stdenv.hostPlatform.isDarwin '' # This specific test fails on darwin for some unknown reason substituteInPlace tests/test-filters.c \ --replace-fail 'test_charset_conversion (datadir, "japanese", "utf-8", "iso-2022-jp");' "" diff --git a/pkgs/development/libraries/gmp/4.3.2.nix b/pkgs/development/libraries/gmp/4.3.2.nix index e809ed926eda..9d014c266753 100644 --- a/pkgs/development/libraries/gmp/4.3.2.nix +++ b/pkgs/development/libraries/gmp/4.3.2.nix @@ -24,13 +24,13 @@ let self = stdenv.mkDerivation rec { # addition, `configfsf.guess' would return `i386-apple-darwin10.2.0' on # `x86_64-darwin', leading to a 32-bit ABI build, which is undesirable. preConfigure = - if !stdenv.isDarwin + if !stdenv.hostPlatform.isDarwin then "ln -sf configfsf.guess config.guess" else ''echo "Darwin host is `./config.guess`."''; configureFlags = [ (lib.enableFeature cxx "cxx") - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ "ac_cv_build=x86_64-apple-darwin13.4.0" "ac_cv_host=x86_64-apple-darwin13.4.0" ]; @@ -72,7 +72,7 @@ let self = stdenv.mkDerivation rec { platforms = lib.platforms.all; badPlatforms = [ "x86_64-darwin" ]; # never built on aarch64-darwin, aarch64-linux since first introduction in nixpkgs - broken = (stdenv.isDarwin && stdenv.isAarch64) || (stdenv.isLinux && stdenv.isAarch64); + broken = (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isAarch64) || (stdenv.hostPlatform.isLinux && stdenv.hostPlatform.isAarch64); }; }; in self diff --git a/pkgs/development/libraries/gmp/5.1.x.nix b/pkgs/development/libraries/gmp/5.1.x.nix index e4fb89d054da..43e3ca9759eb 100644 --- a/pkgs/development/libraries/gmp/5.1.x.nix +++ b/pkgs/development/libraries/gmp/5.1.x.nix @@ -24,7 +24,7 @@ let self = stdenv.mkDerivation rec { patches = [ ./5.1.3-CVE-2021-43618.patch - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ ./need-size-t.patch ]; @@ -36,13 +36,13 @@ let self = stdenv.mkDerivation rec { # See , for instance. # # no darwin because gmp uses ASM that clang doesn't like - (lib.enableFeature (!stdenv.isSunOS && stdenv.hostPlatform.isx86) "fat") + (lib.enableFeature (!stdenv.hostPlatform.isSunOS && stdenv.hostPlatform.isx86) "fat") # The config.guess in GMP tries to runtime-detect various # ARM optimization flags via /proc/cpuinfo (and is also # broken on multicore CPUs). Avoid this impurity. "--build=${stdenv.buildPlatform.config}" - ] ++ optional (cxx && stdenv.isDarwin) "CPPFLAGS=-fexceptions" - ++ optional (stdenv.isDarwin && stdenv.is64bit) "ABI=64" + ] ++ optional (cxx && stdenv.hostPlatform.isDarwin) "CPPFLAGS=-fexceptions" + ++ optional (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.is64bit) "ABI=64" ; doCheck = true; @@ -81,7 +81,7 @@ let self = stdenv.mkDerivation rec { platforms = platforms.all; badPlatforms = [ "x86_64-darwin" ]; # never built on aarch64-darwin since first introduction in nixpkgs - broken = stdenv.isDarwin && stdenv.isAarch64; + broken = stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isAarch64; }; }; in self diff --git a/pkgs/development/libraries/gmp/6.x.nix b/pkgs/development/libraries/gmp/6.x.nix index 3187b529aa17..e1a8ff0ecdc1 100644 --- a/pkgs/development/libraries/gmp/6.x.nix +++ b/pkgs/development/libraries/gmp/6.x.nix @@ -38,13 +38,13 @@ let self = stdenv.mkDerivation rec { # See , for instance. # # no darwin because gmp uses ASM that clang doesn't like - (lib.enableFeature (!stdenv.isSunOS && stdenv.hostPlatform.isx86) "fat") + (lib.enableFeature (!stdenv.hostPlatform.isSunOS && stdenv.hostPlatform.isx86) "fat") # The config.guess in GMP tries to runtime-detect various # ARM optimization flags via /proc/cpuinfo (and is also # broken on multicore CPUs). Avoid this impurity. "--build=${stdenv.buildPlatform.config}" - ] ++ optional (cxx && stdenv.isDarwin) "CPPFLAGS=-fexceptions" - ++ optional (stdenv.isDarwin && stdenv.is64bit) "ABI=64" + ] ++ optional (cxx && stdenv.hostPlatform.isDarwin) "CPPFLAGS=-fexceptions" + ++ optional (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.is64bit) "ABI=64" # to build a .dll on windows, we need --disable-static + --enable-shared # see https://gmplib.org/manual/Notes-for-Particular-Systems.html ++ optional (!withStatic && stdenv.hostPlatform.isWindows) "--disable-static --enable-shared" diff --git a/pkgs/development/libraries/gnome-desktop/default.nix b/pkgs/development/libraries/gnome-desktop/default.nix index db95029c804e..381da5b8f9fd 100644 --- a/pkgs/development/libraries/gnome-desktop/default.nix +++ b/pkgs/development/libraries/gnome-desktop/default.nix @@ -36,7 +36,7 @@ stdenv.mkDerivation rec { sha256 = "sha256-QsdzdF2EuhS8HPHExvRgYUiAOlzTN5QcY5ZHlfPFnUI="; }; - patches = lib.optionals stdenv.isLinux [ + patches = lib.optionals stdenv.hostPlatform.isLinux [ (substituteAll { src = ./bubblewrap-paths.patch; bubblewrap_bin = "${bubblewrap}/bin/bwrap"; @@ -64,7 +64,7 @@ stdenv.mkDerivation rec { gtk3 gtk4 glib - ] ++ lib.optionals stdenv.isLinux [ + ] ++ lib.optionals stdenv.hostPlatform.isLinux [ bubblewrap wayland libseccomp @@ -78,12 +78,12 @@ stdenv.mkDerivation rec { mesonFlags = [ "-Dgtk_doc=true" "-Ddesktop_docs=false" - ] ++ lib.optionals (!stdenv.isLinux) [ + ] ++ lib.optionals (!stdenv.hostPlatform.isLinux) [ "-Dsystemd=disabled" "-Dudev=disabled" ]; - separateDebugInfo = stdenv.isLinux; + separateDebugInfo = stdenv.hostPlatform.isLinux; passthru = { updateScript = gnome.updateScript { diff --git a/pkgs/development/libraries/gnome-online-accounts/default.nix b/pkgs/development/libraries/gnome-online-accounts/default.nix index dc797dd02d16..8a1773612f2d 100644 --- a/pkgs/development/libraries/gnome-online-accounts/default.nix +++ b/pkgs/development/libraries/gnome-online-accounts/default.nix @@ -8,7 +8,7 @@ , ninja , libxslt , gtk4 -, enableBackend ? stdenv.isLinux +, enableBackend ? stdenv.hostPlatform.isLinux , json-glib , libadwaita , librest_1_0 diff --git a/pkgs/development/libraries/gnutls/default.nix b/pkgs/development/libraries/gnutls/default.nix index f1ecc1e9939f..3e9395668c85 100644 --- a/pkgs/development/libraries/gnutls/default.nix +++ b/pkgs/development/libraries/gnutls/default.nix @@ -52,7 +52,7 @@ let # XXX: Gnulib's `test-select' fails on FreeBSD: # https://hydra.nixos.org/build/2962084/nixlog/1/raw . - doCheck = !stdenv.isFreeBSD && !stdenv.isDarwin + doCheck = !stdenv.hostPlatform.isFreeBSD && !stdenv.hostPlatform.isDarwin && stdenv.buildPlatform == stdenv.hostPlatform; inherit (stdenv.hostPlatform) isDarwin; @@ -100,7 +100,7 @@ stdenv.mkDerivation rec { sed 's:/usr/lib64/pkcs11/ /usr/lib/pkcs11/ /usr/lib/x86_64-linux-gnu/pkcs11/:`pkg-config --variable=p11_module_path p11-kit-1`:' -i tests/p11-kit-trust.sh '' + lib.optionalString stdenv.hostPlatform.isMusl '' # See https://gitlab.com/gnutls/gnutls/-/issues/945 sed '2iecho "certtool tests skipped in musl build"\nexit 0' -i tests/cert-tests/certtool.sh - '' + lib.optionalString stdenv.isLinux '' + '' + lib.optionalString stdenv.hostPlatform.isLinux '' sed '2iexit 77' -i tests/{ktls,ktls_keyupdate}.sh ''; @@ -115,7 +115,7 @@ stdenv.mkDerivation rec { "--with-unbound-root-key-file=${dns-root-data}/root.key" (lib.withFeature withP11-kit "p11-kit") (lib.enableFeature cxxBindings "cxx") - ] ++ lib.optionals stdenv.isLinux [ + ] ++ lib.optionals stdenv.hostPlatform.isLinux [ "--enable-ktls" ] ++ lib.optionals (stdenv.hostPlatform.isMinGW) [ "--disable-doc" @@ -127,7 +127,7 @@ stdenv.mkDerivation rec { buildInputs = [ lzo lzip libtasn1 libidn2 zlib gmp libunistring unbound gettext libiconv ] ++ lib.optional (withP11-kit) p11-kit - ++ lib.optional (tpmSupport && stdenv.isLinux) trousers; + ++ lib.optional (tpmSupport && stdenv.hostPlatform.isLinux) trousers; nativeBuildInputs = [ perl pkg-config texinfo ] ++ [ autoconf automake ] ++ lib.optionals doCheck [ which nettools util-linux ]; diff --git a/pkgs/development/libraries/gobject-introspection/default.nix b/pkgs/development/libraries/gobject-introspection/default.nix index d58bdd2e7800..a76764a49a91 100644 --- a/pkgs/development/libraries/gobject-introspection/default.nix +++ b/pkgs/development/libraries/gobject-introspection/default.nix @@ -90,7 +90,7 @@ stdenv.mkDerivation (finalAttrs: { (python3.withPackages pythonModules) ]; - nativeCheckInputs = lib.optionals stdenv.isDarwin [ + nativeCheckInputs = lib.optionals stdenv.hostPlatform.isDarwin [ cctools # for otool ]; @@ -117,7 +117,7 @@ stdenv.mkDerivation (finalAttrs: { "-Dgi_cross_use_prebuilt_gi=true" ]; - doCheck = !stdenv.isAarch64; + doCheck = !stdenv.hostPlatform.isAarch64; # During configurePhase, two python scripts are generated and need this. See # https://github.com/NixOS/nixpkgs/pull/98316#issuecomment-695785692 diff --git a/pkgs/development/libraries/gom/default.nix b/pkgs/development/libraries/gom/default.nix index 96b1f3ae13ce..0df28ac88dfd 100644 --- a/pkgs/development/libraries/gom/default.nix +++ b/pkgs/development/libraries/gom/default.nix @@ -45,7 +45,7 @@ stdenv.mkDerivation rec { ]; # Success is more likely on x86_64 - doCheck = stdenv.isx86_64; + doCheck = stdenv.hostPlatform.isx86_64; passthru = { updateScript = gnome.updateScript { diff --git a/pkgs/development/libraries/google-cloud-cpp/default.nix b/pkgs/development/libraries/google-cloud-cpp/default.nix index 4d8ef6821240..e8caeadcd32d 100644 --- a/pkgs/development/libraries/google-cloud-cpp/default.nix +++ b/pkgs/development/libraries/google-cloud-cpp/default.nix @@ -79,7 +79,7 @@ stdenv.mkDerivation rec { ]; # https://hydra.nixos.org/build/222679737/nixlog/3/tail - env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.isAarch64 "-Wno-error=maybe-uninitialized"; + env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.hostPlatform.isAarch64 "-Wno-error=maybe-uninitialized"; doInstallCheck = true; @@ -100,7 +100,7 @@ stdenv.mkDerivation rec { "$PWD/google/cloud/storage/benchmarks" "$PWD/google/cloud/testing_util" ]; - ldLibraryPathName = "${lib.optionalString stdenv.isDarwin "DY"}LD_LIBRARY_PATH"; + ldLibraryPathName = "${lib.optionalString stdenv.hostPlatform.isDarwin "DY"}LD_LIBRARY_PATH"; in lib.optionalString doInstallCheck ( lib.optionalString (!staticOnly) '' diff --git a/pkgs/development/libraries/gperftools/default.nix b/pkgs/development/libraries/gperftools/default.nix index e76c033c705d..62e7ecbb0e95 100644 --- a/pkgs/development/libraries/gperftools/default.nix +++ b/pkgs/development/libraries/gperftools/default.nix @@ -31,18 +31,18 @@ stdenv.mkDerivation rec { # tcmalloc uses libunwind in a way that works correctly only on non-ARM dynamically linked linux buildInputs = [ perl ] - ++ lib.optional (stdenv.isLinux && !(stdenv.hostPlatform.isAarch || stdenv.hostPlatform.isStatic )) libunwind; + ++ lib.optional (stdenv.hostPlatform.isLinux && !(stdenv.hostPlatform.isAarch || stdenv.hostPlatform.isStatic )) libunwind; # Disable general dynamic TLS on AArch to support dlopen()'ing the library: # https://bugzilla.redhat.com/show_bug.cgi?id=1483558 configureFlags = lib.optional stdenv.hostPlatform.isAarch "--disable-general-dynamic-tls"; - prePatch = lib.optionalString stdenv.isDarwin '' + prePatch = lib.optionalString stdenv.hostPlatform.isDarwin '' substituteInPlace Makefile.am --replace stdc++ c++ ''; - env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.isDarwin + env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.hostPlatform.isDarwin "-D_XOPEN_SOURCE"; # some packages want to link to the static tcmalloc_minimal diff --git a/pkgs/development/libraries/gpgme/default.nix b/pkgs/development/libraries/gpgme/default.nix index fa4bb1be6dd3..45df332bc0ca 100644 --- a/pkgs/development/libraries/gpgme/default.nix +++ b/pkgs/development/libraries/gpgme/default.nix @@ -100,7 +100,7 @@ stdenv.mkDerivation rec { # which has a path length limit. Nix on darwin is using a build directory # that already has quite a long path and the resulting socket path doesn't # fit in the limit. https://github.com/NixOS/nix/pull/1085 - ++ lib.optionals stdenv.isDarwin [ "--disable-gpg-test" ]; + ++ lib.optionals stdenv.hostPlatform.isDarwin [ "--disable-gpg-test" ]; env.NIX_CFLAGS_COMPILE = toString ( # qgpgme uses Q_ASSERT which retains build inputs at runtime unless diff --git a/pkgs/development/libraries/graphene/default.nix b/pkgs/development/libraries/graphene/default.nix index 0364b9ecfaaf..803f31efa47a 100644 --- a/pkgs/development/libraries/graphene/default.nix +++ b/pkgs/development/libraries/graphene/default.nix @@ -84,7 +84,7 @@ stdenv.mkDerivation (finalAttrs: { (lib.mesonEnable "introspection" withIntrospection) "-Dinstalled_test_datadir=${placeholder "installedTests"}/share" "-Dinstalled_test_bindir=${placeholder "installedTests"}/libexec" - ] ++ lib.optionals stdenv.isAarch32 [ + ] ++ lib.optionals stdenv.hostPlatform.isAarch32 [ # the box test is failing with SIGBUS on armv7l-linux # https://github.com/ebassi/graphene/issues/215 "-Darm_neon=false" diff --git a/pkgs/development/libraries/grpc/default.nix b/pkgs/development/libraries/grpc/default.nix index 2110755a1719..35ae5284af5a 100644 --- a/pkgs/development/libraries/grpc/default.nix +++ b/pkgs/development/libraries/grpc/default.nix @@ -46,7 +46,7 @@ stdenv.mkDerivation rec { ++ lib.optional (stdenv.hostPlatform != stdenv.buildPlatform) grpc; propagatedBuildInputs = [ c-ares re2 zlib abseil-cpp ]; buildInputs = [ openssl protobuf ] - ++ lib.optionals stdenv.isLinux [ libnsl ]; + ++ lib.optionals stdenv.hostPlatform.isLinux [ libnsl ]; cmakeFlags = [ "-DgRPC_ZLIB_PROVIDER=package" @@ -91,7 +91,7 @@ stdenv.mkDerivation rec { env.NIX_CFLAGS_COMPILE = toString ([ "-Wno-error" - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ # Workaround for https://github.com/llvm/llvm-project/issues/48757 "-Wno-elaborated-enum-base" ]); diff --git a/pkgs/development/libraries/gsl-lite/default.nix b/pkgs/development/libraries/gsl-lite/default.nix index fcab02095264..03fc5587f80a 100644 --- a/pkgs/development/libraries/gsl-lite/default.nix +++ b/pkgs/development/libraries/gsl-lite/default.nix @@ -38,7 +38,7 @@ stdenv.mkDerivation rec { }; # Building tests is broken on Darwin. - doCheck = !stdenv.isDarwin; + doCheck = !stdenv.hostPlatform.isDarwin; meta = with lib; { description = '' diff --git a/pkgs/development/libraries/gsl/default.nix b/pkgs/development/libraries/gsl/default.nix index 2211f2d0d99f..aeb95476b2b6 100644 --- a/pkgs/development/libraries/gsl/default.nix +++ b/pkgs/development/libraries/gsl/default.nix @@ -19,7 +19,7 @@ stdenv.mkDerivation rec { }) ]; - preConfigure = if (lib.versionAtLeast stdenv.hostPlatform.darwinMinVersion "11" && stdenv.isDarwin) then '' + preConfigure = if (lib.versionAtLeast stdenv.hostPlatform.darwinMinVersion "11" && stdenv.hostPlatform.isDarwin) then '' MACOSX_DEPLOYMENT_TARGET=10.16 '' else null; @@ -28,7 +28,7 @@ stdenv.mkDerivation rec { ''; # do not let -march=skylake to enable FMA (https://lists.gnu.org/archive/html/bug-gsl/2011-11/msg00019.html) - env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.isx86_64 "-mno-fma"; + env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.hostPlatform.isx86_64 "-mno-fma"; # https://lists.gnu.org/archive/html/bug-gsl/2015-11/msg00012.html doCheck = stdenv.hostPlatform.system != "i686-linux"; diff --git a/pkgs/development/libraries/gsm/default.nix b/pkgs/development/libraries/gsm/default.nix index ae2c489fe832..5905fdff7e48 100644 --- a/pkgs/development/libraries/gsm/default.nix +++ b/pkgs/development/libraries/gsm/default.nix @@ -4,7 +4,7 @@ }: let - inherit (stdenv) isDarwin; + inherit (stdenv.hostPlatform) isDarwin; inherit (lib) optional optionalString; in diff --git a/pkgs/development/libraries/gss/default.nix b/pkgs/development/libraries/gss/default.nix index 42d22c2bd5fe..1271c52a4a8c 100644 --- a/pkgs/development/libraries/gss/default.nix +++ b/pkgs/development/libraries/gss/default.nix @@ -1,7 +1,7 @@ { lib , stdenv , fetchurl -, withShishi ? !stdenv.isDarwin +, withShishi ? !stdenv.hostPlatform.isDarwin , shishi }: @@ -23,7 +23,7 @@ stdenv.mkDerivation rec { buildInputs = lib.optional withShishi shishi; # ./stdint.h:89:5: error: expected value in expression - preConfigure = lib.optionalString stdenv.isDarwin '' + preConfigure = lib.optionalString stdenv.hostPlatform.isDarwin '' export GNULIBHEADERS_OVERRIDE_WINT_T=0 ''; diff --git a/pkgs/development/libraries/gssdp/1.6.nix b/pkgs/development/libraries/gssdp/1.6.nix index 468c2a84ca28..d52c90b41b91 100644 --- a/pkgs/development/libraries/gssdp/1.6.nix +++ b/pkgs/development/libraries/gssdp/1.6.nix @@ -77,7 +77,7 @@ stdenv.mkDerivation rec { }; meta = with lib; { - broken = stdenv.isDarwin; + broken = stdenv.hostPlatform.isDarwin; description = "GObject-based API for handling resource discovery and announcement over SSDP"; homepage = "http://www.gupnp.org/"; license = licenses.lgpl2Plus; diff --git a/pkgs/development/libraries/gssdp/default.nix b/pkgs/development/libraries/gssdp/default.nix index 939fb0e7b426..c42b6f958092 100644 --- a/pkgs/development/libraries/gssdp/default.nix +++ b/pkgs/development/libraries/gssdp/default.nix @@ -56,7 +56,7 @@ stdenv.mkDerivation rec { ]; # Bail out! GLib-GIO-FATAL-CRITICAL: g_inet_address_to_string: assertion 'G_IS_INET_ADDRESS (address)' failed - doCheck = !stdenv.isDarwin; + doCheck = !stdenv.hostPlatform.isDarwin; postFixup = lib.optionalString (stdenv.buildPlatform == stdenv.hostPlatform) '' # Move developer documentation to devdoc output. diff --git a/pkgs/development/libraries/gstreamer/bad/default.nix b/pkgs/development/libraries/gstreamer/bad/default.nix index bf27c6f25d7b..3ab9c896b8bf 100644 --- a/pkgs/development/libraries/gstreamer/bad/default.nix +++ b/pkgs/development/libraries/gstreamer/bad/default.nix @@ -104,7 +104,7 @@ , Foundation , MediaToolbox , enableGplPlugins ? true -, bluezSupport ? stdenv.isLinux +, bluezSupport ? stdenv.hostPlatform.isLinux # Causes every application using GstDeviceMonitor to send mDNS queries every 2 seconds , microdnsSupport ? false # Checks meson.is_cross_build(), so even canExecute isn't enough. @@ -142,7 +142,7 @@ stdenv.mkDerivation rec { gobject-introspection ] ++ lib.optionals enableDocumentation [ hotdoc - ] ++ lib.optionals (gst-plugins-base.waylandEnabled && stdenv.isLinux) [ + ] ++ lib.optionals (gst-plugins-base.waylandEnabled && stdenv.hostPlatform.isLinux) [ wayland-scanner ]; @@ -214,11 +214,11 @@ stdenv.mkDerivation rec { libmicrodns ] ++ lib.optionals openh264Support [ openh264 - ] ++ lib.optionals (gst-plugins-base.waylandEnabled && stdenv.isLinux) [ + ] ++ lib.optionals (gst-plugins-base.waylandEnabled && stdenv.hostPlatform.isLinux) [ libva # vaapi requires libva -> libdrm -> libpciaccess, which is Linux-only in nixpkgs wayland wayland-protocols - ] ++ lib.optionals (!stdenv.isDarwin) [ + ] ++ lib.optionals (!stdenv.hostPlatform.isDarwin) [ # TODO: mjpegtools uint64_t is not compatible with guint64 on Darwin mjpegtools @@ -245,9 +245,9 @@ stdenv.mkDerivation rec { libGLU ] ++ lib.optionals guiSupport [ gtk3 - ] ++ lib.optionals (stdenv.isLinux && guiSupport) [ + ] ++ lib.optionals (stdenv.hostPlatform.isLinux && guiSupport) [ directfb - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ # For unknown reasons the order is important, e.g. if # VideoToolbox is last, we get: # fatal error: 'VideoToolbox/VideoToolbox.h' file not found @@ -306,14 +306,14 @@ stdenv.mkDerivation rec { (lib.mesonEnable "openh264" openh264Support) (lib.mesonEnable "doc" enableDocumentation) ] - ++ lib.optionals (!stdenv.isLinux) [ + ++ lib.optionals (!stdenv.hostPlatform.isLinux) [ "-Ddoc=disabled" # needs gstcuda to be enabled which is Linux-only "-Dnvcodec=disabled" # Linux-only - ] ++ lib.optionals (!stdenv.isLinux || !gst-plugins-base.waylandEnabled) [ + ] ++ lib.optionals (!stdenv.hostPlatform.isLinux || !gst-plugins-base.waylandEnabled) [ "-Dva=disabled" # see comment on `libva` in `buildInputs` - ] ++ lib.optionals (!stdenv.isLinux || !guiSupport) [ + ] ++ lib.optionals (!stdenv.hostPlatform.isLinux || !guiSupport) [ "-Ddirectfb=disabled" - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ "-Daja=disabled" "-Dchromaprint=disabled" "-Dflite=disabled" @@ -327,7 +327,7 @@ stdenv.mkDerivation rec { "-Duvch264=disabled" # requires gudev "-Dv4l2codecs=disabled" # requires gudev "-Dladspa=disabled" # requires lrdf - ] ++ lib.optionals (!stdenv.isLinux || !stdenv.isx86_64 || !gst-plugins-base.waylandEnabled) [ + ] ++ lib.optionals (!stdenv.hostPlatform.isLinux || !stdenv.hostPlatform.isx86_64 || !gst-plugins-base.waylandEnabled) [ "-Dqsv=disabled" # Linux (and Windows) x86 only, makes va required ] ++ lib.optionals (!gst-plugins-base.glEnabled) [ "-Dgl=disabled" diff --git a/pkgs/development/libraries/gstreamer/base/default.nix b/pkgs/development/libraries/gstreamer/base/default.nix index 3d55425190f6..9932c37a72f2 100644 --- a/pkgs/development/libraries/gstreamer/base/default.nix +++ b/pkgs/development/libraries/gstreamer/base/default.nix @@ -20,23 +20,23 @@ , tremor # provides 'virbisidec' , libGL , gobject-introspection -, enableX11 ? stdenv.isLinux +, enableX11 ? stdenv.hostPlatform.isLinux , libXext , libXi , libXv , libdrm -, enableWayland ? stdenv.isLinux +, enableWayland ? stdenv.hostPlatform.isLinux , wayland-scanner , wayland , wayland-protocols -, enableAlsa ? stdenv.isLinux +, enableAlsa ? stdenv.hostPlatform.isLinux , alsa-lib # TODO: fix once x86_64-darwin sdk updated -, enableCocoa ? (stdenv.isDarwin && stdenv.isAarch64) +, enableCocoa ? (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isAarch64) , Cocoa , OpenGL , enableGl ? (enableX11 || enableWayland || enableCocoa) -, enableCdparanoia ? (!stdenv.isDarwin) +, enableCdparanoia ? (!stdenv.hostPlatform.isDarwin) , cdparanoia , glib , testers @@ -91,11 +91,11 @@ stdenv.mkDerivation (finalAttrs: { libjpeg tremor pango - ] ++ lib.optionals (!stdenv.isDarwin) [ + ] ++ lib.optionals (!stdenv.hostPlatform.isDarwin) [ libdrm libGL libvisual - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ OpenGL ] ++ lib.optionals enableAlsa [ alsa-lib @@ -111,7 +111,7 @@ stdenv.mkDerivation (finalAttrs: { propagatedBuildInputs = [ gstreamer - ] ++ lib.optionals (!stdenv.isDarwin) [ + ] ++ lib.optionals (!stdenv.hostPlatform.isDarwin) [ libdrm ]; @@ -128,7 +128,7 @@ stdenv.mkDerivation (finalAttrs: { ++ lib.optional (!enableGl) "-Dgl=disabled" ++ lib.optional (!enableAlsa) "-Dalsa=disabled" ++ lib.optional (!enableCdparanoia) "-Dcdparanoia=disabled" - ++ lib.optionals stdenv.isDarwin [ + ++ lib.optionals stdenv.hostPlatform.isDarwin [ "-Ddrm=disabled" "-Dlibvisual=disabled" ]; diff --git a/pkgs/development/libraries/gstreamer/core/default.nix b/pkgs/development/libraries/gstreamer/core/default.nix index d1094cfc8794..7eba093ab94b 100644 --- a/pkgs/development/libraries/gstreamer/core/default.nix +++ b/pkgs/development/libraries/gstreamer/core/default.nix @@ -64,7 +64,7 @@ stdenv.mkDerivation (finalAttrs: { glib bash-completion rustc - ] ++ lib.optionals stdenv.isLinux [ + ] ++ lib.optionals stdenv.hostPlatform.isLinux [ libcap # for setcap binary ] ++ lib.optionals withIntrospection [ gobject-introspection @@ -74,13 +74,13 @@ stdenv.mkDerivation (finalAttrs: { buildInputs = [ bash-completion - ] ++ lib.optionals stdenv.isLinux [ + ] ++ lib.optionals stdenv.hostPlatform.isLinux [ libcap ] ++ lib.optionals (lib.meta.availableOn stdenv.hostPlatform elfutils) [ elfutils ] ++ lib.optionals withLibunwind [ libunwind - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ Cocoa CoreServices ]; diff --git a/pkgs/development/libraries/gstreamer/good/default.nix b/pkgs/development/libraries/gstreamer/good/default.nix index 40c9cbc769c0..ec474972ef52 100644 --- a/pkgs/development/libraries/gstreamer/good/default.nix +++ b/pkgs/development/libraries/gstreamer/good/default.nix @@ -39,9 +39,9 @@ , qt6Support ? false, qt6 , raspiCameraSupport ? false, libraspberrypi , enableJack ? true, libjack2 -, enableX11 ? stdenv.isLinux, xorg +, enableX11 ? stdenv.hostPlatform.isLinux, xorg , ncurses -, enableWayland ? stdenv.isLinux +, enableWayland ? stdenv.hostPlatform.isLinux , wayland , wayland-protocols , libgudev @@ -54,7 +54,7 @@ # MMAL is not supported on aarch64, see: # https://github.com/raspberrypi/userland/issues/688 -assert raspiCameraSupport -> (stdenv.isLinux && stdenv.isAarch32); +assert raspiCameraSupport -> (stdenv.hostPlatform.isLinux && stdenv.hostPlatform.isAarch32); stdenv.mkDerivation rec { pname = "gst-plugins-good"; @@ -147,9 +147,9 @@ stdenv.mkDerivation rec { qtbase qtdeclarative qtwayland - ]) ++ lib.optionals stdenv.isDarwin [ + ]) ++ lib.optionals stdenv.hostPlatform.isDarwin [ Cocoa - ] ++ lib.optionals stdenv.isLinux [ + ] ++ lib.optionals stdenv.hostPlatform.isLinux [ libdrm libGL libv4l @@ -177,7 +177,7 @@ stdenv.mkDerivation rec { "-Dximagesrc=disabled" # Linux-only ] ++ lib.optionals (!enableJack) [ "-Djack=disabled" - ] ++ lib.optionals (!stdenv.isLinux) [ + ] ++ lib.optionals (!stdenv.hostPlatform.isLinux) [ "-Ddv1394=disabled" # Linux only "-Doss4=disabled" # Linux only "-Doss=disabled" # Linux only diff --git a/pkgs/development/libraries/gstreamer/rs/default.nix b/pkgs/development/libraries/gstreamer/rs/default.nix index 3e8eec7b8a60..187d1a048697 100644 --- a/pkgs/development/libraries/gstreamer/rs/default.nix +++ b/pkgs/development/libraries/gstreamer/rs/default.nix @@ -57,15 +57,15 @@ let mp4 = [ ]; # net - aws = [ openssl ] ++ lib.optionals stdenv.isDarwin [ Security ]; + aws = [ openssl ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ Security ]; hlssink3 = [ ]; ndi = [ ]; onvif = [ pango ]; raptorq = [ ]; - reqwest = [ openssl ] ++ lib.optionals stdenv.isDarwin [ Security ]; + reqwest = [ openssl ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ Security ]; rtp = [ ]; - webrtc = [ gst-plugins-bad openssl ] ++ lib.optionals stdenv.isDarwin [ Security SystemConfiguration ]; - webrtchttp = [ gst-plugins-bad openssl ] ++ lib.optionals stdenv.isDarwin [ Security SystemConfiguration ]; + webrtc = [ gst-plugins-bad openssl ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ Security SystemConfiguration ]; + webrtchttp = [ gst-plugins-bad openssl ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ Security SystemConfiguration ]; # text textahead = [ ]; @@ -110,9 +110,9 @@ let [ "csound" # tests have weird failure on x86, does not currently work on arm or darwin "livesync" # tests have suspicious intermittent failure, see https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/issues/357 - ] ++ lib.optionals stdenv.isAarch64 [ + ] ++ lib.optionals stdenv.hostPlatform.isAarch64 [ "raptorq" # pointer alignment failure in tests on aarch64 - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ "reqwest" # tests hang on darwin "threadshare" # tests cannot bind to localhost on darwin "webp" # not supported on darwin (upstream crate issue) @@ -200,13 +200,13 @@ stdenv.mkDerivation (finalAttrs: { cargo cargo-c' nasm - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ lld ] ++ lib.optionals enableDocumentation [ hotdoc ]; - env = lib.optionalAttrs stdenv.isDarwin { NIX_CFLAGS_LINK = "-fuse-ld=lld"; }; + env = lib.optionalAttrs stdenv.hostPlatform.isDarwin { NIX_CFLAGS_LINK = "-fuse-ld=lld"; }; buildInputs = [ gstreamer diff --git a/pkgs/development/libraries/gstreamer/ugly/default.nix b/pkgs/development/libraries/gstreamer/ugly/default.nix index 6f8ac715af50..f6a0ee93d89e 100644 --- a/pkgs/development/libraries/gstreamer/ugly/default.nix +++ b/pkgs/development/libraries/gstreamer/ugly/default.nix @@ -55,7 +55,7 @@ stdenv.mkDerivation rec { libmad libmpeg2 x264 - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ IOKit CoreFoundation DiskArbitration diff --git a/pkgs/development/libraries/gstreamer/vaapi/default.nix b/pkgs/development/libraries/gstreamer/vaapi/default.nix index db154403ffb3..d7d788787a50 100644 --- a/pkgs/development/libraries/gstreamer/vaapi/default.nix +++ b/pkgs/development/libraries/gstreamer/vaapi/default.nix @@ -65,7 +65,7 @@ stdenv.mkDerivation rec { xorg.libICE nasm libvpx - ] ++ lib.optionals (!stdenv.isDarwin) [ + ] ++ lib.optionals (!stdenv.hostPlatform.isDarwin) [ libGL libGLU ]; diff --git a/pkgs/development/libraries/gthree/default.nix b/pkgs/development/libraries/gthree/default.nix index 3657f62f929c..c94a3ae15d15 100644 --- a/pkgs/development/libraries/gthree/default.nix +++ b/pkgs/development/libraries/gthree/default.nix @@ -58,7 +58,7 @@ stdenv.mkDerivation rec { ]; mesonFlags = [ - "-Dgtk_doc=${if stdenv.isDarwin then "false" else "true"}" + "-Dgtk_doc=${if stdenv.hostPlatform.isDarwin then "false" else "true"}" # Data for examples is useless when the example programs are not installed. "-Dexamples=false" ]; @@ -69,6 +69,6 @@ stdenv.mkDerivation rec { license = licenses.mit; maintainers = [ ]; platforms = platforms.unix; - broken = stdenv.isDarwin; # never built on Hydra https://hydra.nixos.org/job/nixpkgs/trunk/gthree.x86_64-darwin + broken = stdenv.hostPlatform.isDarwin; # never built on Hydra https://hydra.nixos.org/job/nixpkgs/trunk/gthree.x86_64-darwin }; } diff --git a/pkgs/development/libraries/gtk-frdp/default.nix b/pkgs/development/libraries/gtk-frdp/default.nix index b3edf0ba4853..69af8b31872e 100644 --- a/pkgs/development/libraries/gtk-frdp/default.nix +++ b/pkgs/development/libraries/gtk-frdp/default.nix @@ -46,7 +46,7 @@ stdenv.mkDerivation rec { }; }; - env.NIX_CFLAGS_COMPILE = toString (lib.optionals stdenv.isDarwin [ + env.NIX_CFLAGS_COMPILE = toString (lib.optionals stdenv.hostPlatform.isDarwin [ "-DTARGET_OS_IPHONE=0" "-DTARGET_OS_WATCH=0" ]); diff --git a/pkgs/development/libraries/gtk/2.x.nix b/pkgs/development/libraries/gtk/2.x.nix index ed0900ee1a92..cb4b6955dea4 100644 --- a/pkgs/development/libraries/gtk/2.x.nix +++ b/pkgs/development/libraries/gtk/2.x.nix @@ -25,9 +25,9 @@ , testers , AppKit , Cocoa -, gdktarget ? if stdenv.isDarwin then "quartz" else "x11" -, cupsSupport ? config.gtk2.cups or stdenv.isLinux -, xineramaSupport ? stdenv.isLinux +, gdktarget ? if stdenv.hostPlatform.isDarwin then "quartz" else "x11" +, cupsSupport ? config.gtk2.cups or stdenv.hostPlatform.isLinux +, xineramaSupport ? stdenv.hostPlatform.isLinux }: let @@ -70,7 +70,7 @@ stdenv.mkDerivation (finalAttrs: { url = "https://gitlab.gnome.org/GNOME/gtk/-/commit/3bbf0b6176d42836d23c36a6ac410e807ec0a7a7.patch"; hash = "sha256-mstOPk9NNpUwScrdEbvGhmAv8jlds3SBdj53T0q33vM="; }) - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ ./patches/2.0-gnome_bugzilla_557780_306776_freeciv_darwin.patch ./patches/2.0-darwin-x11.patch # Fixes an incompatible function pointer conversion and implicit int errors with clang 16. @@ -83,7 +83,7 @@ stdenv.mkDerivation (finalAttrs: { gdk-pixbuf glib pango - ] ++ lib.optionals (stdenv.isLinux || stdenv.isDarwin) [ + ] ++ lib.optionals (stdenv.hostPlatform.isLinux || stdenv.hostPlatform.isDarwin) [ libXcomposite libXcursor libXi @@ -91,14 +91,14 @@ stdenv.mkDerivation (finalAttrs: { libXrender ] ++ lib.optional xineramaSupport libXinerama ++ lib.optional cupsSupport cups - ++ lib.optionals stdenv.isDarwin [ + ++ lib.optionals stdenv.hostPlatform.isDarwin [ libXdamage AppKit Cocoa ]; preConfigure = - lib.optionalString (stdenv.isDarwin + lib.optionalString (stdenv.hostPlatform.isDarwin && lib.versionAtLeast stdenv.hostPlatform.darwinMinVersion "11") "MACOSX_DEPLOYMENT_TARGET=10.16"; @@ -107,7 +107,7 @@ stdenv.mkDerivation (finalAttrs: { "--sysconfdir=/etc" "--with-gdktarget=${gdktarget}" "--with-xinput=yes" - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ "--disable-glibtest" "--disable-introspection" "--disable-visibility" diff --git a/pkgs/development/libraries/gtk/3.x.nix b/pkgs/development/libraries/gtk/3.x.nix index ed0612bf2ecb..7f3717c8a525 100644 --- a/pkgs/development/libraries/gtk/3.x.nix +++ b/pkgs/development/libraries/gtk/3.x.nix @@ -33,15 +33,15 @@ , gnome , gsettings-desktop-schemas , sassc -, trackerSupport ? stdenv.isLinux && (stdenv.buildPlatform == stdenv.hostPlatform) +, trackerSupport ? stdenv.hostPlatform.isLinux && (stdenv.buildPlatform == stdenv.hostPlatform) , tracker -, x11Support ? stdenv.isLinux -, waylandSupport ? stdenv.isLinux +, x11Support ? stdenv.hostPlatform.isLinux +, waylandSupport ? stdenv.hostPlatform.isLinux , libGL , wayland , wayland-protocols -, xineramaSupport ? stdenv.isLinux -, cupsSupport ? stdenv.isLinux +, xineramaSupport ? stdenv.hostPlatform.isLinux +, cupsSupport ? stdenv.hostPlatform.isLinux , cups , AppKit , Cocoa @@ -83,7 +83,7 @@ stdenv.mkDerivation (finalAttrs: { patches = [ ./patches/3.0-immodules.cache.patch ./patches/3.0-Xft-setting-fallback-compute-DPI-properly.patch - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ # X11 module requires which is not installed on Darwin # let’s drop that dependency in similar way to how other parts of the library do it # e.g. https://gitlab.gnome.org/GNOME/gtk/blob/3.24.4/gtk/gtk-launch.c#L31-33 @@ -120,7 +120,7 @@ stdenv.mkDerivation (finalAttrs: { libxkbcommon (libepoxy.override { inherit x11Support; }) isocodes - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ AppKit ] ++ lib.optionals trackerSupport [ tracker @@ -146,7 +146,7 @@ stdenv.mkDerivation (finalAttrs: { libXrandr libXrender pango - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ # explicitly propagated, always needed Cocoa QuartzCore @@ -166,13 +166,13 @@ stdenv.mkDerivation (finalAttrs: { "-Dtracker3=${lib.boolToString trackerSupport}" "-Dbroadway_backend=${lib.boolToString broadwaySupport}" "-Dx11_backend=${lib.boolToString x11Support}" - "-Dquartz_backend=${lib.boolToString (stdenv.isDarwin && !x11Support)}" + "-Dquartz_backend=${lib.boolToString (stdenv.hostPlatform.isDarwin && !x11Support)}" "-Dintrospection=${lib.boolToString withIntrospection}" ]; doCheck = false; # needs X11 - separateDebugInfo = stdenv.isLinux; + separateDebugInfo = stdenv.hostPlatform.isLinux; # These are the defines that'd you'd get with --enable-debug=minimum (default). # See: https://developer.gnome.org/gtk3/stable/gtk-building.html#extra-configuration-options @@ -202,7 +202,7 @@ stdenv.mkDerivation (finalAttrs: { patchShebangs ''${files[@]} ''; - postInstall = lib.optionalString (!stdenv.isDarwin) '' + postInstall = lib.optionalString (!stdenv.hostPlatform.isDarwin) '' # The updater is needed for nixos env and it's tiny. moveToOutput bin/gtk-update-icon-cache "$out" # Launcher @@ -219,14 +219,14 @@ stdenv.mkDerivation (finalAttrs: { ''; # Wrap demos - postFixup = lib.optionalString (!stdenv.isDarwin) '' + postFixup = lib.optionalString (!stdenv.hostPlatform.isDarwin) '' demos=(gtk3-demo gtk3-demo-application gtk3-icon-browser gtk3-widget-factory) for program in ''${demos[@]}; do wrapProgram $dev/bin/$program \ --prefix XDG_DATA_DIRS : "$GSETTINGS_SCHEMAS_PATH:$out/share/gsettings-schemas/${finalAttrs.pname}-${finalAttrs.version}" done - '' + lib.optionalString stdenv.isDarwin '' + '' + lib.optionalString stdenv.hostPlatform.isDarwin '' # a comment created a cycle between outputs sed '/^# ModulesPath =/d' -i "$out"/lib/gtk-*/*/immodules.cache ''; diff --git a/pkgs/development/libraries/gtk/4.x.nix b/pkgs/development/libraries/gtk/4.x.nix index 3a144b2de3ac..8b3ef020bd28 100644 --- a/pkgs/development/libraries/gtk/4.x.nix +++ b/pkgs/development/libraries/gtk/4.x.nix @@ -32,13 +32,13 @@ , gsettings-desktop-schemas , gst_all_1 , sassc -, trackerSupport ? stdenv.isLinux +, trackerSupport ? stdenv.hostPlatform.isLinux , tracker -, x11Support ? stdenv.isLinux -, waylandSupport ? stdenv.isLinux +, x11Support ? stdenv.hostPlatform.isLinux +, waylandSupport ? stdenv.hostPlatform.isLinux , libGL # experimental and can cause crashes in inspector -, vulkanSupport ? stdenv.isLinux +, vulkanSupport ? stdenv.hostPlatform.isLinux , shaderc , vulkan-loader , vulkan-headers @@ -46,8 +46,8 @@ , wayland , wayland-protocols , wayland-scanner -, xineramaSupport ? stdenv.isLinux -, cupsSupport ? stdenv.isLinux +, xineramaSupport ? stdenv.hostPlatform.isLinux +, cupsSupport ? stdenv.hostPlatform.isLinux , compileSchemas ? stdenv.hostPlatform.emulatorAvailable buildPackages , cups , AppKit @@ -130,7 +130,7 @@ stdenv.mkDerivation (finalAttrs: { libXi libXrandr libXrender - ]) ++ lib.optionals stdenv.isDarwin [ + ]) ++ lib.optionals stdenv.hostPlatform.isDarwin [ AppKit ] ++ lib.optionals trackerSupport [ tracker @@ -142,7 +142,7 @@ stdenv.mkDerivation (finalAttrs: { xorg.libXinerama ] ++ lib.optionals cupsSupport [ cups - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ Cocoa ] ++ lib.optionals stdenv.hostPlatform.isMusl [ libexecinfo @@ -175,13 +175,13 @@ stdenv.mkDerivation (finalAttrs: { (lib.mesonEnable "vulkan" vulkanSupport) (lib.mesonEnable "print-cups" cupsSupport) (lib.mesonBool "x11-backend" x11Support) - ] ++ lib.optionals (stdenv.isDarwin && !stdenv.isAarch64) [ + ] ++ lib.optionals (stdenv.hostPlatform.isDarwin && !stdenv.hostPlatform.isAarch64) [ "-Dmedia-gstreamer=disabled" # requires gstreamer-gl ]; doCheck = false; # needs X11 - separateDebugInfo = stdenv.isLinux; + separateDebugInfo = stdenv.hostPlatform.isLinux; # These are the defines that'd you'd get with --enable-debug=minimum (default). # See: https://developer.gnome.org/gtk3/stable/gtk-building.html#extra-configuration-options @@ -218,7 +218,7 @@ stdenv.mkDerivation (finalAttrs: { postInstall = '' PATH="$OLD_PATH" - '' + lib.optionalString (!stdenv.isDarwin) '' + '' + lib.optionalString (!stdenv.hostPlatform.isDarwin) '' # The updater is needed for nixos env and it's tiny. moveToOutput bin/gtk4-update-icon-cache "$out" # Launcher @@ -234,7 +234,7 @@ stdenv.mkDerivation (finalAttrs: { ''; # Wrap demos - postFixup = lib.optionalString (!stdenv.isDarwin) '' + postFixup = lib.optionalString (!stdenv.hostPlatform.isDarwin) '' demos=(gtk4-demo gtk4-demo-application gtk4-icon-browser gtk4-widget-factory) for program in ''${demos[@]}; do diff --git a/pkgs/development/libraries/gtkmm/4.x.nix b/pkgs/development/libraries/gtkmm/4.x.nix index 36ff98d9f165..64ec9e9ac2c9 100644 --- a/pkgs/development/libraries/gtkmm/4.x.nix +++ b/pkgs/development/libraries/gtkmm/4.x.nix @@ -46,7 +46,7 @@ stdenv.mkDerivation rec { pangomm_2_48 ]; - nativeCheckInputs = lib.optionals (!stdenv.isDarwin)[ + nativeCheckInputs = lib.optionals (!stdenv.hostPlatform.isDarwin)[ xvfb-run ]; @@ -60,7 +60,7 @@ stdenv.mkDerivation rec { checkPhase = '' runHook preCheck - ${lib.optionalString (!stdenv.isDarwin) "xvfb-run -s '-screen 0 800x600x24'"} \ + ${lib.optionalString (!stdenv.hostPlatform.isDarwin) "xvfb-run -s '-screen 0 800x600x24'"} \ meson test --print-errorlogs runHook postCheck diff --git a/pkgs/development/libraries/gtksourceview/3.x.nix b/pkgs/development/libraries/gtksourceview/3.x.nix index fb5c72e8b34d..41999f553826 100644 --- a/pkgs/development/libraries/gtksourceview/3.x.nix +++ b/pkgs/development/libraries/gtksourceview/3.x.nix @@ -37,7 +37,7 @@ stdenv.mkDerivation (finalAttrs: { enableParallelBuilding = true; - doCheck = stdenv.isLinux; + doCheck = stdenv.hostPlatform.isLinux; checkPhase = '' NO_AT_BRIDGE=1 \ XDG_DATA_DIRS="$XDG_DATA_DIRS:${shared-mime-info}/share" \ diff --git a/pkgs/development/libraries/gtksourceview/5.x.nix b/pkgs/development/libraries/gtksourceview/5.x.nix index f1a12eb0de12..a57881ff5532 100644 --- a/pkgs/development/libraries/gtksourceview/5.x.nix +++ b/pkgs/development/libraries/gtksourceview/5.x.nix @@ -41,7 +41,7 @@ stdenv.mkDerivation (finalAttrs: { ]; # The 10.12 SDK used by x86_64-darwin requires defining `_POSIX_C_SOURCE` to use `strnlen`. - env.NIX_CFLAGS_COMPILE = lib.optionalString (stdenv.isDarwin && stdenv.isx86_64) "-D_POSIX_C_SOURCE=200809L"; + env.NIX_CFLAGS_COMPILE = lib.optionalString (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isx86_64) "-D_POSIX_C_SOURCE=200809L"; nativeBuildInputs = [ meson @@ -79,7 +79,7 @@ stdenv.mkDerivation (finalAttrs: { "-Ddocumentation=true" ]; - doCheck = stdenv.isLinux; + doCheck = stdenv.hostPlatform.isLinux; checkPhase = '' runHook preCheck diff --git a/pkgs/development/libraries/gupnp/default.nix b/pkgs/development/libraries/gupnp/default.nix index 08b2925b0ea3..5fa0df314274 100644 --- a/pkgs/development/libraries/gupnp/default.nix +++ b/pkgs/development/libraries/gupnp/default.nix @@ -84,7 +84,7 @@ stdenv.mkDerivation rec { ]; # Bail out! ERROR:../tests/test-bugs.c:168:test_on_timeout: code should not be reached - doCheck = !stdenv.isDarwin; + doCheck = !stdenv.hostPlatform.isDarwin; passthru = { updateScript = gnome.updateScript { diff --git a/pkgs/development/libraries/gvfs/default.nix b/pkgs/development/libraries/gvfs/default.nix index 7c5cdca3f619..4b4da283dd89 100644 --- a/pkgs/development/libraries/gvfs/default.nix +++ b/pkgs/development/libraries/gvfs/default.nix @@ -8,7 +8,7 @@ , gettext , dbus , glib -, udevSupport ? stdenv.isLinux +, udevSupport ? stdenv.hostPlatform.isLinux , libgudev , udisks2 , libgcrypt diff --git a/pkgs/development/libraries/harfbuzz/default.nix b/pkgs/development/libraries/harfbuzz/default.nix index 12297a5da669..15208becc301 100644 --- a/pkgs/development/libraries/harfbuzz/default.nix +++ b/pkgs/development/libraries/harfbuzz/default.nix @@ -42,7 +42,7 @@ stdenv.mkDerivation (finalAttrs: { postPatch = '' patchShebangs src/*.py test - '' + lib.optionalString stdenv.isDarwin '' + '' + lib.optionalString stdenv.hostPlatform.isDarwin '' # ApplicationServices.framework headers have cast-align warnings. substituteInPlace src/hb.hh \ --replace '#pragma GCC diagnostic error "-Wcast-align"' "" @@ -94,7 +94,7 @@ stdenv.mkDerivation (finalAttrs: { postFixup = lib.optionalString withIcu '' rm "$out"/lib/libharfbuzz.* "$dev/lib/pkgconfig/harfbuzz.pc" ln -s {'${harfbuzz.dev}',"$dev"}/lib/pkgconfig/harfbuzz.pc - ${lib.optionalString stdenv.isDarwin '' + ${lib.optionalString stdenv.hostPlatform.isDarwin '' ln -s {'${harfbuzz.out}',"$out"}/lib/libharfbuzz.dylib ln -s {'${harfbuzz.out}',"$out"}/lib/libharfbuzz.0.dylib ''} diff --git a/pkgs/development/libraries/hidapi/default.nix b/pkgs/development/libraries/hidapi/default.nix index 05b915efb8f9..6e537e8b74fb 100644 --- a/pkgs/development/libraries/hidapi/default.nix +++ b/pkgs/development/libraries/hidapi/default.nix @@ -23,11 +23,11 @@ stdenv.mkDerivation (finalAttrs: { nativeBuildInputs = [ cmake pkg-config ]; - buildInputs = lib.optionals stdenv.isLinux [ libusb1 udev ]; + buildInputs = lib.optionals stdenv.hostPlatform.isLinux [ libusb1 udev ]; enableParallelBuilding = true; - propagatedBuildInputs = lib.optionals stdenv.isDarwin [ Cocoa IOKit ]; + propagatedBuildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ Cocoa IOKit ]; passthru.tests.pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage; @@ -37,9 +37,9 @@ stdenv.mkDerivation (finalAttrs: { maintainers = with maintainers; [ prusnak ]; # You can choose between GPLv3, BSD or HIDAPI license (even more liberal) license = with licenses; [ bsd3 /* or */ gpl3Only ] ; - pkgConfigModules = lib.optionals stdenv.isDarwin [ + pkgConfigModules = lib.optionals stdenv.hostPlatform.isDarwin [ "hidapi" - ] ++ lib.optionals stdenv.isLinux [ + ] ++ lib.optionals stdenv.hostPlatform.isLinux [ "hidapi-hidraw" "hidapi-libusb" ]; diff --git a/pkgs/development/libraries/hivex/default.nix b/pkgs/development/libraries/hivex/default.nix index d8e320a44c19..c85790408bdd 100644 --- a/pkgs/development/libraries/hivex/default.nix +++ b/pkgs/development/libraries/hivex/default.nix @@ -25,7 +25,7 @@ stdenv.mkDerivation rec { libxml2 ] ++ (with perlPackages; [ perl IOStringy ]) - ++ lib.optionals stdenv.isDarwin [ libintl ]; + ++ lib.optionals stdenv.hostPlatform.isDarwin [ libintl ]; enableParallelBuilding = true; diff --git a/pkgs/development/libraries/http-parser/default.nix b/pkgs/development/libraries/http-parser/default.nix index 6ba2b8fc1ace..69cf2ab210dd 100644 --- a/pkgs/development/libraries/http-parser/default.nix +++ b/pkgs/development/libraries/http-parser/default.nix @@ -18,7 +18,7 @@ stdenv.mkDerivation rec { patches = [ ./enable-static-shared.patch - ] ++ lib.optionals stdenv.isAarch32 [ + ] ++ lib.optionals stdenv.hostPlatform.isAarch32 [ # https://github.com/nodejs/http-parser/pull/510 (fetchpatch { url = "https://github.com/nodejs/http-parser/commit/4f15b7d510dc7c6361a26a7c6d2f7c3a17f8d878.patch"; diff --git a/pkgs/development/libraries/hwloc/default.nix b/pkgs/development/libraries/hwloc/default.nix index f2316ab657a1..f71fa4aca81f 100644 --- a/pkgs/development/libraries/hwloc/default.nix +++ b/pkgs/development/libraries/hwloc/default.nix @@ -27,15 +27,15 @@ stdenv.mkDerivation rec { buildInputs = [ expat ncurses ] ++ lib.optionals x11Support [ cairo libX11 ] - ++ lib.optionals stdenv.isLinux [ numactl ] + ++ lib.optionals stdenv.hostPlatform.isLinux [ numactl ] ++ lib.optionals enableCuda [ cudaPackages.cuda_cudart ]; # Since `libpci' appears in `hwloc.pc', it must be propagated. - propagatedBuildInputs = lib.optional stdenv.isLinux pciutils; + propagatedBuildInputs = lib.optional stdenv.hostPlatform.isLinux pciutils; enableParallelBuilding = true; - postInstall = lib.optionalString stdenv.isLinux '' + postInstall = lib.optionalString stdenv.hostPlatform.isLinux '' if [ -d "${numactl}/lib64" ]; then numalibdir="${numactl}/lib64" else diff --git a/pkgs/development/libraries/hyperscan/default.nix b/pkgs/development/libraries/hyperscan/default.nix index 0b9765dac4cf..cdb578ba08d5 100644 --- a/pkgs/development/libraries/hyperscan/default.nix +++ b/pkgs/development/libraries/hyperscan/default.nix @@ -32,7 +32,7 @@ stdenv.mkDerivation (finalAttrs: { cmakeFlags = [ "-DBUILD_AVX512=ON" ] - ++ lib.optional (!stdenv.isDarwin) "-DFAT_RUNTIME=ON" + ++ lib.optional (!stdenv.hostPlatform.isDarwin) "-DFAT_RUNTIME=ON" ++ lib.optional (withStatic) "-DBUILD_STATIC_AND_SHARED=ON" ++ lib.optional (!withStatic) "-DBUILD_SHARED_LIBS=ON"; diff --git a/pkgs/development/libraries/icu/make-icu.nix b/pkgs/development/libraries/icu/make-icu.nix index 575f184c163f..52b083995ec7 100644 --- a/pkgs/development/libraries/icu/make-icu.nix +++ b/pkgs/development/libraries/icu/make-icu.nix @@ -31,7 +31,7 @@ let # $(includedir) is different from $(prefix)/include due to multiple outputs sed -i -e 's|^\(CPPFLAGS = .*\) -I\$(prefix)/include|\1 -I$(includedir)|' config/Makefile.inc.in - '' + lib.optionalString stdenv.isAarch32 '' + '' + lib.optionalString stdenv.hostPlatform.isAarch32 '' # From https://archlinuxarm.org/packages/armv7h/icu/files/icudata-stdlibs.patch sed -e 's/LDFLAGSICUDT=-nodefaultlibs -nostdlib/LDFLAGSICUDT=/' -i config/mh-linux ''; @@ -39,7 +39,7 @@ let dontDisableStatic = withStatic; configureFlags = [ "--disable-debug" ] - ++ lib.optional (stdenv.isFreeBSD || stdenv.isDarwin) "--enable-rpath" + ++ lib.optional (stdenv.hostPlatform.isFreeBSD || stdenv.hostPlatform.isDarwin) "--enable-rpath" ++ lib.optional (stdenv.buildPlatform != stdenv.hostPlatform) "--with-cross-build=${nativeBuildRoot}" ++ lib.optional withStatic "--enable-static"; @@ -74,7 +74,7 @@ let postInstall = lib.optionalString withStatic '' mkdir -p $static/lib mv -v lib/*.a $static/lib - '' + lib.optionalString stdenv.isDarwin '' + '' + lib.optionalString stdenv.hostPlatform.isDarwin '' sed -i 's/INSTALL_CMD=.*install/INSTALL_CMD=install/' $out/lib/icu/${version}/pkgdata.inc '' + (let replacements = [ diff --git a/pkgs/development/libraries/igraph/default.nix b/pkgs/development/libraries/igraph/default.nix index 63ca16e19d7a..0501fe4ac2d3 100644 --- a/pkgs/development/libraries/igraph/default.nix +++ b/pkgs/development/libraries/igraph/default.nix @@ -91,7 +91,7 @@ stdenv.mkDerivation (finalAttrs: { postFixup = '' substituteInPlace $dev/lib/cmake/igraph/igraph-targets.cmake \ --replace-fail "_IMPORT_PREFIX \"$out\"" "_IMPORT_PREFIX \"$dev\"" - '' + lib.optionalString stdenv.isDarwin '' + '' + lib.optionalString stdenv.hostPlatform.isDarwin '' install_name_tool -change libblas.dylib ${blas}/lib/libblas.dylib $out/lib/libigraph.dylib ''; diff --git a/pkgs/development/libraries/ilmbase/default.nix b/pkgs/development/libraries/ilmbase/default.nix index 219d961f9f96..dc075e43563d 100644 --- a/pkgs/development/libraries/ilmbase/default.nix +++ b/pkgs/development/libraries/ilmbase/default.nix @@ -21,7 +21,7 @@ stdenv.mkDerivation rec { # fails 1 out of 1 tests with # "lt-ImathTest: testBoxAlgo.cpp:892: void {anonymous}::boxMatrixTransform(): Assertion `b21 == b2' failed" # at least on i686. spooky! - doCheck = stdenv.isx86_64; + doCheck = stdenv.hostPlatform.isx86_64; preConfigure = '' # Need to cd after patches for openexr patches to apply. diff --git a/pkgs/development/libraries/imgui/default.nix b/pkgs/development/libraries/imgui/default.nix index 1b33c1c74f2d..315a73171067 100644 --- a/pkgs/development/libraries/imgui/default.nix +++ b/pkgs/development/libraries/imgui/default.nix @@ -26,15 +26,15 @@ IMGUI_BUILD_DX10_BINDING ? false, IMGUI_BUILD_DX11_BINDING ? false, IMGUI_BUILD_DX12_BINDING ? false, - IMGUI_BUILD_GLFW_BINDING ? !stdenv.isDarwin, + IMGUI_BUILD_GLFW_BINDING ? !stdenv.hostPlatform.isDarwin, IMGUI_BUILD_GLUT_BINDING ? false, - IMGUI_BUILD_METAL_BINDING ? stdenv.isDarwin, + IMGUI_BUILD_METAL_BINDING ? stdenv.hostPlatform.isDarwin, IMGUI_BUILD_OPENGL2_BINDING ? false, IMGUI_BUILD_OPENGL3_BINDING ? IMGUI_BUILD_SDL2_BINDING || IMGUI_BUILD_GLFW_BINDING || IMGUI_BUILD_GLUT_BINDING, - IMGUI_BUILD_OSX_BINDING ? stdenv.isDarwin, + IMGUI_BUILD_OSX_BINDING ? stdenv.hostPlatform.isDarwin, IMGUI_BUILD_SDL2_BINDING ? - !IMGUI_BUILD_GLFW_BINDING && !stdenv.isDarwin, + !IMGUI_BUILD_GLFW_BINDING && !stdenv.hostPlatform.isDarwin, IMGUI_BUILD_SDL2_RENDERER_BINDING ? IMGUI_BUILD_SDL2_BINDING, IMGUI_BUILD_VULKAN_BINDING ? false, IMGUI_BUILD_WIN32_BINDING ? false, diff --git a/pkgs/development/libraries/imlib2/default.nix b/pkgs/development/libraries/imlib2/default.nix index 6f7a14a61611..cea3f45f9ff6 100644 --- a/pkgs/development/libraries/imlib2/default.nix +++ b/pkgs/development/libraries/imlib2/default.nix @@ -54,7 +54,7 @@ stdenv.mkDerivation (finalAttrs: { # Do not build amd64 assembly code on Darwin, because it fails to compile # with unknow directive errors - configureFlags = optional stdenv.isDarwin "--enable-amd64=no" + configureFlags = optional stdenv.hostPlatform.isDarwin "--enable-amd64=no" ++ optional (!svgSupport) "--without-svg" ++ optional (!heifSupport) "--without-heif" ++ optional (!x11Support) "--without-x"; diff --git a/pkgs/development/libraries/imtui/default.nix b/pkgs/development/libraries/imtui/default.nix index a4f477543b89..ac1791126bfd 100644 --- a/pkgs/development/libraries/imtui/default.nix +++ b/pkgs/development/libraries/imtui/default.nix @@ -27,7 +27,7 @@ stdenv.mkDerivation rec { buildInputs = lib.optional withEmscripten emscripten ++ lib.optional withCurl curl ++ lib.optional withNcurses ncurses - ++ lib.optional stdenv.isDarwin darwin.apple_sdk.frameworks.Cocoa; + ++ lib.optional stdenv.hostPlatform.isDarwin darwin.apple_sdk.frameworks.Cocoa; postPatch = '' cp -r ${imgui.src}/* third-party/imgui/imgui diff --git a/pkgs/development/libraries/inchi/default.nix b/pkgs/development/libraries/inchi/default.nix index f74cfdec9305..1c8cca6af715 100644 --- a/pkgs/development/libraries/inchi/default.nix +++ b/pkgs/development/libraries/inchi/default.nix @@ -24,14 +24,14 @@ in sha256 = "1zbygqn0443p0gxwr4kx3m1bkqaj8x9hrpch3s41py7jq08f6x28"; }; - nativeBuildInputs = [ unzip ] ++ lib.optional stdenv.isDarwin fixDarwinDylibNames; + nativeBuildInputs = [ unzip ] ++ lib.optional stdenv.hostPlatform.isDarwin fixDarwinDylibNames; outputs = [ "out" "doc" ]; enableParallelBuilding = true; preConfigure = '' cd ./INCHI_API/libinchi/gcc - '' + lib.optionalString stdenv.isDarwin '' + '' + lib.optionalString stdenv.hostPlatform.isDarwin '' substituteInPlace makefile \ --replace ",--version-script=libinchi.map" "" \ --replace "LINUX_Z_RELRO = ,-z,relro" "" \ @@ -56,7 +56,7 @@ in runHook postInstall ''; - preFixup = lib.optionalString stdenv.isDarwin '' + preFixup = lib.optionalString stdenv.hostPlatform.isDarwin '' fixDarwinDylibNames $(find "$out" -name "*.so.*") ''; diff --git a/pkgs/development/libraries/intel-media-driver/default.nix b/pkgs/development/libraries/intel-media-driver/default.nix index 5b5cfac9e06b..4803f6ecf360 100644 --- a/pkgs/development/libraries/intel-media-driver/default.nix +++ b/pkgs/development/libraries/intel-media-driver/default.nix @@ -8,7 +8,7 @@ , libpciaccess , intel-gmmlib , libdrm -, enableX11 ? stdenv.isLinux +, enableX11 ? stdenv.hostPlatform.isLinux , libX11 # for passhtru.tests , pkgsi686Linux diff --git a/pkgs/development/libraries/irrlicht/default.nix b/pkgs/development/libraries/irrlicht/default.nix index fa5d2b3b0c99..6711622a2eb8 100644 --- a/pkgs/development/libraries/irrlicht/default.nix +++ b/pkgs/development/libraries/irrlicht/default.nix @@ -12,7 +12,7 @@ stdenv.mkDerivation rec { postPatch = '' sed -ie '/sys\/sysctl.h/d' source/Irrlicht/COSOperator.cpp - '' + lib.optionalString stdenv.isAarch64 '' + '' + lib.optionalString stdenv.hostPlatform.isAarch64 '' substituteInPlace source/Irrlicht/Makefile \ --replace "-DIRRLICHT_EXPORTS=1" "-DIRRLICHT_EXPORTS=1 -DPNG_ARM_NEON_OPT=0" ''; @@ -34,7 +34,7 @@ stdenv.mkDerivation rec { buildInputs = [ libGLU libGL libXrandr libX11 libXxf86vm - ] ++ lib.optional stdenv.isAarch64 zlib; + ] ++ lib.optional stdenv.hostPlatform.isAarch64 zlib; meta = { homepage = "https://irrlicht.sourceforge.io/"; diff --git a/pkgs/development/libraries/isa-l/default.nix b/pkgs/development/libraries/isa-l/default.nix index 9a112fb1c4d9..6ae04b0b267d 100644 --- a/pkgs/development/libraries/isa-l/default.nix +++ b/pkgs/development/libraries/isa-l/default.nix @@ -24,6 +24,6 @@ stdenv.mkDerivation rec { homepage = "https://github.com/intel/isa-l"; maintainers = with maintainers; [ jbedo ]; platforms = platforms.all; - broken = stdenv.isDarwin && stdenv.isAarch64; # does not build on M1 mac (asm/hwcap.h file not found) maybe needs gcc not clang? + broken = stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isAarch64; # does not build on M1 mac (asm/hwcap.h file not found) maybe needs gcc not clang? }; } diff --git a/pkgs/development/libraries/itk/generic.nix b/pkgs/development/libraries/itk/generic.nix index 808bac76e861..d4ece7d311ec 100644 --- a/pkgs/development/libraries/itk/generic.nix +++ b/pkgs/development/libraries/itk/generic.nix @@ -147,7 +147,7 @@ stdenv.mkDerivation { libX11 libuuid ] - ++ lib.optionals stdenv.isDarwin [ Cocoa ] + ++ lib.optionals stdenv.hostPlatform.isDarwin [ Cocoa ] ++ lib.optionals enablePython [ python ] ++ lib.optionals withVtk [ vtk ]; # Due to ITKVtkGlue=ON and the additional dependencies needed to configure VTK 9 diff --git a/pkgs/development/libraries/jabcode/default.nix b/pkgs/development/libraries/jabcode/default.nix index 1fc0e6fd0886..d735937b934d 100644 --- a/pkgs/development/libraries/jabcode/default.nix +++ b/pkgs/development/libraries/jabcode/default.nix @@ -46,6 +46,6 @@ stdenv.mkDerivation rec { license = licenses.lgpl21; maintainers = [ maintainers.xaverdh ]; platforms = platforms.unix; - broken = stdenv.isDarwin; # never built on Hydra https://hydra.nixos.org/job/nixpkgs/trunk/jabcode.x86_64-darwin + broken = stdenv.hostPlatform.isDarwin; # never built on Hydra https://hydra.nixos.org/job/nixpkgs/trunk/jabcode.x86_64-darwin }; } diff --git a/pkgs/development/libraries/java/jffi/default.nix b/pkgs/development/libraries/java/jffi/default.nix index dddcfd1fa303..fe5a0c553546 100644 --- a/pkgs/development/libraries/java/jffi/default.nix +++ b/pkgs/development/libraries/java/jffi/default.nix @@ -64,7 +64,7 @@ stdenv.mkDerivation (finalAttrs: { ''; meta = with lib; { - broken = stdenv.isDarwin; + broken = stdenv.hostPlatform.isDarwin; description = "Java Foreign Function Interface"; homepage = "https://github.com/jnr/jffi"; platforms = platforms.unix; diff --git a/pkgs/development/libraries/jemalloc/default.nix b/pkgs/development/libraries/jemalloc/default.nix index 7541e6b0c1a3..9d3bfd1d9a64 100644 --- a/pkgs/development/libraries/jemalloc/default.nix +++ b/pkgs/development/libraries/jemalloc/default.nix @@ -41,19 +41,19 @@ stdenv.mkDerivation rec { # jemalloc is unable to correctly detect transparent hugepage support on # ARM (https://github.com/jemalloc/jemalloc/issues/526), and the default # kernel ARMv6/7 kernel does not enable it, so we explicitly disable support - ++ lib.optionals (stdenv.isAarch32 && lib.versionOlder version "5") [ + ++ lib.optionals (stdenv.hostPlatform.isAarch32 && lib.versionOlder version "5") [ "--disable-thp" "je_cv_thp=no" ] # AArch64 has configurable page size up to 64k. The default configuration # for jemalloc only supports 4k page sizes. - ++ lib.optional stdenv.isAarch64 "--with-lg-page=16" + ++ lib.optional stdenv.hostPlatform.isAarch64 "--with-lg-page=16" # See https://github.com/jemalloc/jemalloc/issues/1997 # Using a value of 48 should work on both emulated and native x86_64-darwin. - ++ lib.optional (stdenv.isDarwin && stdenv.isx86_64) "--with-lg-vaddr=48" + ++ lib.optional (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isx86_64) "--with-lg-vaddr=48" ; - env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.isDarwin "-Wno-error=array-bounds"; + env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.hostPlatform.isDarwin "-Wno-error=array-bounds"; # Tries to link test binaries binaries dynamically and fails doCheck = !stdenv.hostPlatform.isStatic; diff --git a/pkgs/development/libraries/kde-frameworks/kauth/default.nix b/pkgs/development/libraries/kde-frameworks/kauth/default.nix index 0ad7cfbbb7e1..4e9a2a465214 100644 --- a/pkgs/development/libraries/kde-frameworks/kauth/default.nix +++ b/pkgs/development/libraries/kde-frameworks/kauth/default.nix @@ -1,7 +1,7 @@ { lib, stdenv, mkDerivation, propagate, extra-cmake-modules, kcoreaddons, qttools, - enablePolkit ? stdenv.isLinux, polkit-qt + enablePolkit ? stdenv.hostPlatform.isLinux, polkit-qt }: mkDerivation { diff --git a/pkgs/development/libraries/kde-frameworks/kdoctools/default.nix b/pkgs/development/libraries/kde-frameworks/kdoctools/default.nix index 4b52cd95b710..d40c5a0a95e2 100644 --- a/pkgs/development/libraries/kde-frameworks/kdoctools/default.nix +++ b/pkgs/development/libraries/kde-frameworks/kdoctools/default.nix @@ -22,7 +22,7 @@ mkDerivation { outputs = [ "out" "dev" ]; patches = [ ./kdoctools-no-find-docbook-xml.patch ] # kf.doctools.core: Error: Could not find kdoctools catalogs - ++ lib.optionals stdenv.isDarwin [ + ++ lib.optionals stdenv.hostPlatform.isDarwin [ (fetchpatch { name = "kdoctools-relocate-datapath.patch"; url = "https://github.com/msys2/MINGW-packages/raw/0900785a1f4e4146ab9561fb92a1c70fa70fcfc4/mingw-w64-kdoctools-qt5/0001-kdoctools-relocate-datapath.patch"; diff --git a/pkgs/development/libraries/kde-frameworks/kfilemetadata/default.nix b/pkgs/development/libraries/kde-frameworks/kfilemetadata/default.nix index 1bd1f115c6cb..32d01b261488 100644 --- a/pkgs/development/libraries/kde-frameworks/kfilemetadata/default.nix +++ b/pkgs/development/libraries/kde-frameworks/kfilemetadata/default.nix @@ -18,7 +18,7 @@ mkDerivation { pname = "kfilemetadata"; nativeBuildInputs = [ extra-cmake-modules ]; - buildInputs = lib.optionals stdenv.isLinux [ + buildInputs = lib.optionals stdenv.hostPlatform.isLinux [ attr ] ++ [ ebook_tools diff --git a/pkgs/development/libraries/kde-frameworks/kinit/default.nix b/pkgs/development/libraries/kde-frameworks/kinit/default.nix index 1f2620c5664d..fb18cfb287e7 100644 --- a/pkgs/development/libraries/kde-frameworks/kinit/default.nix +++ b/pkgs/development/libraries/kde-frameworks/kinit/default.nix @@ -21,7 +21,7 @@ mkDerivation { CXXFLAGS = [ ''-DNIXPKGS_KF5_KIOCORE=\"${getLib kio}/lib/libKF5KIOCore.so.5\"'' ''-DNIXPKGS_KF5_PARTS=\"${getLib kparts}/lib/libKF5Parts.so.5\"'' - ] ++ lib.optionals stdenv.isLinux [ + ] ++ lib.optionals stdenv.hostPlatform.isLinux [ ''-DNIXPKGS_KF5_PLASMA=\"${getLib plasma-framework}/lib/libKF5Plasma.so.5\"'' ]; setupHook = writeScript "setup-hook.sh" '' diff --git a/pkgs/development/libraries/kde-frameworks/kio/default.nix b/pkgs/development/libraries/kde-frameworks/kio/default.nix index 522c27bf56eb..89f341f9977a 100644 --- a/pkgs/development/libraries/kde-frameworks/kio/default.nix +++ b/pkgs/development/libraries/kde-frameworks/kio/default.nix @@ -15,14 +15,14 @@ mkDerivation { karchive kconfigwidgets kdbusaddons ki18n kiconthemes knotifications ktextwidgets kwallet kwidgetsaddons kwindowsystem qtscript qtx11extras kcrash libkrb5 - ] ++ lib.lists.optionals stdenv.isLinux [ + ] ++ lib.lists.optionals stdenv.hostPlatform.isLinux [ acl attr # both are needed for ACL support util-linux # provides libmount ]; propagatedBuildInputs = [ kbookmarks kcompletion kconfig kcoreaddons kitemviews kjobwidgets kservice kxmlgui qtbase qttools solid - ] ++ lib.optionals stdenv.isLinux [ + ] ++ lib.optionals stdenv.hostPlatform.isLinux [ kded ]; outputs = [ "out" "dev" ]; diff --git a/pkgs/development/libraries/kde-frameworks/knotifications.nix b/pkgs/development/libraries/kde-frameworks/knotifications.nix index 5284d673d89e..d9d5a6f70380 100644 --- a/pkgs/development/libraries/kde-frameworks/knotifications.nix +++ b/pkgs/development/libraries/kde-frameworks/knotifications.nix @@ -11,7 +11,7 @@ mkDerivation { nativeBuildInputs = [ extra-cmake-modules qttools ]; buildInputs = [ kcodecs kconfig kcoreaddons kwindowsystem libdbusmenu phonon qtx11extras - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ qtmacextras ]; } diff --git a/pkgs/development/libraries/kde-frameworks/ktexteditor.nix b/pkgs/development/libraries/kde-frameworks/ktexteditor.nix index ccc9f76b237a..23abe70fed05 100644 --- a/pkgs/development/libraries/kde-frameworks/ktexteditor.nix +++ b/pkgs/development/libraries/kde-frameworks/ktexteditor.nix @@ -15,7 +15,7 @@ mkDerivation ({ editorconfig-core-c ]; propagatedBuildInputs = [ kparts ]; -} // lib.optionalAttrs stdenv.isDarwin { +} // lib.optionalAttrs stdenv.hostPlatform.isDarwin { postPatch = '' substituteInPlace src/part/CMakeLists.txt \ --replace "kpart.desktop" "${kparts}/share/kservicetypes5/kpart.desktop" diff --git a/pkgs/development/libraries/kde-frameworks/solid/default.nix b/pkgs/development/libraries/kde-frameworks/solid/default.nix index 27160c3bda0d..e26f8bfa9a62 100644 --- a/pkgs/development/libraries/kde-frameworks/solid/default.nix +++ b/pkgs/development/libraries/kde-frameworks/solid/default.nix @@ -8,8 +8,8 @@ mkDerivation { pname = "solid"; patches = [ ./fix-search-path.patch ]; nativeBuildInputs = [ bison extra-cmake-modules flex ] - ++ lib.optionals stdenv.isLinux [ media-player-info ]; + ++ lib.optionals stdenv.hostPlatform.isLinux [ media-player-info ]; buildInputs = [ qtdeclarative qttools ]; propagatedBuildInputs = [ qtbase ]; - propagatedUserEnvPkgs = lib.optionals stdenv.isLinux [ media-player-info ]; + propagatedUserEnvPkgs = lib.optionals stdenv.hostPlatform.isLinux [ media-player-info ]; } diff --git a/pkgs/development/libraries/kerberos/heimdal.nix b/pkgs/development/libraries/kerberos/heimdal.nix index 60b3ad00aeda..ab9a107cd47e 100644 --- a/pkgs/development/libraries/kerberos/heimdal.nix +++ b/pkgs/development/libraries/kerberos/heimdal.nix @@ -32,10 +32,10 @@ , nixosTests , withCJSON ? true -, withCapNG ? stdenv.isLinux +, withCapNG ? stdenv.hostPlatform.isLinux # libmicrohttpd should theoretically work for darwin as well, but something is broken. # It affects tests check-bx509d and check-httpkadmind. -, withMicroHTTPD ? stdenv.isLinux +, withMicroHTTPD ? stdenv.hostPlatform.isLinux , withOpenLDAP ? true , withOpenLDAPAsHDBModule ? false , withOpenSSL ? true @@ -71,7 +71,7 @@ stdenv.mkDerivation { ++ (with perlPackages; [ JSON ]); buildInputs = [ db libedit pam ] - ++ lib.optionals (stdenv.isDarwin) [ CoreFoundation Security SystemConfiguration ] + ++ lib.optionals (stdenv.hostPlatform.isDarwin) [ CoreFoundation Security SystemConfiguration ] ++ lib.optionals (withCJSON) [ cjson ] ++ lib.optionals (withCapNG) [ libcap_ng ] ++ lib.optionals (withMicroHTTPD) [ libmicrohttpd ] @@ -132,7 +132,7 @@ stdenv.mkDerivation { # (test_cc) heimdal uses librokens implementation of `secure_getenv` on darwin, # which expects either USER or LOGNAME to be set. - preCheck = lib.optionalString (stdenv.isDarwin) '' + preCheck = lib.optionalString (stdenv.hostPlatform.isDarwin) '' export USER=nix-builder ''; diff --git a/pkgs/development/libraries/kerberos/krb5.nix b/pkgs/development/libraries/kerberos/krb5.nix index f48a2136ad11..a384d49fed03 100644 --- a/pkgs/development/libraries/kerberos/krb5.nix +++ b/pkgs/development/libraries/kerberos/krb5.nix @@ -52,7 +52,7 @@ stdenv.mkDerivation rec { # krb5's ./configure does not allow passing --enable-shared and --enable-static at the same time. # See https://bbs.archlinux.org/viewtopic.php?pid=1576737#p1576737 ++ lib.optionals staticOnly [ "--enable-static" "--disable-shared" ] - ++ lib.optional stdenv.isFreeBSD ''WARN_CFLAGS='' + ++ lib.optional stdenv.hostPlatform.isFreeBSD ''WARN_CFLAGS='' ++ lib.optionals (stdenv.buildPlatform != stdenv.hostPlatform) [ "krb5_cv_attr_constructor_destructor=yes,yes" "ac_cv_func_regcomp=yes" @@ -61,7 +61,7 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ byacc perl pkg-config ] # Provides the mig command used by the build scripts - ++ lib.optional stdenv.isDarwin bootstrap_cmds; + ++ lib.optional stdenv.hostPlatform.isDarwin bootstrap_cmds; buildInputs = [ openssl ] ++ lib.optionals (stdenv.hostPlatform.isLinux && stdenv.hostPlatform.libc != "bionic" && !(stdenv.hostPlatform.useLLVM or false)) [ keyutils ] @@ -69,7 +69,7 @@ stdenv.mkDerivation rec { ++ lib.optionals withLibedit [ libedit ] ++ lib.optionals withVerto [ libverto ]; - propagatedBuildInputs = lib.optionals stdenv.isDarwin (with darwin.apple_sdk; [ + propagatedBuildInputs = lib.optionals stdenv.hostPlatform.isDarwin (with darwin.apple_sdk; [ libs.xpc frameworks.Kerberos ]); diff --git a/pkgs/development/libraries/kyotocabinet/default.nix b/pkgs/development/libraries/kyotocabinet/default.nix index 5c5ab34bc24c..ebe783ae8beb 100644 --- a/pkgs/development/libraries/kyotocabinet/default.nix +++ b/pkgs/development/libraries/kyotocabinet/default.nix @@ -9,7 +9,7 @@ stdenv.mkDerivation rec { sha256 = "sha256-TIXXNmaNgpIL/b25KsPWa32xEI8JWBp2ndkWCgLe80k="; }; - prePatch = lib.optionalString stdenv.isDarwin '' + prePatch = lib.optionalString stdenv.hostPlatform.isDarwin '' substituteInPlace kccommon.h \ --replace tr1/unordered_map unordered_map \ --replace tr1/unordered_set unordered_set \ diff --git a/pkgs/development/libraries/ldb/default.nix b/pkgs/development/libraries/ldb/default.nix index 80a3f725f970..65fc10c92a70 100644 --- a/pkgs/development/libraries/ldb/default.nix +++ b/pkgs/development/libraries/ldb/default.nix @@ -80,7 +80,7 @@ stdenv.mkDerivation (finalAttrs: { }; meta = with lib; { - broken = stdenv.isDarwin; + broken = stdenv.hostPlatform.isDarwin; description = "LDAP-like embedded database"; homepage = "https://ldb.samba.org/"; license = licenses.lgpl3Plus; diff --git a/pkgs/development/libraries/lemon-graph/default.nix b/pkgs/development/libraries/lemon-graph/default.nix index ae071a727133..4e96e9f4c93a 100644 --- a/pkgs/development/libraries/lemon-graph/default.nix +++ b/pkgs/development/libraries/lemon-graph/default.nix @@ -16,7 +16,7 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ cmake ]; # error: no viable conversion from ... - doCheck = !stdenv.isDarwin; + doCheck = !stdenv.hostPlatform.isDarwin; patches = [ # error: ISO C++17 does not allow 'register' storage class specifier diff --git a/pkgs/development/libraries/leptonica/default.nix b/pkgs/development/libraries/leptonica/default.nix index 12cd3f074fcb..41af5b44a967 100644 --- a/pkgs/development/libraries/leptonica/default.nix +++ b/pkgs/development/libraries/leptonica/default.nix @@ -18,7 +18,7 @@ stdenv.mkDerivation rec { nativeCheckInputs = [ which gnuplot ]; # Fails on pngio_reg for unknown reason - doCheck = false; # !stdenv.isDarwin; + doCheck = false; # !stdenv.hostPlatform.isDarwin; meta = { description = "Image processing and analysis library"; diff --git a/pkgs/development/libraries/leveldb/default.nix b/pkgs/development/libraries/leveldb/default.nix index f5e7e2a638d2..9d2dfe468029 100644 --- a/pkgs/development/libraries/leveldb/default.nix +++ b/pkgs/development/libraries/leveldb/default.nix @@ -27,7 +27,7 @@ stdenv.mkDerivation rec { buildInputs = [ snappy ]; - nativeBuildInputs = lib.optional stdenv.isDarwin fixDarwinDylibNames ++ [ cmake ]; + nativeBuildInputs = lib.optional stdenv.hostPlatform.isDarwin fixDarwinDylibNames ++ [ cmake ]; doCheck = true; diff --git a/pkgs/development/libraries/lib2geom/default.nix b/pkgs/development/libraries/lib2geom/default.nix index e0db2b76f19e..eedb433e61be 100644 --- a/pkgs/development/libraries/lib2geom/default.nix +++ b/pkgs/development/libraries/lib2geom/default.nix @@ -77,7 +77,7 @@ stdenv.mkDerivation rec { # TODO: Update cmake hook to make it simpler to selectively disable cmake tests: #113829 checkPhase = let disabledTests = - lib.optionals stdenv.isAarch64 [ + lib.optionals stdenv.hostPlatform.isAarch64 [ # Broken on all platforms, test just accidentally passes on some. # https://gitlab.com/inkscape/lib2geom/-/issues/63 "elliptical-arc-test" diff --git a/pkgs/development/libraries/lib3mf/default.nix b/pkgs/development/libraries/lib3mf/default.nix index 2436fbc00287..df88534bc6e7 100644 --- a/pkgs/development/libraries/lib3mf/default.nix +++ b/pkgs/development/libraries/lib3mf/default.nix @@ -28,7 +28,7 @@ stdenv.mkDerivation rec { buildInputs = [ libzip gtest openssl - ] ++ (if stdenv.isDarwin then [ libossp_uuid ] else [ libuuid ]); + ] ++ (if stdenv.hostPlatform.isDarwin then [ libossp_uuid ] else [ libuuid ]); postPatch = '' # This lets us build the tests properly on aarch64-darwin. diff --git a/pkgs/development/libraries/libLAS/default.nix b/pkgs/development/libraries/libLAS/default.nix index b92d9161c1a3..f9bd01306585 100644 --- a/pkgs/development/libraries/libLAS/default.nix +++ b/pkgs/development/libraries/libLAS/default.nix @@ -45,7 +45,7 @@ stdenv.mkDerivation rec { "-DCMAKE_EXE_LINKER_FLAGS=-pthread" ]; - postFixup = lib.optionalString stdenv.isDarwin '' + postFixup = lib.optionalString stdenv.hostPlatform.isDarwin '' install_name_tool -change "@rpath/liblas.3.dylib" "$out/lib/liblas.3.dylib" $out/lib/liblas_c.dylib ''; diff --git a/pkgs/development/libraries/libad9361/default.nix b/pkgs/development/libraries/libad9361/default.nix index f370870f71ef..96f1e877d52b 100644 --- a/pkgs/development/libraries/libad9361/default.nix +++ b/pkgs/development/libraries/libad9361/default.nix @@ -15,7 +15,7 @@ stdenv.mkDerivation rec { buildInputs = [ libiio ]; - postPatch = lib.optionalString stdenv.isDarwin '' + postPatch = lib.optionalString stdenv.hostPlatform.isDarwin '' # Fix iio include path on darwin to match linux for i in test/*.c; do substituteInPlace $i \ diff --git a/pkgs/development/libraries/libadwaita/default.nix b/pkgs/development/libraries/libadwaita/default.nix index 924b8884df80..bd51a9a1245e 100644 --- a/pkgs/development/libraries/libadwaita/default.nix +++ b/pkgs/development/libraries/libadwaita/default.nix @@ -61,7 +61,7 @@ stdenv.mkDerivation (finalAttrs: { buildInputs = [ appstream fribidi - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ AppKit Foundation ]; @@ -72,7 +72,7 @@ stdenv.mkDerivation (finalAttrs: { nativeCheckInputs = [ adwaita-icon-theme - ] ++ lib.optionals (!stdenv.isDarwin) [ + ] ++ lib.optionals (!stdenv.hostPlatform.isDarwin) [ xvfb-run ]; @@ -80,7 +80,7 @@ stdenv.mkDerivation (finalAttrs: { # # not ok /Adwaita/ButtonContent/style_class_button - Gdk-FATAL-CRITICAL: # gdk_macos_monitor_get_workarea: assertion 'GDK_IS_MACOS_MONITOR (self)' failed - doCheck = !stdenv.isDarwin; + doCheck = !stdenv.hostPlatform.isDarwin; separateDebugInfo = true; checkPhase = '' @@ -98,7 +98,7 @@ stdenv.mkDerivation (finalAttrs: { # Tests need a cache directory "HOME=$TMPDIR" ) - env "''${testEnvironment[@]}" ${lib.optionalString (!stdenv.isDarwin) "xvfb-run"} \ + env "''${testEnvironment[@]}" ${lib.optionalString (!stdenv.hostPlatform.isDarwin) "xvfb-run"} \ meson test --print-errorlogs runHook postCheck diff --git a/pkgs/development/libraries/libagar/libagar_test.nix b/pkgs/development/libraries/libagar/libagar_test.nix index 0582019d72f5..8fa18093aa35 100644 --- a/pkgs/development/libraries/libagar/libagar_test.nix +++ b/pkgs/development/libraries/libagar/libagar_test.nix @@ -23,7 +23,7 @@ stdenv.mkDerivation { buildInputs = [ perl bsdbuild libagar libjpeg libpng openssl ]; meta = with lib; { - broken = (stdenv.isLinux && stdenv.isAarch64); + broken = (stdenv.hostPlatform.isLinux && stdenv.hostPlatform.isAarch64); description = "Tests for libagar"; mainProgram = "agartest"; homepage = "http://libagar.org/index.html"; diff --git a/pkgs/development/libraries/libantlr3c/default.nix b/pkgs/development/libraries/libantlr3c/default.nix index f61c0bfafc7b..622dabd82394 100644 --- a/pkgs/development/libraries/libantlr3c/default.nix +++ b/pkgs/development/libraries/libantlr3c/default.nix @@ -8,7 +8,7 @@ stdenv.mkDerivation rec { sha256 ="0lpbnb4dq4azmsvlhp6khq1gy42kyqyjv8gww74g5lm2y6blm4fa"; }; - configureFlags = lib.optional stdenv.is64bit "--enable-64bit" + configureFlags = lib.optional stdenv.hostPlatform.is64bit "--enable-64bit" # libantlr3c wrongly emits the abi flags -m64 and -m32 which imply x86 archs # https://github.com/antlr/antlr3/issues/205 ++ lib.optional (!stdenv.hostPlatform.isx86) "--disable-abiflags"; diff --git a/pkgs/development/libraries/libao/default.nix b/pkgs/development/libraries/libao/default.nix index b920fe9c3b4e..6c6743b2b55e 100644 --- a/pkgs/development/libraries/libao/default.nix +++ b/pkgs/development/libraries/libao/default.nix @@ -33,8 +33,8 @@ stdenv.mkDerivation rec { buildInputs = [ ] ++ lib.optional usePulseAudio libpulseaudio ++ - lib.optionals stdenv.isLinux [ alsa-lib libcap ] ++ - lib.optionals stdenv.isDarwin [ CoreAudio CoreServices AudioUnit ]; + lib.optionals stdenv.hostPlatform.isLinux [ alsa-lib libcap ] ++ + lib.optionals stdenv.hostPlatform.isDarwin [ CoreAudio CoreServices AudioUnit ]; nativeBuildInputs = [ autoreconfHook pkg-config ]; diff --git a/pkgs/development/libraries/libaom/default.nix b/pkgs/development/libraries/libaom/default.nix index 8f4afbf5a3e0..01f361d05476 100644 --- a/pkgs/development/libraries/libaom/default.nix +++ b/pkgs/development/libraries/libaom/default.nix @@ -49,7 +49,7 @@ stdenv.mkDerivation rec { "-DCONFIG_TUNE_VMAF=1" ] ++ lib.optionals (isCross && !stdenv.hostPlatform.isx86) [ "-DCMAKE_ASM_COMPILER=${stdenv.cc.targetPrefix}as" - ] ++ lib.optionals stdenv.isAarch32 [ + ] ++ lib.optionals stdenv.hostPlatform.isAarch32 [ # armv7l-hf-multiplatform does not support NEON # see lib/systems/platform.nix "-DENABLE_NEON=0" diff --git a/pkgs/development/libraries/libaosd/default.nix b/pkgs/development/libraries/libaosd/default.nix index 540fc10998e5..8068ae3edd9d 100644 --- a/pkgs/development/libraries/libaosd/default.nix +++ b/pkgs/development/libraries/libaosd/default.nix @@ -28,7 +28,7 @@ stdenv.mkDerivation rec { composited rendering via XComposite, as well as support for rendering Cairo and Pango layouts. ''; - broken = stdenv.isDarwin; + broken = stdenv.hostPlatform.isDarwin; homepage = "https://github.com/atheme-legacy/libaosd"; license = licenses.mit; maintainers = with maintainers; [ unode ]; diff --git a/pkgs/development/libraries/libargon2/default.nix b/pkgs/development/libraries/libargon2/default.nix index 6e2ef83c5eac..ccd8166ca4f0 100644 --- a/pkgs/development/libraries/libargon2/default.nix +++ b/pkgs/development/libraries/libargon2/default.nix @@ -11,7 +11,7 @@ stdenv.mkDerivation rec { sha256 = "0p4ry9dn0mi9js0byijxdyiwx74p1nr8zj7wjpd1fjgqva4sk23i"; }; - nativeBuildInputs = lib.optionals stdenv.isDarwin [ + nativeBuildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ fixDarwinDylibNames ]; diff --git a/pkgs/development/libraries/libass/default.nix b/pkgs/development/libraries/libass/default.nix index 3c3fa3ee7066..db5603ac4aea 100644 --- a/pkgs/development/libraries/libass/default.nix +++ b/pkgs/development/libraries/libass/default.nix @@ -30,7 +30,7 @@ stdenv.mkDerivation rec { buildInputs = [ freetype fribidi harfbuzz ] ++ lib.optional fontconfigSupport fontconfig - ++ lib.optional stdenv.isDarwin [ + ++ lib.optional stdenv.hostPlatform.isDarwin [ libiconv darwin.apple_sdk.frameworks.ApplicationServices darwin.apple_sdk.frameworks.CoreFoundation diff --git a/pkgs/development/libraries/libasyncns/default.nix b/pkgs/development/libraries/libasyncns/default.nix index 09e056373d27..77c998f4216b 100644 --- a/pkgs/development/libraries/libasyncns/default.nix +++ b/pkgs/development/libraries/libasyncns/default.nix @@ -9,7 +9,7 @@ stdenv.mkDerivation rec { sha256 = "0x5b6lcic4cd7q0bx00x93kvpyzl7n2abbgvqbrlzrfb8vknc6jg"; }; - postPatch = lib.optionalString stdenv.isDarwin '' + postPatch = lib.optionalString stdenv.hostPlatform.isDarwin '' substituteInPlace libasyncns/asyncns.c \ --replace '' '' ''; diff --git a/pkgs/development/libraries/libatomic_ops/default.nix b/pkgs/development/libraries/libatomic_ops/default.nix index bf83a9e8456a..a9fc75558e9b 100644 --- a/pkgs/development/libraries/libatomic_ops/default.nix +++ b/pkgs/development/libraries/libatomic_ops/default.nix @@ -14,9 +14,9 @@ stdenv.mkDerivation rec { outputs = [ "out" "dev" "doc" ]; - nativeBuildInputs = lib.optionals stdenv.isCygwin [ autoconf automake libtool ]; + nativeBuildInputs = lib.optionals stdenv.hostPlatform.isCygwin [ autoconf automake libtool ]; - preConfigure = lib.optionalString stdenv.isCygwin '' + preConfigure = lib.optionalString stdenv.hostPlatform.isCygwin '' sed -i -e "/libatomic_ops_gpl_la_SOURCES/a libatomic_ops_gpl_la_LIBADD = libatomic_ops.la" src/Makefile.am ./autogen.sh ''; diff --git a/pkgs/development/libraries/libbacktrace/default.nix b/pkgs/development/libraries/libbacktrace/default.nix index 1be572671e02..60c7ede0993f 100644 --- a/pkgs/development/libraries/libbacktrace/default.nix +++ b/pkgs/development/libraries/libbacktrace/default.nix @@ -41,7 +41,7 @@ stdenv.mkDerivation { (lib.enableFeature enableShared "shared") ]; - doCheck = stdenv.isLinux && !stdenv.hostPlatform.isMusl; + doCheck = stdenv.hostPlatform.isLinux && !stdenv.hostPlatform.isMusl; passthru = { updateScript = unstableGitUpdater { }; diff --git a/pkgs/development/libraries/libbladeRF/default.nix b/pkgs/development/libraries/libbladeRF/default.nix index 94d1257d0e7d..77e72d22db6c 100644 --- a/pkgs/development/libraries/libbladeRF/default.nix +++ b/pkgs/development/libraries/libbladeRF/default.nix @@ -16,8 +16,8 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ cmake pkg-config git doxygen help2man ]; # ncurses used due to https://github.com/Nuand/bladeRF/blob/ab4fc672c8bab4f8be34e8917d3f241b1d52d0b8/host/utilities/bladeRF-cli/CMakeLists.txt#L208 buildInputs = [ tecla libusb1 ] - ++ lib.optionals stdenv.isLinux [ udev ] - ++ lib.optionals stdenv.isDarwin [ ncurses ]; + ++ lib.optionals stdenv.hostPlatform.isLinux [ udev ] + ++ lib.optionals stdenv.hostPlatform.isDarwin [ ncurses ]; # Fixup shebang prePatch = "patchShebangs host/utilities/bladeRF-cli/src/cmd/doc/generate.bash"; @@ -29,7 +29,7 @@ stdenv.mkDerivation rec { cmakeFlags = [ "-DBUILD_DOCUMENTATION=ON" - ] ++ lib.optionals stdenv.isLinux [ + ] ++ lib.optionals stdenv.hostPlatform.isLinux [ "-DUDEV_RULES_PATH=etc/udev/rules.d" "-DINSTALL_UDEV_RULES=ON" "-DBLADERF_GROUP=bladerf" diff --git a/pkgs/development/libraries/libbluray/default.nix b/pkgs/development/libraries/libbluray/default.nix index 672908281b0e..c31c05920e31 100644 --- a/pkgs/development/libraries/libbluray/default.nix +++ b/pkgs/development/libraries/libbluray/default.nix @@ -24,7 +24,7 @@ stdenv.mkDerivation rec { buildInputs = [ fontconfig ] ++ lib.optional withMetadata libxml2 ++ lib.optional withFonts freetype - ++ lib.optional stdenv.isDarwin DiskArbitration; + ++ lib.optional stdenv.hostPlatform.isDarwin DiskArbitration; propagatedBuildInputs = lib.optional withAACS libaacs; diff --git a/pkgs/development/libraries/libbtbb/default.nix b/pkgs/development/libraries/libbtbb/default.nix index e0e70005e25f..9ea153fab6f6 100644 --- a/pkgs/development/libraries/libbtbb/default.nix +++ b/pkgs/development/libraries/libbtbb/default.nix @@ -11,7 +11,7 @@ stdenv.mkDerivation rec { sha256 = "1byv8174xam7siakr1p0523x97wkh0fmwmq341sd3g70qr2g767d"; }; - nativeBuildInputs = [ cmake ] ++ lib.optionals stdenv.isDarwin [ CoreServices ]; + nativeBuildInputs = [ cmake ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ CoreServices ]; # https://github.com/greatscottgadgets/libbtbb/issues/63 postPatch = '' diff --git a/pkgs/development/libraries/libbutl/default.nix b/pkgs/development/libraries/libbutl/default.nix index 65fe845ff25a..aaf78cec08dc 100644 --- a/pkgs/development/libraries/libbutl/default.nix +++ b/pkgs/development/libraries/libbutl/default.nix @@ -20,7 +20,7 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ build2 - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ DarwinTools ]; @@ -36,7 +36,7 @@ stdenv.mkDerivation rec { # but especially important when bootstrapping disallowedReferences = [ build2 ]; - postPatch = lib.optionalString stdenv.isLinux '' + postPatch = lib.optionalString stdenv.hostPlatform.isLinux '' substituteInPlace libbutl/uuid-linux.cxx \ --replace '"libuuid.so' '"${lib.getLib libuuid}/lib/libuuid.so' ''; diff --git a/pkgs/development/libraries/libcacard/default.nix b/pkgs/development/libraries/libcacard/default.nix index 5f987943d8df..1dd07a9d6ec2 100644 --- a/pkgs/development/libraries/libcacard/default.nix +++ b/pkgs/development/libraries/libcacard/default.nix @@ -9,7 +9,7 @@ stdenv.mkDerivation rec { sha256 = "sha256-+79N6Mt9tb3/XstnL/Db5pOfufNEuQDVG6YpUymjMuc="; }; - postPatch = lib.optionalString stdenv.isDarwin '' + postPatch = lib.optionalString stdenv.hostPlatform.isDarwin '' sed -i '/--version-script/d' Makefile.in sed -i 's/^vflag = .*$/vflag = ""/' meson.build ''; diff --git a/pkgs/development/libraries/libcanberra/default.nix b/pkgs/development/libraries/libcanberra/default.nix index 0a9aabf73123..7f164c18b49c 100644 --- a/pkgs/development/libraries/libcanberra/default.nix +++ b/pkgs/development/libraries/libcanberra/default.nix @@ -2,7 +2,7 @@ , gtk2-x11, gtk3-x11 , gtkSupport ? null , libpulseaudio, gst_all_1, libvorbis, libcap, systemd , Carbon, CoreServices, AppKit -, withAlsa ? stdenv.isLinux, alsa-lib }: +, withAlsa ? stdenv.hostPlatform.isLinux, alsa-lib }: stdenv.mkDerivation rec { pname = "libcanberra"; @@ -23,12 +23,12 @@ stdenv.mkDerivation rec { ] ++ (with gst_all_1; [ gstreamer gst-plugins-base ]) ++ lib.optional (gtkSupport == "gtk2") gtk2-x11 ++ lib.optional (gtkSupport == "gtk3") gtk3-x11 - ++ lib.optionals stdenv.isDarwin [ Carbon CoreServices AppKit ] - ++ lib.optionals stdenv.isLinux [ libcap systemd ] + ++ lib.optionals stdenv.hostPlatform.isDarwin [ Carbon CoreServices AppKit ] + ++ lib.optionals stdenv.hostPlatform.isLinux [ libcap systemd ] ++ lib.optional withAlsa alsa-lib; configureFlags = [ "--disable-oss" ] - ++ lib.optional stdenv.isLinux "--with-systemdsystemunitdir=${placeholder "out"}/lib/systemd/system"; + ++ lib.optional stdenv.hostPlatform.isLinux "--with-systemdsystemunitdir=${placeholder "out"}/lib/systemd/system"; patches = [ (fetchpatch { @@ -36,7 +36,7 @@ stdenv.mkDerivation rec { url = "http://git.0pointer.net/libcanberra.git/patch/?id=c0620e432650e81062c1967cc669829dbd29b310"; sha256 = "0rc7zwn39yxzxp37qh329g7375r5ywcqcaak8ryd0dgvg8m5hcx9"; }) - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ (fetchpatch { url = "https://github.com/macports/macports-ports/raw/5a7965dfea7727d1ceedee46c7b0ccee9cb23468/audio/libcanberra/files/patch-configure.diff"; sha256 = "sha256-pEJy1krciUEg5BFIS8FJ4BubjfS/nt9aqi6BLnS1+4M="; diff --git a/pkgs/development/libraries/libcdio-paranoia/default.nix b/pkgs/development/libraries/libcdio-paranoia/default.nix index 5f01756ecac0..93b3cb91ffc9 100644 --- a/pkgs/development/libraries/libcdio-paranoia/default.nix +++ b/pkgs/development/libraries/libcdio-paranoia/default.nix @@ -27,15 +27,15 @@ stdenv.mkDerivation rec { ]; buildInputs = [ libcdio ] - ++ lib.optionals stdenv.isDarwin [ + ++ lib.optionals stdenv.hostPlatform.isDarwin [ libiconv IOKit DiskArbitration ]; - propagatedBuildInputs = lib.optional stdenv.isDarwin DiskArbitration; + propagatedBuildInputs = lib.optional stdenv.hostPlatform.isDarwin DiskArbitration; - configureFlags = lib.optionals stdenv.isDarwin [ "--disable-ld-version-script" ]; + configureFlags = lib.optionals stdenv.hostPlatform.isDarwin [ "--disable-ld-version-script" ]; meta = with lib; { description = "CD paranoia on top of libcdio"; diff --git a/pkgs/development/libraries/libcdio/default.nix b/pkgs/development/libraries/libcdio/default.nix index 820ac97a434f..9f0d8689f30e 100644 --- a/pkgs/development/libraries/libcdio/default.nix +++ b/pkgs/development/libraries/libcdio/default.nix @@ -31,11 +31,11 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ pkg-config help2man ]; buildInputs = [ libcddb libiconv ncurses ] - ++ lib.optionals stdenv.isDarwin [ Carbon IOKit ]; + ++ lib.optionals stdenv.hostPlatform.isDarwin [ Carbon IOKit ]; enableParallelBuilding = true; - doCheck = !stdenv.isDarwin; + doCheck = !stdenv.hostPlatform.isDarwin; meta = with lib; { description = "Library for OS-independent CD-ROM and CD image access"; diff --git a/pkgs/development/libraries/libcec/default.nix b/pkgs/development/libraries/libcec/default.nix index 78746cf01254..4116f2a0172a 100644 --- a/pkgs/development/libraries/libcec/default.nix +++ b/pkgs/development/libraries/libcec/default.nix @@ -31,7 +31,7 @@ stdenv.mkDerivation rec { cmakeFlags = [ "-DBUILD_SHARED_LIBS=1" - ] ++ lib.optionals stdenv.isLinux [ + ] ++ lib.optionals stdenv.hostPlatform.isLinux [ "-DHAVE_LINUX_API=1" ]; diff --git a/pkgs/development/libraries/libcommuni/default.nix b/pkgs/development/libraries/libcommuni/default.nix index c33fdcf00f33..93aec103bca0 100644 --- a/pkgs/development/libraries/libcommuni/default.nix +++ b/pkgs/development/libraries/libcommuni/default.nix @@ -21,7 +21,7 @@ stdenv.mkDerivation rec { dontUseQmakeConfigure = true; configureFlags = [ "-config" "release" ] # Build mixes up dylibs/frameworks if one is not explicitly specified. - ++ lib.optionals stdenv.isDarwin [ "-config" "qt_framework" ]; + ++ lib.optionals stdenv.hostPlatform.isDarwin [ "-config" "qt_framework" ]; dontWrapQtApps = true; diff --git a/pkgs/development/libraries/libcouchbase/default.nix b/pkgs/development/libraries/libcouchbase/default.nix index 4f813d74a897..f3decde56c77 100644 --- a/pkgs/development/libraries/libcouchbase/default.nix +++ b/pkgs/development/libraries/libcouchbase/default.nix @@ -19,7 +19,7 @@ stdenv.mkDerivation rec { # Running tests in parallel does not work enableParallelChecking = false; - doCheck = !stdenv.isDarwin; + doCheck = !stdenv.hostPlatform.isDarwin; meta = with lib; { description = "C client library for Couchbase"; diff --git a/pkgs/development/libraries/libdazzle/default.nix b/pkgs/development/libraries/libdazzle/default.nix index c94707903872..08b286c825cf 100644 --- a/pkgs/development/libraries/libdazzle/default.nix +++ b/pkgs/development/libraries/libdazzle/default.nix @@ -42,7 +42,7 @@ stdenv.mkDerivation rec { docbook_xml_dtd_43 dbus glib - ] ++ lib.optionals stdenv.isLinux [ + ] ++ lib.optionals stdenv.hostPlatform.isLinux [ xvfb-run ] ++ lib.optionals (!stdenv.buildPlatform.canExecute stdenv.hostPlatform) [ mesonEmulatorHook @@ -57,7 +57,7 @@ stdenv.mkDerivation rec { "-Denable_gtk_doc=true" ]; - doCheck = stdenv.isLinux; + doCheck = stdenv.hostPlatform.isLinux; checkPhase = '' xvfb-run -s '-screen 0 800x600x24' dbus-run-session \ diff --git a/pkgs/development/libraries/libdc1394/default.nix b/pkgs/development/libraries/libdc1394/default.nix index 0163eb9015d2..fc33817a857e 100644 --- a/pkgs/development/libraries/libdc1394/default.nix +++ b/pkgs/development/libraries/libdc1394/default.nix @@ -16,8 +16,8 @@ stdenv.mkDerivation rec { ]; buildInputs = [ libusb1 ] - ++ lib.optional stdenv.isLinux libraw1394 - ++ lib.optional stdenv.isDarwin CoreServices; + ++ lib.optional stdenv.hostPlatform.isLinux libraw1394 + ++ lib.optional stdenv.hostPlatform.isDarwin CoreServices; meta = with lib; { description = "Capture and control API for IIDC compliant cameras"; diff --git a/pkgs/development/libraries/libdevil/default.nix b/pkgs/development/libraries/libdevil/default.nix index bfefe90487c4..53944f5a5e94 100644 --- a/pkgs/development/libraries/libdevil/default.nix +++ b/pkgs/development/libraries/libdevil/default.nix @@ -35,7 +35,7 @@ stdenv.mkDerivation (finalAttrs: { buildInputs = [ libjpeg libpng libmng lcms1 libtiff openexr ] ++ lib.optionals withXorg [ libX11 libGL ] - ++ lib.optionals stdenv.isDarwin [ OpenGL ]; + ++ lib.optionals stdenv.hostPlatform.isDarwin [ OpenGL ]; configureFlags = [ "--enable-ILU" "--enable-ILUT" ]; diff --git a/pkgs/development/libraries/libdiscid/default.nix b/pkgs/development/libraries/libdiscid/default.nix index 926973bb5739..2c4e7de008b6 100644 --- a/pkgs/development/libraries/libdiscid/default.nix +++ b/pkgs/development/libraries/libdiscid/default.nix @@ -6,14 +6,14 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ cmake pkg-config ]; - buildInputs = lib.optionals stdenv.isDarwin [ darwin.apple_sdk.frameworks.IOKit ]; + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.IOKit ]; src = fetchurl { url = "http://ftp.musicbrainz.org/pub/musicbrainz/${pname}/${pname}-${version}.tar.gz"; sha256 = "sha256-3V6PHJrq1ELiO3SanMkzY3LmLoitcHmitiiVsDkMsoI="; }; - NIX_LDFLAGS = lib.optionalString stdenv.isDarwin "-framework CoreFoundation -framework IOKit"; + NIX_LDFLAGS = lib.optionalString stdenv.hostPlatform.isDarwin "-framework CoreFoundation -framework IOKit"; meta = with lib; { description = "C library for creating MusicBrainz DiscIDs from audio CDs"; diff --git a/pkgs/development/libraries/libdv/default.nix b/pkgs/development/libraries/libdv/default.nix index 49c2ab1bdfa7..da69eedb2887 100644 --- a/pkgs/development/libraries/libdv/default.nix +++ b/pkgs/development/libraries/libdv/default.nix @@ -10,7 +10,7 @@ stdenv.mkDerivation rec { }; # Disable priority scheduling on Darwin because it doesn’t support sched_setscheduler. - postPatch = lib.optionalString stdenv.isDarwin '' + postPatch = lib.optionalString stdenv.hostPlatform.isDarwin '' substituteInPlace encodedv/dvconnect.c \ --replace '#ifdef _SC_PRIORITY_SCHEDULING' '#if 0' ''; diff --git a/pkgs/development/libraries/libdvdcss/default.nix b/pkgs/development/libraries/libdvdcss/default.nix index 6c832250fc1c..2e1cc41c5a73 100644 --- a/pkgs/development/libraries/libdvdcss/default.nix +++ b/pkgs/development/libraries/libdvdcss/default.nix @@ -4,7 +4,7 @@ stdenv.mkDerivation rec { pname = "libdvdcss"; version = "1.4.3"; - buildInputs = lib.optional stdenv.isDarwin IOKit; + buildInputs = lib.optional stdenv.hostPlatform.isDarwin IOKit; src = fetchurl { url = "http://get.videolan.org/libdvdcss/${version}/${pname}-${version}.tar.bz2"; diff --git a/pkgs/development/libraries/libdwg/default.nix b/pkgs/development/libraries/libdwg/default.nix index 969b5d9636f2..741d848c47a8 100644 --- a/pkgs/development/libraries/libdwg/default.nix +++ b/pkgs/development/libraries/libdwg/default.nix @@ -14,7 +14,7 @@ stdenv.mkDerivation rec { hardeningDisable = [ "format" ]; # remove forbidden references to $TMPDIR - preFixup = lib.optionalString stdenv.isLinux '' + preFixup = lib.optionalString stdenv.hostPlatform.isLinux '' for f in "$out"/bin/*; do if isELF "$f"; then patchelf --shrink-rpath --allowed-rpath-prefixes "$NIX_STORE" "$f" diff --git a/pkgs/development/libraries/libepoxy/default.nix b/pkgs/development/libraries/libepoxy/default.nix index f771ad140b55..5ff8055cedee 100644 --- a/pkgs/development/libraries/libepoxy/default.nix +++ b/pkgs/development/libraries/libepoxy/default.nix @@ -10,7 +10,7 @@ , libX11 , Carbon , OpenGL -, x11Support ? !stdenv.isDarwin +, x11Support ? !stdenv.hostPlatform.isDarwin , testers }: @@ -30,15 +30,15 @@ stdenv.mkDerivation (finalAttrs: { postPatch = '' patchShebangs src/*.py '' - + lib.optionalString stdenv.isDarwin '' + + lib.optionalString stdenv.hostPlatform.isDarwin '' substituteInPlace src/dispatch_common.h --replace "PLATFORM_HAS_GLX 0" "PLATFORM_HAS_GLX 1" '' # cgl_core and cgl_epoxy_api fail in darwin sandbox and on Hydra (because it's headless?) - + lib.optionalString stdenv.isDarwin '' + + lib.optionalString stdenv.hostPlatform.isDarwin '' substituteInPlace test/meson.build \ --replace "[ 'cgl_epoxy_api', [ 'cgl_epoxy_api.c' ] ]," "" '' - + lib.optionalString (stdenv.isDarwin && stdenv.isx86_64) '' + + lib.optionalString (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isx86_64) '' substituteInPlace test/meson.build \ --replace "[ 'cgl_core', [ 'cgl_core.c' ] ]," "" ''; @@ -47,23 +47,23 @@ stdenv.mkDerivation (finalAttrs: { nativeBuildInputs = [ meson ninja pkg-config utilmacros python3 ]; - buildInputs = lib.optionals (x11Support && !stdenv.isDarwin) [ + buildInputs = lib.optionals (x11Support && !stdenv.hostPlatform.isDarwin) [ libGL ] ++ lib.optionals x11Support [ libX11 - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ Carbon OpenGL ]; mesonFlags = [ - "-Degl=${if (x11Support && !stdenv.isDarwin) then "yes" else "no"}" + "-Degl=${if (x11Support && !stdenv.hostPlatform.isDarwin) then "yes" else "no"}" "-Dglx=${if x11Support then "yes" else "no"}" "-Dtests=${lib.boolToString finalAttrs.finalPackage.doCheck}" "-Dx11=${lib.boolToString x11Support}" ]; - env.NIX_CFLAGS_COMPILE = lib.optionalString (x11Support && !stdenv.isDarwin) ''-DLIBGL_PATH="${lib.getLib libGL}/lib"''; + env.NIX_CFLAGS_COMPILE = lib.optionalString (x11Support && !stdenv.hostPlatform.isDarwin) ''-DLIBGL_PATH="${lib.getLib libGL}/lib"''; doCheck = true; diff --git a/pkgs/development/libraries/libevent/default.nix b/pkgs/development/libraries/libevent/default.nix index 167371e287c0..ab443dfac80d 100644 --- a/pkgs/development/libraries/libevent/default.nix +++ b/pkgs/development/libraries/libevent/default.nix @@ -46,7 +46,7 @@ stdenv.mkDerivation rec { ++ lib.optional stdenv.hostPlatform.isDarwin fixDarwinDylibNames; buildInputs = lib.optional sslSupport openssl - ++ lib.optional stdenv.isCygwin findutils; + ++ lib.optional stdenv.hostPlatform.isCygwin findutils; doCheck = false; # needs the net diff --git a/pkgs/development/libraries/libewf/default.nix b/pkgs/development/libraries/libewf/default.nix index 6c149b0186ee..3bfd958bfd60 100644 --- a/pkgs/development/libraries/libewf/default.nix +++ b/pkgs/development/libraries/libewf/default.nix @@ -11,7 +11,7 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ pkg-config ]; buildInputs = [ zlib openssl libuuid ] - ++ lib.optionals stdenv.isDarwin [ bzip2 ]; + ++ lib.optionals stdenv.hostPlatform.isDarwin [ bzip2 ]; # cannot run test program while cross compiling configureFlags = lib.optionals (!stdenv.buildPlatform.canExecute stdenv.hostPlatform) [ diff --git a/pkgs/development/libraries/libextractor/default.nix b/pkgs/development/libraries/libextractor/default.nix index d947534cb2ec..e154eebc48c1 100644 --- a/pkgs/development/libraries/libextractor/default.nix +++ b/pkgs/development/libraries/libextractor/default.nix @@ -1,7 +1,7 @@ { lib, stdenv, fetchurl, fetchpatch2, substituteAll , libtool, gettext, zlib, bzip2, flac, libvorbis , exiv2, libgsf, pkg-config -, rpmSupport ? stdenv.isLinux, rpm +, rpmSupport ? stdenv.hostPlatform.isLinux, rpm , gstreamerSupport ? true, gst_all_1 # ^ Needed e.g. for proper id3 and FLAC support. # Set to `false` to decrease package closure size by about 87 MB (53%). @@ -64,7 +64,7 @@ stdenv.mkDerivation rec { # Checks need to be run after "make install", otherwise plug-ins are not in # the search path, etc. doCheck = false; - doInstallCheck = !stdenv.isDarwin; + doInstallCheck = !stdenv.hostPlatform.isDarwin; installCheckPhase = "make check"; meta = with lib; { diff --git a/pkgs/development/libraries/libfabric/default.nix b/pkgs/development/libraries/libfabric/default.nix index 658e380d210b..6fabadf5f129 100644 --- a/pkgs/development/libraries/libfabric/default.nix +++ b/pkgs/development/libraries/libfabric/default.nix @@ -3,9 +3,9 @@ , fetchFromGitHub , pkg-config , autoreconfHook -, enablePsm2 ? (stdenv.isx86_64 && stdenv.isLinux) +, enablePsm2 ? (stdenv.hostPlatform.isx86_64 && stdenv.hostPlatform.isLinux) , libpsm2 -, enableOpx ? (stdenv.isx86_64 && stdenv.isLinux) +, enableOpx ? (stdenv.hostPlatform.isx86_64 && stdenv.hostPlatform.isLinux) , libuuid , numactl }: diff --git a/pkgs/development/libraries/libff/default.nix b/pkgs/development/libraries/libff/default.nix index af2191fb4136..527733750079 100644 --- a/pkgs/development/libraries/libff/default.nix +++ b/pkgs/development/libraries/libff/default.nix @@ -14,7 +14,7 @@ stdenv.mkDerivation rec { }; cmakeFlags = [ "-DWITH_PROCPS=Off" ] - ++ lib.optionals stdenv.isAarch64 [ "-DCURVE=ALT_BN128" "-DUSE_ASM=OFF" ]; + ++ lib.optionals stdenv.hostPlatform.isAarch64 [ "-DCURVE=ALT_BN128" "-DUSE_ASM=OFF" ]; postPatch = lib.optionalString (!enableStatic) '' substituteInPlace libff/CMakeLists.txt --replace "STATIC" "SHARED" diff --git a/pkgs/development/libraries/libffi/3.3.nix b/pkgs/development/libraries/libffi/3.3.nix index 50bec9edd050..d8dd3fa47d5c 100644 --- a/pkgs/development/libraries/libffi/3.3.nix +++ b/pkgs/development/libraries/libffi/3.3.nix @@ -63,6 +63,6 @@ stdenv.mkDerivation rec { maintainers = with maintainers; [ armeenm ]; platforms = platforms.all; # never built on aarch64-darwin since first introduction in nixpkgs - broken = stdenv.isDarwin && stdenv.isAarch64; + broken = stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isAarch64; }; } diff --git a/pkgs/development/libraries/libfido2/default.nix b/pkgs/development/libraries/libfido2/default.nix index 04bfadeef979..1a68b5eb6eb1 100644 --- a/pkgs/development/libraries/libfido2/default.nix +++ b/pkgs/development/libraries/libfido2/default.nix @@ -25,9 +25,9 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ cmake pkg-config ]; buildInputs = [ libcbor zlib ] - ++ lib.optionals stdenv.isDarwin [ hidapi ] - ++ lib.optionals stdenv.isLinux [ udev ] - ++ lib.optionals (stdenv.isLinux && withPcsclite) [ pcsclite ]; + ++ lib.optionals stdenv.hostPlatform.isDarwin [ hidapi ] + ++ lib.optionals stdenv.hostPlatform.isLinux [ udev ] + ++ lib.optionals (stdenv.hostPlatform.isLinux && withPcsclite) [ pcsclite ]; propagatedBuildInputs = [ openssl ]; @@ -36,11 +36,11 @@ stdenv.mkDerivation rec { cmakeFlags = [ "-DUDEV_RULES_DIR=${placeholder "out"}/etc/udev/rules.d" "-DCMAKE_INSTALL_LIBDIR=lib" - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ "-DUSE_HIDAPI=1" - ] ++ lib.optionals stdenv.isLinux [ + ] ++ lib.optionals stdenv.hostPlatform.isLinux [ "-DNFC_LINUX=1" - ] ++ lib.optionals (stdenv.isLinux && withPcsclite) [ + ] ++ lib.optionals (stdenv.hostPlatform.isLinux && withPcsclite) [ "-DUSE_PCSC=1" ]; diff --git a/pkgs/development/libraries/libfilezilla/default.nix b/pkgs/development/libraries/libfilezilla/default.nix index 4076e5325c93..bbbcb81797af 100644 --- a/pkgs/development/libraries/libfilezilla/default.nix +++ b/pkgs/development/libraries/libfilezilla/default.nix @@ -22,9 +22,9 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ autoreconfHook pkg-config ]; buildInputs = [ gettext gnutls nettle libxcrypt ] - ++ lib.optionals stdenv.isDarwin [ libiconv ApplicationServices ]; + ++ lib.optionals stdenv.hostPlatform.isDarwin [ libiconv ApplicationServices ]; - preBuild = lib.optionalString (stdenv.isDarwin) '' + preBuild = lib.optionalString (stdenv.hostPlatform.isDarwin) '' export MACOSX_DEPLOYMENT_TARGET=11.0 ''; diff --git a/pkgs/development/libraries/libfive/default.nix b/pkgs/development/libraries/libfive/default.nix index c7915ae676ef..490f695fc101 100644 --- a/pkgs/development/libraries/libfive/default.nix +++ b/pkgs/development/libraries/libfive/default.nix @@ -29,7 +29,7 @@ stdenv.mkDerivation { nativeBuildInputs = [ wrapQtAppsHook cmake ninja pkg-config python.pkgs.pythonImportsCheckHook ]; buildInputs = [ eigen zlib libpng boost guile python qtbase ] - ++ lib.optionals stdenv.isDarwin [ darwin.apple_sdk_11_0.frameworks.Cocoa ]; + ++ lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk_11_0.frameworks.Cocoa ]; preConfigure = '' substituteInPlace studio/src/guile/interpreter.cpp \ @@ -57,7 +57,7 @@ stdenv.mkDerivation { cmakeFlags = [ "-DGUILE_CCACHE_DIR=${placeholder "out"}/${guile.siteCcacheDir}" - ] ++ lib.optionals (stdenv.isDarwin && lib.versionOlder stdenv.hostPlatform.darwinMinVersion "11") [ + ] ++ lib.optionals (stdenv.hostPlatform.isDarwin && lib.versionOlder stdenv.hostPlatform.darwinMinVersion "11") [ # warning: 'aligned_alloc' is only available on macOS 10.15 or newer "-DCMAKE_OSX_DEPLOYMENT_TARGET=10.15" ]; @@ -66,7 +66,7 @@ stdenv.mkDerivation { NIX_CFLAGS_COMPILE = "-Wno-error=enum-constexpr-conversion"; }; - postInstall = lib.optionalString stdenv.isDarwin '' + postInstall = lib.optionalString stdenv.hostPlatform.isDarwin '' # No rules to install the mac app, so do it manually. mkdir -p $out/Applications cp -r studio/Studio.app $out/Applications/Studio.app diff --git a/pkgs/development/libraries/libfixposix/default.nix b/pkgs/development/libraries/libfixposix/default.nix index 3d451de582a5..3eb1dceffdef 100644 --- a/pkgs/development/libraries/libfixposix/default.nix +++ b/pkgs/development/libraries/libfixposix/default.nix @@ -11,7 +11,7 @@ stdenv.mkDerivation rec { sha256 = "sha256-5qA6ytbqE+/05XQGxP9/4vEs9gFcuI3k7eJJYucW7fM="; }; - nativeBuildInputs = [ autoreconfHook pkg-config ] ++ lib.optionals stdenv.isDarwin [ getconf ]; + nativeBuildInputs = [ autoreconfHook pkg-config ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ getconf ]; meta = with lib; { homepage = "https://github.com/sionescu/libfixposix"; diff --git a/pkgs/development/libraries/libfm/default.nix b/pkgs/development/libraries/libfm/default.nix index 64928de4d4fe..ff08294bdb29 100644 --- a/pkgs/development/libraries/libfm/default.nix +++ b/pkgs/development/libraries/libfm/default.nix @@ -44,7 +44,7 @@ stdenv.mkDerivation rec { enableParallelBuilding = true; meta = with lib; { - broken = stdenv.isDarwin; + broken = stdenv.hostPlatform.isDarwin; homepage = "https://blog.lxde.org/category/pcmanfm/"; license = licenses.lgpl21Plus; description = "Glib-based library for file management"; diff --git a/pkgs/development/libraries/libfpx/default.nix b/pkgs/development/libraries/libfpx/default.nix index 6f79ec1b9465..82785a4d0fb8 100644 --- a/pkgs/development/libraries/libfpx/default.nix +++ b/pkgs/development/libraries/libfpx/default.nix @@ -10,7 +10,7 @@ stdenv.mkDerivation rec { }; # Darwin gets misdetected as Windows without this - env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.isDarwin "-D__unix"; + env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.hostPlatform.isDarwin "-D__unix"; patches = [ (fetchpatch { diff --git a/pkgs/development/libraries/libfreeaptx/default.nix b/pkgs/development/libraries/libfreeaptx/default.nix index cfc120244521..7a59cde8433e 100644 --- a/pkgs/development/libraries/libfreeaptx/default.nix +++ b/pkgs/development/libraries/libfreeaptx/default.nix @@ -13,7 +13,7 @@ stdenv.mkDerivation rec { outputs = [ "out" "dev" ]; - postPatch = lib.optionalString stdenv.isDarwin '' + postPatch = lib.optionalString stdenv.hostPlatform.isDarwin '' substituteInPlace Makefile \ --replace '-soname' '-install_name' \ --replace 'lib$(NAME).so' 'lib$(NAME).dylib' @@ -29,7 +29,7 @@ stdenv.mkDerivation rec { enableParallelBuilding = true; - postInstall = lib.optionalString stdenv.isDarwin '' + postInstall = lib.optionalString stdenv.hostPlatform.isDarwin '' install_name_tool -change libfreeaptx.dylib.0 $out/lib/libfreeaptx.dylib.0 $out/bin/freeaptxdec install_name_tool -change libfreeaptx.dylib.0 $out/lib/libfreeaptx.dylib.0 $out/bin/freeaptxenc install_name_tool -id $out/lib/libfreeaptx.dylib $out/lib/libfreeaptx.dylib diff --git a/pkgs/development/libraries/libfreefare/default.nix b/pkgs/development/libraries/libfreefare/default.nix index b05ea5bbe2d5..90e6f29c9d6e 100644 --- a/pkgs/development/libraries/libfreefare/default.nix +++ b/pkgs/development/libraries/libfreefare/default.nix @@ -13,7 +13,7 @@ stdenv.mkDerivation { }; nativeBuildInputs = [ autoreconfHook pkg-config ]; - buildInputs = [ libnfc openssl ] ++ lib.optionals stdenv.isDarwin [ libobjc IOKit Security ]; + buildInputs = [ libnfc openssl ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ libobjc IOKit Security ]; meta = with lib; { description = "Libfreefare project aims to provide a convenient API for MIFARE card manipulations"; diff --git a/pkgs/development/libraries/libftdi/default.nix b/pkgs/development/libraries/libftdi/default.nix index 27b23f9d54bc..18dab4e340da 100644 --- a/pkgs/development/libraries/libftdi/default.nix +++ b/pkgs/development/libraries/libftdi/default.nix @@ -16,11 +16,11 @@ stdenv.mkDerivation rec { sha256 = "13l39f6k6gff30hsgh0wa2z422g9pyl91rh8a8zz6f34k2sxaxii"; }; - buildInputs = [ libusb-compat-0_1 ] ++ lib.optionals stdenv.isDarwin [ libobjc Security IOKit ]; + buildInputs = [ libusb-compat-0_1 ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ libobjc Security IOKit ]; propagatedBuildInputs = [ libusb-compat-0_1 ]; - configureFlags = lib.optional (!stdenv.isDarwin) "--with-async-mode"; + configureFlags = lib.optional (!stdenv.hostPlatform.isDarwin) "--with-async-mode"; # allow async mode. from ubuntu. see: # https://bazaar.launchpad.net/~ubuntu-branches/ubuntu/trusty/libftdi/trusty/view/head:/debian/patches/04_async_mode.diff @@ -30,7 +30,7 @@ stdenv.mkDerivation rec { ''; # remove forbidden references to $TMPDIR - preFixup = lib.optionalString stdenv.isLinux '' + preFixup = lib.optionalString stdenv.hostPlatform.isLinux '' for f in "$out"/bin/*; do if isELF "$f"; then patchelf --shrink-rpath --allowed-rpath-prefixes "$NIX_STORE" "$f" diff --git a/pkgs/development/libraries/libgcrypt/1.8.nix b/pkgs/development/libraries/libgcrypt/1.8.nix index 2f0f3b4fd019..720c376d0263 100644 --- a/pkgs/development/libraries/libgcrypt/1.8.nix +++ b/pkgs/development/libraries/libgcrypt/1.8.nix @@ -10,7 +10,7 @@ , rsyslog }: -assert enableCapabilities -> stdenv.isLinux; +assert enableCapabilities -> stdenv.hostPlatform.isLinux; stdenv.mkDerivation rec { pname = "libgcrypt"; diff --git a/pkgs/development/libraries/libgcrypt/default.nix b/pkgs/development/libraries/libgcrypt/default.nix index ffe9f42326f8..ad360dab55ca 100644 --- a/pkgs/development/libraries/libgcrypt/default.nix +++ b/pkgs/development/libraries/libgcrypt/default.nix @@ -11,7 +11,7 @@ , rsyslog }: -assert enableCapabilities -> stdenv.isLinux; +assert enableCapabilities -> stdenv.hostPlatform.isLinux; stdenv.mkDerivation rec { pname = "libgcrypt"; @@ -32,7 +32,7 @@ stdenv.mkDerivation rec { depsBuildBuild = [ buildPackages.stdenv.cc ]; buildInputs = [ libgpg-error ] - ++ lib.optional stdenv.isDarwin gettext + ++ lib.optional stdenv.hostPlatform.isDarwin gettext ++ lib.optional enableCapabilities libcap; strictDeps = true; @@ -70,7 +70,7 @@ stdenv.mkDerivation rec { # TODO: figure out why this is even necessary and why the missing dylib only crashes # random instead of every test - preCheck = lib.optionalString stdenv.isDarwin '' + preCheck = lib.optionalString stdenv.hostPlatform.isDarwin '' mkdir -p $lib/lib cp src/.libs/libgcrypt.20.dylib $lib/lib ''; diff --git a/pkgs/development/libraries/libgda/default.nix b/pkgs/development/libraries/libgda/default.nix index a8af4d9b4874..b6a64c4b7a3f 100644 --- a/pkgs/development/libraries/libgda/default.nix +++ b/pkgs/development/libraries/libgda/default.nix @@ -79,7 +79,7 @@ stdenv.mkDerivation rec { # as mentioned in https://github.com/GNOME/libgda/blob/95eeca4b0470f347c645a27f714c62aa6e59f820/libgda/sqlite/README#L31, # which references the paper https://web.archive.org/web/20100610151539/http://lattice.umiacs.umd.edu/files/functions_tr.pdf # See also https://github.com/Homebrew/homebrew-core/blob/104f9ecd02854a82372b64d63d41356555378a52/Formula/libgda.rb - "--enable-system-sqlite=${if stdenv.isDarwin then "no" else "yes"}" + "--enable-system-sqlite=${if stdenv.hostPlatform.isDarwin then "no" else "yes"}" ]; env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.cc.isClang "-Wno-error=incompatible-function-pointer-types"; diff --git a/pkgs/development/libraries/libgdiplus/default.nix b/pkgs/development/libraries/libgdiplus/default.nix index 4d315b042ee9..63efe5430537 100644 --- a/pkgs/development/libraries/libgdiplus/default.nix +++ b/pkgs/development/libraries/libgdiplus/default.nix @@ -34,9 +34,9 @@ stdenv.mkDerivation (finalAttrs: { [ glib cairo fontconfig libtiff giflib libjpeg libpng libXrender libexif ] - ++ lib.optional stdenv.isDarwin Carbon; + ++ lib.optional stdenv.hostPlatform.isDarwin Carbon; - postInstall = lib.optionalString stdenv.isDarwin '' + postInstall = lib.optionalString stdenv.hostPlatform.isDarwin '' ln -s $out/lib/libgdiplus.0.dylib $out/lib/libgdiplus.so ''; diff --git a/pkgs/development/libraries/libgit2/default.nix b/pkgs/development/libraries/libgit2/default.nix index e110ceb67aa8..af0ae5f73a7d 100644 --- a/pkgs/development/libraries/libgit2/default.nix +++ b/pkgs/development/libraries/libgit2/default.nix @@ -49,9 +49,9 @@ stdenv.mkDerivation (finalAttrs: { buildInputs = [ zlib libssh2 openssl pcre llhttp ] ++ lib.optional withGssapi krb5 - ++ lib.optional stdenv.isDarwin Security; + ++ lib.optional stdenv.hostPlatform.isDarwin Security; - propagatedBuildInputs = lib.optional (!stdenv.isLinux) libiconv; + propagatedBuildInputs = lib.optional (!stdenv.hostPlatform.isLinux) libiconv; doCheck = true; checkPhase = '' diff --git a/pkgs/development/libraries/libglvnd/default.nix b/pkgs/development/libraries/libglvnd/default.nix index d3e85c012cf1..c3667d664707 100644 --- a/pkgs/development/libraries/libglvnd/default.nix +++ b/pkgs/development/libraries/libglvnd/default.nix @@ -29,7 +29,7 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ autoreconfHook pkg-config python3 addDriverRunpath ]; buildInputs = [ libX11 libXext xorgproto ]; - postPatch = lib.optionalString stdenv.isDarwin '' + postPatch = lib.optionalString stdenv.hostPlatform.isDarwin '' substituteInPlace src/GLX/Makefile.am \ --replace "-Wl,-Bsymbolic " "" substituteInPlace src/EGL/Makefile.am \ diff --git a/pkgs/development/libraries/libgourou/default.nix b/pkgs/development/libraries/libgourou/default.nix index bfd483e5d31c..ba64735f873d 100644 --- a/pkgs/development/libraries/libgourou/default.nix +++ b/pkgs/development/libraries/libgourou/default.nix @@ -51,6 +51,6 @@ stdenv.mkDerivation rec { license = licenses.lgpl3Plus; maintainers = with maintainers; [ autumnal ]; platforms = platforms.all; - broken = stdenv.isDarwin; + broken = stdenv.hostPlatform.isDarwin; }; } diff --git a/pkgs/development/libraries/libgpg-error/default.nix b/pkgs/development/libraries/libgpg-error/default.nix index 9920a54e0413..2dee6c721bc1 100644 --- a/pkgs/development/libraries/libgpg-error/default.nix +++ b/pkgs/development/libraries/libgpg-error/default.nix @@ -55,7 +55,7 @@ in stdenv.mkDerivation (rec { # ./config.status[1401]: shift: (null): bad number # (See .) # Thus, re-run it with Bash. - lib.optionalString stdenv.isSunOS '' + lib.optionalString stdenv.hostPlatform.isSunOS '' ${stdenv.shell} config.status '' # ./configure errorneous decides to use weak symbols on pkgsStatic, diff --git a/pkgs/development/libraries/libgrss/default.nix b/pkgs/development/libraries/libgrss/default.nix index ce0c6e14edc2..c6de97101be8 100644 --- a/pkgs/development/libraries/libgrss/default.nix +++ b/pkgs/development/libraries/libgrss/default.nix @@ -36,7 +36,7 @@ stdenv.mkDerivation rec { glib libxml2 libsoup - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ Foundation AppKit ]; diff --git a/pkgs/development/libraries/libgweather/default.nix b/pkgs/development/libraries/libgweather/default.nix index 42b927211543..b07051358be0 100644 --- a/pkgs/development/libraries/libgweather/default.nix +++ b/pkgs/development/libraries/libgweather/default.nix @@ -65,7 +65,7 @@ stdenv.mkDerivation rec { mesonFlags = [ "-Dzoneinfo_dir=${tzdata}/share/zoneinfo" (lib.mesonBool "introspection" withIntrospection) - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ "-Dc_args=-D_DARWIN_C_SOURCE" ]; diff --git a/pkgs/development/libraries/libhandy/0.x.nix b/pkgs/development/libraries/libhandy/0.x.nix index d25335c89157..c20a8382b5d0 100644 --- a/pkgs/development/libraries/libhandy/0.x.nix +++ b/pkgs/development/libraries/libhandy/0.x.nix @@ -33,7 +33,7 @@ stdenv.mkDerivation rec { "-Dintrospection=enabled" ]; - doCheck = !stdenv.isDarwin; + doCheck = !stdenv.hostPlatform.isDarwin; checkPhase = '' NO_AT_BRIDGE=1 \ diff --git a/pkgs/development/libraries/libhandy/default.nix b/pkgs/development/libraries/libhandy/default.nix index a43ee0986be8..829de78a6aeb 100644 --- a/pkgs/development/libraries/libhandy/default.nix +++ b/pkgs/development/libraries/libhandy/default.nix @@ -81,7 +81,7 @@ stdenv.mkDerivation rec { PKG_CONFIG_GLADEUI_2_0_MODULEDIR = "${placeholder "glade"}/lib/glade/modules"; PKG_CONFIG_GLADEUI_2_0_CATALOGDIR = "${placeholder "glade"}/share/glade/catalogs"; - doCheck = !stdenv.isDarwin; + doCheck = !stdenv.hostPlatform.isDarwin; checkPhase = '' runHook preCheck diff --git a/pkgs/development/libraries/libhv/default.nix b/pkgs/development/libraries/libhv/default.nix index c64c8e6e291f..93524afabe49 100644 --- a/pkgs/development/libraries/libhv/default.nix +++ b/pkgs/development/libraries/libhv/default.nix @@ -23,7 +23,7 @@ stdenv.mkDerivation (finalAttrs: { nativeBuildInputs = [ cmake ]; - buildInputs = [ curl openssl ] ++ lib.optional stdenv.isDarwin Security; + buildInputs = [ curl openssl ] ++ lib.optional stdenv.hostPlatform.isDarwin Security; cmakeFlags = [ "-DENABLE_UDS=ON" diff --git a/pkgs/development/libraries/libical/default.nix b/pkgs/development/libraries/libical/default.nix index 9d5db75bb121..f6a0555f3412 100644 --- a/pkgs/development/libraries/libical/default.nix +++ b/pkgs/development/libraries/libical/default.nix @@ -52,7 +52,7 @@ stdenv.mkDerivation rec { # https://github.com/NixOS/nixpkgs/pull/67204 # previously with https://github.com/NixOS/nixpkgs/pull/61657#issuecomment-495579489 # gtk-doc docbook_xsl docbook_xml_dtd_43 # for docs - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ fixDarwinDylibNames ]; nativeInstallCheckInputs = [ @@ -95,7 +95,7 @@ stdenv.mkDerivation rec { # Musl does not support TZDIR. doInstallCheck = !stdenv.hostPlatform.isMusl; enableParallelChecking = false; - preInstallCheck = if stdenv.isDarwin then '' + preInstallCheck = if stdenv.hostPlatform.isDarwin then '' for testexe in $(find ./src/test -maxdepth 1 -type f -executable); do for lib in $(cd lib && ls *.3.dylib); do install_name_tool -change $lib $out/lib/$lib $testexe diff --git a/pkgs/development/libraries/libiconv/default.nix b/pkgs/development/libraries/libiconv/default.nix index b59887381f49..9bb60501a065 100644 --- a/pkgs/development/libraries/libiconv/default.nix +++ b/pkgs/development/libraries/libiconv/default.nix @@ -61,7 +61,7 @@ stdenv.mkDerivation rec { configureFlags = [ (lib.enableFeature enableStatic "static") (lib.enableFeature enableShared "shared") - ] ++ lib.optional stdenv.isFreeBSD "--with-pic"; + ] ++ lib.optional stdenv.hostPlatform.isFreeBSD "--with-pic"; passthru = { inherit setupHooks; }; diff --git a/pkgs/development/libraries/libidn/default.nix b/pkgs/development/libraries/libidn/default.nix index 916d6d0ad687..bafb2fff272f 100644 --- a/pkgs/development/libraries/libidn/default.nix +++ b/pkgs/development/libraries/libidn/default.nix @@ -15,7 +15,7 @@ stdenv.mkDerivation (finalAttrs: { hardeningDisable = [ "format" ]; - buildInputs = lib.optional stdenv.isDarwin libiconv; + buildInputs = lib.optional stdenv.hostPlatform.isDarwin libiconv; passthru.tests.pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage; diff --git a/pkgs/development/libraries/libidn2/default.nix b/pkgs/development/libraries/libidn2/default.nix index bfe9c2a24264..90c7198757c7 100644 --- a/pkgs/development/libraries/libidn2/default.nix +++ b/pkgs/development/libraries/libidn2/default.nix @@ -22,8 +22,8 @@ stdenv.mkDerivation rec { # The above patch causes the documentation to be regenerated, so the # documentation tools are required. - nativeBuildInputs = lib.optionals stdenv.isDarwin [ help2man texinfo ]; - buildInputs = [ libunistring ] ++ lib.optional stdenv.isDarwin libiconv; + nativeBuildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ help2man texinfo ]; + buildInputs = [ libunistring ] ++ lib.optional stdenv.hostPlatform.isDarwin libiconv; depsBuildBuild = [ buildPackages.stdenv.cc ]; meta = { diff --git a/pkgs/development/libraries/libiio/default.nix b/pkgs/development/libraries/libiio/default.nix index 8adc01512040..023dfce86bf5 100644 --- a/pkgs/development/libraries/libiio/default.nix +++ b/pkgs/development/libraries/libiio/default.nix @@ -46,8 +46,8 @@ stdenv.mkDerivation rec { libxml2 libusb1 ] ++ lib.optional avahiSupport avahi - ++ lib.optional stdenv.isLinux libaio - ++ lib.optionals stdenv.isDarwin [ CFNetwork CoreServices ]; + ++ lib.optional stdenv.hostPlatform.isLinux libaio + ++ lib.optionals stdenv.hostPlatform.isDarwin [ CFNetwork CoreServices ]; cmakeFlags = [ "-DUDEV_RULES_INSTALL_DIR=${placeholder "out"}/lib/udev/rules.d" diff --git a/pkgs/development/libraries/libimobiledevice/default.nix b/pkgs/development/libraries/libimobiledevice/default.nix index 0e81f32bebf8..88b9391d4bdb 100644 --- a/pkgs/development/libraries/libimobiledevice/default.nix +++ b/pkgs/development/libraries/libimobiledevice/default.nix @@ -54,7 +54,7 @@ stdenv.mkDerivation rec { libtasn1 libusbmuxd libimobiledevice-glue - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ SystemConfiguration CoreFoundation ]; diff --git a/pkgs/development/libraries/libiodbc/default.nix b/pkgs/development/libraries/libiodbc/default.nix index 6d6d7d46576d..c059d619ccae 100644 --- a/pkgs/development/libraries/libiodbc/default.nix +++ b/pkgs/development/libraries/libiodbc/default.nix @@ -12,7 +12,7 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ pkg-config ]; buildInputs = lib.optionals useGTK [ gtk2 ] - ++ lib.optional stdenv.isDarwin Carbon; + ++ lib.optional stdenv.hostPlatform.isDarwin Carbon; preBuild = '' diff --git a/pkgs/development/libraries/libipt/default.nix b/pkgs/development/libraries/libipt/default.nix index 61ec0ce67d88..060f6a803566 100644 --- a/pkgs/development/libraries/libipt/default.nix +++ b/pkgs/development/libraries/libipt/default.nix @@ -12,7 +12,7 @@ stdenv.mkDerivation rec { }; nativeBuildInputs = [ cmake ]; - buildInputs = lib.optional stdenv.isFreeBSD freebsd.libstdthreads; + buildInputs = lib.optional stdenv.hostPlatform.isFreeBSD freebsd.libstdthreads; meta = with lib; { description = "Intel Processor Trace decoder library"; diff --git a/pkgs/development/libraries/libiptcdata/default.nix b/pkgs/development/libraries/libiptcdata/default.nix index f6f918c1d522..741c8d8a74a5 100644 --- a/pkgs/development/libraries/libiptcdata/default.nix +++ b/pkgs/development/libraries/libiptcdata/default.nix @@ -27,7 +27,7 @@ stdenv.mkDerivation rec { autoreconfHook ]; - buildInputs = lib.optionals stdenv.isDarwin [ + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ libiconv libintl ]; diff --git a/pkgs/development/libraries/libiscsi/default.nix b/pkgs/development/libraries/libiscsi/default.nix index 1008037c60cc..2a0d722c3d0f 100644 --- a/pkgs/development/libraries/libiscsi/default.nix +++ b/pkgs/development/libraries/libiscsi/default.nix @@ -18,7 +18,7 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ autoreconfHook ]; - env = lib.optionalAttrs (stdenv.is32bit || stdenv.isDarwin) { + env = lib.optionalAttrs (stdenv.hostPlatform.is32bit || stdenv.hostPlatform.isDarwin) { # iscsi-discard.c:223:57: error: format specifies type 'unsigned long' but the argument has type 'uint64_t' (aka 'unsigned long long') [-Werror,-Wformat] NIX_CFLAGS_COMPILE = "-Wno-error=format"; }; diff --git a/pkgs/development/libraries/libks/default.nix b/pkgs/development/libraries/libks/default.nix index 4122d4f57617..cc6311f024ac 100644 --- a/pkgs/development/libraries/libks/default.nix +++ b/pkgs/development/libraries/libks/default.nix @@ -37,8 +37,8 @@ stdenv.mkDerivation rec { ]; buildInputs = [ openssl ] - ++ lib.optional stdenv.isLinux libuuid - ++ lib.optional stdenv.isDarwin libossp_uuid; + ++ lib.optional stdenv.hostPlatform.isLinux libuuid + ++ lib.optional stdenv.hostPlatform.isDarwin libossp_uuid; passthru = { tests.freeswitch = freeswitch; @@ -46,7 +46,7 @@ stdenv.mkDerivation rec { }; meta = with lib; { - broken = stdenv.isDarwin; + broken = stdenv.hostPlatform.isDarwin; description = "Foundational support for signalwire C products"; homepage = "https://github.com/signalwire/libks"; maintainers = with lib.maintainers; [ misuzu ]; diff --git a/pkgs/development/libraries/liblastfm/default.nix b/pkgs/development/libraries/liblastfm/default.nix index 7dcc3b0d0cc0..060839326b15 100644 --- a/pkgs/development/libraries/liblastfm/default.nix +++ b/pkgs/development/libraries/liblastfm/default.nix @@ -21,7 +21,7 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ pkg-config which cmake ]; buildInputs = [ fftwSinglePrec libsamplerate qtbase ] - ++ lib.optional stdenv.isDarwin darwin.apple_sdk.frameworks.SystemConfiguration; + ++ lib.optional stdenv.hostPlatform.isDarwin darwin.apple_sdk.frameworks.SystemConfiguration; env.NIX_CFLAGS_COMPILE = lib.optionalString (stdenv.cc.isGNU && lib.versionAtLeast stdenv.cc.version "11") "-std=c++11"; diff --git a/pkgs/development/libraries/liblinear/default.nix b/pkgs/development/libraries/liblinear/default.nix index 449792a07e82..31da8305be7a 100644 --- a/pkgs/development/libraries/liblinear/default.nix +++ b/pkgs/development/libraries/liblinear/default.nix @@ -20,7 +20,7 @@ in stdenv.mkDerivation rec { buildFlags = [ "lib" "predict" "train" ]; installPhase = '' - ${if stdenv.isDarwin then '' + ${if stdenv.hostPlatform.isDarwin then '' install -D liblinear.so.${soVersion} $out/lib/liblinear.${soVersion}.dylib ln -s $out/lib/liblinear.${soVersion}.dylib $out/lib/liblinear.dylib '' else '' diff --git a/pkgs/development/libraries/liblqr-1/default.nix b/pkgs/development/libraries/liblqr-1/default.nix index 6b8c2ebeaa94..f2f6497b676b 100644 --- a/pkgs/development/libraries/liblqr-1/default.nix +++ b/pkgs/development/libraries/liblqr-1/default.nix @@ -14,7 +14,7 @@ stdenv.mkDerivation rec { }; nativeBuildInputs = [ pkg-config ]; - buildInputs = lib.optionals stdenv.isDarwin [ Carbon AppKit ]; + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ Carbon AppKit ]; propagatedBuildInputs = [ glib ]; meta = with lib; { diff --git a/pkgs/development/libraries/liblxi/default.nix b/pkgs/development/libraries/liblxi/default.nix index 24c454d4ee7e..887c751ad46b 100644 --- a/pkgs/development/libraries/liblxi/default.nix +++ b/pkgs/development/libraries/liblxi/default.nix @@ -23,7 +23,7 @@ stdenv.mkDerivation (finalAttrs: { nativeBuildInputs = [ meson ninja cmake pkg-config rpcsvc-proto ]; - buildInputs = lib.optionals (!stdenv.isDarwin) [ + buildInputs = lib.optionals (!stdenv.hostPlatform.isDarwin) [ libtirpc avahi ] ++ [ diff --git a/pkgs/development/libraries/libmcrypt/default.nix b/pkgs/development/libraries/libmcrypt/default.nix index 6a4b0adfefb4..3ed85fad550d 100644 --- a/pkgs/development/libraries/libmcrypt/default.nix +++ b/pkgs/development/libraries/libmcrypt/default.nix @@ -9,7 +9,7 @@ stdenv.mkDerivation rec { sha256 = "0gipgb939vy9m66d3k8il98rvvwczyaw2ixr8yn6icds9c3nrsz4"; }; - buildInputs = lib.optional stdenv.isDarwin cctools; + buildInputs = lib.optional stdenv.hostPlatform.isDarwin cctools; configureFlags = lib.optionals disablePosixThreads [ "--disable-posix-threads" ] ++ lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) [ diff --git a/pkgs/development/libraries/libmemcached/default.nix b/pkgs/development/libraries/libmemcached/default.nix index 07fe854c777c..053cd91be2d9 100644 --- a/pkgs/development/libraries/libmemcached/default.nix +++ b/pkgs/development/libraries/libmemcached/default.nix @@ -14,8 +14,8 @@ stdenv.mkDerivation rec { # https://bugs.launchpad.net/libmemcached/+bug/1281907 # Fix building on macOS (patch from Homebrew) # https://bugs.launchpad.net/libmemcached/+bug/1245562 - patches = lib.optional stdenv.isLinux ./libmemcached-fix-linking-with-libpthread.patch - ++ lib.optional stdenv.isDarwin (fetchpatch { + patches = lib.optional stdenv.hostPlatform.isLinux ./libmemcached-fix-linking-with-libpthread.patch + ++ lib.optional stdenv.hostPlatform.isDarwin (fetchpatch { url = "https://raw.githubusercontent.com/Homebrew/homebrew/bfd4a0a4626b61c2511fdf573bcbbc6bbe86340e/Library/Formula/libmemcached.rb"; sha256 = "1gjf3vd7hiyzxjvlg2zfc3y2j0lyr6nhbws4xb5dmin3csyp8qb8"; }) diff --git a/pkgs/development/libraries/libmesode/default.nix b/pkgs/development/libraries/libmesode/default.nix index 128975246a8a..6ac53d3d5d3d 100644 --- a/pkgs/development/libraries/libmesode/default.nix +++ b/pkgs/development/libraries/libmesode/default.nix @@ -42,7 +42,7 @@ stdenv.mkDerivation rec { homepage = "https://github.com/profanity-im/libmesode/"; license = with licenses; [ gpl3Only mit]; platforms = platforms.unix; - broken = stdenv.isDarwin; + broken = stdenv.hostPlatform.isDarwin; maintainers = with maintainers; [ devhell ]; }; } diff --git a/pkgs/development/libraries/libmikmod/default.nix b/pkgs/development/libraries/libmikmod/default.nix index f3122d8ab210..6e3f7eee3c57 100644 --- a/pkgs/development/libraries/libmikmod/default.nix +++ b/pkgs/development/libraries/libmikmod/default.nix @@ -13,14 +13,14 @@ in stdenv.mkDerivation rec { }; buildInputs = [ texinfo ] - ++ optional stdenv.isLinux alsa-lib - ++ optional stdenv.isDarwin CoreAudio; + ++ optional stdenv.hostPlatform.isLinux alsa-lib + ++ optional stdenv.hostPlatform.isDarwin CoreAudio; propagatedBuildInputs = - optional stdenv.isLinux libpulseaudio; + optional stdenv.hostPlatform.isLinux libpulseaudio; outputs = [ "out" "dev" "man" ]; - NIX_LDFLAGS = optionalString stdenv.isLinux "-lasound"; + NIX_LDFLAGS = optionalString stdenv.hostPlatform.isLinux "-lasound"; postInstall = '' moveToOutput bin/libmikmod-config "$dev" diff --git a/pkgs/development/libraries/libmilter/default.nix b/pkgs/development/libraries/libmilter/default.nix index a06f3d4deca1..10a098693679 100644 --- a/pkgs/development/libraries/libmilter/default.nix +++ b/pkgs/development/libraries/libmilter/default.nix @@ -34,9 +34,9 @@ stdenv.mkDerivation rec { patches = [ ./install.patch ./sharedlib.patch ./darwin.patch ]; - nativeBuildInputs = [ m4 ] ++ lib.optional stdenv.isDarwin fixDarwinDylibNames; + nativeBuildInputs = [ m4 ] ++ lib.optional stdenv.hostPlatform.isDarwin fixDarwinDylibNames; - postInstall = lib.optionalString stdenv.isDarwin '' + postInstall = lib.optionalString stdenv.hostPlatform.isDarwin '' fixDarwinDylibNames $out/lib/libmilter.*.1 ''; diff --git a/pkgs/development/libraries/libminc/default.nix b/pkgs/development/libraries/libminc/default.nix index 189d2b12e519..b270b8eb5668 100644 --- a/pkgs/development/libraries/libminc/default.nix +++ b/pkgs/development/libraries/libminc/default.nix @@ -32,7 +32,7 @@ stdenv.mkDerivation (finalAttrs: { "-DLIBMINC_USE_SYSTEM_NIFTI=ON" ]; - doCheck = !stdenv.isDarwin; + doCheck = !stdenv.hostPlatform.isDarwin; # -j1: see https://github.com/BIC-MNI/libminc/issues/110 checkPhase = '' ctest -j1 --output-on-failure diff --git a/pkgs/development/libraries/libmongocrypt/default.nix b/pkgs/development/libraries/libmongocrypt/default.nix index f45d41fed628..0c887527307f 100644 --- a/pkgs/development/libraries/libmongocrypt/default.nix +++ b/pkgs/development/libraries/libmongocrypt/default.nix @@ -33,7 +33,7 @@ stdenv.mkDerivation rec { buildInputs = [ mongoc openssl - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk_11_0.frameworks.Security ]; diff --git a/pkgs/development/libraries/libmpeg2/default.nix b/pkgs/development/libraries/libmpeg2/default.nix index baada92d4340..13fce963738f 100644 --- a/pkgs/development/libraries/libmpeg2/default.nix +++ b/pkgs/development/libraries/libmpeg2/default.nix @@ -10,7 +10,7 @@ stdenv.mkDerivation rec { }; # Otherwise clang fails with 'duplicate symbol ___sputc' - buildFlags = lib.optional stdenv.isDarwin "CFLAGS=-std=gnu89"; + buildFlags = lib.optional stdenv.hostPlatform.isDarwin "CFLAGS=-std=gnu89"; meta = { homepage = "http://libmpeg2.sourceforge.net/"; diff --git a/pkgs/development/libraries/libmtp/default.nix b/pkgs/development/libraries/libmtp/default.nix index ea61234333b8..320873c9792c 100644 --- a/pkgs/development/libraries/libmtp/default.nix +++ b/pkgs/development/libraries/libmtp/default.nix @@ -51,7 +51,7 @@ stdenv.mkDerivation rec { configurePlatforms = [ "build" "host" ]; - makeFlags = lib.optionals (stdenv.isLinux && !stdenv.buildPlatform.canExecute stdenv.hostPlatform) [ + makeFlags = lib.optionals (stdenv.hostPlatform.isLinux && !stdenv.buildPlatform.canExecute stdenv.hostPlatform) [ "MTP_HOTPLUG=${buildPackages.libmtp}/bin/mtp-hotplug" ]; diff --git a/pkgs/development/libraries/libnatpmp/default.nix b/pkgs/development/libraries/libnatpmp/default.nix index 49e89b97344b..13128e81231e 100644 --- a/pkgs/development/libraries/libnatpmp/default.nix +++ b/pkgs/development/libraries/libnatpmp/default.nix @@ -27,7 +27,7 @@ stdenv.mkDerivation rec { "CC:=$(CC)" ]; - nativeBuildInputs = lib.optional stdenv.isDarwin fixDarwinDylibNames; + nativeBuildInputs = lib.optional stdenv.hostPlatform.isDarwin fixDarwinDylibNames; postFixup = '' chmod +x $out/lib/* diff --git a/pkgs/development/libraries/libnfc/default.nix b/pkgs/development/libraries/libnfc/default.nix index 88bc909ea0e6..8fb983333c1c 100644 --- a/pkgs/development/libraries/libnfc/default.nix +++ b/pkgs/development/libraries/libnfc/default.nix @@ -32,7 +32,7 @@ stdenv.mkDerivation rec { "sysconfdir=/etc" ]; - cmakeFlags = lib.optionals stdenv.isDarwin [ + cmakeFlags = lib.optionals stdenv.hostPlatform.isDarwin [ "-DLIBNFC_DRIVER_PN532_I2C=OFF" "-DLIBNFC_DRIVER_PN532_SPI=OFF" ]; diff --git a/pkgs/development/libraries/libngspice/default.nix b/pkgs/development/libraries/libngspice/default.nix index 3578441dd61a..0270050cd001 100644 --- a/pkgs/development/libraries/libngspice/default.nix +++ b/pkgs/development/libraries/libngspice/default.nix @@ -31,7 +31,7 @@ stdenv.mkDerivation rec { ] ++ lib.optionals (!withNgshared) [ libXaw libXext - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ llvmPackages.openmp ]; diff --git a/pkgs/development/libraries/libofx/default.nix b/pkgs/development/libraries/libofx/default.nix index b7dddd16672c..ec5f6d8924d7 100644 --- a/pkgs/development/libraries/libofx/default.nix +++ b/pkgs/development/libraries/libofx/default.nix @@ -15,7 +15,7 @@ stdenv.mkDerivation rec { preConfigure = "./autogen.sh"; configureFlags = [ "--with-opensp-includes=${opensp}/include/OpenSP" ]; nativeBuildInputs = [ pkg-config libtool autoconf automake gengetopt ]; - buildInputs = [ opensp libxml2 curl ] ++ lib.optional stdenv.isDarwin libiconv; + buildInputs = [ opensp libxml2 curl ] ++ lib.optional stdenv.hostPlatform.isDarwin libiconv; meta = { description = "Opensource implementation of the Open Financial eXchange specification"; diff --git a/pkgs/development/libraries/liboil/default.nix b/pkgs/development/libraries/liboil/default.nix index 4b112b70e7ad..2abbaa66f347 100644 --- a/pkgs/development/libraries/liboil/default.nix +++ b/pkgs/development/libraries/liboil/default.nix @@ -18,10 +18,10 @@ stdenv.mkDerivation rec { # fix "argb_paint_i386.c:53:Incorrect register `%rax' used with `l' suffix" # errors - configureFlags = lib.optional (stdenv.isDarwin && stdenv.isx86_64) "--build=x86_64"; + configureFlags = lib.optional (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isx86_64) "--build=x86_64"; # fixes a cast in inline asm: easier than patching - buildFlags = lib.optional stdenv.isDarwin "CFLAGS=-fheinous-gnu-extensions"; + buildFlags = lib.optional stdenv.hostPlatform.isDarwin "CFLAGS=-fheinous-gnu-extensions"; meta = with lib; { description = "Library of simple functions that are optimized for various CPUs"; diff --git a/pkgs/development/libraries/libopenshot-audio/default.nix b/pkgs/development/libraries/libopenshot-audio/default.nix index 236b3026068f..2d8cec21b189 100644 --- a/pkgs/development/libraries/libopenshot-audio/default.nix +++ b/pkgs/development/libraries/libopenshot-audio/default.nix @@ -40,9 +40,9 @@ stdenv.mkDerivation (finalAttrs: { pkg-config ]; - buildInputs = lib.optionals stdenv.isLinux [ + buildInputs = lib.optionals stdenv.hostPlatform.isLinux [ alsa-lib - ] ++ (if stdenv.isDarwin then [ + ] ++ (if stdenv.hostPlatform.isDarwin then [ Accelerate AGL Cocoa diff --git a/pkgs/development/libraries/libopenshot/default.nix b/pkgs/development/libraries/libopenshot/default.nix index 0d83fa659e53..231b0cd109aa 100644 --- a/pkgs/development/libraries/libopenshot/default.nix +++ b/pkgs/development/libraries/libopenshot/default.nix @@ -29,7 +29,7 @@ stdenv.mkDerivation (finalAttrs: { hash = "sha256-9X2UIRDD+1kNLbV8AnnPabdO2M0OfTDxQ7xyZtsE10k="; }; - patches = lib.optionals stdenv.isDarwin [ + patches = lib.optionals stdenv.hostPlatform.isDarwin [ # Darwin requires both Magick++ and MagickCore for a successful linkage ./0001-link-magickcore.diff ]; @@ -51,9 +51,9 @@ stdenv.mkDerivation (finalAttrs: { qtbase qtmultimedia zeromq - ] ++ lib.optionals stdenv.isLinux [ + ] ++ lib.optionals stdenv.hostPlatform.isLinux [ alsa-lib - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ llvmPackages.openmp ]; diff --git a/pkgs/development/libraries/libossp-uuid/default.nix b/pkgs/development/libraries/libossp-uuid/default.nix index a283df1bbaea..267829d2aee4 100644 --- a/pkgs/development/libraries/libossp-uuid/default.nix +++ b/pkgs/development/libraries/libossp-uuid/default.nix @@ -11,7 +11,7 @@ stdenv.mkDerivation rec { configureFlags = [ "ac_cv_va_copy=yes" - ] ++ lib.optional stdenv.isFreeBSD "--with-pic"; + ] ++ lib.optional stdenv.hostPlatform.isFreeBSD "--with-pic"; patches = [ ./shtool.patch ]; diff --git a/pkgs/development/libraries/libpcap/default.nix b/pkgs/development/libraries/libpcap/default.nix index 7256e4922605..bfc2e3af7b8e 100644 --- a/pkgs/development/libraries/libpcap/default.nix +++ b/pkgs/development/libraries/libpcap/default.nix @@ -30,18 +30,18 @@ stdenv.mkDerivation rec { hash = "sha256-7RmgOD+tcuOtQ1/SOdfNgNZJFrhyaVUBWdIORxYOvl8="; }; - buildInputs = lib.optionals stdenv.isLinux [ libnl ] + buildInputs = lib.optionals stdenv.hostPlatform.isLinux [ libnl ] ++ lib.optionals withRemote [ libxcrypt ]; nativeBuildInputs = [ flex bison ] - ++ lib.optionals stdenv.isLinux [ pkg-config ] + ++ lib.optionals stdenv.hostPlatform.isLinux [ pkg-config ] ++ lib.optionals withBluez [ bluez.dev ]; # We need to force the autodetection because detection doesn't # work in pure build environments. configureFlags = [ - "--with-pcap=${if stdenv.isLinux then "linux" else "bpf"}" - ] ++ lib.optionals stdenv.isDarwin [ + "--with-pcap=${if stdenv.hostPlatform.isLinux then "linux" else "bpf"}" + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ "--disable-universal" ] ++ lib.optionals withRemote [ "--enable-remote" diff --git a/pkgs/development/libraries/libphonenumber/default.nix b/pkgs/development/libraries/libphonenumber/default.nix index 5e23947ed3bc..616b5de5deb6 100644 --- a/pkgs/development/libraries/libphonenumber/default.nix +++ b/pkgs/development/libraries/libphonenumber/default.nix @@ -40,7 +40,7 @@ stdenv.mkDerivation (finalAttrs: { boost icu protobuf - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ Foundation ]; diff --git a/pkgs/development/libraries/libpipeline/default.nix b/pkgs/development/libraries/libpipeline/default.nix index 3aeb79b46af8..885c9044332c 100644 --- a/pkgs/development/libraries/libpipeline/default.nix +++ b/pkgs/development/libraries/libpipeline/default.nix @@ -9,7 +9,7 @@ stdenv.mkDerivation rec { sha256 = "sha256-uLRRlJiQIqeewTF/ZKKnWxVRsqVb6gb2dwTLKi5GkLA="; }; - patches = lib.optionals stdenv.isDarwin [ ./fix-on-osx.patch ]; + patches = lib.optionals stdenv.hostPlatform.isDarwin [ ./fix-on-osx.patch ]; # necessary to build on FreeBSD native pending inclusion of # https://git.savannah.gnu.org/cgit/config.git/commit/?id=e4786449e1c26716e3f9ea182caf472e4dbc96e0 diff --git a/pkgs/development/libraries/libplacebo/default.nix b/pkgs/development/libraries/libplacebo/default.nix index 0ffa7b2828f3..159037bec832 100644 --- a/pkgs/development/libraries/libplacebo/default.nix +++ b/pkgs/development/libraries/libplacebo/default.nix @@ -59,7 +59,7 @@ stdenv.mkDerivation rec { (lib.mesonEnable "glslang" false) # rely on shaderc for GLSL compilation instead (lib.mesonEnable "vk-proc-addr" vulkanSupport) (lib.mesonOption "vulkan-registry" "${vulkan-headers}/share/vulkan/registry/vk.xml") - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ (lib.mesonEnable "unwind" false) # libplacebo doesn’t build with `darwin.libunwind` ]; diff --git a/pkgs/development/libraries/libpng/default.nix b/pkgs/development/libraries/libpng/default.nix index 11e3fb31604f..57b75a949b7d 100644 --- a/pkgs/development/libraries/libpng/default.nix +++ b/pkgs/development/libraries/libpng/default.nix @@ -21,7 +21,7 @@ in stdenv.mkDerivation (finalAttrs: { hash = "sha256-alygZSOSotfJ2yrltAIQhDwLvAgcvUEIJasAzFnxSmw="; }; postPatch = whenPatched "gunzip < ${patch_src} | patch -Np1" - + lib.optionalString stdenv.isFreeBSD '' + + lib.optionalString stdenv.hostPlatform.isFreeBSD '' sed -i 1i'int feenableexcept(int __mask);' contrib/libtests/pngvalid.c ''; diff --git a/pkgs/development/libraries/libqglviewer/default.nix b/pkgs/development/libraries/libqglviewer/default.nix index fd10ccc5375c..ec2234bb9a28 100644 --- a/pkgs/development/libraries/libqglviewer/default.nix +++ b/pkgs/development/libraries/libqglviewer/default.nix @@ -11,7 +11,7 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ qmake ]; buildInputs = [ qtbase libGLU ] - ++ lib.optional stdenv.isDarwin AGL; + ++ lib.optional stdenv.hostPlatform.isDarwin AGL; dontWrapQtApps = true; diff --git a/pkgs/development/libraries/librasterlite2/default.nix b/pkgs/development/libraries/librasterlite2/default.nix index de9fa02d44db..a1655dc6a13d 100644 --- a/pkgs/development/libraries/librasterlite2/default.nix +++ b/pkgs/development/libraries/librasterlite2/default.nix @@ -71,7 +71,7 @@ stdenv.mkDerivation rec { proj sqlite zstd - ] ++ lib.optional stdenv.isDarwin ApplicationServices; + ] ++ lib.optional stdenv.hostPlatform.isDarwin ApplicationServices; enableParallelBuilding = true; diff --git a/pkgs/development/libraries/libre/default.nix b/pkgs/development/libraries/libre/default.nix index fa419830f3c7..ebdf2ec4d8a6 100644 --- a/pkgs/development/libraries/libre/default.nix +++ b/pkgs/development/libraries/libre/default.nix @@ -20,7 +20,7 @@ stdenv.mkDerivation rec { buildInputs = [ openssl zlib - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ SystemConfiguration ]; diff --git a/pkgs/development/libraries/libredwg/default.nix b/pkgs/development/libraries/libredwg/default.nix index 6eb06a1ebe67..aff1fc1a1d68 100644 --- a/pkgs/development/libraries/libredwg/default.nix +++ b/pkgs/development/libraries/libredwg/default.nix @@ -36,7 +36,7 @@ stdenv.mkDerivation rec { cp ${printVersion} build-aux/git-version-gen ''; - preConfigure = lib.optionalString (stdenv.isDarwin && enablePython) '' + preConfigure = lib.optionalString (stdenv.hostPlatform.isDarwin && enablePython) '' # prevent configure picking up stack_size from distutils.sysconfig export PYTHON_EXTRA_LDFLAGS=" " ''; @@ -54,7 +54,7 @@ stdenv.mkDerivation rec { configureFlags = lib.optional (!enablePython) "--disable-python"; # FAIL: alive.test - doCheck = !stdenv.isLinux; + doCheck = !stdenv.hostPlatform.isLinux; # the "xmlsuite" test requires the libxml2 c library as well as the python module nativeCheckInputs = lib.optionals enablePython [ libxml2 libxml2.dev ]; diff --git a/pkgs/development/libraries/libremidi/default.nix b/pkgs/development/libraries/libremidi/default.nix index 48014bea0741..6717b97203b7 100644 --- a/pkgs/development/libraries/libremidi/default.nix +++ b/pkgs/development/libraries/libremidi/default.nix @@ -22,8 +22,8 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ cmake ]; - buildInputs = lib.optional stdenv.isLinux alsa-lib - ++ lib.optionals stdenv.isDarwin [ + buildInputs = lib.optional stdenv.hostPlatform.isLinux alsa-lib + ++ lib.optionals stdenv.hostPlatform.isDarwin [ CoreAudio CoreFoundation CoreMIDI diff --git a/pkgs/development/libraries/libressl/default.nix b/pkgs/development/libraries/libressl/default.nix index 9629c0e961a9..f6cf4a6e62c8 100644 --- a/pkgs/development/libraries/libressl/default.nix +++ b/pkgs/development/libraries/libressl/default.nix @@ -8,7 +8,7 @@ }: let - ldLibPathEnvName = if stdenv.isDarwin + ldLibPathEnvName = if stdenv.hostPlatform.isDarwin then "DYLD_LIBRARY_PATH" else "LD_LIBRARY_PATH"; diff --git a/pkgs/development/libraries/librsb/default.nix b/pkgs/development/libraries/librsb/default.nix index d9dc209a7139..4a995cbbe89d 100644 --- a/pkgs/development/libraries/librsb/default.nix +++ b/pkgs/development/libraries/librsb/default.nix @@ -83,6 +83,6 @@ stdenv.mkDerivation rec { maintainers = with maintainers; [ KarlJoad ]; platforms = platforms.all; # ./rsb_common.h:56:10: fatal error: 'omp.h' file not found - broken = stdenv.isDarwin; + broken = stdenv.hostPlatform.isDarwin; }; } diff --git a/pkgs/development/libraries/librsvg/default.nix b/pkgs/development/libraries/librsvg/default.nix index e8426b97cec5..932d0f19a7d2 100644 --- a/pkgs/development/libraries/librsvg/default.nix +++ b/pkgs/development/libraries/librsvg/default.nix @@ -87,7 +87,7 @@ stdenv.mkDerivation (finalAttrs: { pango libintl vala # for share/vala/Makefile.vapigen - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ ApplicationServices Foundation libobjc @@ -104,7 +104,7 @@ stdenv.mkDerivation (finalAttrs: { (lib.enableFeature withIntrospection "vala") "--enable-always-build-tests" - ] ++ lib.optional stdenv.isDarwin "--disable-Bsymbolic" + ] ++ lib.optional stdenv.hostPlatform.isDarwin "--disable-Bsymbolic" ++ lib.optional (stdenv.buildPlatform != stdenv.hostPlatform) "RUST_TARGET=${stdenv.hostPlatform.rust.rustcTarget}"; doCheck = false; # all tests fail on libtool-generated rsvg-convert not being able to find coreutils @@ -115,7 +115,7 @@ stdenv.mkDerivation (finalAttrs: { # librsvg only links Foundation, but it also requiers libobjc. The Framework.tbd in the 11.0 SDK # reexports libobjc, but the one in the 10.12 SDK does not, so link it manually. - env = lib.optionalAttrs (stdenv.isDarwin && stdenv.isx86_64) { + env = lib.optionalAttrs (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isx86_64) { NIX_LDFLAGS = "-lobjc"; }; diff --git a/pkgs/development/libraries/librtprocess/default.nix b/pkgs/development/libraries/librtprocess/default.nix index dabb5e62e45d..a8366f8a92df 100644 --- a/pkgs/development/libraries/librtprocess/default.nix +++ b/pkgs/development/libraries/librtprocess/default.nix @@ -13,7 +13,7 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ cmake ]; - buildInputs = lib.optionals stdenv.isDarwin [ llvmPackages.openmp ]; + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ llvmPackages.openmp ]; meta = with lib; { description = "Highly optimized library for processing RAW images"; diff --git a/pkgs/development/libraries/libsamplerate/default.nix b/pkgs/development/libraries/libsamplerate/default.nix index 45cd9d091dd0..ec4da5a34784 100644 --- a/pkgs/development/libraries/libsamplerate/default.nix +++ b/pkgs/development/libraries/libsamplerate/default.nix @@ -14,13 +14,13 @@ in stdenv.mkDerivation rec { nativeBuildInputs = [ pkg-config ]; buildInputs = [ libsndfile ] - ++ optionals stdenv.isDarwin [ ApplicationServices CoreServices ]; + ++ optionals stdenv.hostPlatform.isDarwin [ ApplicationServices CoreServices ]; configureFlags = [ "--disable-fftw" ]; outputs = [ "dev" "out" ]; - postConfigure = optionalString stdenv.isDarwin '' + postConfigure = optionalString stdenv.hostPlatform.isDarwin '' # need headers from the Carbon.framework in /System/Library/Frameworks to # compile this on darwin -- not sure how to handle NIX_CFLAGS_COMPILE+=" -I${Carbon}/Library/Frameworks/Carbon.framework/Headers" diff --git a/pkgs/development/libraries/libsbsms/common.nix b/pkgs/development/libraries/libsbsms/common.nix index f206f68de42a..7215c23667b8 100644 --- a/pkgs/development/libraries/libsbsms/common.nix +++ b/pkgs/development/libraries/libsbsms/common.nix @@ -20,7 +20,7 @@ stdenv.mkDerivation rec { # Fix buidling on platforms other than x86 (substituteAll { src = ./configure.patch; - msse = lib.optionalString stdenv.isx86_64 "-msse"; + msse = lib.optionalString stdenv.hostPlatform.isx86_64 "-msse"; }) ]; diff --git a/pkgs/development/libraries/libscrypt/default.nix b/pkgs/development/libraries/libscrypt/default.nix index 6adc2124a3ab..4f8f0deba902 100644 --- a/pkgs/development/libraries/libscrypt/default.nix +++ b/pkgs/development/libraries/libscrypt/default.nix @@ -11,10 +11,10 @@ stdenv.mkDerivation rec { sha256 = "sha256-QWWqC10bENemG5FYEog87tT7IxDaBJUDqu6j/sO3sYE="; }; - buildFlags = lib.optional stdenv.isDarwin "LDFLAGS= LDFLAGS_EXTRA= CFLAGS_EXTRA="; + buildFlags = lib.optional stdenv.hostPlatform.isDarwin "LDFLAGS= LDFLAGS_EXTRA= CFLAGS_EXTRA="; installFlags = [ "PREFIX=$(out)" ]; - installTargets = lib.optional stdenv.isDarwin "install-osx"; + installTargets = lib.optional stdenv.hostPlatform.isDarwin "install-osx"; doCheck = true; diff --git a/pkgs/development/libraries/libsecret/default.nix b/pkgs/development/libraries/libsecret/default.nix index d0b1515d0bad..8ae0754a0abd 100644 --- a/pkgs/development/libraries/libsecret/default.nix +++ b/pkgs/development/libraries/libsecret/default.nix @@ -83,7 +83,7 @@ stdenv.mkDerivation rec { (lib.mesonBool "gtk_doc" withIntrospection) ]; - doCheck = stdenv.isLinux && withIntrospection; + doCheck = stdenv.hostPlatform.isLinux && withIntrospection; separateDebugInfo = true; postPatch = '' diff --git a/pkgs/development/libraries/libsegfault/default.nix b/pkgs/development/libraries/libsegfault/default.nix index 58896c3e2bc2..e9f014381c5b 100644 --- a/pkgs/development/libraries/libsegfault/default.nix +++ b/pkgs/development/libraries/libsegfault/default.nix @@ -19,7 +19,7 @@ stdenv.mkDerivation rec { sha256 = "vKtY6ZEkyK2K+BzJCSo30f9MpERpPlUnarFIlvJ1Giw="; }; - env.NIX_CFLAGS_COMPILE = lib.optionalString (stdenv.isDarwin) "-DBOOST_STACKTRACE_GNU_SOURCE_NOT_REQUIRED=1"; + env.NIX_CFLAGS_COMPILE = lib.optionalString (stdenv.hostPlatform.isDarwin) "-DBOOST_STACKTRACE_GNU_SOURCE_NOT_REQUIRED=1"; nativeBuildInputs = [ meson diff --git a/pkgs/development/libraries/libserialport/default.nix b/pkgs/development/libraries/libserialport/default.nix index 79f46ffca1f8..0b3314d9b0e1 100644 --- a/pkgs/development/libraries/libserialport/default.nix +++ b/pkgs/development/libraries/libserialport/default.nix @@ -10,8 +10,8 @@ stdenv.mkDerivation rec { }; nativeBuildInputs = [ pkg-config ]; - buildInputs = lib.optional stdenv.isLinux udev - ++ lib.optional stdenv.isDarwin darwin.apple_sdk.frameworks.IOKit; + buildInputs = lib.optional stdenv.hostPlatform.isLinux udev + ++ lib.optional stdenv.hostPlatform.isDarwin darwin.apple_sdk.frameworks.IOKit; meta = with lib; { description = "Cross-platform shared library for serial port access"; diff --git a/pkgs/development/libraries/libshumate/default.nix b/pkgs/development/libraries/libshumate/default.nix index 17783999b53c..f449c5e1c1b7 100644 --- a/pkgs/development/libraries/libshumate/default.nix +++ b/pkgs/development/libraries/libshumate/default.nix @@ -66,7 +66,7 @@ stdenv.mkDerivation (finalAttrs: { "-Ddemos=true" ]; - doCheck = !stdenv.isDarwin; + doCheck = !stdenv.hostPlatform.isDarwin; checkPhase = '' runHook preCheck diff --git a/pkgs/development/libraries/libsndfile/default.nix b/pkgs/development/libraries/libsndfile/default.nix index a1ffdae6bb33..ad3ab58b0e13 100644 --- a/pkgs/development/libraries/libsndfile/default.nix +++ b/pkgs/development/libraries/libsndfile/default.nix @@ -25,8 +25,8 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ autoreconfHook autogen pkg-config python3 ]; buildInputs = [ flac lame libmpg123 libogg libopus libvorbis ] - ++ lib.optionals stdenv.isLinux [ alsa-lib ] - ++ lib.optionals stdenv.isDarwin [ Carbon AudioToolbox ]; + ++ lib.optionals stdenv.hostPlatform.isLinux [ alsa-lib ] + ++ lib.optionals stdenv.hostPlatform.isDarwin [ Carbon AudioToolbox ]; enableParallelBuilding = true; @@ -34,7 +34,7 @@ stdenv.mkDerivation rec { # need headers from the Carbon.framework in /System/Library/Frameworks to # compile this on darwin -- not sure how to handle - preConfigure = lib.optionalString stdenv.isDarwin + preConfigure = lib.optionalString stdenv.hostPlatform.isDarwin '' NIX_CFLAGS_COMPILE+=" -I$SDKROOT/System/Library/Frameworks/Carbon.framework/Versions/A/Headers" ''; diff --git a/pkgs/development/libraries/libsodium/default.nix b/pkgs/development/libraries/libsodium/default.nix index 044450c1825d..a9de633d46d7 100644 --- a/pkgs/development/libraries/libsodium/default.nix +++ b/pkgs/development/libraries/libsodium/default.nix @@ -15,7 +15,7 @@ stdenv.mkDerivation (finalAttrs: { nativeBuildInputs = [ autoreconfHook ]; - separateDebugInfo = stdenv.isLinux && stdenv.hostPlatform.libc != "musl"; + separateDebugInfo = stdenv.hostPlatform.isLinux && stdenv.hostPlatform.libc != "musl"; enableParallelBuilding = true; hardeningDisable = lib.optional (stdenv.hostPlatform.isMusl && stdenv.hostPlatform.isx86_32) "stackprotector"; diff --git a/pkgs/development/libraries/libsolv/default.nix b/pkgs/development/libraries/libsolv/default.nix index a0f5cd610e34..df40a0633988 100644 --- a/pkgs/development/libraries/libsolv/default.nix +++ b/pkgs/development/libraries/libsolv/default.nix @@ -10,7 +10,7 @@ , zchunk , zstd , expat -, withRpm ? !stdenv.isDarwin +, withRpm ? !stdenv.hostPlatform.isDarwin , rpm , db , withConda ? true diff --git a/pkgs/development/libraries/libsoundio/default.nix b/pkgs/development/libraries/libsoundio/default.nix index b7de8bf04e88..c4b501628272 100644 --- a/pkgs/development/libraries/libsoundio/default.nix +++ b/pkgs/development/libraries/libsoundio/default.nix @@ -14,14 +14,14 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ cmake ]; buildInputs = [ libjack2 ] - ++ lib.optionals stdenv.isLinux [ libpulseaudio alsa-lib ] - ++ lib.optional stdenv.isDarwin AudioUnit; + ++ lib.optionals stdenv.hostPlatform.isLinux [ libpulseaudio alsa-lib ] + ++ lib.optional stdenv.hostPlatform.isDarwin AudioUnit; - cmakeFlags = lib.optionals stdenv.isDarwin [ + cmakeFlags = lib.optionals stdenv.hostPlatform.isDarwin [ "-DBUILD_TESTS=OFF" ]; - env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.isDarwin "-Wno-strict-prototypes"; + env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.hostPlatform.isDarwin "-Wno-strict-prototypes"; meta = with lib; { description = "Cross platform audio input and output"; diff --git a/pkgs/development/libraries/libsoup/3.x.nix b/pkgs/development/libraries/libsoup/3.x.nix index 4d5f30cf0b6e..b0588373dee3 100644 --- a/pkgs/development/libraries/libsoup/3.x.nix +++ b/pkgs/development/libraries/libsoup/3.x.nix @@ -52,7 +52,7 @@ stdenv.mkDerivation rec { glib.out brotli libnghttp2 - ] ++ lib.optionals stdenv.isLinux [ + ] ++ lib.optionals stdenv.hostPlatform.isLinux [ libsysprof-capture ]; @@ -71,7 +71,7 @@ stdenv.mkDerivation rec { (lib.mesonEnable "docs" withIntrospection) (lib.mesonEnable "introspection" withIntrospection) - (lib.mesonEnable "sysprof" stdenv.isLinux) + (lib.mesonEnable "sysprof" stdenv.hostPlatform.isLinux) (lib.mesonEnable "vapi" withIntrospection) ]; diff --git a/pkgs/development/libraries/libsoup/default.nix b/pkgs/development/libraries/libsoup/default.nix index e92c59bc2f2c..a88cd9355326 100644 --- a/pkgs/development/libraries/libsoup/default.nix +++ b/pkgs/development/libraries/libsoup/default.nix @@ -48,7 +48,7 @@ stdenv.mkDerivation rec { libpsl glib.out brotli - ] ++ lib.optionals stdenv.isLinux [ + ] ++ lib.optionals stdenv.hostPlatform.isLinux [ libsysprof-capture ]; @@ -64,7 +64,7 @@ stdenv.mkDerivation rec { "-Dintrospection=${if withIntrospection then "enabled" else "disabled"}" "-Dgnome=${lib.boolToString gnomeSupport}" "-Dntlm=disabled" - ] ++ lib.optionals (!stdenv.isLinux) [ + ] ++ lib.optionals (!stdenv.hostPlatform.isLinux) [ "-Dsysprof=disabled" ]; diff --git a/pkgs/development/libraries/libspatialite/default.nix b/pkgs/development/libraries/libspatialite/default.nix index 98d184ae703c..8eeec2dbfe0c 100644 --- a/pkgs/development/libraries/libspatialite/default.nix +++ b/pkgs/development/libraries/libspatialite/default.nix @@ -40,13 +40,13 @@ stdenv.mkDerivation rec { proj sqlite zlib - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ libiconv ]; enableParallelBuilding = true; - postInstall = lib.optionalString stdenv.isDarwin '' + postInstall = lib.optionalString stdenv.hostPlatform.isDarwin '' ln -s $out/lib/mod_spatialite.{so,dylib} ''; diff --git a/pkgs/development/libraries/libspnav/default.nix b/pkgs/development/libraries/libspnav/default.nix index d67b12a726b4..6a60bdb7f090 100644 --- a/pkgs/development/libraries/libspnav/default.nix +++ b/pkgs/development/libraries/libspnav/default.nix @@ -11,7 +11,7 @@ stdenv.mkDerivation rec { sha256 = "098h1jhlj87axpza5zgy58prp0zn94wyrbch6x0s7q4mzh7dc8ba"; }; - nativeBuildInputs = lib.optional stdenv.isDarwin fixDarwinDylibNames; + nativeBuildInputs = lib.optional stdenv.hostPlatform.isDarwin fixDarwinDylibNames; buildInputs = [ libX11 ]; patches = [ diff --git a/pkgs/development/libraries/libstatgrab/default.nix b/pkgs/development/libraries/libstatgrab/default.nix index abda8137f5c8..9b45ffb58ce7 100644 --- a/pkgs/development/libraries/libstatgrab/default.nix +++ b/pkgs/development/libraries/libstatgrab/default.nix @@ -13,7 +13,7 @@ stdenv.mkDerivation rec { sha256 = "sha256-VoiqSmhVR9cXSoo3PqnY7pJ+dm48wwK97jRSPCxdbBE="; }; - buildInputs = lib.optional stdenv.isDarwin IOKit; + buildInputs = lib.optional stdenv.hostPlatform.isDarwin IOKit; meta = with lib; { homepage = "https://www.i-scream.org/libstatgrab/"; diff --git a/pkgs/development/libraries/libsvm/default.nix b/pkgs/development/libraries/libsvm/default.nix index 9d58109fa8e3..1fd5141c9084 100644 --- a/pkgs/development/libraries/libsvm/default.nix +++ b/pkgs/development/libraries/libsvm/default.nix @@ -23,13 +23,13 @@ stdenv.mkDerivation rec { outputs = [ "out" "bin" "dev" ]; - nativeBuildInputs = lib.optionals stdenv.isDarwin [ fixDarwinDylibNames ]; + nativeBuildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ fixDarwinDylibNames ]; installPhase = let libSuff = stdenv.hostPlatform.extensions.sharedLibrary; soVersion = "3"; - libName = if stdenv.isDarwin then "libsvm.${soVersion}${libSuff}" else "libsvm${libSuff}.${soVersion}"; + libName = if stdenv.hostPlatform.isDarwin then "libsvm.${soVersion}${libSuff}" else "libsvm${libSuff}.${soVersion}"; in '' runHook preInstall diff --git a/pkgs/development/libraries/libtasn1/default.nix b/pkgs/development/libraries/libtasn1/default.nix index 3c630bac630d..069d8706e74d 100644 --- a/pkgs/development/libraries/libtasn1/default.nix +++ b/pkgs/development/libraries/libtasn1/default.nix @@ -34,7 +34,7 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ texinfo perl ]; doCheck = true; - preCheck = if stdenv.isDarwin then + preCheck = if stdenv.hostPlatform.isDarwin then "export DYLD_LIBRARY_PATH=`pwd`/lib/.libs" else null; diff --git a/pkgs/development/libraries/libticalcs2/default.nix b/pkgs/development/libraries/libticalcs2/default.nix index 2488a5bbb0b4..551bfed8fc8b 100644 --- a/pkgs/development/libraries/libticalcs2/default.nix +++ b/pkgs/development/libraries/libticalcs2/default.nix @@ -33,9 +33,9 @@ stdenv.mkDerivation rec { libticables2 xz bzip2 - ] ++ lib.optionals stdenv.isLinux [ + ] ++ lib.optionals stdenv.hostPlatform.isLinux [ acl - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ libobjc ]; diff --git a/pkgs/development/libraries/libtiger/default.nix b/pkgs/development/libraries/libtiger/default.nix index cd198dac309d..149f5e65fc41 100644 --- a/pkgs/development/libraries/libtiger/default.nix +++ b/pkgs/development/libraries/libtiger/default.nix @@ -21,7 +21,7 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ autoreconfHook pkg-config ]; buildInputs = [ libkate pango cairo ] - ++ lib.optional stdenv.isDarwin darwin.apple_sdk.frameworks.ApplicationServices; + ++ lib.optional stdenv.hostPlatform.isDarwin darwin.apple_sdk.frameworks.ApplicationServices; meta = { homepage = "https://code.google.com/archive/p/libtiger/"; diff --git a/pkgs/development/libraries/libtomcrypt/default.nix b/pkgs/development/libraries/libtomcrypt/default.nix index 2a32900040d8..568d1a22c6a8 100644 --- a/pkgs/development/libraries/libtomcrypt/default.nix +++ b/pkgs/development/libraries/libtomcrypt/default.nix @@ -11,7 +11,7 @@ stdenv.mkDerivation rec { # Fixes a build failure on aarch64-darwin. Define for all Darwin targets for when x86_64-darwin # upgrades to a newer SDK. - env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.isDarwin "-DTARGET_OS_IPHONE=0"; + env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.hostPlatform.isDarwin "-DTARGET_OS_IPHONE=0"; patches = [ (fetchpatch { diff --git a/pkgs/development/libraries/libtommath/default.nix b/pkgs/development/libraries/libtommath/default.nix index 2501bc827fae..56225f96de8c 100644 --- a/pkgs/development/libraries/libtommath/default.nix +++ b/pkgs/development/libraries/libtommath/default.nix @@ -24,7 +24,7 @@ stdenv.mkDerivation rec { makefile = "makefile.shared"; - env.NIX_CFLAGS_COMPILE = lib.optionalString (stdenv.isDarwin && stdenv.isAarch64) "-DTARGET_OS_IPHONE=0"; + env.NIX_CFLAGS_COMPILE = lib.optionalString (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isAarch64) "-DTARGET_OS_IPHONE=0"; enableParallelBuilding = true; diff --git a/pkgs/development/libraries/libubox/default.nix b/pkgs/development/libraries/libubox/default.nix index e48748308bb2..1a3a89a2d71d 100644 --- a/pkgs/development/libraries/libubox/default.nix +++ b/pkgs/development/libraries/libubox/default.nix @@ -22,7 +22,7 @@ stdenv.mkDerivation { done ''; - env.NIX_CFLAGS_COMPILE = toString (lib.optionals (stdenv.isDarwin && stdenv.isx86_64) [ + env.NIX_CFLAGS_COMPILE = toString (lib.optionals (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isx86_64) [ "-Wno-error=gnu-folding-constant" ]); diff --git a/pkgs/development/libraries/libuchardet/default.nix b/pkgs/development/libraries/libuchardet/default.nix index 1b54ea948dd0..12f210593107 100644 --- a/pkgs/development/libraries/libuchardet/default.nix +++ b/pkgs/development/libraries/libuchardet/default.nix @@ -13,7 +13,7 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ cmake ]; - doCheck = !stdenv.isi686; # tests fail on i686 + doCheck = !stdenv.hostPlatform.isi686; # tests fail on i686 meta = with lib; { description = "Mozilla's Universal Charset Detector C/C++ API"; diff --git a/pkgs/development/libraries/libui/default.nix b/pkgs/development/libraries/libui/default.nix index a798977b1f41..77197986343f 100644 --- a/pkgs/development/libraries/libui/default.nix +++ b/pkgs/development/libraries/libui/default.nix @@ -1,7 +1,7 @@ { lib, stdenv, fetchFromGitHub, cmake, pkg-config, gtk3, Cocoa }: let - backend = if stdenv.isDarwin then "darwin" else "unix"; + backend = if stdenv.hostPlatform.isDarwin then "darwin" else "unix"; in stdenv.mkDerivation rec { @@ -15,20 +15,20 @@ stdenv.mkDerivation rec { }; nativeBuildInputs = [ cmake pkg-config ]; - propagatedBuildInputs = lib.optional stdenv.isLinux gtk3 - ++ lib.optionals stdenv.isDarwin [ Cocoa ]; + propagatedBuildInputs = lib.optional stdenv.hostPlatform.isLinux gtk3 + ++ lib.optionals stdenv.hostPlatform.isDarwin [ Cocoa ]; - preConfigure = lib.optionalString stdenv.isDarwin '' + preConfigure = lib.optionalString stdenv.hostPlatform.isDarwin '' sed -i 's/set(CMAKE_OSX_DEPLOYMENT_TARGET "10.8")//' ./CMakeLists.txt ''; installPhase = '' mkdir -p $out/{include,lib} mkdir -p $out/lib/pkgconfig - '' + lib.optionalString stdenv.isLinux '' + '' + lib.optionalString stdenv.hostPlatform.isLinux '' mv ./out/libui.so.0 $out/lib/ ln -s $out/lib/libui.so.0 $out/lib/libui.so - '' + lib.optionalString stdenv.isDarwin '' + '' + lib.optionalString stdenv.hostPlatform.isDarwin '' mv ./out/libui.A.dylib $out/lib/ ln -s $out/lib/libui.A.dylib $out/lib/libui.dylib '' + '' @@ -40,7 +40,7 @@ stdenv.mkDerivation rec { --subst-var-by out $out \ --subst-var-by version "${version}" ''; - postInstall = lib.optionalString stdenv.isDarwin '' + postInstall = lib.optionalString stdenv.hostPlatform.isDarwin '' install_name_tool -id $out/lib/libui.A.dylib $out/lib/libui.A.dylib ''; diff --git a/pkgs/development/libraries/libuiohook/default.nix b/pkgs/development/libraries/libuiohook/default.nix index 4fe42dad6c89..7d58b7814958 100644 --- a/pkgs/development/libraries/libuiohook/default.nix +++ b/pkgs/development/libraries/libuiohook/default.nix @@ -27,7 +27,7 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ cmake pkg-config ]; buildInputs = - if stdenv.isDarwin then [ AppKit ApplicationServices Carbon ] + if stdenv.hostPlatform.isDarwin then [ AppKit ApplicationServices Carbon ] else [ libX11 libxkbcommon diff --git a/pkgs/development/libraries/libunarr/default.nix b/pkgs/development/libraries/libunarr/default.nix index d73bed773dff..c53196afe420 100644 --- a/pkgs/development/libraries/libunarr/default.nix +++ b/pkgs/development/libraries/libunarr/default.nix @@ -13,7 +13,7 @@ stdenv.mkDerivation rec { hash = "sha256-Mo76BOqZbdOJFrEkeozxdqwpuFyvkhdONNMZmN5BdNI="; }; - postPatch = lib.optionalString stdenv.isDarwin '' + postPatch = lib.optionalString stdenv.hostPlatform.isDarwin '' substituteInPlace CMakeLists.txt \ --replace "-flto" "" \ --replace "AppleClang" "Clang" diff --git a/pkgs/development/libraries/libunistring/default.nix b/pkgs/development/libraries/libunistring/default.nix index 13ffffe6aa74..abf5f0df2558 100644 --- a/pkgs/development/libraries/libunistring/default.nix +++ b/pkgs/development/libraries/libunistring/default.nix @@ -29,8 +29,8 @@ stdenv.mkDerivation (finalAttrs: { ]; strictDeps = true; - propagatedBuildInputs = lib.optional (!stdenv.isLinux) libiconv; - buildInputs = lib.optionals stdenv.isDarwin [ + propagatedBuildInputs = lib.optional (!stdenv.hostPlatform.isLinux) libiconv; + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.CoreServices ]; nativeBuildInputs = [ updateAutotoolsGnuConfigScriptsHook ]; diff --git a/pkgs/development/libraries/libusb1/default.nix b/pkgs/development/libraries/libusb1/default.nix index bd8561e0e8a3..f03ae09b2895 100644 --- a/pkgs/development/libraries/libusb1/default.nix +++ b/pkgs/development/libraries/libusb1/default.nix @@ -4,7 +4,7 @@ , autoreconfHook , doxygen , pkg-config -, enableUdev ? stdenv.isLinux && !stdenv.hostPlatform.isStatic +, enableUdev ? stdenv.hostPlatform.isLinux && !stdenv.hostPlatform.isStatic , udev , libobjc , IOKit @@ -33,7 +33,7 @@ stdenv.mkDerivation rec { ] ++ lib.optionals withDocs [ doxygen ]; propagatedBuildInputs = lib.optional enableUdev udev ++ - lib.optionals stdenv.isDarwin [ libobjc IOKit Security ]; + lib.optionals stdenv.hostPlatform.isDarwin [ libobjc IOKit Security ]; dontDisableStatic = withStatic; diff --git a/pkgs/development/libraries/libusbsio/default.nix b/pkgs/development/libraries/libusbsio/default.nix index 090683898a16..21c7e3f1396e 100644 --- a/pkgs/development/libraries/libusbsio/default.nix +++ b/pkgs/development/libraries/libusbsio/default.nix @@ -28,17 +28,17 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ pkg-config - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ fixDarwinDylibNames ]; buildInputs = [ libusb1 - ] ++ lib.optionals stdenv.isDarwin (with darwin.apple_sdk.frameworks; [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin (with darwin.apple_sdk.frameworks; [ AppKit CoreFoundation IOKit - ]) ++ lib.optionals stdenv.isLinux [ + ]) ++ lib.optionals stdenv.hostPlatform.isLinux [ systemdMinimal # libudev ]; diff --git a/pkgs/development/libraries/libuv/default.nix b/pkgs/development/libraries/libuv/default.nix index a4254921e179..8d1d36344d7e 100644 --- a/pkgs/development/libraries/libuv/default.nix +++ b/pkgs/development/libraries/libuv/default.nix @@ -50,7 +50,7 @@ stdenv.mkDerivation (finalAttrs: { "tcp_bind6_error_addrinuse" "tcp_bind_error_addrinuse_listen" # https://github.com/libuv/libuv/pull/4075#issuecomment-1935572237 "thread_priority" - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ # Sometimes: timeout (no output), failed uv_listen. Someone # should report these failures to libuv team. There tests should # be much more robust. @@ -71,10 +71,10 @@ stdenv.mkDerivation (finalAttrs: { "fs_event_watch_dir_recursive" "fs_event_watch_file" "fs_event_watch_file_current_dir" "fs_event_watch_file_exact_path" "process_priority" "udp_create_early_bad_bind" - ] ++ lib.optionals (stdenv.isDarwin && stdenv.isx86_64) [ + ] ++ lib.optionals (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isx86_64) [ # fail on macos < 10.15 (starting in libuv 1.47.0) "fs_write_alotof_bufs_with_offset" "fs_write_multiple_bufs" "fs_read_bufs" - ] ++ lib.optionals stdenv.isAarch32 [ + ] ++ lib.optionals stdenv.hostPlatform.isAarch32 [ # I observe this test failing with some regularity on ARMv7: # https://github.com/libuv/libuv/issues/1871 "shutdown_close_pipe" diff --git a/pkgs/development/libraries/libva/1.nix b/pkgs/development/libraries/libva/1.nix index 1a9c7309e542..15e4d0a9e801 100644 --- a/pkgs/development/libraries/libva/1.nix +++ b/pkgs/development/libraries/libva/1.nix @@ -37,7 +37,7 @@ stdenv.mkDerivation rec { # TODO: share libs between minimal and !minimal - perhaps just symlink them # Add FHS paths for non-NixOS applications. - configureFlags = lib.optionals stdenv.isLinux [ "--with-drivers-path=${mesa.driverLink}/lib/dri:/usr/lib/dri:/usr/lib32/dri" ] + configureFlags = lib.optionals stdenv.hostPlatform.isLinux [ "--with-drivers-path=${mesa.driverLink}/lib/dri:/usr/lib/dri:/usr/lib32/dri" ] ++ lib.optionals (!minimal) [ "--enable-glx" ]; installFlags = [ "dummy_drv_video_ladir=$(out)/lib/dri" ]; diff --git a/pkgs/development/libraries/libva/default.nix b/pkgs/development/libraries/libva/default.nix index 8a41c60b169f..f88404682b44 100644 --- a/pkgs/development/libraries/libva/default.nix +++ b/pkgs/development/libraries/libva/default.nix @@ -33,7 +33,7 @@ stdenv.mkDerivation (finalAttrs: { buildInputs = [ libdrm ] ++ lib.optionals (!minimal) [ libX11 libXext libXfixes wayland libffi libGL ]; - mesonFlags = lib.optionals stdenv.isLinux [ + mesonFlags = lib.optionals stdenv.hostPlatform.isLinux [ # Add FHS and Debian paths for non-NixOS applications "-Ddriverdir=${mesa.driverLink}/lib/dri:/usr/lib/dri:/usr/lib32/dri:/usr/lib/x86_64-linux-gnu/dri:/usr/lib/i386-linux-gnu/dri" ]; diff --git a/pkgs/development/libraries/libvdpau/default.nix b/pkgs/development/libraries/libvdpau/default.nix index 8c1c3b7c5e9c..75c61995071e 100644 --- a/pkgs/development/libraries/libvdpau/default.nix +++ b/pkgs/development/libraries/libvdpau/default.nix @@ -17,9 +17,9 @@ stdenv.mkDerivation rec { propagatedBuildInputs = [ xorg.libX11 ]; - mesonFlags = lib.optionals stdenv.isLinux [ "-Dmoduledir=${mesa.driverLink}/lib/vdpau" ]; + mesonFlags = lib.optionals stdenv.hostPlatform.isLinux [ "-Dmoduledir=${mesa.driverLink}/lib/vdpau" ]; - NIX_LDFLAGS = lib.optionalString stdenv.isDarwin "-lX11"; + NIX_LDFLAGS = lib.optionalString stdenv.hostPlatform.isDarwin "-lX11"; meta = with lib; { homepage = "https://www.freedesktop.org/wiki/Software/VDPAU/"; diff --git a/pkgs/development/libraries/libvirt-glib/default.nix b/pkgs/development/libraries/libvirt-glib/default.nix index b01a9a788bad..c750d2a25551 100644 --- a/pkgs/development/libraries/libvirt-glib/default.nix +++ b/pkgs/development/libraries/libvirt-glib/default.nix @@ -45,7 +45,7 @@ stdenv.mkDerivation rec { buildInputs = [ libvirt libxml2 - ] ++ lib.optionals stdenv.isLinux [ + ] ++ lib.optionals stdenv.hostPlatform.isLinux [ libcap_ng ]; diff --git a/pkgs/development/libraries/libvirt/default.nix b/pkgs/development/libraries/libvirt/default.nix index 56b0b0a39089..f6e5807f6958 100644 --- a/pkgs/development/libraries/libvirt/default.nix +++ b/pkgs/development/libraries/libvirt/default.nix @@ -72,14 +72,14 @@ , enableIscsi ? false , openiscsi , libiscsi -, enableXen ? stdenv.isLinux && stdenv.isx86_64 +, enableXen ? stdenv.hostPlatform.isLinux && stdenv.hostPlatform.isx86_64 , xen -, enableZfs ? stdenv.isLinux +, enableZfs ? stdenv.hostPlatform.isLinux , zfs }: let - inherit (stdenv) isDarwin isLinux isx86_64; + inherit (stdenv.hostPlatform) isDarwin isLinux isx86_64; binPath = lib.makeBinPath ([ dnsmasq ] ++ lib.optionals isLinux [ diff --git a/pkgs/development/libraries/libvncserver/default.nix b/pkgs/development/libraries/libvncserver/default.nix index a6c78c3262fc..e6b5bf4acb5b 100644 --- a/pkgs/development/libraries/libvncserver/default.nix +++ b/pkgs/development/libraries/libvncserver/default.nix @@ -45,7 +45,7 @@ stdenv.mkDerivation rec { libpng ] ++ lib.optionals withSystemd [ systemd - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ Carbon ]; diff --git a/pkgs/development/libraries/libvpx/default.nix b/pkgs/development/libraries/libvpx/default.nix index ef0929a841d8..4f6c91d65c71 100644 --- a/pkgs/development/libraries/libvpx/default.nix +++ b/pkgs/development/libraries/libvpx/default.nix @@ -43,7 +43,7 @@ }: let - inherit (stdenv) is64bit isMips isDarwin isCygwin; + inherit (stdenv.hostPlatform) is64bit isMips isDarwin isCygwin; inherit (lib) enableFeature optional optionals; # libvpx darwin targets include darwin version (ie. ARCH-darwinXX-gcc, XX being the darwin version) @@ -66,8 +66,8 @@ let kernel = # Build system doesn't understand BSD, so pretend to be Linux. - /**/ if stdenv.isBSD then "linux" - else if stdenv.isDarwin then "darwin${darwinVersion}" + /**/ if stdenv.hostPlatform.isBSD then "linux" + else if stdenv.hostPlatform.isDarwin then "darwin${darwinVersion}" else stdenv.hostPlatform.parsed.kernel.name; isGeneric = @@ -76,7 +76,7 @@ let || stdenv.hostPlatform.isRiscV; target = - /**/ if (stdenv.isBSD || stdenv.hostPlatform != stdenv.buildPlatform) then + /**/ if (stdenv.hostPlatform.isBSD || stdenv.hostPlatform != stdenv.buildPlatform) then (if isGeneric then "generic-gnu" else "${cpu}-${kernel}-gcc") else null; in diff --git a/pkgs/development/libraries/libwnck/2.nix b/pkgs/development/libraries/libwnck/2.nix index bc5a89dc120d..890b1a7651a8 100644 --- a/pkgs/development/libraries/libwnck/2.nix +++ b/pkgs/development/libraries/libwnck/2.nix @@ -25,6 +25,6 @@ stdenv.mkDerivation rec { maintainers = with lib.maintainers; [ johnazoidberg ]; # ./xutils.h:31:10: fatal error: 'gdk/gdkx.h' file not found # #include - broken = stdenv.isDarwin; + broken = stdenv.hostPlatform.isDarwin; }; } diff --git a/pkgs/development/libraries/libx86/default.nix b/pkgs/development/libraries/libx86/default.nix index 1abefa8f4374..69b4ec4a32ca 100644 --- a/pkgs/development/libraries/libx86/default.nix +++ b/pkgs/development/libraries/libx86/default.nix @@ -13,7 +13,7 @@ stdenv.mkDerivation rec { # http://www.mail-archive.com/suspend-devel@lists.sourceforge.net/msg02355.html makeFlags = [ "DESTDIR=$(out)" - ] ++ lib.optional (!stdenv.isi686) "BACKEND=x86emu"; + ] ++ lib.optional (!stdenv.hostPlatform.isi686) "BACKEND=x86emu"; preBuild = '' sed -i lrmi.c -e 's@defined(__i386__)@(defined(__i386__) || defined(__x86_64__))@' diff --git a/pkgs/development/libraries/libxkbcommon/default.nix b/pkgs/development/libraries/libxkbcommon/default.nix index 6994398eaa90..9a0ebd6d59da 100644 --- a/pkgs/development/libraries/libxkbcommon/default.nix +++ b/pkgs/development/libraries/libxkbcommon/default.nix @@ -14,7 +14,7 @@ # To enable the "interactive-wayland" subcommand of xkbcli. This is the # wayland equivalent of `xev` on X11. , xorg -, withWaylandTools ? stdenv.isLinux +, withWaylandTools ? stdenv.hostPlatform.isLinux , wayland , wayland-protocols , wayland-scanner diff --git a/pkgs/development/libraries/libxklavier/default.nix b/pkgs/development/libraries/libxklavier/default.nix index 3fa295279f0c..b6a217d9fbf8 100644 --- a/pkgs/development/libraries/libxklavier/default.nix +++ b/pkgs/development/libraries/libxklavier/default.nix @@ -15,7 +15,7 @@ stdenv.mkDerivation rec { patches = [ ./honor-XKB_CONFIG_ROOT.patch - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ (fetchpatch { url = "https://gitlab.freedesktop.org/archived-projects/libxklavier/-/commit/1387c21a788ec1ea203c8392ea1460fc29d83f70.patch"; sha256 = "sha256-fyWu7sVfDv/ozjhLSLCVsv+iNFawWgJqHUsQHHSkQn4="; diff --git a/pkgs/development/libraries/libxml2/default.nix b/pkgs/development/libraries/libxml2/default.nix index 82176e4fab89..66f16b11a74e 100644 --- a/pkgs/development/libraries/libxml2/default.nix +++ b/pkgs/development/libraries/libxml2/default.nix @@ -49,13 +49,13 @@ stdenv.mkDerivation (finalAttrs: { gettext ] ++ lib.optionals (pythonSupport && python?isPy3 && python.isPy3) [ ncurses - ] ++ lib.optionals (stdenv.isDarwin && pythonSupport && python?isPy2 && python.isPy2) [ + ] ++ lib.optionals (stdenv.hostPlatform.isDarwin && pythonSupport && python?isPy2 && python.isPy2) [ libintl ]; propagatedBuildInputs = [ findXMLCatalogs - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ libiconv ] ++ lib.optionals icuSupport [ icu @@ -80,7 +80,7 @@ stdenv.mkDerivation (finalAttrs: { doCheck = (stdenv.hostPlatform == stdenv.buildPlatform) && stdenv.hostPlatform.libc != "musl"; - preCheck = lib.optional stdenv.isDarwin '' + preCheck = lib.optional stdenv.hostPlatform.isDarwin '' export DYLD_LIBRARY_PATH="$PWD/.libs:$DYLD_LIBRARY_PATH" ''; diff --git a/pkgs/development/libraries/libxslt/default.nix b/pkgs/development/libraries/libxslt/default.nix index f86c6068e2da..34092649067c 100644 --- a/pkgs/development/libraries/libxslt/default.nix +++ b/pkgs/development/libraries/libxslt/default.nix @@ -36,7 +36,7 @@ stdenv.mkDerivation (finalAttrs: { buildInputs = [ libxml2.dev libxcrypt - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ gettext ] ++ lib.optionals pythonSupport [ libxml2.py diff --git a/pkgs/development/libraries/libxsmm/default.nix b/pkgs/development/libraries/libxsmm/default.nix index eeb9dcf71b4a..3276354240f4 100644 --- a/pkgs/development/libraries/libxsmm/default.nix +++ b/pkgs/development/libraries/libxsmm/default.nix @@ -51,7 +51,7 @@ stdenv.mkDerivation rec { ''; meta = with lib; { - broken = (stdenv.isLinux && stdenv.isAarch64); + broken = (stdenv.hostPlatform.isLinux && stdenv.hostPlatform.isAarch64); description = "Library targeting Intel Architecture for specialized dense and sparse matrix operations, and deep learning primitives"; mainProgram = "libxsmm_gemm_generator"; license = licenses.bsd3; diff --git a/pkgs/development/libraries/libyuv/default.nix b/pkgs/development/libraries/libyuv/default.nix index 68d3b5ff2789..1062d527fa2a 100644 --- a/pkgs/development/libraries/libyuv/default.nix +++ b/pkgs/development/libraries/libyuv/default.nix @@ -20,7 +20,7 @@ stdenv.mkDerivation rec { ]; # NEON does not work on aarch64, we disable it - cmakeFlags = lib.optionals stdenv.isAarch64 ["-DCMAKE_CXX_FLAGS=-DLIBYUV_DISABLE_NEON"]; + cmakeFlags = lib.optionals stdenv.hostPlatform.isAarch64 ["-DCMAKE_CXX_FLAGS=-DLIBYUV_DISABLE_NEON"]; buildInputs = [ libjpeg ]; diff --git a/pkgs/development/libraries/lief/default.nix b/pkgs/development/libraries/lief/default.nix index 1f7e8fdf2c49..1e9a95bc4ed5 100644 --- a/pkgs/development/libraries/lief/default.nix +++ b/pkgs/development/libraries/lief/default.nix @@ -38,7 +38,7 @@ stdenv.mkDerivation rec { scikit-build-core ]; - env.CXXFLAGS = toString (lib.optional stdenv.isDarwin [ "-faligned-allocation" "-fno-aligned-new" "-fvisibility=hidden" ]); + env.CXXFLAGS = toString (lib.optional stdenv.hostPlatform.isDarwin [ "-faligned-allocation" "-fno-aligned-new" "-fvisibility=hidden" ]); postBuild = '' pushd ../api/python diff --git a/pkgs/development/libraries/lightgbm/default.nix b/pkgs/development/libraries/lightgbm/default.nix index 4aa28f6461e1..934b0cab5a3e 100644 --- a/pkgs/development/libraries/lightgbm/default.nix +++ b/pkgs/development/libraries/lightgbm/default.nix @@ -34,7 +34,7 @@ stdenv.mkDerivation rec { }; nativeBuildInputs = [ cmake ] - ++ lib.optionals stdenv.isDarwin [ llvmPackages.openmp ] + ++ lib.optionals stdenv.hostPlatform.isDarwin [ llvmPackages.openmp ] ++ lib.optionals openclSupport [ opencl-headers ocl-icd boost ] ++ lib.optionals mpiSupport [ openmpi ] ++ lib.optionals hdfsSupport [ hadoop ] diff --git a/pkgs/development/libraries/linbox/default.nix b/pkgs/development/libraries/linbox/default.nix index ed199914e640..f9258f991361 100644 --- a/pkgs/development/libraries/linbox/default.nix +++ b/pkgs/development/libraries/linbox/default.nix @@ -45,7 +45,7 @@ stdenv.mkDerivation rec { configureFlags = [ "--with-blas-libs=-lblas" "--without-archnative" - ] ++ lib.optionals stdenv.isx86_64 [ + ] ++ lib.optionals stdenv.hostPlatform.isx86_64 [ # disable SIMD instructions (which are enabled *when available* by default) "--${if stdenv.hostPlatform.sse3Support then "enable" else "disable"}-sse3" "--${if stdenv.hostPlatform.ssse3Support then "enable" else "disable"}-ssse3" diff --git a/pkgs/development/libraries/linenoise/default.nix b/pkgs/development/libraries/linenoise/default.nix index a525a3da9a41..13891d08f113 100644 --- a/pkgs/development/libraries/linenoise/default.nix +++ b/pkgs/development/libraries/linenoise/default.nix @@ -17,7 +17,7 @@ stdenv.mkDerivation { }; nativeBuildInputs = [ validatePkgConfig ] - ++ lib.optionals stdenv.isDarwin [ fixDarwinDylibNames ]; + ++ lib.optionals stdenv.hostPlatform.isDarwin [ fixDarwinDylibNames ]; buildPhase = '' runHook preBuild diff --git a/pkgs/development/libraries/liquid-dsp/default.nix b/pkgs/development/libraries/liquid-dsp/default.nix index 6667aa4882e0..0700b645e30a 100644 --- a/pkgs/development/libraries/liquid-dsp/default.nix +++ b/pkgs/development/libraries/liquid-dsp/default.nix @@ -18,10 +18,10 @@ stdenv.mkDerivation rec { sha256 = "sha256-3UKAwhYaYZ42+d+wiW/AB6x5TSOel8d++d3HeZqAg/8="; }; - configureFlags = lib.optionals stdenv.isDarwin [ "LIBTOOL=${cctools}/bin/libtool" ]; + configureFlags = lib.optionals stdenv.hostPlatform.isDarwin [ "LIBTOOL=${cctools}/bin/libtool" ]; nativeBuildInputs = [ autoreconfHook ] - ++ lib.optionals stdenv.isDarwin [ cctools autoSignDarwinBinariesHook fixDarwinDylibNames ]; + ++ lib.optionals stdenv.hostPlatform.isDarwin [ cctools autoSignDarwinBinariesHook fixDarwinDylibNames ]; meta = { homepage = "https://liquidsdr.org/"; diff --git a/pkgs/development/libraries/lmdb/default.nix b/pkgs/development/libraries/lmdb/default.nix index 7c907e9ef70f..69100b9dffd6 100644 --- a/pkgs/development/libraries/lmdb/default.nix +++ b/pkgs/development/libraries/lmdb/default.nix @@ -31,7 +31,7 @@ stdenv.mkDerivation rec { "CC=${stdenv.cc.targetPrefix}cc" "AR=${stdenv.cc.targetPrefix}ar" ] - ++ lib.optional stdenv.isDarwin "LDFLAGS=-Wl,-install_name,$(out)/lib/liblmdb.so" + ++ lib.optional stdenv.hostPlatform.isDarwin "LDFLAGS=-Wl,-install_name,$(out)/lib/liblmdb.so" ++ lib.optionals stdenv.hostPlatform.isWindows [ "SOEXT=.dll" "BINEXT=.exe" ]; doCheck = true; diff --git a/pkgs/development/libraries/loudmouth/default.nix b/pkgs/development/libraries/loudmouth/default.nix index 21dd9db2797c..e949cd57e62e 100644 --- a/pkgs/development/libraries/loudmouth/default.nix +++ b/pkgs/development/libraries/loudmouth/default.nix @@ -15,7 +15,7 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ pkg-config ]; - buildInputs = lib.optionals (stdenv.isDarwin && lib.versionOlder stdenv.hostPlatform.darwinMinVersion "11") [ + buildInputs = lib.optionals (stdenv.hostPlatform.isDarwin && lib.versionOlder stdenv.hostPlatform.darwinMinVersion "11") [ darwin.apple_sdk.frameworks.AppKit darwin.apple_sdk.frameworks.Foundation ]; diff --git a/pkgs/development/libraries/mailcore2/default.nix b/pkgs/development/libraries/mailcore2/default.nix index ed7406cc52b7..1381a48315df 100644 --- a/pkgs/development/libraries/mailcore2/default.nix +++ b/pkgs/development/libraries/mailcore2/default.nix @@ -19,11 +19,11 @@ stdenv.mkDerivation rec { buildInputs = [ libetpan cyrus_sasl libctemplate libuchardet html-tidy libxml2 openssl - ] ++ lib.optionals stdenv.isLinux [ + ] ++ lib.optionals stdenv.hostPlatform.isLinux [ glib icu libuuid - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.Foundation ]; @@ -37,12 +37,12 @@ stdenv.mkDerivation rec { --replace buffio.h tidybuffio.h substituteInPlace src/core/basetypes/MCString.cpp \ --replace "xmlErrorPtr" "const xmlError *" - '' + lib.optionalString (!stdenv.isDarwin) '' + '' + lib.optionalString (!stdenv.hostPlatform.isDarwin) '' substituteInPlace src/core/basetypes/MCICUTypes.h \ --replace "__CHAR16_TYPE__ UChar" "char16_t UChar" ''; - cmakeFlags = lib.optionals (!stdenv.isDarwin) [ + cmakeFlags = lib.optionals (!stdenv.hostPlatform.isDarwin) [ "-DBUILD_SHARED_LIBS=ON" ]; @@ -54,7 +54,7 @@ stdenv.mkDerivation rec { cp src/libMailCore.* $out/lib ''; - doCheck = !stdenv.isDarwin; + doCheck = !stdenv.hostPlatform.isDarwin; checkPhase = '' ( cd unittest diff --git a/pkgs/development/libraries/mapnik/default.nix b/pkgs/development/libraries/mapnik/default.nix index c41ebde0241e..7d8848f59b58 100644 --- a/pkgs/development/libraries/mapnik/default.nix +++ b/pkgs/development/libraries/mapnik/default.nix @@ -99,7 +99,7 @@ stdenv.mkDerivation rec { # Use 'protozero' package. (lib.cmakeBool "USE_EXTERNAL_MAPBOX_PROTOZERO" true) # macOS builds fail when using memory mapped file cache. - (lib.cmakeBool "USE_MEMORY_MAPPED_FILE" (!stdenv.isDarwin)) + (lib.cmakeBool "USE_MEMORY_MAPPED_FILE" (!stdenv.hostPlatform.isDarwin)) ]; doCheck = true; diff --git a/pkgs/development/libraries/matrix-sdk-crypto-nodejs/generic.nix b/pkgs/development/libraries/matrix-sdk-crypto-nodejs/generic.nix index 63e9861421ab..c0b068499cd3 100644 --- a/pkgs/development/libraries/matrix-sdk-crypto-nodejs/generic.nix +++ b/pkgs/development/libraries/matrix-sdk-crypto-nodejs/generic.nix @@ -29,7 +29,7 @@ stdenv.mkDerivation rec { nodejs ]; - buildInputs = lib.optionals stdenv.isDarwin [ libiconv ]; + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ libiconv ]; buildPhase = '' runHook preBuild diff --git a/pkgs/development/libraries/medfile/default.nix b/pkgs/development/libraries/medfile/default.nix index 8c07b2aad31a..296317788d21 100644 --- a/pkgs/development/libraries/medfile/default.nix +++ b/pkgs/development/libraries/medfile/default.nix @@ -19,7 +19,7 @@ stdenv.mkDerivation (finalAttrs: { substituteInPlace src/*/*.c --replace-warn \ "#if H5_VERS_MINOR > 12" \ "#if H5_VERS_MINOR > 14" - '' + lib.optionalString stdenv.isDarwin '' + '' + lib.optionalString stdenv.hostPlatform.isDarwin '' # Some medfile test files #define _a, which # breaks system header files that use _a as a function parameter substituteInPlace tests/c/*.c \ diff --git a/pkgs/development/libraries/memorymapping/default.nix b/pkgs/development/libraries/memorymapping/default.nix index 91af205f0320..1b3c17bc4f8c 100644 --- a/pkgs/development/libraries/memorymapping/default.nix +++ b/pkgs/development/libraries/memorymapping/default.nix @@ -40,6 +40,6 @@ stdenv.mkDerivation { # Uses BSD-style funopen() to implement glibc-style fmemopen(). # Add more BSDs if you need to. platforms = platforms.darwin; - broken = stdenv.isAarch64; + broken = stdenv.hostPlatform.isAarch64; }; } diff --git a/pkgs/development/libraries/mesa-glu/default.nix b/pkgs/development/libraries/mesa-glu/default.nix index 138e7f247c13..bbcc0bb99a0e 100644 --- a/pkgs/development/libraries/mesa-glu/default.nix +++ b/pkgs/development/libraries/mesa-glu/default.nix @@ -21,7 +21,7 @@ stdenv.mkDerivation (finalAttrs: { outputs = [ "out" "dev" ]; - mesonFlags = lib.optionals stdenv.isDarwin [ + mesonFlags = lib.optionals stdenv.hostPlatform.isDarwin [ "-Dgl_provider=gl" # glvnd is default ]; diff --git a/pkgs/development/libraries/mesa/default.nix b/pkgs/development/libraries/mesa/default.nix index 94a72143a71f..80eacadd879d 100644 --- a/pkgs/development/libraries/mesa/default.nix +++ b/pkgs/development/libraries/mesa/default.nix @@ -55,13 +55,13 @@ "svga" # VMWare virtualized GPU "virgl" # QEMU virtualized GPU (aka VirGL) "zink" # generic OpenGL over Vulkan, experimental - ] ++ lib.optionals (stdenv.isAarch64 || stdenv.isAarch32) [ + ] ++ lib.optionals (stdenv.hostPlatform.isAarch64 || stdenv.hostPlatform.isAarch32) [ "etnaviv" # Vivante GPU designs (mostly NXP/Marvell SoCs) "freedreno" # Qualcomm Adreno (all Qualcomm SoCs) "lima" # ARM Mali 4xx "panfrost" # ARM Mali Midgard and up (T/G series) "vc4" # Broadcom VC4 (Raspberry Pi 0-3) - ] ++ lib.optionals stdenv.isAarch64 [ + ] ++ lib.optionals stdenv.hostPlatform.isAarch64 [ "tegra" # Nvidia Tegra SoCs "v3d" # Broadcom VC5 (Raspberry Pi 4) ] ++ lib.optionals stdenv.hostPlatform.isx86 [ @@ -78,7 +78,7 @@ # QEMU virtualized GPU (aka VirGL) # Requires ATOMIC_INT_LOCK_FREE == 2. "virtio" - ] ++ lib.optionals stdenv.isAarch64 [ + ] ++ lib.optionals stdenv.hostPlatform.isAarch64 [ "broadcom" # Broadcom VC5 (Raspberry Pi 4, aka V3D) "freedreno" # Qualcomm Adreno (all Qualcomm SoCs) "imagination-experimental" # PowerVR Rogue (currently N/A) @@ -203,7 +203,7 @@ in stdenv.mkDerivation { # Enable Intel RT stuff when available (lib.mesonBool "install-intel-clc" true) - (lib.mesonEnable "intel-rt" stdenv.isx86_64) + (lib.mesonEnable "intel-rt" stdenv.hostPlatform.isx86_64) (lib.mesonOption "clang-libdir" "${llvmPackages.clang-unwrapped.lib}/lib") # Clover, old OpenCL frontend diff --git a/pkgs/development/libraries/mimalloc/default.nix b/pkgs/development/libraries/mimalloc/default.nix index 29fd2b662e69..e8259541c27a 100644 --- a/pkgs/development/libraries/mimalloc/default.nix +++ b/pkgs/development/libraries/mimalloc/default.nix @@ -18,7 +18,7 @@ stdenv.mkDerivation rec { doCheck = !stdenv.hostPlatform.isStatic; preCheck = let - ldLibraryPathEnv = if stdenv.isDarwin then "DYLD_LIBRARY_PATH" else "LD_LIBRARY_PATH"; + ldLibraryPathEnv = if stdenv.hostPlatform.isDarwin then "DYLD_LIBRARY_PATH" else "LD_LIBRARY_PATH"; in '' export ${ldLibraryPathEnv}="$(pwd)/build:''${${ldLibraryPathEnv}}" ''; @@ -32,7 +32,7 @@ stdenv.mkDerivation rec { postInstall = let rel = lib.versions.majorMinor version; - suffix = if stdenv.isLinux then "${soext}.${rel}" else ".${rel}${soext}"; + suffix = if stdenv.hostPlatform.isLinux then "${soext}.${rel}" else ".${rel}${soext}"; in '' # first, move headers and cmake files, that's easy mkdir -p $dev/lib diff --git a/pkgs/development/libraries/mimetic/default.nix b/pkgs/development/libraries/mimetic/default.nix index 668b2fdf10c9..33b6e1b8cae8 100644 --- a/pkgs/development/libraries/mimetic/default.nix +++ b/pkgs/development/libraries/mimetic/default.nix @@ -17,7 +17,7 @@ stdenv.mkDerivation rec { url = "https://github.com/tat/mimetic/commit/bf84940f9021950c80846e6b1a5f8b0b55991b00.patch"; sha256 = "sha256-1JW9zPg67BgNsdIjK/jp9j7QMg50eRMz5FsDsbbzBlI="; }) - ] ++ lib.optional stdenv.isAarch64 ./narrowing.patch; + ] ++ lib.optional stdenv.hostPlatform.isAarch64 ./narrowing.patch; meta = with lib; { description = "MIME handling library"; diff --git a/pkgs/development/libraries/minixml/default.nix b/pkgs/development/libraries/minixml/default.nix index ebb0f2889738..3438cb9290b6 100644 --- a/pkgs/development/libraries/minixml/default.nix +++ b/pkgs/development/libraries/minixml/default.nix @@ -12,7 +12,7 @@ stdenv.mkDerivation rec { }; # remove the -arch flags which are set by default in the build - configureFlags = lib.optionals stdenv.isDarwin [ + configureFlags = lib.optionals stdenv.hostPlatform.isDarwin [ "--with-archflags=\"-mmacosx-version-min=10.14\"" ]; diff --git a/pkgs/development/libraries/minizip-ng/default.nix b/pkgs/development/libraries/minizip-ng/default.nix index fde280137e74..b15997cb436b 100644 --- a/pkgs/development/libraries/minizip-ng/default.nix +++ b/pkgs/development/libraries/minizip-ng/default.nix @@ -31,7 +31,7 @@ stdenv.mkDerivation (finalAttrs: { "-DMZ_BUILD_TESTS=${if finalAttrs.finalPackage.doCheck then "ON" else "OFF"}" "-DMZ_BUILD_UNIT_TESTS=${if finalAttrs.finalPackage.doCheck then "ON" else "OFF"}" "-DMZ_LIB_SUFFIX='-ng'" - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ # missing header file "-DMZ_LIBCOMP=OFF" ]; diff --git a/pkgs/development/libraries/mlt/default.nix b/pkgs/development/libraries/mlt/default.nix index 2ca4e6b46dc1..d1cd9d068913 100644 --- a/pkgs/development/libraries/mlt/default.nix +++ b/pkgs/development/libraries/mlt/default.nix @@ -23,7 +23,7 @@ , darwin , cudaSupport ? config.cudaSupport , cudaPackages ? { } -, enableJackrack ? stdenv.isLinux +, enableJackrack ? stdenv.hostPlatform.isLinux , glib , ladspa-sdk , ladspaPlugins @@ -31,7 +31,7 @@ , python3 , swig , qt ? null -, enableSDL1 ? stdenv.isLinux +, enableSDL1 ? stdenv.hostPlatform.isLinux , SDL , enableSDL2 ? true , SDL2 @@ -83,7 +83,7 @@ stdenv.mkDerivation rec { rubberband sox vid-stab - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk_11_0.frameworks.Accelerate ] ++ lib.optionals cudaSupport [ cudaPackages.cuda_cudart diff --git a/pkgs/development/libraries/mongoc/default.nix b/pkgs/development/libraries/mongoc/default.nix index 802226c46f8a..fc967445d01c 100644 --- a/pkgs/development/libraries/mongoc/default.nix +++ b/pkgs/development/libraries/mongoc/default.nix @@ -35,7 +35,7 @@ stdenv.mkDerivation rec { icu cyrus_sasl snappy - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk_11_0.frameworks.Security ]; diff --git a/pkgs/development/libraries/mongocxx/default.nix b/pkgs/development/libraries/mongocxx/default.nix index 5659043e2f62..415e7ca96e3a 100644 --- a/pkgs/development/libraries/mongocxx/default.nix +++ b/pkgs/development/libraries/mongocxx/default.nix @@ -10,7 +10,7 @@ , darwin }: -let stdenv = if pkgs.stdenv.isDarwin then darwin.apple_sdk_11_0.stdenv else pkgs.stdenv; in +let stdenv = if pkgs.stdenv.hostPlatform.isDarwin then darwin.apple_sdk_11_0.stdenv else pkgs.stdenv; in stdenv.mkDerivation (finalAttrs: { pname = "mongocxx"; @@ -38,7 +38,7 @@ stdenv.mkDerivation (finalAttrs: { mongoc openssl cyrus_sasl - ] ++ lib.optional stdenv.isDarwin darwin.apple_sdk.frameworks.Security; + ] ++ lib.optional stdenv.hostPlatform.isDarwin darwin.apple_sdk.frameworks.Security; cmakeFlags = [ "-DCMAKE_CXX_STANDARD=20" diff --git a/pkgs/development/libraries/movit/default.nix b/pkgs/development/libraries/movit/default.nix index d2cd26f38bf6..55a4ec26025a 100644 --- a/pkgs/development/libraries/movit/default.nix +++ b/pkgs/development/libraries/movit/default.nix @@ -31,7 +31,7 @@ stdenv.mkDerivation rec { SDL2 fftw gtest - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.OpenGL darwin.libobjc ]; @@ -41,7 +41,7 @@ stdenv.mkDerivation rec { libepoxy ]; - env = lib.optionalAttrs stdenv.isDarwin { + env = lib.optionalAttrs stdenv.hostPlatform.isDarwin { NIX_LDFLAGS = "-framework OpenGL"; }; diff --git a/pkgs/development/libraries/mpich/default.nix b/pkgs/development/libraries/mpich/default.nix index a4716a47bb1b..4af559b50758 100644 --- a/pkgs/development/libraries/mpich/default.nix +++ b/pkgs/development/libraries/mpich/default.nix @@ -44,12 +44,12 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ gfortran python3 ]; buildInputs = [ perl openssh hwloc ] - ++ lib.optional (!stdenv.isDarwin) ch4backend + ++ lib.optional (!stdenv.hostPlatform.isDarwin) ch4backend ++ lib.optional pmixSupport pmix - ++ lib.optional stdenv.isDarwin darwin.apple_sdk.frameworks.Foundation; + ++ lib.optional stdenv.hostPlatform.isDarwin darwin.apple_sdk.frameworks.Foundation; # test_double_serializer.test fails on darwin - doCheck = !stdenv.isDarwin; + doCheck = !stdenv.hostPlatform.isDarwin; preFixup = '' # Ensure the default compilers are the ones mpich was built with diff --git a/pkgs/development/libraries/mpir/default.nix b/pkgs/development/libraries/mpir/default.nix index 26f22fd9968f..9857317ea188 100644 --- a/pkgs/development/libraries/mpir/default.nix +++ b/pkgs/development/libraries/mpir/default.nix @@ -23,7 +23,7 @@ stdenv.mkDerivation rec { ]; configureFlags = [ "--enable-cxx" ] - ++ lib.optionals stdenv.isLinux [ "--enable-fat" ]; + ++ lib.optionals stdenv.hostPlatform.isLinux [ "--enable-fat" ]; meta = { description = "Highly optimised library for bignum arithmetic forked from GMP"; diff --git a/pkgs/development/libraries/mvfst/default.nix b/pkgs/development/libraries/mvfst/default.nix index 0a784fff339a..7c9d2e8da445 100644 --- a/pkgs/development/libraries/mvfst/default.nix +++ b/pkgs/development/libraries/mvfst/default.nix @@ -23,7 +23,7 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ cmake ]; - cmakeFlags = lib.optionals stdenv.isDarwin [ + cmakeFlags = lib.optionals stdenv.hostPlatform.isDarwin [ "-DCMAKE_OSX_DEPLOYMENT_TARGET=10.14" # For aligned allocation ]; diff --git a/pkgs/development/libraries/mygui/default.nix b/pkgs/development/libraries/mygui/default.nix index c785e640ccb0..d52eadbba6cd 100644 --- a/pkgs/development/libraries/mygui/default.nix +++ b/pkgs/development/libraries/mygui/default.nix @@ -45,12 +45,12 @@ stdenv.mkDerivation rec { ois ] ++ lib.optionals withOgre [ ogre - ] ++ lib.optionals (!withOgre && stdenv.isLinux) [ + ] ++ lib.optionals (!withOgre && stdenv.hostPlatform.isLinux) [ libGL libGLU - ] ++ lib.optionals stdenv.isLinux [ + ] ++ lib.optionals stdenv.hostPlatform.isLinux [ libX11 - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ Cocoa ]; diff --git a/pkgs/development/libraries/ncnn/default.nix b/pkgs/development/libraries/ncnn/default.nix index ae82d0490be4..f431133c2505 100644 --- a/pkgs/development/libraries/ncnn/default.nix +++ b/pkgs/development/libraries/ncnn/default.nix @@ -35,7 +35,7 @@ stdenv.mkDerivation rec { "-DNCNN_PYTHON=0" # Should be an attribute ] # Requires setting `Vulkan_LIBRARY` on Darwin. Otherwise the build fails due to missing symbols. - ++ lib.optionals stdenv.isDarwin [ "-DVulkan_LIBRARY=-lvulkan" ]; + ++ lib.optionals stdenv.hostPlatform.isDarwin [ "-DVulkan_LIBRARY=-lvulkan" ]; nativeBuildInputs = [ cmake ]; buildInputs = [ vulkan-headers vulkan-loader glslang opencv protobuf ]; diff --git a/pkgs/development/libraries/nco/default.nix b/pkgs/development/libraries/nco/default.nix index 1b5dced4e81a..3affdfbf5743 100644 --- a/pkgs/development/libraries/nco/default.nix +++ b/pkgs/development/libraries/nco/default.nix @@ -47,7 +47,7 @@ stdenv.mkDerivation (finalAttrs: { --replace "/bin/mv" "${coreutils}/bin/mv" ''; - makeFlags = lib.optionals stdenv.isDarwin [ "LIBTOOL=${libtool}/bin/libtool" ]; + makeFlags = lib.optionals stdenv.hostPlatform.isDarwin [ "LIBTOOL=${libtool}/bin/libtool" ]; enableParallelBuilding = true; diff --git a/pkgs/development/libraries/ncurses/default.nix b/pkgs/development/libraries/ncurses/default.nix index 95b427a7bad3..2a4e89d7f3df 100644 --- a/pkgs/development/libraries/ncurses/default.nix +++ b/pkgs/development/libraries/ncurses/default.nix @@ -65,7 +65,7 @@ stdenv.mkDerivation (finalAttrs: { ]); # Only the C compiler, and explicitly not C++ compiler needs this flag on solaris: - CFLAGS = lib.optionalString stdenv.isSunOS "-D_XOPEN_SOURCE_EXTENDED"; + CFLAGS = lib.optionalString stdenv.hostPlatform.isSunOS "-D_XOPEN_SOURCE_EXTENDED"; strictDeps = true; @@ -77,7 +77,7 @@ stdenv.mkDerivation (finalAttrs: { ncurses ]; - buildInputs = lib.optional (mouseSupport && stdenv.isLinux) gpm; + buildInputs = lib.optional (mouseSupport && stdenv.hostPlatform.isLinux) gpm; preConfigure = '' export PKG_CONFIG_LIBDIR="$dev/lib/pkgconfig" @@ -90,7 +90,7 @@ stdenv.mkDerivation (finalAttrs: { "--with-pkg-config-libdir=$PKG_CONFIG_LIBDIR" ) '' - + lib.optionalString stdenv.isSunOS '' + + lib.optionalString stdenv.hostPlatform.isSunOS '' sed -i -e '/-D__EXTENSIONS__/ s/-D_XOPEN_SOURCE=\$cf_XOPEN_SOURCE//' \ -e '/CPPFLAGS="$CPPFLAGS/s/ -D_XOPEN_SOURCE_EXTENDED//' \ configure @@ -102,7 +102,7 @@ stdenv.mkDerivation (finalAttrs: { doCheck = false; postFixup = let - abiVersion-extension = if stdenv.isDarwin then "${abiVersion}.$dylibtype" else "$dylibtype.${abiVersion}"; in + abiVersion-extension = if stdenv.hostPlatform.isDarwin then "${abiVersion}.$dylibtype" else "$dylibtype.${abiVersion}"; in '' # Determine what suffixes our libraries have suffix="$(awk -F': ' 'f{print $3; f=0} /default library suffix/{f=1}' config.log)" diff --git a/pkgs/development/libraries/ndi/default.nix b/pkgs/development/libraries/ndi/default.nix index b691f2b10afa..78a4f808b4c3 100644 --- a/pkgs/development/libraries/ndi/default.nix +++ b/pkgs/development/libraries/ndi/default.nix @@ -3,10 +3,10 @@ let versionJSON = lib.importJSON ./version.json; ndiPlatform = - if stdenv.isAarch64 then "aarch64-rpi4-linux-gnueabi" - else if stdenv.isAarch32 then "arm-rpi2-linux-gnueabihf" - else if stdenv.isx86_64 then "x86_64-linux-gnu" - else if stdenv.isi686 then "i686-linux-gnu" + if stdenv.hostPlatform.isAarch64 then "aarch64-rpi4-linux-gnueabi" + else if stdenv.hostPlatform.isAarch32 then "arm-rpi2-linux-gnueabihf" + else if stdenv.hostPlatform.isx86_64 then "x86_64-linux-gnu" + else if stdenv.hostPlatform.isi686 then "i686-linux-gnu" else throw "unsupported platform for NDI SDK"; in stdenv.mkDerivation rec { diff --git a/pkgs/development/libraries/neon/default.nix b/pkgs/development/libraries/neon/default.nix index 3185ff4158ee..6bff584ddaef 100644 --- a/pkgs/development/libraries/neon/default.nix +++ b/pkgs/development/libraries/neon/default.nix @@ -23,7 +23,7 @@ stdenv.mkDerivation rec { sha256 = "sha256-SHLhL4Alct7dSwL4cAZYFLLVFB99va9wju2rgmtRpYo="; }; - patches = optionals stdenv.isDarwin [ ./darwin-fix-configure.patch ]; + patches = optionals stdenv.hostPlatform.isDarwin [ ./darwin-fix-configure.patch ]; nativeBuildInputs = [ pkg-config ]; buildInputs = [libxml2 openssl bash] diff --git a/pkgs/development/libraries/netcdf-cxx4/default.nix b/pkgs/development/libraries/netcdf-cxx4/default.nix index 08f812a272a2..606e8a86b0c3 100644 --- a/pkgs/development/libraries/netcdf-cxx4/default.nix +++ b/pkgs/development/libraries/netcdf-cxx4/default.nix @@ -34,6 +34,6 @@ stdenv.mkDerivation rec { homepage = "https://www.unidata.ucar.edu/software/netcdf/"; license = lib.licenses.free; platforms = lib.platforms.unix; - broken = stdenv.isDarwin; + broken = stdenv.hostPlatform.isDarwin; }; } diff --git a/pkgs/development/libraries/netcdf-fortran/default.nix b/pkgs/development/libraries/netcdf-fortran/default.nix index 0edc956eee60..d9a80768bb61 100644 --- a/pkgs/development/libraries/netcdf-fortran/default.nix +++ b/pkgs/development/libraries/netcdf-fortran/default.nix @@ -12,12 +12,12 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ gfortran ]; buildInputs = [ netcdf hdf5 curl ] - ++ lib.optionals stdenv.isDarwin [ + ++ lib.optionals stdenv.hostPlatform.isDarwin [ CoreFoundation CoreServices SystemConfiguration ]; - env.NIX_LDFLAGS = toString (lib.optionals stdenv.isDarwin [ + env.NIX_LDFLAGS = toString (lib.optionals stdenv.hostPlatform.isDarwin [ "-F${CoreServices}/Library/Frameworks" "-F${SystemConfiguration}/Library/Frameworks" ]); diff --git a/pkgs/development/libraries/nettle/generic.nix b/pkgs/development/libraries/nettle/generic.nix index 44afdf45513f..b1cf1f5f6bfe 100644 --- a/pkgs/development/libraries/nettle/generic.nix +++ b/pkgs/development/libraries/nettle/generic.nix @@ -23,9 +23,9 @@ stdenv.mkDerivation { # /usr/include/mp.h from OpenSolaris. See # # for details. - ++ lib.optional stdenv.isSunOS "--with-include-path=${gmp.dev}/include"; + ++ lib.optional stdenv.hostPlatform.isSunOS "--with-include-path=${gmp.dev}/include"; - doCheck = (stdenv.hostPlatform.system != "i686-cygwin" && !stdenv.isDarwin); + doCheck = (stdenv.hostPlatform.system != "i686-cygwin" && !stdenv.hostPlatform.isDarwin); enableParallelBuilding = true; diff --git a/pkgs/development/libraries/newt/default.nix b/pkgs/development/libraries/newt/default.nix index 15a834709806..d8adcf63b19d 100644 --- a/pkgs/development/libraries/newt/default.nix +++ b/pkgs/development/libraries/newt/default.nix @@ -36,7 +36,7 @@ stdenv.mkDerivation rec { unset CPP ''; - configureFlags = lib.optionals stdenv.isDarwin [ + configureFlags = lib.optionals stdenv.hostPlatform.isDarwin [ "--disable-nls" ]; @@ -44,7 +44,7 @@ stdenv.mkDerivation rec { "CROSS_COMPILE=${stdenv.cc.targetPrefix}" ]; - postFixup = lib.optionalString stdenv.isDarwin '' + postFixup = lib.optionalString stdenv.hostPlatform.isDarwin '' install_name_tool -id $out/lib/libnewt.so.${version} $out/lib/libnewt.so.${version} install_name_tool -change libnewt.so.${version} $out/lib/libnewt.so.${version} $out/bin/whiptail ''; diff --git a/pkgs/development/libraries/nghttp2/default.nix b/pkgs/development/libraries/nghttp2/default.nix index fbe3e2a92f15..19265cbe1608 100644 --- a/pkgs/development/libraries/nghttp2/default.nix +++ b/pkgs/development/libraries/nghttp2/default.nix @@ -60,7 +60,7 @@ stdenv.mkDerivation rec { (lib.enableFeature enableHttp3 "http3") ]; - env.NIX_CFLAGS_COMPILE = toString (lib.optionals (stdenv.isDarwin && lib.versionOlder stdenv.hostPlatform.darwinMinVersion "10.13") [ + env.NIX_CFLAGS_COMPILE = toString (lib.optionals (stdenv.hostPlatform.isDarwin && lib.versionOlder stdenv.hostPlatform.darwinMinVersion "10.13") [ "-faligned-allocation" ]); diff --git a/pkgs/development/libraries/nghttp3/default.nix b/pkgs/development/libraries/nghttp3/default.nix index 2a264dbe6c46..a32538560177 100644 --- a/pkgs/development/libraries/nghttp3/default.nix +++ b/pkgs/development/libraries/nghttp3/default.nix @@ -19,7 +19,7 @@ stdenv.mkDerivation rec { outputs = [ "out" "dev" "doc" ]; nativeBuildInputs = [ cmake ]; - buildInputs = lib.optionals stdenv.isDarwin [ + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ CoreServices ]; diff --git a/pkgs/development/libraries/ngtcp2/default.nix b/pkgs/development/libraries/ngtcp2/default.nix index 8e17a3394dc3..aa5ebc6fbb8b 100644 --- a/pkgs/development/libraries/ngtcp2/default.nix +++ b/pkgs/development/libraries/ngtcp2/default.nix @@ -26,7 +26,7 @@ stdenv.mkDerivation rec { libev nghttp3 quictls - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ CoreServices ] ++ lib.optional withJemalloc jemalloc; diff --git a/pkgs/development/libraries/ngtcp2/gnutls.nix b/pkgs/development/libraries/ngtcp2/gnutls.nix index 1cf06ecb837f..31f69e82198f 100644 --- a/pkgs/development/libraries/ngtcp2/gnutls.nix +++ b/pkgs/development/libraries/ngtcp2/gnutls.nix @@ -25,7 +25,7 @@ stdenv.mkDerivation rec { doCheck = true; nativeCheckInputs = [ cunit ] - ++ lib.optional stdenv.isDarwin ncurses; + ++ lib.optional stdenv.hostPlatform.isDarwin ncurses; passthru.tests = knot-dns.passthru.tests; # the only consumer so far diff --git a/pkgs/development/libraries/nlopt/default.nix b/pkgs/development/libraries/nlopt/default.nix index 2fae17a23236..4995d98adca7 100644 --- a/pkgs/development/libraries/nlopt/default.nix +++ b/pkgs/development/libraries/nlopt/default.nix @@ -11,7 +11,7 @@ stdenv.mkDerivation rec { sha256 = "sha256-TgieCX7yUdTAEblzXY/gCN0r6F9TVDh4RdNDjQdXZ1o="; }; - nativeBuildInputs = [ cmake ] ++ lib.optionals stdenv.isDarwin [ libiconv ]; + nativeBuildInputs = [ cmake ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ libiconv ]; buildInputs = [ octave ]; configureFlags = [ diff --git a/pkgs/development/libraries/nspr/default.nix b/pkgs/development/libraries/nspr/default.nix index 586c4ddb94fc..efea4a4cc81f 100644 --- a/pkgs/development/libraries/nspr/default.nix +++ b/pkgs/development/libraries/nspr/default.nix @@ -24,7 +24,7 @@ stdenv.mkDerivation rec { preConfigure = '' cd nspr - '' + lib.optionalString stdenv.isDarwin '' + '' + lib.optionalString stdenv.hostPlatform.isDarwin '' substituteInPlace configure --replace '@executable_path/' "$out/lib/" substituteInPlace configure.in --replace '@executable_path/' "$out/lib/" ''; @@ -34,14 +34,14 @@ stdenv.mkDerivation rec { configureFlags = [ "--enable-optimize" "--disable-debug" - ] ++ lib.optional stdenv.is64bit "--enable-64bit"; + ] ++ lib.optional stdenv.hostPlatform.is64bit "--enable-64bit"; postInstall = '' find $out -name "*.a" -delete moveToOutput share "$dev" # just aclocal ''; - buildInputs = lib.optionals stdenv.isDarwin [ CoreServices ]; + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ CoreServices ]; enableParallelBuilding = true; diff --git a/pkgs/development/libraries/nss/generic.nix b/pkgs/development/libraries/nss/generic.nix index 7ef488cca4c1..9e54ddda866f 100644 --- a/pkgs/development/libraries/nss/generic.nix +++ b/pkgs/development/libraries/nss/generic.nix @@ -93,7 +93,7 @@ stdenv.mkDerivation rec { --enable-libpkix \ -j $NIX_BUILD_CORES \ ${lib.optionalString enableFIPS "--enable-fips"} \ - ${lib.optionalString stdenv.isDarwin "--clang"} \ + ${lib.optionalString stdenv.hostPlatform.isDarwin "--clang"} \ ${lib.optionalString (stdenv.hostPlatform != stdenv.buildPlatform) "--disable-tests"} runHook postBuild @@ -155,7 +155,7 @@ stdenv.mkDerivation rec { (lib.optionalString enableFIPS ('' for libname in freebl3 nssdbm3 softokn3 do libfile="$out/lib/lib$libname${stdenv.hostPlatform.extensions.sharedLibrary}"'' + - (if stdenv.isDarwin + (if stdenv.hostPlatform.isDarwin then '' DYLD_LIBRARY_PATH=$out/lib:${nspr.out}/lib \ '' else '' diff --git a/pkgs/development/libraries/nss_wrapper/default.nix b/pkgs/development/libraries/nss_wrapper/default.nix index 9bec1886abb6..378ebf54c1f7 100644 --- a/pkgs/development/libraries/nss_wrapper/default.nix +++ b/pkgs/development/libraries/nss_wrapper/default.nix @@ -17,6 +17,6 @@ stdenv.mkDerivation rec { homepage = "https://git.samba.org/?p=nss_wrapper.git;a=summary;"; license = licenses.bsd3; platforms = platforms.unix; - broken = stdenv.isDarwin; + broken = stdenv.hostPlatform.isDarwin; }; } diff --git a/pkgs/development/libraries/ntbtls/default.nix b/pkgs/development/libraries/ntbtls/default.nix index e04d2ae43537..e1726a874fcd 100644 --- a/pkgs/development/libraries/ntbtls/default.nix +++ b/pkgs/development/libraries/ntbtls/default.nix @@ -12,7 +12,7 @@ stdenv.mkDerivation rec { outputs = [ "dev" "out" ]; buildInputs = [ libgcrypt libgpg-error libksba zlib ] - ++ lib.optional stdenv.isDarwin gettext; + ++ lib.optional stdenv.hostPlatform.isDarwin gettext; postInstall = '' moveToOutput "bin/ntbtls-config" $dev diff --git a/pkgs/development/libraries/numcpp/default.nix b/pkgs/development/libraries/numcpp/default.nix index b8dea0f3662b..34dd82c15076 100644 --- a/pkgs/development/libraries/numcpp/default.nix +++ b/pkgs/development/libraries/numcpp/default.nix @@ -29,7 +29,7 @@ stdenv.mkDerivation (finalAttrs: { "-DBUILD_MULTIPLE_TEST=ON" ]; - doCheck = !stdenv.isDarwin && !stdenv.hostPlatform.isStatic; + doCheck = !stdenv.hostPlatform.isDarwin && !stdenv.hostPlatform.isStatic; postInstall = '' substituteInPlace $out/share/NumCpp/cmake/NumCppConfig.cmake \ diff --git a/pkgs/development/libraries/oatpp/default.nix b/pkgs/development/libraries/oatpp/default.nix index 54e821b17848..10b44bdac572 100644 --- a/pkgs/development/libraries/oatpp/default.nix +++ b/pkgs/development/libraries/oatpp/default.nix @@ -17,7 +17,7 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ cmake ]; # Tests fail on darwin. See https://github.com/NixOS/nixpkgs/pull/105419#issuecomment-735826894 - doCheck = !stdenv.isDarwin; + doCheck = !stdenv.hostPlatform.isDarwin; meta = with lib; { homepage = "https://oatpp.io/"; diff --git a/pkgs/development/libraries/ode/default.nix b/pkgs/development/libraries/ode/default.nix index 8b426654147f..2906c3428342 100644 --- a/pkgs/development/libraries/ode/default.nix +++ b/pkgs/development/libraries/ode/default.nix @@ -13,7 +13,7 @@ stdenv.mkDerivation (finalAttrs: { hash = "sha256-uode3RZFcJWHle6qcPFIU7/DTMmHH4rd6NpH4SvVRnk="; }; - buildInputs = lib.optionals stdenv.isDarwin [ + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.CoreServices darwin.apple_sdk.frameworks.GLUT ]; diff --git a/pkgs/development/libraries/odpic/default.nix b/pkgs/development/libraries/odpic/default.nix index 92b943dbdf2f..831c8a4e2afd 100644 --- a/pkgs/development/libraries/odpic/default.nix +++ b/pkgs/development/libraries/odpic/default.nix @@ -17,19 +17,19 @@ stdenv.mkDerivation { sha256 = "sha256-Ez9B89I008YMu1s/8J0V4bydkooth+O5846Fmwl4FsA="; }; - nativeBuildInputs = lib.optional stdenv.isDarwin fixDarwinDylibNames; + nativeBuildInputs = lib.optional stdenv.hostPlatform.isDarwin fixDarwinDylibNames; buildInputs = [ oracle-instantclient ] - ++ lib.optionals stdenv.isLinux [ libaio ]; + ++ lib.optionals stdenv.hostPlatform.isLinux [ libaio ]; dontPatchELF = true; makeFlags = [ "PREFIX=$(out)" "CC=${stdenv.cc.targetPrefix}cc" "LD=${stdenv.cc.targetPrefix}cc" ]; postFixup = '' - ${lib.optionalString (stdenv.isLinux) '' + ${lib.optionalString (stdenv.hostPlatform.isLinux) '' patchelf --set-rpath "${libPath}:$(patchelf --print-rpath $out/lib/libodpic${stdenv.hostPlatform.extensions.sharedLibrary})" $out/lib/libodpic${stdenv.hostPlatform.extensions.sharedLibrary} ''} - ${lib.optionalString (stdenv.isDarwin) '' + ${lib.optionalString (stdenv.hostPlatform.isDarwin) '' install_name_tool -add_rpath "${libPath}" $out/lib/libodpic${stdenv.hostPlatform.extensions.sharedLibrary} ''} ''; diff --git a/pkgs/development/libraries/ogre/default.nix b/pkgs/development/libraries/ogre/default.nix index c977348e587a..0643fabdd8c6 100644 --- a/pkgs/development/libraries/ogre/default.nix +++ b/pkgs/development/libraries/ogre/default.nix @@ -74,7 +74,7 @@ let ois pugixml zziplib - ] ++ lib.optionals stdenv.isLinux [ + ] ++ lib.optionals stdenv.hostPlatform.isLinux [ libglut libGL libGLU @@ -88,7 +88,7 @@ let libXt libXxf86vm xorgproto - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.Cocoa ] ++ lib.optionals withNvidiaCg [ nvidia_cg_toolkit @@ -97,7 +97,7 @@ let cmakeFlags = [ (lib.cmakeBool "OGRE_BUILD_DEPENDENCIES" false) (lib.cmakeBool "OGRE_BUILD_SAMPLES" withSamples) - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ (lib.cmakeBool "OGRE_BUILD_LIBS_AS_FRAMEWORKS" false) ]; diff --git a/pkgs/development/libraries/ois/default.nix b/pkgs/development/libraries/ois/default.nix index 0a384b03bb2a..435509dee216 100644 --- a/pkgs/development/libraries/ois/default.nix +++ b/pkgs/development/libraries/ois/default.nix @@ -13,8 +13,8 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ cmake ]; - buildInputs = lib.optionals stdenv.isLinux [ libX11 ] - ++ lib.optionals stdenv.isDarwin [ Cocoa IOKit Kernel ]; + buildInputs = lib.optionals stdenv.hostPlatform.isLinux [ libX11 ] + ++ lib.optionals stdenv.hostPlatform.isDarwin [ Cocoa IOKit Kernel ]; cmakeFlags = [ "-DCMAKE_INSTALL_LIBDIR=lib" diff --git a/pkgs/development/libraries/okapi/default.nix b/pkgs/development/libraries/okapi/default.nix index b7a75ad6d1b9..06f980e718c8 100644 --- a/pkgs/development/libraries/okapi/default.nix +++ b/pkgs/development/libraries/okapi/default.nix @@ -12,7 +12,7 @@ rustPlatform.buildRustPackage rec { cargoVendorDir = "vendor"; doCheck = false; - buildInputs = lib.optionals stdenv.isDarwin [ Security ]; + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ Security ]; postInstall = '' cp -r include $out diff --git a/pkgs/development/libraries/omorfi/default.nix b/pkgs/development/libraries/omorfi/default.nix index 6002ea464673..9360b0fdd104 100644 --- a/pkgs/development/libraries/omorfi/default.nix +++ b/pkgs/development/libraries/omorfi/default.nix @@ -87,6 +87,6 @@ stdenv.mkDerivation (finalAttrs: { license = licenses.gpl3; maintainers = with maintainers; [ lurkki ]; # Darwin build fails due to hfst not being found - broken = stdenv.isDarwin; + broken = stdenv.hostPlatform.isDarwin; }; }) diff --git a/pkgs/development/libraries/onnxruntime/default.nix b/pkgs/development/libraries/onnxruntime/default.nix index bb344664e659..9ac43cc4b1d3 100644 --- a/pkgs/development/libraries/onnxruntime/default.nix +++ b/pkgs/development/libraries/onnxruntime/default.nix @@ -149,7 +149,7 @@ effectiveStdenv.mkDerivation rec { numpy pybind11 packaging - ]) ++ lib.optionals effectiveStdenv.isDarwin [ + ]) ++ lib.optionals effectiveStdenv.hostPlatform.isDarwin [ Foundation libiconv ] ++ lib.optionals cudaSupport (with cudaPackages; [ diff --git a/pkgs/development/libraries/openal-soft/default.nix b/pkgs/development/libraries/openal-soft/default.nix index 496b7ac60fe0..15a33af177ce 100644 --- a/pkgs/development/libraries/openal-soft/default.nix +++ b/pkgs/development/libraries/openal-soft/default.nix @@ -1,8 +1,8 @@ { lib, stdenv, fetchFromGitHub, cmake, pkg-config, removeReferencesTo -, alsaSupport ? !stdenv.isDarwin, alsa-lib -, dbusSupport ? !stdenv.isDarwin, dbus -, pipewireSupport ? !stdenv.isDarwin, pipewire -, pulseSupport ? !stdenv.isDarwin, libpulseaudio +, alsaSupport ? !stdenv.hostPlatform.isDarwin, alsa-lib +, dbusSupport ? !stdenv.hostPlatform.isDarwin, dbus +, pipewireSupport ? !stdenv.hostPlatform.isDarwin, pipewire +, pulseSupport ? !stdenv.hostPlatform.isDarwin, libpulseaudio , CoreServices, AudioUnit, AudioToolbox }: @@ -35,7 +35,7 @@ stdenv.mkDerivation rec { ++ lib.optional dbusSupport dbus ++ lib.optional pipewireSupport pipewire ++ lib.optional pulseSupport libpulseaudio - ++ lib.optionals stdenv.isDarwin [ CoreServices AudioUnit AudioToolbox ]; + ++ lib.optionals stdenv.hostPlatform.isDarwin [ CoreServices AudioUnit AudioToolbox ]; cmakeFlags = [ # Automatically links dependencies without having to rely on dlopen, thus diff --git a/pkgs/development/libraries/openbsm/default.nix b/pkgs/development/libraries/openbsm/default.nix index f30fcac869f1..32d7bf074384 100644 --- a/pkgs/development/libraries/openbsm/default.nix +++ b/pkgs/development/libraries/openbsm/default.nix @@ -11,7 +11,7 @@ stdenv.mkDerivation rec { sha256 = "0b98359hd8mm585sh145ss828pg2y8vgz38lqrb7nypapiyqdnd1"; }; - patches = lib.optionals stdenv.isDarwin [ ./bsm-add-audit_token_to_pid.patch ]; + patches = lib.optionals stdenv.hostPlatform.isDarwin [ ./bsm-add-audit_token_to_pid.patch ]; preConfigure = lib.optionalString (lib.versionAtLeast stdenv.hostPlatform.darwinMinVersion "11") '' MACOSX_DEPLOYMENT_TARGET=10.16 diff --git a/pkgs/development/libraries/opencascade-occt/default.nix b/pkgs/development/libraries/opencascade-occt/default.nix index a09cacaf3928..e9f3e0794d33 100644 --- a/pkgs/development/libraries/opencascade-occt/default.nix +++ b/pkgs/development/libraries/opencascade-occt/default.nix @@ -37,7 +37,7 @@ stdenv.mkDerivation rec { libXext libXmu libXi - ] ++ lib.optional stdenv.isDarwin darwin.apple_sdk.frameworks.Cocoa; + ] ++ lib.optional stdenv.hostPlatform.isDarwin darwin.apple_sdk.frameworks.Cocoa; meta = with lib; { description = "Open CASCADE Technology, libraries for 3D modeling and numerical simulation"; diff --git a/pkgs/development/libraries/opencl-clang/default.nix b/pkgs/development/libraries/opencl-clang/default.nix index 341c3f3ecf57..a4d2f115cc67 100644 --- a/pkgs/development/libraries/opencl-clang/default.nix +++ b/pkgs/development/libraries/opencl-clang/default.nix @@ -73,7 +73,7 @@ let # fix not be able to find clang from PATH substituteInPlace cl_headers/CMakeLists.txt \ --replace " NO_DEFAULT_PATH" "" - '' + lib.optionalString stdenv.isDarwin '' + '' + lib.optionalString stdenv.hostPlatform.isDarwin '' # Uses linker flags that are not supported on Darwin. sed -i -e '/SET_LINUX_EXPORTS_FILE/d' CMakeLists.txt substituteInPlace CMakeLists.txt \ @@ -107,6 +107,6 @@ stdenv.mkDerivation { maintainers = [ ]; platforms = platforms.all; # error: invalid value 'CL3.0' in '-cl-std=CL3.0' - broken = stdenv.isDarwin; + broken = stdenv.hostPlatform.isDarwin; }; } diff --git a/pkgs/development/libraries/opencollada/default.nix b/pkgs/development/libraries/opencollada/default.nix index 6ecb76c0eed7..67f18a4a2718 100644 --- a/pkgs/development/libraries/opencollada/default.nix +++ b/pkgs/development/libraries/opencollada/default.nix @@ -24,7 +24,7 @@ stdenv.mkDerivation rec { ]; nativeBuildInputs = [ cmake pkg-config ]; - buildInputs = lib.optionals stdenv.isDarwin (with darwin.apple_sdk.frameworks; [ AGL ]); + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin (with darwin.apple_sdk.frameworks; [ AGL ]); propagatedBuildInputs = [ libxml2 pcre ]; @@ -32,7 +32,7 @@ stdenv.mkDerivation rec { # Drop blanket -Werror as it tends to fail on newer toolchain for # minor warnings. In this case it was gcc-13 build failure. substituteInPlace DAEValidator/CMakeLists.txt --replace-fail ' -Werror"' '"' - '' + lib.optionalString stdenv.isDarwin '' + '' + lib.optionalString stdenv.hostPlatform.isDarwin '' substituteInPlace GeneratedSaxParser/src/GeneratedSaxParserUtils.cpp \ --replace math.h cmath ''; diff --git a/pkgs/development/libraries/opencolorio/1.x.nix b/pkgs/development/libraries/opencolorio/1.x.nix index 63098028fc64..7d1839163efc 100644 --- a/pkgs/development/libraries/opencolorio/1.x.nix +++ b/pkgs/development/libraries/opencolorio/1.x.nix @@ -16,7 +16,7 @@ stdenv.mkDerivation rec { # TODO: Investigate whether git can be dropped: It's only used to apply patches nativeBuildInputs = [ cmake pkg-config git ]; - buildInputs = [ lcms2 tinyxml ] ++ lib.optional stdenv.isDarwin boost; + buildInputs = [ lcms2 tinyxml ] ++ lib.optional stdenv.hostPlatform.isDarwin boost; postPatch = '' substituteInPlace src/core/CMakeLists.txt --replace "-Werror" "" @@ -28,9 +28,9 @@ stdenv.mkDerivation rec { "-DUSE_EXTERNAL_TINYXML=ON" # External yaml-cpp 0.6.* not compatible: https://github.com/imageworks/OpenColorIO/issues/517 "-DUSE_EXTERNAL_YAML=OFF" - ] ++ lib.optional stdenv.isDarwin "-DOCIO_USE_BOOST_PTR=ON" + ] ++ lib.optional stdenv.hostPlatform.isDarwin "-DOCIO_USE_BOOST_PTR=ON" ++ lib.optional (!stdenv.hostPlatform.isx86) "-DOCIO_USE_SSE=OFF" - ++ lib.optional (stdenv.isDarwin && stdenv.isAarch64) "-DCMAKE_OSX_ARCHITECTURES=arm64"; + ++ lib.optional (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isAarch64) "-DCMAKE_OSX_ARCHITECTURES=arm64"; postInstall = '' moveToOutput bin "$bin" diff --git a/pkgs/development/libraries/opencolorio/default.nix b/pkgs/development/libraries/opencolorio/default.nix index 3e9302e025f2..76d2b06150ad 100644 --- a/pkgs/development/libraries/opencolorio/default.nix +++ b/pkgs/development/libraries/opencolorio/default.nix @@ -42,7 +42,7 @@ stdenv.mkDerivation rec { ./line-numbers.patch ]; - postPatch = lib.optionalString stdenv.isDarwin '' + postPatch = lib.optionalString stdenv.hostPlatform.isDarwin '' # these tests don't like being run headless on darwin. no builtin # way of skipping tests so this is what we're reduced to. substituteInPlace tests/cpu/Config_tests.cpp \ @@ -75,7 +75,7 @@ stdenv.mkDerivation rec { ++ lib.optional (!buildApps) "-DOCIO_BUILD_APPS=OFF"; # precision issues on non-x86 - doCheck = stdenv.isx86_64; + doCheck = stdenv.hostPlatform.isx86_64; # Tends to fail otherwise. enableParallelChecking = false; diff --git a/pkgs/development/libraries/opencsg/default.nix b/pkgs/development/libraries/opencsg/default.nix index 6ac83dfa7d92..5aea0da27380 100644 --- a/pkgs/development/libraries/opencsg/default.nix +++ b/pkgs/development/libraries/opencsg/default.nix @@ -10,11 +10,11 @@ stdenv.mkDerivation rec { }; nativeBuildInputs = [ qmake ] - ++ lib.optional stdenv.isDarwin fixDarwinDylibNames; + ++ lib.optional stdenv.hostPlatform.isDarwin fixDarwinDylibNames; buildInputs = [ glew ] - ++ lib.optionals stdenv.isLinux [ libGLU libGL libglut libXmu libXext libX11 ] - ++ lib.optional stdenv.isDarwin GLUT; + ++ lib.optionals stdenv.hostPlatform.isLinux [ libGLU libGL libglut libXmu libXext libX11 ] + ++ lib.optional stdenv.hostPlatform.isDarwin GLUT; doCheck = false; @@ -25,7 +25,7 @@ stdenv.mkDerivation rec { postInstall = '' install -D copying.txt "$out/share/doc/opencsg/copying.txt" - '' + lib.optionalString stdenv.isDarwin '' + '' + lib.optionalString stdenv.hostPlatform.isDarwin '' mkdir -p $out/Applications mv $out/bin/*.app $out/Applications rmdir $out/bin || true @@ -33,7 +33,7 @@ stdenv.mkDerivation rec { dontWrapQtApps = true; - postFixup = lib.optionalString stdenv.isDarwin '' + postFixup = lib.optionalString stdenv.hostPlatform.isDarwin '' app=$out/Applications/opencsgexample.app/Contents/MacOS/opencsgexample install_name_tool -change \ $(otool -L $app | awk '/opencsg.+dylib/ { print $1 }') \ diff --git a/pkgs/development/libraries/openct/default.nix b/pkgs/development/libraries/openct/default.nix index e4b6110e1c15..c8cc99b3f543 100644 --- a/pkgs/development/libraries/openct/default.nix +++ b/pkgs/development/libraries/openct/default.nix @@ -33,7 +33,7 @@ stdenv.mkDerivation rec { ''; meta = with lib; { - broken = stdenv.isDarwin; + broken = stdenv.hostPlatform.isDarwin; homepage = "https://github.com/OpenSC/openct/"; license = licenses.lgpl21; description = "Drivers for several smart card readers"; diff --git a/pkgs/development/libraries/opencv/4.x.nix b/pkgs/development/libraries/opencv/4.x.nix index cca9e8ae1c74..ef0266154bd5 100644 --- a/pkgs/development/libraries/opencv/4.x.nix +++ b/pkgs/development/libraries/opencv/4.x.nix @@ -26,7 +26,7 @@ , libtiff , enableWebP ? true , libwebp -, enableEXR ? !stdenv.isDarwin +, enableEXR ? !stdenv.hostPlatform.isDarwin , openexr , ilmbase , enableJPEG2000 ? true @@ -35,7 +35,7 @@ , eigen , enableBlas ? true , blas -, enableVA ? !stdenv.isDarwin +, enableVA ? !stdenv.hostPlatform.isDarwin , libva , enableContrib ? true @@ -329,10 +329,10 @@ effectiveStdenv.mkDerivation { openjpeg ] ++ lib.optionals enableFfmpeg [ ffmpeg - ] ++ lib.optionals (enableFfmpeg && effectiveStdenv.isDarwin) [ + ] ++ lib.optionals (enableFfmpeg && effectiveStdenv.hostPlatform.isDarwin) [ bzip2 VideoDecodeAcceleration - ] ++ lib.optionals (enableGStreamer && effectiveStdenv.isLinux) [ + ] ++ lib.optionals (enableGStreamer && effectiveStdenv.hostPlatform.isLinux) [ elfutils gst_all_1.gst-plugins-base gst_all_1.gst-plugins-good @@ -360,7 +360,7 @@ effectiveStdenv.mkDerivation { leptonica ] ++ lib.optionals enableTbb [ tbb - ] ++ lib.optionals effectiveStdenv.isDarwin [ + ] ++ lib.optionals effectiveStdenv.hostPlatform.isDarwin [ bzip2 AVFoundation Cocoa @@ -457,7 +457,7 @@ effectiveStdenv.mkDerivation { "-DCUDA_ARCH_PTX=${lib.last cudaCapabilities}" "-DNVIDIA_OPTICAL_FLOW_2_0_HEADERS_PATH=${nvidia-optical-flow-sdk}" - ] ++ lib.optionals effectiveStdenv.isDarwin [ + ] ++ lib.optionals effectiveStdenv.hostPlatform.isDarwin [ "-DWITH_OPENCL=OFF" "-DWITH_LAPACK=OFF" @@ -471,7 +471,7 @@ effectiveStdenv.mkDerivation { "-DBUILD_JPEG=OFF" "-DBUILD_PNG=OFF" "-DBUILD_WEBP=OFF" - ] ++ lib.optionals (!effectiveStdenv.isDarwin) [ + ] ++ lib.optionals (!effectiveStdenv.hostPlatform.isDarwin) [ "-DOPENCL_LIBRARY=${ocl-icd}/lib/libOpenCL.so" ] ++ lib.optionals enablePython [ "-DOPENCV_SKIP_PYTHON_LOADER=ON" @@ -536,7 +536,7 @@ effectiveStdenv.mkDerivation { tests = { inherit (gst_all_1) gst-plugins-bad; } - // lib.optionalAttrs (!effectiveStdenv.isDarwin) { inherit qimgv; } + // lib.optionalAttrs (!effectiveStdenv.hostPlatform.isDarwin) { inherit qimgv; } // lib.optionalAttrs (!enablePython) { pythonEnabled = pythonPackages.opencv4; } // lib.optionalAttrs (effectiveStdenv.buildPlatform != "x86_64-darwin") { opencv4-tests = callPackage ./tests.nix { diff --git a/pkgs/development/libraries/opencv/tests.nix b/pkgs/development/libraries/opencv/tests.nix index d1966b1a4aa8..dec10c1b13ab 100644 --- a/pkgs/development/libraries/opencv/tests.nix +++ b/pkgs/development/libraries/opencv/tests.nix @@ -26,7 +26,7 @@ let "video" #"videoio" # - a lot of GStreamer warnings and failed tests #"dnn" #- some caffe tests failed, probably because github workflow also downloads additional models - ] ++ lib.optionals (!stdenv.isAarch64 && enableGStreamer) [ "gapi" ] + ] ++ lib.optionals (!stdenv.hostPlatform.isAarch64 && enableGStreamer) [ "gapi" ] ++ lib.optionals (enableGtk2 || enableGtk3) [ "highgui" ]; perfTestNames = [ "calib3d" @@ -38,8 +38,8 @@ let "photo" "stitching" "video" - ] ++ lib.optionals (!stdenv.isAarch64 && enableGStreamer) [ "gapi" ]; - testRunner = lib.optionalString (!stdenv.isDarwin) "${lib.getExe xvfb-run} -a "; + ] ++ lib.optionals (!stdenv.hostPlatform.isAarch64 && enableGStreamer) [ "gapi" ]; + testRunner = lib.optionalString (!stdenv.hostPlatform.isDarwin) "${lib.getExe xvfb-run} -a "; testsPreparation = '' touch $out # several tests want a write access, so we have to copy files diff --git a/pkgs/development/libraries/opendbx/default.nix b/pkgs/development/libraries/opendbx/default.nix index 9fbb8356679c..ba66ba5be18a 100644 --- a/pkgs/development/libraries/opendbx/default.nix +++ b/pkgs/development/libraries/opendbx/default.nix @@ -25,7 +25,7 @@ stdenv.mkDerivation rec { ]; meta = with lib; { - broken = stdenv.isDarwin; + broken = stdenv.hostPlatform.isDarwin; description = "Extremely lightweight but extensible database access library written in C"; mainProgram = "odbx-sql"; license = licenses.lgpl21; diff --git a/pkgs/development/libraries/opendht/default.nix b/pkgs/development/libraries/opendht/default.nix index 322885ac8606..e7408ba37e67 100644 --- a/pkgs/development/libraries/opendht/default.nix +++ b/pkgs/development/libraries/opendht/default.nix @@ -48,7 +48,7 @@ stdenv.mkDerivation rec { restinio http-parser openssl - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ Security ]; diff --git a/pkgs/development/libraries/opendkim/default.nix b/pkgs/development/libraries/opendkim/default.nix index 00b5d624153a..8425d5a815bf 100644 --- a/pkgs/development/libraries/opendkim/default.nix +++ b/pkgs/development/libraries/opendkim/default.nix @@ -16,11 +16,11 @@ stdenv.mkDerivation rec { "--with-milter=${libmilter}" "ac_cv_func_malloc_0_nonnull=yes" "ac_cv_func_realloc_0_nonnull=yes" - ] ++ lib.optional stdenv.isDarwin "--with-unbound=${unbound}"; + ] ++ lib.optional stdenv.hostPlatform.isDarwin "--with-unbound=${unbound}"; nativeBuildInputs = [ autoreconfHook pkg-config makeWrapper ]; - buildInputs = [ libbsd openssl libmilter perl ] ++ lib.optional stdenv.isDarwin unbound; + buildInputs = [ libbsd openssl libmilter perl ] ++ lib.optional stdenv.hostPlatform.isDarwin unbound; postInstall = '' wrapProgram $out/sbin/opendkim-genkey \ diff --git a/pkgs/development/libraries/openexr/3.nix b/pkgs/development/libraries/openexr/3.nix index 9e6d6eaa65da..56562f771698 100644 --- a/pkgs/development/libraries/openexr/3.nix +++ b/pkgs/development/libraries/openexr/3.nix @@ -41,10 +41,10 @@ stdenv.mkDerivation rec { # Without 'sse' enforcement tests fail on i686 as due to excessive precision as: # error reading back channel B pixel 21,-76 got -nan expected -nan - env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.isi686 "-msse2 -mfpmath=sse"; + env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.hostPlatform.isi686 "-msse2 -mfpmath=sse"; # https://github.com/AcademySoftwareFoundation/openexr/issues/1400 - doCheck = !stdenv.isAarch32; + doCheck = !stdenv.hostPlatform.isAarch32; passthru.tests = { musl = pkgsCross.musl64.openexr_3; diff --git a/pkgs/development/libraries/openexr/default.nix b/pkgs/development/libraries/openexr/default.nix index b45557b95c1b..a79759be24f2 100644 --- a/pkgs/development/libraries/openexr/default.nix +++ b/pkgs/development/libraries/openexr/default.nix @@ -58,7 +58,7 @@ stdenv.mkDerivation rec { # https://github.com/AcademySoftwareFoundation/openexr/issues/1400 # https://github.com/AcademySoftwareFoundation/openexr/issues/1281 - doCheck = !stdenv.isAarch32 && !stdenv.isi686; + doCheck = !stdenv.hostPlatform.isAarch32 && !stdenv.hostPlatform.isi686; meta = with lib; { description = "High dynamic-range (HDR) image file format"; diff --git a/pkgs/development/libraries/openfec/default.nix b/pkgs/development/libraries/openfec/default.nix index 964f5d86f672..8cee39c3a3ab 100644 --- a/pkgs/development/libraries/openfec/default.nix +++ b/pkgs/development/libraries/openfec/default.nix @@ -35,7 +35,7 @@ stdenv.mkDerivation rec { find $dev/include -type f -a ! -iname '*.h' -delete install -D -m755 -t $out/lib ../bin/Release/libopenfec${so} - '' + lib.optionalString stdenv.isDarwin '' + '' + lib.optionalString stdenv.hostPlatform.isDarwin '' install_name_tool -id $out/lib/libopenfec${so} $out/lib/libopenfec${so} '' + '' ln -s libopenfec${so} $out/lib/libopenfec${so}.1 diff --git a/pkgs/development/libraries/openimagedenoise/default.nix b/pkgs/development/libraries/openimagedenoise/default.nix index ad68505ad609..cfd38708cd9a 100644 --- a/pkgs/development/libraries/openimagedenoise/default.nix +++ b/pkgs/development/libraries/openimagedenoise/default.nix @@ -14,7 +14,7 @@ }: let - stdenv' = if stdenv.isDarwin then darwin.apple_sdk_11_0.stdenv else stdenv; + stdenv' = if stdenv.hostPlatform.isDarwin then darwin.apple_sdk_11_0.stdenv else stdenv; in stdenv'.mkDerivation (finalAttrs: { pname = "openimagedenoise"; @@ -39,11 +39,11 @@ stdenv'.mkDerivation (finalAttrs: { python3 ispc ] ++ lib.optional cudaSupport cudaPackages.cuda_nvcc - ++ lib.optionals stdenv.isDarwin [ xcodebuild ]; + ++ lib.optionals stdenv.hostPlatform.isDarwin [ xcodebuild ]; buildInputs = [ tbb ] - ++ lib.optionals stdenv.isDarwin ( + ++ lib.optionals stdenv.hostPlatform.isDarwin ( with darwin.apple_sdk_11_0.frameworks; [ Accelerate diff --git a/pkgs/development/libraries/openjpeg/default.nix b/pkgs/development/libraries/openjpeg/default.nix index 25b43b3600e9..4af80702b556 100644 --- a/pkgs/development/libraries/openjpeg/default.nix +++ b/pkgs/development/libraries/openjpeg/default.nix @@ -41,7 +41,7 @@ stdenv.mkDerivation rec { ++ lib.optionals jpipServerSupport [ curl fcgi ] ++ lib.optional (jpipLibSupport) jdk; - doCheck = (!stdenv.isAarch64 && !stdenv.hostPlatform.isPower64); # tests fail on aarch64-linux and powerpc64 + doCheck = (!stdenv.hostPlatform.isAarch64 && !stdenv.hostPlatform.isPower64); # tests fail on aarch64-linux and powerpc64 nativeCheckInputs = [ jpylyzer ]; checkPhase = '' substituteInPlace ../tools/ctest_scripts/travis-ci.cmake \ diff --git a/pkgs/development/libraries/openldap/default.nix b/pkgs/development/libraries/openldap/default.nix index e25f0a8c172d..8ca98b386aa2 100644 --- a/pkgs/development/libraries/openldap/default.nix +++ b/pkgs/development/libraries/openldap/default.nix @@ -47,7 +47,7 @@ stdenv.mkDerivation rec { libsodium libtool openssl - ] ++ lib.optionals (stdenv.isLinux) [ + ] ++ lib.optionals (stdenv.hostPlatform.isLinux) [ libxcrypt # causes linking issues on *-darwin systemdMinimal ]; @@ -64,7 +64,7 @@ stdenv.mkDerivation rec { ] ++ lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) [ "--with-yielding_select=yes" "ac_cv_func_memcmp_working=yes" - ] ++ lib.optional stdenv.isFreeBSD "--with-pic"; + ] ++ lib.optional stdenv.hostPlatform.isFreeBSD "--with-pic"; env.NIX_CFLAGS_COMPILE = toString [ "-DLDAPI_SOCK=\"/run/openldap/ldapi\"" ]; diff --git a/pkgs/development/libraries/openmpi/default.nix b/pkgs/development/libraries/openmpi/default.nix index 0ae1118a36b0..a1fb9454561b 100644 --- a/pkgs/development/libraries/openmpi/default.nix +++ b/pkgs/development/libraries/openmpi/default.nix @@ -29,7 +29,7 @@ # Pass PATH/LD_LIBRARY_PATH to point to current mpirun by default enablePrefix ? false, # Enable libfabric support (necessary for Omnipath networks) on x86_64 linux - fabricSupport ? stdenv.isLinux && stdenv.isx86_64, + fabricSupport ? stdenv.hostPlatform.isLinux && stdenv.hostPlatform.isx86_64, # Enable Fortran support fortranSupport ? true, # AVX/SSE options. See passthru.defaultAvxOptions for the available options. @@ -75,7 +75,7 @@ stdenv.mkDerivation (finalAttrs: { outputs = [ "out" ] - ++ lib.optionals stdenv.isLinux [ + ++ lib.optionals stdenv.hostPlatform.isLinux [ "man" "dev" ]; @@ -86,7 +86,7 @@ stdenv.mkDerivation (finalAttrs: { libevent hwloc ] - ++ lib.optionals stdenv.isLinux [ + ++ lib.optionals stdenv.hostPlatform.isLinux [ libnl numactl pmix @@ -95,9 +95,9 @@ stdenv.mkDerivation (finalAttrs: { prrte ] ++ lib.optionals cudaSupport [ cudaPackages.cuda_cudart ] - ++ lib.optionals (stdenv.isLinux || stdenv.isFreeBSD) [ rdma-core ] + ++ lib.optionals (stdenv.hostPlatform.isLinux || stdenv.hostPlatform.isFreeBSD) [ rdma-core ] # needed for internal pmix - ++ lib.optionals (!stdenv.isLinux) [ python3 ] + ++ lib.optionals (!stdenv.hostPlatform.isLinux) [ python3 ] ++ lib.optionals fabricSupport [ libpsm2 libfabric @@ -115,11 +115,11 @@ stdenv.mkDerivation (finalAttrs: { configureFlags = [ (lib.enableFeature cudaSupport "mca-dso") (lib.enableFeature fortranSupport "mpi-fortran") - (lib.withFeatureAs stdenv.isLinux "libnl" (lib.getDev libnl)) + (lib.withFeatureAs stdenv.hostPlatform.isLinux "libnl" (lib.getDev libnl)) "--with-pmix=${lib.getDev pmix}" "--with-pmix-libdir=${lib.getLib pmix}/lib" # Puts a "default OMPI_PRTERUN" value to mpirun / mpiexec executables - (lib.withFeatureAs stdenv.isLinux "prrte" (lib.getBin prrte)) + (lib.withFeatureAs stdenv.hostPlatform.isLinux "prrte" (lib.getBin prrte)) (lib.withFeature enableSGE "sge") (lib.enableFeature enablePrefix "mpirun-prefix-by-default") # TODO: add UCX support, which is recommended to use with cuda for the most robust OpenMPI build @@ -219,7 +219,7 @@ stdenv.mkDerivation (finalAttrs: { # we currently don't perform these substitutions on other platforms, # until a Darwin user will care enough about this cross platform # related substitution. - lib.optionalString stdenv.isLinux '' + lib.optionalString stdenv.hostPlatform.isLinux '' substituteInPlace "''${!outputDev}/share/openmpi/${part1}${part2}-wrapper-data.txt" \ --replace-fail \ compiler=${lib.elemAt wrapperDataSubstitutions.${part2} 0} \ diff --git a/pkgs/development/libraries/opensaml-cpp/default.nix b/pkgs/development/libraries/opensaml-cpp/default.nix index 5e7de98efc46..910a8bc82737 100644 --- a/pkgs/development/libraries/opensaml-cpp/default.nix +++ b/pkgs/development/libraries/opensaml-cpp/default.nix @@ -14,7 +14,7 @@ stdenv.mkDerivation rec { buildInputs = [ boost openssl log4shib xercesc xml-security-c xml-tooling-c zlib - ] ++ lib.optionals stdenv.isDarwin (with darwin.apple_sdk.frameworks; [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin (with darwin.apple_sdk.frameworks; [ CoreServices SystemConfiguration ]); @@ -22,7 +22,7 @@ stdenv.mkDerivation rec { configureFlags = [ "--with-xmltooling=${xml-tooling-c}" ]; - env.NIX_CFLAGS_COMPILE = lib.optionalString (!stdenv.isDarwin) "-std=c++14"; + env.NIX_CFLAGS_COMPILE = lib.optionalString (!stdenv.hostPlatform.isDarwin) "-std=c++14"; enableParallelBuilding = true; diff --git a/pkgs/development/libraries/openscenegraph/default.nix b/pkgs/development/libraries/openscenegraph/default.nix index 3566e458598c..1b0f4b229d36 100644 --- a/pkgs/development/libraries/openscenegraph/default.nix +++ b/pkgs/development/libraries/openscenegraph/default.nix @@ -39,7 +39,7 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ pkg-config cmake doxygen ]; - buildInputs = lib.optionals (!stdenv.isDarwin) [ + buildInputs = lib.optionals (!stdenv.hostPlatform.isDarwin) [ libX11 libXinerama libXrandr libGLU libGL ] ++ [ glib libxml2 pcre zlib @@ -63,8 +63,8 @@ stdenv.mkDerivation rec { ++ lib.optional sdlSupport SDL2 ++ lib.optional restSupport asio ++ lib.optionals withExamples [ fltk ] - ++ lib.optionals (!stdenv.isDarwin) [ ] - ++ lib.optionals stdenv.isDarwin [ AGL Accelerate Carbon Cocoa Foundation ] + ++ lib.optionals (!stdenv.hostPlatform.isDarwin) [ ] + ++ lib.optionals stdenv.hostPlatform.isDarwin [ AGL Accelerate Carbon Cocoa Foundation ] ++ lib.optional (restSupport || colladaSupport) boost ; diff --git a/pkgs/development/libraries/openslp/default.nix b/pkgs/development/libraries/openslp/default.nix index e390cfd932fd..33b01b764709 100644 --- a/pkgs/development/libraries/openslp/default.nix +++ b/pkgs/development/libraries/openslp/default.nix @@ -31,7 +31,7 @@ stdenv.mkDerivation rec { license = licenses.bsd3; platforms = platforms.all; # never built on aarch64-darwin since first introduction in nixpkgs - broken = stdenv.isDarwin && stdenv.isAarch64; + broken = stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isAarch64; knownVulnerabilities = [ "CVE-2023-29552: UDP Reflection Attack with ampliciation factor of up to 2200" ]; diff --git a/pkgs/development/libraries/openssl/default.nix b/pkgs/development/libraries/openssl/default.nix index 7c0788a673f6..40edcdee6bc3 100644 --- a/pkgs/development/libraries/openssl/default.nix +++ b/pkgs/development/libraries/openssl/default.nix @@ -5,7 +5,7 @@ , enableSSL2 ? false , enableSSL3 ? false , enableMD2 ? false -, enableKTLS ? stdenv.isLinux +, enableKTLS ? stdenv.hostPlatform.isLinux , static ? stdenv.hostPlatform.isStatic # path to openssl.cnf file. will be placed in $etc/etc/ssl/openssl.cnf to replace the default , conf ? null diff --git a/pkgs/development/libraries/opensubdiv/default.nix b/pkgs/development/libraries/opensubdiv/default.nix index b5c2847fb9ba..4cee5df5dc3d 100644 --- a/pkgs/development/libraries/opensubdiv/default.nix +++ b/pkgs/development/libraries/opensubdiv/default.nix @@ -31,8 +31,8 @@ stdenv.mkDerivation rec { glew xorg.libX11 xorg.libXrandr xorg.libXxf86vm xorg.libXcursor xorg.libXinerama xorg.libXi ] - ++ lib.optionals (openclSupport && !stdenv.isDarwin) [ ocl-icd ] - ++ lib.optionals stdenv.isDarwin (with darwin.apple_sdk.frameworks; [ + ++ lib.optionals (openclSupport && !stdenv.hostPlatform.isDarwin) [ ocl-icd ] + ++ lib.optionals stdenv.hostPlatform.isDarwin (with darwin.apple_sdk.frameworks; [ OpenCL Cocoa CoreVideo @@ -58,10 +58,10 @@ stdenv.mkDerivation rec { [ "-DNO_TUTORIALS=1" "-DNO_REGRESSION=1" "-DNO_EXAMPLES=1" - (lib.cmakeBool "NO_METAL" (!stdenv.isDarwin)) + (lib.cmakeBool "NO_METAL" (!stdenv.hostPlatform.isDarwin)) (lib.cmakeBool "NO_OPENCL" (!openclSupport)) (lib.cmakeBool "NO_CUDA" (!cudaSupport)) - ] ++ lib.optionals (!stdenv.isDarwin) [ + ] ++ lib.optionals (!stdenv.hostPlatform.isDarwin) [ "-DGLEW_INCLUDE_DIR=${glew.dev}/include" "-DGLEW_LIBRARY=${glew.dev}/lib" ] ++ lib.optionals cudaSupport [ diff --git a/pkgs/development/libraries/openvdb/default.nix b/pkgs/development/libraries/openvdb/default.nix index 2b1fca97f06e..72d2d7dce0c8 100644 --- a/pkgs/development/libraries/openvdb/default.nix +++ b/pkgs/development/libraries/openvdb/default.nix @@ -21,7 +21,7 @@ stdenv.mkDerivation rec cmakeFlags = [ "-DOPENVDB_CORE_STATIC=OFF" "-DOPENVDB_BUILD_NANOVDB=ON"]; # error: aligned deallocation function of type 'void (void *, std::align_val_t) noexcept' is only available on macOS 10.13 or newer - env = lib.optionalAttrs (stdenv.isDarwin && lib.versionOlder stdenv.hostPlatform.darwinMinVersion "10.13" && lib.versionAtLeast tbb.version "2021.8.0") { + env = lib.optionalAttrs (stdenv.hostPlatform.isDarwin && lib.versionOlder stdenv.hostPlatform.darwinMinVersion "10.13" && lib.versionAtLeast tbb.version "2021.8.0") { NIX_CFLAGS_COMPILE = "-faligned-allocation"; }; diff --git a/pkgs/development/libraries/openvino/default.nix b/pkgs/development/libraries/openvino/default.nix index a1f30277151b..98129c5944d1 100644 --- a/pkgs/development/libraries/openvino/default.nix +++ b/pkgs/development/libraries/openvino/default.nix @@ -116,7 +116,7 @@ stdenv.mkDerivation rec { (cmakeBool "ENABLE_SAMPLES" false) # features - (cmakeBool "ENABLE_INTEL_CPU" stdenv.isx86_64) + (cmakeBool "ENABLE_INTEL_CPU" stdenv.hostPlatform.isx86_64) (cmakeBool "ENABLE_JS" false) (cmakeBool "ENABLE_LTO" true) (cmakeBool "ENABLE_ONEDNN_FOR_GPU" false) @@ -177,7 +177,7 @@ stdenv.mkDerivation rec { homepage = "https://docs.openvinotoolkit.org/"; license = with licenses; [ asl20 ]; platforms = platforms.all; - broken = stdenv.isDarwin; # Cannot find macos sdk + broken = stdenv.hostPlatform.isDarwin; # Cannot find macos sdk maintainers = with maintainers; [ tfmoraes ]; }; } diff --git a/pkgs/development/libraries/oracle-instantclient/default.nix b/pkgs/development/libraries/oracle-instantclient/default.nix index 87381141d98f..4d6a605bf084 100644 --- a/pkgs/development/libraries/oracle-instantclient/default.nix +++ b/pkgs/development/libraries/oracle-instantclient/default.nix @@ -99,12 +99,12 @@ stdenv.mkDerivation { inherit pname version srcs; buildInputs = [ stdenv.cc.cc.lib ] - ++ optional stdenv.isLinux libaio + ++ optional stdenv.hostPlatform.isLinux libaio ++ optional odbcSupport unixODBC; nativeBuildInputs = [ makeWrapper unzip ] - ++ optional stdenv.isLinux autoPatchelfHook - ++ optional stdenv.isDarwin fixDarwinDylibNames; + ++ optional stdenv.hostPlatform.isLinux autoPatchelfHook + ++ optional stdenv.hostPlatform.isDarwin fixDarwinDylibNames; outputs = [ "out" "dev" "lib" ]; @@ -125,7 +125,7 @@ stdenv.mkDerivation { ln -sfn $out/bin/sqlplus $out/bin/sqlplus64 ''; - postFixup = optionalString stdenv.isDarwin '' + postFixup = optionalString stdenv.hostPlatform.isDarwin '' for exe in "$out/bin/"* ; do if [ ! -L "$exe" ]; then install_name_tool -add_rpath "$lib/lib" "$exe" diff --git a/pkgs/development/libraries/packr/default.nix b/pkgs/development/libraries/packr/default.nix index 43822d76aa19..d149c48cc563 100644 --- a/pkgs/development/libraries/packr/default.nix +++ b/pkgs/development/libraries/packr/default.nix @@ -34,7 +34,7 @@ let p2 = buildGoModule rec { # # but this package is no longer maintained. # - broken = stdenv.isDarwin; + broken = stdenv.hostPlatform.isDarwin; }; }; p1 = buildGoModule rec { @@ -66,7 +66,7 @@ p1 = buildGoModule rec { # # but this package is no longer maintained. # - broken = stdenv.isDarwin; + broken = stdenv.hostPlatform.isDarwin; }; }; in diff --git a/pkgs/development/libraries/pagmo2/default.nix b/pkgs/development/libraries/pagmo2/default.nix index b7d3d92db0bb..e39f059e31d2 100644 --- a/pkgs/development/libraries/pagmo2/default.nix +++ b/pkgs/development/libraries/pagmo2/default.nix @@ -22,17 +22,17 @@ stdenv.mkDerivation rec { }; nativeBuildInputs = [ cmake ]; - buildInputs = [ eigen nlopt boost tbb ] ++ lib.optional (!stdenv.isDarwin) ipopt; + buildInputs = [ eigen nlopt boost tbb ] ++ lib.optional (!stdenv.hostPlatform.isDarwin) ipopt; cmakeFlags = [ "-DPAGMO_BUILD_TESTS=${if runTests then "ON" else "OFF"}" "-DPAGMO_WITH_EIGEN3=yes" "-DPAGMO_WITH_NLOPT=yes" "-DNLOPT_LIBRARY=${nlopt}/lib/libnlopt${stdenv.hostPlatform.extensions.sharedLibrary}" - ] ++ lib.optionals stdenv.isLinux [ + ] ++ lib.optionals stdenv.hostPlatform.isLinux [ "-DPAGMO_WITH_IPOPT=yes" "-DCMAKE_CXX_FLAGS='-fuse-ld=gold'" - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ # FIXME: fails ipopt test with Invalid_Option on darwin, so disable. "-DPAGMO_WITH_IPOPT=no" "-DLLVM_USE_LINKER=gold" diff --git a/pkgs/development/libraries/pango/default.nix b/pkgs/development/libraries/pango/default.nix index d91552e3799a..4b442a0ff900 100644 --- a/pkgs/development/libraries/pango/default.nix +++ b/pkgs/development/libraries/pango/default.nix @@ -16,7 +16,7 @@ , ninja , glib , python3 -, x11Support? !stdenv.isDarwin, libXft +, x11Support? !stdenv.hostPlatform.isDarwin, libXft , withIntrospection ? lib.meta.availableOn stdenv.hostPlatform gobject-introspection && stdenv.hostPlatform.emulatorAvailable buildPackages , buildPackages, gobject-introspection , testers @@ -50,7 +50,7 @@ stdenv.mkDerivation (finalAttrs: { buildInputs = [ fribidi libthai - ] ++ lib.optionals stdenv.isDarwin (with darwin.apple_sdk.frameworks; [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin (with darwin.apple_sdk.frameworks; [ ApplicationServices Carbon CoreGraphics diff --git a/pkgs/development/libraries/pangolin/default.nix b/pkgs/development/libraries/pangolin/default.nix index 600c7b0eb058..1dd52ab7ff36 100644 --- a/pkgs/development/libraries/pangolin/default.nix +++ b/pkgs/development/libraries/pangolin/default.nix @@ -26,7 +26,7 @@ stdenv.mkDerivation rec { libtiff eigen ] - ++ lib.optionals stdenv.isDarwin [ Carbon Cocoa ]; + ++ lib.optionals stdenv.hostPlatform.isDarwin [ Carbon Cocoa ]; # The tests use cmake's findPackage to find the installed version of # pangolin, which isn't what we want (or available). diff --git a/pkgs/development/libraries/pangomm/2.42.nix b/pkgs/development/libraries/pangomm/2.42.nix index 267e46c48c3d..ebbaee668563 100644 --- a/pkgs/development/libraries/pangomm/2.42.nix +++ b/pkgs/development/libraries/pangomm/2.42.nix @@ -21,7 +21,7 @@ stdenv.mkDerivation rec { outputs = [ "out" "dev" ]; - nativeBuildInputs = [ pkg-config meson ninja python3 ] ++ lib.optionals stdenv.isDarwin [ + nativeBuildInputs = [ pkg-config meson ninja python3 ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ ApplicationServices ]; propagatedBuildInputs = [ pango glibmm cairomm ]; @@ -37,7 +37,7 @@ stdenv.mkDerivation rec { }; meta = with lib; { - broken = (stdenv.isLinux && stdenv.isAarch64) || stdenv.isDarwin; + broken = (stdenv.hostPlatform.isLinux && stdenv.hostPlatform.isAarch64) || stdenv.hostPlatform.isDarwin; description = "C++ interface to the Pango text rendering library"; homepage = "https://www.pango.org/"; license = with licenses; [ lgpl2 lgpl21 ]; diff --git a/pkgs/development/libraries/pangomm/2.48.nix b/pkgs/development/libraries/pangomm/2.48.nix index fa4148e06aa0..3b513b889937 100644 --- a/pkgs/development/libraries/pangomm/2.48.nix +++ b/pkgs/development/libraries/pangomm/2.48.nix @@ -28,7 +28,7 @@ stdenv.mkDerivation rec { meson ninja python3 - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ ApplicationServices ]; diff --git a/pkgs/development/libraries/pangomm/default.nix b/pkgs/development/libraries/pangomm/default.nix index 02a76869cf1e..65dede46ee9e 100644 --- a/pkgs/development/libraries/pangomm/default.nix +++ b/pkgs/development/libraries/pangomm/default.nix @@ -12,7 +12,7 @@ stdenv.mkDerivation rec { outputs = [ "out" "dev" ]; - nativeBuildInputs = [ pkg-config meson ninja python3 ] ++ lib.optionals stdenv.isDarwin [ + nativeBuildInputs = [ pkg-config meson ninja python3 ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ ApplicationServices ]; propagatedBuildInputs = [ pango glibmm cairomm ]; diff --git a/pkgs/development/libraries/partio/default.nix b/pkgs/development/libraries/partio/default.nix index 05c8abfafb2a..2c117bdabb90 100644 --- a/pkgs/development/libraries/partio/default.nix +++ b/pkgs/development/libraries/partio/default.nix @@ -39,10 +39,10 @@ stdenv.mkDerivation rec { swig xorg.libXi xorg.libXmu - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.Cocoa darwin.apple_sdk.frameworks.GLUT - ] ++ lib.optionals (!stdenv.isDarwin) [ + ] ++ lib.optionals (!stdenv.hostPlatform.isDarwin) [ libglut libGLU libGL diff --git a/pkgs/development/libraries/pc-ble-driver/default.nix b/pkgs/development/libraries/pc-ble-driver/default.nix index 7a7b8475d7c4..0391b72ada89 100644 --- a/pkgs/development/libraries/pc-ble-driver/default.nix +++ b/pkgs/development/libraries/pc-ble-driver/default.nix @@ -30,7 +30,7 @@ stdenv.mkDerivation rec { cmakeFlags = [ "-DNRF_BLE_DRIVER_VERSION=${version}" - ] ++ lib.optionals (stdenv.isDarwin && stdenv.isAarch64) [ + ] ++ lib.optionals (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isAarch64) [ "-DARCH=arm64" ]; @@ -39,9 +39,9 @@ stdenv.mkDerivation rec { propagatedBuildInputs = [ - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ IOKit - ] ++ lib.optionals stdenv.isLinux [ + ] ++ lib.optionals stdenv.hostPlatform.isLinux [ udev ]; diff --git a/pkgs/development/libraries/pcaudiolib/default.nix b/pkgs/development/libraries/pcaudiolib/default.nix index 347e8b5cdf2c..1152283b1f2c 100644 --- a/pkgs/development/libraries/pcaudiolib/default.nix +++ b/pkgs/development/libraries/pcaudiolib/default.nix @@ -10,7 +10,7 @@ , pkg-config , portaudio , which -, pulseaudioSupport ? config.pulseaudio or stdenv.isLinux +, pulseaudioSupport ? config.pulseaudio or stdenv.hostPlatform.isLinux }: stdenv.mkDerivation (finalAttrs: { @@ -35,12 +35,12 @@ stdenv.mkDerivation (finalAttrs: { buildInputs = [ portaudio ] - ++ lib.optional stdenv.isLinux alsa-lib + ++ lib.optional stdenv.hostPlatform.isLinux alsa-lib ++ lib.optional pulseaudioSupport libpulseaudio; # touch ChangeLog to avoid below error on darwin: # Makefile.am: error: required file './ChangeLog.md' not found - preConfigure = lib.optionalString stdenv.isDarwin '' + preConfigure = lib.optionalString stdenv.hostPlatform.isDarwin '' touch ChangeLog '' + '' ./autogen.sh diff --git a/pkgs/development/libraries/pcg-c/default.nix b/pkgs/development/libraries/pcg-c/default.nix index ced4e04c0b87..3ad9df8b64bd 100644 --- a/pkgs/development/libraries/pcg-c/default.nix +++ b/pkgs/development/libraries/pcg-c/default.nix @@ -31,6 +31,6 @@ stdenv.mkDerivation rec { ''; platforms = lib.platforms.unix; maintainers = [ lib.maintainers.linus ]; - broken = stdenv.isi686; # https://github.com/imneme/pcg-c/issues/11 + broken = stdenv.hostPlatform.isi686; # https://github.com/imneme/pcg-c/issues/11 }; } diff --git a/pkgs/development/libraries/pcl/default.nix b/pkgs/development/libraries/pcl/default.nix index 36e54f873cc7..41639d300ecd 100644 --- a/pkgs/development/libraries/pcl/default.nix +++ b/pkgs/development/libraries/pcl/default.nix @@ -53,7 +53,7 @@ stdenv.mkDerivation rec { qtbase libXt ] - ++ lib.optionals stdenv.isDarwin [ Cocoa AGL ]; + ++ lib.optionals stdenv.hostPlatform.isDarwin [ Cocoa AGL ]; propagatedBuildInputs = [ boost @@ -64,7 +64,7 @@ stdenv.mkDerivation rec { vtk ]; - cmakeFlags = lib.optionals stdenv.isDarwin [ + cmakeFlags = lib.optionals stdenv.hostPlatform.isDarwin [ "-DOPENGL_INCLUDE_DIR=${OpenGL}/Library/Frameworks" ] ++ lib.optionals cudaSupport [ "-DWITH_CUDA=true" ]; diff --git a/pkgs/development/libraries/physfs/default.nix b/pkgs/development/libraries/physfs/default.nix index 27f7c019ac77..e00be9c841f9 100644 --- a/pkgs/development/libraries/physfs/default.nix +++ b/pkgs/development/libraries/physfs/default.nix @@ -16,7 +16,7 @@ let nativeBuildInputs = [ cmake doxygen ]; buildInputs = [ zlib ] - ++ lib.optionals stdenv.isDarwin [ Foundation ]; + ++ lib.optionals stdenv.hostPlatform.isDarwin [ Foundation ]; doInstallCheck = true; diff --git a/pkgs/development/libraries/physics/applgrid/default.nix b/pkgs/development/libraries/physics/applgrid/default.nix index c2dbb1235b48..b083f278af9d 100644 --- a/pkgs/development/libraries/physics/applgrid/default.nix +++ b/pkgs/development/libraries/physics/applgrid/default.nix @@ -12,7 +12,7 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ gfortran ]; # For some reason zlib was only needed after bump to gfortran8 - buildInputs = [ hoppet lhapdf root5 zlib ] ++ lib.optionals stdenv.isDarwin [ Cocoa ]; + buildInputs = [ hoppet lhapdf root5 zlib ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ Cocoa ]; patches = [ ./bad_code.patch @@ -21,7 +21,7 @@ stdenv.mkDerivation rec { preConfigure = '' substituteInPlace src/Makefile.in \ --replace "-L\$(subst /libgfortran.a, ,\$(FRTLIB) )" "-L${gfortran.cc.lib}/lib" - '' + (lib.optionalString stdenv.isDarwin '' + '' + (lib.optionalString stdenv.hostPlatform.isDarwin '' substituteInPlace src/Makefile.in \ --replace "gfortran -print-file-name=libgfortran.a" "gfortran -print-file-name=libgfortran.dylib" ''); diff --git a/pkgs/development/libraries/physics/cernlib/default.nix b/pkgs/development/libraries/physics/cernlib/default.nix index 13d1cb081249..0673aeefffb1 100644 --- a/pkgs/development/libraries/physics/cernlib/default.nix +++ b/pkgs/development/libraries/physics/cernlib/default.nix @@ -55,7 +55,7 @@ stdenv.mkDerivation rec { libXt libxcrypt motif - ] ++ lib.optional stdenv.isLinux libnsl; + ] ++ lib.optional stdenv.hostPlatform.isLinux libnsl; setupHook = ./setup-hook.sh; diff --git a/pkgs/development/libraries/physics/geant4/default.nix b/pkgs/development/libraries/physics/geant4/default.nix index 7349c708e3d9..128d7391fc4a 100644 --- a/pkgs/development/libraries/physics/geant4/default.nix +++ b/pkgs/development/libraries/physics/geant4/default.nix @@ -76,7 +76,7 @@ stdenv.mkDerivation rec { "-DGEANT4_USE_SYSTEM_EXPAT=ON" "-DGEANT4_USE_SYSTEM_ZLIB=ON" "-DGEANT4_BUILD_MULTITHREADED=${if enableMultiThreading then "ON" else "OFF"}" - ] ++ lib.optionals (enableOpenGLX11 && stdenv.isDarwin) [ + ] ++ lib.optionals (enableOpenGLX11 && stdenv.hostPlatform.isDarwin) [ "-DXQuartzGL_INCLUDE_DIR=${libGLX.dev}/include" "-DXQuartzGL_gl_LIBRARY=${libGLX}/lib/libGL.dylib" ] ++ lib.optionals (enableMultiThreading && enablePython) [ @@ -128,7 +128,7 @@ stdenv.mkDerivation rec { ''; meta = with lib; { - broken = (stdenv.isLinux && stdenv.isAarch64); + broken = (stdenv.hostPlatform.isLinux && stdenv.hostPlatform.isAarch64); description = "Toolkit for the simulation of the passage of particles through matter"; longDescription = '' Geant4 is a toolkit for the simulation of the passage of particles through matter. diff --git a/pkgs/development/libraries/physics/hepmc3/default.nix b/pkgs/development/libraries/physics/hepmc3/default.nix index 53ee798c17b6..c622d7562001 100644 --- a/pkgs/development/libraries/physics/hepmc3/default.nix +++ b/pkgs/development/libraries/physics/hepmc3/default.nix @@ -34,7 +34,7 @@ stdenv.mkDerivation rec { ++ lib.optional withPython python; # error: invalid version number in 'MACOSX_DEPLOYMENT_TARGET=11.0' - preConfigure = lib.optionalString (stdenv.isDarwin && lib.versionAtLeast stdenv.hostPlatform.darwinMinVersion "11") '' + preConfigure = lib.optionalString (stdenv.hostPlatform.isDarwin && lib.versionAtLeast stdenv.hostPlatform.darwinMinVersion "11") '' MACOSX_DEPLOYMENT_TARGET=10.16 ''; diff --git a/pkgs/development/libraries/physics/herwig/default.nix b/pkgs/development/libraries/physics/herwig/default.nix index ef7ce7ce586d..c18ff9bef84d 100644 --- a/pkgs/development/libraries/physics/herwig/default.nix +++ b/pkgs/development/libraries/physics/herwig/default.nix @@ -35,6 +35,6 @@ stdenv.mkDerivation rec { license = licenses.gpl3Only; maintainers = with maintainers; [ veprbl ]; platforms = platforms.unix; - broken = stdenv.isAarch64; # doesn't compile: ignoring return value of 'FILE* freopen... + broken = stdenv.hostPlatform.isAarch64; # doesn't compile: ignoring return value of 'FILE* freopen... }; } diff --git a/pkgs/development/libraries/physics/lhapdf/default.nix b/pkgs/development/libraries/physics/lhapdf/default.nix index 8111f6168430..26ca234c520c 100644 --- a/pkgs/development/libraries/physics/lhapdf/default.nix +++ b/pkgs/development/libraries/physics/lhapdf/default.nix @@ -11,7 +11,7 @@ stdenv.mkDerivation rec { # The Apple SDK only exports locale_t from xlocale.h whereas glibc # had decided that xlocale.h should be a part of locale.h - postPatch = lib.optionalString (stdenv.isDarwin && stdenv.cc.isGNU) '' + postPatch = lib.optionalString (stdenv.hostPlatform.isDarwin && stdenv.cc.isGNU) '' substituteInPlace src/GridPDF.cc --replace '#include ' '#include ' ''; diff --git a/pkgs/development/libraries/physics/nlojet/default.nix b/pkgs/development/libraries/physics/nlojet/default.nix index 4e2d878db00c..6085906758b0 100644 --- a/pkgs/development/libraries/physics/nlojet/default.nix +++ b/pkgs/development/libraries/physics/nlojet/default.nix @@ -16,7 +16,7 @@ stdenv.mkDerivation rec { env.CXXFLAGS="-std=c++11"; # error: no member named 'finite' in the global namespace; did you mean simply 'finite'? - env.NIX_CFLAGS_COMPILE = lib.optionalString (stdenv.isDarwin && stdenv.isAarch64) "-Dfinite=isfinite"; + env.NIX_CFLAGS_COMPILE = lib.optionalString (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isAarch64) "-Dfinite=isfinite"; meta = { homepage = "http://www.desy.de/~znagy/Site/NLOJet++.html"; diff --git a/pkgs/development/libraries/physics/pythia/default.nix b/pkgs/development/libraries/physics/pythia/default.nix index 0eb45943e0aa..55ba50f2ae31 100644 --- a/pkgs/development/libraries/physics/pythia/default.nix +++ b/pkgs/development/libraries/physics/pythia/default.nix @@ -10,7 +10,7 @@ stdenv.mkDerivation rec { }; nativeBuildInputs = [ rsync ] - ++ lib.optionals stdenv.isDarwin [ fixDarwinDylibNames ]; + ++ lib.optionals stdenv.hostPlatform.isDarwin [ fixDarwinDylibNames ]; buildInputs = [ boost fastjet hepmc zlib lhapdf ]; configureFlags = [ diff --git a/pkgs/development/libraries/pixman/default.nix b/pkgs/development/libraries/pixman/default.nix index 71c0b7d47037..dbf742ab81f2 100644 --- a/pkgs/development/libraries/pixman/default.nix +++ b/pkgs/development/libraries/pixman/default.nix @@ -52,7 +52,7 @@ stdenv.mkDerivation (finalAttrs: { "-Diwmmxt=disabled" ] # Disable until https://gitlab.freedesktop.org/pixman/pixman/-/issues/46 is resolved - ++ lib.optional (stdenv.isAarch64 && !stdenv.cc.isGNU) "-Da64-neon=disabled"; + ++ lib.optional (stdenv.hostPlatform.isAarch64 && !stdenv.cc.isGNU) "-Da64-neon=disabled"; preConfigure = '' # https://gitlab.freedesktop.org/pixman/pixman/-/issues/62 @@ -61,7 +61,7 @@ stdenv.mkDerivation (finalAttrs: { enableParallelBuilding = true; - doCheck = !stdenv.isDarwin; + doCheck = !stdenv.hostPlatform.isDarwin; postInstall = glib.flattenInclude; diff --git a/pkgs/development/libraries/plplot/default.nix b/pkgs/development/libraries/plplot/default.nix index b060351a2f26..d49b8da211d8 100644 --- a/pkgs/development/libraries/plplot/default.nix +++ b/pkgs/development/libraries/plplot/default.nix @@ -30,7 +30,7 @@ stdenv.mkDerivation rec { buildInputs = lib.optional enableWX wxGTK32 - ++ lib.optional (enableWX && stdenv.isDarwin) Cocoa + ++ lib.optional (enableWX && stdenv.hostPlatform.isDarwin) Cocoa ++ lib.optional enableXWin xorg.libX11 ++ lib.optionals enablePNG [ cairo diff --git a/pkgs/development/libraries/pmix/default.nix b/pkgs/development/libraries/pmix/default.nix index 69e86acfef23..486164904b2b 100644 --- a/pkgs/development/libraries/pmix/default.nix +++ b/pkgs/development/libraries/pmix/default.nix @@ -31,7 +31,7 @@ stdenv.mkDerivation (finalAttrs: { fetchSubmodules = true; }; - outputs = [ "out" ] ++ lib.optionals stdenv.isLinux [ "dev" ]; + outputs = [ "out" ] ++ lib.optionals stdenv.hostPlatform.isLinux [ "dev" ]; postPatch = '' patchShebangs ./autogen.pl @@ -82,7 +82,7 @@ stdenv.mkDerivation (finalAttrs: { # From some reason the Darwin build doesn't include this file, so we # currently disable this substitution for any non-Linux platform, until a # Darwin user will care enough about this cross platform fix. - + lib.optionalString stdenv.isLinux '' + + lib.optionalString stdenv.hostPlatform.isLinux '' # Pin the compiler to the current version in a cross compiler friendly way. # Same pattern as for openmpi (see https://github.com/NixOS/nixpkgs/pull/58964#discussion_r275059427). substituteInPlace "''${!outputDev}"/share/pmix/pmixcc-wrapper-data.txt \ diff --git a/pkgs/development/libraries/png++/default.nix b/pkgs/development/libraries/png++/default.nix index dfd74e495e76..e3aa6af942e2 100644 --- a/pkgs/development/libraries/png++/default.nix +++ b/pkgs/development/libraries/png++/default.nix @@ -25,7 +25,7 @@ stdenv.mkDerivation rec { propagatedBuildInputs = [ libpng ]; - preConfigure = lib.optionalString stdenv.isDarwin '' + preConfigure = lib.optionalString stdenv.hostPlatform.isDarwin '' substituteInPlace error.hpp --replace "#if (_POSIX_C_SOURCE >= 200112L || _XOPEN_SOURCE >= 600) && !_GNU_SOURCE" "#if (__clang__ || _POSIX_C_SOURCE >= 200112L || _XOPEN_SOURCE >= 600) && !_GNU_SOURCE" '' + '' sed "s|\(PNGPP := .\)|PREFIX := ''${out}\n\\1|" -i Makefile diff --git a/pkgs/development/libraries/polkit-qt-1/default.nix b/pkgs/development/libraries/polkit-qt-1/default.nix index b663c865d233..0fb66ccc7c3d 100644 --- a/pkgs/development/libraries/polkit-qt-1/default.nix +++ b/pkgs/development/libraries/polkit-qt-1/default.nix @@ -27,7 +27,7 @@ mkDerivation rec { glib pcre polkit - ] ++ lib.optionals stdenv.isLinux [ libselinux libsepol util-linux ]; + ] ++ lib.optionals stdenv.hostPlatform.isLinux [ libselinux libsepol util-linux ]; meta = with lib; { description = "Qt wrapper around PolKit"; diff --git a/pkgs/development/libraries/polkit/default.nix b/pkgs/development/libraries/polkit/default.nix index dd3c6aaea354..17b325f52d8f 100644 --- a/pkgs/development/libraries/polkit/default.nix +++ b/pkgs/development/libraries/polkit/default.nix @@ -29,7 +29,7 @@ # Not yet investigated; it may be due to the "Make netgroup support optional" # patch not updating the tests correctly yet, or doing something wrong, # or being unrelated to that. -, doCheck ? (stdenv.isLinux && !stdenv.hostPlatform.isMusl) +, doCheck ? (stdenv.hostPlatform.isLinux && !stdenv.hostPlatform.isMusl) }: let @@ -93,7 +93,7 @@ stdenv.mkDerivation rec { pam dbus duktape - ] ++ lib.optionals stdenv.isLinux [ + ] ++ lib.optionals stdenv.hostPlatform.isLinux [ # On Linux, fall back to elogind when systemd support is off. (if useSystemd then systemdMinimal else elogind) ]; @@ -127,7 +127,7 @@ stdenv.mkDerivation rec { "-Dtests=${lib.boolToString doCheck}" "-Dgtk_doc=${lib.boolToString withIntrospection}" "-Dman=true" - ] ++ lib.optionals stdenv.isLinux [ + ] ++ lib.optionals stdenv.hostPlatform.isLinux [ "-Dsession_tracking=${if useSystemd then "libsystemd-login" else "libelogind"}" ]; diff --git a/pkgs/development/libraries/poppler/default.nix b/pkgs/development/libraries/poppler/default.nix index 2893b5e1b044..368c5a06a463 100644 --- a/pkgs/development/libraries/poppler/default.nix +++ b/pkgs/development/libraries/poppler/default.nix @@ -126,7 +126,7 @@ stdenv.mkDerivation (finalAttrs: rec { dontWrapQtApps = true; # Workaround #54606 - preConfigure = lib.optionalString stdenv.isDarwin '' + preConfigure = lib.optionalString stdenv.hostPlatform.isDarwin '' sed -i -e '1i cmake_policy(SET CMP0025 NEW)' CMakeLists.txt ''; diff --git a/pkgs/development/libraries/popt/default.nix b/pkgs/development/libraries/popt/default.nix index e97629b0dfd0..282203a98af7 100644 --- a/pkgs/development/libraries/popt/default.nix +++ b/pkgs/development/libraries/popt/default.nix @@ -16,7 +16,7 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ updateAutotoolsGnuConfigScriptsHook ]; - patches = lib.optionals stdenv.isCygwin [ + patches = lib.optionals stdenv.hostPlatform.isCygwin [ ./1.16-cygwin.patch ./1.16-vpath.patch ] ++ lib.optionals stdenv.hostPlatform.isMinGW [ diff --git a/pkgs/development/libraries/portaudio/default.nix b/pkgs/development/libraries/portaudio/default.nix index a109aad97b9d..6d338b0f67e0 100644 --- a/pkgs/development/libraries/portaudio/default.nix +++ b/pkgs/development/libraries/portaudio/default.nix @@ -22,13 +22,13 @@ stdenv.mkDerivation rec { strictDeps = true; nativeBuildInputs = [ pkg-config which ]; - buildInputs = [ libjack2 ] ++ lib.optionals (!stdenv.isDarwin) [ alsa-lib ]; + buildInputs = [ libjack2 ] ++ lib.optionals (!stdenv.hostPlatform.isDarwin) [ alsa-lib ]; configureFlags = [ "--disable-mac-universal" "--enable-cxx" ]; env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.cc.isClang "-Wno-error=nullability-inferred-on-nested-type -Wno-error=nullability-completeness-on-arrays -Wno-error=implicit-const-int-float-conversion"; - propagatedBuildInputs = lib.optionals stdenv.isDarwin [ AudioUnit AudioToolbox CoreAudio CoreServices Carbon ]; + propagatedBuildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ AudioUnit AudioToolbox CoreAudio CoreServices Carbon ]; # Disable parallel build as it fails as: # make: *** No rule to make target '../../../lib/libportaudio.la', @@ -45,10 +45,10 @@ stdenv.mkDerivation rec { # not sure why, but all the headers seem to be installed by the make install installPhase = '' make install - '' + lib.optionalString (!stdenv.isDarwin) '' + '' + lib.optionalString (!stdenv.hostPlatform.isDarwin) '' # fixup .pc file to find alsa library sed -i "s|-lasound|-L${alsa-lib.out}/lib -lasound|" "$out/lib/pkgconfig/"*.pc - '' + lib.optionalString stdenv.isDarwin '' + '' + lib.optionalString stdenv.hostPlatform.isDarwin '' cp include/pa_mac_core.h $out/include/pa_mac_core.h ''; diff --git a/pkgs/development/libraries/portmidi/default.nix b/pkgs/development/libraries/portmidi/default.nix index 8e743f6a54b3..eac2a369fd0b 100644 --- a/pkgs/development/libraries/portmidi/default.nix +++ b/pkgs/development/libraries/portmidi/default.nix @@ -27,9 +27,9 @@ stdenv.mkDerivation rec { ''; nativeBuildInputs = [ unzip cmake ]; - buildInputs = lib.optionals stdenv.isLinux [ + buildInputs = lib.optionals stdenv.hostPlatform.isLinux [ alsa-lib - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ Carbon CoreAudio CoreFoundation CoreMIDI CoreServices ]; diff --git a/pkgs/development/libraries/ppl/default.nix b/pkgs/development/libraries/ppl/default.nix index 863ffed42932..37e5f78c6027 100644 --- a/pkgs/development/libraries/ppl/default.nix +++ b/pkgs/development/libraries/ppl/default.nix @@ -28,7 +28,7 @@ stdenv.mkDerivation { propagatedBuildInputs = [ gmpxx ]; configureFlags = [ "--disable-watchdog" ] ++ - lib.optionals stdenv.isDarwin [ + lib.optionals stdenv.hostPlatform.isDarwin [ "CPPFLAGS=-fexceptions" "--disable-ppl_lcdd" "--disable-ppl_lpsol" "--disable-ppl_pips" ]; diff --git a/pkgs/development/libraries/precice/default.nix b/pkgs/development/libraries/precice/default.nix index 372a2940e0ae..56dd58781bdf 100644 --- a/pkgs/development/libraries/precice/default.nix +++ b/pkgs/development/libraries/precice/default.nix @@ -19,7 +19,7 @@ stdenv.mkDerivation rec { ]; env.NIX_CFLAGS_COMPILE = toString ( - lib.optionals stdenv.isDarwin [ "-D_GNU_SOURCE" ] + lib.optionals stdenv.hostPlatform.isDarwin [ "-D_GNU_SOURCE" ] # libxml2-2.12 changed const qualifiers ++ [ "-fpermissive" ] ); diff --git a/pkgs/development/libraries/proj/default.nix b/pkgs/development/libraries/proj/default.nix index 8fedba3ef08c..615d2590c023 100644 --- a/pkgs/development/libraries/proj/default.nix +++ b/pkgs/development/libraries/proj/default.nix @@ -51,7 +51,7 @@ stdenv.mkDerivation (finalAttrs: { preCheck = let - libPathEnvVar = if stdenv.isDarwin then "DYLD_LIBRARY_PATH" else "LD_LIBRARY_PATH"; + libPathEnvVar = if stdenv.hostPlatform.isDarwin then "DYLD_LIBRARY_PATH" else "LD_LIBRARY_PATH"; in '' export HOME=$TMPDIR diff --git a/pkgs/development/libraries/protobuf/generic-v3.nix b/pkgs/development/libraries/protobuf/generic-v3.nix index 9dc7f70c2fe2..cfcaa5551526 100644 --- a/pkgs/development/libraries/protobuf/generic-v3.nix +++ b/pkgs/development/libraries/protobuf/generic-v3.nix @@ -25,7 +25,7 @@ mkProtobufDerivation = buildProtobuf: stdenv: stdenv.mkDerivation { chmod -R a+w gmock chmod -R a+w googletest ln -s ../googletest gmock/gtest - '' + lib.optionalString stdenv.isDarwin '' + '' + lib.optionalString stdenv.hostPlatform.isDarwin '' substituteInPlace src/google/protobuf/testing/googletest.cc \ --replace 'tmpnam(b)' '"'$TMPDIR'/foo"' ''; diff --git a/pkgs/development/libraries/protobuf/generic.nix b/pkgs/development/libraries/protobuf/generic.nix index 71f8e90b774a..0b52ea7de22e 100644 --- a/pkgs/development/libraries/protobuf/generic.nix +++ b/pkgs/development/libraries/protobuf/generic.nix @@ -32,7 +32,7 @@ stdenv.mkDerivation (finalAttrs: { inherit hash; }; - postPatch = lib.optionalString stdenv.isDarwin '' + postPatch = lib.optionalString stdenv.hostPlatform.isDarwin '' substituteInPlace src/google/protobuf/testing/googletest.cc \ --replace 'tmpnam(b)' '"'$TMPDIR'/foo"' ''; @@ -85,7 +85,7 @@ stdenv.mkDerivation (finalAttrs: { # https://hydra.nixos.org/build/235677717/nixlog/4/tail # Also AnyTest.TestPackFromSerializationExceedsSizeLimit fails on 32-bit platforms # https://github.com/protocolbuffers/protobuf/issues/8460 - doCheck = !(stdenv.isDarwin && lib.versionAtLeast version "23") && !stdenv.hostPlatform.is32bit; + doCheck = !(stdenv.hostPlatform.isDarwin && lib.versionAtLeast version "23") && !stdenv.hostPlatform.is32bit; passthru = { tests = { diff --git a/pkgs/development/libraries/pslib/default.nix b/pkgs/development/libraries/pslib/default.nix index 02a8fcde91ef..13a2b17a3e01 100644 --- a/pkgs/development/libraries/pslib/default.nix +++ b/pkgs/development/libraries/pslib/default.nix @@ -14,7 +14,7 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ cmake pkg-config ]; buildInputs = [ zlib libpng libjpeg giflib libtiff ]; - env = lib.optionalAttrs stdenv.isDarwin { + env = lib.optionalAttrs stdenv.hostPlatform.isDarwin { NIX_CFLAGS_COMPILE = "-Wno-error=implicit-function-declaration"; }; diff --git a/pkgs/development/libraries/pth/default.nix b/pkgs/development/libraries/pth/default.nix index bbbc5017c410..3d4c056b71dd 100644 --- a/pkgs/development/libraries/pth/default.nix +++ b/pkgs/development/libraries/pth/default.nix @@ -9,7 +9,7 @@ stdenv.mkDerivation rec { sha256 = "0ckjqw5kz5m30srqi87idj7xhpw6bpki43mj07bazjm2qmh3cdbj"; }; - preConfigure = lib.optionalString stdenv.isAarch32 '' + preConfigure = lib.optionalString stdenv.hostPlatform.isAarch32 '' configureFlagsArray=("CFLAGS=-DJB_SP=8 -DJB_PC=9") '' + lib.optionalString (stdenv.hostPlatform.libc == "glibc") '' configureFlagsArray+=("ac_cv_check_sjlj=ssjlj") diff --git a/pkgs/development/libraries/python-qt/default.nix b/pkgs/development/libraries/python-qt/default.nix index f79487a3c4b9..4f417c5e15e3 100644 --- a/pkgs/development/libraries/python-qt/default.nix +++ b/pkgs/development/libraries/python-qt/default.nix @@ -44,7 +44,7 @@ stdenv.mkDerivation (finalAttrs: { cp -r ./extensions $out/include/PythonQt ''; - preFixup = lib.optionalString stdenv.isDarwin '' + preFixup = lib.optionalString stdenv.hostPlatform.isDarwin '' install_name_tool -id \ $out/lib/libPythonQt-Qt5-Python3.${python3.sourceVersion.minor}.dylib \ $out/lib/libPythonQt-Qt5-Python3.${python3.sourceVersion.minor}.dylib diff --git a/pkgs/development/libraries/qhull/default.nix b/pkgs/development/libraries/qhull/default.nix index a7f1bc271155..998575bb166c 100644 --- a/pkgs/development/libraries/qhull/default.nix +++ b/pkgs/development/libraries/qhull/default.nix @@ -12,7 +12,7 @@ stdenv.mkDerivation rec { }; nativeBuildInputs = [ cmake ] - ++ lib.optional stdenv.isDarwin fixDarwinDylibNames; + ++ lib.optional stdenv.hostPlatform.isDarwin fixDarwinDylibNames; meta = with lib; { homepage = "http://www.qhull.org/"; diff --git a/pkgs/development/libraries/qmltermwidget/default.nix b/pkgs/development/libraries/qmltermwidget/default.nix index 0984912463e1..6ba9418a6e20 100644 --- a/pkgs/development/libraries/qmltermwidget/default.nix +++ b/pkgs/development/libraries/qmltermwidget/default.nix @@ -26,7 +26,7 @@ stdenv.mkDerivation { buildInputs = [ qtbase qtmultimedia - ] ++ lib.optional stdenv.isDarwin utmp; + ] ++ lib.optional stdenv.hostPlatform.isDarwin utmp; patches = [ # Changes required to make it compatible with lomiri-terminal-app diff --git a/pkgs/development/libraries/qrencode/default.nix b/pkgs/development/libraries/qrencode/default.nix index 237751c6f8f2..8a52fce9c74a 100644 --- a/pkgs/development/libraries/qrencode/default.nix +++ b/pkgs/development/libraries/qrencode/default.nix @@ -14,7 +14,7 @@ stdenv.mkDerivation (finalAttrs: rec { nativeBuildInputs = [ pkg-config ]; buildInputs = [ libiconv libpng ] - ++ lib.optionals stdenv.isDarwin [ libobjc ]; + ++ lib.optionals stdenv.hostPlatform.isDarwin [ libobjc ]; nativeCheckInputs = [ SDL2 ]; diff --git a/pkgs/development/libraries/qrupdate/default.nix b/pkgs/development/libraries/qrupdate/default.nix index 282b926b2e77..a3ccff5c1093 100644 --- a/pkgs/development/libraries/qrupdate/default.nix +++ b/pkgs/development/libraries/qrupdate/default.nix @@ -31,7 +31,7 @@ stdenv.mkDerivation (finalAttrs: { ]; # https://github.com/mpimd-csc/qrupdate-ng/issues/4 - patches = lib.optionals (stdenv.isDarwin && stdenv.isx86_64) [ + patches = lib.optionals (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isx86_64) [ ./disable-zch1dn-test.patch ]; diff --git a/pkgs/development/libraries/qscintilla/default.nix b/pkgs/development/libraries/qscintilla/default.nix index 69adf65643d0..0d8df9b316b8 100644 --- a/pkgs/development/libraries/qscintilla/default.nix +++ b/pkgs/development/libraries/qscintilla/default.nix @@ -10,7 +10,7 @@ }: let - stdenv' = if stdenv.isDarwin then + stdenv' = if stdenv.hostPlatform.isDarwin then darwin.apple_sdk_11_0.stdenv else stdenv @@ -28,10 +28,10 @@ in stdenv'.mkDerivation rec { buildInputs = [ qtbase ]; - propagatedBuildInputs = lib.optionals stdenv.isDarwin [ qtmacextras ]; + propagatedBuildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ qtmacextras ]; nativeBuildInputs = [ unzip qmake ] - ++ lib.optionals stdenv.isDarwin [ fixDarwinDylibNames ]; + ++ lib.optionals stdenv.hostPlatform.isDarwin [ fixDarwinDylibNames ]; # Make sure that libqscintilla2.so is available in $out/lib since it is expected # by some packages such as sqlitebrowser @@ -71,6 +71,6 @@ in stdenv'.mkDerivation rec { maintainers = with maintainers; [ peterhoeg ]; platforms = platforms.unix; # ld: library not found for -lcups - broken = stdenv.isDarwin && lib.versionAtLeast qtbase.version "6"; + broken = stdenv.hostPlatform.isDarwin && lib.versionAtLeast qtbase.version "6"; }; } diff --git a/pkgs/development/libraries/qt-5/5.15/default.nix b/pkgs/development/libraries/qt-5/5.15/default.nix index af2f431dfb40..2f57b1c62de4 100644 --- a/pkgs/development/libraries/qt-5/5.15/default.nix +++ b/pkgs/development/libraries/qt-5/5.15/default.nix @@ -28,7 +28,7 @@ let qtCompatVersion = srcs.qtbase.version; patches = { - qtbase = lib.optionals stdenv.isDarwin [ + qtbase = lib.optionals stdenv.hostPlatform.isDarwin [ ./qtbase.patch.d/0001-qtbase-mkspecs-mac.patch # Patch framework detection to support X.framework/X.tbd, @@ -63,7 +63,7 @@ let hash = "sha256-UEvIXzn387f9BAeBdhheStD/4M7en+rmqX8C6gstl6k="; }) ]; - qtmultimedia = lib.optionals stdenv.isDarwin [ + qtmultimedia = lib.optionals stdenv.hostPlatform.isDarwin [ # build patch for qtmultimedia with xcode 15 (fetchpatch { url = "https://raw.githubusercontent.com/Homebrew/formula-patches/3f509180/qt5/qt5-qtmultimedia-xcode15.patch"; @@ -184,7 +184,7 @@ let # See: https://bugreports.qt.io/browse/QTBUG-124375 # Backport of: https://code.qt.io/cgit/qt/qtwebengine-chromium.git/commit/?id=a766045f65f934df3b5f1aa63bc86fbb3e003a09 ./qtwebengine-ninja-1.12.patch - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ ./qtwebengine-darwin-no-platform-check.patch ./qtwebengine-mac-dont-set-dsymutil-path.patch ./qtwebengine-darwin-checks.patch @@ -218,7 +218,7 @@ let ./qtwebkit.patch ./qtwebkit-icu68.patch ./qtwebkit-cstdint.patch - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ ./qtwebkit-darwin-no-readline.patch ./qtwebkit-darwin-no-qos-classes.patch ]; @@ -248,7 +248,7 @@ let inherit (srcs.qtbase) src version; patches = patches.qtbase; inherit bison cups harfbuzz libGL; - withGtk3 = !stdenv.isDarwin; inherit dconf gtk3; + withGtk3 = !stdenv.hostPlatform.isDarwin; inherit dconf gtk3; inherit developerBuild decryptSslTraffic; inherit (darwin.apple_sdk_11_0.frameworks) AGL AppKit ApplicationServices AVFoundation Carbon Cocoa CoreAudio CoreBluetooth CoreLocation CoreServices DiskArbitration Foundation OpenGL MetalKit IOKit; @@ -311,7 +311,7 @@ let # clang is pinned to clang 15. That also makes fixing the second set of errors unnecessary. stdenv = let stdenv' = if stdenv.cc.isClang then overrideLibcxx llvmPackages_15.stdenv else stdenv; - in if stdenv'.isDarwin then overrideSDK stdenv' "11.0" else stdenv'; + in if stdenv'.hostPlatform.isDarwin then overrideSDK stdenv' "11.0" else stdenv'; inherit (srcs.qtwebengine) version; python = python3; inherit (darwin) xnu; @@ -343,8 +343,8 @@ let qtscript qtsensors qtserialport qtsvg qttools qttranslations qtvirtualkeyboard qtwebchannel qtwebengine qtwebsockets qtwebview qtx11extras qtxmlpatterns qtlottie qtdatavis3d - ] ++ lib.optional (!stdenv.isDarwin) qtwayland - ++ lib.optional (stdenv.isDarwin) qtmacextras); + ] ++ lib.optional (!stdenv.hostPlatform.isDarwin) qtwayland + ++ lib.optional (stdenv.hostPlatform.isDarwin) qtmacextras); qmake = callPackage ({ qtbase }: makeSetupHook { name = "qmake-hook"; @@ -360,7 +360,7 @@ let wrapQtAppsHook = callPackage ({ makeBinaryWrapper, qtbase, qtwayland }: makeSetupHook { name = "wrap-qt5-apps-hook"; propagatedBuildInputs = [ qtbase.dev makeBinaryWrapper ] - ++ lib.optional stdenv.isLinux qtwayland.dev; + ++ lib.optional stdenv.hostPlatform.isLinux qtwayland.dev; } ../hooks/wrap-qt-apps-hook.sh) { }; }; diff --git a/pkgs/development/libraries/qt-5/modules/qt3d.nix b/pkgs/development/libraries/qt-5/modules/qt3d.nix index f394ff6627e0..c54f4b7d7b48 100644 --- a/pkgs/development/libraries/qt-5/modules/qt3d.nix +++ b/pkgs/development/libraries/qt-5/modules/qt3d.nix @@ -5,5 +5,5 @@ qtModule { propagatedBuildInputs = [ qtbase qtdeclarative ]; outputs = [ "out" "dev" "bin" ]; # error: use of undeclared identifier 'stat64' - env.NIX_CFLAGS_COMPILE = lib.optionalString (stdenv.isDarwin && stdenv.isAarch64) "-Dstat64=stat"; + env.NIX_CFLAGS_COMPILE = lib.optionalString (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isAarch64) "-Dstat64=stat"; } diff --git a/pkgs/development/libraries/qt-5/modules/qtbase.nix b/pkgs/development/libraries/qt-5/modules/qtbase.nix index 7f3079d5add5..7aef466b7937 100644 --- a/pkgs/development/libraries/qt-5/modules/qtbase.nix +++ b/pkgs/development/libraries/qt-5/modules/qtbase.nix @@ -18,7 +18,7 @@ , withQttranslation ? true, qttranslations ? null # options -, libGLSupported ? !stdenv.isDarwin +, libGLSupported ? !stdenv.hostPlatform.isDarwin , libGL # qmake detection for libmysqlclient does not seem to work when cross compiling , mysqlSupport ? stdenv.hostPlatform == stdenv.buildPlatform @@ -55,7 +55,7 @@ stdenv.mkDerivation (finalAttrs: ({ libjpeg libpng pcre2 ] ++ ( - if stdenv.isDarwin then [ + if stdenv.hostPlatform.isDarwin then [ # TODO: move to buildInputs, this should not be propagated. AGL AppKit ApplicationServices AVFoundation Carbon Cocoa CoreAudio CoreBluetooth CoreLocation CoreServices DiskArbitration Foundation OpenGL @@ -75,7 +75,7 @@ stdenv.mkDerivation (finalAttrs: ({ ); buildInputs = [ python3 at-spi2-core ] - ++ lib.optionals (!stdenv.isDarwin) + ++ lib.optionals (!stdenv.hostPlatform.isDarwin) ( [ libinput ] ++ lib.optional withGtk3 gtk3 @@ -86,7 +86,7 @@ stdenv.mkDerivation (finalAttrs: ({ ++ lib.optional (postgresql != null) postgresql; nativeBuildInputs = [ bison flex gperf lndir perl pkg-config which ] - ++ lib.optionals stdenv.isDarwin [ xcbuild ]; + ++ lib.optionals stdenv.hostPlatform.isDarwin [ xcbuild ]; } // lib.optionalAttrs (stdenv.buildPlatform != stdenv.hostPlatform) { # `qtbase` expects to find `cc` (with no prefix) in the @@ -99,7 +99,7 @@ stdenv.mkDerivation (finalAttrs: ({ # libQt5Core links calls CoreFoundation APIs that call into the system ICU. Binaries linked # against it will crash during build unless they can access `/usr/share/icu/icudtXXl.dat`. - propagatedSandboxProfile = lib.optionalString stdenv.isDarwin '' + propagatedSandboxProfile = lib.optionalString stdenv.hostPlatform.isDarwin '' (allow file-read* (subpath "/usr/share/icu")) ''; @@ -140,7 +140,7 @@ stdenv.mkDerivation (finalAttrs: ({ patchShebangs ./bin '' + ( - if stdenv.isDarwin then '' + if stdenv.hostPlatform.isDarwin then '' sed -i \ -e 's|/usr/bin/xcode-select|xcode-select|' \ -e 's|/usr/bin/xcrun|xcrun|' \ @@ -217,7 +217,7 @@ stdenv.mkDerivation (finalAttrs: ({ ''-DLIBRESOLV_SO="${stdenv.cc.libc.out}/lib/libresolv"'' ''-DNIXPKGS_LIBXCURSOR="${libXcursor.out}/lib/libXcursor"'' ] ++ lib.optional libGLSupported ''-DNIXPKGS_MESA_GL="${libGL.out}/lib/libGL"'' - ++ lib.optional stdenv.isLinux "-DUSE_X11" + ++ lib.optional stdenv.hostPlatform.isLinux "-DUSE_X11" ++ lib.optionals (stdenv.hostPlatform.system == "x86_64-darwin") [ # ignore "is only available on macOS 10.12.2 or newer" in obj-c code "-Wno-error=unguarded-availability" @@ -318,7 +318,7 @@ stdenv.mkDerivation (finalAttrs: ({ ''-${lib.optionalString (!buildTests) "no"}make tests'' ] ++ ( - if stdenv.isDarwin then [ + if stdenv.hostPlatform.isDarwin then [ "-no-fontconfig" "-qt-freetype" "-qt-libpng" diff --git a/pkgs/development/libraries/qt-5/modules/qtconnectivity.nix b/pkgs/development/libraries/qt-5/modules/qtconnectivity.nix index 81efb4bee04b..d61619613eba 100644 --- a/pkgs/development/libraries/qt-5/modules/qtconnectivity.nix +++ b/pkgs/development/libraries/qt-5/modules/qtconnectivity.nix @@ -2,11 +2,11 @@ qtModule { pname = "qtconnectivity"; - buildInputs = lib.optional stdenv.isLinux bluez; + buildInputs = lib.optional stdenv.hostPlatform.isLinux bluez; propagatedBuildInputs = [ qtbase qtdeclarative - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ IOBluetooth ]; outputs = [ "out" "dev" "bin" ]; diff --git a/pkgs/development/libraries/qt-5/modules/qtdatavis3d.nix b/pkgs/development/libraries/qt-5/modules/qtdatavis3d.nix index d79320ea139f..e89a735d77b8 100644 --- a/pkgs/development/libraries/qt-5/modules/qtdatavis3d.nix +++ b/pkgs/development/libraries/qt-5/modules/qtdatavis3d.nix @@ -5,5 +5,5 @@ qtModule { propagatedBuildInputs = [ qtbase qtdeclarative ]; outputs = [ "out" "dev" "bin" ]; # error: use of undeclared identifier 'stat64' - env.NIX_CFLAGS_COMPILE = lib.optionalString (stdenv.isDarwin && stdenv.isAarch64) "-Dstat64=stat"; + env.NIX_CFLAGS_COMPILE = lib.optionalString (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isAarch64) "-Dstat64=stat"; } diff --git a/pkgs/development/libraries/qt-5/modules/qtgamepad.nix b/pkgs/development/libraries/qt-5/modules/qtgamepad.nix index 398572673171..8d0a0e2177fa 100644 --- a/pkgs/development/libraries/qt-5/modules/qtgamepad.nix +++ b/pkgs/development/libraries/qt-5/modules/qtgamepad.nix @@ -3,7 +3,7 @@ qtModule { pname = "qtgamepad"; propagatedBuildInputs = [ qtbase qtdeclarative ] - ++ lib.optional stdenv.isDarwin GameController; + ++ lib.optional stdenv.hostPlatform.isDarwin GameController; buildInputs = [ ]; nativeBuildInputs = [ pkg-config ]; outputs = [ "out" "dev" "bin" ]; diff --git a/pkgs/development/libraries/qt-5/modules/qtlocation.nix b/pkgs/development/libraries/qt-5/modules/qtlocation.nix index 338911a5afd5..35627af0c685 100644 --- a/pkgs/development/libraries/qt-5/modules/qtlocation.nix +++ b/pkgs/development/libraries/qt-5/modules/qtlocation.nix @@ -4,7 +4,7 @@ qtModule { pname = "qtlocation"; propagatedBuildInputs = [ qtbase qtmultimedia ]; outputs = [ "bin" "out" "dev" ]; - qmakeFlags = lib.optionals stdenv.isDarwin [ + qmakeFlags = lib.optionals stdenv.hostPlatform.isDarwin [ # boost uses std::auto_ptr which has been disabled in clang with libcxx # This flag re-enables this feature # https://libcxx.llvm.org/docs/UsingLibcxx.html#c-17-specific-configuration-macros diff --git a/pkgs/development/libraries/qt-5/modules/qtmultimedia.nix b/pkgs/development/libraries/qt-5/modules/qtmultimedia.nix index d5dc16c52823..0346ca23c5e2 100644 --- a/pkgs/development/libraries/qt-5/modules/qtmultimedia.nix +++ b/pkgs/development/libraries/qt-5/modules/qtmultimedia.nix @@ -17,8 +17,8 @@ qtModule { nativeBuildInputs = [ pkg-config ]; buildInputs = [ gstreamer gst-plugins-base ] # https://github.com/NixOS/nixpkgs/pull/169336 regarding libpulseaudio - ++ lib.optionals stdenv.isLinux [ libpulseaudio alsa-lib wayland ]; + ++ lib.optionals stdenv.hostPlatform.isLinux [ libpulseaudio alsa-lib wayland ]; outputs = [ "bin" "dev" "out" ]; qmakeFlags = [ "GST_VERSION=1.0" ]; - NIX_LDFLAGS = lib.optionalString (stdenv.isDarwin) "-lobjc"; + NIX_LDFLAGS = lib.optionalString (stdenv.hostPlatform.isDarwin) "-lobjc"; } diff --git a/pkgs/development/libraries/qt-5/modules/qtserialport.nix b/pkgs/development/libraries/qt-5/modules/qtserialport.nix index 7907f91b986b..3d5c00a3575e 100644 --- a/pkgs/development/libraries/qt-5/modules/qtserialport.nix +++ b/pkgs/development/libraries/qt-5/modules/qtserialport.nix @@ -3,5 +3,5 @@ qtModule { pname = "qtserialport"; propagatedBuildInputs = [ qtbase ]; - env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.isLinux "-DNIXPKGS_LIBUDEV=\"${lib.getLib systemd}/lib/libudev\""; + env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.hostPlatform.isLinux "-DNIXPKGS_LIBUDEV=\"${lib.getLib systemd}/lib/libudev\""; } diff --git a/pkgs/development/libraries/qt-5/modules/qtspeech.nix b/pkgs/development/libraries/qt-5/modules/qtspeech.nix index 17bc16dab4fc..d60a12f3854d 100644 --- a/pkgs/development/libraries/qt-5/modules/qtspeech.nix +++ b/pkgs/development/libraries/qt-5/modules/qtspeech.nix @@ -3,7 +3,7 @@ qtModule { pname = "qtspeech"; propagatedBuildInputs = [ ]; - buildInputs = lib.optionals stdenv.isLinux [ speechd-minimal ]; + buildInputs = lib.optionals stdenv.hostPlatform.isLinux [ speechd-minimal ]; nativeBuildInputs = [ pkg-config ]; outputs = [ "out" "dev" ]; } diff --git a/pkgs/development/libraries/qt-5/modules/qttools.nix b/pkgs/development/libraries/qt-5/modules/qttools.nix index 37e4348ed2c2..b728620362f9 100644 --- a/pkgs/development/libraries/qt-5/modules/qttools.nix +++ b/pkgs/development/libraries/qt-5/modules/qttools.nix @@ -32,11 +32,11 @@ qtModule { "bin/qthelpconverter" "bin/lprodump" "bin/qdistancefieldgenerator" - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ "bin/macdeployqt" ]; - env.NIX_CFLAGS_COMPILE = lib.optionalString (stdenv.isDarwin && qtdeclarative != null) ''-DNIXPKGS_QMLIMPORTSCANNER="${qtdeclarative.dev}/bin/qmlimportscanner"''; + env.NIX_CFLAGS_COMPILE = lib.optionalString (stdenv.hostPlatform.isDarwin && qtdeclarative != null) ''-DNIXPKGS_QMLIMPORTSCANNER="${qtdeclarative.dev}/bin/qmlimportscanner"''; setupHook = ../hooks/qttools-setup-hook.sh; } diff --git a/pkgs/development/libraries/qt-5/modules/qtwebengine.nix b/pkgs/development/libraries/qt-5/modules/qtwebengine.nix index 1a63c9508c05..75149cfb5a8b 100644 --- a/pkgs/development/libraries/qt-5/modules/qtwebengine.nix +++ b/pkgs/development/libraries/qt-5/modules/qtwebengine.nix @@ -29,7 +29,7 @@ , lib, stdenv , version ? null , qtCompatVersion -, pipewireSupport ? stdenv.isLinux +, pipewireSupport ? stdenv.hostPlatform.isLinux , pipewire , postPatch ? "" , nspr @@ -65,7 +65,7 @@ qtModule ({ pkgsBuildBuild.pkg-config (lib.getDev pkgsBuildTarget.targetPackages.qt5.qtquickcontrols) pkg-config-wrapped-without-prefix - ] ++ lib.optional stdenv.isDarwin xcbuild; + ] ++ lib.optional stdenv.hostPlatform.isDarwin xcbuild; doCheck = true; outputs = [ "bin" "dev" "out" ]; @@ -135,7 +135,7 @@ qtModule ({ # Prevent Chromium build script from making the path to `clang` relative to # the build directory. `clang_base_path` is the value of `QMAKE_CLANG_DIR` # from `src/core/config/mac_osx.pri`. - + lib.optionalString stdenv.isDarwin '' + + lib.optionalString stdenv.hostPlatform.isDarwin '' substituteInPlace ./src/3rdparty/chromium/build/toolchain/mac/BUILD.gn \ --replace 'prefix = rebase_path("$clang_base_path/bin/", root_build_dir)' 'prefix = "$clang_base_path/bin/"' '' @@ -148,13 +148,13 @@ qtModule ({ src/core/web_engine_library_info.cpp '' # Patch library paths in Chromium sources - + lib.optionalString (!stdenv.isDarwin) '' + + lib.optionalString (!stdenv.hostPlatform.isDarwin) '' sed -i -e '/lib_loader.*Load/s!"\(libudev\.so\)!"${lib.getLib systemd}/lib/\1!' \ src/3rdparty/chromium/device/udev_linux/udev?_loader.cc sed -i -e '/libpci_loader.*Load/s!"\(libpci\.so\)!"${pciutils}/lib/\1!' \ src/3rdparty/chromium/gpu/config/gpu_info_collector_linux.cc - '' + lib.optionalString stdenv.isDarwin ('' + '' + lib.optionalString stdenv.hostPlatform.isDarwin ('' substituteInPlace src/buildtools/config/mac_osx.pri \ --replace 'QMAKE_CLANG_DIR = "/usr"' 'QMAKE_CLANG_DIR = "${stdenv.cc}"' @@ -233,7 +233,7 @@ qtModule ({ libevent ffmpeg_7 - ] ++ lib.optionals (!stdenv.isDarwin) [ + ] ++ lib.optionals (!stdenv.hostPlatform.isDarwin) [ dbus zlib minizip snappy nss protobuf jsoncpp # Audio formats @@ -257,7 +257,7 @@ qtModule ({ # FIXME These dependencies shouldn't be needed but can't find a way # around it. Chromium pulls this in while bootstrapping GN. - ++ lib.optionals stdenv.isDarwin [ + ++ lib.optionals stdenv.hostPlatform.isDarwin [ libobjc cctools @@ -287,7 +287,7 @@ qtModule ({ libunwind ]; - buildInputs = lib.optionals stdenv.isDarwin [ + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ cups libpm sandbox @@ -313,7 +313,7 @@ qtModule ({ postInstall = lib.optionalString (stdenv.buildPlatform != stdenv.hostPlatform) '' mkdir -p $out/libexec - '' + lib.optionalString stdenv.isLinux '' + '' + lib.optionalString stdenv.hostPlatform.isLinux '' cat > $out/libexec/qt.conf < maybe 12 hours on 4x2.4GHz timeout = 24 * 3600; # Not compatible with macOS 11 without massive patching - broken = stdenv.isDarwin && lib.versionOlder stdenv.hostPlatform.darwinMinVersion "12"; + broken = stdenv.hostPlatform.isDarwin && lib.versionOlder stdenv.hostPlatform.darwinMinVersion "12"; }; } diff --git a/pkgs/development/libraries/qtkeychain/default.nix b/pkgs/development/libraries/qtkeychain/default.nix index 9007129cecf5..b6744692bbe8 100644 --- a/pkgs/development/libraries/qtkeychain/default.nix +++ b/pkgs/development/libraries/qtkeychain/default.nix @@ -29,12 +29,12 @@ stdenv.mkDerivation rec { ]; nativeBuildInputs = [ cmake ] - ++ lib.optionals (!stdenv.isDarwin) [ pkg-config ] # for finding libsecret + ++ lib.optionals (!stdenv.hostPlatform.isDarwin) [ pkg-config ] # for finding libsecret ; - buildInputs = lib.optionals (!stdenv.isDarwin) [ libsecret ] + buildInputs = lib.optionals (!stdenv.hostPlatform.isDarwin) [ libsecret ] ++ [ qtbase qttools ] - ++ lib.optionals stdenv.isDarwin [ + ++ lib.optionals stdenv.hostPlatform.isDarwin [ CoreFoundation Security ]; diff --git a/pkgs/development/libraries/qtpbfimageplugin/default.nix b/pkgs/development/libraries/qtpbfimageplugin/default.nix index 94dc1646513c..5005ab8243d4 100644 --- a/pkgs/development/libraries/qtpbfimageplugin/default.nix +++ b/pkgs/development/libraries/qtpbfimageplugin/default.nix @@ -20,7 +20,7 @@ stdenv.mkDerivation rec { # Fix plugin dir substituteInPlace pbfplugin.pro \ --replace "\$\$[QT_INSTALL_PLUGINS]" "$out/$qtPluginPrefix" - '' + lib.optionalString stdenv.isDarwin '' + '' + lib.optionalString stdenv.hostPlatform.isDarwin '' # Fix darwin build substituteInPlace pbfplugin.pro \ --replace '$$PROTOBUF/include' '${protobuf}/include' \ diff --git a/pkgs/development/libraries/quarto/default.nix b/pkgs/development/libraries/quarto/default.nix index 11350128b4aa..a3a633af6c94 100644 --- a/pkgs/development/libraries/quarto/default.nix +++ b/pkgs/development/libraries/quarto/default.nix @@ -63,7 +63,7 @@ stdenv.mkDerivation (final: { passthru.tests = { quarto-check = runCommand "quarto-check" { - nativeBuildInputs = lib.optionals stdenv.isDarwin [ sysctl ]; + nativeBuildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ sysctl ]; } '' export HOME="$(mktemp -d)" ${quarto}/bin/quarto check diff --git a/pkgs/development/libraries/quazip/default.nix b/pkgs/development/libraries/quazip/default.nix index c3f1f7a7834a..b2fcad6cab87 100644 --- a/pkgs/development/libraries/quazip/default.nix +++ b/pkgs/development/libraries/quazip/default.nix @@ -14,7 +14,7 @@ stdenv.mkDerivation rec { buildInputs = [ zlib qtbase ]; propagatedBuildInputs = [ qt5compat ]; nativeBuildInputs = [ cmake ] - ++ lib.optional stdenv.isDarwin fixDarwinDylibNames; + ++ lib.optional stdenv.hostPlatform.isDarwin fixDarwinDylibNames; dontWrapQtApps = true; diff --git a/pkgs/development/libraries/quickfix/default.nix b/pkgs/development/libraries/quickfix/default.nix index 0c327d0d5e59..bd4612c8eec1 100644 --- a/pkgs/development/libraries/quickfix/default.nix +++ b/pkgs/development/libraries/quickfix/default.nix @@ -55,6 +55,6 @@ stdenv.mkDerivation rec { homepage = "http://www.quickfixengine.org"; license = licenses.free; # similar to BSD 4-clause maintainers = with maintainers; [ bhipple ]; - broken = stdenv.isAarch64; + broken = stdenv.hostPlatform.isAarch64; }; } diff --git a/pkgs/development/libraries/quictls/default.nix b/pkgs/development/libraries/quictls/default.nix index 49dfc94993e4..1e3cb69d1f82 100644 --- a/pkgs/development/libraries/quictls/default.nix +++ b/pkgs/development/libraries/quictls/default.nix @@ -119,7 +119,7 @@ stdenv.mkDerivation (finalAttrs: { ++ lib.optional enableSSL3 "enable-ssl3" # We select KTLS here instead of the configure-time detection (which we patch out). # KTLS should work on FreeBSD 13+ as well, so we could enable it if someone tests it. - ++ lib.optional (stdenv.isLinux && lib.versionAtLeast finalAttrs.version "3.0.0") "enable-ktls" + ++ lib.optional (stdenv.hostPlatform.isLinux && lib.versionAtLeast finalAttrs.version "3.0.0") "enable-ktls" ++ lib.optional stdenv.hostPlatform.isAarch64 "no-afalgeng" # OpenSSL needs a specific `no-shared` configure flag. # See https://wiki.openssl.org/index.php/Compilation_and_Installation#Configure_Options diff --git a/pkgs/development/libraries/qwt/default.nix b/pkgs/development/libraries/qwt/default.nix index dec84c1c4955..814e8f0252c1 100644 --- a/pkgs/development/libraries/qwt/default.nix +++ b/pkgs/development/libraries/qwt/default.nix @@ -12,7 +12,7 @@ stdenv.mkDerivation rec { }; propagatedBuildInputs = [ qtbase qtsvg qttools ]; - nativeBuildInputs = [ qmake ] ++ lib.optional stdenv.isDarwin fixDarwinDylibNames; + nativeBuildInputs = [ qmake ] ++ lib.optional stdenv.hostPlatform.isDarwin fixDarwinDylibNames; postPatch = '' sed -e "s|QWT_INSTALL_PREFIX.*=.*|QWT_INSTALL_PREFIX = $out|g" -i qwtconfig.pri diff --git a/pkgs/development/libraries/range-v3/default.nix b/pkgs/development/libraries/range-v3/default.nix index 3ef599887eb4..a7e5fe6eb263 100644 --- a/pkgs/development/libraries/range-v3/default.nix +++ b/pkgs/development/libraries/range-v3/default.nix @@ -16,9 +16,9 @@ stdenv.mkDerivation rec { # Building the tests currently fails on AArch64 due to internal compiler # errors (with GCC 9.2): cmakeFlags = [ "-DRANGES_ENABLE_WERROR=OFF" ] - ++ lib.optional stdenv.isAarch64 "-DRANGE_V3_TESTS=OFF"; + ++ lib.optional stdenv.hostPlatform.isAarch64 "-DRANGE_V3_TESTS=OFF"; - doCheck = !stdenv.isAarch64; + doCheck = !stdenv.hostPlatform.isAarch64; checkTarget = "test"; meta = with lib; { diff --git a/pkgs/development/libraries/rapidjson/default.nix b/pkgs/development/libraries/rapidjson/default.nix index 9aa239458502..8e72b7748d65 100644 --- a/pkgs/development/libraries/rapidjson/default.nix +++ b/pkgs/development/libraries/rapidjson/default.nix @@ -63,7 +63,7 @@ stdenv.mkDerivation (finalAttrs: { (lib.cmakeFeature "CMAKE_CXX_FLAGS_RELEASE" "-Wno-error") ]; - doCheck = !(stdenv.hostPlatform.isStatic || stdenv.isDarwin); + doCheck = !(stdenv.hostPlatform.isStatic || stdenv.hostPlatform.isDarwin); nativeCheckInputs = [ valgrind diff --git a/pkgs/development/libraries/raylib/default.nix b/pkgs/development/libraries/raylib/default.nix index 2cdde4f2b726..5c1b7d1dab0a 100644 --- a/pkgs/development/libraries/raylib/default.nix +++ b/pkgs/development/libraries/raylib/default.nix @@ -37,16 +37,16 @@ stdenv.mkDerivation (finalAttrs: { nativeBuildInputs = [ cmake - ] ++ lib.optional stdenv.isLinux autoPatchelfHook; + ] ++ lib.optional stdenv.hostPlatform.isLinux autoPatchelfHook; buildInputs = [ glfw ] - ++ lib.optionals stdenv.isLinux [ mesa libXi libXcursor libXrandr libXinerama ] - ++ lib.optionals stdenv.isDarwin [ Carbon Cocoa ] + ++ lib.optionals stdenv.hostPlatform.isLinux [ mesa libXi libXcursor libXrandr libXinerama ] + ++ lib.optionals stdenv.hostPlatform.isDarwin [ Carbon Cocoa ] ++ lib.optional alsaSupport alsa-lib ++ lib.optional pulseSupport libpulseaudio; - propagatedBuildInputs = lib.optionals stdenv.isLinux [ libGLU libX11 ] - ++ lib.optionals stdenv.isDarwin [ OpenGL ]; + propagatedBuildInputs = lib.optionals stdenv.hostPlatform.isLinux [ libGLU libX11 ] + ++ lib.optionals stdenv.hostPlatform.isDarwin [ OpenGL ]; # https://github.com/raysan5/raylib/wiki/CMake-Build-Options cmakeFlags = [ @@ -70,7 +70,7 @@ stdenv.mkDerivation (finalAttrs: { ]; # fix libasound.so/libpulse.so not being found - appendRunpaths = lib.optionals stdenv.isLinux [ + appendRunpaths = lib.optionals stdenv.hostPlatform.isLinux [ (lib.makeLibraryPath (lib.optional alsaSupport alsa-lib ++ lib.optional pulseSupport libpulseaudio)) ]; diff --git a/pkgs/development/libraries/retro-gtk/default.nix b/pkgs/development/libraries/retro-gtk/default.nix index 69eb4b0cd12d..074985308244 100644 --- a/pkgs/development/libraries/retro-gtk/default.nix +++ b/pkgs/development/libraries/retro-gtk/default.nix @@ -72,6 +72,6 @@ stdenv.mkDerivation rec { license = licenses.gpl3Plus; maintainers = [ maintainers.DamienCassou ]; platforms = platforms.all; - broken = stdenv.isDarwin; # never built on Hydra https://hydra.nixos.org/job/nixpkgs/trunk/retro-gtk.x86_64-darwin + broken = stdenv.hostPlatform.isDarwin; # never built on Hydra https://hydra.nixos.org/job/nixpkgs/trunk/retro-gtk.x86_64-darwin }; } diff --git a/pkgs/development/libraries/rlottie/default.nix b/pkgs/development/libraries/rlottie/default.nix index 541c805bba5b..2243e482a569 100644 --- a/pkgs/development/libraries/rlottie/default.nix +++ b/pkgs/development/libraries/rlottie/default.nix @@ -32,7 +32,7 @@ stdenv.mkDerivation rec { (lib.cmakeFeature "LIB_INSTALL_DIR" "${placeholder "out"}/lib") ]; - env.NIX_CFLAGS_COMPILE = lib.optionalString (stdenv.isDarwin && stdenv.isAarch64) "-U__ARM_NEON__"; + env.NIX_CFLAGS_COMPILE = lib.optionalString (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isAarch64) "-U__ARM_NEON__"; meta = with lib; { homepage = "https://github.com/Samsung/rlottie"; diff --git a/pkgs/development/libraries/rnnoise-plugin/default.nix b/pkgs/development/libraries/rnnoise-plugin/default.nix index d41459e25ead..13107bfcb13b 100644 --- a/pkgs/development/libraries/rnnoise-plugin/default.nix +++ b/pkgs/development/libraries/rnnoise-plugin/default.nix @@ -26,7 +26,7 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ cmake pkg-config ]; - patches = lib.optionals stdenv.isDarwin [ + patches = lib.optionals stdenv.hostPlatform.isDarwin [ # Ubsan seems to be broken on aarch64-darwin, it produces linker errors similar to https://github.com/NixOS/nixpkgs/issues/140751 ./disable-ubsan.patch ]; @@ -38,9 +38,9 @@ stdenv.mkDerivation rec { pcre xorg.libX11 xorg.libXrandr - ] ++ lib.optionals stdenv.isLinux [ + ] ++ lib.optionals stdenv.hostPlatform.isLinux [ webkitgtk - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ WebKit MetalKit CoreAudioKit diff --git a/pkgs/development/libraries/rocksdb/default.nix b/pkgs/development/libraries/rocksdb/default.nix index b81061639d79..fb4cc16cd7eb 100644 --- a/pkgs/development/libraries/rocksdb/default.nix +++ b/pkgs/development/libraries/rocksdb/default.nix @@ -11,7 +11,7 @@ , windows , enableJemalloc ? false , jemalloc -, enableLiburing ? stdenv.isLinux +, enableLiburing ? stdenv.hostPlatform.isLinux , liburing , enableShared ? !stdenv.hostPlatform.isStatic , sse42Support ? stdenv.hostPlatform.sse4_2Support @@ -87,9 +87,9 @@ stdenv.mkDerivation (finalAttrs: { preInstall = '' mkdir -p $tools/bin cp tools/{ldb,sst_dump}${stdenv.hostPlatform.extensions.executable} $tools/bin/ - '' + lib.optionalString stdenv.isDarwin '' + '' + lib.optionalString stdenv.hostPlatform.isDarwin '' ls -1 $tools/bin/* | xargs -I{} install_name_tool -change "@rpath/librocksdb.${lib.versions.major finalAttrs.version}.dylib" $out/lib/librocksdb.dylib {} - '' + lib.optionalString (stdenv.isLinux && enableShared) '' + '' + lib.optionalString (stdenv.hostPlatform.isLinux && enableShared) '' ls -1 $tools/bin/* | xargs -I{} patchelf --set-rpath $out/lib:${stdenv.cc.cc.lib}/lib {} ''; diff --git a/pkgs/development/libraries/rttr/default.nix b/pkgs/development/libraries/rttr/default.nix index 10a16dd3f6b4..de4d81918cd0 100644 --- a/pkgs/development/libraries/rttr/default.nix +++ b/pkgs/development/libraries/rttr/default.nix @@ -23,7 +23,7 @@ stdenv.mkDerivation rec { ]; meta = with lib; { - broken = stdenv.isDarwin; + broken = stdenv.hostPlatform.isDarwin; description = "C++ Reflection Library"; homepage = "https://www.rttr.org"; license = licenses.mit; diff --git a/pkgs/development/libraries/rubberband/default.nix b/pkgs/development/libraries/rubberband/default.nix index 861de40a5b55..d5acb98c22a4 100644 --- a/pkgs/development/libraries/rubberband/default.nix +++ b/pkgs/development/libraries/rubberband/default.nix @@ -12,7 +12,7 @@ stdenv.mkDerivation rec { }; nativeBuildInputs = [ pkg-config meson ninja jdk_headless ]; - buildInputs = [ libsamplerate libsndfile fftw vamp-plugin-sdk ladspaH lv2 ] ++ lib.optionals stdenv.isDarwin + buildInputs = [ libsamplerate libsndfile fftw vamp-plugin-sdk ladspaH lv2 ] ++ lib.optionals stdenv.hostPlatform.isDarwin (with darwin.apple_sdk.frameworks; [Accelerate CoreGraphics CoreVideo]); makeFlags = [ "AR:=$(AR)" ]; diff --git a/pkgs/development/libraries/rustls-ffi/default.nix b/pkgs/development/libraries/rustls-ffi/default.nix index d5d736dd2225..92dffbc2682f 100644 --- a/pkgs/development/libraries/rustls-ffi/default.nix +++ b/pkgs/development/libraries/rustls-ffi/default.nix @@ -18,7 +18,7 @@ rustPlatform.buildRustPackage rec { hash = "sha256-IDIWN5g1aaE6SDdXSm4WYK6n+BpuypPYQITuDj1WJEc="; }; - propagatedBuildInputs = lib.optionals stdenv.isDarwin [ Security ]; + propagatedBuildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ Security ]; cargoLock.lockFile = ./Cargo.lock; postPatch = '' diff --git a/pkgs/development/libraries/schroedinger/default.nix b/pkgs/development/libraries/schroedinger/default.nix index b4e8831b3177..698ac7986204 100644 --- a/pkgs/development/libraries/schroedinger/default.nix +++ b/pkgs/development/libraries/schroedinger/default.nix @@ -14,7 +14,7 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ pkg-config autoreconfHook ]; buildInputs = [ orc ]; - doCheck = (!stdenv.isDarwin); + doCheck = (!stdenv.hostPlatform.isDarwin); patchFlags = [ "-p0" ]; patches = [ diff --git a/pkgs/development/libraries/science/astronomy/indilib/default.nix b/pkgs/development/libraries/science/astronomy/indilib/default.nix index 78ba7f42fd50..5d7137abac2c 100644 --- a/pkgs/development/libraries/science/astronomy/indilib/default.nix +++ b/pkgs/development/libraries/science/astronomy/indilib/default.nix @@ -61,7 +61,7 @@ stdenv.mkDerivation (finalAttrs: { # Socket address collisions between tests enableParallelChecking = false; - postFixup = lib.optionalString stdenv.isLinux '' + postFixup = lib.optionalString stdenv.hostPlatform.isLinux '' for f in $out/lib/udev/rules.d/*.rules do substituteInPlace $f --replace "/bin/sh" "${bash}/bin/sh" \ diff --git a/pkgs/development/libraries/science/biology/bpp-core/default.nix b/pkgs/development/libraries/science/biology/bpp-core/default.nix index 0d0e3c114920..673cebe59e8e 100644 --- a/pkgs/development/libraries/science/biology/bpp-core/default.nix +++ b/pkgs/development/libraries/science/biology/bpp-core/default.nix @@ -27,7 +27,7 @@ stdenv.mkDerivation rec { # of form /nix/store/.../nix/store/.../include, # probably due to relative vs absolute path issue - doCheck = !stdenv.isDarwin; + doCheck = !stdenv.hostPlatform.isDarwin; meta = with lib; { homepage = "https://github.com/BioPP/bpp-core"; diff --git a/pkgs/development/libraries/science/biology/bpp-phyl/default.nix b/pkgs/development/libraries/science/biology/bpp-phyl/default.nix index 0b18dbfcf19a..624251617479 100644 --- a/pkgs/development/libraries/science/biology/bpp-phyl/default.nix +++ b/pkgs/development/libraries/science/biology/bpp-phyl/default.nix @@ -20,7 +20,7 @@ stdenv.mkDerivation rec { --replace 'set(_IMPORT_PREFIX' '#set(_IMPORT_PREFIX' ''; - doCheck = !stdenv.isDarwin; + doCheck = !stdenv.hostPlatform.isDarwin; meta = bpp-core.meta // { homepage = "https://github.com/BioPP/bpp-phyl"; diff --git a/pkgs/development/libraries/science/biology/bpp-popgen/default.nix b/pkgs/development/libraries/science/biology/bpp-popgen/default.nix index 2cb89b4bbd38..f7662766fb2c 100644 --- a/pkgs/development/libraries/science/biology/bpp-popgen/default.nix +++ b/pkgs/development/libraries/science/biology/bpp-popgen/default.nix @@ -23,7 +23,7 @@ stdenv.mkDerivation rec { # of form /nix/store/.../nix/store/.../include, # probably due to relative vs absolute path issue - doCheck = !stdenv.isDarwin; + doCheck = !stdenv.hostPlatform.isDarwin; meta = bpp-core.meta // { homepage = "https://github.com/BioPP/bpp-popgen"; diff --git a/pkgs/development/libraries/science/biology/bpp-seq/default.nix b/pkgs/development/libraries/science/biology/bpp-seq/default.nix index 2f6fbf9e362c..0699c5316835 100644 --- a/pkgs/development/libraries/science/biology/bpp-seq/default.nix +++ b/pkgs/development/libraries/science/biology/bpp-seq/default.nix @@ -23,7 +23,7 @@ stdenv.mkDerivation rec { # of form /nix/store/.../nix/store/.../include, # probably due to relative vs absolute path issue - doCheck = !stdenv.isDarwin; + doCheck = !stdenv.hostPlatform.isDarwin; meta = bpp-core.meta // { homepage = "https://github.com/BioPP/bpp-seq"; diff --git a/pkgs/development/libraries/science/biology/elastix/default.nix b/pkgs/development/libraries/science/biology/elastix/default.nix index 44e76244c987..46b297722feb 100644 --- a/pkgs/development/libraries/science/biology/elastix/default.nix +++ b/pkgs/development/libraries/science/biology/elastix/default.nix @@ -19,9 +19,9 @@ stdenv.mkDerivation (finalAttrs: { }; nativeBuildInputs = [ cmake ]; - buildInputs = [ itk ] ++ lib.optionals stdenv.isDarwin [ Cocoa ]; + buildInputs = [ itk ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ Cocoa ]; - doCheck = !stdenv.isDarwin; # usual dynamic linker issues + doCheck = !stdenv.hostPlatform.isDarwin; # usual dynamic linker issues meta = with lib; { homepage = "https://elastix.lumc.nl"; diff --git a/pkgs/development/libraries/science/biology/gifticlib/default.nix b/pkgs/development/libraries/science/biology/gifticlib/default.nix index 306324129cbd..b305df08860b 100644 --- a/pkgs/development/libraries/science/biology/gifticlib/default.nix +++ b/pkgs/development/libraries/science/biology/gifticlib/default.nix @@ -17,7 +17,7 @@ stdenv.mkDerivation rec { buildInputs = [ expat nifticlib zlib ]; # without the test data, this is only a few basic tests - doCheck = !stdenv.isDarwin; + doCheck = !stdenv.hostPlatform.isDarwin; checkPhase = '' runHook preCheck ctest -LE 'NEEDS_DATA' diff --git a/pkgs/development/libraries/science/math/arpack/default.nix b/pkgs/development/libraries/science/math/arpack/default.nix index 744d565eddcd..06503bbc7ddd 100644 --- a/pkgs/development/libraries/science/math/arpack/default.nix +++ b/pkgs/development/libraries/science/math/arpack/default.nix @@ -43,7 +43,7 @@ stdenv.mkDerivation rec { export OMP_NUM_THREADS=2 ''; - postFixup = lib.optionalString stdenv.isDarwin '' + postFixup = lib.optionalString stdenv.hostPlatform.isDarwin '' install_name_tool -change libblas.dylib ${blas}/lib/libblas.dylib $out/lib/libarpack.dylib ''; diff --git a/pkgs/development/libraries/science/math/blas/default.nix b/pkgs/development/libraries/science/math/blas/default.nix index 4431ab63c7b7..fcb78767678e 100644 --- a/pkgs/development/libraries/science/math/blas/default.nix +++ b/pkgs/development/libraries/science/math/blas/default.nix @@ -27,7 +27,7 @@ stdenv.mkDerivation rec { ln -s $out/lib/libblas64${canonicalExtension} $out/lib/libblas${canonicalExtension} ''; - preFixup = lib.optionalString stdenv.isDarwin '' + preFixup = lib.optionalString stdenv.hostPlatform.isDarwin '' for fn in $(find $out/lib -name "*.so*"); do if [ -L "$fn" ]; then continue; fi install_name_tool -id "$fn" "$fn" diff --git a/pkgs/development/libraries/science/math/bonmin/default.nix b/pkgs/development/libraries/science/math/bonmin/default.nix index a389c602b1b6..1cf64101face 100644 --- a/pkgs/development/libraries/science/math/bonmin/default.nix +++ b/pkgs/development/libraries/science/math/bonmin/default.nix @@ -52,7 +52,7 @@ stdenv.mkDerivation rec { zlib ]; - configureFlags = lib.optionals stdenv.isDarwin [ + configureFlags = lib.optionals stdenv.hostPlatform.isDarwin [ "--with-asl-lib=-lipoptamplinterface -lamplsolver" ]; @@ -70,7 +70,7 @@ stdenv.mkDerivation rec { checkTarget = "test"; # ignore one failing test - postPatch = lib.optionalString stdenv.isDarwin '' + postPatch = lib.optionalString stdenv.hostPlatform.isDarwin '' substituteInPlace test/Makefile.in --replace-fail \ "./unitTest\''$(EXEEXT)" \ "" diff --git a/pkgs/development/libraries/science/math/clblas/default.nix b/pkgs/development/libraries/science/math/clblas/default.nix index 910c40a4e0c0..17dddf901819 100644 --- a/pkgs/development/libraries/science/math/clblas/default.nix +++ b/pkgs/development/libraries/science/math/clblas/default.nix @@ -46,15 +46,15 @@ stdenv.mkDerivation rec { buildInputs = [ blas boost - ] ++ lib.optionals (!stdenv.isDarwin) [ + ] ++ lib.optionals (!stdenv.hostPlatform.isDarwin) [ ocl-icd opencl-headers - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ Accelerate CoreGraphics CoreVideo ]; - propagatedBuildInputs = lib.optionals stdenv.isDarwin [ + propagatedBuildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ OpenCL ]; diff --git a/pkgs/development/libraries/science/math/faiss/default.nix b/pkgs/development/libraries/science/math/faiss/default.nix index 5804c7d627e9..a8e697132e90 100644 --- a/pkgs/development/libraries/science/math/faiss/default.nix +++ b/pkgs/development/libraries/science/math/faiss/default.nix @@ -149,6 +149,6 @@ stdenv.mkDerivation { platforms = lib.platforms.unix; maintainers = with lib.maintainers; [ SomeoneSerge ]; # error: use of undeclared identifier 'SWIGTYPE_p_long' - broken = stdenv.isDarwin; + broken = stdenv.hostPlatform.isDarwin; }; } diff --git a/pkgs/development/libraries/science/math/itpp/default.nix b/pkgs/development/libraries/science/math/itpp/default.nix index a1a1ed8a69bc..bcfe423630aa 100644 --- a/pkgs/development/libraries/science/math/itpp/default.nix +++ b/pkgs/development/libraries/science/math/itpp/default.nix @@ -49,6 +49,6 @@ stdenv.mkDerivation rec { license = licenses.gpl3; platforms = platforms.unix; maintainers = [ ]; - broken = stdenv.isDarwin; # never built on Hydra https://hydra.nixos.org/job/nixpkgs/trunk/itpp.x86_64-darwin + broken = stdenv.hostPlatform.isDarwin; # never built on Hydra https://hydra.nixos.org/job/nixpkgs/trunk/itpp.x86_64-darwin }; } diff --git a/pkgs/development/libraries/science/math/libamplsolver/default.nix b/pkgs/development/libraries/science/math/libamplsolver/default.nix index f74808462ae1..5eaa3cf54915 100644 --- a/pkgs/development/libraries/science/math/libamplsolver/default.nix +++ b/pkgs/development/libraries/science/math/libamplsolver/default.nix @@ -23,7 +23,7 @@ stdenv.mkDerivation rec { install -D -m 0644 *${stdenv.hostPlatform.extensions.sharedLibrary}* -t $out/lib install -D -m 0644 *.a -t $out/lib popd - '' + lib.optionalString stdenv.isDarwin '' + '' + lib.optionalString stdenv.hostPlatform.isDarwin '' install_name_tool -id $out/lib/libamplsolver.dylib $out/lib/libamplsolver.dylib '' + '' runHook postInstall diff --git a/pkgs/development/libraries/science/math/liblapack/default.nix b/pkgs/development/libraries/science/math/liblapack/default.nix index 595ba2aa5713..def5379d27c8 100644 --- a/pkgs/development/libraries/science/math/liblapack/default.nix +++ b/pkgs/development/libraries/science/math/liblapack/default.nix @@ -23,7 +23,7 @@ stdenv.mkDerivation (finalAttrs: { nativeBuildInputs = [ gfortran cmake ]; # Configure stage fails on aarch64-darwin otherwise, due to either clang 11 or gfortran 10. - hardeningDisable = lib.optionals (stdenv.isDarwin && stdenv.isAarch64) [ "stackprotector" ]; + hardeningDisable = lib.optionals (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isAarch64) [ "stackprotector" ]; cmakeFlags = [ "-DCMAKE_Fortran_FLAGS=-fPIC" @@ -62,7 +62,7 @@ stdenv.mkDerivation (finalAttrs: { # # Upstream issue to track: # * https://github.com/Reference-LAPACK/lapack/issues/440 - ctestArgs = lib.optionalString stdenv.isDarwin "-E '^(CBLAS-(x[sdcz]cblat[23]))$'"; + ctestArgs = lib.optionalString stdenv.hostPlatform.isDarwin "-E '^(CBLAS-(x[sdcz]cblat[23]))$'"; checkPhase = '' runHook preCheck diff --git a/pkgs/development/libraries/science/math/liblbfgs/default.nix b/pkgs/development/libraries/science/math/liblbfgs/default.nix index 26a1932bd192..d429c4c1f703 100644 --- a/pkgs/development/libraries/science/math/liblbfgs/default.nix +++ b/pkgs/development/libraries/science/math/liblbfgs/default.nix @@ -10,7 +10,7 @@ stdenv.mkDerivation rec { }; meta = { - broken = (stdenv.isLinux && stdenv.isAarch64); + broken = (stdenv.hostPlatform.isLinux && stdenv.hostPlatform.isAarch64); description = "Library of Limited-memory Broyden-Fletcher-Goldfarb-Shanno (L-BFGS)"; homepage = "http://www.chokkan.org/software/liblbfgs/"; license = lib.licenses.mit; diff --git a/pkgs/development/libraries/science/math/libtorch/bin.nix b/pkgs/development/libraries/science/math/libtorch/bin.nix index 92050cd17283..f8e0dcff2bc1 100644 --- a/pkgs/development/libraries/science/math/libtorch/bin.nix +++ b/pkgs/development/libraries/science/math/libtorch/bin.nix @@ -23,7 +23,7 @@ let device = if cudaSupport then "cuda" else "cpu"; srcs = import ./binary-hashes.nix version; unavailable = throw "libtorch is not available for this platform"; - libcxx-for-libtorch = if stdenv.isDarwin then libcxx else stdenv.cc.cc.lib; + libcxx-for-libtorch = if stdenv.hostPlatform.isDarwin then libcxx else stdenv.cc.cc.lib; in stdenv.mkDerivation { inherit version; pname = "libtorch"; @@ -31,7 +31,7 @@ in stdenv.mkDerivation { src = fetchzip srcs."${stdenv.hostPlatform.system}-${device}" or unavailable; nativeBuildInputs = - if stdenv.isDarwin then [ fixDarwinDylibNames ] + if stdenv.hostPlatform.isDarwin then [ fixDarwinDylibNames ] else [ patchelf ] ++ lib.optionals cudaSupport [ addDriverRunpath ]; dontBuild = true; @@ -60,7 +60,7 @@ in stdenv.mkDerivation { postFixup = let rpath = lib.makeLibraryPath [ stdenv.cc.cc.lib ]; - in lib.optionalString stdenv.isLinux '' + in lib.optionalString stdenv.hostPlatform.isLinux '' find $out/lib -type f \( -name '*.so' -or -name '*.so.*' \) | while read lib; do echo "setting rpath for $lib..." patchelf --set-rpath "${rpath}:$out/lib" "$lib" @@ -68,7 +68,7 @@ in stdenv.mkDerivation { addDriverRunpath "$lib" ''} done - '' + lib.optionalString stdenv.isDarwin '' + '' + lib.optionalString stdenv.hostPlatform.isDarwin '' for f in $out/lib/*.dylib; do otool -L $f done diff --git a/pkgs/development/libraries/science/math/m4rie/default.nix b/pkgs/development/libraries/science/math/m4rie/default.nix index ac513297f159..0cda439404bb 100644 --- a/pkgs/development/libraries/science/math/m4rie/default.nix +++ b/pkgs/development/libraries/science/math/m4rie/default.nix @@ -23,7 +23,7 @@ stdenv.mkDerivation rec { # does not compile correctly with -O2 on LLVM clang; see # https://bitbucket.org/malb/m4rie/issues/23/trying-to-compile-on-apple-m1 - makeFlags = [] ++ lib.optionals stdenv.isDarwin [ "CFLAGS=-O0" ]; + makeFlags = [] ++ lib.optionals stdenv.hostPlatform.isDarwin [ "CFLAGS=-O0" ]; nativeBuildInputs = [ autoreconfHook ]; diff --git a/pkgs/development/libraries/science/math/mkl/default.nix b/pkgs/development/libraries/science/math/mkl/default.nix index 607b6c89e40d..dc8b674f5c26 100644 --- a/pkgs/development/libraries/science/math/mkl/default.nix +++ b/pkgs/development/libraries/science/math/mkl/default.nix @@ -20,7 +20,7 @@ let version = "${mklVersion}.${rel}"; mklVersion = "2023.1.0"; - rel = if stdenvNoCC.isDarwin then "43558" else "46342"; + rel = if stdenvNoCC.hostPlatform.isDarwin then "43558" else "46342"; # Intel openmp uses its own versioning. openmpVersion = "2023.1.0"; @@ -66,17 +66,17 @@ in stdenvNoCC.mkDerivation ({ pname = "mkl"; inherit version; - dontUnpack = stdenvNoCC.isLinux; + dontUnpack = stdenvNoCC.hostPlatform.isLinux; - sourceRoot = if stdenvNoCC.isDarwin then "." else null; + sourceRoot = if stdenvNoCC.hostPlatform.isDarwin then "." else null; - nativeBuildInputs = [ validatePkgConfig ] ++ (if stdenvNoCC.isDarwin + nativeBuildInputs = [ validatePkgConfig ] ++ (if stdenvNoCC.hostPlatform.isDarwin then [ _7zz cctools ] else [ rpmextract ]); - buildPhase = if stdenvNoCC.isDarwin then '' + buildPhase = if stdenvNoCC.hostPlatform.isDarwin then '' for f in bootstrapper.app/Contents/Resources/packages/*/cupPayload.cup; do tar -xf $f done @@ -110,9 +110,9 @@ in stdenvNoCC.mkDerivation ({ # Dynamic libraries mkdir -p $out/lib - cp -a opt/intel/oneapi/mkl/${mklVersion}/lib/${lib.optionalString stdenvNoCC.isLinux "intel64"}/*${shlibExt}* $out/lib - cp -a opt/intel/oneapi/compiler/${mklVersion}/${if stdenvNoCC.isDarwin then "mac" else "linux"}/compiler/lib/${lib.optionalString stdenvNoCC.isLinux "intel64_lin"}/*${shlibExt}* $out/lib - cp -a opt/intel/oneapi/tbb/${tbbVersion}/lib/${lib.optionalString stdenvNoCC.isLinux "intel64/gcc4.8"}/*${shlibExt}* $out/lib + cp -a opt/intel/oneapi/mkl/${mklVersion}/lib/${lib.optionalString stdenvNoCC.hostPlatform.isLinux "intel64"}/*${shlibExt}* $out/lib + cp -a opt/intel/oneapi/compiler/${mklVersion}/${if stdenvNoCC.hostPlatform.isDarwin then "mac" else "linux"}/compiler/lib/${lib.optionalString stdenvNoCC.hostPlatform.isLinux "intel64_lin"}/*${shlibExt}* $out/lib + cp -a opt/intel/oneapi/tbb/${tbbVersion}/lib/${lib.optionalString stdenvNoCC.hostPlatform.isLinux "intel64/gcc4.8"}/*${shlibExt}* $out/lib # Headers cp -r opt/intel/oneapi/mkl/${mklVersion}/include $out/ @@ -121,10 +121,10 @@ in stdenvNoCC.mkDerivation ({ cp -r opt/intel/oneapi/mkl/${mklVersion}/lib/cmake $out/lib '' + (if enableStatic then '' - install -Dm0644 -t $out/lib opt/intel/oneapi/mkl/${mklVersion}/lib/${lib.optionalString stdenvNoCC.isLinux "intel64"}/*.a + install -Dm0644 -t $out/lib opt/intel/oneapi/mkl/${mklVersion}/lib/${lib.optionalString stdenvNoCC.hostPlatform.isLinux "intel64"}/*.a install -Dm0644 -t $out/lib/pkgconfig opt/intel/oneapi/mkl/${mklVersion}/lib/pkgconfig/*.pc '' else '' - cp opt/intel/oneapi/mkl/${mklVersion}/lib/${lib.optionalString stdenvNoCC.isLinux "intel64"}/*${shlibExt}* $out/lib + cp opt/intel/oneapi/mkl/${mklVersion}/lib/${lib.optionalString stdenvNoCC.hostPlatform.isLinux "intel64"}/*${shlibExt}* $out/lib install -Dm0644 -t $out/lib/pkgconfig opt/intel/oneapi/mkl/${mklVersion}/lib/pkgconfig/*dynamic*.pc '') + '' # Setup symlinks for blas / lapack @@ -142,7 +142,7 @@ in stdenvNoCC.mkDerivation ({ # fixDarwinDylibName fails for libmkl_cdft_core.dylib because the # larger updated load commands do not fit. Use install_name_tool # explicitly and ignore the error. - postFixup = lib.optionalString stdenvNoCC.isDarwin '' + postFixup = lib.optionalString stdenvNoCC.hostPlatform.isDarwin '' for f in $out/lib/*.dylib; do install_name_tool -id $out/lib/$(basename $f) $f || true done @@ -176,7 +176,7 @@ in stdenvNoCC.mkDerivation ({ platforms = [ "x86_64-linux" "x86_64-darwin" ]; maintainers = with maintainers; [ bhipple ]; }; -} // lib.optionalAttrs stdenvNoCC.isDarwin { +} // lib.optionalAttrs stdenvNoCC.hostPlatform.isDarwin { src = fetchurl { url = "https://registrationcenter-download.intel.com/akdlm/IRC_NAS/087a9190-9d96-4b8c-bd2f-79159572ed89/m_onemkl_p_${mklVersion}.${rel}_offline.dmg"; hash = "sha256-bUaaJPSaLr60fw0DzDCjPvY/UucHlLbCSLyQxyiAi04="; diff --git a/pkgs/development/libraries/science/math/openblas/default.nix b/pkgs/development/libraries/science/math/openblas/default.nix index adeb03d71286..54b4f7cabd92 100644 --- a/pkgs/development/libraries/science/math/openblas/default.nix +++ b/pkgs/development/libraries/science/math/openblas/default.nix @@ -215,7 +215,7 @@ stdenv.mkDerivation rec { # This seems to be a bug in the openblas Makefile: # on x86_64 it expects NO_BINARY_MODE= # but on aarch64 it expects NO_BINARY_MODE=0 - NO_BINARY_MODE = if stdenv.isx86_64 + NO_BINARY_MODE = if stdenv.hostPlatform.isx86_64 then toString (stdenv.hostPlatform != stdenv.buildPlatform) else stdenv.hostPlatform != stdenv.buildPlatform; # This disables automatic build job count detection (which honours neither enableParallelBuilding nor NIX_BUILD_CORES) diff --git a/pkgs/development/libraries/science/math/or-tools/default.nix b/pkgs/development/libraries/science/math/or-tools/default.nix index 43ad807a9d65..a0f599f5d706 100644 --- a/pkgs/development/libraries/science/math/or-tools/default.nix +++ b/pkgs/development/libraries/science/math/or-tools/default.nix @@ -66,7 +66,7 @@ stdenv.mkDerivation rec { "-DUSE_GLPK=ON" "-DUSE_SCIP=OFF" "-DPython3_EXECUTABLE=${python.pythonOnBuildForHost.interpreter}" - ] ++ lib.optionals stdenv.isDarwin [ "-DCMAKE_MACOSX_RPATH=OFF" ]; + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ "-DCMAKE_MACOSX_RPATH=OFF" ]; strictDeps = true; @@ -77,7 +77,7 @@ stdenv.mkDerivation rec { python.pythonOnBuildForHost swig unzip - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ DarwinTools ] ++ (with python.pythonOnBuildForHost.pkgs; [ pip diff --git a/pkgs/development/libraries/science/math/p4est-sc/default.nix b/pkgs/development/libraries/science/math/p4est-sc/default.nix index bb5d212061f2..39b5660494d2 100644 --- a/pkgs/development/libraries/science/math/p4est-sc/default.nix +++ b/pkgs/development/libraries/science/math/p4est-sc/default.nix @@ -54,7 +54,7 @@ stdenv.mkDerivation { # disallow Darwin checks due to prototype incompatibility of qsort_r # to be fixed in a future version of the source code - doCheck = !stdenv.isDarwin && stdenv.hostPlatform == stdenv.buildPlatform; + doCheck = !stdenv.hostPlatform.isDarwin && stdenv.hostPlatform == stdenv.buildPlatform; meta = { branch = "prev3-develop"; diff --git a/pkgs/development/libraries/science/math/scalapack/default.nix b/pkgs/development/libraries/science/math/scalapack/default.nix index b36f48647819..f7b4ba6738d1 100644 --- a/pkgs/development/libraries/science/math/scalapack/default.nix +++ b/pkgs/development/libraries/science/math/scalapack/default.nix @@ -42,11 +42,11 @@ stdenv.mkDerivation rec { nativeCheckInputs = [ openssh mpiCheckPhaseHook ]; buildInputs = [ blas lapack ]; propagatedBuildInputs = [ mpi ]; - hardeningDisable = lib.optionals (stdenv.isAarch64 && stdenv.isDarwin) [ "stackprotector" ]; + hardeningDisable = lib.optionals (stdenv.hostPlatform.isAarch64 && stdenv.hostPlatform.isDarwin) [ "stackprotector" ]; # xslu and xsllt tests seem to time out on x86_64-darwin. # this line is left so those who force installation on x86_64-darwin can still build - doCheck = !(stdenv.isx86_64 && stdenv.isDarwin); + doCheck = !(stdenv.hostPlatform.isx86_64 && stdenv.hostPlatform.isDarwin); preConfigure = '' cmakeFlagsArray+=( @@ -81,6 +81,6 @@ stdenv.mkDerivation rec { platforms = platforms.unix; maintainers = with maintainers; [ costrouc markuskowa gdinh ]; # xslu and xsllt tests fail on x86 darwin - broken = stdenv.isDarwin && stdenv.isx86_64; + broken = stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isx86_64; }; } diff --git a/pkgs/development/libraries/science/math/suitesparse-graphblas/default.nix b/pkgs/development/libraries/science/math/suitesparse-graphblas/default.nix index 2d0b416d975c..f275eed52b07 100644 --- a/pkgs/development/libraries/science/math/suitesparse-graphblas/default.nix +++ b/pkgs/development/libraries/science/math/suitesparse-graphblas/default.nix @@ -31,7 +31,7 @@ stdenv.mkDerivation rec { export HOME=$(mktemp -d) ''; - cmakeFlags = [ (lib.cmakeBool "GRAPHBLAS_USE_JIT" (!(stdenv.isLinux && stdenv.isAarch64))) ]; + cmakeFlags = [ (lib.cmakeBool "GRAPHBLAS_USE_JIT" (!(stdenv.hostPlatform.isLinux && stdenv.hostPlatform.isAarch64))) ]; meta = with lib; { description = "Graph algorithms in the language of linear algebra"; diff --git a/pkgs/development/libraries/science/math/suitesparse/4.4.nix b/pkgs/development/libraries/science/math/suitesparse/4.4.nix index f47b5c0ce818..ef859cfc1ca2 100644 --- a/pkgs/development/libraries/science/math/suitesparse/4.4.nix +++ b/pkgs/development/libraries/science/math/suitesparse/4.4.nix @@ -26,7 +26,7 @@ stdenv.mkDerivation rec { -e '/CHOLMOD_CONFIG/ s/$/-DNPARTITION -DLONGBLAS=${int_t}/' \ -e '/UMFPACK_CONFIG/ s/$/-DLONGBLAS=${int_t}/' '' - + lib.optionalString stdenv.isDarwin '' + + lib.optionalString stdenv.hostPlatform.isDarwin '' sed -i "SuiteSparse_config/SuiteSparse_config.mk" \ -e 's/^[[:space:]]*\(LIB = -lm\) -lrt/\1/' '' @@ -54,7 +54,7 @@ stdenv.mkDerivation rec { "LAPACK=-llapack" ]; - env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.isDarwin " -DNTIMER"; + env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.hostPlatform.isDarwin " -DNTIMER"; postInstall = '' # Build and install shared library @@ -63,7 +63,7 @@ stdenv.mkDerivation rec { for i in "$out"/lib/lib*.a; do ar -x $i done - ${if enableCuda then cudatoolkit else stdenv.cc.outPath}/bin/${if enableCuda then "nvcc" else "cc"} *.o ${if stdenv.isDarwin then "-dynamiclib" else "--shared"} -o "$out/lib/libsuitesparse${SHLIB_EXT}" -lblas ${lib.optionalString enableCuda "-lcublas"} + ${if enableCuda then cudatoolkit else stdenv.cc.outPath}/bin/${if enableCuda then "nvcc" else "cc"} *.o ${if stdenv.hostPlatform.isDarwin then "-dynamiclib" else "--shared"} -o "$out/lib/libsuitesparse${SHLIB_EXT}" -lblas ${lib.optionalString enableCuda "-lcublas"} ) for i in umfpack cholmod amd camd colamd spqr; do ln -s libsuitesparse${SHLIB_EXT} "$out"/lib/lib$i${SHLIB_EXT} diff --git a/pkgs/development/libraries/science/math/suitesparse/default.nix b/pkgs/development/libraries/science/math/suitesparse/default.nix index 43623e8604b9..28909f53fecb 100644 --- a/pkgs/development/libraries/science/math/suitesparse/default.nix +++ b/pkgs/development/libraries/science/math/suitesparse/default.nix @@ -26,7 +26,7 @@ stdenv.mkDerivation rec { }; nativeBuildInputs = [ - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ fixDarwinDylibNames ] ++ lib.optionals enableCuda [ cudaPackages.cuda_nvcc @@ -63,7 +63,7 @@ stdenv.mkDerivation rec { "CUDA_PATH=${cudaPackages.cuda_nvcc}" "CUDART_LIB=${lib.getLib cudaPackages.cuda_cudart}/lib/libcudart.so" "CUBLAS_LIB=${lib.getLib cudaPackages.libcublas}/lib/libcublas.so" - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ # Unless these are set, the build will attempt to use `Accelerate` on darwin, see: # https://github.com/DrTimothyAldenDavis/SuiteSparse/blob/v5.13.0/SuiteSparse_config/SuiteSparse_config.mk#L368 "BLAS=-lblas" @@ -71,7 +71,7 @@ stdenv.mkDerivation rec { ] ; - env = lib.optionalAttrs stdenv.isDarwin { + env = lib.optionalAttrs stdenv.hostPlatform.isDarwin { # Ensure that there is enough space for the `fixDarwinDylibNames` hook to # update the install names of the output dylibs. NIX_LDFLAGS = "-headerpad_max_install_names"; diff --git a/pkgs/development/libraries/science/math/sympow/default.nix b/pkgs/development/libraries/science/math/sympow/default.nix index 91714bfd3e70..ea2ed2e83ddd 100644 --- a/pkgs/development/libraries/science/math/sympow/default.nix +++ b/pkgs/development/libraries/science/math/sympow/default.nix @@ -67,7 +67,7 @@ stdenv.mkDerivation rec { "$out/bin/sympow" -curve "[1,-1,0,-79,289]" -analrank | grep ^"Analytic Rank is 4" "$out/bin/sympow" -curve "[0,1,1,-2,0]" -analrank | grep ^"Analytic Rank is 2" '' - + lib.optionalString (!stdenv.isAarch64) '' + + lib.optionalString (!stdenv.hostPlatform.isAarch64) '' "$out/bin/sympow" -sp 2p16 -curve "[1,2,3,4,5]" | grep '8.3705' ''; diff --git a/pkgs/development/libraries/science/math/tiny-cuda-nn/default.nix b/pkgs/development/libraries/science/math/tiny-cuda-nn/default.nix index e149f6bd94e2..ada84ef50767 100644 --- a/pkgs/development/libraries/science/math/tiny-cuda-nn/default.nix +++ b/pkgs/development/libraries/science/math/tiny-cuda-nn/default.nix @@ -158,6 +158,6 @@ in maintainers = with maintainers; [connorbaker]; platforms = platforms.linux; # g++: error: unrecognized command-line option '-mf16c' - broken = stdenv.isAarch64; + broken = stdenv.hostPlatform.isAarch64; }; }) diff --git a/pkgs/development/libraries/science/networking/ns-3/default.nix b/pkgs/development/libraries/science/networking/ns-3/default.nix index 2e2e2a871f7a..efcfa99be0e0 100644 --- a/pkgs/development/libraries/science/networking/ns-3/default.nix +++ b/pkgs/development/libraries/science/networking/ns-3/default.nix @@ -137,6 +137,6 @@ stdenv.mkDerivation rec { platforms = with platforms; unix; maintainers = with maintainers; [ teto rgrunbla ]; # never built on aarch64-darwin since first introduction in nixpkgs - broken = (stdenv.isDarwin && stdenv.isAarch64) || (stdenv.isLinux && stdenv.isAarch64); + broken = (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isAarch64) || (stdenv.hostPlatform.isLinux && stdenv.hostPlatform.isAarch64); }; } diff --git a/pkgs/development/libraries/serf/default.nix b/pkgs/development/libraries/serf/default.nix index 1a2f407f9bc2..07138596d05d 100644 --- a/pkgs/development/libraries/serf/default.nix +++ b/pkgs/development/libraries/serf/default.nix @@ -23,7 +23,7 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ pkg-config scons ]; buildInputs = [ apr openssl aprutil zlib libiconv ] - ++ lib.optional (!stdenv.isCygwin) libkrb5; + ++ lib.optional (!stdenv.hostPlatform.isCygwin) libkrb5; patches = [ ./scons.patch @@ -42,7 +42,7 @@ stdenv.mkDerivation rec { sconsFlags+=" CC=$CC" sconsFlags+=" OPENSSL=${openssl}" sconsFlags+=" ZLIB=${zlib}" - '' + lib.optionalString (!stdenv.isCygwin) '' + '' + lib.optionalString (!stdenv.hostPlatform.isCygwin) '' sconsFlags+=" GSSAPI=${libkrb5.dev}" ''; diff --git a/pkgs/development/libraries/sfml/default.nix b/pkgs/development/libraries/sfml/default.nix index c3ecd3a9866f..2b28228c5f57 100644 --- a/pkgs/development/libraries/sfml/default.nix +++ b/pkgs/development/libraries/sfml/default.nix @@ -45,9 +45,9 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ cmake ]; buildInputs = [ freetype libjpeg openal flac libvorbis glew ] - ++ lib.optional stdenv.isLinux udev - ++ lib.optionals (!stdenv.isDarwin) [ libX11 libXrandr libXrender xcbutilimage ] - ++ lib.optionals stdenv.isDarwin [ IOKit Foundation AppKit OpenAL ]; + ++ lib.optional stdenv.hostPlatform.isLinux udev + ++ lib.optionals (!stdenv.hostPlatform.isDarwin) [ libX11 libXrandr libXrender xcbutilimage ] + ++ lib.optionals stdenv.hostPlatform.isDarwin [ IOKit Foundation AppKit OpenAL ]; cmakeFlags = [ "-DSFML_INSTALL_PKGCONFIG_FILES=yes" diff --git a/pkgs/development/libraries/shibboleth-sp/default.nix b/pkgs/development/libraries/shibboleth-sp/default.nix index da63b22f9e7e..f38db198bd30 100644 --- a/pkgs/development/libraries/shibboleth-sp/default.nix +++ b/pkgs/development/libraries/shibboleth-sp/default.nix @@ -12,7 +12,7 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ autoreconfHook pkg-config ]; buildInputs = [ boost fcgi openssl opensaml-cpp log4shib xercesc xml-security-c xml-tooling-c ] - ++ lib.optionals stdenv.isDarwin (with darwin.apple_sdk.frameworks; [ + ++ lib.optionals stdenv.hostPlatform.isDarwin (with darwin.apple_sdk.frameworks; [ CoreServices SystemConfiguration ]); diff --git a/pkgs/development/libraries/silgraphite/graphite2.nix b/pkgs/development/libraries/silgraphite/graphite2.nix index 7f4b73c79378..d2a4206e7dc1 100644 --- a/pkgs/development/libraries/silgraphite/graphite2.nix +++ b/pkgs/development/libraries/silgraphite/graphite2.nix @@ -27,7 +27,7 @@ stdenv.mkDerivation (finalAttrs: { doFakeLibgcc = true; }); - patches = lib.optionals stdenv.isDarwin [ ./macosx.patch ]; + patches = lib.optionals stdenv.hostPlatform.isDarwin [ ./macosx.patch ]; postPatch = '' # disable broken 'nametabletest' test, fails on gcc-13: # https://github.com/silnrsi/graphite/pull/74 diff --git a/pkgs/development/libraries/smpeg/default.nix b/pkgs/development/libraries/smpeg/default.nix index 099a3d838bbb..d310e3653e7f 100644 --- a/pkgs/development/libraries/smpeg/default.nix +++ b/pkgs/development/libraries/smpeg/default.nix @@ -38,7 +38,7 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ autoconf automake libtool m4 pkg-config makeWrapper ]; - buildInputs = [ SDL ] ++ lib.optionals (!stdenv.isDarwin) [ gtk2 libGLU libGL ]; + buildInputs = [ SDL ] ++ lib.optionals (!stdenv.hostPlatform.isDarwin) [ gtk2 libGLU libGL ]; outputs = [ "out" "dev" ]; diff --git a/pkgs/development/libraries/smpeg2/default.nix b/pkgs/development/libraries/smpeg2/default.nix index 24dd9c9dc400..bcece08e6195 100644 --- a/pkgs/development/libraries/smpeg2/default.nix +++ b/pkgs/development/libraries/smpeg2/default.nix @@ -22,7 +22,7 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ autoconf automake makeWrapper pkg-config ]; buildInputs = [ SDL2 ] - ++ lib.optional stdenv.isDarwin darwin.libobjc; + ++ lib.optional stdenv.hostPlatform.isDarwin darwin.libobjc; outputs = [ "out" "dev" "man" ]; diff --git a/pkgs/development/libraries/soci/default.nix b/pkgs/development/libraries/soci/default.nix index 007a4fbaf7bf..3ba387436e76 100644 --- a/pkgs/development/libraries/soci/default.nix +++ b/pkgs/development/libraries/soci/default.nix @@ -37,7 +37,7 @@ stdenv.mkDerivation rec { sqlite postgresql boost - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ Kerberos ]; diff --git a/pkgs/development/libraries/sofia-sip/default.nix b/pkgs/development/libraries/sofia-sip/default.nix index b9f34eeb9748..7b33ed04871f 100644 --- a/pkgs/development/libraries/sofia-sip/default.nix +++ b/pkgs/development/libraries/sofia-sip/default.nix @@ -11,7 +11,7 @@ stdenv.mkDerivation rec { sha256 = "sha256-7QmK2UxEO5lC0KBDWB3bwKTy0Nc7WrdTLjoQYzezoaY="; }; - buildInputs = [ glib openssl ] ++ lib.optional stdenv.isDarwin SystemConfiguration; + buildInputs = [ glib openssl ] ++ lib.optional stdenv.hostPlatform.isDarwin SystemConfiguration; nativeBuildInputs = [ autoreconfHook pkg-config ]; meta = with lib; { diff --git a/pkgs/development/libraries/sonic/default.nix b/pkgs/development/libraries/sonic/default.nix index 4ab71b36a012..6b82b5f4f04f 100644 --- a/pkgs/development/libraries/sonic/default.nix +++ b/pkgs/development/libraries/sonic/default.nix @@ -19,7 +19,7 @@ stdenv.mkDerivation { postInstall = '' installManPage sonic.1 - '' + lib.optionalString stdenv.isDarwin '' + '' + lib.optionalString stdenv.hostPlatform.isDarwin '' install_name_tool -id $out/lib/libsonic.so.0.3.0 $out/lib/libsonic.so.0.3.0 ''; diff --git a/pkgs/development/libraries/speech-tools/default.nix b/pkgs/development/libraries/speech-tools/default.nix index 8bee16fef753..1dbaa016cbbf 100644 --- a/pkgs/development/libraries/speech-tools/default.nix +++ b/pkgs/development/libraries/speech-tools/default.nix @@ -28,9 +28,9 @@ stdenv.mkDerivation rec { buildInputs = [ ncurses - ] ++ lib.optionals stdenv.isLinux [ + ] ++ lib.optionals stdenv.hostPlatform.isLinux [ alsa-lib - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ CoreServices AudioUnit Cocoa diff --git a/pkgs/development/libraries/speexdsp/default.nix b/pkgs/development/libraries/speexdsp/default.nix index 0f5e09cf83e5..e3452beab870 100644 --- a/pkgs/development/libraries/speexdsp/default.nix +++ b/pkgs/development/libraries/speexdsp/default.nix @@ -25,7 +25,7 @@ stdenv.mkDerivation rec { buildInputs = lib.optionals withFftw3 [ fftw ]; configureFlags = lib.optionals withFftw3 [ "--with-fft=gpl-fftw3" ] - ++ lib.optional stdenv.isAarch64 "--disable-neon"; + ++ lib.optional stdenv.hostPlatform.isAarch64 "--disable-neon"; meta = with lib; { homepage = "https://www.speex.org/"; diff --git a/pkgs/development/libraries/spglib/default.nix b/pkgs/development/libraries/spglib/default.nix index 1d3f8b489f21..75634072b8ec 100644 --- a/pkgs/development/libraries/spglib/default.nix +++ b/pkgs/development/libraries/spglib/default.nix @@ -13,7 +13,7 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ cmake gfortran gtest ]; - buildInputs = lib.optionals stdenv.isDarwin [ openmp ]; + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ openmp ]; cmakeFlags = [ "-DSPGLIB_WITH_Fortran=On" ]; diff --git a/pkgs/development/libraries/spice-gtk/default.nix b/pkgs/development/libraries/spice-gtk/default.nix index fd7428213fc9..048ba14f5f93 100644 --- a/pkgs/development/libraries/spice-gtk/default.nix +++ b/pkgs/development/libraries/spice-gtk/default.nix @@ -37,7 +37,7 @@ , wayland-scanner , zlib , wrapGAppsHook3 -, withPolkit ? stdenv.isLinux +, withPolkit ? stdenv.hostPlatform.isLinux }: # If this package is built with polkit support (withPolkit=true), @@ -92,7 +92,7 @@ stdenv.mkDerivation rec { wrapGAppsHook3 ] ++ lib.optionals (stdenv.buildPlatform != stdenv.hostPlatform) [ mesonEmulatorHook - ] ++ lib.optionals stdenv.isLinux [ + ] ++ lib.optionals stdenv.hostPlatform.isLinux [ wayland-scanner ]; @@ -119,7 +119,7 @@ stdenv.mkDerivation rec { ] ++ lib.optionals withPolkit [ polkit acl - ] ++ lib.optionals stdenv.isLinux [ + ] ++ lib.optionals stdenv.hostPlatform.isLinux [ libcap_ng libdrm wayland-protocols @@ -132,7 +132,7 @@ stdenv.mkDerivation rec { "-Dusb-ids-path=${hwdata}/share/hwdata/usb.ids" ] ++ lib.optionals (!withPolkit) [ "-Dpolkit=disabled" - ] ++ lib.optionals (!stdenv.isLinux) [ + ] ++ lib.optionals (!stdenv.hostPlatform.isLinux) [ "-Dlibcap-ng=disabled" "-Degl=disabled" ] ++ lib.optionals stdenv.hostPlatform.isMusl [ diff --git a/pkgs/development/libraries/spice/default.nix b/pkgs/development/libraries/spice/default.nix index d7855cd5cea5..4ac1b1cdee11 100644 --- a/pkgs/development/libraries/spice/default.nix +++ b/pkgs/development/libraries/spice/default.nix @@ -67,9 +67,9 @@ stdenv.mkDerivation rec { python3.pkgs.pyparsing spice-protocol zlib - ] ++ lib.optionals stdenv.isLinux [ + ] ++ lib.optionals stdenv.hostPlatform.isLinux [ alsa-lib - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ gdk-pixbuf ]; diff --git a/pkgs/development/libraries/sqlite/default.nix b/pkgs/development/libraries/sqlite/default.nix index dd4e15ea566f..ed1499abe697 100644 --- a/pkgs/development/libraries/sqlite/default.nix +++ b/pkgs/development/libraries/sqlite/default.nix @@ -26,7 +26,7 @@ stdenv.mkDerivation rec { }; outputs = [ "bin" "dev" "out" ]; - separateDebugInfo = stdenv.isLinux; + separateDebugInfo = stdenv.hostPlatform.isLinux; nativeBuildInputs = [ updateAutotoolsGnuConfigScriptsHook ]; buildInputs = [ zlib ] ++ lib.optionals interactive [ readline ncurses ]; diff --git a/pkgs/development/libraries/sqlite/tools.nix b/pkgs/development/libraries/sqlite/tools.nix index 2b843c0b22e0..1c8ab1f3465a 100644 --- a/pkgs/development/libraries/sqlite/tools.nix +++ b/pkgs/development/libraries/sqlite/tools.nix @@ -13,7 +13,7 @@ let }; nativeBuildInputs = [ unzip ]; - buildInputs = [ tcl ] ++ lib.optional stdenv.isDarwin Foundation; + buildInputs = [ tcl ] ++ lib.optional stdenv.hostPlatform.isDarwin Foundation; makeFlags = [ makeTarget ]; diff --git a/pkgs/development/libraries/stargate-libcds/default.nix b/pkgs/development/libraries/stargate-libcds/default.nix index b74f19e1959a..c37365652e72 100644 --- a/pkgs/development/libraries/stargate-libcds/default.nix +++ b/pkgs/development/libraries/stargate-libcds/default.nix @@ -16,7 +16,7 @@ stdenv.mkDerivation rec { }; # Fix 'error: unrecognized command line option' in platforms other than x86 - PLAT_FLAGS = lib.optionalString stdenv.isx86_64 "-mfpmath=sse -mssse3"; + PLAT_FLAGS = lib.optionalString stdenv.hostPlatform.isx86_64 "-mfpmath=sse -mssse3"; patches = [ # Remove unnecessary tests (valgrind, coverage) diff --git a/pkgs/development/libraries/stfl/default.nix b/pkgs/development/libraries/stfl/default.nix index b79020e3ba71..91a41ac35298 100644 --- a/pkgs/development/libraries/stfl/default.nix +++ b/pkgs/development/libraries/stfl/default.nix @@ -25,7 +25,7 @@ stdenv.mkDerivation rec { preBuild = '' sed -i s/gcc/cc/g Makefile sed -i s%ncursesw/ncurses.h%ncurses.h% stfl_internals.h - '' + lib.optionalString stdenv.isDarwin '' + '' + lib.optionalString stdenv.hostPlatform.isDarwin '' sed -i s/-soname/-install_name/ Makefile '' # upstream builds shared library unconditionally. Also, it has no diff --git a/pkgs/development/libraries/stxxl/default.nix b/pkgs/development/libraries/stxxl/default.nix index 5d58212d70c6..31d9098242c2 100644 --- a/pkgs/development/libraries/stxxl/default.nix +++ b/pkgs/development/libraries/stxxl/default.nix @@ -2,7 +2,7 @@ , stdenv , fetchFromGitHub , cmake -, parallelSupport ? (!stdenv.isDarwin) +, parallelSupport ? (!stdenv.hostPlatform.isDarwin) }: let diff --git a/pkgs/development/libraries/symengine/default.nix b/pkgs/development/libraries/symengine/default.nix index 25043bbb0265..cbdb542dbfd9 100644 --- a/pkgs/development/libraries/symengine/default.nix +++ b/pkgs/development/libraries/symengine/default.nix @@ -30,7 +30,7 @@ stdenv.mkDerivation rec { "-DWITH_SYMENGINE_THREAD_SAFE=yes" "-DWITH_MPC=yes" "-DBUILD_FOR_DISTRIBUTION=yes" - ] ++ lib.optionals (stdenv.isDarwin && stdenv.isAarch64) [ + ] ++ lib.optionals (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isAarch64) [ # error: unrecognized instruction mnemonic, did you mean: bit, cnt, hint, ins, not? "-DBUILD_TESTS=OFF" ] ++ lib.optionals withShared [ diff --git a/pkgs/development/libraries/t1lib/default.nix b/pkgs/development/libraries/t1lib/default.nix index 16112f32b1e2..e09ed7ee32dc 100644 --- a/pkgs/development/libraries/t1lib/default.nix +++ b/pkgs/development/libraries/t1lib/default.nix @@ -29,7 +29,7 @@ stdenv.mkDerivation rec { buildInputs = [ libX11 libXaw ]; buildFlags = [ "without_doc" ]; - postInstall = lib.optionalString (!stdenv.isDarwin) '' + postInstall = lib.optionalString (!stdenv.hostPlatform.isDarwin) '' # ?? chmod +x $out/lib/*.so.* ''; diff --git a/pkgs/development/libraries/tachyon/default.nix b/pkgs/development/libraries/tachyon/default.nix index 0446d2cac6e7..9520f9a8404e 100644 --- a/pkgs/development/libraries/tachyon/default.nix +++ b/pkgs/development/libraries/tachyon/default.nix @@ -14,7 +14,7 @@ stdenv.mkDerivation rec { url = "http://jedi.ks.uiuc.edu/~johns/tachyon/files/${version}/${pname}-${version}.tar.gz"; sha256 = "sha256-CSA8ECMRFJ9d9cw2dAn5bHJXQmZtGcJNtbqZTVqBpvU="; }; - buildInputs = lib.optionals stdenv.isDarwin [ + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ Carbon ] ++ lib.optionals withJpegSupport [ libjpeg diff --git a/pkgs/development/libraries/taco/default.nix b/pkgs/development/libraries/taco/default.nix index 693b5f25f990..a2f2f933214c 100644 --- a/pkgs/development/libraries/taco/default.nix +++ b/pkgs/development/libraries/taco/default.nix @@ -25,7 +25,7 @@ in stdenv.mkDerivation rec { nativeBuildInputs = [ cmake ]; - buildInputs = lib.optional stdenv.isDarwin llvmPackages.openmp; + buildInputs = lib.optional stdenv.hostPlatform.isDarwin llvmPackages.openmp; propagatedBuildInputs = lib.optional enablePython pyEnv; diff --git a/pkgs/development/libraries/talloc/default.nix b/pkgs/development/libraries/talloc/default.nix index 793fc1ccf5cb..eb1525fb9acb 100644 --- a/pkgs/development/libraries/talloc/default.nix +++ b/pkgs/development/libraries/talloc/default.nix @@ -27,7 +27,7 @@ stdenv.mkDerivation rec { wafHook docbook-xsl-nons docbook_xml_dtd_42 - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ fixDarwinDylibNames ]; diff --git a/pkgs/development/libraries/tbb/2020_3.nix b/pkgs/development/libraries/tbb/2020_3.nix index dcd21b27ff33..c7e1e9127630 100644 --- a/pkgs/development/libraries/tbb/2020_3.nix +++ b/pkgs/development/libraries/tbb/2020_3.nix @@ -48,7 +48,7 @@ stdenv.mkDerivation rec { }) ]; - nativeBuildInputs = (lib.optionals stdenv.isDarwin [ + nativeBuildInputs = (lib.optionals stdenv.hostPlatform.isDarwin [ fixDarwinDylibNames ]); diff --git a/pkgs/development/libraries/tbb/2021_5.nix b/pkgs/development/libraries/tbb/2021_5.nix index 3bfa9278106d..90e7aa2a9f2f 100644 --- a/pkgs/development/libraries/tbb/2021_5.nix +++ b/pkgs/development/libraries/tbb/2021_5.nix @@ -47,7 +47,7 @@ stdenv.mkDerivation rec { lib.optionals stdenv.cc.isClang [ "-Wno-error=unused-but-set-variable" ] ++ # Workaround for gcc-12 ICE when using -O3 # https://gcc.gnu.org/PR108854 - lib.optionals (stdenv.cc.isGNU && stdenv.isx86_32) [ "-O2" ]; + lib.optionals (stdenv.cc.isGNU && stdenv.hostPlatform.isx86_32) [ "-O2" ]; # Fix undefined reference errors with version script under LLVM. NIX_LDFLAGS = lib.optionalString (stdenv.cc.bintools.isLLVM && lib.versionAtLeast stdenv.cc.bintools.version "17") "--undefined-version"; diff --git a/pkgs/development/libraries/tbb/default.nix b/pkgs/development/libraries/tbb/default.nix index 73ea56b30686..3ff04d6bf1ab 100644 --- a/pkgs/development/libraries/tbb/default.nix +++ b/pkgs/development/libraries/tbb/default.nix @@ -37,7 +37,7 @@ stdenv.mkDerivation rec { lib.optionals stdenv.cc.isClang [ "-Wno-error=unused-but-set-variable" ] ++ # Workaround for gcc-12 ICE when using -O3 # https://gcc.gnu.org/PR108854 - lib.optionals (stdenv.cc.isGNU && stdenv.isx86_32) [ "-O2" ]; + lib.optionals (stdenv.cc.isGNU && stdenv.hostPlatform.isx86_32) [ "-O2" ]; # Fix undefined reference errors with version script under LLVM. NIX_LDFLAGS = lib.optionalString (stdenv.cc.bintools.isLLVM && lib.versionAtLeast stdenv.cc.bintools.version "17") "--undefined-version"; diff --git a/pkgs/development/libraries/tdb/default.nix b/pkgs/development/libraries/tdb/default.nix index d78f4abafab0..c84ded6267e1 100644 --- a/pkgs/development/libraries/tdb/default.nix +++ b/pkgs/development/libraries/tdb/default.nix @@ -52,7 +52,7 @@ stdenv.mkDerivation rec { "--cross-execute=${stdenv.hostPlatform.emulator buildPackages}" ]; - postFixup = if stdenv.isDarwin + postFixup = if stdenv.hostPlatform.isDarwin then ''install_name_tool -id $out/lib/libtdb.dylib $out/lib/libtdb.dylib'' else null; diff --git a/pkgs/development/libraries/tdlib/default.nix b/pkgs/development/libraries/tdlib/default.nix index d02bd3b81011..f9a87aa73b51 100644 --- a/pkgs/development/libraries/tdlib/default.nix +++ b/pkgs/development/libraries/tdlib/default.nix @@ -26,7 +26,7 @@ stdenv.mkDerivation { function(generate_pkgconfig' \ --replace '\$'{prefix}/'$'{CMAKE_INSTALL_LIBDIR} '$'{CMAKE_INSTALL_FULL_LIBDIR} \ --replace '\$'{prefix}/'$'{CMAKE_INSTALL_INCLUDEDIR} '$'{CMAKE_INSTALL_FULL_INCLUDEDIR} - '' + lib.optionalString (stdenv.isDarwin && stdenv.isAarch64) '' + '' + lib.optionalString (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isAarch64) '' sed -i "/vptr/d" test/CMakeLists.txt ''; diff --git a/pkgs/development/libraries/tezos-rust-libs/default.nix b/pkgs/development/libraries/tezos-rust-libs/default.nix index 85470f606f28..85ac4b0266c5 100644 --- a/pkgs/development/libraries/tezos-rust-libs/default.nix +++ b/pkgs/development/libraries/tezos-rust-libs/default.nix @@ -12,7 +12,7 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ llvmPackages_12.llvm cargo ]; propagatedBuildDeps = [ llvmPackages_12.libllvm ]; - buildInputs = lib.optionals stdenv.isDarwin [ libiconv ]; + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ libiconv ]; buildPhase = '' runHook preBuild diff --git a/pkgs/development/libraries/thrift/default.nix b/pkgs/development/libraries/thrift/default.nix index 7995a3fe1699..589f03c68858 100644 --- a/pkgs/development/libraries/thrift/default.nix +++ b/pkgs/development/libraries/thrift/default.nix @@ -103,7 +103,7 @@ stdenv.mkDerivation rec { disabledTests = [ "PythonTestSSLSocket" "PythonThriftTNonblockingServer" - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ # Tests that hang up in the Darwin sandbox "SecurityTest" "SecurityFromBufferTest" @@ -129,7 +129,7 @@ stdenv.mkDerivation rec { checkPhase = '' runHook preCheck - ${lib.optionalString stdenv.isDarwin "DY"}LD_LIBRARY_PATH=$PWD/lib ctest -E "($(echo "$disabledTests" | tr " " "|"))" + ${lib.optionalString stdenv.hostPlatform.isDarwin "DY"}LD_LIBRARY_PATH=$PWD/lib ctest -E "($(echo "$disabledTests" | tr " " "|"))" runHook postCheck ''; diff --git a/pkgs/development/libraries/tiledb/default.nix b/pkgs/development/libraries/tiledb/default.nix index 28b14d3a8a5b..9b834c3a7e58 100644 --- a/pkgs/development/libraries/tiledb/default.nix +++ b/pkgs/development/libraries/tiledb/default.nix @@ -108,7 +108,7 @@ stdenv.mkDerivation rec { installTargets = [ "install-tiledb" "doc" ]; - postInstall = lib.optionalString stdenv.isDarwin '' + postInstall = lib.optionalString stdenv.hostPlatform.isDarwin '' install_name_tool -add_rpath ${tbb}/lib $out/lib/libtiledb.dylib ''; diff --git a/pkgs/development/libraries/tinyxml/2.6.2.nix b/pkgs/development/libraries/tinyxml/2.6.2.nix index ded5013cca99..456fd7fe2dd9 100644 --- a/pkgs/development/libraries/tinyxml/2.6.2.nix +++ b/pkgs/development/libraries/tinyxml/2.6.2.nix @@ -39,7 +39,7 @@ in stdenv.mkDerivation { hardeningDisable = [ "format" ]; env.NIX_CFLAGS_COMPILE = - lib.optionalString stdenv.isDarwin "-mmacosx-version-min=10.9"; + lib.optionalString stdenv.hostPlatform.isDarwin "-mmacosx-version-min=10.9"; nativeBuildInputs = [ unzip ]; buildPhase = '' @@ -78,7 +78,7 @@ in stdenv.mkDerivation { cp -v tinyxml.pc $out/lib/pkgconfig/ cp -v docs/* $out/share/doc/tinyxml/ - '' + lib.optionalString stdenv.isDarwin '' + '' + lib.optionalString stdenv.hostPlatform.isDarwin '' install_name_tool -id $out/lib/libtinyxml.dylib $out/lib/libtinyxml.dylib ''; diff --git a/pkgs/development/libraries/tk/8.5.nix b/pkgs/development/libraries/tk/8.5.nix index afd575915f85..ad0013060ff6 100644 --- a/pkgs/development/libraries/tk/8.5.nix +++ b/pkgs/development/libraries/tk/8.5.nix @@ -14,7 +14,7 @@ callPackage ./generic.nix (args // { sha256 = "1yhgcalldrjlc5q614rlzg1crgd3b52dhrk1pncdaxvl2vgg2yj0"; }; - patches = lib.optionals stdenv.isDarwin [ + patches = lib.optionals stdenv.hostPlatform.isDarwin [ # Define MODULE_SCOPE before including tkPort.h # https://core.tcl-lang.org/tk/info/dba9f5ce3b (fetchpatch { diff --git a/pkgs/development/libraries/tk/generic.nix b/pkgs/development/libraries/tk/generic.nix index 4978f8b96f58..232ae01abbfd 100644 --- a/pkgs/development/libraries/tk/generic.nix +++ b/pkgs/development/libraries/tk/generic.nix @@ -1,5 +1,5 @@ { stdenv, lib, src, pkg-config, tcl, libXft, patches ? [] -, enableAqua ? stdenv.isDarwin, darwin +, enableAqua ? stdenv.hostPlatform.isDarwin, darwin , ... }: tcl.mkTclDerivation { @@ -22,7 +22,7 @@ tcl.mkTclDerivation { substituteInPlace $file --replace "exec wish" "exec $out/bin/wish" done '' - + lib.optionalString (stdenv.isDarwin && lib.versionOlder stdenv.hostPlatform.darwinMinVersion "11") '' + + lib.optionalString (stdenv.hostPlatform.isDarwin && lib.versionOlder stdenv.hostPlatform.darwinMinVersion "11") '' substituteInPlace unix/configure* \ --replace " -framework UniformTypeIdentifiers" "" ''; @@ -32,13 +32,13 @@ tcl.mkTclDerivation { cp ../{unix,generic}/*.h $out/include ln -s $out/lib/libtk${tcl.release}${stdenv.hostPlatform.extensions.sharedLibrary} $out/lib/libtk${stdenv.hostPlatform.extensions.sharedLibrary} '' - + lib.optionalString (stdenv.isDarwin) '' + + lib.optionalString (stdenv.hostPlatform.isDarwin) '' cp ../macosx/*.h $out/include ''; configureFlags = [ "--enable-threads" - ] ++ lib.optional stdenv.is64bit "--enable-64bit" + ] ++ lib.optional stdenv.hostPlatform.is64bit "--enable-64bit" ++ lib.optional enableAqua "--enable-aqua"; nativeBuildInputs = [ pkg-config ]; diff --git a/pkgs/development/libraries/tkimg/default.nix b/pkgs/development/libraries/tkimg/default.nix index 8b66e195d5a5..f058585d3ad9 100644 --- a/pkgs/development/libraries/tkimg/default.nix +++ b/pkgs/development/libraries/tkimg/default.nix @@ -16,7 +16,7 @@ tcl.mkTclDerivation rec { "--with-tkinclude=${tk.dev}/include" ]; - buildInputs = [ xorg.libX11 tcllib ] ++ lib.optionals stdenv.isDarwin (with darwin.apple_sdk.frameworks; [ + buildInputs = [ xorg.libX11 tcllib ] ++ lib.optionals stdenv.hostPlatform.isDarwin (with darwin.apple_sdk.frameworks; [ Cocoa ]); diff --git a/pkgs/development/libraries/toml-f/default.nix b/pkgs/development/libraries/toml-f/default.nix index 3f95d5682f9e..30632e1160db 100644 --- a/pkgs/development/libraries/toml-f/default.nix +++ b/pkgs/development/libraries/toml-f/default.nix @@ -26,7 +26,7 @@ stdenv.mkDerivation rec { outputs = [ "out" "dev" ]; # tftest-build fails on aarch64-linux - doCheck = !stdenv.isAarch64; + doCheck = !stdenv.hostPlatform.isAarch64; meta = with lib; { description = "TOML parser implementation for data serialization and deserialization in Fortran"; diff --git a/pkgs/development/libraries/tpm2-tss/default.nix b/pkgs/development/libraries/tpm2-tss/default.nix index 6d3a29c28ba7..34b37d1c74a1 100644 --- a/pkgs/development/libraries/tpm2-tss/default.nix +++ b/pkgs/development/libraries/tpm2-tss/default.nix @@ -10,7 +10,7 @@ let # needs to be conditional based on isLinux because procps for other systems # might not support the withSystemd option. procpsWithoutSystemd = procps.override { withSystemd = false; }; - procps_pkg = if stdenv.isLinux then procpsWithoutSystemd else procps; + procps_pkg = if stdenv.hostPlatform.isLinux then procpsWithoutSystemd else procps; in stdenv.mkDerivation rec { diff --git a/pkgs/development/libraries/tracker/default.nix b/pkgs/development/libraries/tracker/default.nix index da5274e0b7df..d75bbdd542fe 100644 --- a/pkgs/development/libraries/tracker/default.nix +++ b/pkgs/development/libraries/tracker/default.nix @@ -79,7 +79,7 @@ stdenv.mkDerivation (finalAttrs: { avahi libstemmer dbus - ] ++ lib.optionals stdenv.isLinux [ + ] ++ lib.optionals stdenv.hostPlatform.isLinux [ systemd ]; @@ -103,15 +103,15 @@ stdenv.mkDerivation (finalAttrs: { [ "--cross-file=${crossFile}" ] - ) ++ lib.optionals (!stdenv.isLinux) [ + ) ++ lib.optionals (!stdenv.hostPlatform.isLinux) [ "-Dsystemd_user_services=false" ]; doCheck = # https://gitlab.gnome.org/GNOME/tracker/-/issues/402 - !stdenv.isDarwin + !stdenv.hostPlatform.isDarwin # https://gitlab.gnome.org/GNOME/tracker/-/issues/398 - && !stdenv.is32bit; + && !stdenv.hostPlatform.is32bit; postPatch = '' chmod +x \ @@ -125,8 +125,8 @@ stdenv.mkDerivation (finalAttrs: { preCheck = let - linuxDot0 = lib.optionalString stdenv.isLinux ".0"; - darwinDot0 = lib.optionalString stdenv.isDarwin ".0"; + linuxDot0 = lib.optionalString stdenv.hostPlatform.isLinux ".0"; + darwinDot0 = lib.optionalString stdenv.hostPlatform.isDarwin ".0"; extension = stdenv.hostPlatform.extensions.sharedLibrary; in '' diff --git a/pkgs/development/libraries/ubus/default.nix b/pkgs/development/libraries/ubus/default.nix index 662ec1c7b035..dede0e55657a 100644 --- a/pkgs/development/libraries/ubus/default.nix +++ b/pkgs/development/libraries/ubus/default.nix @@ -14,7 +14,7 @@ stdenv.mkDerivation { buildInputs = [ libubox libjson ]; nativeBuildInputs = [ cmake ]; - env.NIX_CFLAGS_COMPILE = toString (lib.optionals (stdenv.isDarwin && stdenv.isx86_64) [ + env.NIX_CFLAGS_COMPILE = toString (lib.optionals (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isx86_64) [ "-Wno-error=gnu-folding-constant" ]); diff --git a/pkgs/development/libraries/uclient/default.nix b/pkgs/development/libraries/uclient/default.nix index 7206b6ad98fc..f758c00810ed 100644 --- a/pkgs/development/libraries/uclient/default.nix +++ b/pkgs/development/libraries/uclient/default.nix @@ -26,6 +26,6 @@ stdenv.mkDerivation { maintainers = with maintainers; [ mkg20001 ]; mainProgram = "uclient-fetch"; platforms = platforms.all; - broken = stdenv.isDarwin; + broken = stdenv.hostPlatform.isDarwin; }; } diff --git a/pkgs/development/libraries/udns/default.nix b/pkgs/development/libraries/udns/default.nix index f9c5a80582b7..5dad256063b4 100644 --- a/pkgs/development/libraries/udns/default.nix +++ b/pkgs/development/libraries/udns/default.nix @@ -19,7 +19,7 @@ stdenv.mkDerivation rec { # udns uses a very custom build and hardcodes a .so name in a few places. # Instead of fighting with it to apply the standard dylib script, change # the right place in the Makefile itself. - postPatch = lib.optionalString stdenv.isDarwin '' + postPatch = lib.optionalString stdenv.hostPlatform.isDarwin '' substituteInPlace Makefile.in \ --replace --soname, -install_name,$out/lib/ ''; diff --git a/pkgs/development/libraries/unicorn/default.nix b/pkgs/development/libraries/unicorn/default.nix index b6a91a7367a4..6b160a852d6c 100644 --- a/pkgs/development/libraries/unicorn/default.nix +++ b/pkgs/development/libraries/unicorn/default.nix @@ -21,18 +21,18 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ cmake pkg-config - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ cctools ]; - buildInputs = lib.optionals stdenv.isDarwin [ + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ IOKit ]; # Ensure the linker is using atomic when compiling for RISC-V, otherwise fails NIX_LDFLAGS = lib.optionalString stdenv.hostPlatform.isRiscV "-latomic"; - cmakeFlags = lib.optionals (stdenv.isDarwin && stdenv.isAarch64) [ + cmakeFlags = lib.optionals (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isAarch64) [ # Some x86 tests are interrupted by signal 10 "-DCMAKE_CTEST_ARGUMENTS=--exclude-regex;test_x86" ]; diff --git a/pkgs/development/libraries/unixODBCDrivers/default.nix b/pkgs/development/libraries/unixODBCDrivers/default.nix index fe181d37f6bf..bd27a36d663a 100644 --- a/pkgs/development/libraries/unixODBCDrivers/default.nix +++ b/pkgs/development/libraries/unixODBCDrivers/default.nix @@ -39,7 +39,7 @@ nativeBuildInputs = [ cmake ]; buildInputs = [ unixODBC openssl libiconv zlib ] - ++ lib.optionals stdenv.isDarwin [ libkrb5 ]; + ++ lib.optionals stdenv.hostPlatform.isDarwin [ libkrb5 ]; cmakeFlags = [ "-DWITH_EXTERNAL_ZLIB=ON" @@ -50,9 +50,9 @@ "-DWITH_IODBC=OFF" ]; - buildFlags = if stdenv.isDarwin then [ "maodbc" ] else null; + buildFlags = if stdenv.hostPlatform.isDarwin then [ "maodbc" ] else null; - installTargets = if stdenv.isDarwin then [ "install/fast" ] else null; + installTargets = if stdenv.hostPlatform.isDarwin then [ "install/fast" ] else null; # see the top of the file for an explanation passthru = { @@ -170,7 +170,7 @@ }; meta = with lib; { - broken = stdenv.isDarwin; + broken = stdenv.hostPlatform.isDarwin; description = "ODBC Driver ${versionMajor} for SQL Server"; homepage = "https://docs.microsoft.com/en-us/sql/connect/odbc/linux-mac/installing-the-microsoft-odbc-driver-for-sql-server?view=sql-server-2017"; sourceProvenance = with sourceTypes; [ binaryNativeCode ]; @@ -187,7 +187,7 @@ versionMajor = "18"; versionMinor = "1"; versionAdditional = "1.1"; - versionSuffix = lib.optionalString stdenv.isLinux "-1"; + versionSuffix = lib.optionalString stdenv.hostPlatform.isLinux "-1"; src = fetchurl { url = { @@ -205,7 +205,7 @@ }; nativeBuildInputs = - if stdenv.isDarwin + if stdenv.hostPlatform.isDarwin then [ # Fix up the names encoded into the dylib, and make them absolute. @@ -217,12 +217,12 @@ patchelf ]; - unpackPhase = lib.optionalString stdenv.isLinux '' + unpackPhase = lib.optionalString stdenv.hostPlatform.isLinux '' dpkg -x $src ./ ''; installPhase = - if stdenv.isDarwin + if stdenv.hostPlatform.isDarwin then '' mkdir -p $out @@ -236,14 +236,14 @@ ''; # Replace the hard-coded paths in the dylib with nixpkgs equivalents. - fixupPhase = lib.optionalString stdenv.isDarwin '' + fixupPhase = lib.optionalString stdenv.hostPlatform.isDarwin '' ${stdenv.cc.bintools.targetPrefix}install_name_tool \ -change /usr/lib/libiconv.2.dylib ${libiconv}/lib/libiconv.2.dylib \ -change /opt/homebrew/lib/libodbcinst.2.dylib ${unixODBC}/lib/libodbcinst.2.dylib \ $out/${finalAttrs.passthru.driver} ''; - postFixup = lib.optionalString stdenv.isLinux '' + postFixup = lib.optionalString stdenv.hostPlatform.isLinux '' patchelf --set-rpath ${lib.makeLibraryPath [ unixODBC openssl libkrb5 libuuid stdenv.cc.cc ]} \ $out/${finalAttrs.passthru.driver} ''; @@ -251,7 +251,7 @@ # see the top of the file for an explanation passthru = { fancyName = "ODBC Driver ${finalAttrs.versionMajor} for SQL Server"; - driver = "lib/libmsodbcsql${if stdenv.isDarwin then ".${finalAttrs.versionMajor}.dylib" else "-${finalAttrs.versionMajor}.${finalAttrs.versionMinor}.so.${finalAttrs.versionAdditional}"}"; + driver = "lib/libmsodbcsql${if stdenv.hostPlatform.isDarwin then ".${finalAttrs.versionMajor}.dylib" else "-${finalAttrs.versionMajor}.${finalAttrs.versionMinor}.so.${finalAttrs.versionAdditional}"}"; }; meta = with lib; { @@ -300,7 +300,7 @@ }; meta = with lib; { - broken = stdenv.isDarwin; + broken = stdenv.hostPlatform.isDarwin; description = "Amazon Redshift ODBC driver"; homepage = "https://docs.aws.amazon.com/redshift/latest/mgmt/configure-odbc-connection.html"; sourceProvenance = with sourceTypes; [ binaryNativeCode ]; diff --git a/pkgs/development/libraries/v8/default.nix b/pkgs/development/libraries/v8/default.nix index 3ea2d075602a..b6b2d4e6298f 100644 --- a/pkgs/development/libraries/v8/default.nix +++ b/pkgs/development/libraries/v8/default.nix @@ -101,11 +101,11 @@ stdenv.mkDerivation rec { ''; postPatch = '' - ${lib.optionalString stdenv.isAarch64 '' + ${lib.optionalString stdenv.hostPlatform.isAarch64 '' substituteInPlace build/toolchain/linux/BUILD.gn \ --replace 'toolprefix = "aarch64-linux-gnu-"' 'toolprefix = ""' ''} - ${lib.optionalString stdenv.isDarwin '' + ${lib.optionalString stdenv.hostPlatform.isDarwin '' substituteInPlace build/config/compiler/compiler.gni \ --replace 'strip_absolute_paths_from_debug_symbols = true' \ 'strip_absolute_paths_from_debug_symbols = false' @@ -113,7 +113,7 @@ stdenv.mkDerivation rec { --replace 'current_toolchain == host_toolchain || !use_xcode_clang' \ 'false' ''} - ${lib.optionalString stdenv.isDarwin '' + ${lib.optionalString stdenv.hostPlatform.isDarwin '' substituteInPlace build/config/compiler/BUILD.gn \ --replace "-Wl,-fatal_warnings" "" ''} @@ -141,7 +141,7 @@ stdenv.mkDerivation rec { ''host_toolchain="//build/toolchain/linux/unbundle:default"'' ''v8_snapshot_toolchain="//build/toolchain/linux/unbundle:default"'' ] ++ lib.optional stdenv.cc.isClang ''clang_base_path="${llvmCcAndBintools}"'' - ++ lib.optional stdenv.isDarwin ''use_lld=false''; + ++ lib.optional stdenv.hostPlatform.isDarwin ''use_lld=false''; env.NIX_CFLAGS_COMPILE = toString ([ "-O2" @@ -155,7 +155,7 @@ stdenv.mkDerivation rec { ninja pkg-config python3 - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ xcbuild llvmPackages.llvm python3.pkgs.setuptools diff --git a/pkgs/development/libraries/vc/0.7.nix b/pkgs/development/libraries/vc/0.7.nix index 50eaddda890e..fa0e6feb7df7 100644 --- a/pkgs/development/libraries/vc/0.7.nix +++ b/pkgs/development/libraries/vc/0.7.nix @@ -28,6 +28,6 @@ stdenv.mkDerivation rec { platforms = platforms.all; maintainers = with maintainers; [ abbradar ]; # never built on aarch64-darwin since first introduction in nixpkgs - broken = (stdenv.isDarwin && stdenv.isAarch64) || (stdenv.isLinux && stdenv.isAarch64); + broken = (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isAarch64) || (stdenv.hostPlatform.isLinux && stdenv.hostPlatform.isAarch64); }; } diff --git a/pkgs/development/libraries/vcdimager/default.nix b/pkgs/development/libraries/vcdimager/default.nix index 5c3140a177c3..02f959cf74ed 100644 --- a/pkgs/development/libraries/vcdimager/default.nix +++ b/pkgs/development/libraries/vcdimager/default.nix @@ -13,7 +13,7 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ pkg-config ]; buildInputs = [ libxml2 popt libiconv ] - ++ lib.optionals stdenv.isDarwin (with darwin.apple_sdk.frameworks; [ IOKit DiskArbitration ]); + ++ lib.optionals stdenv.hostPlatform.isDarwin (with darwin.apple_sdk.frameworks; [ IOKit DiskArbitration ]); propagatedBuildInputs = [ libcdio ]; diff --git a/pkgs/development/libraries/vectorscan/default.nix b/pkgs/development/libraries/vectorscan/default.nix index 835db0f3566b..8525a66e4092 100644 --- a/pkgs/development/libraries/vectorscan/default.nix +++ b/pkgs/development/libraries/vectorscan/default.nix @@ -28,7 +28,7 @@ stdenv.mkDerivation rec { pkg-config ragel python3 - ] ++ lib.optional stdenv.isLinux util-linux; + ] ++ lib.optional stdenv.hostPlatform.isLinux util-linux; buildInputs = [ boost184 @@ -50,7 +50,7 @@ stdenv.mkDerivation rec { (if lib.elem stdenv.hostPlatform.system [ "x86_64-linux" "i686-linux" ] then [ "-DBUILD_AVX2=ON" "-DBUILD_AVX512=ON" "-DBUILD_AVX512VBMI=ON" "-DFAT_RUNTIME=ON" ] else - (if (stdenv.isLinux && stdenv.isAarch64) then + (if (stdenv.hostPlatform.isLinux && stdenv.hostPlatform.isAarch64) then [ "-DBUILD_SVE=ON" "-DBUILD_SVE2=ON" "-DBUILD_SVE2_BITPERM=ON" "-DFAT_RUNTIME=ON" ] else [ "-DFAT_RUNTIME=OFF" ] diff --git a/pkgs/development/libraries/virtualpg/default.nix b/pkgs/development/libraries/virtualpg/default.nix index d9778decd129..e15961437002 100644 --- a/pkgs/development/libraries/virtualpg/default.nix +++ b/pkgs/development/libraries/virtualpg/default.nix @@ -15,7 +15,7 @@ stdenv.mkDerivation rec { ]; buildInputs = [ postgresql sqlite ] - ++ lib.optionals stdenv.isDarwin [ darwin.apple_sdk.frameworks.Kerberos ]; + ++ lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.Kerberos ]; meta = with lib; { description = "Loadable dynamic extension to both SQLite and SpatiaLite"; diff --git a/pkgs/development/libraries/vmmlib/default.nix b/pkgs/development/libraries/vmmlib/default.nix index 11df1a495f02..d2840ba33a63 100644 --- a/pkgs/development/libraries/vmmlib/default.nix +++ b/pkgs/development/libraries/vmmlib/default.nix @@ -19,14 +19,14 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ pkg-config cmake ]; buildInputs = [ boost lapack ] - ++ lib.optionals stdenv.isDarwin [ Accelerate CoreGraphics CoreVideo ]; + ++ lib.optionals stdenv.hostPlatform.isDarwin [ Accelerate CoreGraphics CoreVideo ]; - doCheck = !stdenv.isDarwin; + doCheck = !stdenv.hostPlatform.isDarwin; checkTarget = "test"; meta = with lib; { - broken = stdenv.isDarwin; + broken = stdenv.hostPlatform.isDarwin; description = "Vector and matrix math library implemented using C++ templates"; longDescription = ''vmmlib is a vector and matrix math library implemented diff --git a/pkgs/development/libraries/vrpn/default.nix b/pkgs/development/libraries/vrpn/default.nix index e233269fafd1..3272a4bbd147 100644 --- a/pkgs/development/libraries/vrpn/default.nix +++ b/pkgs/development/libraries/vrpn/default.nix @@ -24,12 +24,12 @@ stdenv.mkDerivation rec { unzip ]; - buildInputs = lib.optionals stdenv.isDarwin [ + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.CoreFoundation darwin.apple_sdk.frameworks.GLUT darwin.apple_sdk.frameworks.IOKit darwin.apple_sdk.frameworks.OpenGL - ] ++ lib.optionals stdenv.isLinux [ + ] ++ lib.optionals stdenv.hostPlatform.isLinux [ libGLU libGL ]; diff --git a/pkgs/development/libraries/vsqlite/default.nix b/pkgs/development/libraries/vsqlite/default.nix index 6981de6aa074..029e4c617f46 100644 --- a/pkgs/development/libraries/vsqlite/default.nix +++ b/pkgs/development/libraries/vsqlite/default.nix @@ -11,7 +11,7 @@ stdenv.mkDerivation rec { buildInputs = [ boost sqlite ]; - prePatch = lib.optionalString stdenv.isDarwin '' + prePatch = lib.optionalString stdenv.hostPlatform.isDarwin '' substituteInPlace Makefile.in \ --replace '-Wl,--as-needed' "" \ --replace '-Wl,-soname -Wl,libvsqlitepp.so.3' \ diff --git a/pkgs/development/libraries/vte/default.nix b/pkgs/development/libraries/vte/default.nix index 87cf27f70fd4..479758ed6dee 100644 --- a/pkgs/development/libraries/vte/default.nix +++ b/pkgs/development/libraries/vte/default.nix @@ -92,7 +92,7 @@ stdenv.mkDerivation (finalAttrs: { (lib.mesonBool "gtk4" (gtkVersion == "4")) ] ++ lib.optionals (!systemdSupport) [ "-D_systemd=false" - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ # -Bsymbolic-functions is not supported on darwin "-D_b_symbolic_functions=false" ]; diff --git a/pkgs/development/libraries/vtk/generic.nix b/pkgs/development/libraries/vtk/generic.nix index d131fe173ab8..3f7f05678f15 100644 --- a/pkgs/development/libraries/vtk/generic.nix +++ b/pkgs/development/libraries/vtk/generic.nix @@ -30,11 +30,11 @@ in stdenv.mkDerivation { buildInputs = [ libpng libtiff ] ++ optionals enableQt [ (qtEnv "qvtk-qt-env" [ qtx11extras qttools qtdeclarative ]) ] - ++ optionals stdenv.isLinux [ + ++ optionals stdenv.hostPlatform.isLinux [ libGLU xorgproto libXt - ] ++ optionals stdenv.isDarwin [ + ] ++ optionals stdenv.hostPlatform.isDarwin [ xpc AGL Cocoa @@ -52,8 +52,8 @@ in stdenv.mkDerivation { ] ++ optionals enablePython [ python ]; - propagatedBuildInputs = optionals stdenv.isDarwin [ libobjc ] - ++ optionals stdenv.isLinux [ libX11 libGL ]; + propagatedBuildInputs = optionals stdenv.hostPlatform.isDarwin [ libobjc ] + ++ optionals stdenv.hostPlatform.isLinux [ libX11 libGL ]; # see https://github.com/NixOS/nixpkgs/pull/178367#issuecomment-1238827254 patches = map fetchpatch patchesToFetch; @@ -64,7 +64,7 @@ in stdenv.mkDerivation { -i ThirdParty/libproj/vtklibproj/src/proj_json_streaming_writer.hpp \ -i IO/Image/vtkSEPReader.h '' - + optionalString stdenv.isDarwin '' + + optionalString stdenv.hostPlatform.isDarwin '' sed -i 's|COMMAND vtkHashSource|COMMAND "DYLD_LIBRARY_PATH=''${VTK_BINARY_DIR}/lib" ''${VTK_BINARY_DIR}/bin/vtkHashSource-${majorVersion}|' ./Parallel/Core/CMakeLists.txt sed -i 's/fprintf(output, shift)/fprintf(output, "%s", shift)/' ./ThirdParty/libxml2/vtklibxml2/xmlschemas.c sed -i 's/fprintf(output, shift)/fprintf(output, "%s", shift)/g' ./ThirdParty/libxml2/vtklibxml2/xpath.c @@ -83,7 +83,7 @@ in stdenv.mkDerivation { "-DVTK_MODULE_USE_EXTERNAL_vtkpng=ON" "-DVTK_MODULE_USE_EXTERNAL_vtktiff=1" "-DVTK_MODULE_ENABLE_VTK_RenderingExternal=YES" - ] ++ lib.optionals (!stdenv.isDarwin) [ + ] ++ lib.optionals (!stdenv.hostPlatform.isDarwin) [ "-DOPENGL_INCLUDE_DIR=${libGL}/include" (lib.cmakeBool "VTK_OPENGL_HAS_EGL" enableEgl) ] ++ [ @@ -94,7 +94,7 @@ in stdenv.mkDerivation { ] ++ optionals enableQt [ "-DVTK_GROUP_ENABLE_Qt:STRING=YES" ] - ++ optionals stdenv.isDarwin [ "-DOPENGL_INCLUDE_DIR=${OpenGL}/Library/Frameworks" ] + ++ optionals stdenv.hostPlatform.isDarwin [ "-DOPENGL_INCLUDE_DIR=${OpenGL}/Library/Frameworks" ] ++ optionals enablePython [ "-DVTK_WRAP_PYTHON:BOOL=ON" "-DVTK_PYTHON_VERSION:STRING=${pythonMajor}" diff --git a/pkgs/development/libraries/vulkan-headers/default.nix b/pkgs/development/libraries/vulkan-headers/default.nix index 9b5916810ab0..3a0d14eb9b0e 100644 --- a/pkgs/development/libraries/vulkan-headers/default.nix +++ b/pkgs/development/libraries/vulkan-headers/default.nix @@ -6,7 +6,7 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ cmake ]; # TODO: investigate why isn't found - cmakeFlags = lib.optionals stdenv.isDarwin [ "-DVULKAN_HEADERS_ENABLE_MODULE=OFF" ]; + cmakeFlags = lib.optionals stdenv.hostPlatform.isDarwin [ "-DVULKAN_HEADERS_ENABLE_MODULE=OFF" ]; src = fetchFromGitHub { owner = "KhronosGroup"; diff --git a/pkgs/development/libraries/vulkan-loader/default.nix b/pkgs/development/libraries/vulkan-loader/default.nix index a43dda1b5f83..3c002d197ff5 100644 --- a/pkgs/development/libraries/vulkan-loader/default.nix +++ b/pkgs/development/libraries/vulkan-loader/default.nix @@ -14,7 +14,7 @@ stdenv.mkDerivation (finalAttrs: { }; patches = [ ./fix-pkgconfig.patch ] - ++ lib.optionals stdenv.is32bit [ + ++ lib.optionals stdenv.hostPlatform.is32bit [ # Backport patch to support 64-bit inodes on 32-bit systems # FIXME: remove in next update (fetchpatch { @@ -25,11 +25,11 @@ stdenv.mkDerivation (finalAttrs: { nativeBuildInputs = [ cmake pkg-config ]; buildInputs = [ vulkan-headers ] - ++ lib.optionals stdenv.isLinux [ libX11 libxcb libXrandr wayland ]; + ++ lib.optionals stdenv.hostPlatform.isLinux [ libX11 libxcb libXrandr wayland ]; cmakeFlags = [ "-DCMAKE_INSTALL_INCLUDEDIR=${vulkan-headers}/include" ] - ++ lib.optional stdenv.isDarwin "-DSYSCONFDIR=${moltenvk}/share" - ++ lib.optional stdenv.isLinux "-DSYSCONFDIR=${addDriverRunpath.driverLink}/share" + ++ lib.optional stdenv.hostPlatform.isDarwin "-DSYSCONFDIR=${moltenvk}/share" + ++ lib.optional stdenv.hostPlatform.isLinux "-DSYSCONFDIR=${addDriverRunpath.driverLink}/share" ++ lib.optional (stdenv.buildPlatform != stdenv.hostPlatform) "-DUSE_GAS=OFF"; outputs = [ "out" "dev" ]; diff --git a/pkgs/development/libraries/vxl/default.nix b/pkgs/development/libraries/vxl/default.nix index b7173ed93701..9ee55b47d457 100644 --- a/pkgs/development/libraries/vxl/default.nix +++ b/pkgs/development/libraries/vxl/default.nix @@ -34,7 +34,7 @@ stdenv.mkDerivation (finalAttrs: { ]; # test failure on aarch64-linux; unknown reason: - cmakeFlags = lib.optionals stdenv.isAarch64 [ "-DCMAKE_CTEST_ARGUMENTS='-E vgl_test_frustum_3d'" ]; + cmakeFlags = lib.optionals stdenv.hostPlatform.isAarch64 [ "-DCMAKE_CTEST_ARGUMENTS='-E vgl_test_frustum_3d'" ]; doCheck = true; diff --git a/pkgs/development/libraries/wangle/default.nix b/pkgs/development/libraries/wangle/default.nix index e90d05318eac..d07145641a70 100644 --- a/pkgs/development/libraries/wangle/default.nix +++ b/pkgs/development/libraries/wangle/default.nix @@ -34,7 +34,7 @@ stdenv.mkDerivation (finalAttrs: { cmakeFlags = [ "-Wno-dev" (lib.cmakeBool "BUILD_TESTS" finalAttrs.finalPackage.doCheck) - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ "-DCMAKE_OSX_DEPLOYMENT_TARGET=10.14" # For aligned allocation ]; @@ -64,7 +64,7 @@ stdenv.mkDerivation (finalAttrs: { # https://github.com/facebook/wangle/issues/206 "SSLContextManagerTest.TestSessionContextCertRemoval" - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ # flaky "BroadcastPoolTest.ThreadLocalPool" "Bootstrap.UDPClientServerTest" diff --git a/pkgs/development/libraries/wayland/default.nix b/pkgs/development/libraries/wayland/default.nix index 3cd2ba5dbe68..72ba54250b51 100644 --- a/pkgs/development/libraries/wayland/default.nix +++ b/pkgs/development/libraries/wayland/default.nix @@ -5,7 +5,7 @@ , pkg-config , ninja , wayland-scanner -, withTests ? stdenv.isLinux +, withTests ? stdenv.hostPlatform.isLinux , libffi , epoll-shim , withDocumentation ? stdenv.hostPlatform == stdenv.buildPlatform diff --git a/pkgs/development/libraries/webkitgtk/default.nix b/pkgs/development/libraries/webkitgtk/default.nix index ecf306966c1f..5ad079e133ca 100644 --- a/pkgs/development/libraries/webkitgtk/default.nix +++ b/pkgs/development/libraries/webkitgtk/default.nix @@ -80,14 +80,14 @@ stdenv.mkDerivation (finalAttrs: { # https://github.com/NixOS/nixpkgs/issues/153528 # Can't be linked within a 4GB address space. - separateDebugInfo = stdenv.isLinux && !stdenv.is32bit; + separateDebugInfo = stdenv.hostPlatform.isLinux && !stdenv.hostPlatform.is32bit; src = fetchurl { url = "https://webkitgtk.org/releases/webkitgtk-${finalAttrs.version}.tar.xz"; hash = "sha256-3ILQQuysqYGkhSNXwG5SNXQzGc8QqUzTatQbl4g6C1Q="; }; - patches = lib.optionals stdenv.isLinux [ + patches = lib.optionals stdenv.hostPlatform.isLinux [ (substituteAll { src = ./fix-bubblewrap-paths.patch; inherit (builtins) storeDir; @@ -118,7 +118,7 @@ stdenv.mkDerivation (finalAttrs: { gi-docgen glib # for gdbus-codegen unifdef - ] ++ lib.optionals stdenv.isLinux [ + ] ++ lib.optionals stdenv.hostPlatform.isLinux [ wayland-scanner ]; @@ -151,10 +151,10 @@ stdenv.mkDerivation (finalAttrs: { p11-kit sqlite woff2 - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ libedit readline - ] ++ lib.optional (stdenv.isDarwin && lib.versionOlder stdenv.hostPlatform.darwinSdkVersion "11.0") ( + ] ++ lib.optional (stdenv.hostPlatform.isDarwin && lib.versionOlder stdenv.hostPlatform.darwinSdkVersion "11.0") ( # this can likely be removed as: # "libproc.h is included in the 10.12 SDK Libsystem and should be identical to this one." # but the package is marked broken on darwin so unable to test @@ -166,7 +166,7 @@ stdenv.mkDerivation (finalAttrs: { runCommand "webkitgtk_headers" { } '' install -Dm444 "${lib.getDev apple_sdk.sdk}"/include/libproc.h "$out"/include/libproc.h '' - ) ++ lib.optionals stdenv.isLinux [ + ) ++ lib.optionals stdenv.hostPlatform.isLinux [ libseccomp libmanette wayland @@ -200,12 +200,12 @@ stdenv.mkDerivation (finalAttrs: { "-DUSE_SOUP2=${cmakeBool (lib.versions.major libsoup.version == "2")}" "-DUSE_LIBSECRET=${cmakeBool withLibsecret}" "-DENABLE_EXPERIMENTAL_FEATURES=${cmakeBool enableExperimental}" - ] ++ lib.optionals stdenv.isLinux [ + ] ++ lib.optionals stdenv.hostPlatform.isLinux [ # Have to be explicitly specified when cross. # https://github.com/WebKit/WebKit/commit/a84036c6d1d66d723f217a4c29eee76f2039a353 "-DBWRAP_EXECUTABLE=${lib.getExe bubblewrap}" "-DDBUS_PROXY_EXECUTABLE=${lib.getExe xdg-dbus-proxy}" - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ "-DENABLE_GAMEPAD=OFF" "-DENABLE_GTKDOC=OFF" "-DENABLE_MINIBROWSER=OFF" @@ -244,6 +244,6 @@ stdenv.mkDerivation (finalAttrs: { ]; platforms = platforms.linux ++ platforms.darwin; maintainers = teams.gnome.members; - broken = stdenv.isDarwin; + broken = stdenv.hostPlatform.isDarwin; }; }) diff --git a/pkgs/development/libraries/webrtc-audio-processing/0.3.nix b/pkgs/development/libraries/webrtc-audio-processing/0.3.nix index 3ac5e2bd4adc..a3efc646d319 100644 --- a/pkgs/development/libraries/webrtc-audio-processing/0.3.nix +++ b/pkgs/development/libraries/webrtc-audio-processing/0.3.nix @@ -16,7 +16,7 @@ stdenv.mkDerivation rec { ./enable-powerpc.patch ]; - buildInputs = lib.optionals stdenv.isDarwin (with darwin.apple_sdk.frameworks; [ ApplicationServices ]); + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin (with darwin.apple_sdk.frameworks; [ ApplicationServices ]); patchPhase = lib.optionalString stdenv.hostPlatform.isMusl '' substituteInPlace webrtc/base/checks.cc --replace 'defined(__UCLIBC__)' 1 diff --git a/pkgs/development/libraries/webrtc-audio-processing/default.nix b/pkgs/development/libraries/webrtc-audio-processing/default.nix index b25ea77b44b4..1a34ade3cee0 100644 --- a/pkgs/development/libraries/webrtc-audio-processing/default.nix +++ b/pkgs/development/libraries/webrtc-audio-processing/default.nix @@ -42,9 +42,9 @@ stdenv.mkDerivation rec { abseil-cpp ]; - buildInputs = lib.optionals stdenv.isDarwin (with darwin.apple_sdk.frameworks; [ ApplicationServices Foundation ]); + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin (with darwin.apple_sdk.frameworks; [ ApplicationServices Foundation ]); - env = lib.optionalAttrs stdenv.isx86_32 { + env = lib.optionalAttrs stdenv.hostPlatform.isx86_32 { # https://gitlab.freedesktop.org/pulseaudio/webrtc-audio-processing/-/issues/5 NIX_CFLAGS_COMPILE = "-msse2"; }; diff --git a/pkgs/development/libraries/wolfssl/default.nix b/pkgs/development/libraries/wolfssl/default.nix index c55ad0010d53..aeef5a8c4705 100644 --- a/pkgs/development/libraries/wolfssl/default.nix +++ b/pkgs/development/libraries/wolfssl/default.nix @@ -54,14 +54,14 @@ stdenv.mkDerivation (finalAttrs: { # Enable AVX/AVX2/AES-NI instructions, gated by runtime detection via CPUID. "--enable-intelasm" "--enable-aesni" - ] ++ lib.optionals (stdenv.isAarch64 && stdenv.isDarwin) [ + ] ++ lib.optionals (stdenv.hostPlatform.isAarch64 && stdenv.hostPlatform.isDarwin) [ # No runtime detection under ARM and no platform function checks like for X86. # However, all ARM macOS systems have the supported extensions autodetected in the configure script. "--enable-armasm=inline" ] ++ extraConfigureFlags; # Breaks tls13 tests on aarch64-darwin. - hardeningDisable = lib.optionals (stdenv.isDarwin && stdenv.isAarch64) [ "zerocallusedregs" ]; + hardeningDisable = lib.optionals (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isAarch64) [ "zerocallusedregs" ]; # LTO should help with the C implementations. env.NIX_CFLAGS_COMPILE = lib.optionalString enableLto "-flto"; @@ -74,7 +74,7 @@ stdenv.mkDerivation (finalAttrs: { "out" ]; - propagatedBuildInputs = lib.optionals stdenv.isDarwin [ + propagatedBuildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ Security ]; diff --git a/pkgs/development/libraries/wxSVG/default.nix b/pkgs/development/libraries/wxSVG/default.nix index d14a77a67004..5182cc2ff955 100644 --- a/pkgs/development/libraries/wxSVG/default.nix +++ b/pkgs/development/libraries/wxSVG/default.nix @@ -40,7 +40,7 @@ stdenv.mkDerivation rec { libexif pango wxGTK - ] ++ lib.optional stdenv.isDarwin Cocoa; + ] ++ lib.optional stdenv.hostPlatform.isDarwin Cocoa; enableParallelBuilding = true; diff --git a/pkgs/development/libraries/wxsqlite3/default.nix b/pkgs/development/libraries/wxsqlite3/default.nix index e986ab87ffac..7ad997e6d6da 100644 --- a/pkgs/development/libraries/wxsqlite3/default.nix +++ b/pkgs/development/libraries/wxsqlite3/default.nix @@ -24,7 +24,7 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ autoreconfHook ]; buildInputs = [ sqlite wxGTK ] - ++ lib.optionals (stdenv.isDarwin) [ Cocoa setfile rez derez ]; + ++ lib.optionals (stdenv.hostPlatform.isDarwin) [ Cocoa setfile rez derez ]; meta = with lib; { homepage = "https://utelle.github.io/wxsqlite3/"; diff --git a/pkgs/development/libraries/wxsqliteplus/default.nix b/pkgs/development/libraries/wxsqliteplus/default.nix index 0775dca688b4..2d980c69cbe6 100644 --- a/pkgs/development/libraries/wxsqliteplus/default.nix +++ b/pkgs/development/libraries/wxsqliteplus/default.nix @@ -15,23 +15,23 @@ stdenv.mkDerivation rec { sed -i '/WX_CLEAR_ARRAY/s/$/;/' src/{createtable,sqlite3table}.cpp ''; - buildInputs = [ wxGTK wxsqlite3 sqlite ] ++ lib.optional stdenv.isDarwin Cocoa; + buildInputs = [ wxGTK wxsqlite3 sqlite ] ++ lib.optional stdenv.hostPlatform.isDarwin Cocoa; makeFlags = [ "LDFLAGS=-L${wxsqlite3}/lib" - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ "SETFILE=${setfile}/bin/SetFile" ]; preBuild = '' sed -ie 's|all: $(LIBPREFIX)wxsqlite$(LIBEXT)|all: |g' Makefile sed -ie 's|wxsqliteplus$(EXEEXT): $(WXSQLITEPLUS_OBJECTS) $(LIBPREFIX)wxsqlite$(LIBEXT)|wxsqliteplus$(EXEEXT): $(WXSQLITEPLUS_OBJECTS) |g' Makefile - sed -ie 's|-lwxsqlite |-lwxcode_${if stdenv.isDarwin then "osx_cocoau_wxsqlite3-3.2.0" else "gtk3u_wxsqlite3-3.2"} |g' Makefile + sed -ie 's|-lwxsqlite |-lwxcode_${if stdenv.hostPlatform.isDarwin then "osx_cocoau_wxsqlite3-3.2.0" else "gtk3u_wxsqlite3-3.2"} |g' Makefile ''; installPhase = '' - install -D ${lib.optionalString stdenv.isDarwin "wxsqliteplus.app/Contents/MacOS/"}wxsqliteplus $out/bin/wxsqliteplus - '' + lib.optionalString stdenv.isDarwin '' + install -D ${lib.optionalString stdenv.hostPlatform.isDarwin "wxsqliteplus.app/Contents/MacOS/"}wxsqliteplus $out/bin/wxsqliteplus + '' + lib.optionalString stdenv.hostPlatform.isDarwin '' mkdir -p $out/Applications mv wxsqliteplus.app $out/Applications/ ''; diff --git a/pkgs/development/libraries/wxwidgets/wxGTK31.nix b/pkgs/development/libraries/wxwidgets/wxGTK31.nix index be0c45c701dc..21333afe5e8e 100644 --- a/pkgs/development/libraries/wxwidgets/wxGTK31.nix +++ b/pkgs/development/libraries/wxwidgets/wxGTK31.nix @@ -18,8 +18,8 @@ , withCurl ? false , withPrivateFonts ? false , withEGL ? true -, withMesa ? !stdenv.isDarwin -, withWebKit ? stdenv.isDarwin +, withMesa ? !stdenv.hostPlatform.isDarwin +, withWebKit ? stdenv.hostPlatform.isDarwin , webkitgtk , setfile , AGL @@ -54,7 +54,7 @@ stdenv.mkDerivation rec { buildInputs = [ gst_all_1.gst-plugins-base gst_all_1.gstreamer - ] ++ lib.optionals (!stdenv.isDarwin) [ + ] ++ lib.optionals (!stdenv.hostPlatform.isDarwin) [ gtk3 libSM libXinerama @@ -64,9 +64,9 @@ stdenv.mkDerivation rec { ] ++ lib.optional withCurl curl ++ lib.optional withMesa libGLU - ++ lib.optional (withWebKit && !stdenv.isDarwin) webkitgtk - ++ lib.optional (withWebKit && stdenv.isDarwin) WebKit - ++ lib.optionals stdenv.isDarwin [ + ++ lib.optional (withWebKit && !stdenv.hostPlatform.isDarwin) webkitgtk + ++ lib.optional (withWebKit && stdenv.hostPlatform.isDarwin) WebKit + ++ lib.optionals stdenv.hostPlatform.isDarwin [ setfile Carbon Cocoa @@ -77,7 +77,7 @@ stdenv.mkDerivation rec { WebKit ]; - propagatedBuildInputs = lib.optional stdenv.isDarwin AGL; + propagatedBuildInputs = lib.optional stdenv.hostPlatform.isDarwin AGL; configureFlags = [ "--disable-precomp-headers" @@ -92,7 +92,7 @@ stdenv.mkDerivation rec { ++ lib.optional withCurl "--enable-webrequest" ++ lib.optional withPrivateFonts "--enable-privatefonts" ++ lib.optional withMesa "--with-opengl" - ++ lib.optionals stdenv.isDarwin [ + ++ lib.optionals stdenv.hostPlatform.isDarwin [ "--with-osx_cocoa" "--with-libiconv" ] ++ lib.optionals withWebKit [ @@ -100,7 +100,7 @@ stdenv.mkDerivation rec { "--enable-webviewwebkit" ]; - SEARCH_LIB = lib.optionalString (!stdenv.isDarwin) "${libGLU.out}/lib ${libGL.out}/lib "; + SEARCH_LIB = lib.optionalString (!stdenv.hostPlatform.isDarwin) "${libGLU.out}/lib ${libGL.out}/lib "; preConfigure = '' substituteInPlace configure --replace \ @@ -109,7 +109,7 @@ stdenv.mkDerivation rec { 'SEARCH_LIB=' 'DUMMY_SEARCH_LIB=' substituteInPlace configure --replace \ /usr /no-such-path - '' + lib.optionalString stdenv.isDarwin '' + '' + lib.optionalString stdenv.hostPlatform.isDarwin '' substituteInPlace configure --replace \ 'ac_cv_prog_SETFILE="/Developer/Tools/SetFile"' \ 'ac_cv_prog_SETFILE="${setfile}/bin/SetFile"' diff --git a/pkgs/development/libraries/wxwidgets/wxGTK32.nix b/pkgs/development/libraries/wxwidgets/wxGTK32.nix index a77dedb0c6ee..055000cfa68c 100644 --- a/pkgs/development/libraries/wxwidgets/wxGTK32.nix +++ b/pkgs/development/libraries/wxwidgets/wxGTK32.nix @@ -20,7 +20,7 @@ , compat28 ? false , compat30 ? true , unicode ? true -, withMesa ? !stdenv.isDarwin +, withMesa ? !stdenv.hostPlatform.isDarwin , withWebKit ? true , webkitgtk , setfile @@ -69,7 +69,7 @@ stdenv.mkDerivation rec { libjpeg_turbo zlib pcre2 - ] ++ lib.optionals stdenv.isLinux [ + ] ++ lib.optionals stdenv.hostPlatform.isLinux [ gtk3 libSM libXinerama @@ -78,9 +78,9 @@ stdenv.mkDerivation rec { xorgproto ] ++ lib.optional withMesa libGLU - ++ lib.optional (withWebKit && stdenv.isLinux) webkitgtk - ++ lib.optional (withWebKit && stdenv.isDarwin) WebKit - ++ lib.optionals stdenv.isDarwin [ + ++ lib.optional (withWebKit && stdenv.hostPlatform.isLinux) webkitgtk + ++ lib.optional (withWebKit && stdenv.hostPlatform.isDarwin) WebKit + ++ lib.optionals stdenv.hostPlatform.isDarwin [ expat setfile Carbon @@ -92,7 +92,7 @@ stdenv.mkDerivation rec { WebKit ]; - propagatedBuildInputs = lib.optional stdenv.isDarwin AGL; + propagatedBuildInputs = lib.optional stdenv.hostPlatform.isDarwin AGL; configureFlags = [ "--disable-precomp-headers" @@ -106,7 +106,7 @@ stdenv.mkDerivation rec { (if compat30 then "--enable-compat30" else "--disable-compat30") ] ++ lib.optional unicode "--enable-unicode" ++ lib.optional withMesa "--with-opengl" - ++ lib.optionals stdenv.isDarwin [ + ++ lib.optionals stdenv.hostPlatform.isDarwin [ "--with-osx_cocoa" "--with-libiconv" ] ++ lib.optionals withWebKit [ @@ -114,12 +114,12 @@ stdenv.mkDerivation rec { "--enable-webviewwebkit" ]; - SEARCH_LIB = lib.optionalString (!stdenv.isDarwin) "${libGLU.out}/lib ${libGL.out}/lib"; + SEARCH_LIB = lib.optionalString (!stdenv.hostPlatform.isDarwin) "${libGLU.out}/lib ${libGL.out}/lib"; preConfigure = '' cp -r ${catch}/* 3rdparty/catch/ cp -r ${nanosvg}/* 3rdparty/nanosvg/ - '' + lib.optionalString stdenv.isDarwin '' + '' + lib.optionalString stdenv.hostPlatform.isDarwin '' substituteInPlace configure \ --replace 'ac_cv_prog_SETFILE="/Developer/Tools/SetFile"' 'ac_cv_prog_SETFILE="${setfile}/bin/SetFile"' substituteInPlace configure \ diff --git a/pkgs/development/libraries/x264/default.nix b/pkgs/development/libraries/x264/default.nix index 2be8ea48b8e2..de4a3d8d7843 100644 --- a/pkgs/development/libraries/x264/default.nix +++ b/pkgs/development/libraries/x264/default.nix @@ -23,7 +23,7 @@ stdenv.mkDerivation rec { ./disable-arm-neon-default.patch ]; - postPatch = lib.optionalString stdenv.isDarwin '' + postPatch = lib.optionalString stdenv.hostPlatform.isDarwin '' substituteInPlace Makefile --replace '$(if $(STRIP), $(STRIP) -x $@)' '$(if $(STRIP), $(STRIP) -S $@)' ''; @@ -39,7 +39,7 @@ stdenv.mkDerivation rec { ''; configureFlags = lib.optional enableShared "--enable-shared" - ++ lib.optional (!stdenv.isi686) "--enable-pic" + ++ lib.optional (!stdenv.hostPlatform.isi686) "--enable-pic" ++ lib.optional (stdenv.buildPlatform != stdenv.hostPlatform) "--cross-prefix=${stdenv.cc.targetPrefix}"; makeFlags = [ diff --git a/pkgs/development/libraries/x265/default.nix b/pkgs/development/libraries/x265/default.nix index 8e16ca72e003..a436a59aead7 100644 --- a/pkgs/development/libraries/x265/default.nix +++ b/pkgs/development/libraries/x265/default.nix @@ -10,14 +10,14 @@ , numactl # Multi bit-depth support (8bit+10bit+12bit): -, multibitdepthSupport ? (stdenv.is64bit && !(stdenv.isAarch64 && stdenv.isLinux)) +, multibitdepthSupport ? (stdenv.hostPlatform.is64bit && !(stdenv.hostPlatform.isAarch64 && stdenv.hostPlatform.isLinux)) # Other options: , cliSupport ? true # Build standalone CLI application , custatsSupport ? false # Internal profiling of encoder work , debugSupport ? false # Run-time sanity checks (debugging) , ppaSupport ? false # PPA profiling instrumentation -, unittestsSupport ? stdenv.isx86_64 # Unit tests - only testing x64 assembly +, unittestsSupport ? stdenv.hostPlatform.isx86_64 # Unit tests - only testing x64 assembly , vtuneSupport ? false # Vtune profiling instrumentation , werrorSupport ? false # Warnings as errors }: diff --git a/pkgs/development/libraries/xapian/default.nix b/pkgs/development/libraries/xapian/default.nix index 0862fcfe25f6..c8a28166a7a4 100644 --- a/pkgs/development/libraries/xapian/default.nix +++ b/pkgs/development/libraries/xapian/default.nix @@ -34,13 +34,13 @@ let env = { AUTOMATED_TESTING = true; # https://trac.xapian.org/changeset/8be35f5e1/git - } // lib.optionalAttrs stdenv.is32bit { + } // lib.optionalAttrs stdenv.hostPlatform.is32bit { NIX_CFLAGS_COMPILE = "-fpermissive"; }; # the configure script thinks that Darwin has ___exp10 # but it’s not available on my systems (or hydra apparently) - postConfigure = lib.optionalString stdenv.isDarwin '' + postConfigure = lib.optionalString stdenv.hostPlatform.isDarwin '' substituteInPlace config.h \ --replace "#define HAVE___EXP10 1" "#undef HAVE___EXP10" ''; diff --git a/pkgs/development/libraries/xavs/default.nix b/pkgs/development/libraries/xavs/default.nix index 2d0960e3ff52..14c4b0a7e588 100644 --- a/pkgs/development/libraries/xavs/default.nix +++ b/pkgs/development/libraries/xavs/default.nix @@ -20,7 +20,7 @@ stdenv.mkDerivation rec { patchShebangs tools/patcheck patchShebangs tools/regression-test.pl patchShebangs tools/xavs-format - '' + lib.optionalString stdenv.isDarwin '' + '' + lib.optionalString stdenv.hostPlatform.isDarwin '' substituteInPlace config.guess --replace 'uname -p' 'uname -m' substituteInPlace configure \ --replace '-O4' '-O3' \ diff --git a/pkgs/development/libraries/xed/default.nix b/pkgs/development/libraries/xed/default.nix index 1fb634a80b90..2918ae7f3fe8 100644 --- a/pkgs/development/libraries/xed/default.nix +++ b/pkgs/development/libraries/xed/default.nix @@ -25,7 +25,7 @@ in stdenv.mkDerivation rec { sha256 = "sha256-LF4iJ1/Z3OifCiir/kU3ufZqtiRLeaJeAwuBqP2BCF4="; }; - nativeBuildInputs = [ mbuild ] ++ lib.optionals stdenv.isDarwin [ llvmPackages.bintools ]; + nativeBuildInputs = [ mbuild ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ llvmPackages.bintools ]; buildPhase = '' patchShebangs mfile.py @@ -40,7 +40,7 @@ in stdenv.mkDerivation rec { dontInstall = true; # already installed during buildPhase meta = with lib; { - broken = stdenv.isAarch64; + broken = stdenv.hostPlatform.isAarch64; description = "Intel X86 Encoder Decoder (Intel XED)"; homepage = "https://intelxed.github.io/"; license = licenses.asl20; diff --git a/pkgs/development/libraries/xgboost/default.nix b/pkgs/development/libraries/xgboost/default.nix index 2b96bede313d..c294551eef50 100644 --- a/pkgs/development/libraries/xgboost/default.nix +++ b/pkgs/development/libraries/xgboost/default.nix @@ -67,7 +67,7 @@ effectiveStdenv.mkDerivation rec { ]; nativeBuildInputs = [ cmake ] - ++ lib.optionals effectiveStdenv.isDarwin [ llvmPackages.openmp ] + ++ lib.optionals effectiveStdenv.hostPlatform.isDarwin [ llvmPackages.openmp ] ++ lib.optionals cudaSupport [ autoAddDriverRunpath ] ++ lib.optionals rLibrary [ R ]; diff --git a/pkgs/development/libraries/xml-security-c/default.nix b/pkgs/development/libraries/xml-security-c/default.nix index d76b2031aa3f..d36804c6bce8 100644 --- a/pkgs/development/libraries/xml-security-c/default.nix +++ b/pkgs/development/libraries/xml-security-c/default.nix @@ -40,7 +40,7 @@ stdenv.mkDerivation (finalAttrs: { xercesc openssl ] - ++ lib.optionals stdenv.isDarwin [ + ++ lib.optionals stdenv.hostPlatform.isDarwin [ CoreFoundation CoreServices SystemConfiguration diff --git a/pkgs/development/libraries/xvidcore/default.nix b/pkgs/development/libraries/xvidcore/default.nix index 5ec3d44dfb62..9a3c150b3d25 100644 --- a/pkgs/development/libraries/xvidcore/default.nix +++ b/pkgs/development/libraries/xvidcore/default.nix @@ -12,7 +12,7 @@ stdenv.mkDerivation rec { preConfigure = '' # Configure script is not in the root of the source directory cd build/generic - '' + lib.optionalString stdenv.isDarwin '' + '' + lib.optionalString stdenv.hostPlatform.isDarwin '' # Undocumented darwin hack substituteInPlace configure --replace "-no-cpp-precomp" "" ''; @@ -20,18 +20,18 @@ stdenv.mkDerivation rec { configureFlags = [ ] # Undocumented darwin hack (assembly is probably disabled due to an # issue with nasm, however yasm is now used) - ++ lib.optional stdenv.isDarwin "--enable-macosx_module --disable-assembly"; + ++ lib.optional stdenv.hostPlatform.isDarwin "--enable-macosx_module --disable-assembly"; nativeBuildInputs = [ ] - ++ lib.optional (!stdenv.isDarwin) yasm; + ++ lib.optional (!stdenv.hostPlatform.isDarwin) yasm; buildInputs = [ ] # Undocumented darwin hack - ++ lib.optionals stdenv.isDarwin [ autoconf automake libtool ]; + ++ lib.optionals stdenv.hostPlatform.isDarwin [ autoconf automake libtool ]; # Don't remove static libraries (e.g. 'libs/*.a') on darwin. They're needed to # compile ffmpeg (and perhaps other things). - postInstall = lib.optionalString (!stdenv.isDarwin) '' + postInstall = lib.optionalString (!stdenv.hostPlatform.isDarwin) '' rm $out/lib/*.a ''; diff --git a/pkgs/development/libraries/yubico-pam/default.nix b/pkgs/development/libraries/yubico-pam/default.nix index 3af451ec84e0..e60008994b03 100644 --- a/pkgs/development/libraries/yubico-pam/default.nix +++ b/pkgs/development/libraries/yubico-pam/default.nix @@ -26,7 +26,7 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ autoreconfHook pkg-config asciidoc libxslt docbook_xsl ]; buildInputs = [ pam yubikey-personalization libyubikey libykclient ] - ++ lib.optionals stdenv.isDarwin [ CoreServices SystemConfiguration ]; + ++ lib.optionals stdenv.hostPlatform.isDarwin [ CoreServices SystemConfiguration ]; meta = with lib; { description = "Yubico PAM module"; diff --git a/pkgs/development/libraries/zeroc-ice/default.nix b/pkgs/development/libraries/zeroc-ice/default.nix index 9c8db3159396..5c6a0ba9bbe1 100644 --- a/pkgs/development/libraries/zeroc-ice/default.nix +++ b/pkgs/development/libraries/zeroc-ice/default.nix @@ -78,6 +78,6 @@ in stdenv.mkDerivation rec { license = licenses.gpl2Only; platforms = platforms.unix; maintainers = with maintainers; [ abbradar ]; - broken = stdenv.isDarwin; + broken = stdenv.hostPlatform.isDarwin; }; } diff --git a/pkgs/development/lisp-modules/ql.nix b/pkgs/development/lisp-modules/ql.nix index 91a458c0ef08..af6334671230 100644 --- a/pkgs/development/lisp-modules/ql.nix +++ b/pkgs/development/lisp-modules/ql.nix @@ -86,7 +86,7 @@ let cffi-libffi = super.cffi-libffi.overrideLispAttrs (o: { nativeBuildInputs = [ pkgs.libffi ]; nativeLibs = [ pkgs.libffi ]; - patches = lib.optionals stdenv.isDarwin [ ./patches/cffi-libffi-darwin-ffi-h.patch ]; + patches = lib.optionals stdenv.hostPlatform.isDarwin [ ./patches/cffi-libffi-darwin-ffi-h.patch ]; }); cl-rabbit = super.cl-rabbit.overrideLispAttrs (o: { nativeBuildInputs = [ pkgs.rabbitmq-c ]; diff --git a/pkgs/development/lua-modules/nfd/default.nix b/pkgs/development/lua-modules/nfd/default.nix index 0bd421ede7ce..66624c6f0955 100644 --- a/pkgs/development/lua-modules/nfd/default.nix +++ b/pkgs/development/lua-modules/nfd/default.nix @@ -24,7 +24,7 @@ buildLuarocksPackage { luarocksConfig.variables.LUA_LIBDIR = "${lua}/lib"; nativeBuildInputs = [ pkg-config ]; - buildInputs = lib.optionals stdenv.isDarwin [ AppKit ]; + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ AppKit ]; postInstall = '' find $out -name nfd_zenity.so -execdir mv {} nfd.so \; diff --git a/pkgs/development/lua-modules/overrides.nix b/pkgs/development/lua-modules/overrides.nix index 58cae66490ce..61c44022e9ec 100644 --- a/pkgs/development/lua-modules/overrides.nix +++ b/pkgs/development/lua-modules/overrides.nix @@ -461,7 +461,7 @@ in ]; }); - luasystem = prev.luasystem.overrideAttrs (oa: lib.optionalAttrs stdenv.isLinux { + luasystem = prev.luasystem.overrideAttrs (oa: lib.optionalAttrs stdenv.hostPlatform.isLinux { buildInputs = [ glibc.out ]; }); @@ -503,7 +503,7 @@ in # ld: symbol(s) not found for architecture arm64 # clang-16: error: linker command failed with exit code 1 (use -v to see invocation) - meta.broken = stdenv.isDarwin; + meta.broken = stdenv.hostPlatform.isDarwin; }); lush-nvim = prev.lush-nvim.overrideAttrs (drv: { @@ -644,7 +644,7 @@ in buildInputs = [ libuv final.lua ]; nativeBuildInputs = [ pkg-config cmake ] - ++ lib.optionals stdenv.isDarwin [ fixDarwinDylibNames ]; + ++ lib.optionals stdenv.hostPlatform.isDarwin [ fixDarwinDylibNames ]; }; luv = prev.luv.overrideAttrs (oa: { @@ -785,7 +785,7 @@ in }); sqlite = prev.sqlite.overrideAttrs (drv: { - doCheck = stdenv.isLinux; + doCheck = stdenv.hostPlatform.isLinux; nativeCheckInputs = [ final.plenary-nvim neovim-unwrapped ]; # the plugin loads the library from either the LIBSQLITE env @@ -835,7 +835,7 @@ in hash = "sha256-PLihirhJshcUQI3L1eTcnQiZvocDl29eQHhdBwJQRU8="; }; - NIX_LDFLAGS = lib.optionalString stdenv.isDarwin + NIX_LDFLAGS = lib.optionalString stdenv.hostPlatform.isDarwin (if lua.pkgs.isLuaJIT then "-lluajit-${lua.luaversion}" else "-llua"); nativeBuildInputs = oa.nativeBuildInputs ++ [ diff --git a/pkgs/development/misc/datafusion/default.nix b/pkgs/development/misc/datafusion/default.nix index 78b8023c5f6d..b89e915a7742 100644 --- a/pkgs/development/misc/datafusion/default.nix +++ b/pkgs/development/misc/datafusion/default.nix @@ -21,7 +21,7 @@ rustPlatform.buildRustPackage rec { cargoHash = "sha256-0a/O9nNi3JLufQxG+5EgCXtV0y03X7R6UY+f/tVGB90="; - buildInputs = lib.optionals stdenv.isDarwin [ + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.Security ]; diff --git a/pkgs/development/misc/juce/default.nix b/pkgs/development/misc/juce/default.nix index 0899a948019e..f0c54f1dca20 100644 --- a/pkgs/development/misc/juce/default.nix +++ b/pkgs/development/misc/juce/default.nix @@ -48,11 +48,11 @@ stdenv.mkDerivation (finalAttrs: { curl # libcurl.so stdenv.cc.cc.lib # libstdc++.so libgcc_s.so pcre # libpcre2.pc - ] ++ lib.optionals stdenv.isLinux [ + ] ++ lib.optionals stdenv.hostPlatform.isLinux [ alsa-lib # libasound.so libglvnd # libGL.so webkitgtk # webkit2gtk-4.0 - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.Cocoa darwin.apple_sdk.frameworks.MetalKit darwin.apple_sdk.frameworks.WebKit diff --git a/pkgs/development/misc/msp430/mspdebug.nix b/pkgs/development/misc/msp430/mspdebug.nix index 18462c456ce2..c24ca3b0c262 100644 --- a/pkgs/development/misc/msp430/mspdebug.nix +++ b/pkgs/development/misc/msp430/mspdebug.nix @@ -10,7 +10,7 @@ , enableMspds ? false }: -assert stdenv.isDarwin -> hidapi != null && pkg-config != null; +assert stdenv.hostPlatform.isDarwin -> hidapi != null && pkg-config != null; assert enableReadline -> readline != null; assert enableMspds -> mspds != null; @@ -25,13 +25,13 @@ stdenv.mkDerivation rec { }; enableParallelBuilding = true; - nativeBuildInputs = lib.optional stdenv.isDarwin pkg-config - ++ lib.optional (enableMspds && stdenv.isLinux) autoPatchelfHook; + nativeBuildInputs = lib.optional stdenv.hostPlatform.isDarwin pkg-config + ++ lib.optional (enableMspds && stdenv.hostPlatform.isLinux) autoPatchelfHook; buildInputs = [ libusb-compat-0_1 ] - ++ lib.optional stdenv.isDarwin hidapi + ++ lib.optional stdenv.hostPlatform.isDarwin hidapi ++ lib.optional enableReadline readline; - postPatch = lib.optionalString stdenv.isDarwin '' + postPatch = lib.optionalString stdenv.hostPlatform.isDarwin '' # TODO: remove once a new 0.26+ release is made substituteInPlace drivers/tilib_api.c --replace .so ${stdenv.hostPlatform.extensions.sharedLibrary} @@ -41,7 +41,7 @@ stdenv.mkDerivation rec { # TODO: wrap with MSPDEBUG_TILIB_PATH env var instead of these rpath fixups in 0.26+ runtimeDependencies = lib.optional enableMspds mspds; - postFixup = lib.optionalString (enableMspds && stdenv.isDarwin) '' + postFixup = lib.optionalString (enableMspds && stdenv.hostPlatform.isDarwin) '' # autoPatchelfHook only works on linux so... for dep in $runtimeDependencies; do install_name_tool -add_rpath $dep/lib $out/bin/$pname @@ -51,7 +51,7 @@ stdenv.mkDerivation rec { installFlags = [ "PREFIX=$(out)" "INSTALL=install" ]; makeFlags = [ "UNAME_S=$(unameS)" ] ++ lib.optional (!enableReadline) "WITHOUT_READLINE=1"; - unameS = lib.optionalString stdenv.isDarwin "Darwin"; + unameS = lib.optionalString stdenv.hostPlatform.isDarwin "Darwin"; meta = with lib; { description = "Free programmer, debugger, and gdb proxy for MSP430 MCUs"; diff --git a/pkgs/development/misc/msp430/mspds/binary.nix b/pkgs/development/misc/msp430/mspds/binary.nix index 3558599c2de0..4dc3ec869bda 100644 --- a/pkgs/development/misc/msp430/mspds/binary.nix +++ b/pkgs/development/misc/msp430/mspds/binary.nix @@ -1,7 +1,7 @@ { stdenv, lib, fetchurl, unzip, autoPatchelfHook }: let - archPostfix = lib.optionalString (stdenv.is64bit && !stdenv.isDarwin) "_64"; + archPostfix = lib.optionalString (stdenv.hostPlatform.is64bit && !stdenv.hostPlatform.isDarwin) "_64"; in stdenv.mkDerivation rec { pname = "msp-debug-stack-bin"; version = "3.15.1.1"; @@ -16,7 +16,7 @@ in stdenv.mkDerivation rec { else "libmsp430${archPostfix}${stdenv.hostPlatform.extensions.sharedLibrary}"; nativeBuildInputs = [ unzip ] - ++ lib.optional stdenv.isLinux autoPatchelfHook; + ++ lib.optional stdenv.hostPlatform.isLinux autoPatchelfHook; buildInputs = [ stdenv.cc.cc ]; installPhase = '' diff --git a/pkgs/development/misc/msp430/mspds/default.nix b/pkgs/development/misc/msp430/mspds/default.nix index 75dd08805f3f..17ee5cd76c50 100644 --- a/pkgs/development/misc/msp430/mspds/default.nix +++ b/pkgs/development/misc/msp430/mspds/default.nix @@ -6,10 +6,10 @@ , libusb1 ? null }: -assert stdenv.isLinux -> libusb1 != null; +assert stdenv.hostPlatform.isLinux -> libusb1 != null; let - hidapiDriver = lib.optionalString stdenv.isLinux "-libusb"; + hidapiDriver = lib.optionalString stdenv.hostPlatform.isLinux "-libusb"; in stdenv.mkDerivation { pname = "msp-debug-stack"; @@ -32,7 +32,7 @@ in stdenv.mkDerivation { preBuild = '' rm ThirdParty/src/pugixml.cpp rm ThirdParty/include/pugi{config,xml}.hpp - '' + lib.optionalString stdenv.isDarwin '' + '' + lib.optionalString stdenv.hostPlatform.isDarwin '' makeFlagsArray+=(OUTNAME="-install_name ") ''; @@ -43,7 +43,7 @@ in stdenv.mkDerivation { nativeBuildInputs = [ unzip ]; buildInputs = [ boost hidapi pugixml ] - ++ lib.optional stdenv.isLinux libusb1; + ++ lib.optional stdenv.hostPlatform.isLinux libusb1; meta = with lib; { description = "TI MSP430 FET debug driver"; diff --git a/pkgs/development/misc/resholve/test.nix b/pkgs/development/misc/resholve/test.nix index ab61884963aa..654f8a4577f5 100644 --- a/pkgs/development/misc/resholve/test.nix +++ b/pkgs/development/misc/resholve/test.nix @@ -234,7 +234,7 @@ rec { ncurses procps ps - ] ++ lib.optionals stdenv.isLinux [ + ] ++ lib.optionals stdenv.hostPlatform.isLinux [ nixos-install-tools nixos-rebuild ]; @@ -258,7 +258,7 @@ rec { tset fake args ps fake args top fake args - '' + lib.optionalString stdenv.isLinux '' + '' + lib.optionalString stdenv.hostPlatform.isLinux '' nixos-generate-config fake args nixos-rebuild fake args ''); @@ -279,7 +279,7 @@ rec { inherit shunit2; inherit xdg-utils; inherit yadm; -} // lib.optionalAttrs stdenv.isLinux { +} // lib.optionalAttrs stdenv.hostPlatform.isLinux { inherit arch-install-scripts; inherit dgoss; inherit rancid; @@ -287,6 +287,6 @@ rec { inherit wgnord; inherit wsl-vpnkit; inherit zxfer; -} // lib.optionalAttrs (stdenv.isLinux && (stdenv.isi686 || stdenv.isx86_64)) { +} // lib.optionalAttrs (stdenv.hostPlatform.isLinux && (stdenv.hostPlatform.isi686 || stdenv.hostPlatform.isx86_64)) { inherit s0ix-selftest-tool; } diff --git a/pkgs/development/mobile/androidenv/cmake.nix b/pkgs/development/mobile/androidenv/cmake.nix index 7df24ad4cc22..833c96a2691c 100644 --- a/pkgs/development/mobile/androidenv/cmake.nix +++ b/pkgs/development/mobile/androidenv/cmake.nix @@ -2,7 +2,7 @@ deployAndroidPackage { inherit package os; - nativeBuildInputs = lib.optionals stdenv.isLinux [ autoPatchelfHook ]; + nativeBuildInputs = lib.optionals stdenv.hostPlatform.isLinux [ autoPatchelfHook ]; buildInputs = lib.optionals (os == "linux") [ pkgs.stdenv.cc.libc pkgs.stdenv.cc.cc pkgs.ncurses5 ]; patchInstructions = lib.optionalString (os == "linux") '' autoPatchelf $packageBaseDir/bin diff --git a/pkgs/development/mobile/androidenv/cmdline-tools.nix b/pkgs/development/mobile/androidenv/cmdline-tools.nix index 0279b948a7ab..3c05fa8634c2 100644 --- a/pkgs/development/mobile/androidenv/cmdline-tools.nix +++ b/pkgs/development/mobile/androidenv/cmdline-tools.nix @@ -4,7 +4,7 @@ deployAndroidPackage { name = "androidsdk"; inherit package os; nativeBuildInputs = [ makeWrapper ] - ++ lib.optionals stdenv.isLinux [ autoPatchelfHook ]; + ++ lib.optionals stdenv.hostPlatform.isLinux [ autoPatchelfHook ]; patchInstructions = '' ${lib.optionalString (os == "linux") '' diff --git a/pkgs/development/mobile/androidenv/compose-android-packages.nix b/pkgs/development/mobile/androidenv/compose-android-packages.nix index 72dc64a7e0c2..a880c8fc9190 100644 --- a/pkgs/development/mobile/androidenv/compose-android-packages.nix +++ b/pkgs/development/mobile/androidenv/compose-android-packages.nix @@ -27,8 +27,8 @@ let # Determine the Android os identifier from Nix's system identifier - os = if stdenv.isLinux then "linux" - else if stdenv.isDarwin then "macosx" + os = if stdenv.hostPlatform.isLinux then "linux" + else if stdenv.hostPlatform.isDarwin then "macosx" else throw "No Android SDK tarballs are available for system architecture: ${stdenv.system}"; # Uses mkrepo.rb to create a repo spec. diff --git a/pkgs/development/mobile/androidenv/ndk-bundle/default.nix b/pkgs/development/mobile/androidenv/ndk-bundle/default.nix index 30a2e8171acc..b9c11cb46e97 100644 --- a/pkgs/development/mobile/androidenv/ndk-bundle/default.nix +++ b/pkgs/development/mobile/androidenv/ndk-bundle/default.nix @@ -10,7 +10,7 @@ in deployAndroidPackage rec { inherit package os; nativeBuildInputs = [ makeWrapper ] - ++ lib.optionals stdenv.isLinux [ autoPatchelfHook ]; + ++ lib.optionals stdenv.hostPlatform.isLinux [ autoPatchelfHook ]; autoPatchelfIgnoreMissingDeps = [ "*" ]; buildInputs = lib.optionals (os == "linux") [ pkgs.zlib pkgs.libcxx stdenv.cc.cc.lib ]; @@ -71,7 +71,7 @@ deployAndroidPackage rec { ''; patchInstructions = patchOsAgnostic - + lib.optionalString stdenv.isLinux patchElfBnaries; + + lib.optionalString stdenv.hostPlatform.isLinux patchElfBnaries; noAuditTmpdir = true; # Audit script gets invoked by the build/ component in the path for the make standalone script } diff --git a/pkgs/development/mobile/androidenv/patcher.nix b/pkgs/development/mobile/androidenv/patcher.nix index c0252839cf23..f525033d236a 100644 --- a/pkgs/development/mobile/androidenv/patcher.nix +++ b/pkgs/development/mobile/androidenv/patcher.nix @@ -2,7 +2,7 @@ deployAndroidPackage { inherit package os; - nativeBuildInputs = lib.optionals stdenv.isLinux [ autoPatchelfHook ]; + nativeBuildInputs = lib.optionals stdenv.hostPlatform.isLinux [ autoPatchelfHook ]; patchInstructions = lib.optionalString (os == "linux") '' autoPatchelf $packageBaseDir/bin ''; diff --git a/pkgs/development/mobile/gomobile/default.nix b/pkgs/development/mobile/gomobile/default.nix index c234c81d3894..61e3bb75617c 100644 --- a/pkgs/development/mobile/gomobile/default.nix +++ b/pkgs/development/mobile/gomobile/default.nix @@ -26,7 +26,7 @@ buildGoModule { doCheck = false; nativeBuildInputs = [ makeWrapper ] - ++ lib.optionals stdenv.isDarwin [ xcodeWrapper ]; + ++ lib.optionals stdenv.hostPlatform.isDarwin [ xcodeWrapper ]; # Prevent a non-deterministic temporary directory from polluting the resulting object files postPatch = '' diff --git a/pkgs/development/mobile/titaniumenv/build-app.nix b/pkgs/development/mobile/titaniumenv/build-app.nix index 42b70c64abe9..ef36dced9a31 100644 --- a/pkgs/development/mobile/titaniumenv/build-app.nix +++ b/pkgs/development/mobile/titaniumenv/build-app.nix @@ -41,7 +41,7 @@ stdenv.mkDerivation ({ buildPhase = '' ${preBuild} - ${lib.optionalString stdenv.isDarwin '' + ${lib.optionalString stdenv.hostPlatform.isDarwin '' # Hack that provides a writable alloy package on macOS. Without it the build fails because of a file permission error. alloy=$(dirname $(type -p alloy))/.. cp -rv $alloy/* alloy @@ -76,7 +76,7 @@ stdenv.mkDerivation ({ export GRADLE_USER_HOME=$TMPDIR/gradle ${if release then '' - ${lib.optionalString stdenv.isDarwin '' + ${lib.optionalString stdenv.hostPlatform.isDarwin '' # Signing the app does not work with OpenJDK on macOS, use host SDK instead export JAVA_HOME="$(/usr/libexec/java_home -v 1.8)" ''} diff --git a/pkgs/development/mobile/xcodeenv/compose-xcodewrapper.nix b/pkgs/development/mobile/xcodeenv/compose-xcodewrapper.nix index 5a888fb13b29..13c8e6e81827 100644 --- a/pkgs/development/mobile/xcodeenv/compose-xcodewrapper.nix +++ b/pkgs/development/mobile/xcodeenv/compose-xcodewrapper.nix @@ -3,7 +3,7 @@ writeShellScriptBin }: { versions ? [ ] , xcodeBaseDir ? "/Applications/Xcode.app" }: -assert stdenv.isDarwin; +assert stdenv.hostPlatform.isDarwin; let xcodebuildPath = "${xcodeBaseDir}/Contents/Developer/usr/bin/xcodebuild"; diff --git a/pkgs/development/mobile/xpwn/default.nix b/pkgs/development/mobile/xpwn/default.nix index efd8d538c090..8693282e4ee1 100644 --- a/pkgs/development/mobile/xpwn/default.nix +++ b/pkgs/development/mobile/xpwn/default.nix @@ -30,7 +30,7 @@ stdenv.mkDerivation rec { buildInputs = [ zlib libpng bzip2 libusb-compat-0_1 openssl ]; meta = with lib; { - broken = stdenv.isDarwin; + broken = stdenv.hostPlatform.isDarwin; homepage = "http://planetbeing.lighthouseapp.com/projects/15246-xpwn"; description = "Custom NOR firmware loader/IPSW generator for the iPhone"; license = licenses.gpl3Plus; diff --git a/pkgs/development/node-packages/composition.nix b/pkgs/development/node-packages/composition.nix index 2e54104d7dce..4bd736ddc723 100644 --- a/pkgs/development/node-packages/composition.nix +++ b/pkgs/development/node-packages/composition.nix @@ -8,7 +8,7 @@ let nodeEnv = import ./node-env.nix { inherit (pkgs) stdenv lib python2 runCommand writeTextFile writeShellScript; inherit pkgs nodejs; - libtool = if pkgs.stdenv.isDarwin then pkgs.cctools or pkgs.darwin.cctools else null; + libtool = if pkgs.stdenv.hostPlatform.isDarwin then pkgs.cctools or pkgs.darwin.cctools else null; }; in import ./node-packages.nix { diff --git a/pkgs/development/node-packages/node-env.nix b/pkgs/development/node-packages/node-env.nix index bc1e36628ac8..eb94495aeba3 100644 --- a/pkgs/development/node-packages/node-env.nix +++ b/pkgs/development/node-packages/node-env.nix @@ -499,8 +499,8 @@ let stdenv.mkDerivation ({ name = "${name}${if version == null then "" else "-${version}"}"; buildInputs = [ tarWrapper python nodejs ] - ++ lib.optional (stdenv.isLinux) utillinux - ++ lib.optional (stdenv.isDarwin) libtool + ++ lib.optional (stdenv.hostPlatform.isLinux) utillinux + ++ lib.optional (stdenv.hostPlatform.isDarwin) libtool ++ buildInputs; inherit nodejs; @@ -591,8 +591,8 @@ let name = "node-dependencies-${name}${if version == null then "" else "-${version}"}"; buildInputs = [ tarWrapper python nodejs ] - ++ lib.optional (stdenv.isLinux) utillinux - ++ lib.optional (stdenv.isDarwin) libtool + ++ lib.optional (stdenv.hostPlatform.isLinux) utillinux + ++ lib.optional (stdenv.hostPlatform.isDarwin) libtool ++ buildInputs; inherit dontStrip; # Stripping may fail a build for some package deployments @@ -662,7 +662,7 @@ let stdenv.mkDerivation ({ name = "node-shell-${name}${if version == null then "" else "-${version}"}"; - buildInputs = [ python nodejs ] ++ lib.optional (stdenv.isLinux) utillinux ++ buildInputs; + buildInputs = [ python nodejs ] ++ lib.optional (stdenv.hostPlatform.isLinux) utillinux ++ buildInputs; buildCommand = '' mkdir -p $out/bin cat > $out/bin/shell < Fatal error: exception Unix.Unix_error(Unix.EPERM, "bind", "") - && !stdenv.isDarwin; + && !stdenv.hostPlatform.isDarwin; postPatch = '' substituteInPlace src/curly.ml \ diff --git a/pkgs/development/ocaml-modules/eigen/default.nix b/pkgs/development/ocaml-modules/eigen/default.nix index 5c75c4cb1044..0b02539d64cb 100644 --- a/pkgs/development/ocaml-modules/eigen/default.nix +++ b/pkgs/development/ocaml-modules/eigen/default.nix @@ -15,7 +15,7 @@ buildDunePackage rec { minimalOCamlVersion = "4.02"; - env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.isDarwin "-I${lib.getDev libcxx}/include/c++/v1"; + env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.hostPlatform.isDarwin "-I${lib.getDev libcxx}/include/c++/v1"; propagatedBuildInputs = [ ctypes ]; diff --git a/pkgs/development/ocaml-modules/eio/main.nix b/pkgs/development/ocaml-modules/eio/main.nix index a65b27b8db41..48c15e99ae0c 100644 --- a/pkgs/development/ocaml-modules/eio/main.nix +++ b/pkgs/development/ocaml-modules/eio/main.nix @@ -16,7 +16,7 @@ buildDunePackage { propagatedBuildInputs = [ eio_posix - ] ++ lib.optionals stdenv.isLinux [ + ] ++ lib.optionals stdenv.hostPlatform.isLinux [ eio_linux ]; } diff --git a/pkgs/development/ocaml-modules/eio/posix.nix b/pkgs/development/ocaml-modules/eio/posix.nix index c18cdd506141..fa63c1ea713b 100644 --- a/pkgs/development/ocaml-modules/eio/posix.nix +++ b/pkgs/development/ocaml-modules/eio/posix.nix @@ -16,7 +16,7 @@ buildDunePackage { dontStrip = true; - env = lib.optionalAttrs stdenv.isDarwin { + env = lib.optionalAttrs stdenv.hostPlatform.isDarwin { NIX_CFLAGS_COMPILE = "-Wno-implicit-function-declaration"; }; diff --git a/pkgs/development/ocaml-modules/elina/default.nix b/pkgs/development/ocaml-modules/elina/default.nix index de000f8aaf83..de3f1094143d 100644 --- a/pkgs/development/ocaml-modules/elina/default.nix +++ b/pkgs/development/ocaml-modules/elina/default.nix @@ -21,7 +21,7 @@ stdenv.mkDerivation rec { "--use-opam" "--apron-prefix" apron ] - ++ lib.optional stdenv.isDarwin "--absolute-dylibs" + ++ lib.optional stdenv.hostPlatform.isDarwin "--absolute-dylibs" ; createFindlibDestdir = true; diff --git a/pkgs/development/ocaml-modules/ffmpeg/ffmpeg-av.nix b/pkgs/development/ocaml-modules/ffmpeg/ffmpeg-av.nix index 58055aa6698c..4d8555613177 100644 --- a/pkgs/development/ocaml-modules/ffmpeg/ffmpeg-av.nix +++ b/pkgs/development/ocaml-modules/ffmpeg/ffmpeg-av.nix @@ -14,7 +14,7 @@ buildDunePackage { inherit (ffmpeg-base) version src; nativeBuildInputs = [ pkg-config ]; - buildInputs = [ dune-configurator ] ++ lib.optionals stdenv.isDarwin [ AudioToolbox VideoToolbox ]; + buildInputs = [ dune-configurator ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ AudioToolbox VideoToolbox ]; propagatedBuildInputs = [ ffmpeg-avutil ffmpeg-avcodec ffmpeg.dev ]; doCheck = true; diff --git a/pkgs/development/ocaml-modules/ffmpeg/ffmpeg-avcodec.nix b/pkgs/development/ocaml-modules/ffmpeg/ffmpeg-avcodec.nix index 8f268d4d5ec2..85f03825cdbd 100644 --- a/pkgs/development/ocaml-modules/ffmpeg/ffmpeg-avcodec.nix +++ b/pkgs/development/ocaml-modules/ffmpeg/ffmpeg-avcodec.nix @@ -15,7 +15,7 @@ buildDunePackage { nativeBuildInputs = [ pkg-config ]; buildInputs = [ dune-configurator ] - ++ lib.optionals stdenv.isDarwin [ AudioToolbox VideoToolbox ]; + ++ lib.optionals stdenv.hostPlatform.isDarwin [ AudioToolbox VideoToolbox ]; propagatedBuildInputs = [ ffmpeg-avutil ffmpeg.dev ]; doCheck = true; diff --git a/pkgs/development/ocaml-modules/ffmpeg/ffmpeg-avdevice.nix b/pkgs/development/ocaml-modules/ffmpeg/ffmpeg-avdevice.nix index c8a1bf9de5a1..f966706cc737 100644 --- a/pkgs/development/ocaml-modules/ffmpeg/ffmpeg-avdevice.nix +++ b/pkgs/development/ocaml-modules/ffmpeg/ffmpeg-avdevice.nix @@ -21,7 +21,7 @@ buildDunePackage { nativeBuildInputs = [ pkg-config ]; buildInputs = [ dune-configurator ] - ++ lib.optionals stdenv.isDarwin [ + ++ lib.optionals stdenv.hostPlatform.isDarwin [ AppKit AudioToolbox AVFoundation diff --git a/pkgs/development/ocaml-modules/ffmpeg/ffmpeg-avfilter.nix b/pkgs/development/ocaml-modules/ffmpeg/ffmpeg-avfilter.nix index 89d982483986..1f9ded9bd024 100644 --- a/pkgs/development/ocaml-modules/ffmpeg/ffmpeg-avfilter.nix +++ b/pkgs/development/ocaml-modules/ffmpeg/ffmpeg-avfilter.nix @@ -17,7 +17,7 @@ buildDunePackage { nativeBuildInputs = [ pkg-config ]; buildInputs = [ dune-configurator ] - ++ lib.optionals stdenv.isDarwin [ AppKit CoreImage OpenGL VideoToolbox ]; + ++ lib.optionals stdenv.hostPlatform.isDarwin [ AppKit CoreImage OpenGL VideoToolbox ]; propagatedBuildInputs = [ ffmpeg-avutil ffmpeg.dev ]; doCheck = true; diff --git a/pkgs/development/ocaml-modules/ffmpeg/ffmpeg-avutil.nix b/pkgs/development/ocaml-modules/ffmpeg/ffmpeg-avutil.nix index 8e299a536f63..8374304fe488 100644 --- a/pkgs/development/ocaml-modules/ffmpeg/ffmpeg-avutil.nix +++ b/pkgs/development/ocaml-modules/ffmpeg/ffmpeg-avutil.nix @@ -12,7 +12,7 @@ buildDunePackage { inherit (ffmpeg-base) version src; nativeBuildInputs = [ pkg-config ]; - buildInputs = [ dune-configurator ] ++ lib.optionals stdenv.isDarwin [ AudioToolbox VideoToolbox ]; + buildInputs = [ dune-configurator ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ AudioToolbox VideoToolbox ]; propagatedBuildInputs = [ ffmpeg.dev ]; doCheck = true; diff --git a/pkgs/development/ocaml-modules/ffmpeg/ffmpeg-swresample.nix b/pkgs/development/ocaml-modules/ffmpeg/ffmpeg-swresample.nix index d21e0d02ad4c..5fda062454f0 100644 --- a/pkgs/development/ocaml-modules/ffmpeg/ffmpeg-swresample.nix +++ b/pkgs/development/ocaml-modules/ffmpeg/ffmpeg-swresample.nix @@ -13,7 +13,7 @@ buildDunePackage { inherit (ffmpeg-base) version src; nativeBuildInputs = [ pkg-config ]; - buildInputs = [ dune-configurator ] ++ lib.optionals stdenv.isDarwin [ VideoToolbox ]; + buildInputs = [ dune-configurator ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ VideoToolbox ]; propagatedBuildInputs = [ ffmpeg-avutil ffmpeg-avcodec ffmpeg.dev ]; doCheck = true; diff --git a/pkgs/development/ocaml-modules/ffmpeg/ffmpeg-swscale.nix b/pkgs/development/ocaml-modules/ffmpeg/ffmpeg-swscale.nix index b03d87596b03..518f18b1509b 100644 --- a/pkgs/development/ocaml-modules/ffmpeg/ffmpeg-swscale.nix +++ b/pkgs/development/ocaml-modules/ffmpeg/ffmpeg-swscale.nix @@ -13,7 +13,7 @@ buildDunePackage { inherit (ffmpeg-base) version src; nativeBuildInputs = [ pkg-config ]; - buildInputs = [ dune-configurator ] ++ lib.optionals stdenv.isDarwin [ VideoToolbox ]; + buildInputs = [ dune-configurator ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ VideoToolbox ]; propagatedBuildInputs = [ ffmpeg-avutil ffmpeg.dev ]; doCheck = true; diff --git a/pkgs/development/ocaml-modules/git/default.nix b/pkgs/development/ocaml-modules/git/default.nix index 980a3efa9bd0..29d7b492c837 100644 --- a/pkgs/development/ocaml-modules/git/default.nix +++ b/pkgs/development/ocaml-modules/git/default.nix @@ -31,7 +31,7 @@ buildDunePackage rec { checkInputs = [ alcotest alcotest-lwt mirage-crypto-rng crowbar cmdliner ]; - doCheck = !stdenv.isAarch64; + doCheck = !stdenv.hostPlatform.isAarch64; meta = { description = "Git format and protocol in pure OCaml"; diff --git a/pkgs/development/ocaml-modules/gsl/default.nix b/pkgs/development/ocaml-modules/gsl/default.nix index 27791d6aa5f3..fc81d53f1717 100644 --- a/pkgs/development/ocaml-modules/gsl/default.nix +++ b/pkgs/development/ocaml-modules/gsl/default.nix @@ -15,7 +15,7 @@ buildDunePackage rec { nativeBuildInputs = [ pkg-config ]; buildInputs = [ dune-configurator gsl ]; - propagatedBuildInputs = lib.optionals stdenv.isDarwin [ darwin.apple_sdk.frameworks.Accelerate ]; + propagatedBuildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.Accelerate ]; meta = with lib; { homepage = "https://mmottl.github.io/gsl-ocaml/"; diff --git a/pkgs/development/ocaml-modules/gstreamer/default.nix b/pkgs/development/ocaml-modules/gstreamer/default.nix index 34407299914a..689603c8e19c 100644 --- a/pkgs/development/ocaml-modules/gstreamer/default.nix +++ b/pkgs/development/ocaml-modules/gstreamer/default.nix @@ -12,7 +12,7 @@ buildDunePackage rec { }; nativeBuildInputs = [ pkg-config ]; - buildInputs = [ dune-configurator ] ++ lib.optionals stdenv.isDarwin [ AppKit Foundation ]; + buildInputs = [ dune-configurator ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ AppKit Foundation ]; propagatedBuildInputs = [ glib.dev gst_all_1.gstreamer.dev gst_all_1.gst-plugins-base ]; CFLAGS_COMPILE = [ diff --git a/pkgs/development/ocaml-modules/labltk/default.nix b/pkgs/development/ocaml-modules/labltk/default.nix index 1fb45ebdd8df..780213ad0792 100644 --- a/pkgs/development/ocaml-modules/labltk/default.nix +++ b/pkgs/development/ocaml-modules/labltk/default.nix @@ -66,7 +66,7 @@ stdenv.mkDerivation rec { strictDeps = true; nativeBuildInputs = [ ocaml findlib makeWrapper ]; - buildInputs = [ tcl tk ] ++ lib.optionals stdenv.isDarwin [ Cocoa ]; + buildInputs = [ tcl tk ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ Cocoa ]; configureFlags = [ "--use-findlib" "--installbindir" "$(out)/bin" ]; dontAddPrefix = true; diff --git a/pkgs/development/ocaml-modules/lacaml/default.nix b/pkgs/development/ocaml-modules/lacaml/default.nix index e8d0e966c40f..e747b64de6e2 100644 --- a/pkgs/development/ocaml-modules/lacaml/default.nix +++ b/pkgs/development/ocaml-modules/lacaml/default.nix @@ -19,7 +19,7 @@ buildDunePackage rec { buildInputs = [ dune-configurator ]; propagatedBuildInputs = [ lapack blas ] ++ - lib.optionals stdenv.isDarwin + lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.Accelerate ]; meta = with lib; { diff --git a/pkgs/development/ocaml-modules/ocaml-libvirt/default.nix b/pkgs/development/ocaml-modules/ocaml-libvirt/default.nix index 67741516af19..e27fbca0a4a0 100644 --- a/pkgs/development/ocaml-modules/ocaml-libvirt/default.nix +++ b/pkgs/development/ocaml-modules/ocaml-libvirt/default.nix @@ -18,7 +18,7 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ autoreconfHook pkg-config findlib perl ocaml ]; - buildInputs = lib.optionals stdenv.isDarwin [ + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ Foundation AppKit ]; diff --git a/pkgs/development/ocaml-modules/sodium/default.nix b/pkgs/development/ocaml-modules/sodium/default.nix index 87fb82adcbeb..a3777f7d8aec 100644 --- a/pkgs/development/ocaml-modules/sodium/default.nix +++ b/pkgs/development/ocaml-modules/sodium/default.nix @@ -26,7 +26,7 @@ stdenv.mkDerivation rec { createFindlibDestdir = true; - hardeningDisable = lib.optional stdenv.isDarwin "strictoverflow"; + hardeningDisable = lib.optional stdenv.hostPlatform.isDarwin "strictoverflow"; meta = with lib; { homepage = "https://github.com/dsheets/ocaml-sodium"; diff --git a/pkgs/development/ocaml-modules/torch/default.nix b/pkgs/development/ocaml-modules/torch/default.nix index f24a4fe96819..83446cdf0e17 100644 --- a/pkgs/development/ocaml-modules/torch/default.nix +++ b/pkgs/development/ocaml-modules/torch/default.nix @@ -57,7 +57,7 @@ buildDunePackage rec { preBuild = "export LIBTORCH=${torch.dev}/"; - doCheck = !stdenv.isAarch64; + doCheck = !stdenv.hostPlatform.isAarch64; meta = with lib; { inherit (src.meta) homepage; diff --git a/pkgs/development/ocaml-modules/tsdl/default.nix b/pkgs/development/ocaml-modules/tsdl/default.nix index 2d35f76d5bf0..1395a37c69d3 100644 --- a/pkgs/development/ocaml-modules/tsdl/default.nix +++ b/pkgs/development/ocaml-modules/tsdl/default.nix @@ -25,7 +25,7 @@ stdenv.mkDerivation { nativeBuildInputs = [ pkg-config ocaml findlib ocamlbuild topkg ]; buildInputs = [ topkg ]; propagatedBuildInputs = [ SDL2 ctypes ctypes-foreign ] - ++ lib.optionals stdenv.isDarwin [ AudioToolbox Cocoa CoreAudio CoreVideo ForceFeedback ]; + ++ lib.optionals stdenv.hostPlatform.isDarwin [ AudioToolbox Cocoa CoreAudio CoreVideo ForceFeedback ]; preConfigure = '' # The following is done to avoid an additional dependency (ncurses) diff --git a/pkgs/development/ocaml-modules/uunf/default.nix b/pkgs/development/ocaml-modules/uunf/default.nix index 2d473a4b8351..e001fa03a2dd 100644 --- a/pkgs/development/ocaml-modules/uunf/default.nix +++ b/pkgs/development/ocaml-modules/uunf/default.nix @@ -31,7 +31,7 @@ stdenv.mkDerivation { strictDeps = true; - prePatch = lib.optionalString stdenv.isAarch64 "ulimit -s 16384"; + prePatch = lib.optionalString stdenv.hostPlatform.isAarch64 "ulimit -s 16384"; buildPhase = '' runHook preBuild diff --git a/pkgs/development/ocaml-modules/zelus/default.nix b/pkgs/development/ocaml-modules/zelus/default.nix index 07d268d45de9..4d52640d53bc 100644 --- a/pkgs/development/ocaml-modules/zelus/default.nix +++ b/pkgs/development/ocaml-modules/zelus/default.nix @@ -20,7 +20,7 @@ buildDunePackage rec { }; # ./configure: cannot execute: required file not found - postPatch = lib.optionalString stdenv.isLinux '' + postPatch = lib.optionalString stdenv.hostPlatform.isLinux '' patchShebangs configure ''; diff --git a/pkgs/development/octave-modules/gsl/default.nix b/pkgs/development/octave-modules/gsl/default.nix index e050f381a914..2ce92f43d618 100644 --- a/pkgs/development/octave-modules/gsl/default.nix +++ b/pkgs/development/octave-modules/gsl/default.nix @@ -25,6 +25,6 @@ buildOctavePackage rec { description = "Octave bindings to the GNU Scientific Library"; # error: use of undeclared identifier 'feval'; did you mean 'octave::feval'? # error: no member named 'is_real_type' in 'octave_value' - broken = stdenv.isDarwin; + broken = stdenv.hostPlatform.isDarwin; }; } diff --git a/pkgs/development/octave-modules/ocl/default.nix b/pkgs/development/octave-modules/ocl/default.nix index eb20f7dc7c77..72242d165543 100644 --- a/pkgs/development/octave-modules/ocl/default.nix +++ b/pkgs/development/octave-modules/ocl/default.nix @@ -24,6 +24,6 @@ buildOctavePackage rec { using available OpenCL hardware and drivers. ''; # error: structure has no member 'dir' - broken = stdenv.isDarwin; + broken = stdenv.hostPlatform.isDarwin; }; } diff --git a/pkgs/development/octave-modules/strings/default.nix b/pkgs/development/octave-modules/strings/default.nix index 35887d249576..fbf7aec786af 100644 --- a/pkgs/development/octave-modules/strings/default.nix +++ b/pkgs/development/octave-modules/strings/default.nix @@ -40,6 +40,6 @@ buildOctavePackage rec { maintainers = with maintainers; [ KarlJoad ]; description = "Additional functions for manipulation and analysis of strings"; # Some pcre symbols claimed to be missing - broken = stdenv.isDarwin; + broken = stdenv.hostPlatform.isDarwin; }; } diff --git a/pkgs/development/perl-modules/ImageExifTool/default.nix b/pkgs/development/perl-modules/ImageExifTool/default.nix index 08d207e3bbac..46efb33f23ca 100644 --- a/pkgs/development/perl-modules/ImageExifTool/default.nix +++ b/pkgs/development/perl-modules/ImageExifTool/default.nix @@ -18,9 +18,9 @@ buildPerlPackage rec { hash = "sha256-sfSnx5bS7vI0KIhBOpB5VYzP6g8oi0rR7mUTxxNWEA0="; }; - nativeBuildInputs = lib.optional stdenv.isDarwin shortenPerlShebang; + nativeBuildInputs = lib.optional stdenv.hostPlatform.isDarwin shortenPerlShebang; - postInstall = lib.optionalString stdenv.isDarwin '' + postInstall = lib.optionalString stdenv.hostPlatform.isDarwin '' shortenPerlShebang $out/bin/exiftool ''; diff --git a/pkgs/development/perl-modules/WWW-YoutubeViewer/default.nix b/pkgs/development/perl-modules/WWW-YoutubeViewer/default.nix index cba9ef986362..0669f5b7c7af 100644 --- a/pkgs/development/perl-modules/WWW-YoutubeViewer/default.nix +++ b/pkgs/development/perl-modules/WWW-YoutubeViewer/default.nix @@ -22,14 +22,14 @@ buildPerlPackage rec { sha256 = "9Z4fv2B0AnwtYsp7h9phnRMmHtBOMObIJvK8DmKQRxs="; }; - nativeBuildInputs = lib.optional stdenv.isDarwin shortenPerlShebang; + nativeBuildInputs = lib.optional stdenv.hostPlatform.isDarwin shortenPerlShebang; propagatedBuildInputs = [ LWP LWPProtocolHttps DataDump JSON ]; - postInstall = lib.optionalString stdenv.isDarwin '' + postInstall = lib.optionalString stdenv.hostPlatform.isDarwin '' shortenPerlShebang $out/bin/youtube-viewer ''; diff --git a/pkgs/development/perl-modules/strip-nondeterminism/default.nix b/pkgs/development/perl-modules/strip-nondeterminism/default.nix index e50d61b87898..fe6328ea3946 100644 --- a/pkgs/development/perl-modules/strip-nondeterminism/default.nix +++ b/pkgs/development/perl-modules/strip-nondeterminism/default.nix @@ -24,7 +24,7 @@ buildPerlPackage rec { }; strictDeps = true; - nativeBuildInputs = lib.optionals stdenv.isDarwin [ shortenPerlShebang ]; + nativeBuildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ shortenPerlShebang ]; buildInputs = [ ArchiveZip ArchiveCpio @@ -45,7 +45,7 @@ buildPerlPackage rec { # we don’t need the debhelper script rm $out/bin/dh_strip_nondeterminism rm $out/share/man/man1/dh_strip_nondeterminism.1 - '' + lib.optionalString stdenv.isDarwin '' + '' + lib.optionalString stdenv.hostPlatform.isDarwin '' shortenPerlShebang $out/bin/strip-nondeterminism ''; @@ -56,7 +56,7 @@ buildPerlPackage rec { ''; # running shortenPerlShebang in postBuild results in non-functioning binary 'exec format error' - doCheck = !stdenv.isDarwin; + doCheck = !stdenv.hostPlatform.isDarwin; doInstallCheck = true; meta = with lib; { diff --git a/pkgs/development/php-packages/datadog_trace/default.nix b/pkgs/development/php-packages/datadog_trace/default.nix index 15b16582435d..3cc5732adca7 100644 --- a/pkgs/development/php-packages/datadog_trace/default.nix +++ b/pkgs/development/php-packages/datadog_trace/default.nix @@ -38,11 +38,11 @@ buildPecl rec { cargo rustc ] - ++ lib.optionals stdenv.isLinux [ + ++ lib.optionals stdenv.hostPlatform.isLinux [ rustPlatform.bindgenHook rustPlatform.cargoSetupHook ] - ++ lib.optionals stdenv.isDarwin [ + ++ lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk_11_0.rustPlatform.bindgenHook darwin.apple_sdk_11_0.rustPlatform.cargoSetupHook ]; @@ -52,7 +52,7 @@ buildPecl rec { curl pcre2 ] - ++ lib.optionals stdenv.isDarwin [ + ++ lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.CoreFoundation darwin.apple_sdk.frameworks.Security libiconv diff --git a/pkgs/development/php-packages/mongodb/default.nix b/pkgs/development/php-packages/mongodb/default.nix index 03487e15dbb3..cde9fec66d51 100644 --- a/pkgs/development/php-packages/mongodb/default.nix +++ b/pkgs/development/php-packages/mongodb/default.nix @@ -36,7 +36,7 @@ buildPecl rec { zlib pcre2 ] - ++ lib.optionals stdenv.isDarwin [ + ++ lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk_11_0.frameworks.Security darwin.apple_sdk_11_0.Libsystem libiconv diff --git a/pkgs/development/php-packages/openswoole/default.nix b/pkgs/development/php-packages/openswoole/default.nix index 83c59fb3212c..b250db4a3003 100644 --- a/pkgs/development/php-packages/openswoole/default.nix +++ b/pkgs/development/php-packages/openswoole/default.nix @@ -21,7 +21,7 @@ buildPecl { hash = "sha256-Z26E1PdKypB/MImCHFgA3rJW5LvVaLZsQUxRv0RcFuo="; }; - buildInputs = [ pcre2 ] ++ lib.optionals (!stdenv.isDarwin) [ valgrind ]; + buildInputs = [ pcre2 ] ++ lib.optionals (!stdenv.hostPlatform.isDarwin) [ valgrind ]; meta = with lib; { changelog = "https://github.com/openswoole/swoole-src/releases/tag/v${version}"; diff --git a/pkgs/development/php-packages/pdo_sqlsrv/default.nix b/pkgs/development/php-packages/pdo_sqlsrv/default.nix index 7da343ac5564..1b61f74d4094 100644 --- a/pkgs/development/php-packages/pdo_sqlsrv/default.nix +++ b/pkgs/development/php-packages/pdo_sqlsrv/default.nix @@ -15,7 +15,7 @@ buildPecl { internalDeps = [ php.extensions.pdo ]; - buildInputs = [ unixODBC ] ++ lib.optionals stdenv.isDarwin [ libiconv ]; + buildInputs = [ unixODBC ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ libiconv ]; meta = with lib; { description = "Microsoft Drivers for PHP for SQL Server"; diff --git a/pkgs/development/php-packages/relay/default.nix b/pkgs/development/php-packages/relay/default.nix index 56d826cb4b94..4a3f21a08a90 100644 --- a/pkgs/development/php-packages/relay/default.nix +++ b/pkgs/development/php-packages/relay/default.nix @@ -77,8 +77,8 @@ stdenv.mkDerivation (finalAttrs: { system = stdenv.hostPlatform.system; phpMajor = lib.versions.majorMinor php.version; }; - nativeBuildInputs = lib.optionals (!stdenv.isDarwin) [ autoPatchelfHook ]; - buildInputs = lib.optionals (!stdenv.isDarwin) [ + nativeBuildInputs = lib.optionals (!stdenv.hostPlatform.isDarwin) [ autoPatchelfHook ]; + buildInputs = lib.optionals (!stdenv.hostPlatform.isDarwin) [ openssl zstd lz4 @@ -92,7 +92,7 @@ stdenv.mkDerivation (finalAttrs: { chmod +w $out/lib/php/extensions/relay.so '' + ( - if stdenv.isDarwin then + if stdenv.hostPlatform.isDarwin then let args = lib.strings.concatMapStrings diff --git a/pkgs/development/php-packages/snuffleupagus/default.nix b/pkgs/development/php-packages/snuffleupagus/default.nix index d9c201e67a2d..8a2e5a45f7f1 100644 --- a/pkgs/development/php-packages/snuffleupagus/default.nix +++ b/pkgs/development/php-packages/snuffleupagus/default.nix @@ -22,7 +22,7 @@ buildPecl rec { buildInputs = [ pcre2 ] - ++ lib.optionals stdenv.isDarwin [ + ++ lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk_11_0.frameworks.CoreFoundation darwin.apple_sdk_11_0.Libsystem libiconv diff --git a/pkgs/development/php-packages/sqlsrv/default.nix b/pkgs/development/php-packages/sqlsrv/default.nix index 303f2327d1e5..08c59275c848 100644 --- a/pkgs/development/php-packages/sqlsrv/default.nix +++ b/pkgs/development/php-packages/sqlsrv/default.nix @@ -12,7 +12,7 @@ buildPecl { version = "5.10.1"; sha256 = "sha256-XNrttNiihjQ+azuZmS2fy0So+2ndAqpde8IOsupeWdI="; - buildInputs = [ unixODBC ] ++ lib.optionals stdenv.isDarwin [ libiconv ]; + buildInputs = [ unixODBC ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ libiconv ]; meta = with lib; { description = "Microsoft Drivers for PHP for SQL Server"; diff --git a/pkgs/development/php-packages/swoole/default.nix b/pkgs/development/php-packages/swoole/default.nix index f519522a8357..6cc399be10dc 100644 --- a/pkgs/development/php-packages/swoole/default.nix +++ b/pkgs/development/php-packages/swoole/default.nix @@ -22,7 +22,7 @@ buildPecl { hash = "sha256-WTsntvauiooj081mOoFcK6CVpnCCR/cEQtJbsOIJ/wo="; }; - buildInputs = [ pcre2 ] ++ lib.optionals (!stdenv.isDarwin) [ valgrind ]; + buildInputs = [ pcre2 ] ++ lib.optionals (!stdenv.hostPlatform.isDarwin) [ valgrind ]; # tests require internet access doCheck = false; diff --git a/pkgs/development/python-modules/aardwolf/default.nix b/pkgs/development/python-modules/aardwolf/default.nix index 72d309cd3298..c4807df9a90c 100644 --- a/pkgs/development/python-modules/aardwolf/default.nix +++ b/pkgs/development/python-modules/aardwolf/default.nix @@ -66,7 +66,7 @@ buildPythonPackage rec { tqdm unicrypto winsspi - ] ++ lib.optionals (stdenv.isDarwin) [ iconv ]; + ] ++ lib.optionals (stdenv.hostPlatform.isDarwin) [ iconv ]; # Module doesn't have tests doCheck = false; diff --git a/pkgs/development/python-modules/accelerate/default.nix b/pkgs/development/python-modules/accelerate/default.nix index 566908cfa3b5..a809c48b7313 100644 --- a/pkgs/development/python-modules/accelerate/default.nix +++ b/pkgs/development/python-modules/accelerate/default.nix @@ -96,7 +96,7 @@ buildPythonPackage rec { "test_dynamo_extract_model" "test_send_to_device_compiles" ] - ++ lib.optionals (stdenv.isLinux && stdenv.isAarch64) [ + ++ lib.optionals (stdenv.hostPlatform.isLinux && stdenv.hostPlatform.isAarch64) [ # usual aarch64-linux RuntimeError: DataLoader worker (pid(s) <...>) exited unexpectedly "CheckpointTest" # TypeError: unsupported operand type(s) for /: 'NoneType' and 'int' (it seems cpuinfo doesn't work here) @@ -106,7 +106,7 @@ buildPythonPackage rec { # requires ptxas from cudatoolkit, which is unfree "test_dynamo_extract_model" ] - ++ lib.optionals (stdenv.isDarwin) [ + ++ lib.optionals (stdenv.hostPlatform.isDarwin) [ # RuntimeError: 'accelerate-launch /nix/store/a7vhm7b74a7bmxc35j26s9iy1zfaqjs... "test_accelerate_test" "test_init_trackers" @@ -114,12 +114,12 @@ buildPythonPackage rec { "test_log" "test_log_with_tensor" ] - ++ lib.optionals (stdenv.isDarwin && stdenv.isx86_64) [ + ++ lib.optionals (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isx86_64) [ # RuntimeError: torch_shm_manager: execl failed: Permission denied "CheckpointTest" ]; - disabledTestPaths = lib.optionals (!(stdenv.isLinux && stdenv.isx86_64)) [ + disabledTestPaths = lib.optionals (!(stdenv.hostPlatform.isLinux && stdenv.hostPlatform.isx86_64)) [ # numerous instances of torch.multiprocessing.spawn.ProcessRaisedException: "tests/test_cpu.py" "tests/test_grad_sync.py" diff --git a/pkgs/development/python-modules/accupy/default.nix b/pkgs/development/python-modules/accupy/default.nix index f8f9897a6b3a..35d39fed9a6f 100644 --- a/pkgs/development/python-modules/accupy/default.nix +++ b/pkgs/development/python-modules/accupy/default.nix @@ -62,7 +62,7 @@ buildPythonPackage rec { # This variable is needed to suppress the "Trace/BPT trap: 5" error in Darwin's checkPhase. # Not sure of the details, but we can avoid it by changing the matplotlib backend during testing. - env.MPLBACKEND = lib.optionalString stdenv.isDarwin "Agg"; + env.MPLBACKEND = lib.optionalString stdenv.hostPlatform.isDarwin "Agg"; # performance tests aren't useful to us and disabling them allows us to # decouple ourselves from an unnecessary build dep diff --git a/pkgs/development/python-modules/adblock/default.nix b/pkgs/development/python-modules/adblock/default.nix index 7faeab491f62..67170159f348 100644 --- a/pkgs/development/python-modules/adblock/default.nix +++ b/pkgs/development/python-modules/adblock/default.nix @@ -60,7 +60,7 @@ buildPythonPackage rec { buildInputs = [ openssl ] - ++ lib.optionals stdenv.isDarwin [ + ++ lib.optionals stdenv.hostPlatform.isDarwin [ libiconv CoreFoundation Security diff --git a/pkgs/development/python-modules/aesara/default.nix b/pkgs/development/python-modules/aesara/default.nix index a7e5ee143667..385ec7ed5259 100644 --- a/pkgs/development/python-modules/aesara/default.nix +++ b/pkgs/development/python-modules/aesara/default.nix @@ -108,6 +108,6 @@ buildPythonPackage rec { changelog = "https://github.com/aesara-devs/aesara/releases/tag/rel-${version}"; license = licenses.bsd3; maintainers = with maintainers; [ Etjean ]; - broken = (stdenv.isLinux && stdenv.isAarch64); + broken = (stdenv.hostPlatform.isLinux && stdenv.hostPlatform.isAarch64); }; } diff --git a/pkgs/development/python-modules/aiofiles/default.nix b/pkgs/development/python-modules/aiofiles/default.nix index dd9e903a4369..a80581bc3088 100644 --- a/pkgs/development/python-modules/aiofiles/default.nix +++ b/pkgs/development/python-modules/aiofiles/default.nix @@ -30,7 +30,7 @@ buildPythonPackage rec { pytestCheckHook ]; - disabledTests = lib.optionals stdenv.isDarwin [ + disabledTests = lib.optionals stdenv.hostPlatform.isDarwin [ "test_sendfile_file" # require loopback networking: diff --git a/pkgs/development/python-modules/aioftp/default.nix b/pkgs/development/python-modules/aioftp/default.nix index bd448f41c849..ee0429bacb46 100644 --- a/pkgs/development/python-modules/aioftp/default.nix +++ b/pkgs/development/python-modules/aioftp/default.nix @@ -44,7 +44,7 @@ buildPythonPackage rec { trustme ] ++ lib.flatten (builtins.attrValues passthru.optional-dependencies); - disabledTests = lib.optionals stdenv.isDarwin [ + disabledTests = lib.optionals stdenv.hostPlatform.isDarwin [ # uses 127.0.0.2, which macos doesn't like "test_pasv_connection_pasv_forced_response_address" ]; diff --git a/pkgs/development/python-modules/aiohttp/default.nix b/pkgs/development/python-modules/aiohttp/default.nix index 75db6b645291..576ea16a39f8 100644 --- a/pkgs/development/python-modules/aiohttp/default.nix +++ b/pkgs/development/python-modules/aiohttp/default.nix @@ -113,8 +113,8 @@ buildPythonPackage rec { # don't run benchmarks "test_import_time" ] - ++ lib.optionals stdenv.is32bit [ "test_cookiejar" ] - ++ lib.optionals stdenv.isDarwin [ + ++ lib.optionals stdenv.hostPlatform.is32bit [ "test_cookiejar" ] + ++ lib.optionals stdenv.hostPlatform.isDarwin [ "test_addresses" # https://github.com/aio-libs/aiohttp/issues/3572, remove >= v4.0.0 "test_close" ]; @@ -129,7 +129,7 @@ buildPythonPackage rec { export HOME=$(mktemp -d) '' - + lib.optionalString stdenv.isDarwin '' + + lib.optionalString stdenv.hostPlatform.isDarwin '' # Work around "OSError: AF_UNIX path too long" export TMPDIR="/tmp" ''; diff --git a/pkgs/development/python-modules/aiomisc/default.nix b/pkgs/development/python-modules/aiomisc/default.nix index 8f3050f3ed48..59412173e977 100644 --- a/pkgs/development/python-modules/aiomisc/default.nix +++ b/pkgs/development/python-modules/aiomisc/default.nix @@ -37,7 +37,7 @@ buildPythonPackage rec { dependencies = [ colorlog ] ++ lib.optionals (pythonOlder "3.11") [ typing-extensions ] - ++ lib.optionals stdenv.isLinux [ logging-journald ]; + ++ lib.optionals stdenv.hostPlatform.isLinux [ logging-journald ]; nativeCheckInputs = [ aiocontextvars diff --git a/pkgs/development/python-modules/aiosonic/default.nix b/pkgs/development/python-modules/aiosonic/default.nix index e4dd72e700cd..b5f4e5406b8b 100644 --- a/pkgs/development/python-modules/aiosonic/default.nix +++ b/pkgs/development/python-modules/aiosonic/default.nix @@ -90,7 +90,7 @@ buildPythonPackage rec { pythonImportsCheck = [ "aiosonic" ]; disabledTests = - lib.optionals stdenv.isLinux [ + lib.optionals stdenv.hostPlatform.isLinux [ # need network "test_simple_get" "test_get_python" @@ -132,7 +132,7 @@ buildPythonPackage rec { "test_get_with_cookies" "test_proxy_request" ] - ++ lib.optionals stdenv.isDarwin [ + ++ lib.optionals stdenv.hostPlatform.isDarwin [ # "FAILED tests/test_proxy.py::test_proxy_request - Exception: port 8865 never got active" "test_proxy_request" ]; diff --git a/pkgs/development/python-modules/ale-py/default.nix b/pkgs/development/python-modules/ale-py/default.nix index 15836dee89ba..031813101079 100644 --- a/pkgs/development/python-modules/ale-py/default.nix +++ b/pkgs/development/python-modules/ale-py/default.nix @@ -87,6 +87,6 @@ buildPythonPackage rec { changelog = "https://github.com/Farama-Foundation/Arcade-Learning-Environment/releases/tag/v${version}"; license = lib.licenses.gpl2; maintainers = with lib.maintainers; [ billhuang ]; - broken = stdenv.isDarwin; # fails to link with missing library + broken = stdenv.hostPlatform.isDarwin; # fails to link with missing library }; } diff --git a/pkgs/development/python-modules/angr/default.nix b/pkgs/development/python-modules/angr/default.nix index f9039ea24a8e..b1b14da3b607 100644 --- a/pkgs/development/python-modules/angr/default.nix +++ b/pkgs/development/python-modules/angr/default.nix @@ -88,7 +88,7 @@ buildPythonPackage rec { AngrDB = [ sqlalchemy ]; }; - setupPyBuildFlags = lib.optionals stdenv.isLinux [ + setupPyBuildFlags = lib.optionals stdenv.hostPlatform.isLinux [ "--plat-name" "linux" ]; diff --git a/pkgs/development/python-modules/ansible-runner/default.nix b/pkgs/development/python-modules/ansible-runner/default.nix index 0e1a3b8ca7a2..11d0f37773e4 100644 --- a/pkgs/development/python-modules/ansible-runner/default.nix +++ b/pkgs/development/python-modules/ansible-runner/default.nix @@ -89,7 +89,7 @@ buildPythonPackage rec { "test/integration/test_runner.py" "test/unit/test_runner.py" ] - ++ lib.optionals stdenv.isDarwin [ + ++ lib.optionals stdenv.hostPlatform.isDarwin [ # Integration tests on Darwin are not regularly passing in ansible-runner's own CI "test/integration" # These tests write to `/tmp` which is not writable on Darwin diff --git a/pkgs/development/python-modules/anyio/default.nix b/pkgs/development/python-modules/anyio/default.nix index 296fbcdc3563..23f249bfcad2 100644 --- a/pkgs/development/python-modules/anyio/default.nix +++ b/pkgs/development/python-modules/anyio/default.nix @@ -78,7 +78,7 @@ buildPythonPackage rec { "'not network'" ]; - disabledTests = lib.optionals stdenv.isDarwin [ + disabledTests = lib.optionals stdenv.hostPlatform.isDarwin [ # PermissionError: [Errno 1] Operation not permitted: '/dev/console' "test_is_block_device" ]; diff --git a/pkgs/development/python-modules/apscheduler/default.nix b/pkgs/development/python-modules/apscheduler/default.nix index d409a535b463..7005690b53ef 100644 --- a/pkgs/development/python-modules/apscheduler/default.nix +++ b/pkgs/development/python-modules/apscheduler/default.nix @@ -64,7 +64,7 @@ buildPythonPackage rec { "test_add_pending_job" "test_shutdown" ] - ++ lib.optionals stdenv.isDarwin [ + ++ lib.optionals stdenv.hostPlatform.isDarwin [ "test_submit_job" "test_max_instances" ]; diff --git a/pkgs/development/python-modules/apsw/default.nix b/pkgs/development/python-modules/apsw/default.nix index aec388af308a..d2effb1ae435 100644 --- a/pkgs/development/python-modules/apsw/default.nix +++ b/pkgs/development/python-modules/apsw/default.nix @@ -39,7 +39,7 @@ buildPythonPackage rec { "testVFSWithWAL" # no lines in errout.txt "testWriteUnraisable" - ] ++ lib.optionals stdenv.isDarwin [ "testzzForkChecker" ]; + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ "testzzForkChecker" ]; pythonImportsCheck = [ "apsw" ]; diff --git a/pkgs/development/python-modules/ase/default.nix b/pkgs/development/python-modules/ase/default.nix index 326d51f55a64..dbdcbce06753 100644 --- a/pkgs/development/python-modules/ase/default.nix +++ b/pkgs/development/python-modules/ase/default.nix @@ -39,7 +39,7 @@ buildPythonPackage rec { flask pillow psycopg2 - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ tkinter ]; diff --git a/pkgs/development/python-modules/asgiref/default.nix b/pkgs/development/python-modules/asgiref/default.nix index fecc4b98f490..1fdb7f50ae31 100644 --- a/pkgs/development/python-modules/asgiref/default.nix +++ b/pkgs/development/python-modules/asgiref/default.nix @@ -30,7 +30,7 @@ buildPythonPackage rec { pytest-asyncio ]; - disabledTests = lib.optionals stdenv.isDarwin [ "test_multiprocessing" ]; + disabledTests = lib.optionals stdenv.hostPlatform.isDarwin [ "test_multiprocessing" ]; __darwinAllowLocalNetworking = true; diff --git a/pkgs/development/python-modules/aspy-refactor-imports/default.nix b/pkgs/development/python-modules/aspy-refactor-imports/default.nix index bcfb80b32e81..dbc97cca6efb 100644 --- a/pkgs/development/python-modules/aspy-refactor-imports/default.nix +++ b/pkgs/development/python-modules/aspy-refactor-imports/default.nix @@ -25,7 +25,7 @@ buildPythonPackage rec { nativeCheckInputs = [ pytestCheckHook ]; # fails on darwin due to case-insensitive file system - disabledTests = lib.optionals stdenv.isDarwin [ "test_application_directory_case" ]; + disabledTests = lib.optionals stdenv.hostPlatform.isDarwin [ "test_application_directory_case" ]; meta = with lib; { description = "Utilities for refactoring imports in python-like syntax"; diff --git a/pkgs/development/python-modules/astropy/default.nix b/pkgs/development/python-modules/astropy/default.nix index c88029cb09a8..c6a7f9fea08b 100644 --- a/pkgs/development/python-modules/astropy/default.nix +++ b/pkgs/development/python-modules/astropy/default.nix @@ -99,7 +99,7 @@ buildPythonPackage rec { "test_datetime_to_timedelta" "test_datetime_difference_agrees_with_timedelta_no_hypothesis" - ] ++ lib.optionals stdenv.isDarwin [ "test_sidereal_lat_independent" ]; + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ "test_sidereal_lat_independent" ]; meta = { description = "Astronomy/Astrophysics library for Python"; diff --git a/pkgs/development/python-modules/async-upnp-client/default.nix b/pkgs/development/python-modules/async-upnp-client/default.nix index 18969f48233d..d1719497d7ba 100644 --- a/pkgs/development/python-modules/async-upnp-client/default.nix +++ b/pkgs/development/python-modules/async-upnp-client/default.nix @@ -57,7 +57,7 @@ buildPythonPackage rec { # socket.gaierror: [Errno -2] Name or service not known "test_async_get_local_ip" "test_get_local_ip" - ] ++ lib.optionals stdenv.isDarwin [ "test_deferred_callback_url" ]; + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ "test_deferred_callback_url" ]; disabledTestPaths = [ # Tries to bind to multicast socket and fails to find proper interface diff --git a/pkgs/development/python-modules/asyncio-dgram/default.nix b/pkgs/development/python-modules/asyncio-dgram/default.nix index cdd6ac9b9781..5608a8632e47 100644 --- a/pkgs/development/python-modules/asyncio-dgram/default.nix +++ b/pkgs/development/python-modules/asyncio-dgram/default.nix @@ -31,7 +31,7 @@ buildPythonPackage rec { ]; # OSError: AF_UNIX path too long - doCheck = !stdenv.isDarwin; + doCheck = !stdenv.hostPlatform.isDarwin; disabledTests = [ "test_protocol_pause_resume" diff --git a/pkgs/development/python-modules/asyncua/default.nix b/pkgs/development/python-modules/asyncua/default.nix index d095b203d72f..59c42fd02838 100644 --- a/pkgs/development/python-modules/asyncua/default.nix +++ b/pkgs/development/python-modules/asyncua/default.nix @@ -64,7 +64,7 @@ buildPythonPackage rec { disabledTests = [ # Failed: DID NOT RAISE "test_publish" - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ # OSError: [Errno 48] error while attempting to bind on address ('127.0.0.1',... "test_anonymous_rejection" "test_certificate_handling_success" diff --git a/pkgs/development/python-modules/aubio/default.nix b/pkgs/development/python-modules/aubio/default.nix index 88d2d9af3434..64b89bb1897f 100644 --- a/pkgs/development/python-modules/aubio/default.nix +++ b/pkgs/development/python-modules/aubio/default.nix @@ -31,7 +31,7 @@ buildPythonPackage rec { }) ]; - buildInputs = lib.optionals stdenv.isDarwin ( + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin ( with darwin.apple_sdk.frameworks; [ Accelerate diff --git a/pkgs/development/python-modules/audiotools/default.nix b/pkgs/development/python-modules/audiotools/default.nix index a6b485d7b2c9..b714062be313 100644 --- a/pkgs/development/python-modules/audiotools/default.nix +++ b/pkgs/development/python-modules/audiotools/default.nix @@ -16,7 +16,7 @@ buildPythonPackage rec { build-system = [ setuptools ]; - buildInputs = lib.optionals stdenv.isDarwin [ + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ AudioToolbox AudioUnit CoreServices diff --git a/pkgs/development/python-modules/av/default.nix b/pkgs/development/python-modules/av/default.nix index a030344e8f4c..e3da4e6427cc 100644 --- a/pkgs/development/python-modules/av/default.nix +++ b/pkgs/development/python-modules/av/default.nix @@ -63,7 +63,7 @@ buildPythonPackage rec { ]; # `__darwinAllowLocalNetworking` doesn’t work for these; not sure why. - disabledTestPaths = lib.optionals stdenv.isDarwin [ + disabledTestPaths = lib.optionals stdenv.hostPlatform.isDarwin [ "tests/test_timeout.py" ]; diff --git a/pkgs/development/python-modules/awkward/default.nix b/pkgs/development/python-modules/awkward/default.nix index ffadf4d180ca..aefec7c8f326 100644 --- a/pkgs/development/python-modules/awkward/default.nix +++ b/pkgs/development/python-modules/awkward/default.nix @@ -72,7 +72,7 @@ buildPythonPackage rec { pytest-xdist pytestCheckHook ] - ++ lib.optionals (!stdenv.isDarwin) [ + ++ lib.optionals (!stdenv.hostPlatform.isDarwin) [ # no support for darwin jax jaxlib @@ -82,7 +82,7 @@ buildPythonPackage rec { disabledTestPaths = [ "tests-cuda" # Disable tests dependending on jax on darwin - ] ++ lib.optionals stdenv.isDarwin [ "tests/test_2603_custom_behaviors_with_jax.py" ]; + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ "tests/test_2603_custom_behaviors_with_jax.py" ]; disabledTests = [ # AssertionError: Regex pattern did not match. diff --git a/pkgs/development/python-modules/awscrt/default.nix b/pkgs/development/python-modules/awscrt/default.nix index f856473c7b7d..08c902f13832 100644 --- a/pkgs/development/python-modules/awscrt/default.nix +++ b/pkgs/development/python-modules/awscrt/default.nix @@ -22,12 +22,12 @@ buildPythonPackage rec { hash = "sha256-fsKmevMPvzhklN8Au9+Zb3AkAA32sBqxYAFK/vK5EAU="; }; - buildInputs = lib.optionals stdenv.isDarwin [ + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ CoreFoundation Security ]; - nativeBuildInputs = [ cmake ] ++ lib.optionals (!stdenv.isDarwin) [ perl ]; + nativeBuildInputs = [ cmake ] ++ lib.optionals (!stdenv.hostPlatform.isDarwin) [ perl ]; dontUseCmakeConfigure = true; diff --git a/pkgs/development/python-modules/awslambdaric/default.nix b/pkgs/development/python-modules/awslambdaric/default.nix index f208c5048767..8b091fc6dfe7 100644 --- a/pkgs/development/python-modules/awslambdaric/default.nix +++ b/pkgs/development/python-modules/awslambdaric/default.nix @@ -55,7 +55,7 @@ buildPythonPackage rec { ]; meta = with lib; { - broken = stdenv.isLinux && stdenv.isAarch64; + broken = stdenv.hostPlatform.isLinux && stdenv.hostPlatform.isAarch64; description = "AWS Lambda Runtime Interface Client for Python"; homepage = "https://github.com/aws/aws-lambda-python-runtime-interface-client"; license = licenses.asl20; diff --git a/pkgs/development/python-modules/azure-core/default.nix b/pkgs/development/python-modules/azure-core/default.nix index 67178fac58aa..a9cdf1ac4e99 100644 --- a/pkgs/development/python-modules/azure-core/default.nix +++ b/pkgs/development/python-modules/azure-core/default.nix @@ -75,7 +75,7 @@ buildPythonPackage rec { # disable 8 tests failing on some darwin machines with errors: # azure.core.polling.base_polling.BadStatus: Invalid return status 403 for 'GET' operation # azure.core.exceptions.HttpResponseError: Operation returned an invalid status 'Forbidden' - ] ++ lib.optionals stdenv.isDarwin [ "location_polling_fail" ]; + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ "location_polling_fail" ]; disabledTestPaths = [ # requires testing modules which aren't published, and likely to create cyclic dependencies diff --git a/pkgs/development/python-modules/b2sdk/default.nix b/pkgs/development/python-modules/b2sdk/default.nix index 3bcca268dab3..7b56d75ddd03 100644 --- a/pkgs/development/python-modules/b2sdk/default.nix +++ b/pkgs/development/python-modules/b2sdk/default.nix @@ -54,7 +54,7 @@ buildPythonPackage rec { pytest-mock pytestCheckHook tqdm - ] ++ lib.optionals stdenv.isLinux [ glibcLocales ]; + ] ++ lib.optionals stdenv.hostPlatform.isLinux [ glibcLocales ]; disabledTestPaths = [ # requires aws s3 auth diff --git a/pkgs/development/python-modules/base2048/default.nix b/pkgs/development/python-modules/base2048/default.nix index e092fecc1c1c..4a760c5b6f19 100644 --- a/pkgs/development/python-modules/base2048/default.nix +++ b/pkgs/development/python-modules/base2048/default.nix @@ -39,7 +39,7 @@ buildPythonPackage rec { rustc ]; - buildInputs = lib.optionals stdenv.isDarwin [ libiconv ]; + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ libiconv ]; passthru.optional-dependencies = { fuzz = [ frelatage ]; diff --git a/pkgs/development/python-modules/bayesian-optimization/default.nix b/pkgs/development/python-modules/bayesian-optimization/default.nix index 24b86e8f224b..582a6d507e6d 100644 --- a/pkgs/development/python-modules/bayesian-optimization/default.nix +++ b/pkgs/development/python-modules/bayesian-optimization/default.nix @@ -50,7 +50,7 @@ buildPythonPackage rec { pythonImportsCheck = [ "bayes_opt" ]; meta = with lib; { - broken = stdenv.isLinux && stdenv.isAarch64; + broken = stdenv.hostPlatform.isLinux && stdenv.hostPlatform.isAarch64; description = '' A Python implementation of global optimization with gaussian processes ''; diff --git a/pkgs/development/python-modules/bcrypt/default.nix b/pkgs/development/python-modules/bcrypt/default.nix index 396a9668b777..ee51533e6e3a 100644 --- a/pkgs/development/python-modules/bcrypt/default.nix +++ b/pkgs/development/python-modules/bcrypt/default.nix @@ -48,7 +48,7 @@ buildPythonPackage rec { ]; # Remove when https://github.com/NixOS/nixpkgs/pull/190093 lands. - buildInputs = lib.optional stdenv.isDarwin libiconv; + buildInputs = lib.optional stdenv.hostPlatform.isDarwin libiconv; nativeCheckInputs = [ pytestCheckHook ]; diff --git a/pkgs/development/python-modules/behave/default.nix b/pkgs/development/python-modules/behave/default.nix index e7a9de7f1bc0..60ba28069ab0 100644 --- a/pkgs/development/python-modules/behave/default.nix +++ b/pkgs/development/python-modules/behave/default.nix @@ -60,7 +60,7 @@ buildPythonPackage rec { # timing-based test flaky on Darwin # https://github.com/NixOS/nixpkgs/pull/97737#issuecomment-691489824 - disabledTests = lib.optionals stdenv.isDarwin [ "test_step_decorator_async_run_until_complete" ]; + disabledTests = lib.optionals stdenv.hostPlatform.isDarwin [ "test_step_decorator_async_run_until_complete" ]; postCheck = '' ${python.interpreter} bin/behave -f progress3 --stop --tags='~@xfail' features/ diff --git a/pkgs/development/python-modules/binwalk/default.nix b/pkgs/development/python-modules/binwalk/default.nix index 25365c67fbde..024bd4d2dea3 100644 --- a/pkgs/development/python-modules/binwalk/default.nix +++ b/pkgs/development/python-modules/binwalk/default.nix @@ -55,7 +55,7 @@ buildPythonPackage rec { pyqtgraph pyqt5 ] - ++ lib.optionals (!stdenv.isDarwin) [ + ++ lib.optionals (!stdenv.hostPlatform.isDarwin) [ cramfsprogs cramfsswap sasquatch diff --git a/pkgs/development/python-modules/black/default.nix b/pkgs/development/python-modules/black/default.nix index 06b53f599e30..de9a6d9d48b6 100644 --- a/pkgs/development/python-modules/black/default.nix +++ b/pkgs/development/python-modules/black/default.nix @@ -86,7 +86,7 @@ buildPythonPackage rec { # Make /build the project root for black tests to avoid excluding files. touch ../.git '' - + lib.optionalString stdenv.isDarwin '' + + lib.optionalString stdenv.hostPlatform.isDarwin '' # Work around https://github.com/psf/black/issues/2105 export TMPDIR="/tmp" ''; @@ -96,7 +96,7 @@ buildPythonPackage rec { # requires network access "test_gen_check_output" ] - ++ lib.optionals stdenv.isDarwin [ + ++ lib.optionals stdenv.hostPlatform.isDarwin [ # fails on darwin "test_expression_diff" # Fail on Hydra, see https://github.com/NixOS/nixpkgs/pull/130785 @@ -104,7 +104,7 @@ buildPythonPackage rec { "test_skip_magic_trailing_comma" ]; # multiple tests exceed max open files on hydra builders - doCheck = !(stdenv.isLinux && stdenv.isAarch64); + doCheck = !(stdenv.hostPlatform.isLinux && stdenv.hostPlatform.isAarch64); meta = with lib; { description = "Uncompromising Python code formatter"; diff --git a/pkgs/development/python-modules/blackjax/default.nix b/pkgs/development/python-modules/blackjax/default.nix index 9f7917738665..b58c73367655 100644 --- a/pkgs/development/python-modules/blackjax/default.nix +++ b/pkgs/development/python-modules/blackjax/default.nix @@ -54,7 +54,7 @@ buildPythonPackage rec { disabledTestPaths = [ "tests/test_benchmarks.py" ] - ++ lib.optionals (stdenv.isLinux && stdenv.isAarch64) [ + ++ lib.optionals (stdenv.hostPlatform.isLinux && stdenv.hostPlatform.isAarch64) [ # Assertion errors on numerical values "tests/mcmc/test_integrators.py" ]; @@ -64,7 +64,7 @@ buildPythonPackage rec { # too slow "test_adaptive_tempered_smc" ] - ++ lib.optionals (stdenv.isLinux && stdenv.isAarch64) [ + ++ lib.optionals (stdenv.hostPlatform.isLinux && stdenv.hostPlatform.isAarch64) [ # Numerical test (AssertionError) # https://github.com/blackjax-devs/blackjax/issues/668 "test_chees_adaptation" diff --git a/pkgs/development/python-modules/bpycv/default.nix b/pkgs/development/python-modules/bpycv/default.nix index 97fd086b1f5c..e4ad37696e25 100644 --- a/pkgs/development/python-modules/bpycv/default.nix +++ b/pkgs/development/python-modules/bpycv/default.nix @@ -61,7 +61,7 @@ buildPythonPackage rec { homepage = "https://github.com/DIYer22/bpycv"; license = licenses.mit; maintainers = [ maintainers.lucasew ]; - broken = stdenv.isAarch64; + broken = stdenv.hostPlatform.isAarch64; inherit (blender.meta) platforms; }; } diff --git a/pkgs/development/python-modules/breezy/default.nix b/pkgs/development/python-modules/breezy/default.nix index de779d7f3e4c..b6316ad036e7 100644 --- a/pkgs/development/python-modules/breezy/default.nix +++ b/pkgs/development/python-modules/breezy/default.nix @@ -58,7 +58,7 @@ buildPythonPackage rec { setuptools-rust ]; - buildInputs = lib.optionals stdenv.isDarwin [ libiconv ]; + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ libiconv ]; propagatedBuildInputs = [ diff --git a/pkgs/development/python-modules/build/default.nix b/pkgs/development/python-modules/build/default.nix index b3a8c905bc8b..d3329230305e 100644 --- a/pkgs/development/python-modules/build/default.nix +++ b/pkgs/development/python-modules/build/default.nix @@ -86,7 +86,7 @@ buildPythonPackage rec { "test_output" "test_wheel_metadata" ] - ++ lib.optionals stdenv.isDarwin [ + ++ lib.optionals stdenv.hostPlatform.isDarwin [ # Expects Apple's Python and its quirks "test_can_get_venv_paths_with_conflicting_default_scheme" ]; diff --git a/pkgs/development/python-modules/bx-py-utils/default.nix b/pkgs/development/python-modules/bx-py-utils/default.nix index ccb98329a3b4..757b2d7e9f21 100644 --- a/pkgs/development/python-modules/bx-py-utils/default.nix +++ b/pkgs/development/python-modules/bx-py-utils/default.nix @@ -74,7 +74,7 @@ buildPythonPackage rec { disabledTestPaths = [ "bx_py_utils_tests/tests/test_project_setup.py" ] - ++ lib.optionals stdenv.isDarwin [ + ++ lib.optionals stdenv.hostPlatform.isDarwin [ # processify() doesn't work under darwin # https://github.com/boxine/bx_py_utils/issues/80 "bx_py_utils_tests/tests/test_processify.py" diff --git a/pkgs/development/python-modules/bytewax/default.nix b/pkgs/development/python-modules/bytewax/default.nix index 22d022c454be..36c1efc4266c 100644 --- a/pkgs/development/python-modules/bytewax/default.nix +++ b/pkgs/development/python-modules/bytewax/default.nix @@ -104,6 +104,6 @@ buildPythonPackage rec { kfollesdal ]; # mismatched type expected u8, found i8 - broken = stdenv.isAarch64; + broken = stdenv.hostPlatform.isAarch64; }; } diff --git a/pkgs/development/python-modules/capstone/4.nix b/pkgs/development/python-modules/capstone/4.nix index 66b57a01bcb2..b7c31d336091 100644 --- a/pkgs/development/python-modules/capstone/4.nix +++ b/pkgs/development/python-modules/capstone/4.nix @@ -30,7 +30,7 @@ buildPythonPackage { # aarch64 only available from MacOS SDK 11 onwards, so fix the version tag. # otherwise, bdist_wheel may detect "macosx_10_6_arm64" which doesn't make sense. - setupPyBuildFlags = lib.optionals (stdenv.isDarwin && stdenv.isAarch64) [ + setupPyBuildFlags = lib.optionals (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isAarch64) [ "--plat-name" "macosx_11_0" ]; diff --git a/pkgs/development/python-modules/capstone/default.nix b/pkgs/development/python-modules/capstone/default.nix index 74035c9bef30..e735871268e5 100644 --- a/pkgs/development/python-modules/capstone/default.nix +++ b/pkgs/development/python-modules/capstone/default.nix @@ -33,7 +33,7 @@ buildPythonPackage rec { # aarch64 only available from MacOS SDK 11 onwards, so fix the version tag. # otherwise, bdist_wheel may detect "macosx_10_6_arm64" which doesn't make sense. - setupPyBuildFlags = lib.optionals (stdenv.isDarwin && stdenv.isAarch64) [ + setupPyBuildFlags = lib.optionals (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isAarch64) [ "--plat-name" "macosx_11_0" ]; diff --git a/pkgs/development/python-modules/capturer/default.nix b/pkgs/development/python-modules/capturer/default.nix index 856da1f95369..b9895dd18f97 100644 --- a/pkgs/development/python-modules/capturer/default.nix +++ b/pkgs/development/python-modules/capturer/default.nix @@ -22,7 +22,7 @@ buildPythonPackage rec { propagatedBuildInputs = [ humanfriendly ]; # hangs on darwin - doCheck = !stdenv.isDarwin; + doCheck = !stdenv.hostPlatform.isDarwin; nativeCheckInputs = [ pytestCheckHook ]; meta = with lib; { diff --git a/pkgs/development/python-modules/cassandra-driver/default.nix b/pkgs/development/python-modules/cassandra-driver/default.nix index 9548bd1214d8..0f03b20e196d 100644 --- a/pkgs/development/python-modules/cassandra-driver/default.nix +++ b/pkgs/development/python-modules/cassandra-driver/default.nix @@ -86,7 +86,7 @@ buildPythonPackage rec { # Make /etc/protocols accessible to allow socket.getprotobyname('tcp') in sandbox, # also /etc/resolv.conf is referenced by some tests preCheck = - (lib.optionalString stdenv.isLinux '' + (lib.optionalString stdenv.hostPlatform.isLinux '' echo "nameserver 127.0.0.1" > resolv.conf export NIX_REDIRECTS=/etc/protocols=${iana-etc}/etc/protocols:/etc/resolv.conf=$(realpath resolv.conf) export LD_PRELOAD=${libredirect}/lib/libredirect.so diff --git a/pkgs/development/python-modules/celery/default.nix b/pkgs/development/python-modules/celery/default.nix index d5c372c5d498..99854b9d772e 100644 --- a/pkgs/development/python-modules/celery/default.nix +++ b/pkgs/development/python-modules/celery/default.nix @@ -97,7 +97,7 @@ buildPythonPackage rec { "test_stamping_headers_in_options" "test_stamping_with_replace" ] - ++ lib.optionals stdenv.isDarwin [ + ++ lib.optionals stdenv.hostPlatform.isDarwin [ # Too many open files on hydra "test_cleanup" "test_with_autoscaler_file_descriptor_safety" diff --git a/pkgs/development/python-modules/cffi/default.nix b/pkgs/development/python-modules/cffi/default.nix index 9fbbdd371f9b..6f12d691c7d1 100644 --- a/pkgs/development/python-modules/cffi/default.nix +++ b/pkgs/development/python-modules/cffi/default.nix @@ -49,7 +49,7 @@ else ./clang-pointer-substraction-warning.diff ]; - postPatch = lib.optionalString stdenv.isDarwin '' + postPatch = lib.optionalString stdenv.hostPlatform.isDarwin '' # Remove setup.py impurities substituteInPlace setup.py \ --replace "'-iwithsysroot/usr/include/ffi'" "" \ diff --git a/pkgs/development/python-modules/cffsubr/default.nix b/pkgs/development/python-modules/cffsubr/default.nix index c9642235e37e..46dabb2711af 100644 --- a/pkgs/development/python-modules/cffsubr/default.nix +++ b/pkgs/development/python-modules/cffsubr/default.nix @@ -49,7 +49,7 @@ buildPythonPackage rec { pythonImportsCheck = [ "cffsubr" ]; meta = with lib; { - broken = stdenv.isDarwin; + broken = stdenv.hostPlatform.isDarwin; changelog = "https://github.com/adobe-type-tools/cffsubr/releases/tag/v${version}"; description = "Standalone CFF subroutinizer based on AFDKO tx"; mainProgram = "cffsubr"; diff --git a/pkgs/development/python-modules/cheroot/default.nix b/pkgs/development/python-modules/cheroot/default.nix index 01773d1c20cf..2b4c9f427acb 100644 --- a/pkgs/development/python-modules/cheroot/default.nix +++ b/pkgs/development/python-modules/cheroot/default.nix @@ -76,7 +76,7 @@ buildPythonPackage rec { "tls" # touches network "peercreds_unix_sock" # test urls no longer allowed ] - ++ lib.optionals stdenv.isDarwin [ + ++ lib.optionals stdenv.hostPlatform.isDarwin [ "http_over_https_error" "bind_addr_unix" "test_ssl_env" diff --git a/pkgs/development/python-modules/cherrypy/default.nix b/pkgs/development/python-modules/cherrypy/default.nix index 71d9a9aedfb5..1b0574d05726 100644 --- a/pkgs/development/python-modules/cherrypy/default.nix +++ b/pkgs/development/python-modules/cherrypy/default.nix @@ -101,9 +101,9 @@ buildPythonPackage rec { "test_1_Ram_Concurrency" "test_2_File_Concurrency" ] - ++ lib.optionals stdenv.isDarwin [ "test_block" ]; + ++ lib.optionals stdenv.hostPlatform.isDarwin [ "test_block" ]; - disabledTestPaths = lib.optionals stdenv.isDarwin [ "cherrypy/test/test_config_server.py" ]; + disabledTestPaths = lib.optionals stdenv.hostPlatform.isDarwin [ "cherrypy/test/test_config_server.py" ]; __darwinAllowLocalNetworking = true; diff --git a/pkgs/development/python-modules/chromadb/default.nix b/pkgs/development/python-modules/chromadb/default.nix index fa1f0f94591c..eb44d2a9b5c2 100644 --- a/pkgs/development/python-modules/chromadb/default.nix +++ b/pkgs/development/python-modules/chromadb/default.nix @@ -91,7 +91,7 @@ buildPythonPackage rec { buildInputs = [ openssl zstd - ] ++ lib.optionals stdenv.isDarwin [ darwin.apple_sdk.frameworks.Security ]; + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.Security ]; dependencies = [ bcrypt @@ -175,6 +175,6 @@ buildPythonPackage rec { license = licenses.asl20; maintainers = with maintainers; [ fab ]; mainProgram = "chroma"; - broken = stdenv.isLinux && stdenv.isAarch64; + broken = stdenv.hostPlatform.isLinux && stdenv.hostPlatform.isAarch64; }; } diff --git a/pkgs/development/python-modules/circus/default.nix b/pkgs/development/python-modules/circus/default.nix index b87e4c42568b..858b9142121c 100644 --- a/pkgs/development/python-modules/circus/default.nix +++ b/pkgs/development/python-modules/circus/default.nix @@ -38,7 +38,7 @@ buildPythonPackage rec { ]; # On darwin: Too many open files - preCheck = lib.optionalString stdenv.isDarwin '' + preCheck = lib.optionalString stdenv.hostPlatform.isDarwin '' ulimit -n 1024 ''; diff --git a/pkgs/development/python-modules/cirq-core/default.nix b/pkgs/development/python-modules/cirq-core/default.nix index d0a506c5f996..4c20d01f302f 100644 --- a/pkgs/development/python-modules/cirq-core/default.nix +++ b/pkgs/development/python-modules/cirq-core/default.nix @@ -89,7 +89,7 @@ buildPythonPackage rec { "cirq/_version_test.py" ]; - disabledTests = lib.optionals stdenv.isAarch64 [ + disabledTests = lib.optionals stdenv.hostPlatform.isAarch64 [ # https://github.com/quantumlib/Cirq/issues/5924 "test_prepare_two_qubit_state_using_sqrt_iswap" ]; diff --git a/pkgs/development/python-modules/clarabel/default.nix b/pkgs/development/python-modules/clarabel/default.nix index d81f01b34fc5..f6e4e09edc7c 100644 --- a/pkgs/development/python-modules/clarabel/default.nix +++ b/pkgs/development/python-modules/clarabel/default.nix @@ -31,7 +31,7 @@ buildPythonPackage rec { maturinBuildHook ]; - buildInputs = lib.optional stdenv.isDarwin libiconv; + buildInputs = lib.optional stdenv.hostPlatform.isDarwin libiconv; propagatedBuildInputs = [ numpy diff --git a/pkgs/development/python-modules/clickgen/default.nix b/pkgs/development/python-modules/clickgen/default.nix index 50b2f1b1d241..a8109184f251 100644 --- a/pkgs/development/python-modules/clickgen/default.nix +++ b/pkgs/development/python-modules/clickgen/default.nix @@ -55,6 +55,6 @@ buildPythonPackage rec { maintainers = with maintainers; [ AdsonCicilioti ]; # fails with: # ld: unknown option: -zdefs - broken = stdenv.isDarwin; + broken = stdenv.hostPlatform.isDarwin; }; } diff --git a/pkgs/development/python-modules/clustershell/default.nix b/pkgs/development/python-modules/clustershell/default.nix index 9c166af7f550..f52f290be8d5 100644 --- a/pkgs/development/python-modules/clustershell/default.nix +++ b/pkgs/development/python-modules/clustershell/default.nix @@ -81,7 +81,7 @@ buildPythonPackage rec { ''; meta = with lib; { - broken = stdenv.isDarwin; + broken = stdenv.hostPlatform.isDarwin; description = "Scalable Python framework for cluster administration"; homepage = "https://cea-hpc.github.io/clustershell"; license = licenses.lgpl21; diff --git a/pkgs/development/python-modules/cmd2/default.nix b/pkgs/development/python-modules/cmd2/default.nix index c78eda407871..75b2d0547909 100644 --- a/pkgs/development/python-modules/cmd2/default.nix +++ b/pkgs/development/python-modules/cmd2/default.nix @@ -60,7 +60,7 @@ buildPythonPackage rec { '' sed -i "/--cov/d" setup.cfg '' - + lib.optionalString stdenv.isDarwin '' + + lib.optionalString stdenv.hostPlatform.isDarwin '' # Fake the impure dependencies pbpaste and pbcopy mkdir bin echo '#!${stdenv.shell}' > bin/pbpaste @@ -69,7 +69,7 @@ buildPythonPackage rec { export PATH=$(realpath bin):$PATH ''; - doCheck = !stdenv.isDarwin; + doCheck = !stdenv.hostPlatform.isDarwin; pythonImportsCheck = [ "cmd2" ]; diff --git a/pkgs/development/python-modules/cmdstanpy/default.nix b/pkgs/development/python-modules/cmdstanpy/default.nix index cb31be20a170..ead29ecbb939 100644 --- a/pkgs/development/python-modules/cmdstanpy/default.nix +++ b/pkgs/development/python-modules/cmdstanpy/default.nix @@ -77,7 +77,7 @@ buildPythonPackage rec { "test_pathfinder_threads" "test_save_profile" ] - ++ lib.optionals stdenv.isDarwin [ + ++ lib.optionals stdenv.hostPlatform.isDarwin [ "test_init_types" # CmdStan error: error during processing Operation not permitted ]; diff --git a/pkgs/development/python-modules/cmigemo/default.nix b/pkgs/development/python-modules/cmigemo/default.nix index 599f91f14106..9237631c0532 100644 --- a/pkgs/development/python-modules/cmigemo/default.nix +++ b/pkgs/development/python-modules/cmigemo/default.nix @@ -37,7 +37,7 @@ buildPythonPackage rec { pythonImportsCheck = [ "cmigemo" ]; meta = with lib; { - broken = stdenv.isDarwin; + broken = stdenv.hostPlatform.isDarwin; homepage = "https://github.com/mooz/python-cmigemo"; description = "Pure python binding for C/Migemo"; license = licenses.mit; diff --git a/pkgs/development/python-modules/cmsis-pack-manager/default.nix b/pkgs/development/python-modules/cmsis-pack-manager/default.nix index 85ef05db3e52..554e9516d53f 100644 --- a/pkgs/development/python-modules/cmsis-pack-manager/default.nix +++ b/pkgs/development/python-modules/cmsis-pack-manager/default.nix @@ -37,7 +37,7 @@ buildPythonPackage rec { rustPlatform.maturinBuildHook ]; propagatedNativeBuildInputs = [ cffi ]; - buildInputs = [ libiconv ] ++ lib.optional stdenv.isDarwin darwin.apple_sdk.frameworks.Security; + buildInputs = [ libiconv ] ++ lib.optional stdenv.hostPlatform.isDarwin darwin.apple_sdk.frameworks.Security; propagatedBuildInputs = [ appdirs pyyaml diff --git a/pkgs/development/python-modules/coloredlogs/default.nix b/pkgs/development/python-modules/coloredlogs/default.nix index 348d4080498d..182c5c370624 100644 --- a/pkgs/development/python-modules/coloredlogs/default.nix +++ b/pkgs/development/python-modules/coloredlogs/default.nix @@ -35,7 +35,7 @@ buildPythonPackage rec { # capturer is broken on darwin / py38, so we skip the test until a fix for # https://github.com/xolox/python-capturer/issues/10 is released. - doCheck = !stdenv.isDarwin; + doCheck = !stdenv.hostPlatform.isDarwin; preCheck = '' # Required for the CLI test diff --git a/pkgs/development/python-modules/commoncode/default.nix b/pkgs/development/python-modules/commoncode/default.nix index 359f1935f2fc..3e8c1eb0182e 100644 --- a/pkgs/development/python-modules/commoncode/default.nix +++ b/pkgs/development/python-modules/commoncode/default.nix @@ -57,7 +57,7 @@ buildPythonPackage rec { "test_walk_can_walk_non_utf8_path_from_unicode_path" "test_resource_iter_can_walk_non_utf8_path_from_unicode_path_with_dirs" ] - ++ lib.optionals stdenv.isDarwin [ + ++ lib.optionals stdenv.hostPlatform.isDarwin [ # expected result is tailored towards the quirks of upstream's # CI environment on darwin "test_searchable_paths" diff --git a/pkgs/development/python-modules/configparser/default.nix b/pkgs/development/python-modules/configparser/default.nix index d078fceee371..6e6e38f0b3af 100644 --- a/pkgs/development/python-modules/configparser/default.nix +++ b/pkgs/development/python-modules/configparser/default.nix @@ -28,7 +28,7 @@ buildPythonPackage rec { nativeCheckInputs = [ pytestCheckHook ]; preConfigure = '' - export LC_ALL=${if stdenv.isDarwin then "en_US" else "C"}.UTF-8 + export LC_ALL=${if stdenv.hostPlatform.isDarwin then "en_US" else "C"}.UTF-8 ''; meta = with lib; { diff --git a/pkgs/development/python-modules/construct/default.nix b/pkgs/development/python-modules/construct/default.nix index 729d6df5644d..d21dd11e010a 100644 --- a/pkgs/development/python-modules/construct/default.nix +++ b/pkgs/development/python-modules/construct/default.nix @@ -51,7 +51,7 @@ buildPythonPackage rec { pythonImportsCheck = [ "construct" ]; - disabledTests = [ "test_benchmarks" ] ++ lib.optionals stdenv.isDarwin [ "test_multiprocessing" ]; + disabledTests = [ "test_benchmarks" ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ "test_multiprocessing" ]; meta = with lib; { description = "Powerful declarative parser (and builder) for binary data"; diff --git a/pkgs/development/python-modules/cot/default.nix b/pkgs/development/python-modules/cot/default.nix index ac144b26450b..fb3a138627ad 100644 --- a/pkgs/development/python-modules/cot/default.nix +++ b/pkgs/development/python-modules/cot/default.nix @@ -69,7 +69,7 @@ buildPythonPackage rec { "test_serial_fixup_stubbed" "test_serial_fixup_stubbed_create" "test_serial_fixup_stubbed_vm_not_found" - ] ++ lib.optionals stdenv.isDarwin [ "test_serial_fixup_invalid_host" ]; + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ "test_serial_fixup_invalid_host" ]; pythonImportsCheck = [ "COT" ]; diff --git a/pkgs/development/python-modules/craft-application/default.nix b/pkgs/development/python-modules/craft-application/default.nix index 04c488586c9e..96bec81c9172 100644 --- a/pkgs/development/python-modules/craft-application/default.nix +++ b/pkgs/development/python-modules/craft-application/default.nix @@ -96,7 +96,7 @@ buildPythonPackage rec { # Tests expecting pytest-time "test_monitor_builds_success" ] - ++ lib.optionals stdenv.isAarch64 [ + ++ lib.optionals stdenv.hostPlatform.isAarch64 [ # These tests have hardcoded "amd64" strings which fail on aarch64 "test_process_grammar_build_for" "test_process_grammar_platform" diff --git a/pkgs/development/python-modules/craft-parts/default.nix b/pkgs/development/python-modules/craft-parts/default.nix index 2ad66a7d4a75..c3fd4e2abb54 100644 --- a/pkgs/development/python-modules/craft-parts/default.nix +++ b/pkgs/development/python-modules/craft-parts/default.nix @@ -96,7 +96,7 @@ buildPythonPackage rec { "tests/unit/packages/test_deb.py" "tests/unit/packages/test_chisel.py" ] - ++ lib.optionals stdenv.isAarch64 [ + ++ lib.optionals stdenv.hostPlatform.isAarch64 [ # These tests have hardcoded "amd64" strings which fail on aarch64 "tests/unit/executor/test_environment.py" "tests/unit/features/overlay/test_executor_environment.py" diff --git a/pkgs/development/python-modules/cram/default.nix b/pkgs/development/python-modules/cram/default.nix index 13ed15f5246d..1f92211953ca 100644 --- a/pkgs/development/python-modules/cram/default.nix +++ b/pkgs/development/python-modules/cram/default.nix @@ -36,6 +36,6 @@ buildPythonPackage rec { license = lib.licenses.gpl2Plus; maintainers = with lib.maintainers; [ jluttine ]; # Tests fail on i686: https://hydra.nixos.org/build/52896671/nixlog/4 - broken = stdenv.isi686; + broken = stdenv.hostPlatform.isi686; }; } diff --git a/pkgs/development/python-modules/cramjam/default.nix b/pkgs/development/python-modules/cramjam/default.nix index e61e75da117f..34571f05f774 100644 --- a/pkgs/development/python-modules/cramjam/default.nix +++ b/pkgs/development/python-modules/cramjam/default.nix @@ -35,7 +35,7 @@ buildPythonPackage rec { maturinBuildHook ]; - buildInputs = lib.optional stdenv.isDarwin libiconv; + buildInputs = lib.optional stdenv.hostPlatform.isDarwin libiconv; nativeCheckInputs = [ hypothesis diff --git a/pkgs/development/python-modules/cryptg/default.nix b/pkgs/development/python-modules/cryptg/default.nix index 43e5ac7e6163..c038eb46668a 100644 --- a/pkgs/development/python-modules/cryptg/default.nix +++ b/pkgs/development/python-modules/cryptg/default.nix @@ -37,7 +37,7 @@ buildPythonPackage rec { cargo ]; - buildInputs = lib.optionals stdenv.isDarwin [ libiconv ]; + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ libiconv ]; # has no tests doCheck = false; diff --git a/pkgs/development/python-modules/cryptography/default.nix b/pkgs/development/python-modules/cryptography/default.nix index 29076051578e..1d1e43a03165 100644 --- a/pkgs/development/python-modules/cryptography/default.nix +++ b/pkgs/development/python-modules/cryptography/default.nix @@ -57,7 +57,7 @@ buildPythonPackage rec { buildInputs = [ openssl ] - ++ lib.optionals stdenv.isDarwin [ + ++ lib.optionals stdenv.hostPlatform.isDarwin [ Security libiconv ] diff --git a/pkgs/development/python-modules/css-inline/default.nix b/pkgs/development/python-modules/css-inline/default.nix index b9faf71842b6..a108599eb6ba 100644 --- a/pkgs/development/python-modules/css-inline/default.nix +++ b/pkgs/development/python-modules/css-inline/default.nix @@ -51,7 +51,7 @@ buildPythonPackage rec { rustPlatform.maturinBuildHook ]; - buildInputs = lib.optionals stdenv.isDarwin [ + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ libiconv Security SystemConfiguration @@ -70,7 +70,7 @@ buildPythonPackage rec { "test_cache" "test_remote_stylesheet" ] - ++ lib.optionals (stdenv.isDarwin) [ + ++ lib.optionals (stdenv.hostPlatform.isDarwin) [ # pyo3_runtime.PanicException: event loop thread panicked "test_invalid_href" ]; diff --git a/pkgs/development/python-modules/curio/default.nix b/pkgs/development/python-modules/curio/default.nix index 087d85405e26..434af5cb974a 100644 --- a/pkgs/development/python-modules/curio/default.nix +++ b/pkgs/development/python-modules/curio/default.nix @@ -46,7 +46,7 @@ buildPythonPackage rec { "test_unix_echo" # socket bind error on hydra when built with other packages "test_unix_ssl_server" # socket bind error on hydra when built with other packages ] - ++ lib.optionals stdenv.isDarwin [ + ++ lib.optionals stdenv.hostPlatform.isDarwin [ # connects to python.org:1, expects an OsError, hangs in the darwin sandbox "test_create_bad_connection" ]; diff --git a/pkgs/development/python-modules/curtsies/default.nix b/pkgs/development/python-modules/curtsies/default.nix index b2467a02e09b..7be20c559019 100644 --- a/pkgs/development/python-modules/curtsies/default.nix +++ b/pkgs/development/python-modules/curtsies/default.nix @@ -42,6 +42,6 @@ buildPythonPackage rec { changelog = "https://github.com/bpython/curtsies/blob/v${version}/CHANGELOG.md"; license = licenses.mit; maintainers = with maintainers; [ flokli ]; - broken = stdenv.isDarwin; + broken = stdenv.hostPlatform.isDarwin; }; } diff --git a/pkgs/development/python-modules/cvxpy/default.nix b/pkgs/development/python-modules/cvxpy/default.nix index 7ed3c7563777..4e49046a1e23 100644 --- a/pkgs/development/python-modules/cvxpy/default.nix +++ b/pkgs/development/python-modules/cvxpy/default.nix @@ -21,7 +21,7 @@ # checks pytestCheckHook, - useOpenmp ? (!stdenv.isDarwin), + useOpenmp ? (!stdenv.hostPlatform.isDarwin), }: buildPythonPackage rec { diff --git a/pkgs/development/python-modules/cython/0.nix b/pkgs/development/python-modules/cython/0.nix index 8dc7db31fe3f..a484892c0040 100644 --- a/pkgs/development/python-modules/cython/0.nix +++ b/pkgs/development/python-modules/cython/0.nix @@ -24,8 +24,8 @@ let # Some tests in the test suite isn't working on aarch64. Disable them for # now until upstream finds a workaround. # Upstream issue here: https://github.com/cython/cython/issues/2308 - ++ lib.optionals stdenv.isAarch64 [ "numpy_memoryview" ] - ++ lib.optionals stdenv.isi686 [ + ++ lib.optionals stdenv.hostPlatform.isAarch64 [ "numpy_memoryview" ] + ++ lib.optionals stdenv.hostPlatform.isi686 [ "future_division" "overflow_check_longlong" ]; @@ -87,7 +87,7 @@ buildPythonPackage rec { # https://github.com/cython/cython/issues/2785 # Temporary solution doCheck = false; - # doCheck = !stdenv.isDarwin; + # doCheck = !stdenv.hostPlatform.isDarwin; # force regeneration of generated code in source distributions # https://github.com/cython/cython/issues/5089 diff --git a/pkgs/development/python-modules/cython/default.nix b/pkgs/development/python-modules/cython/default.nix index 2d3333ecec6a..63e2821cde39 100644 --- a/pkgs/development/python-modules/cython/default.nix +++ b/pkgs/development/python-modules/cython/default.nix @@ -26,8 +26,8 @@ let # Some tests in the test suite isn't working on aarch64. Disable them for # now until upstream finds a workaround. # Upstream issue here: https://github.com/cython/cython/issues/2308 - ++ lib.optionals stdenv.isAarch64 [ "numpy_memoryview" ] - ++ lib.optionals stdenv.isi686 [ + ++ lib.optionals stdenv.hostPlatform.isAarch64 [ "numpy_memoryview" ] + ++ lib.optionals stdenv.hostPlatform.isi686 [ "future_division" "overflow_check_longlong" ]; @@ -70,7 +70,7 @@ buildPythonPackage rec { # https://github.com/cython/cython/issues/2785 # Temporary solution doCheck = false; - # doCheck = !stdenv.isDarwin; + # doCheck = !stdenv.hostPlatform.isDarwin; passthru.tests = { inherit sage; diff --git a/pkgs/development/python-modules/daphne/default.nix b/pkgs/development/python-modules/daphne/default.nix index 0cae95af4c80..7e85adb0c29d 100644 --- a/pkgs/development/python-modules/daphne/default.nix +++ b/pkgs/development/python-modules/daphne/default.nix @@ -59,7 +59,7 @@ buildPythonPackage rec { ]; # Most tests fail on darwin - doCheck = !stdenv.isDarwin; + doCheck = !stdenv.hostPlatform.isDarwin; pythonImportsCheck = [ "daphne" ]; diff --git a/pkgs/development/python-modules/darkdetect/default.nix b/pkgs/development/python-modules/darkdetect/default.nix index fe38977f2ac0..c51f22fb368d 100644 --- a/pkgs/development/python-modules/darkdetect/default.nix +++ b/pkgs/development/python-modules/darkdetect/default.nix @@ -27,7 +27,7 @@ buildPythonPackage rec { pythonImportsCheck = [ "darkdetect" ]; - postPatch = lib.optionalString (stdenv.isLinux) '' + postPatch = lib.optionalString (stdenv.hostPlatform.isLinux) '' substituteInPlace darkdetect/_linux_detect.py \ --replace "'gsettings'" "'${glib.bin}/bin/gsettings'" ''; diff --git a/pkgs/development/python-modules/dask-jobqueue/default.nix b/pkgs/development/python-modules/dask-jobqueue/default.nix index c4c2100ae032..8c43fc9f260f 100644 --- a/pkgs/development/python-modules/dask-jobqueue/default.nix +++ b/pkgs/development/python-modules/dask-jobqueue/default.nix @@ -83,7 +83,7 @@ buildPythonPackage rec { "test_worker_name_uses_cluster_name" "test_wrong_parameter_error" ] - ++ lib.optionals stdenv.isDarwin [ + ++ lib.optionals stdenv.hostPlatform.isDarwin [ # ValueError: invalid operation on non-started TCPListener "test_header" "test_lsf_unit_detection" diff --git a/pkgs/development/python-modules/dask/default.nix b/pkgs/development/python-modules/dask/default.nix index 7ea1779fd21e..d26caf858cd0 100644 --- a/pkgs/development/python-modules/dask/default.nix +++ b/pkgs/development/python-modules/dask/default.nix @@ -123,14 +123,14 @@ let ]; disabledTests = - lib.optionals stdenv.isDarwin [ + lib.optionals stdenv.hostPlatform.isDarwin [ # Test requires features of python3Packages.psutil that are # blocked in sandboxed-builds "test_auto_blocksize_csv" # AttributeError: 'str' object has no attribute 'decode' "test_read_dir_nometa" ] - ++ lib.optionals (stdenv.isDarwin && stdenv.isAarch64) [ + ++ lib.optionals (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isAarch64) [ # concurrent.futures.process.BrokenProcessPool: A process in the process pool terminated abpruptly... "test_foldby_tree_reduction" "test_to_bag" diff --git a/pkgs/development/python-modules/datafusion/default.nix b/pkgs/development/python-modules/datafusion/default.nix index e73d37c4486c..b7c68f839e87 100644 --- a/pkgs/development/python-modules/datafusion/default.nix +++ b/pkgs/development/python-modules/datafusion/default.nix @@ -58,7 +58,7 @@ buildPythonPackage rec { buildInputs = [ protobuf ] - ++ lib.optionals stdenv.isDarwin [ + ++ lib.optionals stdenv.hostPlatform.isDarwin [ libiconv Security SystemConfiguration diff --git a/pkgs/development/python-modules/datalad-gooey/default.nix b/pkgs/development/python-modules/datalad-gooey/default.nix index a84e6c7a2be7..fcc3fa376330 100644 --- a/pkgs/development/python-modules/datalad-gooey/default.nix +++ b/pkgs/development/python-modules/datalad-gooey/default.nix @@ -37,7 +37,7 @@ buildPythonPackage { datalad-next outdated datalad - ] ++ lib.optionals stdenv.isDarwin [ darwin.apple_sdk.frameworks.AppleScriptKit ]; + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.AppleScriptKit ]; pythonRemoveDeps = [ "applescript" ]; diff --git a/pkgs/development/python-modules/datatable/default.nix b/pkgs/development/python-modules/datatable/default.nix index 6a7c80ada33e..1608ec12e8f2 100644 --- a/pkgs/development/python-modules/datatable/default.nix +++ b/pkgs/development/python-modules/datatable/default.nix @@ -53,7 +53,7 @@ buildPythonPackage rec { ]; LLVM = llvm; - env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.isDarwin "-isystem ${lib.getDev libcxx}/include/c++/v1"; + env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.hostPlatform.isDarwin "-isystem ${lib.getDev libcxx}/include/c++/v1"; # test suite is very cpu intensive, only run small subset to ensure package is working as expected pytestFlagsArray = [ "tests/test-sets.py" ]; diff --git a/pkgs/development/python-modules/dbt-extractor/default.nix b/pkgs/development/python-modules/dbt-extractor/default.nix index 2e3eecc5dfcd..89066e5c9c50 100644 --- a/pkgs/development/python-modules/dbt-extractor/default.nix +++ b/pkgs/development/python-modules/dbt-extractor/default.nix @@ -33,7 +33,7 @@ buildPythonPackage rec { rustPlatform.maturinBuildHook ]; - buildInputs = lib.optionals stdenv.isDarwin [ libiconv ]; + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ libiconv ]; # no python tests exist doCheck = false; diff --git a/pkgs/development/python-modules/debugpy/default.nix b/pkgs/development/python-modules/debugpy/default.nix index 18e9acec9b57..3dea1af5b378 100644 --- a/pkgs/development/python-modules/debugpy/default.nix +++ b/pkgs/development/python-modules/debugpy/default.nix @@ -58,14 +58,14 @@ buildPythonPackage rec { # - https://github.com/NixOS/nixpkgs/issues/251045 ./skip-attach-pid-tests.patch ] - ++ lib.optionals stdenv.isLinux [ + ++ lib.optionals stdenv.hostPlatform.isLinux [ # Hard code GDB path (used to attach to process) (substituteAll { src = ./hardcode-gdb.patch; inherit gdb; }) ] - ++ lib.optionals stdenv.isDarwin [ + ++ lib.optionals stdenv.hostPlatform.isDarwin [ # Hard code LLDB path (used to attach to process) (substituteAll { src = ./hardcode-lldb.patch; @@ -119,12 +119,12 @@ buildPythonPackage rec { export DEBUGPY_PROCESS_SPAWN_TIMEOUT=0 export DEBUGPY_PROCESS_EXIT_TIMEOUT=0 '' - + lib.optionalString (stdenv.isDarwin && stdenv.isAarch64) '' + + lib.optionalString (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isAarch64) '' # https://github.com/python/cpython/issues/74570#issuecomment-1093748531 export no_proxy='*'; ''; - postCheck = lib.optionalString (stdenv.isDarwin && stdenv.isAarch64) '' + postCheck = lib.optionalString (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isAarch64) '' unset no_proxy ''; diff --git a/pkgs/development/python-modules/deltalake/default.nix b/pkgs/development/python-modules/deltalake/default.nix index a30d199a2287..e4065fa10b97 100644 --- a/pkgs/development/python-modules/deltalake/default.nix +++ b/pkgs/development/python-modules/deltalake/default.nix @@ -41,7 +41,7 @@ buildPythonPackage rec { buildInputs = [ openssl - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.Security darwin.apple_sdk.frameworks.SystemConfiguration libiconv diff --git a/pkgs/development/python-modules/demesdraw/default.nix b/pkgs/development/python-modules/demesdraw/default.nix index d4fe828315d3..6a3c4d44e99a 100644 --- a/pkgs/development/python-modules/demesdraw/default.nix +++ b/pkgs/development/python-modules/demesdraw/default.nix @@ -41,7 +41,7 @@ buildPythonPackage rec { # This variable is needed to suppress the "Trace/BPT trap: 5" error in Darwin's checkPhase. # Not sure of the details, but we can avoid it by changing the matplotlib backend during testing. - env.MPLBACKEND = lib.optionalString stdenv.isDarwin "Agg"; + env.MPLBACKEND = lib.optionalString stdenv.hostPlatform.isDarwin "Agg"; nativeCheckInputs = [ pytestCheckHook diff --git a/pkgs/development/python-modules/deploykit/default.nix b/pkgs/development/python-modules/deploykit/default.nix index 01183b27a8d7..e2882a7fa7f5 100644 --- a/pkgs/development/python-modules/deploykit/default.nix +++ b/pkgs/development/python-modules/deploykit/default.nix @@ -32,7 +32,7 @@ buildPythonPackage rec { pytestCheckHook ]; - disabledTests = lib.optionals stdenv.isDarwin [ "test_ssh" ]; + disabledTests = lib.optionals stdenv.hostPlatform.isDarwin [ "test_ssh" ]; # don't swallow stdout/stderr pytestFlagsArray = [ "-s" ]; diff --git a/pkgs/development/python-modules/desktop-notifier/default.nix b/pkgs/development/python-modules/desktop-notifier/default.nix index a6260c35ad5f..30c5275edbf9 100644 --- a/pkgs/development/python-modules/desktop-notifier/default.nix +++ b/pkgs/development/python-modules/desktop-notifier/default.nix @@ -32,7 +32,7 @@ buildPythonPackage rec { bidict packaging ] - ++ lib.optionals stdenv.isLinux [ dbus-fast ] + ++ lib.optionals stdenv.hostPlatform.isLinux [ dbus-fast ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ rubicon-objc ]; # no tests available, do the imports check instead diff --git a/pkgs/development/python-modules/detectron2/default.nix b/pkgs/development/python-modules/detectron2/default.nix index 2247b4581a4d..95506510e214 100644 --- a/pkgs/development/python-modules/detectron2/default.nix +++ b/pkgs/development/python-modules/detectron2/default.nix @@ -163,7 +163,7 @@ buildPythonPackage { "test_overlay_instances_no_boxes" "test_get_bounding_box" ] - ++ lib.optionals (stdenv.isLinux && stdenv.isAarch64) [ + ++ lib.optionals (stdenv.hostPlatform.isLinux && stdenv.hostPlatform.isAarch64) [ "test_build_batch_dataloader_inference" "test_build_dataloader_inference" "test_build_iterable_dataloader_inference" diff --git a/pkgs/development/python-modules/devito/default.nix b/pkgs/development/python-modules/devito/default.nix index 95ec86ff5eb3..195c77b97864 100644 --- a/pkgs/development/python-modules/devito/default.nix +++ b/pkgs/development/python-modules/devito/default.nix @@ -100,18 +100,18 @@ buildPythonPackage rec { "test_subdomainset_mpi" "test_subdomains_mpi" ] - ++ lib.optionals (stdenv.isLinux && stdenv.isAarch64) [ + ++ lib.optionals (stdenv.hostPlatform.isLinux && stdenv.hostPlatform.isAarch64) [ # FAILED tests/test_unexpansion.py::Test2Pass::test_v0 - assert False "test_v0" ] - ++ lib.optionals stdenv.isDarwin [ + ++ lib.optionals stdenv.hostPlatform.isDarwin [ # FAILED tests/test_caching.py::TestCaching::test_special_symbols - ValueError: not enough values to unpack (expected 3, got 2) "test_special_symbols" # FAILED tests/test_unexpansion.py::Test2Pass::test_v0 - codepy.CompileError: module compilation failed "test_v0" ] - ++ lib.optionals (stdenv.isDarwin && stdenv.isAarch64) [ + ++ lib.optionals (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isAarch64) [ # Numerical tests "test_lm_fb" "test_lm_ds" @@ -127,7 +127,7 @@ buildPythonPackage rec { "tests/test_dse.py" "tests/test_gradient.py" ] - ++ lib.optionals ((stdenv.isLinux && stdenv.isAarch64) || stdenv.isDarwin) [ "tests/test_dle.py" ]; + ++ lib.optionals ((stdenv.hostPlatform.isLinux && stdenv.hostPlatform.isAarch64) || stdenv.hostPlatform.isDarwin) [ "tests/test_dle.py" ]; pythonImportsCheck = [ "devito" ]; diff --git a/pkgs/development/python-modules/diskcache/default.nix b/pkgs/development/python-modules/diskcache/default.nix index c2a18535a763..8211267f2eb0 100644 --- a/pkgs/development/python-modules/diskcache/default.nix +++ b/pkgs/development/python-modules/diskcache/default.nix @@ -34,7 +34,7 @@ buildPythonPackage rec { ''; # Darwin sandbox causes most tests to fail - doCheck = !stdenv.isDarwin; + doCheck = !stdenv.hostPlatform.isDarwin; disabledTests = [ # Very time sensitive, can fail on over subscribed machines diff --git a/pkgs/development/python-modules/django-postgresql-netfields/default.nix b/pkgs/development/python-modules/django-postgresql-netfields/default.nix index d3fb086fc417..cf9685e0b2ac 100644 --- a/pkgs/development/python-modules/django-postgresql-netfields/default.nix +++ b/pkgs/development/python-modules/django-postgresql-netfields/default.nix @@ -36,7 +36,7 @@ buildPythonPackage rec { six ]; - doCheck = !stdenv.isDarwin; # could not create shared memory segment: Operation not permitted + doCheck = !stdenv.hostPlatform.isDarwin; # could not create shared memory segment: Operation not permitted nativeCheckInputs = [ djangorestframework diff --git a/pkgs/development/python-modules/django-q/default.nix b/pkgs/development/python-modules/django-q/default.nix index 99b8aec53a36..0cc7ea246e8c 100644 --- a/pkgs/development/python-modules/django-q/default.nix +++ b/pkgs/development/python-modules/django-q/default.nix @@ -76,7 +76,7 @@ buildPythonPackage rec { "test_mongo" ]; - doCheck = !stdenv.isDarwin; + doCheck = !stdenv.hostPlatform.isDarwin; meta = with lib; { description = "Multiprocessing distributed task queue for Django"; diff --git a/pkgs/development/python-modules/django/4.nix b/pkgs/development/python-modules/django/4.nix index 99d71f2b38b1..2d7bb6ce9dde 100644 --- a/pkgs/development/python-modules/django/4.nix +++ b/pkgs/development/python-modules/django/4.nix @@ -118,7 +118,7 @@ buildPythonPackage rec { tzdata ] ++ lib.flatten (lib.attrValues passthru.optional-dependencies); - doCheck = !stdenv.isDarwin; + doCheck = !stdenv.hostPlatform.isDarwin; preCheck = '' # make sure the installed library gets imported diff --git a/pkgs/development/python-modules/django/5.nix b/pkgs/development/python-modules/django/5.nix index dd124f49e152..6cf85445c402 100644 --- a/pkgs/development/python-modules/django/5.nix +++ b/pkgs/development/python-modules/django/5.nix @@ -114,7 +114,7 @@ buildPythonPackage rec { tzdata ] ++ lib.flatten (lib.attrValues optional-dependencies); - doCheck = !stdenv.isDarwin; + doCheck = !stdenv.hostPlatform.isDarwin; preCheck = '' # make sure the installed library gets imported diff --git a/pkgs/development/python-modules/dlinfo/default.nix b/pkgs/development/python-modules/dlinfo/default.nix index bb9c849592dd..1b774b8e85c0 100644 --- a/pkgs/development/python-modules/dlinfo/default.nix +++ b/pkgs/development/python-modules/dlinfo/default.nix @@ -29,6 +29,6 @@ buildPythonPackage rec { homepage = "https://github.com/cloudflightio/python-dlinfo"; license = lib.licenses.mit; maintainers = with lib.maintainers; [ dotlambda ]; - broken = stdenv.isDarwin; + broken = stdenv.hostPlatform.isDarwin; }; } diff --git a/pkgs/development/python-modules/dm-tree/default.nix b/pkgs/development/python-modules/dm-tree/default.nix index 6062d202a3ce..909cd3aa523a 100644 --- a/pkgs/development/python-modules/dm-tree/default.nix +++ b/pkgs/development/python-modules/dm-tree/default.nix @@ -48,7 +48,7 @@ buildPythonPackage rec { patches = [ patchCMakeAbseil patchCMakePybind - ] ++ (lib.optional stdenv.isDarwin ./0003-don-t-configure-apple.patch); + ] ++ (lib.optional stdenv.hostPlatform.isDarwin ./0003-don-t-configure-apple.patch); dontUseCmakeConfigure = true; diff --git a/pkgs/development/python-modules/docker/default.nix b/pkgs/development/python-modules/docker/default.nix index 7a36c27e8e22..59ab52857824 100644 --- a/pkgs/development/python-modules/docker/default.nix +++ b/pkgs/development/python-modules/docker/default.nix @@ -62,7 +62,7 @@ buildPythonPackage rec { pytestFlagsArray = [ "tests/unit" ]; # Deselect socket tests on Darwin because it hits the path length limit for a Unix domain socket - disabledTests = lib.optionals stdenv.isDarwin [ + disabledTests = lib.optionals stdenv.hostPlatform.isDarwin [ "api_test" "stream_response" "socket_file" diff --git a/pkgs/development/python-modules/docutils/default.nix b/pkgs/development/python-modules/docutils/default.nix index cdfb53572213..695d351f03ca 100644 --- a/pkgs/development/python-modules/docutils/default.nix +++ b/pkgs/development/python-modules/docutils/default.nix @@ -37,7 +37,7 @@ let # Only Darwin needs LANG, but we could set it in general. # It's done here conditionally to prevent mass-rebuilds. checkPhase = - lib.optionalString stdenv.isDarwin ''LANG="en_US.UTF-8" LC_ALL="en_US.UTF-8" '' + lib.optionalString stdenv.hostPlatform.isDarwin ''LANG="en_US.UTF-8" LC_ALL="en_US.UTF-8" '' + '' ${python.interpreter} test/alltests.py ''; diff --git a/pkgs/development/python-modules/doit/default.nix b/pkgs/development/python-modules/doit/default.nix index 4b49ba50fe47..5840b71b18f7 100644 --- a/pkgs/development/python-modules/doit/default.nix +++ b/pkgs/development/python-modules/doit/default.nix @@ -34,7 +34,7 @@ let cloudpickle importlib-metadata toml - ] ++ lib.optional stdenv.isLinux pyinotify ++ lib.optional stdenv.isDarwin macfsevents; + ] ++ lib.optional stdenv.hostPlatform.isLinux pyinotify ++ lib.optional stdenv.hostPlatform.isDarwin macfsevents; nativeCheckInputs = [ configclass @@ -51,7 +51,7 @@ let passthru.tests = { # hangs on darwin check = doit.overridePythonAttrs (_: { - doCheck = !stdenv.isDarwin; + doCheck = !stdenv.hostPlatform.isDarwin; }); }; diff --git a/pkgs/development/python-modules/dramatiq/default.nix b/pkgs/development/python-modules/dramatiq/default.nix index b44873e99f9a..9eec4bba08fb 100644 --- a/pkgs/development/python-modules/dramatiq/default.nix +++ b/pkgs/development/python-modules/dramatiq/default.nix @@ -88,7 +88,7 @@ buildPythonPackage rec { "test_rabbitmq_process_10k_fib_with_cli" "test_rabbitmq_process_1k_latency_with_cli" ] - ++ lib.optionals stdenv.isDarwin [ + ++ lib.optionals stdenv.hostPlatform.isDarwin [ # Takes too long for darwin ofborg "test_retry_exceptions_can_specify_a_delay" ]; diff --git a/pkgs/development/python-modules/dtschema/default.nix b/pkgs/development/python-modules/dtschema/default.nix index d4875e0da8aa..2dffd2d5bc95 100644 --- a/pkgs/development/python-modules/dtschema/default.nix +++ b/pkgs/development/python-modules/dtschema/default.nix @@ -56,7 +56,7 @@ buildPythonPackage rec { broken = ( # Library not loaded: @rpath/libfdt.1.dylib - stdenv.isDarwin + stdenv.hostPlatform.isDarwin || # see https://github.com/devicetree-org/dt-schema/issues/108 diff --git a/pkgs/development/python-modules/duckdb/default.nix b/pkgs/development/python-modules/duckdb/default.nix index 132f72d70ee5..77b348e271f0 100644 --- a/pkgs/development/python-modules/duckdb/default.nix +++ b/pkgs/development/python-modules/duckdb/default.nix @@ -63,7 +63,7 @@ buildPythonPackage rec { ]; # test flags from .github/workflows/Python.yml - pytestFlagsArray = [ "--verbose" ] ++ lib.optionals stdenv.isDarwin [ "tests/fast" ]; + pytestFlagsArray = [ "--verbose" ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ "tests/fast" ]; disabledTestPaths = [ # avoid dependency on mypy diff --git a/pkgs/development/python-modules/dulwich/default.nix b/pkgs/development/python-modules/dulwich/default.nix index 0618a1b2aaea..e4b3663dda90 100644 --- a/pkgs/development/python-modules/dulwich/default.nix +++ b/pkgs/development/python-modules/dulwich/default.nix @@ -81,7 +81,7 @@ buildPythonPackage rec { rm tests/compat/test_pack.py ''; - doCheck = !stdenv.isDarwin; + doCheck = !stdenv.hostPlatform.isDarwin; pythonImportsCheck = [ "dulwich" ]; diff --git a/pkgs/development/python-modules/dvc-render/default.nix b/pkgs/development/python-modules/dvc-render/default.nix index 2cab268fecf6..f4df5623013d 100644 --- a/pkgs/development/python-modules/dvc-render/default.nix +++ b/pkgs/development/python-modules/dvc-render/default.nix @@ -48,7 +48,7 @@ buildPythonPackage rec { pytest-test-utils ] ++ passthru.optional-dependencies.table ++ passthru.optional-dependencies.markdown; - disabledTestPaths = lib.optionals stdenv.isDarwin [ "tests/test_vega.py" ]; + disabledTestPaths = lib.optionals stdenv.hostPlatform.isDarwin [ "tests/test_vega.py" ]; pythonImportsCheck = [ "dvc_render" ]; diff --git a/pkgs/development/python-modules/e3-core/default.nix b/pkgs/development/python-modules/e3-core/default.nix index 6b2f8ad763af..a6538d67eb25 100644 --- a/pkgs/development/python-modules/e3-core/default.nix +++ b/pkgs/development/python-modules/e3-core/default.nix @@ -49,7 +49,7 @@ buildPythonPackage rec { tqdm stevedore ] - ++ lib.optional stdenv.isLinux [ + ++ lib.optional stdenv.hostPlatform.isLinux [ # See setup.py:24. These are required only on Linux. Darwin has its own set # of requirements. psutil diff --git a/pkgs/development/python-modules/elastic-apm/default.nix b/pkgs/development/python-modules/elastic-apm/default.nix index 6fb1abd35fdb..fb27b98608dd 100644 --- a/pkgs/development/python-modules/elastic-apm/default.nix +++ b/pkgs/development/python-modules/elastic-apm/default.nix @@ -85,7 +85,7 @@ buildPythonPackage rec { # Exclude tornado tests "tests/contrib/asyncio/tornado/tornado_tests.py" ] - ++ lib.optionals stdenv.isDarwin [ + ++ lib.optionals stdenv.hostPlatform.isDarwin [ # Flaky tests on Darwin "tests/utils/threading_tests.py" ]; diff --git a/pkgs/development/python-modules/eliot/default.nix b/pkgs/development/python-modules/eliot/default.nix index e5f447b233c6..04cb574509c2 100644 --- a/pkgs/development/python-modules/eliot/default.nix +++ b/pkgs/development/python-modules/eliot/default.nix @@ -54,7 +54,7 @@ buildPythonPackage rec { pytestCheckHook testtools twisted - ] ++ lib.optionals stdenv.isLinux [ daemontools ]; + ] ++ lib.optionals stdenv.hostPlatform.isLinux [ daemontools ]; __darwinAllowLocalNetworking = true; diff --git a/pkgs/development/python-modules/embrace/default.nix b/pkgs/development/python-modules/embrace/default.nix index 7572e77728b2..4ad658d7736c 100644 --- a/pkgs/development/python-modules/embrace/default.nix +++ b/pkgs/development/python-modules/embrace/default.nix @@ -35,7 +35,7 @@ buildPythonPackage rec { # Some test for hot-reload fails on Darwin, but the rest of the library # should remain usable. (https://todo.sr.ht/~olly/embrace-sql/4) - doCheck = !stdenv.isDarwin; + doCheck = !stdenv.hostPlatform.isDarwin; meta = with lib; { description = "Embrace SQL keeps your SQL queries in SQL files"; diff --git a/pkgs/development/python-modules/enlighten/default.nix b/pkgs/development/python-modules/enlighten/default.nix index 826e9fbe7805..ca0916c610a4 100644 --- a/pkgs/development/python-modules/enlighten/default.nix +++ b/pkgs/development/python-modules/enlighten/default.nix @@ -38,7 +38,7 @@ buildPythonPackage rec { "test_floats_prefixed" "test_subcounter_prefixed" ] - ++ lib.optionals stdenv.isDarwin [ + ++ lib.optionals stdenv.hostPlatform.isDarwin [ # https://github.com/Rockhopper-Technologies/enlighten/issues/44 "test_autorefresh" ]; diff --git a/pkgs/development/python-modules/ephemeral-port-reserve/default.nix b/pkgs/development/python-modules/ephemeral-port-reserve/default.nix index 2a7e328f978b..d582c5cfc37c 100644 --- a/pkgs/development/python-modules/ephemeral-port-reserve/default.nix +++ b/pkgs/development/python-modules/ephemeral-port-reserve/default.nix @@ -23,7 +23,7 @@ buildPythonPackage { nativeCheckInputs = [ pytestCheckHook ]; - disabledTests = lib.optionals stdenv.isDarwin [ + disabledTests = lib.optionals stdenv.hostPlatform.isDarwin [ # can't find hostname in our darwin build environment "test_fqdn" ]; diff --git a/pkgs/development/python-modules/etebase/default.nix b/pkgs/development/python-modules/etebase/default.nix index 18d5488bee36..5157aa329dcd 100644 --- a/pkgs/development/python-modules/etebase/default.nix +++ b/pkgs/development/python-modules/etebase/default.nix @@ -59,7 +59,7 @@ buildPythonPackage rec { rustc ]; - buildInputs = [ openssl ] ++ lib.optionals stdenv.isDarwin [ Security ]; + buildInputs = [ openssl ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ Security ]; propagatedBuildInputs = [ msgpack ]; @@ -76,7 +76,7 @@ buildPythonPackage rec { }; meta = with lib; { - broken = stdenv.isDarwin; + broken = stdenv.hostPlatform.isDarwin; homepage = "https://www.etebase.com/"; description = "Python client library for Etebase"; license = licenses.bsd3; diff --git a/pkgs/development/python-modules/eventlet/default.nix b/pkgs/development/python-modules/eventlet/default.nix index 5fa638ddddd5..24f9ef57ed68 100644 --- a/pkgs/development/python-modules/eventlet/default.nix +++ b/pkgs/development/python-modules/eventlet/default.nix @@ -47,7 +47,7 @@ buildPythonPackage rec { # libredirect is not available on darwin # tests hang on pypy indefinitely - doCheck = !stdenv.isDarwin && !isPyPy; + doCheck = !stdenv.hostPlatform.isDarwin && !isPyPy; preCheck = lib.optionalString doCheck '' echo "nameserver 127.0.0.1" > resolv.conf diff --git a/pkgs/development/python-modules/evtx/default.nix b/pkgs/development/python-modules/evtx/default.nix index d0d8f753ea69..a31b963462a3 100644 --- a/pkgs/development/python-modules/evtx/default.nix +++ b/pkgs/development/python-modules/evtx/default.nix @@ -34,7 +34,7 @@ buildPythonPackage rec { maturinBuildHook ]; - buildInputs = lib.optionals stdenv.isDarwin [ libiconv ]; + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ libiconv ]; nativeCheckInputs = [ pytestCheckHook ]; diff --git a/pkgs/development/python-modules/fastdiff/default.nix b/pkgs/development/python-modules/fastdiff/default.nix index 1096add5b627..4b906c6d6c1d 100644 --- a/pkgs/development/python-modules/fastdiff/default.nix +++ b/pkgs/development/python-modules/fastdiff/default.nix @@ -48,6 +48,6 @@ buildPythonPackage rec { license = licenses.mit; maintainers = [ ]; # resulting compiled object panics at import - broken = stdenv.is32bit; + broken = stdenv.hostPlatform.is32bit; }; } diff --git a/pkgs/development/python-modules/fastjsonschema/default.nix b/pkgs/development/python-modules/fastjsonschema/default.nix index e3f69aad972c..4b518e5f8ef1 100644 --- a/pkgs/development/python-modules/fastjsonschema/default.nix +++ b/pkgs/development/python-modules/fastjsonschema/default.nix @@ -42,7 +42,7 @@ buildPythonPackage rec { "remote ref" "definitions" ] - ++ lib.optionals stdenv.isDarwin [ + ++ lib.optionals stdenv.hostPlatform.isDarwin [ "test_compile_to_code_custom_format" # cannot import temporary module created during test ]; diff --git a/pkgs/development/python-modules/fasttext-predict/default.nix b/pkgs/development/python-modules/fasttext-predict/default.nix index 6bfddc120c6f..bdd19640609e 100644 --- a/pkgs/development/python-modules/fasttext-predict/default.nix +++ b/pkgs/development/python-modules/fasttext-predict/default.nix @@ -16,7 +16,7 @@ buildPythonPackage rec { hash = "sha256-rMbf09pCHvVYI9g/aq74+PcsuU2LezpmDz4b/w9vRyc="; }; - postPatch = lib.optionalString stdenv.isDarwin '' + postPatch = lib.optionalString stdenv.hostPlatform.isDarwin '' substituteInPlace setup.py \ --replace-fail "-flto" "" ''; diff --git a/pkgs/development/python-modules/ffcv/default.nix b/pkgs/development/python-modules/ffcv/default.nix index 344c7257024a..447dbb8e0f24 100644 --- a/pkgs/development/python-modules/ffcv/default.nix +++ b/pkgs/development/python-modules/ffcv/default.nix @@ -111,6 +111,6 @@ buildPythonPackage rec { ]; # OSError: dlopen(libc.so.6, 0x0006): tried: '/usr/lib/libc.so.6' (no such file, not in dyld cache), # 'libc.so.6' (no such file), '/usr/local/lib/libc.so.6' (no such file), '/usr/lib/libc.so.6' (no such file, not in dyld cache) - broken = stdenv.isDarwin; + broken = stdenv.hostPlatform.isDarwin; }; } diff --git a/pkgs/development/python-modules/ffmpy/default.nix b/pkgs/development/python-modules/ffmpy/default.nix index 00a8a73aadad..ec639f9ef821 100644 --- a/pkgs/development/python-modules/ffmpy/default.nix +++ b/pkgs/development/python-modules/ffmpy/default.nix @@ -46,7 +46,7 @@ buildPythonPackage rec { go ]; - disabledTests = lib.optionals stdenv.isDarwin [ + disabledTests = lib.optionals stdenv.hostPlatform.isDarwin [ # expects a FFExecutableNotFoundError, gets a NotADirectoryError raised by os "test_invalid_executable_path" ]; diff --git a/pkgs/development/python-modules/finetuning-scheduler/default.nix b/pkgs/development/python-modules/finetuning-scheduler/default.nix index 7d9cf816c7ba..808c8e1ab696 100644 --- a/pkgs/development/python-modules/finetuning-scheduler/default.nix +++ b/pkgs/development/python-modules/finetuning-scheduler/default.nix @@ -44,7 +44,7 @@ buildPythonPackage rec { "test_fts_dynamo_resume" "test_fts_dynamo_intrafit" ] - ++ lib.optionals (stdenv.isAarch64 && stdenv.isLinux) [ + ++ lib.optionals (stdenv.hostPlatform.isAarch64 && stdenv.hostPlatform.isLinux) [ # slightly exceeds numerical tolerance on aarch64-linux: "test_fts_frozen_bn_track_running_stats" ]; @@ -58,6 +58,6 @@ buildPythonPackage rec { license = lib.licenses.asl20; maintainers = with lib.maintainers; [ bcdarwin ]; # "No module named 'torch._C._distributed_c10d'; 'torch._C' is not a package" at import time: - broken = stdenv.isDarwin; + broken = stdenv.hostPlatform.isDarwin; }; } diff --git a/pkgs/development/python-modules/fipy/default.nix b/pkgs/development/python-modules/fipy/default.nix index 17f148f39f7c..2be37738ebb1 100644 --- a/pkgs/development/python-modules/fipy/default.nix +++ b/pkgs/development/python-modules/fipy/default.nix @@ -45,9 +45,9 @@ buildPythonPackage rec { future scikit-fmm openssh - ] ++ lib.optionals (!stdenv.isDarwin) [ gmsh ]; + ] ++ lib.optionals (!stdenv.hostPlatform.isDarwin) [ gmsh ]; - nativeCheckInputs = lib.optionals (!stdenv.isDarwin) [ gmsh ]; + nativeCheckInputs = lib.optionals (!stdenv.hostPlatform.isDarwin) [ gmsh ]; # NOTE: Two of the doctests in fipy.matrices.scipyMatrix._ScipyMatrix.CSR fail, and there is no # clean way to disable them. diff --git a/pkgs/development/python-modules/flask-caching/default.nix b/pkgs/development/python-modules/flask-caching/default.nix index 0f733a1b9a38..29e997acdf9a 100644 --- a/pkgs/development/python-modules/flask-caching/default.nix +++ b/pkgs/development/python-modules/flask-caching/default.nix @@ -49,7 +49,7 @@ buildPythonPackage rec { "Redis" "Memcache" ] - ++ lib.optionals stdenv.isDarwin [ + ++ lib.optionals stdenv.hostPlatform.isDarwin [ # ignore flaky test "test_cache_timeout_dynamic" "test_cached_view_class" diff --git a/pkgs/development/python-modules/flask-restx/default.nix b/pkgs/development/python-modules/flask-restx/default.nix index 55f41f6f7737..85f0218fd91b 100644 --- a/pkgs/development/python-modules/flask-restx/default.nix +++ b/pkgs/development/python-modules/flask-restx/default.nix @@ -65,7 +65,7 @@ buildPythonPackage rec { "--deselect=tests/test_inputs.py::EmailTest::test_valid_value_check" "--deselect=tests/test_logging.py::LoggingTest::test_override_app_level" ] - ++ lib.optionals stdenv.isDarwin [ + ++ lib.optionals stdenv.hostPlatform.isDarwin [ "--deselect=tests/test_inputs.py::EmailTest::test_invalid_values_check" ]; diff --git a/pkgs/development/python-modules/flask-testing/default.nix b/pkgs/development/python-modules/flask-testing/default.nix index 6574dcf1613e..07d410fa1b17 100644 --- a/pkgs/development/python-modules/flask-testing/default.nix +++ b/pkgs/development/python-modules/flask-testing/default.nix @@ -30,7 +30,7 @@ buildPythonPackage rec { ]; # Some of the tests use localhost networking on darwin - doCheck = !stdenv.isDarwin; + doCheck = !stdenv.hostPlatform.isDarwin; disabledTests = [ # RuntimeError and NotImplementedError diff --git a/pkgs/development/python-modules/fonttools/default.nix b/pkgs/development/python-modules/fonttools/default.nix index c57065ec64fb..6898f34cb133 100644 --- a/pkgs/development/python-modules/fonttools/default.nix +++ b/pkgs/development/python-modules/fonttools/default.nix @@ -61,7 +61,7 @@ buildPythonPackage rec { ]; plot = [ matplotlib ]; symfont = [ sympy ]; - type1 = lib.optional stdenv.isDarwin xattr; + type1 = lib.optional stdenv.hostPlatform.isDarwin xattr; pathops = [ skia-pathops ]; repacker = [ uharfbuzz ]; }; diff --git a/pkgs/development/python-modules/foxdot/default.nix b/pkgs/development/python-modules/foxdot/default.nix index af7edb24ae95..f9faef8be2bd 100644 --- a/pkgs/development/python-modules/foxdot/default.nix +++ b/pkgs/development/python-modules/foxdot/default.nix @@ -21,7 +21,7 @@ buildPythonPackage rec { [ tkinter ] # we currently build SuperCollider only on Linux # but FoxDot is totally usable on macOS with the official SuperCollider binary - ++ lib.optionals stdenv.isLinux [ supercollider ]; + ++ lib.optionals stdenv.hostPlatform.isLinux [ supercollider ]; # Requires a running SuperCollider instance doCheck = false; diff --git a/pkgs/development/python-modules/freud/default.nix b/pkgs/development/python-modules/freud/default.nix index a681bd1f14b1..9fa555e28170 100644 --- a/pkgs/development/python-modules/freud/default.nix +++ b/pkgs/development/python-modules/freud/default.nix @@ -80,7 +80,7 @@ buildPythonPackage rec { matplotlib sympy ]; - disabledTests = lib.optionals stdenv.isAarch64 [ + disabledTests = lib.optionals stdenv.hostPlatform.isAarch64 [ # https://github.com/glotzerlab/freud/issues/961 "test_docstring" ]; diff --git a/pkgs/development/python-modules/frida-python/default.nix b/pkgs/development/python-modules/frida-python/default.nix index d73e5645e517..8bef789110cf 100644 --- a/pkgs/development/python-modules/frida-python/default.nix +++ b/pkgs/development/python-modules/frida-python/default.nix @@ -47,7 +47,7 @@ buildPythonPackage rec { propagatedBuildInputs = [ typing-extensions ]; - buildInputs = lib.optionals stdenv.isDarwin [ + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.AppKit ]; diff --git a/pkgs/development/python-modules/fs/default.nix b/pkgs/development/python-modules/fs/default.nix index 5941243645ef..e0c07195df49 100644 --- a/pkgs/development/python-modules/fs/default.nix +++ b/pkgs/development/python-modules/fs/default.nix @@ -62,7 +62,7 @@ buildPythonPackage rec { disabledTests = [ "user_data_repr" ] - ++ lib.optionals (stdenv.isDarwin) [ + ++ lib.optionals (stdenv.hostPlatform.isDarwin) [ # remove if https://github.com/PyFilesystem/pyfilesystem2/issues/430#issue-707878112 resolved "test_ftpfs" ] diff --git a/pkgs/development/python-modules/fsspec/default.nix b/pkgs/development/python-modules/fsspec/default.nix index e423f32d799e..832920986a39 100644 --- a/pkgs/development/python-modules/fsspec/default.nix +++ b/pkgs/development/python-modules/fsspec/default.nix @@ -110,7 +110,7 @@ buildPythonPackage rec { "test_urlpath_inference_errors" "test_mismatch" ] - ++ lib.optionals (stdenv.isDarwin) [ + ++ lib.optionals (stdenv.hostPlatform.isDarwin) [ # works locally on APFS, fails on hydra with AssertionError comparing timestamps # darwin hydra builder uses HFS+ and has only one second timestamp resolution # this two tests however, assume nanosecond resolution diff --git a/pkgs/development/python-modules/funsor/default.nix b/pkgs/development/python-modules/funsor/default.nix index 6afeeb9e4cda..dda85f2c798d 100644 --- a/pkgs/development/python-modules/funsor/default.nix +++ b/pkgs/development/python-modules/funsor/default.nix @@ -81,7 +81,7 @@ buildPythonPackage rec { # TODO: Try to re-enable this test at next release "test_torch_save" ] - ++ lib.optionals stdenv.isDarwin [ + ++ lib.optionals stdenv.hostPlatform.isDarwin [ # Failures related to JIT # RuntimeError: required keyword attribute 'Subgraph' has the wrong type "test_local_param_ok" diff --git a/pkgs/development/python-modules/fuse-python/default.nix b/pkgs/development/python-modules/fuse-python/default.nix index ddd6d394cd0c..35eab496d91b 100644 --- a/pkgs/development/python-modules/fuse-python/default.nix +++ b/pkgs/development/python-modules/fuse-python/default.nix @@ -26,7 +26,7 @@ buildPythonPackage rec { pythonImportsCheck = [ "fuse" ]; meta = with lib; { - broken = stdenv.isDarwin; + broken = stdenv.hostPlatform.isDarwin; description = "Python bindings for FUSE"; homepage = "https://github.com/libfuse/python-fuse"; license = licenses.lgpl21; diff --git a/pkgs/development/python-modules/fusepy/default.nix b/pkgs/development/python-modules/fusepy/default.nix index 35718a54d635..6e33666d6951 100644 --- a/pkgs/development/python-modules/fusepy/default.nix +++ b/pkgs/development/python-modules/fusepy/default.nix @@ -23,7 +23,7 @@ buildPythonPackage rec { # On macOS, users are expected to install macFUSE. This means fusepy should # be able to find libfuse in /usr/local/lib. - patchPhase = lib.optionalString (!stdenv.isDarwin) '' + patchPhase = lib.optionalString (!stdenv.hostPlatform.isDarwin) '' substituteInPlace fuse.py --replace \ "find_library('fuse')" "'${pkgs.fuse}/lib/libfuse.so'" ''; diff --git a/pkgs/development/python-modules/gb-io/default.nix b/pkgs/development/python-modules/gb-io/default.nix index 72504c986d2e..233d12f3eac6 100644 --- a/pkgs/development/python-modules/gb-io/default.nix +++ b/pkgs/development/python-modules/gb-io/default.nix @@ -42,7 +42,7 @@ buildPythonPackage rec { pythonImportsCheck = [ "gb_io" ]; meta = with lib; { - broken = stdenv.isDarwin; + broken = stdenv.hostPlatform.isDarwin; homepage = "https://github.com/althonos/gb-io.py"; description = "Python interface to gb-io, a fast GenBank parser written in Rust"; license = licenses.mit; diff --git a/pkgs/development/python-modules/gbulb/default.nix b/pkgs/development/python-modules/gbulb/default.nix index 8c4252e49029..7dd4d3a2c126 100644 --- a/pkgs/development/python-modules/gbulb/default.nix +++ b/pkgs/development/python-modules/gbulb/default.nix @@ -45,7 +45,7 @@ buildPythonPackage rec { pythonImportsCheck = [ "gbulb" ]; meta = with lib; { - broken = stdenv.isDarwin; + broken = stdenv.hostPlatform.isDarwin; description = "GLib implementation of PEP 3156"; homepage = "https://github.com/beeware/gbulb"; license = licenses.asl20; diff --git a/pkgs/development/python-modules/geopandas/default.nix b/pkgs/development/python-modules/geopandas/default.nix index e8e78f80acc6..6d24ef442e16 100644 --- a/pkgs/development/python-modules/geopandas/default.nix +++ b/pkgs/development/python-modules/geopandas/default.nix @@ -44,7 +44,7 @@ buildPythonPackage rec { rtree ]; - doCheck = !stdenv.isDarwin; + doCheck = !stdenv.hostPlatform.isDarwin; preCheck = '' export HOME=$(mktemp -d); diff --git a/pkgs/development/python-modules/geventhttpclient/default.nix b/pkgs/development/python-modules/geventhttpclient/default.nix index 230d8f300e29..3e9c51c7dcd1 100644 --- a/pkgs/development/python-modules/geventhttpclient/default.nix +++ b/pkgs/development/python-modules/geventhttpclient/default.nix @@ -44,7 +44,7 @@ buildPythonPackage rec { ]; # lots of: [Errno 48] Address already in use: ('127.0.0.1', 54323) - doCheck = !stdenv.isDarwin; + doCheck = !stdenv.hostPlatform.isDarwin; __darwinAllowLocalNetworking = true; diff --git a/pkgs/development/python-modules/glean-sdk/default.nix b/pkgs/development/python-modules/glean-sdk/default.nix index 5dea3e473665..11b7157f4b12 100644 --- a/pkgs/development/python-modules/glean-sdk/default.nix +++ b/pkgs/development/python-modules/glean-sdk/default.nix @@ -58,7 +58,7 @@ buildPythonPackage rec { pythonImportsCheck = [ "glean" ]; meta = { - broken = stdenv.isDarwin; + broken = stdenv.hostPlatform.isDarwin; description = "Telemetry client libraries and are a part of the Glean project"; homepage = "https://mozilla.github.io/glean/book/index.html"; license = lib.licenses.mpl20; diff --git a/pkgs/development/python-modules/glymur/default.nix b/pkgs/development/python-modules/glymur/default.nix index f54ccc14df0c..b9a37779603c 100644 --- a/pkgs/development/python-modules/glymur/default.nix +++ b/pkgs/development/python-modules/glymur/default.nix @@ -37,12 +37,12 @@ buildPythonPackage rec { }) ]; - postPatch = lib.optionalString (!stdenv.isDarwin) '' + postPatch = lib.optionalString (!stdenv.hostPlatform.isDarwin) '' substituteInPlace glymur/lib/tiff.py \ --replace-fail "glymur_config('c')" "ctypes.CDLL('${lib.getLib glibc}/lib/libc.so.6')" ''; - __propagatedImpureHostDeps = lib.optional stdenv.isDarwin "/usr/lib/libc.dylib"; + __propagatedImpureHostDeps = lib.optional stdenv.hostPlatform.isDarwin "/usr/lib/libc.dylib"; build-system = [ setuptools ]; diff --git a/pkgs/development/python-modules/gmpy2/default.nix b/pkgs/development/python-modules/gmpy2/default.nix index 58f4cc08f672..713cb42faef8 100644 --- a/pkgs/development/python-modules/gmpy2/default.nix +++ b/pkgs/development/python-modules/gmpy2/default.nix @@ -52,12 +52,12 @@ buildPythonPackage rec { ]; disabledTests = - lib.optionals (stdenv.isLinux && stdenv.isAarch64) [ + lib.optionals (stdenv.hostPlatform.isLinux && stdenv.hostPlatform.isAarch64) [ # issue with some overflow logic "test_mpz_to_bytes" "test_mpz_from_bytes" ] - ++ lib.optionals stdenv.isDarwin [ + ++ lib.optionals stdenv.hostPlatform.isDarwin [ # TypeError: mpq() requires numeric or string argument # not sure why it only fails on Darwin "test_mpq_from_Decimal" diff --git a/pkgs/development/python-modules/google-auth-oauthlib/default.nix b/pkgs/development/python-modules/google-auth-oauthlib/default.nix index 3f1b3a06d0d4..2d4e0bed73ac 100644 --- a/pkgs/development/python-modules/google-auth-oauthlib/default.nix +++ b/pkgs/development/python-modules/google-auth-oauthlib/default.nix @@ -46,7 +46,7 @@ buildPythonPackage rec { # Flaky test. See https://github.com/NixOS/nixpkgs/issues/288424#issuecomment-1941609973. "test_run_local_server_occupied_port" ] - ++ lib.optionals stdenv.isDarwin [ + ++ lib.optionals stdenv.hostPlatform.isDarwin [ # This test fails if the hostname is not associated with an IP (e.g., in `/etc/hosts`). "test_run_local_server_bind_addr" ]; diff --git a/pkgs/development/python-modules/google-auth/default.nix b/pkgs/development/python-modules/google-auth/default.nix index 5556429082f1..30ea8208ff8e 100644 --- a/pkgs/development/python-modules/google-auth/default.nix +++ b/pkgs/development/python-modules/google-auth/default.nix @@ -84,7 +84,7 @@ buildPythonPackage rec { "google.oauth2" ]; - disabledTestPaths = lib.optionals (stdenv.isDarwin && stdenv.isAarch64) [ + disabledTestPaths = lib.optionals (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isAarch64) [ # Disable tests using pyOpenSSL as it does not build on M1 Macs "tests/transport/test__mtls_helper.py" "tests/transport/test_requests.py" diff --git a/pkgs/development/python-modules/gpy/default.nix b/pkgs/development/python-modules/gpy/default.nix index f0a7efc0005f..9bca05da8e5a 100644 --- a/pkgs/development/python-modules/gpy/default.nix +++ b/pkgs/development/python-modules/gpy/default.nix @@ -51,7 +51,7 @@ buildPythonPackage rec { done ''; - disabledTests = lib.optionals (stdenv.isDarwin && stdenv.hostPlatform.isx86_64) [ + disabledTests = lib.optionals (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isx86_64) [ # Rounding difference break comparison "TestGradientMultiOutputGPModel" ]; diff --git a/pkgs/development/python-modules/gradio/client.nix b/pkgs/development/python-modules/gradio/client.nix index 327a242a6a21..d07f962b2668 100644 --- a/pkgs/development/python-modules/gradio/client.nix +++ b/pkgs/development/python-modules/gradio/client.nix @@ -92,7 +92,7 @@ buildPythonPackage rec { #"-x" "-W" "ignore" # uncomment for debugging help ]; - disabledTests = lib.optionals stdenv.isDarwin [ + disabledTests = lib.optionals stdenv.hostPlatform.isDarwin [ # flaky: OSError: Cannot find empty port in range: 7860-7959 "test_layout_components_in_output" "test_layout_and_state_components_in_output" diff --git a/pkgs/development/python-modules/gradio/default.nix b/pkgs/development/python-modules/gradio/default.nix index f805f52cb106..68d0da3d5660 100644 --- a/pkgs/development/python-modules/gradio/default.nix +++ b/pkgs/development/python-modules/gradio/default.nix @@ -160,7 +160,7 @@ buildPythonPackage rec { export HOME=$TMPDIR cat ${./conftest-skip-network-errors.py} >> test/conftest.py '' - + lib.optionalString stdenv.isDarwin '' + + lib.optionalString stdenv.hostPlatform.isDarwin '' # OSError: [Errno 24] Too many open files ulimit -n 4096 ''; @@ -195,7 +195,7 @@ buildPythonPackage rec { # tests if pip and other tools are installed "test_get_executable_path" - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ # flaky on darwin (depend on port availability) "test_all_status_messages" "test_async_generators" diff --git a/pkgs/development/python-modules/graphene-django/default.nix b/pkgs/development/python-modules/graphene-django/default.nix index 254b2ae16a53..2ebc4dbfe9a2 100644 --- a/pkgs/development/python-modules/graphene-django/default.nix +++ b/pkgs/development/python-modules/graphene-django/default.nix @@ -69,7 +69,7 @@ buildPythonPackage rec { "test_should_multiplechoicefield_convert_to_list_of_enum" "test_perform_mutate_success_with_enum_choice_field" ] - ++ lib.optionals stdenv.isDarwin [ + ++ lib.optionals stdenv.hostPlatform.isDarwin [ # this test touches files in the "/" directory and fails in darwin sandbox "test_should_filepath_convert_string" ]; diff --git a/pkgs/development/python-modules/graphviz/default.nix b/pkgs/development/python-modules/graphviz/default.nix index 2bf0cfe01c11..7ce60f9f06ff 100644 --- a/pkgs/development/python-modules/graphviz/default.nix +++ b/pkgs/development/python-modules/graphviz/default.nix @@ -63,7 +63,7 @@ buildPythonPackage rec { ''; # Too many failures due to attempting to connect to com.apple.fonts daemon - doCheck = !stdenv.isDarwin; + doCheck = !stdenv.hostPlatform.isDarwin; meta = with lib; { description = "Simple Python interface for Graphviz"; diff --git a/pkgs/development/python-modules/greeclimate/default.nix b/pkgs/development/python-modules/greeclimate/default.nix index 3970ef993cb5..50aa51e82e92 100644 --- a/pkgs/development/python-modules/greeclimate/default.nix +++ b/pkgs/development/python-modules/greeclimate/default.nix @@ -63,7 +63,7 @@ buildPythonPackage rec { ]; meta = with lib; { - broken = stdenv.isDarwin; + broken = stdenv.hostPlatform.isDarwin; description = "Discover, connect and control Gree based minisplit systems"; homepage = "https://github.com/cmroche/greeclimate"; changelog = "https://github.com/cmroche/greeclimate/blob/${src.rev}/CHANGELOG.md"; diff --git a/pkgs/development/python-modules/grpcio/default.nix b/pkgs/development/python-modules/grpcio/default.nix index 44c591d783a2..5dc26d50be2b 100644 --- a/pkgs/development/python-modules/grpcio/default.nix +++ b/pkgs/development/python-modules/grpcio/default.nix @@ -58,7 +58,7 @@ buildPythonPackage rec { GRPC_PYTHON_BUILD_EXT_COMPILER_JOBS=1 fi '' - + lib.optionalString stdenv.isDarwin '' + + lib.optionalString stdenv.hostPlatform.isDarwin '' unset AR ''; diff --git a/pkgs/development/python-modules/gssapi/default.nix b/pkgs/development/python-modules/gssapi/default.nix index 08683996db8d..525cfa3208a6 100644 --- a/pkgs/development/python-modules/gssapi/default.nix +++ b/pkgs/development/python-modules/gssapi/default.nix @@ -53,10 +53,10 @@ buildPythonPackage rec { dependencies = [ decorator ]; - buildInputs = lib.optionals stdenv.isDarwin [ GSS ]; + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ GSS ]; # k5test is marked as broken on darwin - doCheck = !stdenv.isDarwin; + doCheck = !stdenv.hostPlatform.isDarwin; nativeCheckInputs = [ k5test diff --git a/pkgs/development/python-modules/gumath/default.nix b/pkgs/development/python-modules/gumath/default.nix index 83b45412b0ff..f478acffb27e 100644 --- a/pkgs/development/python-modules/gumath/default.nix +++ b/pkgs/development/python-modules/gumath/default.nix @@ -50,7 +50,7 @@ buildPythonPackage { 'add_runtime_library_dirs = ["${libndtypes}/lib", "${libxnd}/lib", "${libgumath}/lib"]' ''; - postInstall = lib.optionalString stdenv.isDarwin '' + postInstall = lib.optionalString stdenv.hostPlatform.isDarwin '' install_name_tool -add_rpath ${libgumath}/lib $out/${python.sitePackages}/gumath/_gumath.*.so ''; diff --git a/pkgs/development/python-modules/gymnasium/default.nix b/pkgs/development/python-modules/gymnasium/default.nix index 5cb114c51490..d7642559e537 100644 --- a/pkgs/development/python-modules/gymnasium/default.nix +++ b/pkgs/development/python-modules/gymnasium/default.nix @@ -66,7 +66,7 @@ buildPythonPackage rec { # marked as broken and throws an error during evaluation if the package is evaluated anyway. # disabling checks on Darwin avoids this and allows the package to be built. # if jaxlib is ever fixed on Darwin, remove this. - doCheck = !stdenv.isDarwin; + doCheck = !stdenv.hostPlatform.isDarwin; disabledTestPaths = [ # mujoco is required for those tests but the mujoco python bindings are not packaged in nixpkgs. diff --git a/pkgs/development/python-modules/gyp/default.nix b/pkgs/development/python-modules/gyp/default.nix index ad9fb88eb7ba..b8d52cd944c4 100644 --- a/pkgs/development/python-modules/gyp/default.nix +++ b/pkgs/development/python-modules/gyp/default.nix @@ -18,7 +18,7 @@ buildPythonPackage { hash = "sha256-LUlF2VhRnuDwJLdITgmXIQV/IuKdx1KXQkiPVHKrl4Q="; }; - patches = lib.optionals stdenv.isDarwin [ + patches = lib.optionals stdenv.hostPlatform.isDarwin [ ./no-darwin-cflags.patch ./no-xcode.patch ]; diff --git a/pkgs/development/python-modules/hfst/default.nix b/pkgs/development/python-modules/hfst/default.nix index 06e2ed94bb03..37869ffad3e3 100644 --- a/pkgs/development/python-modules/hfst/default.nix +++ b/pkgs/development/python-modules/hfst/default.nix @@ -30,7 +30,7 @@ buildPythonPackage rec { setupPyBuildFlags = [ "--inplace" ]; # Find foma in Darwin tests - preCheck = lib.optionalString stdenv.isDarwin '' + preCheck = lib.optionalString stdenv.hostPlatform.isDarwin '' export DYLD_LIBRARY_PATH="${foma}/lib" ''; diff --git a/pkgs/development/python-modules/hidapi/default.nix b/pkgs/development/python-modules/hidapi/default.nix index ee69705614c9..976961d2164b 100644 --- a/pkgs/development/python-modules/hidapi/default.nix +++ b/pkgs/development/python-modules/hidapi/default.nix @@ -20,14 +20,14 @@ buildPythonPackage rec { sha256 = "sha256-bA6XumsFmjCdUbSVqPDV77zqh1a2QNmLb2u5/e8kWKw="; }; - nativeBuildInputs = [ cython_0 ] ++ lib.optionals stdenv.isDarwin [ xcbuild ]; + nativeBuildInputs = [ cython_0 ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ xcbuild ]; propagatedBuildInputs = - lib.optionals stdenv.isLinux [ + lib.optionals stdenv.hostPlatform.isLinux [ libusb1 udev ] - ++ lib.optionals stdenv.isDarwin ( + ++ lib.optionals stdenv.hostPlatform.isDarwin ( with darwin.apple_sdk.frameworks; [ AppKit @@ -37,7 +37,7 @@ buildPythonPackage rec { ); # Fix the USB backend library lookup - postPatch = lib.optionalString stdenv.isLinux '' + postPatch = lib.optionalString stdenv.hostPlatform.isLinux '' libusb=${libusb1.dev}/include/libusb-1.0 test -d $libusb || { echo "ERROR: $libusb doesn't exist, please update/fix this build expression."; exit 1; } sed -i -e "s|/usr/include/libusb-1.0|$libusb|" setup.py diff --git a/pkgs/development/python-modules/httpie/default.nix b/pkgs/development/python-modules/httpie/default.nix index 5370a1e87009..86b4e4e51224 100644 --- a/pkgs/development/python-modules/httpie/default.nix +++ b/pkgs/development/python-modules/httpie/default.nix @@ -102,7 +102,7 @@ buildPythonPackage rec { "test_binary_suppresses_when_not_terminal_but_pretty" "test_binary_included_and_correct_when_suitable" ] - ++ lib.optionals stdenv.isDarwin [ + ++ lib.optionals stdenv.hostPlatform.isDarwin [ # Test is flaky "test_daemon_runner" ]; diff --git a/pkgs/development/python-modules/httplib2/default.nix b/pkgs/development/python-modules/httplib2/default.nix index 67e38601cfa5..a6c3e42a5317 100644 --- a/pkgs/development/python-modules/httplib2/default.nix +++ b/pkgs/development/python-modules/httplib2/default.nix @@ -57,7 +57,7 @@ buildPythonPackage rec { "test_head_301" "test_303" ] - ++ lib.optionals stdenv.isDarwin [ + ++ lib.optionals stdenv.hostPlatform.isDarwin [ # fails with "ConnectionResetError: [Errno 54] Connection reset by peer" "test_connection_close" # fails with HTTP 408 Request Timeout, instead of expected 200 OK diff --git a/pkgs/development/python-modules/httpx/default.nix b/pkgs/development/python-modules/httpx/default.nix index 4d4c264ea015..eb91fa3fce1e 100644 --- a/pkgs/development/python-modules/httpx/default.nix +++ b/pkgs/development/python-modules/httpx/default.nix @@ -68,7 +68,7 @@ buildPythonPackage rec { }; # trustme uses pyopenssl - doCheck = !(stdenv.isDarwin && stdenv.isAarch64); + doCheck = !(stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isAarch64); nativeCheckInputs = [ chardet diff --git a/pkgs/development/python-modules/hupper/default.nix b/pkgs/development/python-modules/hupper/default.nix index a7a6525e942d..ec9ccf3e65c8 100644 --- a/pkgs/development/python-modules/hupper/default.nix +++ b/pkgs/development/python-modules/hupper/default.nix @@ -19,7 +19,7 @@ buildPythonPackage rec { # FIXME: watchdog dependency is disabled on Darwin because of #31865, which causes very silent # segfaults in the testsuite that end up failing the tests in a background thread (in myapp) - nativeCheckInputs = [ pytestCheckHook ] ++ lib.optionals (!stdenv.isDarwin) [ watchdog ]; + nativeCheckInputs = [ pytestCheckHook ] ++ lib.optionals (!stdenv.hostPlatform.isDarwin) [ watchdog ]; disabledTestPaths = [ # Doesn't work with an exported home, RuntimeError: timeout waiting for change to file=/build/tmpgfn145cx diff --git a/pkgs/development/python-modules/ifcopenshell/default.nix b/pkgs/development/python-modules/ifcopenshell/default.nix index 6e17149079cf..f9b1fb66ec20 100644 --- a/pkgs/development/python-modules/ifcopenshell/default.nix +++ b/pkgs/development/python-modules/ifcopenshell/default.nix @@ -58,7 +58,7 @@ buildPythonPackage rec { ]; meta = with lib; { - broken = stdenv.isDarwin; + broken = stdenv.hostPlatform.isDarwin; description = "Open source IFC library and geometry engine"; homepage = "http://ifcopenshell.org/"; license = licenses.lgpl3; diff --git a/pkgs/development/python-modules/ignite/default.nix b/pkgs/development/python-modules/ignite/default.nix index 8d6145d9ad84..26009c97d47e 100644 --- a/pkgs/development/python-modules/ignite/default.nix +++ b/pkgs/development/python-modules/ignite/default.nix @@ -97,6 +97,6 @@ buildPythonPackage rec { license = lib.licenses.bsd3; maintainers = [ lib.maintainers.bcdarwin ]; # ModuleNotFoundError: No module named 'torch._C._distributed_c10d'; 'torch._C' is not a package - broken = stdenv.isDarwin; + broken = stdenv.hostPlatform.isDarwin; }; } diff --git a/pkgs/development/python-modules/imagecodecs-lite/default.nix b/pkgs/development/python-modules/imagecodecs-lite/default.nix index cca83672a31d..5bca6d350d59 100644 --- a/pkgs/development/python-modules/imagecodecs-lite/default.nix +++ b/pkgs/development/python-modules/imagecodecs-lite/default.nix @@ -29,7 +29,7 @@ buildPythonPackage rec { ''; meta = with lib; { - broken = (stdenv.isLinux && stdenv.isAarch64) || stdenv.isDarwin; + broken = (stdenv.hostPlatform.isLinux && stdenv.hostPlatform.isAarch64) || stdenv.hostPlatform.isDarwin; description = "Block-oriented, in-memory buffer transformation, compression, and decompression functions"; homepage = "https://www.lfd.uci.edu/~gohlke/"; maintainers = [ maintainers.tbenst ]; diff --git a/pkgs/development/python-modules/imageio/default.nix b/pkgs/development/python-modules/imageio/default.nix index 145d08730fe4..47018744c6b4 100644 --- a/pkgs/development/python-modules/imageio/default.nix +++ b/pkgs/development/python-modules/imageio/default.nix @@ -44,7 +44,7 @@ buildPythonPackage rec { hash = "sha256-WeoZE2TPBAhzBBcZNQqoiqvribMCLSZWk/XpdMydvCQ="; }; - patches = lib.optionals (!stdenv.isDarwin) [ + patches = lib.optionals (!stdenv.hostPlatform.isDarwin) [ (substituteAll { src = ./libgl-path.patch; libgl = "${libGL.out}/lib/libGL${stdenv.hostPlatform.extensions.sharedLibrary}"; @@ -100,7 +100,7 @@ buildPythonPackage rec { "tests/test_swf.py" ]; - disabledTests = lib.optionals stdenv.isDarwin [ + disabledTests = lib.optionals stdenv.hostPlatform.isDarwin [ # Segmentation fault "test_bayer_write" # RuntimeError: No valid H.264 encoder was found with the ffmpeg installation diff --git a/pkgs/development/python-modules/img2pdf/default.nix b/pkgs/development/python-modules/img2pdf/default.nix index 1a887a87d29b..afb95dafebd6 100644 --- a/pkgs/development/python-modules/img2pdf/default.nix +++ b/pkgs/development/python-modules/img2pdf/default.nix @@ -41,7 +41,7 @@ buildPythonPackage rec { (substituteAll { src = ./default-icc-profile.patch; srgbProfile = - if stdenv.isDarwin then + if stdenv.hostPlatform.isDarwin then "/System/Library/ColorSync/Profiles/sRGB Profile.icc" else # break runtime dependency chain all of colord dependencies @@ -65,7 +65,7 @@ buildPythonPackage rec { # FIXME: Only add "sRGB Profile.icc" to __impureHostDeps once # https://github.com/NixOS/nix/issues/9301 is fixed. - __impureHostDeps = lib.optionals stdenv.isDarwin [ "/System/Library/ColorSync/Profiles" ]; + __impureHostDeps = lib.optionals stdenv.hostPlatform.isDarwin [ "/System/Library/ColorSync/Profiles" ]; nativeCheckInputs = [ exiftool diff --git a/pkgs/development/python-modules/inkex/default.nix b/pkgs/development/python-modules/inkex/default.nix index c796a0136953..2435c7e46786 100644 --- a/pkgs/development/python-modules/inkex/default.nix +++ b/pkgs/development/python-modules/inkex/default.nix @@ -68,7 +68,7 @@ buildPythonPackage { "test_extract_multiple" "test_lookup_and" ] - ++ lib.optional stdenv.isDarwin [ + ++ lib.optional stdenv.hostPlatform.isDarwin [ "test_image_extract" "test_path_number_nodes" "test_plotter" # Hangs diff --git a/pkgs/development/python-modules/intake/default.nix b/pkgs/development/python-modules/intake/default.nix index 80907730ffcf..2b1fefe90750 100644 --- a/pkgs/development/python-modules/intake/default.nix +++ b/pkgs/development/python-modules/intake/default.nix @@ -124,7 +124,7 @@ buildPythonPackage rec { # Timing-based, flaky on darwin and possibly others "test_idle_timer" ] - ++ lib.optionals (stdenv.isDarwin && lib.versionOlder stdenv.hostPlatform.darwinMinVersion "10.13") + ++ lib.optionals (stdenv.hostPlatform.isDarwin && lib.versionOlder stdenv.hostPlatform.darwinMinVersion "10.13") [ # Flaky with older low-res mtime on darwin < 10.13 (#143987) "test_second_load_timestamp" diff --git a/pkgs/development/python-modules/invisible-watermark/default.nix b/pkgs/development/python-modules/invisible-watermark/default.nix index 968669ec92bc..67652922d62a 100644 --- a/pkgs/development/python-modules/invisible-watermark/default.nix +++ b/pkgs/development/python-modules/invisible-watermark/default.nix @@ -72,7 +72,7 @@ buildPythonPackage rec { let testName = "${if withOnnx then "withOnnx" else "withoutOnnx"}-${method}"; # This test fails in the sandbox on aarch64-linux, see https://github.com/microsoft/onnxruntime/issues/10038 - skipTest = stdenv.isLinux && stdenv.isAarch64 && withOnnx && method == "rivaGan"; + skipTest = stdenv.hostPlatform.isLinux && stdenv.hostPlatform.isAarch64 && withOnnx && method == "rivaGan"; in lib.optionalAttrs (!skipTest) { "${testName}" = callPackage ./tests/cli.nix { diff --git a/pkgs/development/python-modules/ipwhois/default.nix b/pkgs/development/python-modules/ipwhois/default.nix index bd69e5ccd514..ea8fa078833d 100644 --- a/pkgs/development/python-modules/ipwhois/default.nix +++ b/pkgs/development/python-modules/ipwhois/default.nix @@ -49,7 +49,7 @@ buildPythonPackage rec { pythonImportsCheck = [ "ipwhois" ]; - preCheck = lib.optionalString stdenv.isLinux '' + preCheck = lib.optionalString stdenv.hostPlatform.isLinux '' echo "nameserver 127.0.0.1" > resolv.conf export NIX_REDIRECTS=/etc/protocols=${iana-etc}/etc/protocols:/etc/resolv.conf=$(realpath resolv.conf) \ LD_PRELOAD=${libredirect}/lib/libredirect.so diff --git a/pkgs/development/python-modules/ipykernel/default.nix b/pkgs/development/python-modules/ipykernel/default.nix index dabad2fa8e13..4da948088c9a 100644 --- a/pkgs/development/python-modules/ipykernel/default.nix +++ b/pkgs/development/python-modules/ipykernel/default.nix @@ -52,7 +52,7 @@ buildPythonPackage rec { pyzmq tornado traitlets - ] ++ lib.optionals stdenv.isDarwin [ appnope ]; + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ appnope ]; # check in passthru.tests.pytest to escape infinite recursion with ipyparallel doCheck = false; diff --git a/pkgs/development/python-modules/ipykernel/tests.nix b/pkgs/development/python-modules/ipykernel/tests.nix index 4d96d4c6787d..89ac0be2d3d6 100644 --- a/pkgs/development/python-modules/ipykernel/tests.nix +++ b/pkgs/development/python-modules/ipykernel/tests.nix @@ -46,7 +46,7 @@ buildPythonPackage { # traitlets.config.configurable.MultipleInstanceError: An incompatible siblin... "test_install_kernelspec" ] - ++ lib.optionals stdenv.isDarwin ( + ++ lib.optionals stdenv.hostPlatform.isDarwin ( [ # see https://github.com/NixOS/nixpkgs/issues/76197 "test_subprocess_print" diff --git a/pkgs/development/python-modules/ipython/default.nix b/pkgs/development/python-modules/ipython/default.nix index e13f14a2411e..077ea0e4ac10 100644 --- a/pkgs/development/python-modules/ipython/default.nix +++ b/pkgs/development/python-modules/ipython/default.nix @@ -102,7 +102,7 @@ buildPythonPackage rec { # UnboundLocalError: local variable 'child' referenced before assignment "test_system_interrupt" ] - ++ lib.optionals (stdenv.isDarwin) [ + ++ lib.optionals (stdenv.hostPlatform.isDarwin) [ # FileNotFoundError: [Errno 2] No such file or directory: 'pbpaste' "test_clipboard_get" ]; diff --git a/pkgs/development/python-modules/jaraco-net/default.nix b/pkgs/development/python-modules/jaraco-net/default.nix index c5554812cbe8..de22f3eda857 100644 --- a/pkgs/development/python-modules/jaraco-net/default.nix +++ b/pkgs/development/python-modules/jaraco-net/default.nix @@ -68,7 +68,7 @@ buildPythonPackage rec { python-dateutil pathvalidate jsonpickle - ] ++ lib.optionals stdenv.isDarwin [ ifconfig-parser ]; + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ ifconfig-parser ]; pythonImportsCheck = [ "jaraco.net" ]; @@ -78,7 +78,7 @@ buildPythonPackage rec { importlib-resources pyparsing requests-mock - ] ++ lib.optionals stdenv.isDarwin [ nettools ]; + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ nettools ]; disabledTestPaths = [ # doesn't actually contain tests diff --git a/pkgs/development/python-modules/jaraco-path/default.nix b/pkgs/development/python-modules/jaraco-path/default.nix index 5537811d592d..48ee8b4fdd2b 100644 --- a/pkgs/development/python-modules/jaraco-path/default.nix +++ b/pkgs/development/python-modules/jaraco-path/default.nix @@ -31,6 +31,6 @@ buildPythonPackage rec { homepage = "https://github.com/jaraco/jaraco.path"; license = lib.licenses.mit; maintainers = with lib.maintainers; [ dotlambda ]; - broken = stdenv.isDarwin; # pyobjc is missing + broken = stdenv.hostPlatform.isDarwin; # pyobjc is missing }; } diff --git a/pkgs/development/python-modules/jax/default.nix b/pkgs/development/python-modules/jax/default.nix index ec8c53daab46..ba9a621b1eab 100644 --- a/pkgs/development/python-modules/jax/default.nix +++ b/pkgs/development/python-modules/jax/default.nix @@ -81,7 +81,7 @@ buildPythonPackage rec { # PermissionError: [Errno 13] Permission denied: '/tmp/back_compat_testdata/test_*.py' # See https://github.com/google/jax/blob/jaxlib-v0.4.27/jax/_src/internal_test_util/export_back_compat_test_util.py#L240-L241 # NOTE: this doesn't seem to be an issue on linux - preCheck = lib.optionalString stdenv.isDarwin '' + preCheck = lib.optionalString stdenv.hostPlatform.isDarwin '' export TEST_UNDECLARED_OUTPUTS_DIR=$(mktemp -d) ''; @@ -108,7 +108,7 @@ buildPythonPackage rec { "test_custom_root_with_aux" "testEigvalsGrad_shape" ] - ++ lib.optionals stdenv.isAarch64 [ + ++ lib.optionals stdenv.hostPlatform.isAarch64 [ # See https://github.com/google/jax/issues/14793. "test_for_loop_fixpoint_correctly_identifies_loop_varying_residuals_unrolled_for_loop" "testQdwhWithRandomMatrix3" @@ -131,7 +131,7 @@ buildPythonPackage rec { # Segmentation fault. See https://gist.github.com/zimbatm/e9b61891f3bcf5e4aaefd13f94344fba "tests/linalg_test.py" ] - ++ lib.optionals (stdenv.isDarwin && stdenv.isAarch64) [ + ++ lib.optionals (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isAarch64) [ # RuntimeWarning: invalid value encountered in cast "tests/lax_test.py" ]; diff --git a/pkgs/development/python-modules/jaxlib/bin.nix b/pkgs/development/python-modules/jaxlib/bin.nix index 3104cee90e1c..a08264849770 100644 --- a/pkgs/development/python-modules/jaxlib/bin.nix +++ b/pkgs/development/python-modules/jaxlib/bin.nix @@ -186,7 +186,7 @@ buildPythonPackage { # Prebuilt wheels are dynamically linked against things that nix can't find. # Run `autoPatchelfHook` to automagically fix them. nativeBuildInputs = - lib.optionals stdenv.isLinux [ autoPatchelfHook ] + lib.optionals stdenv.hostPlatform.isLinux [ autoPatchelfHook ] ++ lib.optionals cudaSupport [ autoAddDriverRunpath ]; # Dynamic link dependencies buildInputs = [ stdenv.cc.cc.lib ]; @@ -238,12 +238,12 @@ buildPythonPackage { broken = !(cudaSupport -> lib.versionAtLeast cudaVersion "11.1") || !(cudaSupport -> lib.versionAtLeast cudaPackages.cudnn.version "8.2") - || !(cudaSupport -> stdenv.isLinux) + || !(cudaSupport -> stdenv.hostPlatform.isLinux) || !(cudaSupport -> (gpuSrcs ? "cuda${cudaVersion}-${pythonVersion}")) # Fails at pythonImportsCheckPhase: # ...-python-imports-check-hook.sh/nix-support/setup-hook: line 10: 28017 Illegal instruction: 4 # /nix/store/5qpssbvkzfh73xih07xgmpkj5r565975-python3-3.11.9/bin/python3.11 -c # 'import os; import importlib; list(map(lambda mod: importlib.import_module(mod), os.environ["pythonImportsCheck"].split()))' - || (stdenv.isDarwin && stdenv.isx86_64); + || (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isx86_64); }; } diff --git a/pkgs/development/python-modules/jaxlib/default.nix b/pkgs/development/python-modules/jaxlib/default.nix index 0fc50fa9243f..de7fea0a26e8 100644 --- a/pkgs/development/python-modules/jaxlib/default.nix +++ b/pkgs/development/python-modules/jaxlib/default.nix @@ -240,7 +240,7 @@ let wheel build which - ] ++ lib.optionals effectiveStdenv.isDarwin [ cctools ]; + ] ++ lib.optionals effectiveStdenv.hostPlatform.isDarwin [ cctools ]; buildInputs = [ @@ -259,8 +259,8 @@ let snappy zlib ] - ++ lib.optionals effectiveStdenv.isDarwin [ IOKit ] - ++ lib.optionals (!effectiveStdenv.isDarwin) [ nsync ]; + ++ lib.optionals effectiveStdenv.hostPlatform.isDarwin [ IOKit ] + ++ lib.optionals (!effectiveStdenv.hostPlatform.isDarwin) [ nsync ]; # We don't want to be quite so picky regarding bazel version postPatch = '' @@ -406,7 +406,7 @@ let TF_SYSTEM_LIBS = lib.concatStringsSep "," ( tf_system_libs - ++ lib.optionals (!effectiveStdenv.isDarwin) [ + ++ lib.optionals (!effectiveStdenv.hostPlatform.isDarwin) [ "nsync" # fails to build on darwin ] ); @@ -414,7 +414,7 @@ let # Note: we cannot do most of this patching at `patch` phase as the deps # are not available yet. Framework search paths aren't added by bintools # hook. See https://github.com/NixOS/nixpkgs/pull/41914. - preBuild = lib.optionalString effectiveStdenv.isDarwin '' + preBuild = lib.optionalString effectiveStdenv.hostPlatform.isDarwin '' export NIX_LDFLAGS+=" -F${IOKit}/Library/Frameworks" substituteInPlace ../output/external/rules_cc/cc/private/toolchain/osx_cc_wrapper.sh.tpl \ --replace "/usr/bin/install_name_tool" "${cctools}/bin/install_name_tool" diff --git a/pkgs/development/python-modules/jaxopt/default.nix b/pkgs/development/python-modules/jaxopt/default.nix index 8159533fc203..b617e21c1c27 100644 --- a/pkgs/development/python-modules/jaxopt/default.nix +++ b/pkgs/development/python-modules/jaxopt/default.nix @@ -75,7 +75,7 @@ buildPythonPackage rec { # https://github.com/google/jaxopt/issues/592 "test_solve_sparse" ] - ++ lib.optionals (stdenv.isLinux && stdenv.isAarch64) [ + ++ lib.optionals (stdenv.hostPlatform.isLinux && stdenv.hostPlatform.isAarch64) [ # https://github.com/google/jaxopt/issues/577 "test_binary_logit_log_likelihood" "test_solve_sparse" @@ -87,7 +87,7 @@ buildPythonPackage rec { # AssertionError: Array(0.01411963, dtype=float32) not less than or equal to 0.01 "test_multiclass_logreg6" ] - ++ lib.optionals stdenv.isDarwin [ + ++ lib.optionals stdenv.hostPlatform.isDarwin [ # Fatal Python error: Aborted "test_dtype_consistency" diff --git a/pkgs/development/python-modules/jedi-language-server/default.nix b/pkgs/development/python-modules/jedi-language-server/default.nix index 096c327ae986..e67d04be02c1 100644 --- a/pkgs/development/python-modules/jedi-language-server/default.nix +++ b/pkgs/development/python-modules/jedi-language-server/default.nix @@ -49,7 +49,7 @@ buildPythonPackage rec { HOME="$(mktemp -d)" ''; - disabledTests = lib.optionals stdenv.isDarwin [ + disabledTests = lib.optionals stdenv.hostPlatform.isDarwin [ # https://github.com/pappasam/jedi-language-server/issues/313 "test_publish_diagnostics_on_change" "test_publish_diagnostics_on_save" diff --git a/pkgs/development/python-modules/jedi/default.nix b/pkgs/development/python-modules/jedi/default.nix index ddc0caea5555..b88dc9311e91 100644 --- a/pkgs/development/python-modules/jedi/default.nix +++ b/pkgs/development/python-modules/jedi/default.nix @@ -58,7 +58,7 @@ buildPythonPackage rec { # sensitive to platform, causes false negatives on darwin "test_import" ] - ++ lib.optionals (stdenv.isAarch64 && pythonOlder "3.9") [ + ++ lib.optionals (stdenv.hostPlatform.isAarch64 && pythonOlder "3.9") [ # AssertionError: assert 'foo' in ['setup'] "test_init_extension_module" ] diff --git a/pkgs/development/python-modules/jellyfish/default.nix b/pkgs/development/python-modules/jellyfish/default.nix index 4210f5499d28..8517c239de44 100644 --- a/pkgs/development/python-modules/jellyfish/default.nix +++ b/pkgs/development/python-modules/jellyfish/default.nix @@ -28,7 +28,7 @@ buildPythonPackage rec { cargoSetupHook ]; - buildInputs = lib.optionals stdenv.isDarwin [ libiconv ]; + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ libiconv ]; cargoDeps = rustPlatform.fetchCargoTarball { inherit src; diff --git a/pkgs/development/python-modules/jinja2/default.nix b/pkgs/development/python-modules/jinja2/default.nix index da220641dbe2..ee1d27671b5d 100644 --- a/pkgs/development/python-modules/jinja2/default.nix +++ b/pkgs/development/python-modules/jinja2/default.nix @@ -41,7 +41,7 @@ buildPythonPackage rec { # Multiple tests run out of stack space on 32bit systems with python2. # See https://github.com/pallets/jinja/issues/1158 - doCheck = !stdenv.is32bit; + doCheck = !stdenv.hostPlatform.is32bit; nativeCheckInputs = [ pytestCheckHook ] ++ passthru.optional-dependencies.i18n; diff --git a/pkgs/development/python-modules/joblib/default.nix b/pkgs/development/python-modules/joblib/default.nix index 65b728b34e9a..0cd4182d4241 100644 --- a/pkgs/development/python-modules/joblib/default.nix +++ b/pkgs/development/python-modules/joblib/default.nix @@ -51,7 +51,7 @@ buildPythonPackage rec { "test_parallel_call_cached_function_defined_in_jupyter" # jupyter not available during tests "test_nested_parallel_warnings" # tests is flaky under load ] - ++ lib.optionals stdenv.isDarwin [ + ++ lib.optionals stdenv.hostPlatform.isDarwin [ "test_dispatch_multiprocessing" # test_dispatch_multiprocessing is broken only on Darwin. ] ++ lib.optionals (pythonAtLeast "3.12") [ diff --git a/pkgs/development/python-modules/johnnycanencrypt/default.nix b/pkgs/development/python-modules/johnnycanencrypt/default.nix index 19d02b118987..a9d7009e07e9 100644 --- a/pkgs/development/python-modules/johnnycanencrypt/default.nix +++ b/pkgs/development/python-modules/johnnycanencrypt/default.nix @@ -47,8 +47,8 @@ buildPythonPackage rec { buildInputs = [ nettle ] - ++ lib.optionals stdenv.isLinux [ pcsclite ] - ++ lib.optionals stdenv.isDarwin [ + ++ lib.optionals stdenv.hostPlatform.isLinux [ pcsclite ] + ++ lib.optionals stdenv.hostPlatform.isDarwin [ PCSC libiconv ]; diff --git a/pkgs/development/python-modules/json-stream-rs-tokenizer/default.nix b/pkgs/development/python-modules/json-stream-rs-tokenizer/default.nix index 9a65903e384d..86473e609bfe 100644 --- a/pkgs/development/python-modules/json-stream-rs-tokenizer/default.nix +++ b/pkgs/development/python-modules/json-stream-rs-tokenizer/default.nix @@ -45,7 +45,7 @@ buildPythonPackage rec { wheel ]; - buildInputs = lib.optionals stdenv.isDarwin [ libiconv ]; + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ libiconv ]; # Tests depend on json-stream, which depends on this package. # To avoid infinite recursion, we only enable tests when building passthru.tests. diff --git a/pkgs/development/python-modules/json-stream/default.nix b/pkgs/development/python-modules/json-stream/default.nix index 26b7ef5f8ea2..fd5f61399f18 100644 --- a/pkgs/development/python-modules/json-stream/default.nix +++ b/pkgs/development/python-modules/json-stream/default.nix @@ -25,7 +25,7 @@ buildPythonPackage rec { nativeBuildInputs = [ setuptools ]; - buildInputs = lib.optionals stdenv.isDarwin [ iconv ]; + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ iconv ]; propagatedBuildInputs = [ requests diff --git a/pkgs/development/python-modules/jsonstreams/default.nix b/pkgs/development/python-modules/jsonstreams/default.nix index 58c3513e1ee0..49ffcee24b82 100644 --- a/pkgs/development/python-modules/jsonstreams/default.nix +++ b/pkgs/development/python-modules/jsonstreams/default.nix @@ -25,7 +25,7 @@ buildPythonPackage rec { pytestFlagsArray = [ "tests --doctest-modules jsonstreams" ]; meta = with lib; { - broken = stdenv.isDarwin; + broken = stdenv.hostPlatform.isDarwin; description = "JSON streaming writer"; homepage = "https://github.com/dcbaker/jsonstreams"; license = licenses.mit; diff --git a/pkgs/development/python-modules/jupyter-server/default.nix b/pkgs/development/python-modules/jupyter-server/default.nix index a367bc3c0f35..071b3707225b 100644 --- a/pkgs/development/python-modules/jupyter-server/default.nix +++ b/pkgs/development/python-modules/jupyter-server/default.nix @@ -72,7 +72,7 @@ buildPythonPackage rec { ]; # https://github.com/NixOS/nixpkgs/issues/299427 - stripExclude = lib.optionals stdenv.isDarwin [ "favicon.ico" ]; + stripExclude = lib.optionals stdenv.hostPlatform.isDarwin [ "favicon.ico" ]; nativeCheckInputs = [ ipykernel @@ -102,13 +102,13 @@ buildPythonPackage rec { # test is presumable broken in sandbox "test_authorized_requests" ] - ++ lib.optionals stdenv.isDarwin [ + ++ lib.optionals stdenv.hostPlatform.isDarwin [ # attempts to use trashcan, build env doesn't allow this "test_delete" # Insufficient access privileges for operation "test_regression_is_hidden" ] - ++ lib.optionals stdenv.isLinux [ + ++ lib.optionals stdenv.hostPlatform.isLinux [ # Failed: DID NOT RAISE "test_copy_big_dir" ]; diff --git a/pkgs/development/python-modules/jupyterhub/default.nix b/pkgs/development/python-modules/jupyterhub/default.nix index 38a2fc97a662..76fbe01ae3d1 100644 --- a/pkgs/development/python-modules/jupyterhub/default.nix +++ b/pkgs/development/python-modules/jupyterhub/default.nix @@ -171,6 +171,6 @@ buildPythonPackage rec { license = licenses.bsd3; maintainers = teams.jupyter.members; # darwin: E OSError: dlopen(/nix/store/43zml0mlr17r5jsagxr00xxx91hz9lky-openpam-20170430/lib/libpam.so, 6): image not found - broken = stdenv.isDarwin; + broken = stdenv.hostPlatform.isDarwin; }; } diff --git a/pkgs/development/python-modules/jupytext/default.nix b/pkgs/development/python-modules/jupytext/default.nix index 4708b5363141..df0fc676633f 100644 --- a/pkgs/development/python-modules/jupytext/default.nix +++ b/pkgs/development/python-modules/jupytext/default.nix @@ -58,7 +58,7 @@ buildPythonPackage rec { disabledTestPaths = [ "tests/external" ]; - disabledTests = lib.optionals stdenv.isDarwin [ + disabledTests = lib.optionals stdenv.hostPlatform.isDarwin [ # requires access to trash "test_load_save_rename" ]; diff --git a/pkgs/development/python-modules/kaleido/default.nix b/pkgs/development/python-modules/kaleido/default.nix index 9e9fff6af84d..ef889a0aa715 100644 --- a/pkgs/development/python-modules/kaleido/default.nix +++ b/pkgs/development/python-modules/kaleido/default.nix @@ -97,7 +97,7 @@ buildPythonPackage rec { #ln -s ${lato}/share/fonts/lato/* $out/${python.sitePackages}/kaleido/executable/xdg/fonts/truetype/lato/ ''; - passthru.tests = lib.optionalAttrs (!stdenv.isDarwin) { + passthru.tests = lib.optionalAttrs (!stdenv.hostPlatform.isDarwin) { kaleido = callPackage ./tests.nix { }; }; diff --git a/pkgs/development/python-modules/keyring/default.nix b/pkgs/development/python-modules/keyring/default.nix index d16fa7232c2c..45166fb322b2 100644 --- a/pkgs/development/python-modules/keyring/default.nix +++ b/pkgs/development/python-modules/keyring/default.nix @@ -43,7 +43,7 @@ buildPythonPackage rec { jaraco-context jaraco-functools ] - ++ lib.optionals stdenv.isLinux [ + ++ lib.optionals stdenv.hostPlatform.isLinux [ jeepney secretstorage ] @@ -68,7 +68,7 @@ buildPythonPackage rec { disabledTestPaths = [ "tests/backends/test_macOS.py" ] # These tests fail when sandboxing is enabled because they are unable to get a password from keychain. - ++ lib.optional stdenv.isDarwin "tests/test_multiprocess.py"; + ++ lib.optional stdenv.hostPlatform.isDarwin "tests/test_multiprocess.py"; meta = with lib; { description = "Store and access your passwords safely"; diff --git a/pkgs/development/python-modules/keyring_24/default.nix b/pkgs/development/python-modules/keyring_24/default.nix index 9739a6f7b20a..05fbb3178147 100644 --- a/pkgs/development/python-modules/keyring_24/default.nix +++ b/pkgs/development/python-modules/keyring_24/default.nix @@ -46,7 +46,7 @@ buildPythonPackage rec { jaraco-context jaraco-functools ] - ++ lib.optionals stdenv.isLinux [ + ++ lib.optionals stdenv.hostPlatform.isLinux [ jeepney secretstorage ] @@ -68,7 +68,7 @@ buildPythonPackage rec { disabledTestPaths = [ "tests/backends/test_macOS.py" ] # These tests fail when sandboxing is enabled because they are unable to get a password from keychain. - ++ lib.optional stdenv.isDarwin "tests/test_multiprocess.py"; + ++ lib.optional stdenv.hostPlatform.isDarwin "tests/test_multiprocess.py"; meta = with lib; { description = "Store and access your passwords safely"; diff --git a/pkgs/development/python-modules/keystone-engine/default.nix b/pkgs/development/python-modules/keystone-engine/default.nix index 61e27473ec98..4e526346dced 100644 --- a/pkgs/development/python-modules/keystone-engine/default.nix +++ b/pkgs/development/python-modules/keystone-engine/default.nix @@ -16,7 +16,7 @@ buildPythonPackage rec { sha256 = "1xahdr6bh3dw5swrc2r8kqa8ljhqlb7k2kxv5mrw5rhcmcnzcyig"; }; - setupPyBuildFlags = lib.optionals stdenv.isLinux [ + setupPyBuildFlags = lib.optionals stdenv.hostPlatform.isLinux [ "--plat-name" "linux" ]; diff --git a/pkgs/development/python-modules/kivy/default.nix b/pkgs/development/python-modules/kivy/default.nix index f71c8288c74e..26a1bba38bce 100644 --- a/pkgs/development/python-modules/kivy/default.nix +++ b/pkgs/development/python-modules/kivy/default.nix @@ -49,11 +49,11 @@ buildPythonPackage rec { SDL2_ttf SDL2_mixer ] - ++ lib.optionals stdenv.isLinux [ + ++ lib.optionals stdenv.hostPlatform.isLinux [ mesa mtdev ] - ++ lib.optionals stdenv.isDarwin [ + ++ lib.optionals stdenv.hostPlatform.isDarwin [ Accelerate ApplicationServices AVFoundation @@ -84,9 +84,9 @@ buildPythonPackage rec { # prefer pkg-config over hardcoded framework paths USE_OSX_FRAMEWORKS = 0; # work around python distutils compiling C++ with $CC (see issue #26709) - env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.isDarwin "-I${lib.getDev libcxx}/include/c++/v1"; + env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.hostPlatform.isDarwin "-I${lib.getDev libcxx}/include/c++/v1"; - postPatch = lib.optionalString stdenv.isLinux '' + postPatch = lib.optionalString stdenv.hostPlatform.isLinux '' substituteInPlace kivy/lib/mtdev.py \ --replace "LoadLibrary('libmtdev.so.1')" "LoadLibrary('${mtdev}/lib/libmtdev.so.1')" ''; diff --git a/pkgs/development/python-modules/kiwisolver/default.nix b/pkgs/development/python-modules/kiwisolver/default.nix index d71b613b58b8..24322524eb93 100644 --- a/pkgs/development/python-modules/kiwisolver/default.nix +++ b/pkgs/development/python-modules/kiwisolver/default.nix @@ -21,7 +21,7 @@ buildPythonPackage rec { hash = "sha256-5X5WOlf7IqFC2jTziswvwaXIZLwpyhUXqIq8lj5g1uw="; }; - env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.isDarwin "-I${lib.getDev libcxx}/include/c++/v1"; + env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.hostPlatform.isDarwin "-I${lib.getDev libcxx}/include/c++/v1"; nativeBuildInputs = [ setuptools-scm ]; diff --git a/pkgs/development/python-modules/krb5/default.nix b/pkgs/development/python-modules/krb5/default.nix index f64b73447ac0..42c4537bff42 100644 --- a/pkgs/development/python-modules/krb5/default.nix +++ b/pkgs/development/python-modules/krb5/default.nix @@ -43,6 +43,6 @@ buildPythonPackage rec { homepage = "https://github.com/jborean93/pykrb5"; license = licenses.mit; maintainers = teams.deshaw.members; - broken = stdenv.isDarwin; # TODO: figure out how to build on Darwin + broken = stdenv.hostPlatform.isDarwin; # TODO: figure out how to build on Darwin }; } diff --git a/pkgs/development/python-modules/kubernetes/default.nix b/pkgs/development/python-modules/kubernetes/default.nix index b7387675c954..66a295dcc5a7 100644 --- a/pkgs/development/python-modules/kubernetes/default.nix +++ b/pkgs/development/python-modules/kubernetes/default.nix @@ -60,7 +60,7 @@ buildPythonPackage rec { pytestCheckHook ] ++ lib.flatten (builtins.attrValues optional-dependencies); - disabledTests = lib.optionals stdenv.isDarwin [ + disabledTests = lib.optionals stdenv.hostPlatform.isDarwin [ # AssertionError: != "test_rest_proxycare" ]; diff --git a/pkgs/development/python-modules/lancedb/default.nix b/pkgs/development/python-modules/lancedb/default.nix index bf2f407be877..e1dcbd2a1a22 100644 --- a/pkgs/development/python-modules/lancedb/default.nix +++ b/pkgs/development/python-modules/lancedb/default.nix @@ -58,7 +58,7 @@ buildPythonPackage rec { libiconv protobuf ] - ++ lib.optionals stdenv.isDarwin ( + ++ lib.optionals stdenv.hostPlatform.isDarwin ( with darwin.apple_sdk.frameworks; [ IOKit diff --git a/pkgs/development/python-modules/langchain-core/default.nix b/pkgs/development/python-modules/langchain-core/default.nix index a29bf68137a1..0c3564d0f113 100644 --- a/pkgs/development/python-modules/langchain-core/default.nix +++ b/pkgs/development/python-modules/langchain-core/default.nix @@ -118,7 +118,7 @@ buildPythonPackage rec { "test_chat_prompt_template_variable_names" "test_create_model_v2" ] - ++ lib.optionals stdenv.isDarwin [ + ++ lib.optionals stdenv.hostPlatform.isDarwin [ # Langchain-core the following tests due to the test comparing execution time with magic values. "test_queue_for_streaming_via_sync_call" "test_same_event_loop" diff --git a/pkgs/development/python-modules/langgraph-checkpoint-postgres/default.nix b/pkgs/development/python-modules/langgraph-checkpoint-postgres/default.nix index adcd0856f027..7d511994b6d5 100644 --- a/pkgs/development/python-modules/langgraph-checkpoint-postgres/default.nix +++ b/pkgs/development/python-modules/langgraph-checkpoint-postgres/default.nix @@ -48,7 +48,7 @@ buildPythonPackage rec { pythonRelaxDeps = [ "psycopg-pool" ]; - doCheck = !(stdenvNoCC.isDarwin); + doCheck = !(stdenvNoCC.hostPlatform.isDarwin); pythonImportsCheck = [ "langgraph.checkpoint.postgres" ]; diff --git a/pkgs/development/python-modules/langgraph/default.nix b/pkgs/development/python-modules/langgraph/default.nix index 80e2faa68258..087db330d195 100644 --- a/pkgs/development/python-modules/langgraph/default.nix +++ b/pkgs/development/python-modules/langgraph/default.nix @@ -64,7 +64,7 @@ buildPythonPackage rec { # postgresql doesn't play nicely with the darwin sandbox: # FATAL: could not create shared memory segment: Operation not permitted - doCheck = !stdenv.isDarwin; + doCheck = !stdenv.hostPlatform.isDarwin; nativeCheckInputs = [ aiosqlite diff --git a/pkgs/development/python-modules/langsmith/default.nix b/pkgs/development/python-modules/langsmith/default.nix index f7bd15615c85..5ce0f9c33367 100644 --- a/pkgs/development/python-modules/langsmith/default.nix +++ b/pkgs/development/python-modules/langsmith/default.nix @@ -59,7 +59,7 @@ buildPythonPackage rec { pytest-asyncio pytestCheckHook uvicorn - ] ++ lib.optionals stdenv.isLinux [ attr ]; + ] ++ lib.optionals stdenv.hostPlatform.isLinux [ attr ]; disabledTests = [ # These tests require network access diff --git a/pkgs/development/python-modules/ledgerblue/default.nix b/pkgs/development/python-modules/ledgerblue/default.nix index 5010d8153032..4885fa14524e 100644 --- a/pkgs/development/python-modules/ledgerblue/default.nix +++ b/pkgs/development/python-modules/ledgerblue/default.nix @@ -53,7 +53,7 @@ buildPythonPackage rec { python-gnupg python-u2flib-host websocket-client - ] ++ lib.optionals stdenv.isLinux [ bleak ]; + ] ++ lib.optionals stdenv.hostPlatform.isLinux [ bleak ]; # No tests doCheck = false; diff --git a/pkgs/development/python-modules/ledgerwallet/default.nix b/pkgs/development/python-modules/ledgerwallet/default.nix index 8afa1ea14cb5..0cbc048ee670 100644 --- a/pkgs/development/python-modules/ledgerwallet/default.nix +++ b/pkgs/development/python-modules/ledgerwallet/default.nix @@ -34,7 +34,7 @@ buildPythonPackage rec { buildInputs = [ setuptools setuptools-scm - ] ++ lib.optionals stdenv.isDarwin [ AppKit ]; + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ AppKit ]; propagatedBuildInputs = [ cryptography click diff --git a/pkgs/development/python-modules/libasyncns/default.nix b/pkgs/development/python-modules/libasyncns/default.nix index 730d1a9217d5..b81e67f8f926 100644 --- a/pkgs/development/python-modules/libasyncns/default.nix +++ b/pkgs/development/python-modules/libasyncns/default.nix @@ -18,7 +18,7 @@ buildPythonPackage rec { patches = [ ./libasyncns-fix-res-consts.patch ]; - postPatch = lib.optionalString stdenv.isDarwin '' + postPatch = lib.optionalString stdenv.hostPlatform.isDarwin '' substituteInPlace resquery.c \ --replace '' '' ''; diff --git a/pkgs/development/python-modules/libcst/default.nix b/pkgs/development/python-modules/libcst/default.nix index a0863f9bfd1c..3ccf4c8e12fb 100644 --- a/pkgs/development/python-modules/libcst/default.nix +++ b/pkgs/development/python-modules/libcst/default.nix @@ -55,7 +55,7 @@ buildPythonPackage rec { rustc ]; - buildInputs = lib.optionals stdenv.isDarwin [ libiconv ]; + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ libiconv ]; dependencies = [ typing-extensions diff --git a/pkgs/development/python-modules/librosa/default.nix b/pkgs/development/python-modules/librosa/default.nix index 9b015e335b75..fa0c17487d33 100644 --- a/pkgs/development/python-modules/librosa/default.nix +++ b/pkgs/development/python-modules/librosa/default.nix @@ -106,7 +106,7 @@ buildPythonPackage rec { "test_cite_badversion" "test_cite_unreleased" ] - ++ lib.optionals stdenv.isDarwin [ + ++ lib.optionals stdenv.hostPlatform.isDarwin [ # crashing the python interpreter "test_unknown_time_unit" "test_unknown_wavaxis" diff --git a/pkgs/development/python-modules/libtmux/default.nix b/pkgs/development/python-modules/libtmux/default.nix index 0bb5cb5cda28..917b20ef077f 100644 --- a/pkgs/development/python-modules/libtmux/default.nix +++ b/pkgs/development/python-modules/libtmux/default.nix @@ -47,12 +47,12 @@ buildPythonPackage rec { # Assertion error "test_capture_pane_start" ] - ++ lib.optionals stdenv.isDarwin [ + ++ lib.optionals stdenv.hostPlatform.isDarwin [ # tests/test_pane.py:113: AssertionError "test_capture_pane_start" ]; - disabledTestPaths = lib.optionals stdenv.isDarwin [ + disabledTestPaths = lib.optionals stdenv.hostPlatform.isDarwin [ "tests/test_test.py" ]; diff --git a/pkgs/development/python-modules/lightgbm/default.nix b/pkgs/development/python-modules/lightgbm/default.nix index 6e07d603b1b4..5c52a7350741 100644 --- a/pkgs/development/python-modules/lightgbm/default.nix +++ b/pkgs/development/python-modules/lightgbm/default.nix @@ -29,7 +29,7 @@ boost, ocl-icd, opencl-headers, - gpuSupport ? stdenv.isLinux && !cudaSupport, + gpuSupport ? stdenv.hostPlatform.isLinux && !cudaSupport, cudaSupport ? config.cudaSupport, cudaPackages, }: diff --git a/pkgs/development/python-modules/llfuse/default.nix b/pkgs/development/python-modules/llfuse/default.nix index 4fa525fa4db2..a110a8082c14 100644 --- a/pkgs/development/python-modules/llfuse/default.nix +++ b/pkgs/development/python-modules/llfuse/default.nix @@ -46,7 +46,7 @@ buildPythonPackage rec { ''; # On Darwin, the test requires macFUSE to be installed outside of Nix. - doCheck = !stdenv.isDarwin; + doCheck = !stdenv.hostPlatform.isDarwin; nativeCheckInputs = [ pytestCheckHook which diff --git a/pkgs/development/python-modules/llvmlite/default.nix b/pkgs/development/python-modules/llvmlite/default.nix index 9d76e64fde35..19941cd4b4a3 100644 --- a/pkgs/development/python-modules/llvmlite/default.nix +++ b/pkgs/development/python-modules/llvmlite/default.nix @@ -48,7 +48,7 @@ buildPythonPackage rec { cd $out ''; - __impureHostDeps = lib.optionals stdenv.isDarwin [ "/usr/lib/libm.dylib" ]; + __impureHostDeps = lib.optionals stdenv.hostPlatform.isDarwin [ "/usr/lib/libm.dylib" ]; passthru = lib.optionalAttrs (!withStaticLLVM) { inherit llvm; }; diff --git a/pkgs/development/python-modules/loguru/default.nix b/pkgs/development/python-modules/loguru/default.nix index b3ec041169fe..216a20663381 100644 --- a/pkgs/development/python-modules/loguru/default.nix +++ b/pkgs/development/python-modules/loguru/default.nix @@ -33,7 +33,7 @@ buildPythonPackage rec { disabledTestPaths = [ "tests/test_type_hinting.py" # avoid dependency on mypy - ] ++ lib.optionals stdenv.isDarwin [ "tests/test_multiprocessing.py" ]; + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ "tests/test_multiprocessing.py" ]; disabledTests = [ @@ -43,7 +43,7 @@ buildPythonPackage rec { # Slow test "test_time_rotation" ] - ++ lib.optionals stdenv.isDarwin [ + ++ lib.optionals stdenv.hostPlatform.isDarwin [ "test_rotation_and_retention" "test_rotation_and_retention_timed_file" "test_renaming" diff --git a/pkgs/development/python-modules/logutils/default.nix b/pkgs/development/python-modules/logutils/default.nix index eb0e1ebd5368..df79cc9dc3e4 100644 --- a/pkgs/development/python-modules/logutils/default.nix +++ b/pkgs/development/python-modules/logutils/default.nix @@ -41,7 +41,7 @@ buildPythonPackage rec { "test_hashandlers" ]; - disabledTestPaths = lib.optionals (stdenv.isDarwin) [ + disabledTestPaths = lib.optionals (stdenv.hostPlatform.isDarwin) [ # Exception: unable to connect to Redis server "tests/test_redis.py" ]; diff --git a/pkgs/development/python-modules/ltpycld2/default.nix b/pkgs/development/python-modules/ltpycld2/default.nix index 7635b631170c..510259d72d6e 100644 --- a/pkgs/development/python-modules/ltpycld2/default.nix +++ b/pkgs/development/python-modules/ltpycld2/default.nix @@ -26,6 +26,6 @@ buildPythonPackage rec { homepage = "https://github.com/LibreTranslate/pycld2"; license = licenses.asl20; maintainers = with maintainers; [ misuzu ]; - broken = stdenv.isDarwin; + broken = stdenv.hostPlatform.isDarwin; }; } diff --git a/pkgs/development/python-modules/lxml/default.nix b/pkgs/development/python-modules/lxml/default.nix index bc09e20503e9..c035c5246795 100644 --- a/pkgs/development/python-modules/lxml/default.nix +++ b/pkgs/development/python-modules/lxml/default.nix @@ -33,7 +33,7 @@ buildPythonPackage rec { libxslt.dev cython setuptools - ] ++ lib.optionals stdenv.isDarwin [ xcodebuild ]; + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ xcodebuild ]; buildInputs = [ libxml2 libxslt diff --git a/pkgs/development/python-modules/lzallright/default.nix b/pkgs/development/python-modules/lzallright/default.nix index 697acafb6ed6..ee5be2d8dc44 100644 --- a/pkgs/development/python-modules/lzallright/default.nix +++ b/pkgs/development/python-modules/lzallright/default.nix @@ -32,7 +32,7 @@ buildPythonPackage rec { maturinBuildHook ]; - buildInputs = lib.optionals stdenv.isDarwin [ libiconv ]; + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ libiconv ]; pythonImportsCheck = [ "lzallright" ]; diff --git a/pkgs/development/python-modules/m2crypto/default.nix b/pkgs/development/python-modules/m2crypto/default.nix index 75f1e94f3bb2..1043325e1033 100644 --- a/pkgs/development/python-modules/m2crypto/default.nix +++ b/pkgs/development/python-modules/m2crypto/default.nix @@ -31,7 +31,7 @@ buildPythonPackage rec { env = { - NIX_CFLAGS_COMPILE = lib.optionalString stdenv.isDarwin (toString [ + NIX_CFLAGS_COMPILE = lib.optionalString stdenv.hostPlatform.isDarwin (toString [ "-Wno-error=implicit-function-declaration" "-Wno-error=incompatible-pointer-types" ]); diff --git a/pkgs/development/python-modules/magic-wormhole-mailbox-server/default.nix b/pkgs/development/python-modules/magic-wormhole-mailbox-server/default.nix index 55bc5da3fd35..d98cfa259579 100644 --- a/pkgs/development/python-modules/magic-wormhole-mailbox-server/default.nix +++ b/pkgs/development/python-modules/magic-wormhole-mailbox-server/default.nix @@ -54,7 +54,7 @@ buildPythonPackage rec { mock ]; - disabledTestPaths = lib.optionals stdenv.isDarwin [ + disabledTestPaths = lib.optionals stdenv.hostPlatform.isDarwin [ # these tests fail in Darwin's sandbox "src/wormhole_mailbox_server/test/test_web.py" ]; diff --git a/pkgs/development/python-modules/magic-wormhole/default.nix b/pkgs/development/python-modules/magic-wormhole/default.nix index e765a52cc76f..01c714e414b9 100644 --- a/pkgs/development/python-modules/magic-wormhole/default.nix +++ b/pkgs/development/python-modules/magic-wormhole/default.nix @@ -52,7 +52,7 @@ buildPythonPackage rec { 'return "${placeholder "out"}/bin/wormhole"' '' # fix the location of the ifconfig binary - + lib.optionalString stdenv.isLinux '' + + lib.optionalString stdenv.hostPlatform.isLinux '' sed -i -e "s|'ifconfig'|'${nettools}/bin/ifconfig'|" src/wormhole/ipaddrs.py ''; @@ -88,7 +88,7 @@ buildPythonPackage rec { pytestCheckHook ] ++ passthru.optional-dependencies.dilation - ++ lib.optionals stdenv.isDarwin [ unixtools.locale ]; + ++ lib.optionals stdenv.hostPlatform.isDarwin [ unixtools.locale ]; __darwinAllowLocalNetworking = true; diff --git a/pkgs/development/python-modules/magika/default.nix b/pkgs/development/python-modules/magika/default.nix index 0c670a813741..444f4d844ea3 100644 --- a/pkgs/development/python-modules/magika/default.nix +++ b/pkgs/development/python-modules/magika/default.nix @@ -48,6 +48,6 @@ buildPythonPackage rec { maintainers = with maintainers; [ mihaimaruseac ]; mainProgram = "magika"; # Currently, disabling on AArch64 as it onnx runtime crashes on ofborg - broken = stdenv.isAarch64 && stdenv.isLinux; + broken = stdenv.hostPlatform.isAarch64 && stdenv.hostPlatform.isLinux; }; } diff --git a/pkgs/development/python-modules/mahotas/default.nix b/pkgs/development/python-modules/mahotas/default.nix index 144aae89c79d..307ed168acdb 100644 --- a/pkgs/development/python-modules/mahotas/default.nix +++ b/pkgs/development/python-modules/mahotas/default.nix @@ -49,10 +49,10 @@ buildPythonPackage rec { pythonImportsCheck = [ "mahotas" ]; - disabled = stdenv.isi686; # Failing tests + disabled = stdenv.hostPlatform.isi686; # Failing tests meta = with lib; { - broken = (stdenv.isLinux && stdenv.isAarch64); + broken = (stdenv.hostPlatform.isLinux && stdenv.hostPlatform.isAarch64); description = "Computer vision package based on numpy"; homepage = "https://mahotas.readthedocs.io/"; maintainers = with maintainers; [ luispedro ]; diff --git a/pkgs/development/python-modules/manhole/default.nix b/pkgs/development/python-modules/manhole/default.nix index d1ca10b9e81c..940dc355e482 100644 --- a/pkgs/development/python-modules/manhole/default.nix +++ b/pkgs/development/python-modules/manhole/default.nix @@ -22,7 +22,7 @@ buildPythonPackage rec { # {test_locals,test_socket_path} fail to remove /tmp/manhole-socket # on the x86_64-darwin builder. # - # TODO: change this back to `doCheck = stdenv.isLinux` after + # TODO: change this back to `doCheck = stdenv.hostPlatform.isLinux` after # https://github.com/ionelmc/python-manhole/issues/54 is fixed doCheck = false; diff --git a/pkgs/development/python-modules/manimpango/default.nix b/pkgs/development/python-modules/manimpango/default.nix index c0f8e475b365..6a1876ed6376 100644 --- a/pkgs/development/python-modules/manimpango/default.nix +++ b/pkgs/development/python-modules/manimpango/default.nix @@ -28,7 +28,7 @@ buildPythonPackage rec { nativeBuildInputs = [ pkg-config ]; - buildInputs = [ pango ] ++ lib.optionals stdenv.isDarwin [ AppKit ]; + buildInputs = [ pango ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ AppKit ]; propagatedBuildInputs = [ cython ]; diff --git a/pkgs/development/python-modules/markdown-it-py/default.nix b/pkgs/development/python-modules/markdown-it-py/default.nix index 1754ec45b76e..f50f6e8e308c 100644 --- a/pkgs/development/python-modules/markdown-it-py/default.nix +++ b/pkgs/development/python-modules/markdown-it-py/default.nix @@ -56,7 +56,7 @@ buildPythonPackage rec { preCheck = '' rm -r benchmarking ''; - doCheck = !stdenv.isi686; + doCheck = !stdenv.hostPlatform.isi686; pythonImportsCheck = [ "markdown_it" ]; diff --git a/pkgs/development/python-modules/materialx/default.nix b/pkgs/development/python-modules/materialx/default.nix index b1e11ba6de23..7b22621cdb8a 100644 --- a/pkgs/development/python-modules/materialx/default.nix +++ b/pkgs/development/python-modules/materialx/default.nix @@ -37,14 +37,14 @@ buildPythonPackage rec { openimageio imath ] - ++ lib.optionals stdenv.isDarwin ( + ++ lib.optionals stdenv.hostPlatform.isDarwin ( with darwin.apple_sdk.frameworks; [ OpenGL Cocoa ] ) - ++ lib.optionals (!stdenv.isDarwin) [ + ++ lib.optionals (!stdenv.hostPlatform.isDarwin) [ libX11 libXt libGL @@ -54,7 +54,7 @@ buildPythonPackage rec { (lib.cmakeBool "MATERIALX_BUILD_OIIO" true) (lib.cmakeBool "MATERIALX_BUILD_PYTHON" true) # don't build MSL shader back-end on x86_x64-darwin, as it requires a newer SDK with metal support - (lib.cmakeBool "MATERIALX_BUILD_GEN_MSL" (stdenv.isLinux || (stdenv.isAarch64 && stdenv.isDarwin))) + (lib.cmakeBool "MATERIALX_BUILD_GEN_MSL" (stdenv.hostPlatform.isLinux || (stdenv.hostPlatform.isAarch64 && stdenv.hostPlatform.isDarwin))) ]; pythonImportsCheck = [ "MaterialX" ]; diff --git a/pkgs/development/python-modules/matplotlib/default.nix b/pkgs/development/python-modules/matplotlib/default.nix index 2bcf4d246c45..d91c96e6dd74 100644 --- a/pkgs/development/python-modules/matplotlib/default.nix +++ b/pkgs/development/python-modules/matplotlib/default.nix @@ -52,7 +52,7 @@ # Tk # Darwin has its own "MacOSX" backend, PyPy has tkagg backend and does not support tkinter - enableTk ? (!stdenv.isDarwin && !isPyPy), + enableTk ? (!stdenv.hostPlatform.isDarwin && !isPyPy), tcl, tk, tkinter, @@ -114,7 +114,7 @@ buildPythonPackage rec { --replace-fail '"numpy>=2.0.0rc1,<2.3",' "" patchShebangs tools '' - + lib.optionalString (stdenv.isLinux && interactive) '' + + lib.optionalString (stdenv.hostPlatform.isLinux && interactive) '' # fix paths to libraries in dlopen calls (headless detection) substituteInPlace src/_c_internal_utils.cpp \ --replace-fail libX11.so.6 ${libX11}/lib/libX11.so.6 \ @@ -139,10 +139,10 @@ buildPythonPackage rec { tcl tk ] - ++ lib.optionals stdenv.isDarwin [ Cocoa ]; + ++ lib.optionals stdenv.hostPlatform.isDarwin [ Cocoa ]; # clang-11: error: argument unused during compilation: '-fno-strict-overflow' [-Werror,-Wunused-command-line-argument] - hardeningDisable = lib.optionals stdenv.isDarwin [ "strictoverflow" ]; + hardeningDisable = lib.optionals stdenv.hostPlatform.isDarwin [ "strictoverflow" ]; build-system = [ certifi diff --git a/pkgs/development/python-modules/matplotx/default.nix b/pkgs/development/python-modules/matplotx/default.nix index 978e35e2404e..8baa52efcf4d 100644 --- a/pkgs/development/python-modules/matplotx/default.nix +++ b/pkgs/development/python-modules/matplotx/default.nix @@ -45,7 +45,7 @@ buildPythonPackage rec { # This variable is needed to suppress the "Trace/BPT trap: 5" error in Darwin's checkPhase. # Not sure of the details, but we can avoid it by changing the matplotlib backend during testing. - env.MPLBACKEND = lib.optionalString stdenv.isDarwin "Agg"; + env.MPLBACKEND = lib.optionalString stdenv.hostPlatform.isDarwin "Agg"; nativeCheckInputs = [ pytestCheckHook ] ++ passthru.optional-dependencies.all; diff --git a/pkgs/development/python-modules/maxminddb/default.nix b/pkgs/development/python-modules/maxminddb/default.nix index d510be3b3a2c..0dffe5503122 100644 --- a/pkgs/development/python-modules/maxminddb/default.nix +++ b/pkgs/development/python-modules/maxminddb/default.nix @@ -28,7 +28,7 @@ buildPythonPackage rec { # The multiprocessing tests fail on Darwin because multiprocessing uses spawn instead of fork, # resulting in an exception when it can’t pickle the `lookup` local function. - disabledTests = lib.optionals stdenv.isDarwin [ "multiprocessing" ]; + disabledTests = lib.optionals stdenv.hostPlatform.isDarwin [ "multiprocessing" ]; meta = with lib; { description = "Reader for the MaxMind DB format"; diff --git a/pkgs/development/python-modules/miniaudio/default.nix b/pkgs/development/python-modules/miniaudio/default.nix index e7e98b265e2d..0f86ee525000 100644 --- a/pkgs/development/python-modules/miniaudio/default.nix +++ b/pkgs/development/python-modules/miniaudio/default.nix @@ -45,7 +45,7 @@ buildPythonPackage rec { build-system = [ setuptools ]; - buildInputs = lib.optionals stdenv.isDarwin [ + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ AudioToolbox CoreAudio ]; diff --git a/pkgs/development/python-modules/miniupnpc/default.nix b/pkgs/development/python-modules/miniupnpc/default.nix index a23ef91c8a81..04d8a08bf1c3 100644 --- a/pkgs/development/python-modules/miniupnpc/default.nix +++ b/pkgs/development/python-modules/miniupnpc/default.nix @@ -17,7 +17,7 @@ buildPythonPackage rec { hash = "sha256-KwpNVl+tZTZHHZKW9p3a/S0nZJW6lZftjBK9ECkRUMo="; }; - nativeBuildInputs = lib.optionals stdenv.isDarwin [ + nativeBuildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ cctools which ]; diff --git a/pkgs/development/python-modules/mip/default.nix b/pkgs/development/python-modules/mip/default.nix index 16ecf80905aa..63f2eeb59d72 100644 --- a/pkgs/development/python-modules/mip/default.nix +++ b/pkgs/development/python-modules/mip/default.nix @@ -89,7 +89,7 @@ buildPythonPackage rec { downloadPage = "https://github.com/coin-or/python-mip/releases"; changelog = "https://github.com/coin-or/python-mip/releases/tag/${version}"; license = licenses.epl20; - broken = stdenv.isAarch64; + broken = stdenv.hostPlatform.isAarch64; maintainers = with maintainers; [ nessdoor ]; }; } diff --git a/pkgs/development/python-modules/mitmproxy-rs/default.nix b/pkgs/development/python-modules/mitmproxy-rs/default.nix index bc2ed1694071..cbe1442da06b 100644 --- a/pkgs/development/python-modules/mitmproxy-rs/default.nix +++ b/pkgs/development/python-modules/mitmproxy-rs/default.nix @@ -36,7 +36,7 @@ buildPythonPackage rec { rustPlatform.maturinBuildHook ]; - buildInputs = lib.optionals stdenv.isDarwin [ + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.Security libiconv mitmproxy-macos diff --git a/pkgs/development/python-modules/mitmproxy/default.nix b/pkgs/development/python-modules/mitmproxy/default.nix index 2c4d1da6e629..5e01020bb21f 100644 --- a/pkgs/development/python-modules/mitmproxy/default.nix +++ b/pkgs/development/python-modules/mitmproxy/default.nix @@ -91,7 +91,7 @@ buildPythonPackage rec { urwid wsproto zstandard - ] ++ lib.optionals stdenv.isDarwin [ mitmproxy-macos ]; + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ mitmproxy-macos ]; nativeCheckInputs = [ hypothesis diff --git a/pkgs/development/python-modules/mmengine/default.nix b/pkgs/development/python-modules/mmengine/default.nix index ff07caeb877e..e8efda866dac 100644 --- a/pkgs/development/python-modules/mmengine/default.nix +++ b/pkgs/development/python-modules/mmengine/default.nix @@ -114,6 +114,6 @@ buildPythonPackage rec { changelog = "https://github.com/open-mmlab/mmengine/releases/tag/v${version}"; license = with licenses; [ asl20 ]; maintainers = with maintainers; [ rxiao ]; - broken = stdenv.isDarwin || (stdenv.isLinux && stdenv.isAarch64); + broken = stdenv.hostPlatform.isDarwin || (stdenv.hostPlatform.isLinux && stdenv.hostPlatform.isAarch64); }; } diff --git a/pkgs/development/python-modules/mocket/default.nix b/pkgs/development/python-modules/mocket/default.nix index eb5ffb2b244f..1df4cc1eef21 100644 --- a/pkgs/development/python-modules/mocket/default.nix +++ b/pkgs/development/python-modules/mocket/default.nix @@ -74,12 +74,12 @@ buildPythonPackage rec { ++ lib.optionals (pythonOlder "3.12") [ aiohttp ] ++ lib.flatten (builtins.attrValues passthru.optional-dependencies); - preCheck = lib.optionalString stdenv.isLinux '' + preCheck = lib.optionalString stdenv.hostPlatform.isLinux '' ${redis-server}/bin/redis-server & REDIS_PID=$! ''; - postCheck = lib.optionalString stdenv.isLinux '' + postCheck = lib.optionalString stdenv.hostPlatform.isLinux '' kill $REDIS_PID ''; @@ -98,7 +98,7 @@ buildPythonPackage rec { "test_no_dangling_fds" ]; - disabledTestPaths = lib.optionals stdenv.isDarwin [ "tests/main/test_redis.py" ]; + disabledTestPaths = lib.optionals stdenv.hostPlatform.isDarwin [ "tests/main/test_redis.py" ]; pythonImportsCheck = [ "mocket" ]; diff --git a/pkgs/development/python-modules/modeled/default.nix b/pkgs/development/python-modules/modeled/default.nix index 04655a61378f..07127184d216 100644 --- a/pkgs/development/python-modules/modeled/default.nix +++ b/pkgs/development/python-modules/modeled/default.nix @@ -34,7 +34,7 @@ buildPythonPackage rec { pythonImportsCheck = [ "modeled" ]; meta = with lib; { - broken = (stdenv.isLinux && stdenv.isAarch64) || stdenv.isDarwin; + broken = (stdenv.hostPlatform.isLinux && stdenv.hostPlatform.isAarch64) || stdenv.hostPlatform.isDarwin; description = "Universal data modeling for Python"; homepage = "https://github.com/modeled/modeled"; license = licenses.lgpl3Only; diff --git a/pkgs/development/python-modules/moderngl-window/default.nix b/pkgs/development/python-modules/moderngl-window/default.nix index 27fd4ef9663d..5539d053a065 100644 --- a/pkgs/development/python-modules/moderngl-window/default.nix +++ b/pkgs/development/python-modules/moderngl-window/default.nix @@ -72,6 +72,6 @@ buildPythonPackage rec { license = licenses.mit; maintainers = with maintainers; [ c0deaddict ]; inherit (mesa.meta) platforms; - broken = stdenv.isDarwin; + broken = stdenv.hostPlatform.isDarwin; }; } diff --git a/pkgs/development/python-modules/monotonic/default.nix b/pkgs/development/python-modules/monotonic/default.nix index 8b138a383080..46e8e0f35492 100644 --- a/pkgs/development/python-modules/monotonic/default.nix +++ b/pkgs/development/python-modules/monotonic/default.nix @@ -15,9 +15,9 @@ buildPythonPackage rec { sha256 = "3a55207bcfed53ddd5c5bae174524062935efed17792e9de2ad0205ce9ad63f7"; }; - __propagatedImpureHostDeps = lib.optional stdenv.isDarwin "/usr/lib/libc.dylib"; + __propagatedImpureHostDeps = lib.optional stdenv.hostPlatform.isDarwin "/usr/lib/libc.dylib"; - patchPhase = lib.optionalString stdenv.isLinux '' + patchPhase = lib.optionalString stdenv.hostPlatform.isLinux '' substituteInPlace monotonic.py --replace \ "ctypes.util.find_library('c')" "'${stdenv.cc.libc}/lib/libc.so'" ''; diff --git a/pkgs/development/python-modules/morecantile/default.nix b/pkgs/development/python-modules/morecantile/default.nix index 0a8a5001c003..d7e31fa4af6e 100644 --- a/pkgs/development/python-modules/morecantile/default.nix +++ b/pkgs/development/python-modules/morecantile/default.nix @@ -43,7 +43,7 @@ buildPythonPackage rec { rasterio ]; - disabledTests = lib.optionals stdenv.isDarwin [ + disabledTests = lib.optionals stdenv.hostPlatform.isDarwin [ # https://github.com/developmentseed/morecantile/issues/156 "test_tiles_when_tms_bounds_and_provided_bounds_cross_antimeridian" ]; diff --git a/pkgs/development/python-modules/motioneye-client/default.nix b/pkgs/development/python-modules/motioneye-client/default.nix index 1d27f9e0dbbb..487de3c3228c 100644 --- a/pkgs/development/python-modules/motioneye-client/default.nix +++ b/pkgs/development/python-modules/motioneye-client/default.nix @@ -48,6 +48,6 @@ buildPythonPackage rec { homepage = "https://github.com/dermotduffy/motioneye-client"; license = with licenses; [ mit ]; maintainers = with maintainers; [ fab ]; - broken = stdenv.isDarwin; + broken = stdenv.hostPlatform.isDarwin; }; } diff --git a/pkgs/development/python-modules/myjwt/default.nix b/pkgs/development/python-modules/myjwt/default.nix index 78e368360a41..094065310854 100644 --- a/pkgs/development/python-modules/myjwt/default.nix +++ b/pkgs/development/python-modules/myjwt/default.nix @@ -68,6 +68,6 @@ buildPythonPackage rec { license = with licenses; [ mit ]; maintainers = with maintainers; [ fab ]; # Build failures - broken = stdenv.isDarwin; + broken = stdenv.hostPlatform.isDarwin; }; } diff --git a/pkgs/development/python-modules/nats-py/default.nix b/pkgs/development/python-modules/nats-py/default.nix index e96ba513b131..4a28fc2c57bd 100644 --- a/pkgs/development/python-modules/nats-py/default.nix +++ b/pkgs/development/python-modules/nats-py/default.nix @@ -58,7 +58,7 @@ buildPythonPackage rec { "test_ordered_consumer_larger_streams" "test_object_file_basics" ] - ++ lib.optionals stdenv.isDarwin [ + ++ lib.optionals stdenv.hostPlatform.isDarwin [ "test_subscribe_iterate_next_msg" "test_buf_size_force_flush_timeout" ]; diff --git a/pkgs/development/python-modules/ndtypes/default.nix b/pkgs/development/python-modules/ndtypes/default.nix index 55ec525d4420..d3eb0a25ed01 100644 --- a/pkgs/development/python-modules/ndtypes/default.nix +++ b/pkgs/development/python-modules/ndtypes/default.nix @@ -36,7 +36,7 @@ buildPythonPackage { mkdir $out/include cp python/ndtypes/*.h $out/include '' - + lib.optionalString stdenv.isDarwin '' + + lib.optionalString stdenv.hostPlatform.isDarwin '' install_name_tool -add_rpath ${libndtypes}/lib $out/${python.sitePackages}/ndtypes/_ndtypes.*.so ''; diff --git a/pkgs/development/python-modules/nh3/default.nix b/pkgs/development/python-modules/nh3/default.nix index 1699b18c182d..f438525e5182 100644 --- a/pkgs/development/python-modules/nh3/default.nix +++ b/pkgs/development/python-modules/nh3/default.nix @@ -34,7 +34,7 @@ buildPythonPackage { maturinBuildHook ]; - buildInputs = lib.optionals stdenv.isDarwin [ + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ libiconv darwin.apple_sdk.frameworks.Security ]; diff --git a/pkgs/development/python-modules/nipype/default.nix b/pkgs/development/python-modules/nipype/default.nix index da8452a437ed..6169a0f69da3 100644 --- a/pkgs/development/python-modules/nipype/default.nix +++ b/pkgs/development/python-modules/nipype/default.nix @@ -93,7 +93,7 @@ buildPythonPackage rec { ]; # checks on darwin inspect memory which doesn't work in build environment - doCheck = !stdenv.isDarwin; + doCheck = !stdenv.hostPlatform.isDarwin; # ignore tests which incorrect fail to detect xvfb checkPhase = '' LC_ALL="en_US.UTF-8" pytest nipype/tests -k 'not display and not test_no_et_multiproc' diff --git a/pkgs/development/python-modules/nitime/default.nix b/pkgs/development/python-modules/nitime/default.nix index 6cc35b662c00..35b8eb4c46fc 100644 --- a/pkgs/development/python-modules/nitime/default.nix +++ b/pkgs/development/python-modules/nitime/default.nix @@ -51,7 +51,7 @@ buildPythonPackage rec { nativeCheckInputs = [ pytestCheckHook ]; - doCheck = !stdenv.isDarwin; # tests hang indefinitely + doCheck = !stdenv.hostPlatform.isDarwin; # tests hang indefinitely pythonImportsCheck = [ "nitime" ]; diff --git a/pkgs/development/python-modules/notify-py/default.nix b/pkgs/development/python-modules/notify-py/default.nix index 38f4ff5af140..cc46dbe77fdf 100644 --- a/pkgs/development/python-modules/notify-py/default.nix +++ b/pkgs/development/python-modules/notify-py/default.nix @@ -31,7 +31,7 @@ buildPythonPackage rec { }; patches = - lib.optionals stdenv.isLinux [ + lib.optionals stdenv.hostPlatform.isLinux [ # hardcode paths to aplay and notify-send (substituteAll { src = ./linux-paths.patch; @@ -39,7 +39,7 @@ buildPythonPackage rec { notifysend = "${libnotify}/bin/notify-send"; }) ] - ++ lib.optionals stdenv.isDarwin [ + ++ lib.optionals stdenv.hostPlatform.isDarwin [ # hardcode path to which (substituteAll { src = ./darwin-paths.patch; @@ -53,19 +53,19 @@ buildPythonPackage rec { pythonRelaxDeps = [ "loguru" ]; - propagatedBuildInputs = [ loguru ] ++ lib.optionals stdenv.isLinux [ jeepney ]; + propagatedBuildInputs = [ loguru ] ++ lib.optionals stdenv.hostPlatform.isLinux [ jeepney ]; - nativeCheckInputs = [ pytest ] ++ lib.optionals stdenv.isLinux [ dbus ]; + nativeCheckInputs = [ pytest ] ++ lib.optionals stdenv.hostPlatform.isLinux [ dbus ]; checkPhase = - if stdenv.isDarwin then + if stdenv.hostPlatform.isDarwin then '' # Tests search for "afplay" binary which is built in to macOS and not available in nixpkgs mkdir $TMP/bin ln -s ${coreutils}/bin/true $TMP/bin/afplay PATH="$TMP/bin:$PATH" pytest '' - else if stdenv.isLinux then + else if stdenv.hostPlatform.isLinux then '' dbus-run-session \ --config-file=${dbus}/share/dbus-1/session.conf \ diff --git a/pkgs/development/python-modules/numba/default.nix b/pkgs/development/python-modules/numba/default.nix index 10f622b37722..18bd264c5d76 100644 --- a/pkgs/development/python-modules/numba/default.nix +++ b/pkgs/development/python-modules/numba/default.nix @@ -78,7 +78,7 @@ buildPythonPackage rec { "dldir = [ '${addDriverRunpath.driverLink}/lib', " ''; - env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.isDarwin "-I${lib.getDev libcxx}/include/c++/v1"; + env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.hostPlatform.isDarwin "-I${lib.getDev libcxx}/include/c++/v1"; build-system = [ setuptools diff --git a/pkgs/development/python-modules/numpy/1.nix b/pkgs/development/python-modules/numpy/1.nix index ade66d14b829..2bd7a44903fa 100644 --- a/pkgs/development/python-modules/numpy/1.nix +++ b/pkgs/development/python-modules/numpy/1.nix @@ -105,7 +105,7 @@ buildPythonPackage rec { meson-python pkg-config ] - ++ lib.optionals (stdenv.isDarwin) [ xcbuild.xcrun ] + ++ lib.optionals (stdenv.hostPlatform.isDarwin) [ xcbuild.xcrun ] ++ lib.optionals (!stdenv.buildPlatform.canExecute stdenv.hostPlatform) [ mesonEmulatorHook ]; buildInputs = [ @@ -155,13 +155,13 @@ buildPythonPackage rec { # https://github.com/numpy/numpy/issues/24548 disabledTests = - lib.optionals stdenv.isi686 [ + lib.optionals stdenv.hostPlatform.isi686 [ "test_new_policy" # AssertionError: assert False "test_identityless_reduction_huge_array" # ValueError: Maximum allowed dimension exceeded "test_float_remainder_overflow" # AssertionError: FloatingPointError not raised by divmod "test_int" # AssertionError: selectedintkind(19): expected 16 but got -1 ] - ++ lib.optionals stdenv.isAarch32 [ + ++ lib.optionals stdenv.hostPlatform.isAarch32 [ "test_impossible_feature_enable" # AssertionError: Failed to generate error "test_features" # AssertionError: Failure Detection "test_new_policy" # AssertionError: assert False @@ -173,10 +173,10 @@ buildPythonPackage rec { "test_big_arrays" # ValueError: array is too big; `arr.size * arr.dtype.itemsize` is larger tha... "test_multinomial_pvals_float32" # Failed: DID NOT RAISE ] - ++ lib.optionals stdenv.isAarch64 [ + ++ lib.optionals stdenv.hostPlatform.isAarch64 [ "test_big_arrays" # OOM on a 16G machine ] - ++ lib.optionals (stdenv.isDarwin && stdenv.isx86_64) [ + ++ lib.optionals (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isx86_64) [ # can fail on virtualized machines confused over their cpu identity "test_dispatcher" ]; diff --git a/pkgs/development/python-modules/numpy/2.nix b/pkgs/development/python-modules/numpy/2.nix index 5b71602d72c2..e8f6d36b73d8 100644 --- a/pkgs/development/python-modules/numpy/2.nix +++ b/pkgs/development/python-modules/numpy/2.nix @@ -90,7 +90,7 @@ buildPythonPackage rec { meson-python pkg-config ] - ++ lib.optionals stdenv.isDarwin [ xcbuild.xcrun ] + ++ lib.optionals stdenv.hostPlatform.isDarwin [ xcbuild.xcrun ] ++ lib.optionals (!stdenv.buildPlatform.canExecute stdenv.hostPlatform) [ mesonEmulatorHook ]; # we default openblas to build with 64 threads @@ -144,7 +144,7 @@ buildPythonPackage rec { # https://github.com/numpy/numpy/issues/26713 "test_iter_refcount" ] - ++ lib.optionals stdenv.isAarch32 [ + ++ lib.optionals stdenv.hostPlatform.isAarch32 [ # https://github.com/numpy/numpy/issues/24548 "test_impossible_feature_enable" # AssertionError: Failed to generate error "test_features" # AssertionError: Failure Detection @@ -157,7 +157,7 @@ buildPythonPackage rec { "test_big_arrays" # ValueError: array is too big; `arr.size * arr.dtype.itemsize` is larger tha... "test_multinomial_pvals_float32" # Failed: DID NOT RAISE ] - ++ lib.optionals (stdenv.isDarwin && stdenv.isx86_64) [ + ++ lib.optionals (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isx86_64) [ # AssertionError: (np.int64(0), np.longdouble('9.9999999999999994515e-21'), np.longdouble('3.9696755572509052902e+20'), 'arctanh') "test_loss_of_precision" ]; diff --git a/pkgs/development/python-modules/nutils-poly/default.nix b/pkgs/development/python-modules/nutils-poly/default.nix index 3acda2fe55f1..e15b2fcd2a27 100644 --- a/pkgs/development/python-modules/nutils-poly/default.nix +++ b/pkgs/development/python-modules/nutils-poly/default.nix @@ -32,7 +32,7 @@ buildPythonPackage rec { nativeBuildInputs = [ rustPlatform.cargoSetupHook ]; - buildInputs = lib.optionals stdenv.isDarwin [ libiconv ]; + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ libiconv ]; build-system = [ rustPlatform.maturinBuildHook ]; diff --git a/pkgs/development/python-modules/okonomiyaki/default.nix b/pkgs/development/python-modules/okonomiyaki/default.nix index 816b93c833a7..d8b909b9a571 100644 --- a/pkgs/development/python-modules/okonomiyaki/default.nix +++ b/pkgs/development/python-modules/okonomiyaki/default.nix @@ -40,7 +40,7 @@ buildPythonPackage rec { substituteInPlace okonomiyaki/runtimes/tests/test_runtime.py \ --replace 'runtime_info = PythonRuntime.from_running_python()' 'raise unittest.SkipTest() #' '' - + lib.optionalString stdenv.isDarwin '' + + lib.optionalString stdenv.hostPlatform.isDarwin '' substituteInPlace okonomiyaki/platforms/tests/test_pep425.py \ --replace 'self.assertEqual(platform_tag, self.tag.platform)' 'raise unittest.SkipTest()' ''; diff --git a/pkgs/development/python-modules/onecache/default.nix b/pkgs/development/python-modules/onecache/default.nix index 03a8520bbfe0..fb1aa5c65484 100644 --- a/pkgs/development/python-modules/onecache/default.nix +++ b/pkgs/development/python-modules/onecache/default.nix @@ -32,7 +32,7 @@ buildPythonPackage rec { pytest-asyncio ]; - disabledTests = lib.optionals stdenv.isDarwin [ + disabledTests = lib.optionals stdenv.hostPlatform.isDarwin [ # test fails due to unknown reason on darwin "test_lru_and_ttl_refresh" ]; diff --git a/pkgs/development/python-modules/onnx/default.nix b/pkgs/development/python-modules/onnx/default.nix index a0cc441e2e50..f8bdd75368a1 100644 --- a/pkgs/development/python-modules/onnx/default.nix +++ b/pkgs/development/python-modules/onnx/default.nix @@ -123,7 +123,7 @@ buildPythonPackage rec { "test_vgg19_cpu" "test_zfnet512_cpu" ] - ++ lib.optionals stdenv.isAarch64 [ + ++ lib.optionals stdenv.hostPlatform.isAarch64 [ # AssertionError: Output 0 of test 0 in folder "test__pytorch_converted_Conv2d_depthwise_padded" "test__pytorch_converted_Conv2d_dilated" diff --git a/pkgs/development/python-modules/onnxruntime/default.nix b/pkgs/development/python-modules/onnxruntime/default.nix index c0227ee831f0..48c342c1626f 100644 --- a/pkgs/development/python-modules/onnxruntime/default.nix +++ b/pkgs/development/python-modules/onnxruntime/default.nix @@ -35,7 +35,7 @@ buildPythonPackage { chmod +w dist ''; - nativeBuildInputs = lib.optionals stdenv.isLinux [ autoPatchelfHook ]; + nativeBuildInputs = lib.optionals stdenv.hostPlatform.isLinux [ autoPatchelfHook ]; # This project requires fairly large dependencies such as sympy which we really don't always need. pythonRemoveDeps = [ diff --git a/pkgs/development/python-modules/open-clip-torch/default.nix b/pkgs/development/python-modules/open-clip-torch/default.nix index dc3bf4d78591..a315c3d0d070 100644 --- a/pkgs/development/python-modules/open-clip-torch/default.nix +++ b/pkgs/development/python-modules/open-clip-torch/default.nix @@ -79,7 +79,7 @@ buildPythonPackage rec { # fails due to type errors "test_num_shards" ] - ++ lib.optionals (stdenv.isAarch64 && stdenv.isLinux) [ + ++ lib.optionals (stdenv.hostPlatform.isAarch64 && stdenv.hostPlatform.isLinux) [ "test_training" "test_training_coca" "test_training_unfreezing_vit" diff --git a/pkgs/development/python-modules/opensfm/default.nix b/pkgs/development/python-modules/opensfm/default.nix index bd5b97ab2852..bfaa8b8f1b73 100644 --- a/pkgs/development/python-modules/opensfm/default.nix +++ b/pkgs/development/python-modules/opensfm/default.nix @@ -113,7 +113,7 @@ buildPythonPackage rec { [ "test_run_all" # Matplotlib issues. Broken integration is less useless than a broken build ] - ++ lib.optionals stdenv.isDarwin [ + ++ lib.optionals stdenv.hostPlatform.isDarwin [ "test_reconstruction_incremental" "test_reconstruction_triangulation" ]; @@ -121,7 +121,7 @@ buildPythonPackage rec { pythonImportsCheck = [ "opensfm" ]; meta = { - broken = stdenv.isDarwin; + broken = stdenv.hostPlatform.isDarwin; maintainers = [ lib.maintainers.SomeoneSerge ]; license = lib.licenses.bsd2; changelog = "https://github.com/mapillary/OpenSfM/blob/${src.rev}/CHANGELOG.md"; diff --git a/pkgs/development/python-modules/openstacksdk/tests.nix b/pkgs/development/python-modules/openstacksdk/tests.nix index be333be87665..c5bbc68e3d6c 100644 --- a/pkgs/development/python-modules/openstacksdk/tests.nix +++ b/pkgs/development/python-modules/openstacksdk/tests.nix @@ -39,7 +39,7 @@ buildPythonPackage { '' stestr run -e <(echo " '' - + lib.optionalString stdenv.isAarch64 '' + + lib.optionalString stdenv.hostPlatform.isAarch64 '' openstack.tests.unit.cloud.test_baremetal_node.TestBaremetalNode.test_node_set_provision_state_with_retries openstack.tests.unit.cloud.test_role_assignment.TestRoleAssignment.test_grant_role_user_domain_exists openstack.tests.unit.cloud.test_volume_backups.TestVolumeBackups.test_delete_volume_backup_force diff --git a/pkgs/development/python-modules/opentelemetry-instrumentation-grpc/default.nix b/pkgs/development/python-modules/opentelemetry-instrumentation-grpc/default.nix index 9cf347c046ac..26bde1eaae5e 100644 --- a/pkgs/development/python-modules/opentelemetry-instrumentation-grpc/default.nix +++ b/pkgs/development/python-modules/opentelemetry-instrumentation-grpc/default.nix @@ -52,7 +52,7 @@ buildPythonPackage { pytestCheckHook ]; - disabledTests = lib.optionals stdenv.isDarwin [ + disabledTests = lib.optionals stdenv.hostPlatform.isDarwin [ # RuntimeError: Failed to bind to address "TestOpenTelemetryServerInterceptorUnix" ]; diff --git a/pkgs/development/python-modules/openusd/default.nix b/pkgs/development/python-modules/openusd/default.nix index f281bc352d1b..0849ce8dfd7a 100644 --- a/pkgs/development/python-modules/openusd/default.nix +++ b/pkgs/development/python-modules/openusd/default.nix @@ -60,7 +60,7 @@ buildPythonPackage rec { hash = "sha256-akwLIB5YUbnDiaQXX/K5YLXzWlTYWZG51dtxbSFxPt0="; }; - stdenv = if python.stdenv.isDarwin then darwin.apple_sdk_11_0.stdenv else python.stdenv; + stdenv = if python.stdenv.hostPlatform.isDarwin then darwin.apple_sdk_11_0.stdenv else python.stdenv; outputs = [ "out" ] ++ lib.optional withDocs "doc"; @@ -92,7 +92,7 @@ buildPythonPackage rec { (lib.cmakeBool "PXR_BUILD_USDVIEW" withUsdView) (lib.cmakeBool "PXR_BUILD_USD_TOOLS" withTools) (lib.cmakeBool "PXR_ENABLE_MATERIALX_SUPPORT" true) - (lib.cmakeBool "PXR_ENABLE_OSL_SUPPORT" (!stdenv.isDarwin && withOsl)) + (lib.cmakeBool "PXR_ENABLE_OSL_SUPPORT" (!stdenv.hostPlatform.isDarwin && withOsl)) ]; nativeBuildInputs = @@ -124,15 +124,15 @@ buildPythonPackage rec { ptex tbb ] - ++ lib.optionals stdenv.isLinux [ + ++ lib.optionals stdenv.hostPlatform.isLinux [ libGL libX11 libXt ] - ++ lib.optionals stdenv.isDarwin (with darwin.apple_sdk_11_0.frameworks; [ Cocoa ]) + ++ lib.optionals stdenv.hostPlatform.isDarwin (with darwin.apple_sdk_11_0.frameworks; [ Cocoa ]) ++ lib.optionals withOsl [ osl ] ++ lib.optionals withUsdView [ qt6.qtbase ] - ++ lib.optionals (withUsdView && stdenv.isLinux) [ + ++ lib.optionals (withUsdView && stdenv.hostPlatform.isLinux) [ qt6.qtbase qt6.qtwayland ]; diff --git a/pkgs/development/python-modules/orange-canvas-core/default.nix b/pkgs/development/python-modules/orange-canvas-core/default.nix index 523e4f857af2..3db1f35784bd 100644 --- a/pkgs/development/python-modules/orange-canvas-core/default.nix +++ b/pkgs/development/python-modules/orange-canvas-core/default.nix @@ -94,6 +94,6 @@ buildPythonPackage rec { license = [ lib.licenses.gpl3 ]; maintainers = [ lib.maintainers.lucasew ]; # Segmentation fault during tests - broken = stdenv.isDarwin; + broken = stdenv.hostPlatform.isDarwin; }; } diff --git a/pkgs/development/python-modules/orange-widget-base/default.nix b/pkgs/development/python-modules/orange-widget-base/default.nix index 50a1e956919a..28c97fdb4238 100644 --- a/pkgs/development/python-modules/orange-widget-base/default.nix +++ b/pkgs/development/python-modules/orange-widget-base/default.nix @@ -32,7 +32,7 @@ buildPythonPackage rec { pyqtgraph pyqtwebengine typing-extensions - ] ++ lib.optionals stdenv.isDarwin [ appnope ]; + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ appnope ]; pythonImportsCheck = [ "orangewidget" ]; diff --git a/pkgs/development/python-modules/orbax-checkpoint/default.nix b/pkgs/development/python-modules/orbax-checkpoint/default.nix index ccf370682b5b..511542d0a490 100644 --- a/pkgs/development/python-modules/orbax-checkpoint/default.nix +++ b/pkgs/development/python-modules/orbax-checkpoint/default.nix @@ -75,7 +75,7 @@ buildPythonPackage rec { "orbax.checkpoint" ]; - disabledTests = lib.optionals stdenv.isDarwin [ + disabledTests = lib.optionals stdenv.hostPlatform.isDarwin [ # Probably failing because of a filesystem impurity # self.assertFalse(os.path.exists(dst_dir)) # AssertionError: True is not false diff --git a/pkgs/development/python-modules/orjson/default.nix b/pkgs/development/python-modules/orjson/default.nix index 650d8a634d51..9fd8fe941adb 100644 --- a/pkgs/development/python-modules/orjson/default.nix +++ b/pkgs/development/python-modules/orjson/default.nix @@ -58,7 +58,7 @@ buildPythonPackage rec { maturinBuildHook ]); - buildInputs = lib.optionals stdenv.isDarwin [ libiconv ]; + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ libiconv ]; nativeCheckInputs = [ numpy diff --git a/pkgs/development/python-modules/osc/default.nix b/pkgs/development/python-modules/osc/default.nix index f794b91fb0cb..bb16aa7d40e0 100644 --- a/pkgs/development/python-modules/osc/default.nix +++ b/pkgs/development/python-modules/osc/default.nix @@ -49,7 +49,7 @@ buildPythonPackage rec { preCheck = "HOME=$TOP/tmp"; meta = with lib; { - broken = stdenv.isDarwin; + broken = stdenv.hostPlatform.isDarwin; homepage = "https://github.com/openSUSE/osc"; description = "opensuse-commander with svn like handling"; mainProgram = "osc"; diff --git a/pkgs/development/python-modules/oscrypto/default.nix b/pkgs/development/python-modules/oscrypto/default.nix index fe80b0ac42d4..ef90df289af6 100644 --- a/pkgs/development/python-modules/oscrypto/default.nix +++ b/pkgs/development/python-modules/oscrypto/default.nix @@ -48,7 +48,7 @@ buildPythonPackage rec { pythonImportsCheck = [ "oscrypto" ]; - doCheck = !stdenv.isDarwin; + doCheck = !stdenv.hostPlatform.isDarwin; disabledTests = [ # Tests require network access diff --git a/pkgs/development/python-modules/oslo-log/default.nix b/pkgs/development/python-modules/oslo-log/default.nix index b6cdf9661953..81a9bd5b8e4b 100644 --- a/pkgs/development/python-modules/oslo-log/default.nix +++ b/pkgs/development/python-modules/oslo-log/default.nix @@ -39,7 +39,7 @@ buildPythonPackage rec { oslo-utils pbr python-dateutil - ] ++ lib.optionals stdenv.isLinux [ pyinotify ]; + ] ++ lib.optionals stdenv.hostPlatform.isLinux [ pyinotify ]; nativeCheckInputs = [ eventlet diff --git a/pkgs/development/python-modules/ospd/default.nix b/pkgs/development/python-modules/ospd/default.nix index e18bc804cfda..ad9bb84c747e 100644 --- a/pkgs/development/python-modules/ospd/default.nix +++ b/pkgs/development/python-modules/ospd/default.nix @@ -17,7 +17,7 @@ buildPythonPackage rec { version = "21.4.4"; format = "setuptools"; - disabled = pythonOlder "3.7" || stdenv.isDarwin; + disabled = pythonOlder "3.7" || stdenv.hostPlatform.isDarwin; src = fetchFromGitHub { owner = "greenbone"; diff --git a/pkgs/development/python-modules/osxphotos/default.nix b/pkgs/development/python-modules/osxphotos/default.nix index ab4f7e0c0520..0af996f622a8 100644 --- a/pkgs/development/python-modules/osxphotos/default.nix +++ b/pkgs/development/python-modules/osxphotos/default.nix @@ -107,6 +107,6 @@ buildPythonPackage rec { changelog = "https://github.com/RhetTbull/osxphotos/blob/${src.rev}/CHANGELOG.md"; license = lib.licenses.mit; maintainers = with lib.maintainers; [ sigmanificient ]; - broken = stdenv.isDarwin; + broken = stdenv.hostPlatform.isDarwin; }; } diff --git a/pkgs/development/python-modules/overly/default.nix b/pkgs/development/python-modules/overly/default.nix index f234c910865e..ea3b291700a0 100644 --- a/pkgs/development/python-modules/overly/default.nix +++ b/pkgs/development/python-modules/overly/default.nix @@ -36,6 +36,6 @@ buildPythonPackage rec { homepage = "https://github.com/theelous3/overly"; license = lib.licenses.mit; maintainers = with lib.maintainers; [ dotlambda ]; - broken = stdenv.isDarwin; # https://github.com/theelous3/overly/issues/2 + broken = stdenv.hostPlatform.isDarwin; # https://github.com/theelous3/overly/issues/2 }; } diff --git a/pkgs/development/python-modules/paddlepaddle/default.nix b/pkgs/development/python-modules/paddlepaddle/default.nix index 238880794042..8263ae8ec8c5 100644 --- a/pkgs/development/python-modules/paddlepaddle/default.nix +++ b/pkgs/development/python-modules/paddlepaddle/default.nix @@ -76,7 +76,7 @@ buildPythonPackage { ) ); - postFixup = lib.optionalString stdenv.isLinux '' + postFixup = lib.optionalString stdenv.hostPlatform.isLinux '' function fixRunPath { p=$(patchelf --print-rpath $1) patchelf --set-rpath "$p:$libraryPath" $1 diff --git a/pkgs/development/python-modules/paho-mqtt/1.nix b/pkgs/development/python-modules/paho-mqtt/1.nix index 83582102767b..437f7899fad0 100644 --- a/pkgs/development/python-modules/paho-mqtt/1.nix +++ b/pkgs/development/python-modules/paho-mqtt/1.nix @@ -26,7 +26,7 @@ buildPythonPackage rec { six ] ++ lib.optionals (!isPy3k) [ mock ]; - doCheck = !stdenv.isDarwin; + doCheck = !stdenv.hostPlatform.isDarwin; pythonImportsCheck = [ "paho.mqtt" ]; diff --git a/pkgs/development/python-modules/paho-mqtt/default.nix b/pkgs/development/python-modules/paho-mqtt/default.nix index 437aa9884beb..890cf28a7462 100644 --- a/pkgs/development/python-modules/paho-mqtt/default.nix +++ b/pkgs/development/python-modules/paho-mqtt/default.nix @@ -37,7 +37,7 @@ in buildPythonPackage rec { pytestCheckHook ]; - doCheck = !stdenv.isDarwin; + doCheck = !stdenv.hostPlatform.isDarwin; pythonImportsCheck = [ "paho.mqtt" ]; diff --git a/pkgs/development/python-modules/pandas-stubs/default.nix b/pkgs/development/python-modules/pandas-stubs/default.nix index 62cefd16c3cd..f216673fc7f0 100644 --- a/pkgs/development/python-modules/pandas-stubs/default.nix +++ b/pkgs/development/python-modules/pandas-stubs/default.nix @@ -89,10 +89,10 @@ buildPythonPackage rec { "test_timedelta_cmp" "test_timestamp_cmp" ] - ++ lib.optionals stdenv.isDarwin [ + ++ lib.optionals stdenv.hostPlatform.isDarwin [ "test_clipboard" # FileNotFoundError: [Errno 2] No such file or directory: 'pbcopy' ] - ++ lib.optionals (stdenv.isDarwin && stdenv.isAarch64) [ + ++ lib.optionals (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isAarch64) [ # Disable tests for types that are not supported on aarch64 in `numpy` < 2.0 "test_astype_float" # `f16` and `float128` "test_astype_complex" # `c32` and `complex256` diff --git a/pkgs/development/python-modules/pandas/default.nix b/pkgs/development/python-modules/pandas/default.nix index 3323c5c9a83b..83103314bd83 100644 --- a/pkgs/development/python-modules/pandas/default.nix +++ b/pkgs/development/python-modules/pandas/default.nix @@ -184,11 +184,11 @@ let pytestCheckHook ] ++ lib.flatten (lib.attrValues passthru.optional-dependencies) - ++ lib.optionals (stdenv.isLinux) [ + ++ lib.optionals (stdenv.hostPlatform.isLinux) [ # for locale executable glibc ] - ++ lib.optionals (stdenv.isDarwin) [ + ++ lib.optionals (stdenv.hostPlatform.isDarwin) [ # for locale executable adv_cmds ]; @@ -213,13 +213,13 @@ let # AssertionError: Did not see expected warning of class 'FutureWarning' "test_parsing_tzlocal_deprecated" ] - ++ lib.optionals (stdenv.isDarwin && stdenv.isAarch64) [ + ++ lib.optionals (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isAarch64) [ # tests/generic/test_finalize.py::test_binops[and_-args4-right] - AssertionError: assert {} == {'a': 1} "test_binops" # These tests are unreliable on aarch64-darwin. See https://github.com/pandas-dev/pandas/issues/38921. "test_rolling" ] - ++ lib.optional stdenv.is32bit [ + ++ lib.optional stdenv.hostPlatform.is32bit [ # https://github.com/pandas-dev/pandas/issues/37398 "test_rolling_var_numerical_issues" ]; @@ -234,7 +234,7 @@ let '' # TODO: Get locale and clipboard support working on darwin. # Until then we disable the tests. - + lib.optionalString stdenv.isDarwin '' + + lib.optionalString stdenv.hostPlatform.isDarwin '' # Fake the impure dependencies pbpaste and pbcopy echo "#!${runtimeShell}" > pbcopy echo "#!${runtimeShell}" > pbpaste @@ -246,7 +246,7 @@ let meta = with lib; { # pandas devs no longer test i686, it's commonly broken - # broken = stdenv.isi686; + # broken = stdenv.hostPlatform.isi686; changelog = "https://pandas.pydata.org/docs/whatsnew/index.html"; description = "Powerful data structures for data analysis, time series, and statistics"; downloadPage = "https://github.com/pandas-dev/pandas"; diff --git a/pkgs/development/python-modules/papermill/default.nix b/pkgs/development/python-modules/papermill/default.nix index 2a5352b9d058..3c310b72b28b 100644 --- a/pkgs/development/python-modules/papermill/default.nix +++ b/pkgs/development/python-modules/papermill/default.nix @@ -91,7 +91,7 @@ buildPythonPackage rec { # pytest 8 compat "test_read_with_valid_file_extension" ] - ++ lib.optionals stdenv.isDarwin [ + ++ lib.optionals stdenv.hostPlatform.isDarwin [ # might fail due to the sandbox "test_end2end_autosave_slow_notebook" ]; diff --git a/pkgs/development/python-modules/papis/default.nix b/pkgs/development/python-modules/papis/default.nix index 06c4f97cde5e..f7f36edfb201 100644 --- a/pkgs/development/python-modules/papis/default.nix +++ b/pkgs/development/python-modules/papis/default.nix @@ -100,7 +100,7 @@ buildPythonPackage rec { "test_valid_dblp_key" "test_validate_arxivid" "test_yaml" - ] ++ lib.optionals stdenv.isDarwin [ "test_default_opener" ]; + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ "test_default_opener" ]; pythonImportsCheck = [ "papis" ]; diff --git a/pkgs/development/python-modules/patool/default.nix b/pkgs/development/python-modules/patool/default.nix index feaef66da2b7..fa0ae199bd74 100644 --- a/pkgs/development/python-modules/patool/default.nix +++ b/pkgs/development/python-modules/patool/default.nix @@ -61,7 +61,7 @@ buildPythonPackage rec { "test_unzip_file" "test_zip" "test_zip_file" - ] ++ lib.optionals stdenv.isDarwin [ "test_ar" ]; + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ "test_ar" ]; meta = with lib; { description = "portable archive file manager"; diff --git a/pkgs/development/python-modules/pdf2docx/default.nix b/pkgs/development/python-modules/pdf2docx/default.nix index af91594808b5..12d347227a9b 100644 --- a/pkgs/development/python-modules/pdf2docx/default.nix +++ b/pkgs/development/python-modules/pdf2docx/default.nix @@ -49,7 +49,7 @@ buildPythonPackage { python-docx ]; - postInstall = lib.optionalString stdenv.isLinux '' + postInstall = lib.optionalString stdenv.hostPlatform.isLinux '' # on linux the icon file can only be xbm format convert $out/${python.sitePackages}/pdf2docx/gui/icon.ico \ $out/${python.sitePackages}/pdf2docx/gui/icon.xbm diff --git a/pkgs/development/python-modules/pdoc-pyo3-sample-library/default.nix b/pkgs/development/python-modules/pdoc-pyo3-sample-library/default.nix index 3a653ec5f49a..9e74fa519175 100644 --- a/pkgs/development/python-modules/pdoc-pyo3-sample-library/default.nix +++ b/pkgs/development/python-modules/pdoc-pyo3-sample-library/default.nix @@ -32,7 +32,7 @@ buildPythonPackage rec { rustc ]; - buildInputs = lib.optionals stdenv.isDarwin [ libiconv ]; + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ libiconv ]; pythonImportsCheck = [ "pdoc_pyo3_sample_library" ]; diff --git a/pkgs/development/python-modules/pebble/default.nix b/pkgs/development/python-modules/pebble/default.nix index 827e45f12590..ea618df3293f 100644 --- a/pkgs/development/python-modules/pebble/default.nix +++ b/pkgs/development/python-modules/pebble/default.nix @@ -22,7 +22,7 @@ buildPythonPackage rec { nativeCheckInputs = [ pytestCheckHook ]; - doCheck = !stdenv.isDarwin; + doCheck = !stdenv.hostPlatform.isDarwin; pythonImportsCheck = [ "pebble" ]; diff --git a/pkgs/development/python-modules/pendulum/default.nix b/pkgs/development/python-modules/pendulum/default.nix index 627769ff18c8..bd74e66c6915 100644 --- a/pkgs/development/python-modules/pendulum/default.nix +++ b/pkgs/development/python-modules/pendulum/default.nix @@ -60,7 +60,7 @@ buildPythonPackage rec { rustPlatform.cargoSetupHook ]; - buildInputs = lib.optionals stdenv.isDarwin [ iconv ]; + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ iconv ]; propagatedBuildInputs = [ @@ -82,7 +82,7 @@ buildPythonPackage rec { disabledTestPaths = [ "tests/benchmarks" ] - ++ lib.optionals stdenv.isDarwin [ + ++ lib.optionals stdenv.hostPlatform.isDarwin [ # PermissionError: [Errno 1] Operation not permitted: '/etc/localtime' "tests/testing/test_time_travel.py" ]; diff --git a/pkgs/development/python-modules/perfplot/default.nix b/pkgs/development/python-modules/perfplot/default.nix index 78cd6bdaf999..e71358857354 100644 --- a/pkgs/development/python-modules/perfplot/default.nix +++ b/pkgs/development/python-modules/perfplot/default.nix @@ -37,7 +37,7 @@ buildPythonPackage rec { # This variable is needed to suppress the "Trace/BPT trap: 5" error in Darwin's checkPhase. # Not sure of the details, but we can avoid it by changing the matplotlib backend during testing. - env.MPLBACKEND = lib.optionalString stdenv.isDarwin "Agg"; + env.MPLBACKEND = lib.optionalString stdenv.hostPlatform.isDarwin "Agg"; nativeCheckInputs = [ pytestCheckHook ]; diff --git a/pkgs/development/python-modules/pettingzoo/default.nix b/pkgs/development/python-modules/pettingzoo/default.nix index 1e03c7734dde..9bb487e85630 100644 --- a/pkgs/development/python-modules/pettingzoo/default.nix +++ b/pkgs/development/python-modules/pettingzoo/default.nix @@ -117,7 +117,7 @@ buildPythonPackage rec { # ImportError: cannot import name 'pytest_plugins' from 'pettingzoo.classic' "test_chess" ] - ++ lib.optionals stdenv.isDarwin [ + ++ lib.optionals stdenv.hostPlatform.isDarwin [ # Crashes on darwin: `Fatal Python error: Aborted` "test_multi_episode_parallel_env_wrapper" ]; diff --git a/pkgs/development/python-modules/pgcli/default.nix b/pkgs/development/python-modules/pgcli/default.nix index 38bbed27eef5..ce812bcdf225 100644 --- a/pkgs/development/python-modules/pgcli/default.nix +++ b/pkgs/development/python-modules/pgcli/default.nix @@ -56,7 +56,7 @@ buildPythonPackage rec { disabledTests = [ # requires running postgres "test_application_name_in_env" - ] ++ lib.optionals stdenv.isDarwin [ "test_application_name_db_uri" ]; + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ "test_application_name_db_uri" ]; meta = with lib; { description = "Command-line interface for PostgreSQL"; diff --git a/pkgs/development/python-modules/picosvg/default.nix b/pkgs/development/python-modules/picosvg/default.nix index 2e938d5115d8..f147b22ad97e 100644 --- a/pkgs/development/python-modules/picosvg/default.nix +++ b/pkgs/development/python-modules/picosvg/default.nix @@ -32,7 +32,7 @@ buildPythonPackage rec { nativeCheckInputs = [ pytestCheckHook ]; # a few tests are failing on aarch64 - doCheck = !stdenv.isAarch64; + doCheck = !stdenv.hostPlatform.isAarch64; meta = with lib; { description = "Tool to simplify SVGs"; diff --git a/pkgs/development/python-modules/pillow-heif/default.nix b/pkgs/development/python-modules/pillow-heif/default.nix index d512839a797c..5c8488b9f17c 100644 --- a/pkgs/development/python-modules/pillow-heif/default.nix +++ b/pkgs/development/python-modules/pillow-heif/default.nix @@ -90,12 +90,12 @@ buildPythonPackage rec { # Time based "test_decode_threads" ] - ++ lib.optionals stdenv.isDarwin [ + ++ lib.optionals stdenv.hostPlatform.isDarwin [ # https://github.com/bigcat88/pillow_heif/issues/89 # not reproducible in nixpkgs "test_opencv_crash" ] - ++ lib.optionals (stdenv.isLinux && stdenv.isAarch64) [ + ++ lib.optionals (stdenv.hostPlatform.isLinux && stdenv.hostPlatform.isAarch64) [ # RuntimeError: Encoder plugin generated an error: Unsupported bit depth: Bit depth not supported by x265 "test_open_heif_compare_non_standard_modes_data" "test_open_save_disable_16bit" diff --git a/pkgs/development/python-modules/pillow-simd/default.nix b/pkgs/development/python-modules/pillow-simd/default.nix index e913a10b4fbf..79b046f50cc6 100644 --- a/pkgs/development/python-modules/pillow-simd/default.nix +++ b/pkgs/development/python-modules/pillow-simd/default.nix @@ -44,7 +44,7 @@ import ../pillow/generic.nix ( }; meta = with lib; { - broken = (stdenv.isLinux && stdenv.isAarch64) || stdenv.isDarwin; + broken = (stdenv.hostPlatform.isLinux && stdenv.hostPlatform.isAarch64) || stdenv.hostPlatform.isDarwin; homepage = "https://python-pillow.github.io/pillow-perf/"; description = "Friendly PIL fork - SIMD version"; longDescription = '' diff --git a/pkgs/development/python-modules/pillow/generic.nix b/pkgs/development/python-modules/pillow/generic.nix index 36fe5b0421fe..1ecaea6b205d 100644 --- a/pkgs/development/python-modules/pillow/generic.nix +++ b/pkgs/development/python-modules/pillow/generic.nix @@ -37,7 +37,7 @@ buildPythonPackage rec { "test_basic" "test_custom_metadata" ] - ++ lib.optionals stdenv.isDarwin [ + ++ lib.optionals stdenv.hostPlatform.isDarwin [ # Disable darwin tests which require executables: `iconutil` and `screencapture` "test_grab" "test_grabclipboard" diff --git a/pkgs/development/python-modules/pint-pandas/default.nix b/pkgs/development/python-modules/pint-pandas/default.nix index 3e7f18366266..67e1f109c8e0 100644 --- a/pkgs/development/python-modules/pint-pandas/default.nix +++ b/pkgs/development/python-modules/pint-pandas/default.nix @@ -40,7 +40,7 @@ buildPythonPackage rec { nativeCheckInputs = [ pytestCheckHook ]; meta = { - broken = stdenv.isDarwin; + broken = stdenv.hostPlatform.isDarwin; description = "Pandas support for pint"; license = lib.licenses.bsd3; homepage = "https://github.com/hgrecco/pint-pandas"; diff --git a/pkgs/development/python-modules/pip-tools/default.nix b/pkgs/development/python-modules/pip-tools/default.nix index 10f83a4203d8..9d44c2e383e0 100644 --- a/pkgs/development/python-modules/pip-tools/default.nix +++ b/pkgs/development/python-modules/pip-tools/default.nix @@ -50,7 +50,7 @@ buildPythonPackage rec { tomli-w ]; - preCheck = lib.optionalString (stdenv.isDarwin && stdenv.isAarch64) '' + preCheck = lib.optionalString (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isAarch64) '' # https://github.com/python/cpython/issues/74570#issuecomment-1093748531 export no_proxy='*'; ''; diff --git a/pkgs/development/python-modules/playwright/default.nix b/pkgs/development/python-modules/playwright/default.nix index 6ad0fe9b1dc6..e27e2a33ca30 100644 --- a/pkgs/development/python-modules/playwright/default.nix +++ b/pkgs/development/python-modules/playwright/default.nix @@ -74,7 +74,7 @@ buildPythonPackage rec { git setuptools-scm setuptools - ] ++ lib.optionals stdenv.isLinux [ auditwheel ]; + ] ++ lib.optionals stdenv.hostPlatform.isLinux [ auditwheel ]; pythonRelaxDeps = [ "pyee" ]; @@ -99,7 +99,7 @@ buildPythonPackage rec { driver = playwright-driver; browsers = playwright-driver.browsers; } - // lib.optionalAttrs stdenv.isLinux { + // lib.optionalAttrs stdenv.hostPlatform.isLinux { inherit (nixosTests) playwright-python; }; updateScript = ./update.sh; diff --git a/pkgs/development/python-modules/plyer/default.nix b/pkgs/development/python-modules/plyer/default.nix index 6a77e4a56005..f0398ac86235 100644 --- a/pkgs/development/python-modules/plyer/default.nix +++ b/pkgs/development/python-modules/plyer/default.nix @@ -54,7 +54,7 @@ buildPythonPackage rec { pythonImportsCheck = [ "plyer" ]; meta = with lib; { - broken = stdenv.isDarwin; + broken = stdenv.hostPlatform.isDarwin; description = "Plyer is a platform-independent api to use features commonly found on various platforms"; homepage = "https://github.com/kivy/plyer"; license = licenses.mit; diff --git a/pkgs/development/python-modules/polars/default.nix b/pkgs/development/python-modules/polars/default.nix index 7535ae218c54..a1eeda11a3af 100644 --- a/pkgs/development/python-modules/polars/default.nix +++ b/pkgs/development/python-modules/polars/default.nix @@ -70,7 +70,7 @@ buildPythonPackage rec { buildInputs = [ rust-jemalloc-sys' ] - ++ lib.optionals stdenv.isDarwin [ + ++ lib.optionals stdenv.hostPlatform.isDarwin [ libiconv darwin.apple_sdk.frameworks.AppKit darwin.apple_sdk.frameworks.Security diff --git a/pkgs/development/python-modules/powerline/default.nix b/pkgs/development/python-modules/powerline/default.nix index 6e1f724a35dd..76bab717715f 100644 --- a/pkgs/development/python-modules/powerline/default.nix +++ b/pkgs/development/python-modules/powerline/default.nix @@ -31,7 +31,7 @@ buildPythonPackage rec { python-hglib pygit2 pyuv - ] ++ lib.optionals (!stdenv.isDarwin) [ i3ipc ]; + ] ++ lib.optionals (!stdenv.hostPlatform.isDarwin) [ i3ipc ]; # tests are travis-specific doCheck = false; diff --git a/pkgs/development/python-modules/ppft/default.nix b/pkgs/development/python-modules/ppft/default.nix index 53eaa5657e7a..a2672cc5e45e 100644 --- a/pkgs/development/python-modules/ppft/default.nix +++ b/pkgs/development/python-modules/ppft/default.nix @@ -23,7 +23,7 @@ buildPythonPackage rec { propagatedBuildInputs = [ six ]; # darwin seems to hang - doCheck = !stdenv.isDarwin; + doCheck = !stdenv.hostPlatform.isDarwin; checkPhase = '' runHook preCheck diff --git a/pkgs/development/python-modules/pre-commit-hooks/default.nix b/pkgs/development/python-modules/pre-commit-hooks/default.nix index 646d2b343518..55058f846d08 100644 --- a/pkgs/development/python-modules/pre-commit-hooks/default.nix +++ b/pkgs/development/python-modules/pre-commit-hooks/default.nix @@ -33,7 +33,7 @@ buildPythonPackage rec { # Note: this is not likely to ever work on Darwin # https://github.com/pre-commit/pre-commit-hooks/pull/655 - doCheck = !stdenv.isDarwin; + doCheck = !stdenv.hostPlatform.isDarwin; # the tests require a functional git installation which requires a valid HOME # directory. diff --git a/pkgs/development/python-modules/primer3/default.nix b/pkgs/development/python-modules/primer3/default.nix index 336042e595d4..83f57c4a70e3 100644 --- a/pkgs/development/python-modules/primer3/default.nix +++ b/pkgs/development/python-modules/primer3/default.nix @@ -28,7 +28,7 @@ buildPythonPackage rec { nativeBuildInputs = [ cython setuptools - ] ++ lib.optionals stdenv.isDarwin [ gcc ]; + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ gcc ]; nativeCheckInputs = [ click diff --git a/pkgs/development/python-modules/prox-tv/default.nix b/pkgs/development/python-modules/prox-tv/default.nix index 7502d2daf3cc..ee2862361081 100644 --- a/pkgs/development/python-modules/prox-tv/default.nix +++ b/pkgs/development/python-modules/prox-tv/default.nix @@ -41,7 +41,7 @@ buildPythonPackage { nativeCheckInputs = [ pytestCheckHook ]; - disabledTests = [ "test_tvp_1d" ] ++ lib.optionals stdenv.isDarwin [ "test_tv2_1d" ]; + disabledTests = [ "test_tvp_1d" ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ "test_tv2_1d" ]; meta = with lib; { homepage = "https://github.com/albarji/proxTV"; diff --git a/pkgs/development/python-modules/psrpcore/default.nix b/pkgs/development/python-modules/psrpcore/default.nix index 72c8da5f5407..8003780b86c2 100644 --- a/pkgs/development/python-modules/psrpcore/default.nix +++ b/pkgs/development/python-modules/psrpcore/default.nix @@ -43,6 +43,6 @@ buildPythonPackage rec { changelog = "https://github.com/jborean93/psrpcore/blob/v${version}/CHANGELOG.md"; license = licenses.mit; maintainers = with maintainers; [ fab ]; - broken = stdenv.isDarwin; + broken = stdenv.hostPlatform.isDarwin; }; } diff --git a/pkgs/development/python-modules/psutil/default.nix b/pkgs/development/python-modules/psutil/default.nix index 4c0a93d2faa4..ee3f390b79af 100644 --- a/pkgs/development/python-modules/psutil/default.nix +++ b/pkgs/development/python-modules/psutil/default.nix @@ -34,14 +34,14 @@ buildPythonPackage rec { buildInputs = # workaround for https://github.com/NixOS/nixpkgs/issues/146760 - lib.optionals (stdenv.isDarwin && stdenv.isx86_64) [ CoreFoundation ] - ++ lib.optionals stdenv.isDarwin [ IOKit ]; + lib.optionals (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isx86_64) [ CoreFoundation ] + ++ lib.optionals stdenv.hostPlatform.isDarwin [ IOKit ]; nativeCheckInputs = [ pytestCheckHook ]; # Segfaults on darwin: # https://github.com/giampaolo/psutil/issues/1715 - doCheck = !stdenv.isDarwin; + doCheck = !stdenv.hostPlatform.isDarwin; # In addition to the issues listed above there are some that occure due to # our sandboxing which we can work around by disabling some tests: diff --git a/pkgs/development/python-modules/psycopg/default.nix b/pkgs/development/python-modules/psycopg/default.nix index e74f113f3c84..aaaf362eab3a 100644 --- a/pkgs/development/python-modules/psycopg/default.nix +++ b/pkgs/development/python-modules/psycopg/default.nix @@ -174,7 +174,7 @@ buildPythonPackage rec { pytestCheckHook postgresql ] - ++ lib.optional (stdenv.isLinux) postgresqlTestHook + ++ lib.optional (stdenv.hostPlatform.isLinux) postgresqlTestHook ++ passthru.optional-dependencies.c ++ passthru.optional-dependencies.pool; @@ -188,7 +188,7 @@ buildPythonPackage rec { '' cd .. '' - + lib.optionalString (stdenv.isLinux) '' + + lib.optionalString (stdenv.hostPlatform.isLinux) '' export PSYCOPG_TEST_DSN="host=/build/run/postgresql user=$PGUSER" ''; diff --git a/pkgs/development/python-modules/psycopg2/default.nix b/pkgs/development/python-modules/psycopg2/default.nix index c8959b948fd7..aaab94547a02 100644 --- a/pkgs/development/python-modules/psycopg2/default.nix +++ b/pkgs/development/python-modules/psycopg2/default.nix @@ -45,7 +45,7 @@ buildPythonPackage rec { sphinx-better-theme ]; - buildInputs = [ postgresql ] ++ lib.optionals stdenv.isDarwin [ openssl ]; + buildInputs = [ postgresql ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ openssl ]; sphinxRoot = "doc/src"; diff --git a/pkgs/development/python-modules/psycopg2cffi/default.nix b/pkgs/development/python-modules/psycopg2cffi/default.nix index b8c86c970a84..4201bd154071 100644 --- a/pkgs/development/python-modules/psycopg2cffi/default.nix +++ b/pkgs/development/python-modules/psycopg2cffi/default.nix @@ -40,7 +40,7 @@ buildPythonPackage rec { ]; # FATAL: could not create shared memory segment: Operation not permitted - doCheck = !stdenv.isDarwin; + doCheck = !stdenv.hostPlatform.isDarwin; nativeCheckInputs = [ postgresqlTestHook diff --git a/pkgs/development/python-modules/pwntools/default.nix b/pkgs/development/python-modules/pwntools/default.nix index 390c65120854..6874fd866e82 100644 --- a/pkgs/development/python-modules/pwntools/default.nix +++ b/pkgs/development/python-modules/pwntools/default.nix @@ -82,7 +82,7 @@ buildPythonPackage rec { installShellCompletion --bash extra/bash_completion.d/shellcraft ''; - postFixup = lib.optionalString (!stdenv.isDarwin) '' + postFixup = lib.optionalString (!stdenv.hostPlatform.isDarwin) '' mkdir -p "$out/bin" makeWrapper "${debugger}/bin/${debuggerName}" "$out/bin/pwntools-gdb" ''; diff --git a/pkgs/development/python-modules/py-bip39-bindings/default.nix b/pkgs/development/python-modules/py-bip39-bindings/default.nix index 24521f5289ac..72ea11e58522 100644 --- a/pkgs/development/python-modules/py-bip39-bindings/default.nix +++ b/pkgs/development/python-modules/py-bip39-bindings/default.nix @@ -43,7 +43,7 @@ buildPythonPackage rec { maturinBuildHook ]; - buildInputs = lib.optionals stdenv.isDarwin [ libiconv ]; + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ libiconv ]; nativeCheckInputs = [ pytestCheckHook ]; diff --git a/pkgs/development/python-modules/py-cpuinfo/default.nix b/pkgs/development/python-modules/py-cpuinfo/default.nix index cf734872942d..8485fe8c2837 100644 --- a/pkgs/development/python-modules/py-cpuinfo/default.nix +++ b/pkgs/development/python-modules/py-cpuinfo/default.nix @@ -25,7 +25,7 @@ buildPythonPackage rec { nativeCheckInputs = [ pytestCheckHook ]; # On Darwin sysctl is used to read CPU information. - postPatch = lib.optionalString stdenv.isDarwin '' + postPatch = lib.optionalString stdenv.hostPlatform.isDarwin '' substituteInPlace cpuinfo/cpuinfo.py \ --replace "len(_program_paths('sysctl')) > 0" "True" \ --replace "_run_and_get_stdout(['sysctl'" "_run_and_get_stdout(['${sysctl}/bin/sysctl'" diff --git a/pkgs/development/python-modules/py-libzfs/default.nix b/pkgs/development/python-modules/py-libzfs/default.nix index 1400a066c522..b5d8e7f4ab29 100644 --- a/pkgs/development/python-modules/py-libzfs/default.nix +++ b/pkgs/development/python-modules/py-libzfs/default.nix @@ -31,7 +31,7 @@ buildPythonPackage rec { buildInputs = [ zfs ]; # Passing CFLAGS in configureFlags does not work, see https://github.com/truenas/py-libzfs/issues/107 - postPatch = lib.optionalString stdenv.isLinux '' + postPatch = lib.optionalString stdenv.hostPlatform.isLinux '' substituteInPlace configure \ --replace-fail \ 'CFLAGS="-DCYTHON_FALLTHROUGH"' \ diff --git a/pkgs/development/python-modules/py-sr25519-bindings/default.nix b/pkgs/development/python-modules/py-sr25519-bindings/default.nix index 51915de513a7..123562c8d21a 100644 --- a/pkgs/development/python-modules/py-sr25519-bindings/default.nix +++ b/pkgs/development/python-modules/py-sr25519-bindings/default.nix @@ -35,7 +35,7 @@ buildPythonPackage rec { maturinBuildHook ]; - buildInputs = lib.optionals stdenv.isDarwin [ libiconv ]; + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ libiconv ]; nativeCheckInputs = [ pytestCheckHook diff --git a/pkgs/development/python-modules/py3exiv2/default.nix b/pkgs/development/python-modules/py3exiv2/default.nix index 38bdf6c4c18d..e9f0efe24030 100644 --- a/pkgs/development/python-modules/py3exiv2/default.nix +++ b/pkgs/development/python-modules/py3exiv2/default.nix @@ -27,7 +27,7 @@ buildPythonPackage rec { ]; # Work around Python distutils compiling C++ with $CC (see issue #26709) - env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.isDarwin "-I${lib.getDev libcxx}/include/c++/v1"; + env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.hostPlatform.isDarwin "-I${lib.getDev libcxx}/include/c++/v1"; pythonImportsCheck = [ "pyexiv2" ]; @@ -35,7 +35,7 @@ buildPythonPackage rec { doCheck = false; meta = with lib; { - broken = stdenv.isDarwin; + broken = stdenv.hostPlatform.isDarwin; description = "Python binding to the library exiv2"; homepage = "https://launchpad.net/py3exiv2"; license = licenses.gpl3Plus; diff --git a/pkgs/development/python-modules/pyarrow/default.nix b/pkgs/development/python-modules/pyarrow/default.nix index 3c9b1d3bc211..e22429f0716f 100644 --- a/pkgs/development/python-modules/pyarrow/default.nix +++ b/pkgs/development/python-modules/pyarrow/default.nix @@ -122,7 +122,7 @@ buildPythonPackage rec { # expects arrow-cpp headers to be bundled "--deselect=pyarrow/tests/test_cpp_internals.py::test_pyarrow_include" ] - ++ lib.optionals stdenv.isDarwin [ + ++ lib.optionals stdenv.hostPlatform.isDarwin [ # Requires loopback networking "--deselect=pyarrow/tests/test_ipc.py::test_socket_" "--deselect=pyarrow/tests/test_flight.py::test_never_sends_data" @@ -136,7 +136,7 @@ buildPythonPackage rec { # Repr output is printing number instead of enum name so these tests fail "--deselect=pyarrow/tests/test_fs.py::test_get_file_info" ] - ++ lib.optionals stdenv.isLinux [ + ++ lib.optionals stdenv.hostPlatform.isLinux [ # this test requires local networking "--deselect=pyarrow/tests/test_fs.py::test_filesystem_from_uri_gcs" ]; @@ -152,7 +152,7 @@ buildPythonPackage rec { mv pyarrow/conftest.py pyarrow/tests/parent_conftest.py substituteInPlace pyarrow/tests/conftest.py --replace ..conftest .parent_conftest '' - + lib.optionalString stdenv.isDarwin '' + + lib.optionalString stdenv.hostPlatform.isDarwin '' # OSError: [Errno 24] Too many open files ulimit -n 1024 ''; diff --git a/pkgs/development/python-modules/pyatv/default.nix b/pkgs/development/python-modules/pyatv/default.nix index bf3fe63b474b..3ffed8bd8acd 100644 --- a/pkgs/development/python-modules/pyatv/default.nix +++ b/pkgs/development/python-modules/pyatv/default.nix @@ -95,7 +95,7 @@ buildPythonPackage rec { # https://github.com/postlund/pyatv/issues/2365 "test_simple_dispatch" ] - ++ lib.optionals (stdenv.isDarwin) [ + ++ lib.optionals (stdenv.hostPlatform.isDarwin) [ # tests/protocols/raop/test_raop_functional.py::test_stream_retransmission[raop_properties2-2-True] - assert False "test_stream_retransmission" ]; diff --git a/pkgs/development/python-modules/pybind11/default.nix b/pkgs/development/python-modules/pybind11/default.nix index 6dab8d700d1e..750ee618f9d2 100644 --- a/pkgs/development/python-modules/pybind11/default.nix +++ b/pkgs/development/python-modules/pybind11/default.nix @@ -33,7 +33,7 @@ let # support for C++17 aligned allocations on macOS. # Tell clang we’re targeting 10.13 on x86_64-darwin while continuing to use the default SDK. stdenv' = - if stdenv.isDarwin && stdenv.isx86_64 then + if stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isx86_64 then python.stdenv.override (oldStdenv: { buildPlatform = oldStdenv.buildPlatform // { darwinMinVersion = "10.13"; @@ -115,7 +115,7 @@ buildPythonPackage rec { "tests/extra_setuptools/test_setuphelper.py" ]; - disabledTests = lib.optionals stdenv.isDarwin [ + disabledTests = lib.optionals stdenv.hostPlatform.isDarwin [ # expects KeyError, gets RuntimeError # https://github.com/pybind/pybind11/issues/4243 "test_cross_module_exception_translator" diff --git a/pkgs/development/python-modules/pybluez/default.nix b/pkgs/development/python-modules/pybluez/default.nix index d3842358db2f..ca745113c592 100644 --- a/pkgs/development/python-modules/pybluez/default.nix +++ b/pkgs/development/python-modules/pybluez/default.nix @@ -36,6 +36,6 @@ buildPythonPackage rec { homepage = "https://github.com/pybluez/pybluez"; license = licenses.gpl2; maintainers = with maintainers; [ leenaars ]; - broken = stdenv.isDarwin; # requires pyobjc-core, pyobjc-framework-Cocoa + broken = stdenv.hostPlatform.isDarwin; # requires pyobjc-core, pyobjc-framework-Cocoa }; } diff --git a/pkgs/development/python-modules/pyclip/default.nix b/pkgs/development/python-modules/pyclip/default.nix index 65f9afc40903..631bebd566bf 100644 --- a/pkgs/development/python-modules/pyclip/default.nix +++ b/pkgs/development/python-modules/pyclip/default.nix @@ -30,19 +30,19 @@ buildPythonPackage rec { nativeCheckInputs = [ pytest ] - ++ lib.optionals stdenv.isLinux [ + ++ lib.optionals stdenv.hostPlatform.isLinux [ xclip xvfb-run ]; checkPhase = '' runHook preCheck - ${lib.optionalString stdenv.isLinux "xvfb-run -s '-screen 0 800x600x24'"} pytest tests + ${lib.optionalString stdenv.hostPlatform.isLinux "xvfb-run -s '-screen 0 800x600x24'"} pytest tests runHook postCheck ''; meta = { - broken = stdenv.isDarwin; + broken = stdenv.hostPlatform.isDarwin; description = "Cross-platform clipboard utilities supporting both binary and text data"; mainProgram = "pyclip"; homepage = "https://github.com/spyoungtech/pyclip"; diff --git a/pkgs/development/python-modules/pycookiecheat/default.nix b/pkgs/development/python-modules/pycookiecheat/default.nix index be5d6f82cba6..97b7d7d48c8d 100644 --- a/pkgs/development/python-modules/pycookiecheat/default.nix +++ b/pkgs/development/python-modules/pycookiecheat/default.nix @@ -62,7 +62,7 @@ buildPythonPackage rec { "test_load_firefox_cookie_db" "test_no_cookies" "test_warns_for_string_browser" - ] ++ lib.optionals stdenv.isDarwin [ "test_slack_config" ]; + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ "test_slack_config" ]; meta = with lib; { description = "Borrow cookies from your browser's authenticated session for use in Python scripts"; diff --git a/pkgs/development/python-modules/pycrdt/default.nix b/pkgs/development/python-modules/pycrdt/default.nix index f95b0d7d21d4..c09682e63612 100644 --- a/pkgs/development/python-modules/pycrdt/default.nix +++ b/pkgs/development/python-modules/pycrdt/default.nix @@ -37,7 +37,7 @@ buildPythonPackage rec { rustPlatform.maturinBuildHook ]; - buildInputs = lib.optionals stdenv.isDarwin [ libiconv ]; + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ libiconv ]; dependencies = [ anyio ]; diff --git a/pkgs/development/python-modules/pycups/default.nix b/pkgs/development/python-modules/pycups/default.nix index 79c1646b1059..8a89193a64eb 100644 --- a/pkgs/development/python-modules/pycups/default.nix +++ b/pkgs/development/python-modules/pycups/default.nix @@ -17,7 +17,7 @@ buildPythonPackage rec { hash = "sha256-hD44XB2/aUmWyoTvAqfzDCg3YDVYj1++rNa64AXPfI0="; }; - buildInputs = [ cups ] ++ lib.optional stdenv.isDarwin libiconv; + buildInputs = [ cups ] ++ lib.optional stdenv.hostPlatform.isDarwin libiconv; # Wants to connect to CUPS doCheck = false; diff --git a/pkgs/development/python-modules/pycurl/default.nix b/pkgs/development/python-modules/pycurl/default.nix index 689e23e3c1ae..5f9334ebb1ee 100644 --- a/pkgs/development/python-modules/pycurl/default.nix +++ b/pkgs/development/python-modules/pycurl/default.nix @@ -77,7 +77,7 @@ buildPythonPackage rec { # https://github.com/pycurl/pycurl/issues/836 "test_proxy_tlsauth" ] - ++ lib.optionals (stdenv.isDarwin && stdenv.isAarch64) [ + ++ lib.optionals (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isAarch64) [ # Fatal Python error: Segmentation fault "cadata_test" ]; diff --git a/pkgs/development/python-modules/pydantic-core/default.nix b/pkgs/development/python-modules/pydantic-core/default.nix index 48e8f7188bce..77d339525878 100644 --- a/pkgs/development/python-modules/pydantic-core/default.nix +++ b/pkgs/development/python-modules/pydantic-core/default.nix @@ -47,7 +47,7 @@ let typing-extensions ]; - buildInputs = lib.optionals stdenv.isDarwin [ libiconv ]; + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ libiconv ]; dependencies = [ typing-extensions ]; diff --git a/pkgs/development/python-modules/pydevd/default.nix b/pkgs/development/python-modules/pydevd/default.nix index 8cb99dd9806f..207e5e5c9edf 100644 --- a/pkgs/development/python-modules/pydevd/default.nix +++ b/pkgs/development/python-modules/pydevd/default.nix @@ -72,7 +72,7 @@ buildPythonPackage rec { # https://github.com/fabioz/PyDev.Debugger/issues/269 "test_evaluate_expression" ] - ++ lib.optionals stdenv.isDarwin [ + ++ lib.optionals stdenv.hostPlatform.isDarwin [ "test_multiprocessing_simple" "test_evaluate_exception_trace" ]; diff --git a/pkgs/development/python-modules/pydicom/default.nix b/pkgs/development/python-modules/pydicom/default.nix index e2d86333c1cc..94822a24d444 100644 --- a/pkgs/development/python-modules/pydicom/default.nix +++ b/pkgs/development/python-modules/pydicom/default.nix @@ -66,11 +66,11 @@ buildPythonPackage { # tries to remove a dicom inside $HOME/.pydicom/data/ and download it again "test_fetch_data_files" ] - ++ lib.optionals stdenv.isAarch64 [ + ++ lib.optionals stdenv.hostPlatform.isAarch64 [ # https://github.com/pydicom/pydicom/issues/1386 "test_array" ] - ++ lib.optionals stdenv.isDarwin [ + ++ lib.optionals stdenv.hostPlatform.isDarwin [ # flaky, hard to reproduce failure outside hydra "test_time_check" ]; diff --git a/pkgs/development/python-modules/pyeclib/default.nix b/pkgs/development/python-modules/pyeclib/default.nix index 0ada1b1306bd..bda40cbeb8d3 100644 --- a/pkgs/development/python-modules/pyeclib/default.nix +++ b/pkgs/development/python-modules/pyeclib/default.nix @@ -39,7 +39,7 @@ buildPythonPackage rec { preBuild = let - ldLibraryPathEnvName = if stdenv.isDarwin then "DYLD_LIBRARY_PATH" else "LD_LIBRARY_PATH"; + ldLibraryPathEnvName = if stdenv.hostPlatform.isDarwin then "DYLD_LIBRARY_PATH" else "LD_LIBRARY_PATH"; in '' # required for the custom _find_library function in setup.py diff --git a/pkgs/development/python-modules/pyfakefs/default.nix b/pkgs/development/python-modules/pyfakefs/default.nix index ff29175870ab..0486b2b7f665 100644 --- a/pkgs/development/python-modules/pyfakefs/default.nix +++ b/pkgs/development/python-modules/pyfakefs/default.nix @@ -35,7 +35,7 @@ buildPythonPackage rec { --replace "test_path_links_not_resolved" "notest_path_links_not_resolved" \ --replace "test_append_mode_tell_linux_windows" "notest_append_mode_tell_linux_windows" '' - + (lib.optionalString stdenv.isDarwin '' + + (lib.optionalString stdenv.hostPlatform.isDarwin '' # this test fails on darwin due to case-insensitive file system substituteInPlace pyfakefs/tests/fake_os_test.py \ --replace "test_rename_dir_to_existing_dir" "notest_rename_dir_to_existing_dir" diff --git a/pkgs/development/python-modules/pygame-ce/default.nix b/pkgs/development/python-modules/pygame-ce/default.nix index c4af9f668e72..5c9e2432c822 100644 --- a/pkgs/development/python-modules/pygame-ce/default.nix +++ b/pkgs/development/python-modules/pygame-ce/default.nix @@ -77,7 +77,7 @@ buildPythonPackage rec { --replace-fail 'path="fc-list"' 'path="${fontconfig}/bin/fc-list"' \ --replace-fail /usr/X11/bin/fc-list ${fontconfig}/bin/fc-list '' - + lib.optionalString stdenv.isDarwin '' + + lib.optionalString stdenv.hostPlatform.isDarwin '' # flaky rm test/system_test.py substituteInPlace test/meson.build \ @@ -102,7 +102,7 @@ buildPythonPackage rec { SDL2_image SDL2_mixer SDL2_ttf - ] ++ lib.optionals stdenv.isDarwin [ AppKit ]; + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ AppKit ]; nativeCheckInputs = [ numpy diff --git a/pkgs/development/python-modules/pygame/default.nix b/pkgs/development/python-modules/pygame/default.nix index 65315b3243b8..94efd4227e2e 100644 --- a/pkgs/development/python-modules/pygame/default.nix +++ b/pkgs/development/python-modules/pygame/default.nix @@ -99,7 +99,7 @@ buildPythonPackage rec { SDL2_image SDL2_mixer SDL2_ttf - ] ++ lib.optionals stdenv.isDarwin [ AppKit ]; + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ AppKit ]; preConfigure = '' ${python.pythonOnBuildForHost.interpreter} buildconfig/config.py diff --git a/pkgs/development/python-modules/pygit2/default.nix b/pkgs/development/python-modules/pygit2/default.nix index 80cd4b04b409..db08e6efe974 100644 --- a/pkgs/development/python-modules/pygit2/default.nix +++ b/pkgs/development/python-modules/pygit2/default.nix @@ -26,7 +26,7 @@ buildPythonPackage rec { hash = "sha256-pjVSX/x0EoZp3i9jRgqUydVgljSkh1wKr85RD97sF6w="; }; - preConfigure = lib.optionalString stdenv.isDarwin '' + preConfigure = lib.optionalString stdenv.hostPlatform.isDarwin '' export DYLD_LIBRARY_PATH="${libgit2}/lib" ''; diff --git a/pkgs/development/python-modules/pygls/default.nix b/pkgs/development/python-modules/pygls/default.nix index c75cf68715ed..8128de3769b9 100644 --- a/pkgs/development/python-modules/pygls/default.nix +++ b/pkgs/development/python-modules/pygls/default.nix @@ -52,7 +52,7 @@ buildPythonPackage rec { # Fixes hanging tests on Darwin __darwinAllowLocalNetworking = true; - preCheck = lib.optionalString stdenv.isDarwin '' + preCheck = lib.optionalString stdenv.hostPlatform.isDarwin '' # Darwin issue: OSError: [Errno 24] Too many open files ulimit -n 1024 ''; diff --git a/pkgs/development/python-modules/pygmt/default.nix b/pkgs/development/python-modules/pygmt/default.nix index 77d2669ee0ac..852690233304 100644 --- a/pkgs/development/python-modules/pygmt/default.nix +++ b/pkgs/development/python-modules/pygmt/default.nix @@ -68,7 +68,7 @@ buildPythonPackage rec { license = licenses.bsd3; changelog = "https://github.com/GenericMappingTools/pygmt/releases/tag/v${version}"; # pygmt.exceptions.GMTCLibNotFoundError: Error loading the GMT shared library '/nix/store/r3xnnqgl89vrnq0kzxx0bmjwzks45mz8-gmt-6.1.1/lib/libgmt.dylib' - broken = stdenv.isDarwin; + broken = stdenv.hostPlatform.isDarwin; maintainers = with maintainers; [ sikmir ]; }; } diff --git a/pkgs/development/python-modules/pygobject/3.nix b/pkgs/development/python-modules/pygobject/3.nix index 185e7fd5ddf8..1f4592c7ddcf 100644 --- a/pkgs/development/python-modules/pygobject/3.nix +++ b/pkgs/development/python-modules/pygobject/3.nix @@ -46,7 +46,7 @@ buildPythonPackage rec { buildInputs = [ cairo glib - ] ++ lib.optionals stdenv.isDarwin [ ncurses ]; + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ ncurses ]; propagatedBuildInputs = [ pycairo diff --git a/pkgs/development/python-modules/pyhanko/default.nix b/pkgs/development/python-modules/pyhanko/default.nix index f8cf0d88cbf2..cf46658aec26 100644 --- a/pkgs/development/python-modules/pyhanko/default.nix +++ b/pkgs/development/python-modules/pyhanko/default.nix @@ -130,6 +130,6 @@ buildPythonPackage rec { maintainers = [ ]; # Most tests fail with: # OSError: One or more parameters passed to a function were not valid. - broken = stdenv.isDarwin; + broken = stdenv.hostPlatform.isDarwin; }; } diff --git a/pkgs/development/python-modules/pyheck/default.nix b/pkgs/development/python-modules/pyheck/default.nix index 7b7e5205447f..fca55ff984b5 100644 --- a/pkgs/development/python-modules/pyheck/default.nix +++ b/pkgs/development/python-modules/pyheck/default.nix @@ -40,7 +40,7 @@ buildPythonPackage rec { rustPlatform.maturinBuildHook ]; - buildInputs = lib.optionals stdenv.isDarwin [ libiconv ]; + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ libiconv ]; nativeCheckInputs = [ pytestCheckHook ]; diff --git a/pkgs/development/python-modules/pylance/default.nix b/pkgs/development/python-modules/pylance/default.nix index 95e9cc8326cd..ff66678e664a 100644 --- a/pkgs/development/python-modules/pylance/default.nix +++ b/pkgs/development/python-modules/pylance/default.nix @@ -65,7 +65,7 @@ buildPythonPackage rec { libiconv protobuf ] - ++ lib.optionals stdenv.isDarwin ( + ++ lib.optionals stdenv.hostPlatform.isDarwin ( with darwin.apple_sdk.frameworks; [ Security @@ -100,7 +100,7 @@ buildPythonPackage rec { cd python/python/tests ''; - disabledTests = lib.optionals stdenv.isDarwin [ + disabledTests = lib.optionals stdenv.hostPlatform.isDarwin [ # AttributeError: module 'torch.distributed' has no attribute 'is_initialized' "test_convert_int_tensors" "test_ground_truth" @@ -127,6 +127,6 @@ buildPythonPackage rec { maintainers = with lib.maintainers; [ natsukium ]; # test_indices.py ...sss.Fatal Python error: Fatal Python error: Illegal instructionIllegal instruction # File "/nix/store/wiiccrs0vd1qbh4j6ki9p40xmamsjix3-python3.12-pylance-0.17.0/lib/python3.12/site-packages/lance/indices.py", line 237 in train_ivf - broken = stdenv.isDarwin && stdenv.isx86_64; + broken = stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isx86_64; }; } diff --git a/pkgs/development/python-modules/pylibjpeg-openjpeg/default.nix b/pkgs/development/python-modules/pylibjpeg-openjpeg/default.nix index 33f1b807ac50..18ee261ff694 100644 --- a/pkgs/development/python-modules/pylibjpeg-openjpeg/default.nix +++ b/pkgs/development/python-modules/pylibjpeg-openjpeg/default.nix @@ -71,6 +71,6 @@ buildPythonPackage rec { maintainers = with lib.maintainers; [ bcdarwin ]; # x86-linux: test_encode.py::TestEncodeBuffer failures # darwin: numerous test failures, seemingly due to issues setting up test data - broken = (stdenv.isAarch64 && stdenv.isLinux) || stdenv.isDarwin; + broken = (stdenv.hostPlatform.isAarch64 && stdenv.hostPlatform.isLinux) || stdenv.hostPlatform.isDarwin; }; } diff --git a/pkgs/development/python-modules/pylint/default.nix b/pkgs/development/python-modules/pylint/default.nix index 73976a1d60e0..9076d39d83f6 100644 --- a/pkgs/development/python-modules/pylint/default.nix +++ b/pkgs/development/python-modules/pylint/default.nix @@ -101,7 +101,7 @@ buildPythonPackage rec { # AssertionError: assert [('specializa..., 'Ancestor')] == [('aggregatio..., 'Ancestor')] "test_functional_relation_extraction" ] - ++ lib.optionals stdenv.isDarwin [ + ++ lib.optionals stdenv.hostPlatform.isDarwin [ "test_parallel_execution" "test_py3k_jobs_option" ]; diff --git a/pkgs/development/python-modules/pymemcache/default.nix b/pkgs/development/python-modules/pymemcache/default.nix index c80f512e7498..6f570f8d8306 100644 --- a/pkgs/development/python-modules/pymemcache/default.nix +++ b/pkgs/development/python-modules/pymemcache/default.nix @@ -40,7 +40,7 @@ buildPythonPackage rec { sed -i "/--cov/d" setup.cfg ''; - disabledTests = lib.optionals stdenv.is32bit [ + disabledTests = lib.optionals stdenv.hostPlatform.is32bit [ # test_compressed_complex is broken on 32-bit platforms # this can be removed on the next version bump # see also https://github.com/pinterest/pymemcache/pull/480 diff --git a/pkgs/development/python-modules/pymunk/default.nix b/pkgs/development/python-modules/pymunk/default.nix index cb23141284d7..212e8e54dd24 100644 --- a/pkgs/development/python-modules/pymunk/default.nix +++ b/pkgs/development/python-modules/pymunk/default.nix @@ -25,7 +25,7 @@ buildPythonPackage rec { propagatedBuildInputs = [ cffi ]; - buildInputs = lib.optionals stdenv.isDarwin [ ApplicationServices ]; + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ ApplicationServices ]; preBuild = '' ${python.pythonOnBuildForHost.interpreter} setup.py build_ext --inplace diff --git a/pkgs/development/python-modules/pymupdf/default.nix b/pkgs/development/python-modules/pymupdf/default.nix index f54a8b7a8462..4ee28f0b6208 100644 --- a/pkgs/development/python-modules/pymupdf/default.nix +++ b/pkgs/development/python-modules/pymupdf/default.nix @@ -88,7 +88,7 @@ buildPythonPackage rec { }; # TODO: manually add mupdf rpath until upstream fixes it - postInstall = lib.optionalString stdenv.isDarwin '' + postInstall = lib.optionalString stdenv.hostPlatform.isDarwin '' for lib in */*.so $out/${python.sitePackages}/*/*.so; do install_name_tool -add_rpath ${lib.getLib mupdf-cxx}/lib "$lib" done @@ -175,7 +175,7 @@ buildPythonPackage rec { # Exclude lint tests "test_flake8" ] - ++ lib.optionals stdenv.isDarwin [ + ++ lib.optionals stdenv.hostPlatform.isDarwin [ # darwin does not support OCR right now "test_tesseract" ]; diff --git a/pkgs/development/python-modules/pync/default.nix b/pkgs/development/python-modules/pync/default.nix index 9206787f4973..46af3ed5db2f 100644 --- a/pkgs/development/python-modules/pync/default.nix +++ b/pkgs/development/python-modules/pync/default.nix @@ -21,7 +21,7 @@ buildPythonPackage rec { nativeCheckInputs = [ which ]; propagatedBuildInputs = [ python-dateutil ]; - preInstall = lib.optionalString stdenv.isDarwin '' + preInstall = lib.optionalString stdenv.hostPlatform.isDarwin '' sed -i 's|^\([ ]*\)self.bin_path.*$|\1self.bin_path = "${pkgs.terminal-notifier}/bin/terminal-notifier"|' build/lib/pync/TerminalNotifier.py ''; diff --git a/pkgs/development/python-modules/pynput/default.nix b/pkgs/development/python-modules/pynput/default.nix index ed6b964f0ca5..6d73c35e5ba6 100644 --- a/pkgs/development/python-modules/pynput/default.nix +++ b/pkgs/development/python-modules/pynput/default.nix @@ -44,11 +44,11 @@ buildPythonPackage rec { propagatedBuildInputs = [ six ] - ++ lib.optionals stdenv.isLinux [ + ++ lib.optionals stdenv.hostPlatform.isLinux [ evdev xlib ] - ++ lib.optionals stdenv.isDarwin ( + ++ lib.optionals stdenv.hostPlatform.isDarwin ( with darwin.apple_sdk.frameworks; [ ApplicationServices @@ -61,7 +61,7 @@ buildPythonPackage rec { nativeCheckInputs = [ unittestCheckHook ]; meta = with lib; { - broken = stdenv.isDarwin; + broken = stdenv.hostPlatform.isDarwin; description = "Library to control and monitor input devices"; homepage = "https://github.com/moses-palmer/pynput"; license = licenses.lgpl3; diff --git a/pkgs/development/python-modules/pyocd/default.nix b/pkgs/development/python-modules/pyocd/default.nix index 15a0a2dbdbfa..bb10f1881118 100644 --- a/pkgs/development/python-modules/pyocd/default.nix +++ b/pkgs/development/python-modules/pyocd/default.nix @@ -63,7 +63,7 @@ buildPythonPackage rec { pyusb pyyaml typing-extensions - ] ++ lib.optionals (!stdenv.isLinux) [ hidapi ]; + ] ++ lib.optionals (!stdenv.hostPlatform.isLinux) [ hidapi ]; pythonImportsCheck = [ "pyocd" ]; diff --git a/pkgs/development/python-modules/pyopencl/default.nix b/pkgs/development/python-modules/pyopencl/default.nix index 6ec97843fa8f..edf4a4bfe7a2 100644 --- a/pkgs/development/python-modules/pyopencl/default.nix +++ b/pkgs/development/python-modules/pyopencl/default.nix @@ -27,7 +27,7 @@ let os-specific-buildInputs = - if stdenv.isDarwin then [ darwin.apple_sdk.frameworks.OpenCL ] else [ ocl-icd ]; + if stdenv.hostPlatform.isDarwin then [ darwin.apple_sdk.frameworks.OpenCL ] else [ ocl-icd ]; in buildPythonPackage rec { pname = "pyopencl"; @@ -92,6 +92,6 @@ buildPythonPackage rec { license = lib.licenses.mit; maintainers = with lib.maintainers; [ GaetanLepage ]; # ld: symbol(s) not found for architecture arm64 - broken = stdenv.isDarwin && stdenv.isAarch64; + broken = stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isAarch64; }; } diff --git a/pkgs/development/python-modules/pyopengl/default.nix b/pkgs/development/python-modules/pyopengl/default.nix index a66fcc6463a4..a4c4b1cbf21d 100644 --- a/pkgs/development/python-modules/pyopengl/default.nix +++ b/pkgs/development/python-modules/pyopengl/default.nix @@ -25,7 +25,7 @@ buildPythonPackage rec { let ext = stdenv.hostPlatform.extensions.sharedLibrary; in - lib.optionalString (!stdenv.isDarwin) '' + lib.optionalString (!stdenv.hostPlatform.isDarwin) '' # Theses lines are patching the name of dynamic libraries # so pyopengl can find them at runtime. substituteInPlace OpenGL/platform/glx.py \ diff --git a/pkgs/development/python-modules/pyopengltk/default.nix b/pkgs/development/python-modules/pyopengltk/default.nix index 2f0440d83daf..b50780336e50 100644 --- a/pkgs/development/python-modules/pyopengltk/default.nix +++ b/pkgs/development/python-modules/pyopengltk/default.nix @@ -46,6 +46,6 @@ buildPythonPackage rec { maintainers = with lib.maintainers; [ sigmanificient ]; license = lib.licenses.mit; # not supported yet, see: https://github.com/jonwright/pyopengltk/issues/12 - broken = stdenv.isDarwin; + broken = stdenv.hostPlatform.isDarwin; }; } diff --git a/pkgs/development/python-modules/pyopenssl/default.nix b/pkgs/development/python-modules/pyopenssl/default.nix index b9691b2a2827..0d8ae7f649eb 100644 --- a/pkgs/development/python-modules/pyopenssl/default.nix +++ b/pkgs/development/python-modules/pyopenssl/default.nix @@ -90,7 +90,7 @@ buildPythonPackage rec { "test_dump_certificate_request" "test_export_text" ] - ++ lib.optionals stdenv.is32bit [ + ++ lib.optionals stdenv.hostPlatform.is32bit [ # https://github.com/pyca/pyopenssl/issues/974 "test_verify_with_time" ]; diff --git a/pkgs/development/python-modules/pyparted/default.nix b/pkgs/development/python-modules/pyparted/default.nix index ebdd762b6d06..24acecdaf8c2 100644 --- a/pkgs/development/python-modules/pyparted/default.nix +++ b/pkgs/development/python-modules/pyparted/default.nix @@ -29,7 +29,7 @@ buildPythonPackage rec { s|e\.path\.startswith("/tmp/temp-device-")|"temp-device-" in e.path| ' tests/test__ped_ped.py '' - + lib.optionalString stdenv.isi686 '' + + lib.optionalString stdenv.hostPlatform.isi686 '' # remove some integers in this test case which overflow on 32bit systems sed -i -r -e '/class *UnitGetSizeTestCase/,/^$/{/[0-9]{11}/d}' \ tests/test__ped_ped.py diff --git a/pkgs/development/python-modules/pypass/default.nix b/pkgs/development/python-modules/pypass/default.nix index 784a5e213c3b..1b9dc08d6720 100644 --- a/pkgs/development/python-modules/pypass/default.nix +++ b/pkgs/development/python-modules/pypass/default.nix @@ -74,7 +74,7 @@ buildPythonPackage rec { disabledTests = [ "test_show_clip" ]; meta = { - broken = stdenv.isDarwin; + broken = stdenv.hostPlatform.isDarwin; description = "Password manager pass in Python"; mainProgram = "pypass"; homepage = "https://github.com/aviau/python-pass"; diff --git a/pkgs/development/python-modules/pypck/default.nix b/pkgs/development/python-modules/pypck/default.nix index d2ee3050522f..e39adf256656 100644 --- a/pkgs/development/python-modules/pypck/default.nix +++ b/pkgs/development/python-modules/pypck/default.nix @@ -38,7 +38,7 @@ buildPythonPackage rec { pytestFlagsArray = [ "--asyncio-mode=auto" ]; - disabledTests = lib.optionals stdenv.isDarwin [ "test_connection_lost" ]; + disabledTests = lib.optionals stdenv.hostPlatform.isDarwin [ "test_connection_lost" ]; __darwinAllowLocalNetworking = true; diff --git a/pkgs/development/python-modules/pyperscan/default.nix b/pkgs/development/python-modules/pyperscan/default.nix index fae3060a744a..7f2bde698eb8 100644 --- a/pkgs/development/python-modules/pyperscan/default.nix +++ b/pkgs/development/python-modules/pyperscan/default.nix @@ -35,7 +35,7 @@ buildPythonPackage rec { checkInputs = [ pytestCheckHook ]; - buildInputs = [ vectorscan ] ++ lib.optional stdenv.isDarwin libiconv; + buildInputs = [ vectorscan ] ++ lib.optional stdenv.hostPlatform.isDarwin libiconv; pythonImportsCheck = [ "pyperscan" ]; diff --git a/pkgs/development/python-modules/pyqt/5.x.nix b/pkgs/development/python-modules/pyqt/5.x.nix index 2fdd86b3b5ea..5e1c96673555 100644 --- a/pkgs/development/python-modules/pyqt/5.x.nix +++ b/pkgs/development/python-modules/pyqt/5.x.nix @@ -23,7 +23,7 @@ withSerialPort ? false, withTools ? false, pkgsBuildTarget, - dbusSupport ? !stdenv.isDarwin, + dbusSupport ? !stdenv.hostPlatform.isDarwin, }: buildPythonPackage rec { @@ -59,7 +59,7 @@ buildPythonPackage rec { # Due to bug in SIP .whl name generation we have to bump minimal macos sdk upto 11.0 for # aarch64-darwin. This patch can be removed once SIP will fix it in upstream, # see https://github.com/NixOS/nixpkgs/pull/186612#issuecomment-1214635456. - + lib.optionalString (stdenv.isDarwin && stdenv.isAarch64) '' + + lib.optionalString (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isAarch64) '' minimum-macos-version = "11.0" '' + '' diff --git a/pkgs/development/python-modules/pyqt/6.x.nix b/pkgs/development/python-modules/pyqt/6.x.nix index 8c5653826d25..9f031347d354 100644 --- a/pkgs/development/python-modules/pyqt/6.x.nix +++ b/pkgs/development/python-modules/pyqt/6.x.nix @@ -118,7 +118,7 @@ buildPythonPackage rec { setuptools ] # ld: library not found for -lcups - ++ lib.optionals (withPrintSupport && stdenv.isDarwin) [ cups ]; + ++ lib.optionals (withPrintSupport && stdenv.hostPlatform.isDarwin) [ cups ]; passthru = { inherit sip pyqt6-sip; @@ -145,7 +145,7 @@ buildPythonPackage rec { # ++ lib.optional withConnectivity "PyQt6.QtConnectivity" ++ lib.optional withLocation "PyQt6.QtPositioning"; - env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.isDarwin "-Wno-address-of-temporary"; + env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.hostPlatform.isDarwin "-Wno-address-of-temporary"; meta = with lib; { description = "Python bindings for Qt6"; diff --git a/pkgs/development/python-modules/pyqtgraph/default.nix b/pkgs/development/python-modules/pyqtgraph/default.nix index 6bfa11c30fcb..629f96d76df4 100644 --- a/pkgs/development/python-modules/pyqtgraph/default.nix +++ b/pkgs/development/python-modules/pyqtgraph/default.nix @@ -64,7 +64,7 @@ buildPythonPackage rec { # https://github.com/pyqtgraph/pyqtgraph/issues/2110 "test_PolyLineROI" ] - ++ lib.optionals (stdenv.isLinux && stdenv.isAarch64) [ + ++ lib.optionals (stdenv.hostPlatform.isLinux && stdenv.hostPlatform.isAarch64) [ # https://github.com/pyqtgraph/pyqtgraph/issues/2645 "test_rescaleData" ]; diff --git a/pkgs/development/python-modules/pyqtwebengine/default.nix b/pkgs/development/python-modules/pyqtwebengine/default.nix index 60801a0c966f..fe3fab812928 100644 --- a/pkgs/development/python-modules/pyqtwebengine/default.nix +++ b/pkgs/development/python-modules/pyqtwebengine/default.nix @@ -60,7 +60,7 @@ buildPythonPackage ( setuptools ] ++ lib.optionals (stdenv.buildPlatform != stdenv.hostPlatform) [ libsForQt5.qtdeclarative ] - ++ lib.optionals (stdenv.isDarwin && stdenv.isAarch64) [ autoSignDarwinBinariesHook ]; + ++ lib.optionals (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isAarch64) [ autoSignDarwinBinariesHook ]; buildInputs = [ diff --git a/pkgs/development/python-modules/pyreadstat/default.nix b/pkgs/development/python-modules/pyreadstat/default.nix index 12262cdff9cb..56894f1c4df4 100644 --- a/pkgs/development/python-modules/pyreadstat/default.nix +++ b/pkgs/development/python-modules/pyreadstat/default.nix @@ -32,7 +32,7 @@ buildPythonPackage rec { setuptools ]; - buildInputs = [ zlib ] ++ lib.optionals stdenv.isDarwin [ libiconv ]; + buildInputs = [ zlib ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ libiconv ]; dependencies = [ readstat diff --git a/pkgs/development/python-modules/pyreqwest-impersonate/default.nix b/pkgs/development/python-modules/pyreqwest-impersonate/default.nix index 1dc215bf0ee8..8d9406666fe7 100644 --- a/pkgs/development/python-modules/pyreqwest-impersonate/default.nix +++ b/pkgs/development/python-modules/pyreqwest-impersonate/default.nix @@ -44,7 +44,7 @@ buildPythonPackage rec { rustPlatform.maturinBuildHook ]; - buildInputs = lib.optionals stdenv.isDarwin [ + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ libiconv SystemConfiguration ]; diff --git a/pkgs/development/python-modules/pyscard/default.nix b/pkgs/development/python-modules/pyscard/default.nix index 3fd9d3c2fbd4..4582cc185203 100644 --- a/pkgs/development/python-modules/pyscard/default.nix +++ b/pkgs/development/python-modules/pyscard/default.nix @@ -13,7 +13,7 @@ let # Package does not support configuring the pcsc library. - withApplePCSC = stdenv.isDarwin; + withApplePCSC = stdenv.hostPlatform.isDarwin; in buildPythonPackage rec { diff --git a/pkgs/development/python-modules/pysequoia/default.nix b/pkgs/development/python-modules/pysequoia/default.nix index 3fb8236f9b71..f2c07cd5e418 100644 --- a/pkgs/development/python-modules/pysequoia/default.nix +++ b/pkgs/development/python-modules/pysequoia/default.nix @@ -47,7 +47,7 @@ buildPythonPackage rec { openssl pcsclite ] - ++ lib.optionals stdenv.isDarwin [ + ++ lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.CoreFoundation darwin.apple_sdk.frameworks.Security libiconv @@ -62,6 +62,6 @@ buildPythonPackage rec { license = licenses.asl20; maintainers = with maintainers; [ doronbehar ]; # Broken since the 0.1.20 update according to ofborg. The errors are not clear... - broken = stdenv.isDarwin; + broken = stdenv.hostPlatform.isDarwin; }; } diff --git a/pkgs/development/python-modules/pyshark/default.nix b/pkgs/development/python-modules/pyshark/default.nix index ba92fdaebd28..7e4cff21d181 100644 --- a/pkgs/development/python-modules/pyshark/default.nix +++ b/pkgs/development/python-modules/pyshark/default.nix @@ -58,7 +58,7 @@ buildPythonPackage rec { # KeyError: 'Packet of index 0 does not exist in capture' "test_getting_packet_summary" ] - ++ lib.optionals stdenv.isDarwin [ + ++ lib.optionals stdenv.hostPlatform.isDarwin [ # fails on darwin # _pickle.PicklingError: logger cannot be pickled "test_iterate_empty_psml_capture" diff --git a/pkgs/development/python-modules/pyside2/default.nix b/pkgs/development/python-modules/pyside2/default.nix index d228e3fde29f..2a3ff3c5ad34 100644 --- a/pkgs/development/python-modules/pyside2/default.nix +++ b/pkgs/development/python-modules/pyside2/default.nix @@ -97,6 +97,6 @@ stdenv.mkDerivation rec { homepage = "https://wiki.qt.io/Qt_for_Python"; maintainers = with maintainers; [ gebner ]; platforms = platforms.all; - broken = stdenv.isDarwin; + broken = stdenv.hostPlatform.isDarwin; }; } diff --git a/pkgs/development/python-modules/pyside6/default.nix b/pkgs/development/python-modules/pyside6/default.nix index 2dc0078c369a..7addb26e7167 100644 --- a/pkgs/development/python-modules/pyside6/default.nix +++ b/pkgs/development/python-modules/pyside6/default.nix @@ -71,24 +71,24 @@ stdenv.mkDerivation (finalAttrs: { 'string(FIND "''${_module_dir}" "''${_core_abs_dir}" found_basepath)' \ 'set (found_basepath 0)' '' - + lib.optionalString stdenv.isDarwin '' + + lib.optionalString stdenv.hostPlatform.isDarwin '' substituteInPlace cmake/PySideHelpers.cmake \ --replace-fail \ "Designer" "" ''; # "Couldn't find libclang.dylib You will likely need to add it manually to PATH to ensure the build succeeds." - env = lib.optionalAttrs stdenv.isDarwin { LLVM_INSTALL_DIR = "${llvmPackages.libclang.lib}/lib"; }; + env = lib.optionalAttrs stdenv.hostPlatform.isDarwin { LLVM_INSTALL_DIR = "${llvmPackages.libclang.lib}/lib"; }; nativeBuildInputs = [ cmake ninja python pythonImportsCheckHook - ] ++ lib.optionals stdenv.isDarwin [ moveBuildTree ]; + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ moveBuildTree ]; buildInputs = - if stdenv.isLinux then + if stdenv.hostPlatform.isLinux then # qtwebengine fails under darwin # see https://github.com/NixOS/nixpkgs/pull/312987 packages ++ [ python.pkgs.qt6.qtwebengine ] diff --git a/pkgs/development/python-modules/pysilero-vad/default.nix b/pkgs/development/python-modules/pysilero-vad/default.nix index bee85a4b2bc3..020677f05e6a 100644 --- a/pkgs/development/python-modules/pysilero-vad/default.nix +++ b/pkgs/development/python-modules/pysilero-vad/default.nix @@ -42,7 +42,7 @@ buildPythonPackage rec { meta = with lib; { # what(): /build/source/include/onnxruntime/core/common/logging/logging.h:294 static const onnxruntime::logging::Logger& onnxruntime::logging::LoggingManager::DefaultLogger() Attempt to use DefaultLogger but none has been registered. - broken = stdenv.isAarch64 && stdenv.isLinux; + broken = stdenv.hostPlatform.isAarch64 && stdenv.hostPlatform.isLinux; description = "Pre-packaged voice activity detector using silero-vad"; homepage = "https://github.com/rhasspy/pysilero-vad"; changelog = "https://github.com/rhasspy/pysilero-vad/blob/${src.rev}/CHANGELOG.md"; diff --git a/pkgs/development/python-modules/pysptk/default.nix b/pkgs/development/python-modules/pysptk/default.nix index f6f0de014d36..e148d8af8b06 100644 --- a/pkgs/development/python-modules/pysptk/default.nix +++ b/pkgs/development/python-modules/pysptk/default.nix @@ -40,7 +40,7 @@ buildPythonPackage rec { pythonImportsCheck = [ "pysptk" ]; meta = with lib; { - broken = stdenv.isDarwin; + broken = stdenv.hostPlatform.isDarwin; description = "Wrapper for Speech Signal Processing Toolkit (SPTK)"; homepage = "https://pysptk.readthedocs.io/"; license = licenses.mit; diff --git a/pkgs/development/python-modules/pystatgrab/default.nix b/pkgs/development/python-modules/pystatgrab/default.nix index 04d460bdf558..942fe48d95b5 100644 --- a/pkgs/development/python-modules/pystatgrab/default.nix +++ b/pkgs/development/python-modules/pystatgrab/default.nix @@ -39,7 +39,7 @@ buildPythonPackage rec { buildInputs = [ libstatgrab - ] ++ lib.optionals stdenv.isDarwin (with darwin.apple_sdk.frameworks; [ IOKit ]); + ] ++ lib.optionals stdenv.hostPlatform.isDarwin (with darwin.apple_sdk.frameworks; [ IOKit ]); nativeCheckInputs = [ unittestCheckHook ]; diff --git a/pkgs/development/python-modules/pysvn/default.nix b/pkgs/development/python-modules/pysvn/default.nix index 3df9edb39f9c..319398fdec91 100644 --- a/pkgs/development/python-modules/pysvn/default.nix +++ b/pkgs/development/python-modules/pysvn/default.nix @@ -37,7 +37,7 @@ buildPythonPackage rec { expat neon openssl - ] ++ lib.optionals stdenv.isLinux [ e2fsprogs ] ++ lib.optionals stdenv.isDarwin [ gcc ]; + ] ++ lib.optionals stdenv.hostPlatform.isLinux [ e2fsprogs ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ gcc ]; preConfigure = '' cd Source @@ -84,6 +84,6 @@ buildPythonPackage rec { license = licenses.asl20; maintainers = with maintainers; [ dotlambda ]; # g++: command not found - broken = stdenv.isDarwin; + broken = stdenv.hostPlatform.isDarwin; }; } diff --git a/pkgs/development/python-modules/pytest-ansible/default.nix b/pkgs/development/python-modules/pytest-ansible/default.nix index 8d3b1bfdeb76..bc8106a999a6 100644 --- a/pkgs/development/python-modules/pytest-ansible/default.nix +++ b/pkgs/development/python-modules/pytest-ansible/default.nix @@ -62,7 +62,7 @@ buildPythonPackage rec { "test_connection_failure_v2" "test_connection_failure_extra_inventory_v2" ] - ++ lib.optionals stdenv.isDarwin [ + ++ lib.optionals stdenv.hostPlatform.isDarwin [ # These tests fail in the Darwin sandbox "test_ansible_facts" "test_func" @@ -74,7 +74,7 @@ buildPythonPackage rec { # Test want s to execute pytest in a subprocess "tests/integration/test_molecule.py" ] - ++ lib.optionals stdenv.isDarwin [ + ++ lib.optionals stdenv.hostPlatform.isDarwin [ # These tests fail in the Darwin sandbox "tests/test_adhoc.py" "tests/test_adhoc_result.py" diff --git a/pkgs/development/python-modules/pytest-flask/default.nix b/pkgs/development/python-modules/pytest-flask/default.nix index 477be61ebefd..f4132d9512f9 100644 --- a/pkgs/development/python-modules/pytest-flask/default.nix +++ b/pkgs/development/python-modules/pytest-flask/default.nix @@ -36,7 +36,7 @@ buildPythonPackage rec { pythonImportsCheck = [ "pytest_flask" ]; - pytestFlagsArray = lib.optionals stdenv.isDarwin [ "--ignore=tests/test_live_server.py" ]; + pytestFlagsArray = lib.optionals stdenv.hostPlatform.isDarwin [ "--ignore=tests/test_live_server.py" ]; meta = with lib; { description = "Set of pytest fixtures to test Flask applications"; diff --git a/pkgs/development/python-modules/pytest-forked/default.nix b/pkgs/development/python-modules/pytest-forked/default.nix index 64c43164a01b..6a508417e2e1 100644 --- a/pkgs/development/python-modules/pytest-forked/default.nix +++ b/pkgs/development/python-modules/pytest-forked/default.nix @@ -54,7 +54,7 @@ buildPythonPackage rec { ]; disabledTests = - if (pythonAtLeast "3.12" && stdenv.isDarwin && stdenv.isx86_64) then + if (pythonAtLeast "3.12" && stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isx86_64) then [ # non reproducible test failure on hydra, works on community builder # https://hydra.nixos.org/build/252537267 diff --git a/pkgs/development/python-modules/pytest-recording/default.nix b/pkgs/development/python-modules/pytest-recording/default.nix index 23471054526c..dd9e84b3517e 100644 --- a/pkgs/development/python-modules/pytest-recording/default.nix +++ b/pkgs/development/python-modules/pytest-recording/default.nix @@ -44,7 +44,7 @@ buildPythonPackage rec { disabledTests = [ "test_block_network_with_allowed_hosts" ] - ++ lib.optionals stdenv.isDarwin [ + ++ lib.optionals stdenv.hostPlatform.isDarwin [ # Missing socket.AF_NETLINK "test_other_socket" ]; diff --git a/pkgs/development/python-modules/python-can/default.nix b/pkgs/development/python-modules/python-can/default.nix index 26bd3a27474e..8224de600ae8 100644 --- a/pkgs/development/python-modules/python-can/default.nix +++ b/pkgs/development/python-modules/python-can/default.nix @@ -74,7 +74,7 @@ buildPythonPackage rec { "test_pack_unpack" "test_receive" ] - ++ lib.optionals stdenv.isDarwin [ + ++ lib.optionals stdenv.hostPlatform.isDarwin [ # timing sensitive "test_general" "test_gap" diff --git a/pkgs/development/python-modules/python-engineio/default.nix b/pkgs/development/python-modules/python-engineio/default.nix index a7eb7fe8dd17..6a534a249f1f 100644 --- a/pkgs/development/python-modules/python-engineio/default.nix +++ b/pkgs/development/python-modules/python-engineio/default.nix @@ -53,9 +53,9 @@ buildPythonPackage rec { pytestCheckHook ]; - doCheck = !stdenv.isDarwin; + doCheck = !stdenv.hostPlatform.isDarwin; - preCheck = lib.optionalString stdenv.isLinux '' + preCheck = lib.optionalString stdenv.hostPlatform.isLinux '' echo "nameserver 127.0.0.1" > resolv.conf export NIX_REDIRECTS=/etc/protocols=${iana-etc}/etc/protocols:/etc/resolv.conf=$(realpath resolv.conf) \ LD_PRELOAD=${libredirect}/lib/libredirect.so diff --git a/pkgs/development/python-modules/python-etcd/default.nix b/pkgs/development/python-modules/python-etcd/default.nix index 27d768c4e96e..031efa7b31e3 100644 --- a/pkgs/development/python-modules/python-etcd/default.nix +++ b/pkgs/development/python-modules/python-etcd/default.nix @@ -39,7 +39,7 @@ buildPythonPackage { ]; # arm64 is an unsupported platform on etcd 3.4. should be able to be removed on >= etcd 3.5 - doCheck = !stdenv.isAarch64; + doCheck = !stdenv.hostPlatform.isAarch64; preCheck = '' for file in "test_auth" "integration/test_simple"; do diff --git a/pkgs/development/python-modules/python-flirt/default.nix b/pkgs/development/python-modules/python-flirt/default.nix index 8034a621f8b2..47fdc3cfa08d 100644 --- a/pkgs/development/python-modules/python-flirt/default.nix +++ b/pkgs/development/python-modules/python-flirt/default.nix @@ -29,7 +29,7 @@ buildPythonPackage rec { maturinBuildHook ]; - buildInputs = lib.optionals stdenv.isDarwin [ libiconv ]; + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ libiconv ]; buildAndTestSubdir = "pyflirt"; diff --git a/pkgs/development/python-modules/python-fx/default.nix b/pkgs/development/python-modules/python-fx/default.nix index 0d906cd2e379..40b09992d749 100644 --- a/pkgs/development/python-modules/python-fx/default.nix +++ b/pkgs/development/python-modules/python-fx/default.nix @@ -81,7 +81,7 @@ buildPythonPackage rec { ]; # FAILED tests/test_event_loops.py::TwistedEventLoopTest::test_run - AssertionError: 'callback called with future outcome: True' not found in ['... - doCheck = !stdenv.isDarwin; + doCheck = !stdenv.hostPlatform.isDarwin; pythonImportsCheck = [ "pyfx" ]; diff --git a/pkgs/development/python-modules/python-gvm/default.nix b/pkgs/development/python-modules/python-gvm/default.nix index 763999be86ad..6d346d6c638b 100644 --- a/pkgs/development/python-modules/python-gvm/default.nix +++ b/pkgs/development/python-modules/python-gvm/default.nix @@ -47,7 +47,7 @@ buildPythonPackage rec { # No running SSH available "test_connect_error" "test_feed_xml_error" - ] ++ lib.optionals stdenv.isDarwin [ "test_feed_xml_error" ]; + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ "test_feed_xml_error" ]; pythonImportsCheck = [ "gvm" ]; diff --git a/pkgs/development/python-modules/python-jenkins/default.nix b/pkgs/development/python-modules/python-jenkins/default.nix index 8afb965dbaca..e06a0760fbdd 100644 --- a/pkgs/development/python-modules/python-jenkins/default.nix +++ b/pkgs/development/python-modules/python-jenkins/default.nix @@ -28,7 +28,7 @@ buildPythonPackage rec { # test uses timeout mechanism unsafe for use with the "spawn" # multiprocessing backend used on macos - postPatch = lib.optionalString stdenv.isDarwin '' + postPatch = lib.optionalString stdenv.hostPlatform.isDarwin '' substituteInPlace tests/test_jenkins_sockets.py \ --replace test_jenkins_open_no_timeout dont_test_jenkins_open_no_timeout ''; diff --git a/pkgs/development/python-modules/python-ldap/default.nix b/pkgs/development/python-modules/python-ldap/default.nix index 4f1c9bd9636e..ebb042b848ec 100644 --- a/pkgs/development/python-modules/python-ldap/default.nix +++ b/pkgs/development/python-modules/python-ldap/default.nix @@ -65,7 +65,7 @@ buildPythonPackage rec { "test_tls_ext_noca" ]; - doCheck = !stdenv.isDarwin; + doCheck = !stdenv.hostPlatform.isDarwin; meta = with lib; { changelog = "https://github.com/python-ldap/python-ldap/releases/tag/python-ldap-${version}"; diff --git a/pkgs/development/python-modules/python-mapnik/default.nix b/pkgs/development/python-modules/python-mapnik/default.nix index eed723f10d8e..c06251663e0b 100644 --- a/pkgs/development/python-modules/python-mapnik/default.nix +++ b/pkgs/development/python-modules/python-mapnik/default.nix @@ -53,7 +53,7 @@ buildPythonPackage rec { ./python-mapnik_std_optional.patch ]; - stdenv = if python.stdenv.isDarwin then darwin.apple_sdk_11_0.stdenv else python.stdenv; + stdenv = if python.stdenv.hostPlatform.isDarwin then darwin.apple_sdk_11_0.stdenv else python.stdenv; build-system = [ setuptools ]; @@ -103,7 +103,7 @@ buildPythonPackage rec { # import from $out rm -r mapnik '' - + lib.optionalString stdenv.isDarwin '' + + lib.optionalString stdenv.hostPlatform.isDarwin '' # Replace the hardcoded /tmp references with $TMPDIR sed -i "s,/tmp,$TMPDIR,g" test/python_tests/*.py ''; @@ -114,7 +114,7 @@ buildPythonPackage rec { "test_passing_pycairo_context_pdf" "test_pdf_printing" "test_render_with_scale_factor" - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ "test_passing_pycairo_context_png" "test_passing_pycairo_context_svg" "test_pycairo_pdf_surface1" diff --git a/pkgs/development/python-modules/python-redis-lock/default.nix b/pkgs/development/python-modules/python-redis-lock/default.nix index e50bbeff87ce..a891f0a0e48c 100644 --- a/pkgs/development/python-modules/python-redis-lock/default.nix +++ b/pkgs/development/python-modules/python-redis-lock/default.nix @@ -60,7 +60,7 @@ buildPythonPackage rec { # For Django tests preCheck = "export DJANGO_SETTINGS_MODULE=test_project.settings"; - disabledTests = lib.optionals stdenv.isDarwin [ + disabledTests = lib.optionals stdenv.hostPlatform.isDarwin [ # fail on Darwin because it defaults to multiprocessing `spawn` "test_reset_signalizes" "test_reset_all_signalizes" diff --git a/pkgs/development/python-modules/python-roborock/default.nix b/pkgs/development/python-modules/python-roborock/default.nix index add99dfb341d..289a4e41005e 100644 --- a/pkgs/development/python-modules/python-roborock/default.nix +++ b/pkgs/development/python-modules/python-roborock/default.nix @@ -49,7 +49,7 @@ buildPythonPackage rec { dacite paho-mqtt pycryptodome - ] ++ lib.optionals stdenv.isDarwin [ pycryptodomex ]; + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ pycryptodomex ]; nativeCheckInputs = [ pytest-asyncio diff --git a/pkgs/development/python-modules/python-rtmidi/default.nix b/pkgs/development/python-modules/python-rtmidi/default.nix index f29a3097c631..818eeb919b29 100644 --- a/pkgs/development/python-modules/python-rtmidi/default.nix +++ b/pkgs/development/python-modules/python-rtmidi/default.nix @@ -43,11 +43,11 @@ buildPythonPackage rec { buildInputs = [ ] - ++ lib.optionals stdenv.isLinux [ + ++ lib.optionals stdenv.hostPlatform.isLinux [ libjack2 alsa-lib ] - ++ lib.optionals stdenv.isDarwin [ + ++ lib.optionals stdenv.hostPlatform.isDarwin [ CoreAudio CoreMIDI CoreServices diff --git a/pkgs/development/python-modules/python-xmp-toolkit/default.nix b/pkgs/development/python-modules/python-xmp-toolkit/default.nix index edcb3e0047e7..f5594e983ace 100644 --- a/pkgs/development/python-modules/python-xmp-toolkit/default.nix +++ b/pkgs/development/python-modules/python-xmp-toolkit/default.nix @@ -35,7 +35,7 @@ buildPythonPackage { ''; # hangs on darwin + sandbox - doCheck = !stdenv.isDarwin; + doCheck = !stdenv.hostPlatform.isDarwin; preCheck = '' rm test/{test_exempi,test_files}.py diff --git a/pkgs/development/python-modules/pythonocc-core/default.nix b/pkgs/development/python-modules/pythonocc-core/default.nix index f01fb4ca467e..755834eecd32 100644 --- a/pkgs/development/python-modules/pythonocc-core/default.nix +++ b/pkgs/development/python-modules/pythonocc-core/default.nix @@ -51,7 +51,7 @@ stdenv.mkDerivation rec { libXi fontconfig rapidjson - ] ++ lib.optionals stdenv.isDarwin [ Cocoa ]; + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ Cocoa ]; cmakeFlags = [ "-Wno-dev" diff --git a/pkgs/development/python-modules/pytorch-metric-learning/default.nix b/pkgs/development/python-modules/pytorch-metric-learning/default.nix index 832f2e6666d3..19678c01938e 100644 --- a/pkgs/development/python-modules/pytorch-metric-learning/default.nix +++ b/pkgs/development/python-modules/pytorch-metric-learning/default.nix @@ -83,7 +83,7 @@ buildPythonPackage rec { "test_get_nearest_neighbors" "test_list_of_text" "test_untrained_indexer" - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ # AttributeError: module 'torch.distributed' has no attribute 'init_process_group' "test_single_proc" ] ++ lib.optionals cudaSupport [ diff --git a/pkgs/development/python-modules/pyudev/default.nix b/pkgs/development/python-modules/pyudev/default.nix index 13073a59f481..f7b75f0ff22e 100644 --- a/pkgs/development/python-modules/pyudev/default.nix +++ b/pkgs/development/python-modules/pyudev/default.nix @@ -21,7 +21,7 @@ buildPythonPackage rec { hash = "sha256-LpRUJ6IWdIk7uXYyQB22ITnZHOoe6WE3zHsHrSIZj8c="; }; - postPatch = lib.optionalString stdenvNoCC.isLinux '' + postPatch = lib.optionalString stdenvNoCC.hostPlatform.isLinux '' substituteInPlace src/pyudev/_ctypeslib/utils.py \ --replace "find_library(name)" "'${lib.getLib udev}/lib/libudev.so'" ''; diff --git a/pkgs/development/python-modules/pyunbound/default.nix b/pkgs/development/python-modules/pyunbound/default.nix index a5d33cbfa440..13357faec593 100644 --- a/pkgs/development/python-modules/pyunbound/default.nix +++ b/pkgs/development/python-modules/pyunbound/default.nix @@ -56,7 +56,7 @@ buildPythonPackage rec { rm -r $out/bin $out/share $out/include $out/etc/unbound '' # patchelf is only available on Linux and no patching is needed on darwin - + lib.optionalString stdenv.isLinux '' + + lib.optionalString stdenv.hostPlatform.isLinux '' patchelf --replace-needed libunbound.so.8 $out/${python.sitePackages}/libunbound.so.8 $out/${python.sitePackages}/_unbound.so ''; diff --git a/pkgs/development/python-modules/pyvex/default.nix b/pkgs/development/python-modules/pyvex/default.nix index 4fe56684d50e..f57cf0d0bcc3 100644 --- a/pkgs/development/python-modules/pyvex/default.nix +++ b/pkgs/development/python-modules/pyvex/default.nix @@ -30,12 +30,12 @@ buildPythonPackage rec { pycparser ]; - postPatch = lib.optionalString stdenv.isDarwin '' + postPatch = lib.optionalString stdenv.hostPlatform.isDarwin '' substituteInPlace vex/Makefile-gcc \ --replace-fail '/usr/bin/ar' 'ar' ''; - setupPyBuildFlags = lib.optionals stdenv.isLinux [ + setupPyBuildFlags = lib.optionals stdenv.hostPlatform.isLinux [ "--plat-name" "linux" ]; diff --git a/pkgs/development/python-modules/pyvlx/default.nix b/pkgs/development/python-modules/pyvlx/default.nix index 0bfb49ebc383..65c469091eea 100644 --- a/pkgs/development/python-modules/pyvlx/default.nix +++ b/pkgs/development/python-modules/pyvlx/default.nix @@ -47,6 +47,6 @@ buildPythonPackage rec { changelog = "https://github.com/Julius2342/pyvlx/releases/tag/${version}"; license = with licenses; [ lgpl2Only ]; maintainers = with maintainers; [ fab ]; - broken = stdenv.isDarwin; + broken = stdenv.hostPlatform.isDarwin; }; } diff --git a/pkgs/development/python-modules/qcelemental/default.nix b/pkgs/development/python-modules/qcelemental/default.nix index e5a2688d0011..71cfa490452b 100644 --- a/pkgs/development/python-modules/qcelemental/default.nix +++ b/pkgs/development/python-modules/qcelemental/default.nix @@ -39,7 +39,7 @@ buildPythonPackage rec { pythonImportsCheck = [ "qcelemental" ]; meta = with lib; { - broken = stdenv.isDarwin; + broken = stdenv.hostPlatform.isDarwin; description = "Periodic table, physical constants and molecule parsing for quantum chemistry"; homepage = "https://github.com/MolSSI/QCElemental"; changelog = "https://github.com/MolSSI/QCElemental/blob/v${version}/docs/changelog.rst"; diff --git a/pkgs/development/python-modules/qcodes-contrib-drivers/default.nix b/pkgs/development/python-modules/qcodes-contrib-drivers/default.nix index 4c2db9b41f5c..d6bd8c809582 100644 --- a/pkgs/development/python-modules/qcodes-contrib-drivers/default.nix +++ b/pkgs/development/python-modules/qcodes-contrib-drivers/default.nix @@ -50,11 +50,11 @@ buildPythonPackage rec { pythonImportsCheck = [ "qcodes_contrib_drivers" ]; disabledTests = - lib.optionals (stdenv.isDarwin) [ + lib.optionals (stdenv.hostPlatform.isDarwin) [ # At index 13 diff: 'sour6:volt 0.29000000000000004' != 'sour6:volt 0.29' "test_stability_diagram_external" ] - ++ lib.optionals (stdenv.isLinux && stdenv.isAarch64) [ + ++ lib.optionals (stdenv.hostPlatform.isLinux && stdenv.hostPlatform.isAarch64) [ # AssertionError: assert ['outp:trig4:...9999996', ...] == ['outp:trig4:...t 0.266', ...] "test_stability_diagram_external" ]; diff --git a/pkgs/development/python-modules/qcs-sdk-python/default.nix b/pkgs/development/python-modules/qcs-sdk-python/default.nix index 4d0d1ffe38c7..854ed41a3437 100644 --- a/pkgs/development/python-modules/qcs-sdk-python/default.nix +++ b/pkgs/development/python-modules/qcs-sdk-python/default.nix @@ -53,7 +53,7 @@ buildPythonPackage rec { tracing-opentelemetry = [ opentelemetry-api ]; }; - buildInputs = lib.optionals stdenv.isDarwin [ + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.Security darwin.apple_sdk.frameworks.SystemConfiguration libiconv diff --git a/pkgs/development/python-modules/qiskit-ignis/default.nix b/pkgs/development/python-modules/qiskit-ignis/default.nix index a5744586b1a5..a51ad99805b9 100644 --- a/pkgs/development/python-modules/qiskit-ignis/default.nix +++ b/pkgs/development/python-modules/qiskit-ignis/default.nix @@ -64,7 +64,7 @@ buildPythonPackage rec { [ "test_tensored_meas_cal_on_circuit" # Flaky test, occasionally returns result outside bounds ] - ++ lib.optionals stdenv.isAarch64 [ + ++ lib.optionals stdenv.hostPlatform.isAarch64 [ "test_fitters" # Fails check that arrays are close. Might be due to aarch64 math issues. ]; diff --git a/pkgs/development/python-modules/qiskit-terra/default.nix b/pkgs/development/python-modules/qiskit-terra/default.nix index 44ae18a933d0..eb433a22e8ef 100644 --- a/pkgs/development/python-modules/qiskit-terra/default.nix +++ b/pkgs/development/python-modules/qiskit-terra/default.nix @@ -80,7 +80,7 @@ buildPythonPackage rec { rustPlatform.cargoSetupHook ]; - buildInputs = lib.optionals stdenv.isDarwin [ libiconv ]; + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ libiconv ]; cargoDeps = rustPlatform.fetchCargoTarball { inherit src; diff --git a/pkgs/development/python-modules/qscintilla-qt5/default.nix b/pkgs/development/python-modules/qscintilla-qt5/default.nix index bab2320b0d6f..2ef0d3280f83 100644 --- a/pkgs/development/python-modules/qscintilla-qt5/default.nix +++ b/pkgs/development/python-modules/qscintilla-qt5/default.nix @@ -35,7 +35,7 @@ buildPythonPackage rec { pythonPackages.setuptools ]; buildInputs = [ qtbase ]; - propagatedBuildInputs = [ pyqt5 ] ++ lib.optionals stdenv.isDarwin [ qtmacextras ]; + propagatedBuildInputs = [ pyqt5 ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ qtmacextras ]; dontWrapQtApps = true; @@ -47,7 +47,7 @@ buildPythonPackage rec { echo 'sip-include-dirs = [ "${pyqt5}/${python.sitePackages}/PyQt5/bindings"]' \ >> pyproject.toml '' - + lib.optionalString stdenv.isDarwin '' + + lib.optionalString stdenv.hostPlatform.isDarwin '' substituteInPlace project.py \ --replace \ "if self.project.qsci_external_lib: diff --git a/pkgs/development/python-modules/questionary/default.nix b/pkgs/development/python-modules/questionary/default.nix index ea6844159930..9663e8e1fdd1 100644 --- a/pkgs/development/python-modules/questionary/default.nix +++ b/pkgs/development/python-modules/questionary/default.nix @@ -33,7 +33,7 @@ buildPythonPackage rec { nativeCheckInputs = [ pytestCheckHook ]; - preCheck = lib.optionalString stdenv.isDarwin '' + preCheck = lib.optionalString stdenv.hostPlatform.isDarwin '' ulimit -n 1024 ''; diff --git a/pkgs/development/python-modules/quil/default.nix b/pkgs/development/python-modules/quil/default.nix index 79f6a4c6ed06..98175f1cbbda 100644 --- a/pkgs/development/python-modules/quil/default.nix +++ b/pkgs/development/python-modules/quil/default.nix @@ -38,7 +38,7 @@ buildPythonPackage rec { rustPlatform.maturinBuildHook ]; - buildInputs = lib.optionals stdenv.isDarwin [ libiconv ]; + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ libiconv ]; dependencies = [ numpy ]; diff --git a/pkgs/development/python-modules/rapidfuzz/default.nix b/pkgs/development/python-modules/rapidfuzz/default.nix index 02ef0d753fae..64246e6835ee 100644 --- a/pkgs/development/python-modules/rapidfuzz/default.nix +++ b/pkgs/development/python-modules/rapidfuzz/default.nix @@ -56,7 +56,7 @@ buildPythonPackage rec { '' export RAPIDFUZZ_BUILD_EXTENSION=1 '' - + lib.optionalString (stdenv.isDarwin && stdenv.isx86_64) '' + + lib.optionalString (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isx86_64) '' export CMAKE_ARGS="-DCMAKE_CXX_COMPILER_AR=$AR -DCMAKE_CXX_COMPILER_RANLIB=$RANLIB" ''; @@ -74,7 +74,7 @@ buildPythonPackage rec { pytestCheckHook ]; - disabledTests = lib.optionals (stdenv.isDarwin && stdenv.isx86_64) [ + disabledTests = lib.optionals (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isx86_64) [ # segfaults "test_cdist" ]; diff --git a/pkgs/development/python-modules/rapidocr-onnxruntime/default.nix b/pkgs/development/python-modules/rapidocr-onnxruntime/default.nix index eef3e3b975ce..5739ca88b3b0 100644 --- a/pkgs/development/python-modules/rapidocr-onnxruntime/default.nix +++ b/pkgs/development/python-modules/rapidocr-onnxruntime/default.nix @@ -115,7 +115,7 @@ buildPythonPackage { meta = { # This seems to be related to https://github.com/microsoft/onnxruntime/issues/10038 # Also some related issue: https://github.com/NixOS/nixpkgs/pull/319053#issuecomment-2167713362 - broken = (stdenv.isLinux && stdenv.isAarch64); + broken = (stdenv.hostPlatform.isLinux && stdenv.hostPlatform.isAarch64); changelog = "https://github.com/RapidAI/RapidOCR/releases/tag/v${version}"; description = "Cross platform OCR Library based on OnnxRuntime"; homepage = "https://github.com/RapidAI/RapidOCR"; diff --git a/pkgs/development/python-modules/rasterio/default.nix b/pkgs/development/python-modules/rasterio/default.nix index 8536f1bc981c..3365f12c1bc3 100644 --- a/pkgs/development/python-modules/rasterio/default.nix +++ b/pkgs/development/python-modules/rasterio/default.nix @@ -99,7 +99,7 @@ buildPythonPackage rec { disabledTests = [ # flaky "test_outer_boundless_pixel_fidelity" - ] ++ lib.optionals stdenv.isDarwin [ "test_reproject_error_propagation" ]; + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ "test_reproject_error_propagation" ]; pythonImportsCheck = [ "rasterio" ]; diff --git a/pkgs/development/python-modules/raylib-python-cffi/default.nix b/pkgs/development/python-modules/raylib-python-cffi/default.nix index 6069a6bdfe55..eaaa13c96cb3 100644 --- a/pkgs/development/python-modules/raylib-python-cffi/default.nix +++ b/pkgs/development/python-modules/raylib-python-cffi/default.nix @@ -66,7 +66,7 @@ buildPythonPackage rec { physac raygui ] - ++ lib.optionals stdenv.isDarwin [ + ++ lib.optionals stdenv.hostPlatform.isDarwin [ OpenGL Cocoa IOKit diff --git a/pkgs/development/python-modules/rdflib/default.nix b/pkgs/development/python-modules/rdflib/default.nix index b0f2b4c7cd2a..17bf74863a74 100644 --- a/pkgs/development/python-modules/rdflib/default.nix +++ b/pkgs/development/python-modules/rdflib/default.nix @@ -82,7 +82,7 @@ buildPythonPackage rec { "test_guess_format_for_parse" "rdflib.extras.infixowl" ] - ++ lib.optionals stdenv.isDarwin [ + ++ lib.optionals stdenv.hostPlatform.isDarwin [ # Require loopback network access "TestGraphHTTP" ]; diff --git a/pkgs/development/python-modules/readability-lxml/default.nix b/pkgs/development/python-modules/readability-lxml/default.nix index e676918cb698..7c75c32be269 100644 --- a/pkgs/development/python-modules/readability-lxml/default.nix +++ b/pkgs/development/python-modules/readability-lxml/default.nix @@ -39,7 +39,7 @@ buildPythonPackage rec { timeout-decorator ]; - disabledTests = lib.optionals stdenv.isDarwin [ + disabledTests = lib.optionals stdenv.hostPlatform.isDarwin [ # Test is broken on darwin. Fix in master from https://github.com/buriy/python-readability/pull/178 "test_many_repeated_spaces" ]; diff --git a/pkgs/development/python-modules/requests-kerberos/default.nix b/pkgs/development/python-modules/requests-kerberos/default.nix index ffa706fcd58b..70a5eebacdb5 100644 --- a/pkgs/development/python-modules/requests-kerberos/default.nix +++ b/pkgs/development/python-modules/requests-kerberos/default.nix @@ -32,7 +32,7 @@ buildPythonPackage rec { pyspnego ] # Avoid broken Python krb5 package on Darwin - ++ lib.optionals (!stdenv.isDarwin) pyspnego.optional-dependencies.kerberos; + ++ lib.optionals (!stdenv.hostPlatform.isDarwin) pyspnego.optional-dependencies.kerberos; nativeCheckInputs = [ pytestCheckHook diff --git a/pkgs/development/python-modules/requests/default.nix b/pkgs/development/python-modules/requests/default.nix index c8ec3c490ecf..6ffe869c0a6a 100644 --- a/pkgs/development/python-modules/requests/default.nix +++ b/pkgs/development/python-modules/requests/default.nix @@ -72,13 +72,13 @@ buildPythonPackage rec { "TestRequests" "TestTimeout" ] - ++ lib.optionals (stdenv.isDarwin && stdenv.isAarch64) [ + ++ lib.optionals (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isAarch64) [ # Fatal Python error: Aborted "test_basic_response" "test_text_response" ]; - disabledTestPaths = lib.optionals (stdenv.isDarwin && stdenv.isAarch64) [ + disabledTestPaths = lib.optionals (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isAarch64) [ # Fatal Python error: Aborted "tests/test_lowlevel.py" ]; diff --git a/pkgs/development/python-modules/rerun-sdk/default.nix b/pkgs/development/python-modules/rerun-sdk/default.nix index add95c23c9a1..13b7226782ba 100644 --- a/pkgs/development/python-modules/rerun-sdk/default.nix +++ b/pkgs/development/python-modules/rerun-sdk/default.nix @@ -75,7 +75,7 @@ buildPythonPackage { ]; inherit (rerun) addDlopenRunpaths addDlopenRunpathsPhase; - postPhases = lib.optionals stdenv.isLinux [ "addDlopenRunpathsPhase" ]; + postPhases = lib.optionals stdenv.hostPlatform.isLinux [ "addDlopenRunpathsPhase" ]; disabledTestPaths = [ # "fixture 'benchmark' not found" diff --git a/pkgs/development/python-modules/rising/default.nix b/pkgs/development/python-modules/rising/default.nix index 0e876aecbb05..49b38e2e3426 100644 --- a/pkgs/development/python-modules/rising/default.nix +++ b/pkgs/development/python-modules/rising/default.nix @@ -54,7 +54,7 @@ buildPythonPackage rec { pytestCheckHook ]; - disabledTests = lib.optionals (stdenv.isLinux && stdenv.isAarch64) [ + disabledTests = lib.optionals (stdenv.hostPlatform.isLinux && stdenv.hostPlatform.isAarch64) [ # RuntimeError: DataLoader worker (pid(s) <...>) exited unexpectedly: "test_progressive_resize_integration" ]; diff --git a/pkgs/development/python-modules/rpy2/default.nix b/pkgs/development/python-modules/rpy2/default.nix index 1fd58cb565fe..582e35508502 100644 --- a/pkgs/development/python-modules/rpy2/default.nix +++ b/pkgs/development/python-modules/rpy2/default.nix @@ -87,7 +87,7 @@ buildPythonPackage rec { simplegeneric ]; - doCheck = !stdenv.isDarwin; + doCheck = !stdenv.hostPlatform.isDarwin; # https://github.com/rpy2/rpy2/issues/1111 disabledTests = [ diff --git a/pkgs/development/python-modules/rpyc/default.nix b/pkgs/development/python-modules/rpyc/default.nix index a9873de90632..336ddca0bf73 100644 --- a/pkgs/development/python-modules/rpyc/default.nix +++ b/pkgs/development/python-modules/rpyc/default.nix @@ -59,7 +59,7 @@ buildPythonPackage rec { pythonImportsCheck = [ "rpyc" ]; - doCheck = !stdenv.isDarwin; + doCheck = !stdenv.hostPlatform.isDarwin; meta = with lib; { description = "Remote Python Call (RPyC), a transparent and symmetric RPC library"; diff --git a/pkgs/development/python-modules/rstcheck/default.nix b/pkgs/development/python-modules/rstcheck/default.nix index a403db708681..206f9192d92a 100644 --- a/pkgs/development/python-modules/rstcheck/default.nix +++ b/pkgs/development/python-modules/rstcheck/default.nix @@ -43,7 +43,7 @@ buildPythonPackage rec { nativeCheckInputs = [ pytestCheckHook ]; - disabledTests = lib.optionals stdenv.isDarwin [ + disabledTests = lib.optionals stdenv.hostPlatform.isDarwin [ # Disabled until https://github.com/rstcheck/rstcheck-core/issues/19 is resolved. "test_error_without_config_file_macos" "test_file_1_is_bad_without_config_macos" diff --git a/pkgs/development/python-modules/rtmidi-python/default.nix b/pkgs/development/python-modules/rtmidi-python/default.nix index 6d8bf78b6d3c..cdb87a0c8657 100644 --- a/pkgs/development/python-modules/rtmidi-python/default.nix +++ b/pkgs/development/python-modules/rtmidi-python/default.nix @@ -26,8 +26,8 @@ buildPythonPackage rec { nativeBuildInputs = [ cython_0 ]; buildInputs = - lib.optionals stdenv.isLinux [ alsa-lib ] - ++ lib.optionals stdenv.isDarwin [ + lib.optionals stdenv.hostPlatform.isLinux [ alsa-lib ] + ++ lib.optionals stdenv.hostPlatform.isDarwin [ CoreAudio CoreMIDI CoreServices diff --git a/pkgs/development/python-modules/ruff-api/default.nix b/pkgs/development/python-modules/ruff-api/default.nix index 13bcdefa3496..a363c4c7d32a 100644 --- a/pkgs/development/python-modules/ruff-api/default.nix +++ b/pkgs/development/python-modules/ruff-api/default.nix @@ -40,7 +40,7 @@ buildPythonPackage rec { rustc ]; - buildInputs = lib.optionals stdenv.isDarwin [ + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.CoreFoundation darwin.apple_sdk.frameworks.CoreServices libiconv diff --git a/pkgs/development/python-modules/ruffus/default.nix b/pkgs/development/python-modules/ruffus/default.nix index 44a1b8939795..f7c96b10d3e1 100644 --- a/pkgs/development/python-modules/ruffus/default.nix +++ b/pkgs/development/python-modules/ruffus/default.nix @@ -28,7 +28,7 @@ buildPythonPackage rec { ]; # tests very flaky & hang often on darwin - doCheck = !stdenv.isDarwin; + doCheck = !stdenv.hostPlatform.isDarwin; # test files do indeed need to be executed separately checkPhase = '' pushd ruffus/test diff --git a/pkgs/development/python-modules/rustworkx/default.nix b/pkgs/development/python-modules/rustworkx/default.nix index b0be3a51573c..3f17b45e2d20 100644 --- a/pkgs/development/python-modules/rustworkx/default.nix +++ b/pkgs/development/python-modules/rustworkx/default.nix @@ -38,7 +38,7 @@ buildPythonPackage rec { rustc ]; - buildInputs = [ numpy ] ++ lib.optionals stdenv.isDarwin [ libiconv ]; + buildInputs = [ numpy ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ libiconv ]; checkInputs = [ fixtures diff --git a/pkgs/development/python-modules/s3transfer/default.nix b/pkgs/development/python-modules/s3transfer/default.nix index e138d2193a5c..d245c6b0b964 100644 --- a/pkgs/development/python-modules/s3transfer/default.nix +++ b/pkgs/development/python-modules/s3transfer/default.nix @@ -38,7 +38,7 @@ buildPythonPackage rec { # There was a change in python 3.8 that defaults multiprocessing to spawn instead of fork on macOS # See https://bugs.python.org/issue33725 and https://github.com/python/cpython/pull/13603. # I suspect the underlying issue here is that upstream tests aren't compatible with spawn multiprocessing, and pass on linux where the default is still fork - lib.optionals stdenv.isDarwin [ "tests/unit/test_compat.py" ]; + lib.optionals stdenv.hostPlatform.isDarwin [ "tests/unit/test_compat.py" ]; pythonImportsCheck = [ "s3transfer" ]; diff --git a/pkgs/development/python-modules/safetensors/default.nix b/pkgs/development/python-modules/safetensors/default.nix index 7228a840d668..584cc1e7d6af 100644 --- a/pkgs/development/python-modules/safetensors/default.nix +++ b/pkgs/development/python-modules/safetensors/default.nix @@ -48,7 +48,7 @@ buildPythonPackage rec { setuptools-rust ]; - buildInputs = lib.optionals stdenv.isDarwin [ libiconv ]; + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ libiconv ]; nativeCheckInputs = [ h5py @@ -64,7 +64,7 @@ buildPythonPackage rec { "tests/test_paddle_comparison.py" "tests/test_tf_comparison.py" ] - ++ lib.optionals stdenv.isDarwin [ + ++ lib.optionals stdenv.hostPlatform.isDarwin [ # don't require mlx (not in Nixpkgs) to run tests "tests/test_mlx_comparison.py" ]; diff --git a/pkgs/development/python-modules/sanic/default.nix b/pkgs/development/python-modules/sanic/default.nix index 04f00668ed92..6979926cd7c9 100644 --- a/pkgs/development/python-modules/sanic/default.nix +++ b/pkgs/development/python-modules/sanic/default.nix @@ -5,7 +5,7 @@ aioquic, beautifulsoup4, buildPythonPackage, - doCheck ? !stdenv.isDarwin, # on Darwin, tests fail but pkg still works + doCheck ? !stdenv.hostPlatform.isDarwin, # on Darwin, tests fail but pkg still works fetchFromGitHub, gunicorn, html5tagger, @@ -82,7 +82,7 @@ buildPythonPackage rec { # needed for relative paths for some packages cd tests '' - + lib.optionalString stdenv.isDarwin '' + + lib.optionalString stdenv.hostPlatform.isDarwin '' # OSError: [Errno 24] Too many open files ulimit -n 1024 ''; diff --git a/pkgs/development/python-modules/scikit-image/default.nix b/pkgs/development/python-modules/scikit-image/default.nix index 369f1bf78e5c..3c0743354787 100644 --- a/pkgs/development/python-modules/scikit-image/default.nix +++ b/pkgs/development/python-modules/scikit-image/default.nix @@ -125,7 +125,7 @@ let "skimage/io/tests/test_io.py::test_imread_http_url" "skimage/restoration/tests/test_rolling_ball.py::test_ndim" ] - ++ lib.optionals stdenv.isDarwin [ + ++ lib.optionals stdenv.hostPlatform.isDarwin [ # Matplotlib tests are broken inside darwin sandbox "skimage/feature/tests/test_util.py::test_plot_matches" "skimage/filters/tests/test_thresholding.py::TestSimpleImage::test_try_all_threshold" @@ -133,7 +133,7 @@ let # See https://github.com/scikit-image/scikit-image/issues/7061 and https://github.com/scikit-image/scikit-image/issues/7104 "skimage/measure/tests/test_fit.py" ] - ++ lib.optionals (stdenv.isDarwin && stdenv.isAarch64) [ + ++ lib.optionals (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isAarch64) [ # https://github.com/scikit-image/scikit-image/issues/7104 "skimage/measure/tests/test_moments.py" ] diff --git a/pkgs/development/python-modules/scikit-learn/default.nix b/pkgs/development/python-modules/scikit-learn/default.nix index 7e975cb15949..eeba3f116d9d 100644 --- a/pkgs/development/python-modules/scikit-learn/default.nix +++ b/pkgs/development/python-modules/scikit-learn/default.nix @@ -80,12 +80,12 @@ buildPythonPackage rec { ''; # PermissionError: [Errno 1] Operation not permitted: '/nix/nix-installer' - doCheck = !stdenv.isDarwin; + doCheck = !stdenv.hostPlatform.isDarwin; disabledTests = [ # Skip test_feature_importance_regression - does web fetch "test_feature_importance_regression" - ] ++ lib.optionals stdenv.isAarch64 [ + ] ++ lib.optionals stdenv.hostPlatform.isAarch64 [ # doesn't seem to produce correct results? # possibly relevant: https://github.com/scikit-learn/scikit-learn/issues/25838#issuecomment-2308650816 "test_sparse_input" diff --git a/pkgs/development/python-modules/scikit-rf/default.nix b/pkgs/development/python-modules/scikit-rf/default.nix index e4d56716ee2e..3cbaf5f39e45 100644 --- a/pkgs/development/python-modules/scikit-rf/default.nix +++ b/pkgs/development/python-modules/scikit-rf/default.nix @@ -68,7 +68,7 @@ buildPythonPackage rec { ]; }; - env = lib.optionalAttrs stdenv.isDarwin { MPLBACKEND = "Agg"; }; + env = lib.optionalAttrs stdenv.hostPlatform.isDarwin { MPLBACKEND = "Agg"; }; nativeCheckInputs = [ pytest-mock @@ -83,7 +83,7 @@ buildPythonPackage rec { # test_calibration.py generates a divide by zero error on darwin # https://github.com/scikit-rf/scikit-rf/issues/972 disabledTestPaths = lib.optional ( - stdenv.isAarch64 && stdenv.isDarwin + stdenv.hostPlatform.isAarch64 && stdenv.hostPlatform.isDarwin ) "skrf/calibration/tests/test_calibration.py"; pythonImportsCheck = [ "skrf" ]; diff --git a/pkgs/development/python-modules/scikit-survival/default.nix b/pkgs/development/python-modules/scikit-survival/default.nix index e2d4ebff287b..78e58877d516 100644 --- a/pkgs/development/python-modules/scikit-survival/default.nix +++ b/pkgs/development/python-modules/scikit-survival/default.nix @@ -71,7 +71,7 @@ buildPythonPackage rec { "test_survival_svm" "test_tree" ] - ++ lib.optional (stdenv.isDarwin && stdenv.isAarch64) + ++ lib.optional (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isAarch64) # floating point mismatch on aarch64 # 27079905.88052468 to far from 27079905.880496684 "test_coxnet"; diff --git a/pkgs/development/python-modules/scipy/default.nix b/pkgs/development/python-modules/scipy/default.nix index e9b5a8a7ff5d..d6b812cd30ab 100644 --- a/pkgs/development/python-modules/scipy/default.nix +++ b/pkgs/development/python-modules/scipy/default.nix @@ -112,7 +112,7 @@ buildPythonPackage { pkg-config setuptools ] - ++ lib.optionals stdenv.isDarwin [ + ++ lib.optionals stdenv.hostPlatform.isDarwin [ # Minimal version required according to: # https://github.com/scipy/scipy/blob/v1.14.0/scipy/meson.build#L185-L188 (xcbuild.override { @@ -141,7 +141,7 @@ buildPythonPackage { # The following tests are broken on aarch64-darwin with newer compilers and library versions. # See https://github.com/scipy/scipy/issues/18308 - disabledTests = lib.optionals (stdenv.isDarwin && stdenv.isAarch64) [ + disabledTests = lib.optionals (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isAarch64) [ "test_a_b_neg_int_after_euler_hypergeometric_transformation" "test_dst4_definition_ortho" "test_load_mat4_le" @@ -150,7 +150,7 @@ buildPythonPackage { "test_uint64_max" ]; - doCheck = !(stdenv.isx86_64 && stdenv.isDarwin); + doCheck = !(stdenv.hostPlatform.isx86_64 && stdenv.hostPlatform.isDarwin); preConfigure = '' @@ -187,7 +187,7 @@ buildPythonPackage { # # ldr x0, [x0, ___stack_chk_guard];momd # - hardeningDisable = lib.optionals (stdenv.isAarch64 && stdenv.isDarwin) [ "stackprotector" ]; + hardeningDisable = lib.optionals (stdenv.hostPlatform.isAarch64 && stdenv.hostPlatform.isDarwin) [ "stackprotector" ]; # remove references to dev dependencies postInstall = '' diff --git a/pkgs/development/python-modules/scrapy/default.nix b/pkgs/development/python-modules/scrapy/default.nix index f291798d0500..010481da31e8 100644 --- a/pkgs/development/python-modules/scrapy/default.nix +++ b/pkgs/development/python-modules/scrapy/default.nix @@ -117,7 +117,7 @@ buildPythonPackage rec { # Test fails on Hydra "test_start_requests_laziness" ] - ++ lib.optionals stdenv.isDarwin [ + ++ lib.optionals stdenv.hostPlatform.isDarwin [ "test_xmliter_encoding" "test_download" "test_reactor_default_twisted_reactor_select" diff --git a/pkgs/development/python-modules/screeninfo/default.nix b/pkgs/development/python-modules/screeninfo/default.nix index dc32cbb1dd6b..9f1a6c3a6e24 100644 --- a/pkgs/development/python-modules/screeninfo/default.nix +++ b/pkgs/development/python-modules/screeninfo/default.nix @@ -46,7 +46,7 @@ buildPythonPackage rec { pythonImportsCheck = [ "screeninfo" ]; meta = with lib; { - broken = stdenv.isDarwin; + broken = stdenv.hostPlatform.isDarwin; description = "Fetch location and size of physical screens"; homepage = "https://github.com/rr-/screeninfo"; license = licenses.mit; diff --git a/pkgs/development/python-modules/scs/default.nix b/pkgs/development/python-modules/scs/default.nix index 8736930939e3..e311b2f2f25f 100644 --- a/pkgs/development/python-modules/scs/default.nix +++ b/pkgs/development/python-modules/scs/default.nix @@ -46,7 +46,7 @@ buildPythonPackage rec { ]; buildInputs = - if stdenv.isDarwin then + if stdenv.hostPlatform.isDarwin then [ Accelerate ] else [ diff --git a/pkgs/development/python-modules/selenium/default.nix b/pkgs/development/python-modules/selenium/default.nix index 9009d6bf3c4f..ab3b46b43816 100644 --- a/pkgs/development/python-modules/selenium/default.nix +++ b/pkgs/development/python-modules/selenium/default.nix @@ -47,11 +47,11 @@ buildPythonPackage rec { cp ../javascript/cdp-support/mutation-listener.js $DST_REMOTE cp ../third_party/js/selenium/webdriver.json $DST_FF/webdriver_prefs.json '' - + lib.optionalString stdenv.isDarwin '' + + lib.optionalString stdenv.hostPlatform.isDarwin '' mkdir -p $DST_PREFIX/common/macos ln -s ${lib.getExe selenium-manager} $DST_PREFIX/common/macos/ '' - + lib.optionalString stdenv.isLinux '' + + lib.optionalString stdenv.hostPlatform.isLinux '' mkdir -p $DST_PREFIX/common/linux/ ln -s ${lib.getExe selenium-manager} $DST_PREFIX/common/linux/ ''; diff --git a/pkgs/development/python-modules/send2trash/default.nix b/pkgs/development/python-modules/send2trash/default.nix index 06beaabdbcd5..f497e2fef41c 100644 --- a/pkgs/development/python-modules/send2trash/default.nix +++ b/pkgs/development/python-modules/send2trash/default.nix @@ -21,7 +21,7 @@ buildPythonPackage rec { nativeBuildInputs = [ setuptools ]; - doCheck = !stdenv.isDarwin; + doCheck = !stdenv.hostPlatform.isDarwin; preCheck = '' export HOME=$TMPDIR diff --git a/pkgs/development/python-modules/sentry-sdk/1.nix b/pkgs/development/python-modules/sentry-sdk/1.nix index 3f57549a1e39..db47e03c017d 100644 --- a/pkgs/development/python-modules/sentry-sdk/1.nix +++ b/pkgs/development/python-modules/sentry-sdk/1.nix @@ -102,7 +102,7 @@ buildPythonPackage rec { pytestCheckHook ]; - doCheck = !stdenv.isDarwin; + doCheck = !stdenv.hostPlatform.isDarwin; disabledTests = [ # Issue with the asseration diff --git a/pkgs/development/python-modules/sh/default.nix b/pkgs/development/python-modules/sh/default.nix index 51a4a9d842f6..655e93f4e964 100644 --- a/pkgs/development/python-modules/sh/default.nix +++ b/pkgs/development/python-modules/sh/default.nix @@ -43,7 +43,7 @@ buildPythonPackage rec { # https://github.com/amoffat/sh/issues/684 "test_general_signal" ] - ++ lib.optionals stdenv.isDarwin [ + ++ lib.optionals stdenv.hostPlatform.isDarwin [ # Disable tests that fail on Darwin sandbox "test_background_exception" "test_cwd" diff --git a/pkgs/development/python-modules/shapely/default.nix b/pkgs/development/python-modules/shapely/default.nix index db6e185cb9b2..0959a8e3e0c9 100644 --- a/pkgs/development/python-modules/shapely/default.nix +++ b/pkgs/development/python-modules/shapely/default.nix @@ -46,7 +46,7 @@ buildPythonPackage rec { cd $out ''; - disabledTests = lib.optionals (stdenv.isDarwin && stdenv.isAarch64) [ + disabledTests = lib.optionals (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isAarch64) [ # FIXME(lf-): these logging tests are broken, which is definitely our # fault. I've tried figuring out the cause and failed. # diff --git a/pkgs/development/python-modules/shiboken6/default.nix b/pkgs/development/python-modules/shiboken6/default.nix index e3d5490a6c36..2c491e193d80 100644 --- a/pkgs/development/python-modules/shiboken6/default.nix +++ b/pkgs/development/python-modules/shiboken6/default.nix @@ -28,7 +28,7 @@ stdenv'.mkDerivation (finalAttrs: { nativeBuildInputs = [ cmake (python.pythonOnBuildForHost.withPackages (ps: [ ps.setuptools ])) - ] ++ lib.optionals stdenv.isLinux [ autoPatchelfHook ]; + ] ++ lib.optionals stdenv.hostPlatform.isLinux [ autoPatchelfHook ]; buildInputs = [ llvmPackages.llvm diff --git a/pkgs/development/python-modules/show-in-file-manager/default.nix b/pkgs/development/python-modules/show-in-file-manager/default.nix index a43b08ee1c9e..a08a874d690c 100644 --- a/pkgs/development/python-modules/show-in-file-manager/default.nix +++ b/pkgs/development/python-modules/show-in-file-manager/default.nix @@ -24,7 +24,7 @@ buildPythonPackage rec { setuptools ]; - propagatedBuildInputs = [ packaging ] ++ lib.optional (stdenv.isLinux) pyxdg; + propagatedBuildInputs = [ packaging ] ++ lib.optional (stdenv.hostPlatform.isLinux) pyxdg; meta = with lib; { homepage = "https://github.com/damonlynch/showinfilemanager"; diff --git a/pkgs/development/python-modules/simpful/default.nix b/pkgs/development/python-modules/simpful/default.nix index 74c88e6a5644..2759c829246e 100644 --- a/pkgs/development/python-modules/simpful/default.nix +++ b/pkgs/development/python-modules/simpful/default.nix @@ -54,6 +54,6 @@ buildPythonPackage rec { changelog = "https://github.com/aresio/simpful/releases/tag/${version}"; license = with licenses; [ lgpl3Only ]; maintainers = with maintainers; [ fab ]; - broken = stdenv.isDarwin; + broken = stdenv.hostPlatform.isDarwin; }; } diff --git a/pkgs/development/python-modules/simplejson/default.nix b/pkgs/development/python-modules/simplejson/default.nix index bbebbfd35867..b8d70a31b7aa 100644 --- a/pkgs/development/python-modules/simplejson/default.nix +++ b/pkgs/development/python-modules/simplejson/default.nix @@ -23,7 +23,7 @@ buildPythonPackage rec { nativeCheckInputs = [ pytestCheckHook ]; - doCheck = !stdenv.isDarwin; + doCheck = !stdenv.hostPlatform.isDarwin; pythonImportsCheck = [ "simplejson" ]; diff --git a/pkgs/development/python-modules/skia-pathops/default.nix b/pkgs/development/python-modules/skia-pathops/default.nix index 15806e8b1bce..8e27202ad838 100644 --- a/pkgs/development/python-modules/skia-pathops/default.nix +++ b/pkgs/development/python-modules/skia-pathops/default.nix @@ -33,7 +33,7 @@ buildPythonPackage rec { --replace "build_cmd = [sys.executable, build_skia_py, build_dir]" \ 'build_cmd = [sys.executable, build_skia_py, "--no-fetch-gn", "--no-virtualenv", "--gn-path", "${gn}/bin/gn", build_dir]' '' - + lib.optionalString (stdenv.isDarwin && stdenv.isAarch64) '' + + lib.optionalString (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isAarch64) '' substituteInPlace src/cpp/skia-builder/skia/gn/skia/BUILD.gn \ --replace "-march=armv7-a" "-march=armv8-a" \ --replace "-mfpu=neon" "" \ @@ -42,7 +42,7 @@ buildPythonPackage rec { --replace "defined(SK_CPU_ARM64)" "0" '' + - lib.optionalString (stdenv.isDarwin && stdenv.isx86_64) # old compiler? + lib.optionalString (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isx86_64) # old compiler? '' patch -p1 < cudaSupport) || !(cudaSupport -> builtins.hasAttr cudnnAttribute cudaPackages) || !(cudaSupport -> cudaPackages ? cudatoolkit); } - // lib.optionalAttrs stdenv.isDarwin { + // lib.optionalAttrs stdenv.hostPlatform.isDarwin { timeout = 86400; # 24 hours maxSilent = 14400; # 4h, double the default of 7200s }; diff --git a/pkgs/development/python-modules/tensorstore/default.nix b/pkgs/development/python-modules/tensorstore/default.nix index 90a550f42ab3..7a550a5c4ede 100644 --- a/pkgs/development/python-modules/tensorstore/default.nix +++ b/pkgs/development/python-modules/tensorstore/default.nix @@ -42,7 +42,7 @@ buildPythonPackage rec { or (throw "unsupported system/python version combination"); }; - nativeBuildInputs = lib.optionals stdenv.isLinux [ autoPatchelfHook ]; + nativeBuildInputs = lib.optionals stdenv.hostPlatform.isLinux [ autoPatchelfHook ]; dependencies = [ ml-dtypes diff --git a/pkgs/development/python-modules/testpath/default.nix b/pkgs/development/python-modules/testpath/default.nix index 7403d9c2af24..913226ddc78b 100644 --- a/pkgs/development/python-modules/testpath/default.nix +++ b/pkgs/development/python-modules/testpath/default.nix @@ -27,7 +27,7 @@ buildPythonPackage rec { rm testpath/cli-32.exe testpath/cli-64.exe ''; - preCheck = lib.optionalString stdenv.isDarwin '' + preCheck = lib.optionalString stdenv.hostPlatform.isDarwin '' # Work around https://github.com/jupyter/testpath/issues/24 export TMPDIR="/tmp" ''; diff --git a/pkgs/development/python-modules/thinc/default.nix b/pkgs/development/python-modules/thinc/default.nix index d4c35796a270..99126084f28a 100644 --- a/pkgs/development/python-modules/thinc/default.nix +++ b/pkgs/development/python-modules/thinc/default.nix @@ -58,7 +58,7 @@ buildPythonPackage rec { setuptools ]; - buildInputs = lib.optionals stdenv.isDarwin [ + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ Accelerate CoreFoundation CoreGraphics diff --git a/pkgs/development/python-modules/tiktoken/default.nix b/pkgs/development/python-modules/tiktoken/default.nix index ffcead40165d..9ce945ebf7c3 100644 --- a/pkgs/development/python-modules/tiktoken/default.nix +++ b/pkgs/development/python-modules/tiktoken/default.nix @@ -54,7 +54,7 @@ buildPythonPackage { rustc ]; - buildInputs = lib.optionals stdenv.isDarwin [ libiconv ]; + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ libiconv ]; dependencies = [ requests diff --git a/pkgs/development/python-modules/tinygrad/default.nix b/pkgs/development/python-modules/tinygrad/default.nix index 387ee633264e..92aa341dd6ce 100644 --- a/pkgs/development/python-modules/tinygrad/default.nix +++ b/pkgs/development/python-modules/tinygrad/default.nix @@ -82,7 +82,7 @@ buildPythonPackage rec { [ numpy ] - ++ lib.optionals stdenv.isDarwin [ + ++ lib.optionals stdenv.hostPlatform.isDarwin [ # pyobjc-framework-libdispatch # pyobjc-framework-metal ]; @@ -177,6 +177,6 @@ buildPythonPackage rec { license = lib.licenses.mit; maintainers = with lib.maintainers; [ GaetanLepage ]; # Requires unpackaged pyobjc-framework-libdispatch and pyobjc-framework-metal - broken = stdenv.isDarwin; + broken = stdenv.hostPlatform.isDarwin; }; } diff --git a/pkgs/development/python-modules/tkinter/default.nix b/pkgs/development/python-modules/tkinter/default.nix index beba9834e703..e051bbf86d98 100644 --- a/pkgs/development/python-modules/tkinter/default.nix +++ b/pkgs/development/python-modules/tkinter/default.nix @@ -21,7 +21,7 @@ buildPythonPackage { mkdir -p $out/${py.sitePackages} mv lib/${py.libPrefix}/lib-dynload/_tkinter* $out/${py.sitePackages}/ '' - + lib.optionalString (!stdenv.isDarwin) '' + + lib.optionalString (!stdenv.hostPlatform.isDarwin) '' # Update the rpath to point to python without x11Support old_rpath=$(patchelf --print-rpath $out/${py.sitePackages}/_tkinter*) new_rpath=$(sed "s#${py}#${python}#g" <<< "$old_rpath" ) diff --git a/pkgs/development/python-modules/token-bucket/default.nix b/pkgs/development/python-modules/token-bucket/default.nix index a2a9b7a04e7c..1af40f588f57 100644 --- a/pkgs/development/python-modules/token-bucket/default.nix +++ b/pkgs/development/python-modules/token-bucket/default.nix @@ -41,7 +41,7 @@ buildPythonPackage rec { nativeCheckInputs = [ pytestCheckHook ]; - doCheck = !stdenv.isDarwin; + doCheck = !stdenv.hostPlatform.isDarwin; meta = with lib; { description = "Token Bucket Implementation for Python Web Apps"; diff --git a/pkgs/development/python-modules/tokenizers/default.nix b/pkgs/development/python-modules/tokenizers/default.nix index aca17db0e74e..36718c65513c 100644 --- a/pkgs/development/python-modules/tokenizers/default.nix +++ b/pkgs/development/python-modules/tokenizers/default.nix @@ -94,7 +94,7 @@ buildPythonPackage rec { buildInputs = [ openssl ] - ++ lib.optionals stdenv.isDarwin [ + ++ lib.optionals stdenv.hostPlatform.isDarwin [ libiconv Security ]; diff --git a/pkgs/development/python-modules/tololib/default.nix b/pkgs/development/python-modules/tololib/default.nix index 03bb2f2ea81e..9548f2d77657 100644 --- a/pkgs/development/python-modules/tololib/default.nix +++ b/pkgs/development/python-modules/tololib/default.nix @@ -33,7 +33,7 @@ buildPythonPackage rec { pythonImportsCheck = [ "tololib" ]; # Network discovery doesn't work in the sandbox for darwin - doCheck = !stdenv.isDarwin; + doCheck = !stdenv.hostPlatform.isDarwin; meta = with lib; { description = "Python Library for Controlling TOLO Sauna/Steam Bath Devices"; diff --git a/pkgs/development/python-modules/torch/bin.nix b/pkgs/development/python-modules/torch/bin.nix index a31fb394cfdf..bcd5008984fa 100644 --- a/pkgs/development/python-modules/torch/bin.nix +++ b/pkgs/development/python-modules/torch/bin.nix @@ -49,13 +49,13 @@ buildPythonPackage { src = fetchurl srcs."${stdenv.system}-${pyVerNoDot}" or unsupported; - nativeBuildInputs = lib.optionals stdenv.isLinux [ + nativeBuildInputs = lib.optionals stdenv.hostPlatform.isLinux [ addDriverRunpath autoAddDriverRunpath autoPatchelfHook ]; - buildInputs = lib.optionals stdenv.isLinux ( + buildInputs = lib.optionals stdenv.hostPlatform.isLinux ( with cudaPackages; [ # $out/${sitePackages}/nvfuser/_C*.so wants libnvToolsExt.so.1 but torch/lib only ships @@ -75,7 +75,7 @@ buildPythonPackage { ] ); - autoPatchelfIgnoreMissingDeps = lib.optionals stdenv.isLinux [ + autoPatchelfIgnoreMissingDeps = lib.optionals stdenv.hostPlatform.isLinux [ # This is the hardware-dependent userspace driver that comes from # nvidia_x11 package. It must be deployed at runtime in # /run/opengl-driver/lib or pointed at by LD_LIBRARY_PATH variable, rather @@ -94,14 +94,14 @@ buildPythonPackage { setuptools sympy typing-extensions - ] ++ lib.optionals (stdenv.isLinux && stdenv.isx86_64) [ triton ]; + ] ++ lib.optionals (stdenv.hostPlatform.isLinux && stdenv.hostPlatform.isx86_64) [ triton ]; postInstall = '' # ONNX conversion rm -rf $out/bin ''; - postFixup = lib.optionalString stdenv.isLinux '' + postFixup = lib.optionalString stdenv.hostPlatform.isLinux '' addAutoPatchelfSearchPath "$out/${python.sitePackages}/torch/lib" ''; @@ -112,7 +112,7 @@ buildPythonPackage { extraRunpaths = lib.optionals stdenv.hostPlatform.isLinux [ "${lib.getLib cudaPackages.cuda_nvrtc}/lib" ]; - postPhases = lib.optionals stdenv.isLinux [ "postPatchelfPhase" ]; + postPhases = lib.optionals stdenv.hostPlatform.isLinux [ "postPatchelfPhase" ]; postPatchelfPhase = '' while IFS= read -r -d $'\0' elf ; do for extra in $extraRunpaths ; do diff --git a/pkgs/development/python-modules/torch/default.nix b/pkgs/development/python-modules/torch/default.nix index 32b4525b60e8..6dd263806f0d 100644 --- a/pkgs/development/python-modules/torch/default.nix +++ b/pkgs/development/python-modules/torch/default.nix @@ -53,7 +53,7 @@ click, typing-extensions, # ROCm build and `torch.compile` requires `triton` - tritonSupport ? (!stdenv.isDarwin), + tritonSupport ? (!stdenv.hostPlatform.isDarwin), triton, # Unit tests @@ -62,7 +62,7 @@ # Disable MKLDNN on aarch64-darwin, it negatively impacts performance, # this is also what official pytorch build does - mklDnnSupport ? !(stdenv.isDarwin && stdenv.isAarch64), + mklDnnSupport ? !(stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isAarch64), # virtual pkg that consistently instantiates blas across nixpkgs # See https://github.com/NixOS/nixpkgs/pull/83888 @@ -193,7 +193,7 @@ let brokenConditions = attrsets.filterAttrs (_: cond: cond) { "CUDA and ROCm are mutually exclusive" = cudaSupport && rocmSupport; - "CUDA is not targeting Linux" = cudaSupport && !stdenv.isLinux; + "CUDA is not targeting Linux" = cudaSupport && !stdenv.hostPlatform.isLinux; "Unsupported CUDA version" = cudaSupport && !(builtins.elem cudaPackages.cudaMajorVersion [ @@ -242,7 +242,7 @@ buildPythonPackage rec { ./passthrough-python-lib-rel-path.patch ] ++ lib.optionals cudaSupport [ ./fix-cmake-cuda-toolkit.patch ] - ++ lib.optionals (stdenv.isDarwin && stdenv.isx86_64) [ + ++ lib.optionals (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isx86_64) [ # pthreadpool added support for Grand Central Dispatch in April # 2020. However, this relies on functionality (DISPATCH_APPLY_AUTO) # that is available starting with macOS 10.13. However, our current @@ -250,7 +250,7 @@ buildPythonPackage rec { # pthread support. ./pthreadpool-disable-gcd.diff ] - ++ lib.optionals stdenv.isLinux [ + ++ lib.optionals stdenv.hostPlatform.isLinux [ # Propagate CUPTI to Kineto by overriding the search path with environment variables. # https://github.com/pytorch/pytorch/pull/108847 ./pytorch-pr-108847.patch @@ -296,7 +296,7 @@ buildPythonPackage rec { # 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. + - lib.optionalString (stdenv.isDarwin && lib.versionOlder stdenv.hostPlatform.darwinSdkVersion "11.0") + lib.optionalString (stdenv.hostPlatform.isDarwin && lib.versionOlder stdenv.hostPlatform.darwinSdkVersion "11.0") '' substituteInPlace third_party/pocketfft/pocketfft_hdronly.h --replace-fail '#if (__cplusplus >= 201703L) && (!defined(__MINGW32__)) && (!defined(_MSC_VER)) inline void *aligned_alloc(size_t align, size_t size)' '#if 0 @@ -492,8 +492,8 @@ buildPythonPackage rec { ) ++ lib.optionals rocmSupport [ rocmPackages.llvm.openmp ] ++ lib.optionals (cudaSupport || rocmSupport) [ effectiveMagma ] - ++ lib.optionals stdenv.isLinux [ numactl ] - ++ lib.optionals stdenv.isDarwin [ + ++ lib.optionals stdenv.hostPlatform.isLinux [ numactl ] + ++ lib.optionals stdenv.hostPlatform.isDarwin [ Accelerate CoreServices libobjc @@ -600,7 +600,7 @@ buildPythonPackage rec { mkdir -p "$cxxdev/nix-support" printWords "''${propagatedCxxBuildInputs[@]}" >> "$cxxdev/nix-support/propagated-build-inputs" '' - + lib.optionalString stdenv.isDarwin '' + + lib.optionalString stdenv.hostPlatform.isDarwin '' for f in $(ls $lib/lib/*.dylib); do install_name_tool -id $lib/lib/$(basename $f) $f || true done @@ -620,7 +620,7 @@ buildPythonPackage rec { # This is a quick hack to add `libnvrtc` to the runpath so that torch can find # it when it is needed at runtime. extraRunpaths = lib.optionals cudaSupport [ "${lib.getLib cudaPackages.cuda_nvrtc}/lib" ]; - postPhases = lib.optionals stdenv.isLinux [ "postPatchelfPhase" ]; + postPhases = lib.optionals stdenv.hostPlatform.isLinux [ "postPatchelfPhase" ]; postPatchelfPhase = '' while IFS= read -r -d $'\0' elf ; do for extra in $extraRunpaths ; do diff --git a/pkgs/development/python-modules/torchaudio/bin.nix b/pkgs/development/python-modules/torchaudio/bin.nix index 60b84d339ce2..d9aa2b6de388 100644 --- a/pkgs/development/python-modules/torchaudio/bin.nix +++ b/pkgs/development/python-modules/torchaudio/bin.nix @@ -41,7 +41,7 @@ buildPythonPackage rec { ffmpeg_6.dev sox ] - ++ lib.optionals stdenv.isLinux ( + ++ lib.optionals stdenv.hostPlatform.isLinux ( with cudaPackages; [ # $out/${sitePackages}/torchaudio/lib/libtorchaudio*.so wants libcudart.so.11.0 but torch/lib only ships @@ -54,14 +54,14 @@ buildPythonPackage rec { ] ); - nativeBuildInputs = lib.optionals stdenv.isLinux [ + nativeBuildInputs = lib.optionals stdenv.hostPlatform.isLinux [ autoPatchelfHook addDriverRunpath ]; dependencies = [ torch-bin ]; - preInstall = lib.optionals stdenv.isLinux '' + preInstall = lib.optionals stdenv.hostPlatform.isLinux '' addAutoPatchelfSearchPath "${torch-bin}/${python.sitePackages}/torch" ''; diff --git a/pkgs/development/python-modules/torchio/default.nix b/pkgs/development/python-modules/torchio/default.nix index c0aae74f178f..3fbfe404febc 100644 --- a/pkgs/development/python-modules/torchio/default.nix +++ b/pkgs/development/python-modules/torchio/default.nix @@ -54,7 +54,7 @@ buildPythonPackage rec { # tries to download models: "test_load_all" ] - ++ lib.optionals stdenv.isAarch64 [ + ++ lib.optionals stdenv.hostPlatform.isAarch64 [ # RuntimeError: DataLoader worker (pid(s) <...>) exited unexpectedly "test_queue_multiprocessing" ]; diff --git a/pkgs/development/python-modules/torchsnapshot/default.nix b/pkgs/development/python-modules/torchsnapshot/default.nix index dc1e66156a7e..c28ce3f55e71 100644 --- a/pkgs/development/python-modules/torchsnapshot/default.nix +++ b/pkgs/development/python-modules/torchsnapshot/default.nix @@ -66,6 +66,6 @@ buildPythonPackage rec { # https://github.com/pytorch/torchsnapshot/issues/175 pythonAtLeast "3.12" # ModuleNotFoundError: No module named 'torch._C._distributed_c10d'; 'torch._C' is not a package - || stdenv.isDarwin; + || stdenv.hostPlatform.isDarwin; }; } diff --git a/pkgs/development/python-modules/torchvision/bin.nix b/pkgs/development/python-modules/torchvision/bin.nix index 69a573b777d1..ea03954c14d7 100644 --- a/pkgs/development/python-modules/torchvision/bin.nix +++ b/pkgs/development/python-modules/torchvision/bin.nix @@ -39,13 +39,13 @@ buildPythonPackage { # Note that we don't rely on config.cudaSupport here, because the Linux wheels all come built with CUDA support. buildInputs = with cudaPackages; - lib.optionals stdenv.isLinux [ + lib.optionals stdenv.hostPlatform.isLinux [ # $out/${sitePackages}/torchvision/_C.so wants libcudart.so.11.0 but torchvision.libs only ships # libcudart.$hash.so.11.0 cuda_cudart ]; - nativeBuildInputs = lib.optionals stdenv.isLinux [ + nativeBuildInputs = lib.optionals stdenv.hostPlatform.isLinux [ addDriverRunpath autoPatchelfHook ]; @@ -60,7 +60,7 @@ buildPythonPackage { pythonImportsCheck = [ "torchvision" ]; - preInstall = lib.optionalString stdenv.isLinux '' + preInstall = lib.optionalString stdenv.hostPlatform.isLinux '' addAutoPatchelfSearchPath "${torch-bin}/${python.sitePackages}/torch" ''; diff --git a/pkgs/development/python-modules/trackpy/default.nix b/pkgs/development/python-modules/trackpy/default.nix index a12ffea156bd..91945de8dc89 100644 --- a/pkgs/development/python-modules/trackpy/default.nix +++ b/pkgs/development/python-modules/trackpy/default.nix @@ -40,7 +40,7 @@ buildPythonPackage rec { nativeCheckInputs = [ pytestCheckHook ]; - preCheck = lib.optionalString stdenv.isDarwin '' + preCheck = lib.optionalString stdenv.hostPlatform.isDarwin '' # specifically needed for darwin export HOME=$(mktemp -d) mkdir -p $HOME/.matplotlib @@ -55,6 +55,6 @@ buildPythonPackage rec { changelog = "https://github.com/soft-matter/trackpy/releases/tag/v${version}"; license = licenses.bsd3; maintainers = [ ]; - broken = (stdenv.isLinux && stdenv.isAarch64); + broken = (stdenv.hostPlatform.isLinux && stdenv.hostPlatform.isAarch64); }; } diff --git a/pkgs/development/python-modules/transitions/default.nix b/pkgs/development/python-modules/transitions/default.nix index 74ce55dd4b13..545e5667da8c 100644 --- a/pkgs/development/python-modules/transitions/default.nix +++ b/pkgs/development/python-modules/transitions/default.nix @@ -47,7 +47,7 @@ buildPythonPackage rec { "test_diagram" "test_ordered_with_graph" ] - ++ lib.optionals stdenv.isDarwin [ + ++ lib.optionals stdenv.hostPlatform.isDarwin [ # Upstream issue https://github.com/pygraphviz/pygraphviz/issues/441 "test_binary_stream" ]; diff --git a/pkgs/development/python-modules/trezor/default.nix b/pkgs/development/python-modules/trezor/default.nix index 302c5d975676..62c94ce4bd7c 100644 --- a/pkgs/development/python-modules/trezor/default.nix +++ b/pkgs/development/python-modules/trezor/default.nix @@ -37,7 +37,7 @@ buildPythonPackage rec { mnemonic requests typing-extensions - ] ++ lib.optionals stdenv.isLinux [ trezor-udev-rules ]; + ] ++ lib.optionals stdenv.hostPlatform.isLinux [ trezor-udev-rules ]; nativeCheckInputs = [ pytestCheckHook ]; diff --git a/pkgs/development/python-modules/trio-websocket/default.nix b/pkgs/development/python-modules/trio-websocket/default.nix index 39a9ee4baa4f..2804bcaa76e5 100644 --- a/pkgs/development/python-modules/trio-websocket/default.nix +++ b/pkgs/development/python-modules/trio-websocket/default.nix @@ -49,7 +49,7 @@ buildPythonPackage rec { "test_client_connect_networking_error" "test_finalization_dropped_exception" ] - ++ lib.optionals stdenv.isDarwin [ + ++ lib.optionals stdenv.hostPlatform.isDarwin [ # Failed: DID NOT RAISE "test_finalization_dropped_exception" # Timing related diff --git a/pkgs/development/python-modules/trio/default.nix b/pkgs/development/python-modules/trio/default.nix index b4e37ee448f6..968d67b27adb 100644 --- a/pkgs/development/python-modules/trio/default.nix +++ b/pkgs/development/python-modules/trio/default.nix @@ -59,7 +59,7 @@ buildPythonPackage rec { ] ++ lib.optionals (pythonOlder "3.11") [ exceptiongroup ]; # tests are failing on Darwin - doCheck = !stdenv.isDarwin; + doCheck = !stdenv.hostPlatform.isDarwin; nativeCheckInputs = [ astor diff --git a/pkgs/development/python-modules/trytond/default.nix b/pkgs/development/python-modules/trytond/default.nix index 8a2bdcfd5d8a..b12ef6e9061e 100644 --- a/pkgs/development/python-modules/trytond/default.nix +++ b/pkgs/development/python-modules/trytond/default.nix @@ -90,7 +90,7 @@ buildPythonPackage rec { homepage = "http://www.tryton.org/"; changelog = "https://foss.heptapod.net/tryton/tryton/-/blob/trytond-${version}/trytond/CHANGELOG?ref_type=tags"; license = licenses.gpl3Plus; - broken = stdenv.isDarwin; + broken = stdenv.hostPlatform.isDarwin; maintainers = with maintainers; [ udono johbo diff --git a/pkgs/development/python-modules/twisted/default.nix b/pkgs/development/python-modules/twisted/default.nix index ffeee44aa8c7..8e401844adfc 100644 --- a/pkgs/development/python-modules/twisted/default.nix +++ b/pkgs/development/python-modules/twisted/default.nix @@ -138,7 +138,7 @@ buildPythonPackage rec { substituteInPlace src/twisted/test/test_failure.py \ --replace "from cython_test_exception_raiser import raiser # type: ignore[import]" "raiser = None" '' - + lib.optionalString stdenv.isLinux '' + + lib.optionalString stdenv.hostPlatform.isLinux '' echo 'PTYProcessTestsBuilder_EPollReactorTests.test_openFileDescriptors.skip = "invalid syntax"'>> src/twisted/internet/test/test_process.py echo 'PTYProcessTestsBuilder_PollReactorTests.test_openFileDescriptors.skip = "invalid syntax"'>> src/twisted/internet/test/test_process.py echo 'UNIXTestsBuilder_EPollReactorTests.test_sendFileDescriptorTriggersPauseProducing.skip = "sendFileDescriptor producer was not paused"'>> src/twisted/internet/test/test_unix.py @@ -149,7 +149,7 @@ buildPythonPackage rec { substituteInPlace src/twisted/python/_inotify.py --replace \ "ctypes.util.find_library(\"c\")" "'${stdenv.cc.libc}/lib/libc.so.6'" '' - + lib.optionalString stdenv.isDarwin '' + + lib.optionalString stdenv.hostPlatform.isDarwin '' echo 'ProcessTestsBuilder_AsyncioSelectorReactorTests.test_openFileDescriptors.skip = "invalid syntax"'>> src/twisted/internet/test/test_process.py echo 'ProcessTestsBuilder_SelectReactorTests.test_openFileDescriptors.skip = "invalid syntax"'>> src/twisted/internet/test/test_process.py echo 'ProcessTestsBuilder_AsyncioSelectorReactorTests.test_processEnded.skip = "exit code 120"' >> src/twisted/internet/test/test_process.py @@ -175,7 +175,7 @@ buildPythonPackage rec { ++ passthru.optional-dependencies.http2 ++ passthru.optional-dependencies.serial # not supported on aarch64-darwin: https://github.com/pyca/pyopenssl/issues/873 - ++ lib.optionals (!(stdenv.isDarwin && stdenv.isAarch64)) passthru.optional-dependencies.tls; + ++ lib.optionals (!(stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isAarch64)) passthru.optional-dependencies.tls; checkPhase = '' export SOURCE_DATE_EPOCH=315532800 diff --git a/pkgs/development/python-modules/txtorcon/default.nix b/pkgs/development/python-modules/txtorcon/default.nix index 6c6f7c86b3a0..eac293ac1e16 100644 --- a/pkgs/development/python-modules/txtorcon/default.nix +++ b/pkgs/development/python-modules/txtorcon/default.nix @@ -52,7 +52,7 @@ buildPythonPackage rec { geoip ]; - doCheck = !(stdenv.isDarwin && stdenv.isAarch64); + doCheck = !(stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isAarch64); meta = with lib; { description = "Twisted-based Tor controller client, with state-tracking and configuration abstractions"; diff --git a/pkgs/development/python-modules/typer/default.nix b/pkgs/development/python-modules/typer/default.nix index 9839f6d6c55d..74bb969473a7 100644 --- a/pkgs/development/python-modules/typer/default.nix +++ b/pkgs/development/python-modules/typer/default.nix @@ -60,7 +60,7 @@ buildPythonPackage rec { # fails also on Linux "test_show_completion" "test_install_completion" - ] ++ lib.optionals (stdenv.isLinux && stdenv.isAarch64) [ "test_install_completion" ]; + ] ++ lib.optionals (stdenv.hostPlatform.isLinux && stdenv.hostPlatform.isAarch64) [ "test_install_completion" ]; pythonImportsCheck = [ "typer" ]; diff --git a/pkgs/development/python-modules/tzlocal/default.nix b/pkgs/development/python-modules/tzlocal/default.nix index 81f1ed1d2b80..a4e6ba12061c 100644 --- a/pkgs/development/python-modules/tzlocal/default.nix +++ b/pkgs/development/python-modules/tzlocal/default.nix @@ -33,7 +33,7 @@ buildPythonPackage rec { "test_conflicting" "test_noconflict" "test_symlink_localtime" - ] ++ lib.optional stdenv.isDarwin "test_assert_tz_offset"; + ] ++ lib.optional stdenv.hostPlatform.isDarwin "test_assert_tz_offset"; pythonImportsCheck = [ "tzlocal" ]; diff --git a/pkgs/development/python-modules/uamqp/default.nix b/pkgs/development/python-modules/uamqp/default.nix index 0bde984b93e5..89063357a565 100644 --- a/pkgs/development/python-modules/uamqp/default.nix +++ b/pkgs/development/python-modules/uamqp/default.nix @@ -28,7 +28,7 @@ buildPythonPackage rec { }; patches = - lib.optionals (stdenv.isDarwin && stdenv.isx86_64) [ + lib.optionals (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isx86_64) [ ./darwin-azure-c-shared-utility-corefoundation.patch ] ++ [ @@ -53,7 +53,7 @@ buildPythonPackage rec { ./clang-fix-incompatible-function-pointer-conversion.patch ]; - postPatch = lib.optionalString (stdenv.isDarwin && !stdenv.isx86_64) '' + postPatch = lib.optionalString (stdenv.hostPlatform.isDarwin && !stdenv.hostPlatform.isx86_64) '' # force darwin aarch64 to use openssl instead of applessl, removing # some quirks upstream thinks they need to use openssl on macos sed -i \ @@ -76,7 +76,7 @@ buildPythonPackage rec { buildInputs = [ openssl ] - ++ lib.optionals stdenv.isDarwin [ + ++ lib.optionals stdenv.hostPlatform.isDarwin [ CoreFoundation CFNetwork Security diff --git a/pkgs/development/python-modules/ubelt/default.nix b/pkgs/development/python-modules/ubelt/default.nix index 85764d05986c..ae9c6b2a648d 100644 --- a/pkgs/development/python-modules/ubelt/default.nix +++ b/pkgs/development/python-modules/ubelt/default.nix @@ -51,7 +51,7 @@ buildPythonPackage rec { export HOME=$TMPDIR ''; - disabledTests = lib.optionals stdenv.isDarwin [ + disabledTests = lib.optionals stdenv.hostPlatform.isDarwin [ # fail due to sandbox environment "CacheStamp.expired" "userhome" diff --git a/pkgs/development/python-modules/uharfbuzz/default.nix b/pkgs/development/python-modules/uharfbuzz/default.nix index 0dc8fea9bc8a..de30a7809166 100644 --- a/pkgs/development/python-modules/uharfbuzz/default.nix +++ b/pkgs/development/python-modules/uharfbuzz/default.nix @@ -32,7 +32,7 @@ buildPythonPackage rec { setuptools-scm ]; - buildInputs = lib.optionals stdenv.isDarwin [ ApplicationServices ]; + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ ApplicationServices ]; nativeCheckInputs = [ pytestCheckHook ]; diff --git a/pkgs/development/python-modules/unicorn/default.nix b/pkgs/development/python-modules/unicorn/default.nix index de3a0f6a3040..0814b63ef41b 100644 --- a/pkgs/development/python-modules/unicorn/default.nix +++ b/pkgs/development/python-modules/unicorn/default.nix @@ -26,13 +26,13 @@ buildPythonPackage rec { # needed on non-x86 linux setupPyBuildFlags = - lib.optionals stdenv.isLinux [ + lib.optionals stdenv.hostPlatform.isLinux [ "--plat-name" "linux" ] # aarch64 only available from MacOS SDK 11 onwards, so fix the version tag. # otherwise, bdist_wheel may detect "macosx_10_6_arm64" which doesn't make sense. - ++ lib.optionals (stdenv.isDarwin && stdenv.isAarch64) [ + ++ lib.optionals (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isAarch64) [ "--plat-name" "macosx_11_0" ]; diff --git a/pkgs/development/python-modules/unrardll/default.nix b/pkgs/development/python-modules/unrardll/default.nix index 14a32c0ba862..b539d805f66e 100644 --- a/pkgs/development/python-modules/unrardll/default.nix +++ b/pkgs/development/python-modules/unrardll/default.nix @@ -18,9 +18,9 @@ buildPythonPackage rec { buildInputs = [ unrar ]; - NIX_CFLAGS_LINK = lib.optionalString stdenv.isDarwin "-headerpad_max_install_names"; + NIX_CFLAGS_LINK = lib.optionalString stdenv.hostPlatform.isDarwin "-headerpad_max_install_names"; - postInstall = lib.optionalString stdenv.isDarwin '' + postInstall = lib.optionalString stdenv.hostPlatform.isDarwin '' install_name_tool -change libunrar.so ${unrar}/lib/libunrar.so $out/lib/python*/site-packages/unrardll/unrar.*-darwin.so install_name_tool -change libunrar.so ${unrar}/lib/libunrar.so build/lib.*/unrardll/unrar.*-darwin.so ''; diff --git a/pkgs/development/python-modules/uvicorn/tests.nix b/pkgs/development/python-modules/uvicorn/tests.nix index 24dd8d2b848c..b5d7cee2f7c5 100644 --- a/pkgs/development/python-modules/uvicorn/tests.nix +++ b/pkgs/development/python-modules/uvicorn/tests.nix @@ -34,7 +34,7 @@ buildPythonPackage { wsproto ] ++ uvicorn.optional-dependencies.standard; - doCheck = !stdenv.isDarwin; + doCheck = !stdenv.hostPlatform.isDarwin; __darwinAllowLocalNetworking = true; diff --git a/pkgs/development/python-modules/uvloop/default.nix b/pkgs/development/python-modules/uvloop/default.nix index 06447432f218..f5d0e08cbb28 100644 --- a/pkgs/development/python-modules/uvloop/default.nix +++ b/pkgs/development/python-modules/uvloop/default.nix @@ -41,7 +41,7 @@ buildPythonPackage rec { buildInputs = [ libuv ] - ++ lib.optionals stdenv.isDarwin [ + ++ lib.optionals stdenv.hostPlatform.isDarwin [ CoreServices ApplicationServices ]; @@ -61,7 +61,7 @@ buildPythonPackage rec { "--deselect=tests/test_process.py::Test_UV_Process::test_process_streams_redirect" "--deselect=tests/test_process.py::Test_AIO_Process::test_process_streams_redirect" ] - ++ lib.optionals (stdenv.isDarwin) [ + ++ lib.optionals (stdenv.hostPlatform.isDarwin) [ # Segmentation fault "--deselect=tests/test_fs_event.py::Test_UV_FS_EVENT_RENAME::test_fs_event_rename" # Broken: https://github.com/NixOS/nixpkgs/issues/160904 @@ -78,7 +78,7 @@ buildPythonPackage rec { # force using installed/compiled uvloop rm -rf uvloop '' - + lib.optionalString stdenv.isDarwin '' + + lib.optionalString stdenv.hostPlatform.isDarwin '' # Work around "OSError: AF_UNIX path too long" # https://github.com/MagicStack/uvloop/issues/463 export TMPDIR="/tmp" diff --git a/pkgs/development/python-modules/vector/default.nix b/pkgs/development/python-modules/vector/default.nix index ae7782699ef9..cf1ed3878e36 100644 --- a/pkgs/development/python-modules/vector/default.nix +++ b/pkgs/development/python-modules/vector/default.nix @@ -68,7 +68,7 @@ buildPythonPackage rec { "test_rhophi_eta_tau" "test_xy_eta_tau" ] - ++ lib.optionals (stdenv.isDarwin && stdenv.isx86_64) [ + ++ lib.optionals (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isx86_64) [ # AssertionError: assert 2.1073424255447017e-08 == 0.0 "test_issue_463" ]; diff --git a/pkgs/development/python-modules/virtkey/default.nix b/pkgs/development/python-modules/virtkey/default.nix index 4815ce63413f..553721e83eea 100644 --- a/pkgs/development/python-modules/virtkey/default.nix +++ b/pkgs/development/python-modules/virtkey/default.nix @@ -38,7 +38,7 @@ buildPythonPackage rec { ]; meta = with lib; { - broken = stdenv.isDarwin; + broken = stdenv.hostPlatform.isDarwin; description = "Extension to emulate keypresses and to get the layout information from the X server"; homepage = "https://launchpad.net/virtkey"; license = licenses.gpl3; diff --git a/pkgs/development/python-modules/vowpalwabbit/default.nix b/pkgs/development/python-modules/vowpalwabbit/default.nix index 7f4feb2ba9ad..558d47529b68 100644 --- a/pkgs/development/python-modules/vowpalwabbit/default.nix +++ b/pkgs/development/python-modules/vowpalwabbit/default.nix @@ -55,7 +55,7 @@ buildPythonPackage rec { dontUseCmakeConfigure = true; # Python ctypes.find_library uses DYLD_LIBRARY_PATH. - preConfigure = lib.optionalString stdenv.isDarwin '' + preConfigure = lib.optionalString stdenv.hostPlatform.isDarwin '' export DYLD_LIBRARY_PATH="${python.pkgs.boost}/lib" ''; @@ -71,6 +71,6 @@ buildPythonPackage rec { license = licenses.bsd3; maintainers = with maintainers; [ teh ]; # Test again when new version is released - broken = stdenv.isLinux; + broken = stdenv.hostPlatform.isLinux; }; } diff --git a/pkgs/development/python-modules/wandb/default.nix b/pkgs/development/python-modules/wandb/default.nix index fbd5d9baabf5..c0c42e58408d 100644 --- a/pkgs/development/python-modules/wandb/default.nix +++ b/pkgs/development/python-modules/wandb/default.nix @@ -282,11 +282,11 @@ buildPythonPackage rec { # See https://github.com/wandb/wandb/issues/6836 "tests/pytest_tests/unit_tests_old/test_logging.py" ] - ++ lib.optionals stdenv.isLinux [ + ++ lib.optionals stdenv.hostPlatform.isLinux [ # Same as above "tests/pytest_tests/unit_tests/test_artifacts/test_storage.py" ] - ++ lib.optionals stdenv.isDarwin [ + ++ lib.optionals stdenv.hostPlatform.isDarwin [ # Same as above "tests/pytest_tests/unit_tests/test_lib/test_filesystem.py" ]; @@ -303,7 +303,7 @@ buildPythonPackage rec { "test_pytorch_saved_model" "test_tensorflow_keras_saved_model" ] - ++ lib.optionals stdenv.isDarwin [ + ++ lib.optionals stdenv.hostPlatform.isDarwin [ # Disable test that fails on darwin due to issue with python3Packages.psutil: # https://github.com/giampaolo/psutil/issues/1219 "test_tpu_system_stats" diff --git a/pkgs/development/python-modules/wasmer/default.nix b/pkgs/development/python-modules/wasmer/default.nix index 8408780ef637..c903ede48d27 100644 --- a/pkgs/development/python-modules/wasmer/default.nix +++ b/pkgs/development/python-modules/wasmer/default.nix @@ -56,7 +56,7 @@ let --replace "package.metadata.maturin" "broken" ''; - buildInputs = lib.optionals stdenv.isDarwin [ libiconv ] ++ extraBuildInputs; + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ libiconv ] ++ extraBuildInputs; inherit buildAndTestSubdir; diff --git a/pkgs/development/python-modules/watchdog/default.nix b/pkgs/development/python-modules/watchdog/default.nix index 4e83fb026425..2a1633de0512 100644 --- a/pkgs/development/python-modules/watchdog/default.nix +++ b/pkgs/development/python-modules/watchdog/default.nix @@ -26,9 +26,9 @@ buildPythonPackage rec { # force kqueue on x86_64-darwin, because our api version does # not support fsevents - patches = lib.optionals (stdenv.isDarwin && !stdenv.isAarch64) [ ./force-kqueue.patch ]; + patches = lib.optionals (stdenv.hostPlatform.isDarwin && !stdenv.hostPlatform.isAarch64) [ ./force-kqueue.patch ]; - buildInputs = lib.optionals stdenv.isDarwin [ CoreServices ]; + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ CoreServices ]; passthru.optional-dependencies.watchmedo = [ pyyaml ]; @@ -50,13 +50,13 @@ buildPythonPackage rec { "--deselect=tests/test_emitter.py::test_create_wrong_encoding" "--deselect=tests/test_emitter.py::test_close" ] - ++ lib.optionals (stdenv.isDarwin) [ + ++ lib.optionals (stdenv.hostPlatform.isDarwin) [ # fails to stop process in teardown "--deselect=tests/test_0_watchmedo.py::test_auto_restart_subprocess_termination" # assert cap.out.splitlines(keepends=False).count('+++++ 0') == 2 != 3 "--deselect=tests/test_0_watchmedo.py::test_auto_restart_on_file_change_debounce" ] - ++ lib.optionals (stdenv.isDarwin && stdenv.isx86_64) [ + ++ lib.optionals (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isx86_64) [ # FileCreationEvent != FileDeletionEvent "--deselect=tests/test_emitter.py::test_separate_consecutive_moves" "--deselect=tests/test_observers_polling.py::test___init__" @@ -66,7 +66,7 @@ buildPythonPackage rec { # AttributeError: '_thread.RLock' object has no attribute 'key'" "--deselect=tests/test_skip_repeats_queue.py::test_eventlet_monkey_patching" ] - ++ lib.optionals (stdenv.isDarwin && stdenv.isAarch64) [ + ++ lib.optionals (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isAarch64) [ # segfaults "--deselect=tests/test_delayed_queue.py::test_delayed_get" "--deselect=tests/test_0_watchmedo.py::test_tricks_from_file" @@ -89,7 +89,7 @@ buildPythonPackage rec { # tests timeout easily "tests/test_inotify_buffer.py" ] - ++ lib.optionals (stdenv.isDarwin) [ + ++ lib.optionals (stdenv.hostPlatform.isDarwin) [ # segfaults the testsuite "tests/test_emitter.py" # unsupported on x86_64-darwin diff --git a/pkgs/development/python-modules/watchfiles/default.nix b/pkgs/development/python-modules/watchfiles/default.nix index 22cd171afae5..3b09081249b0 100644 --- a/pkgs/development/python-modules/watchfiles/default.nix +++ b/pkgs/development/python-modules/watchfiles/default.nix @@ -36,7 +36,7 @@ buildPythonPackage rec { hash = "sha256-n9yN/VRNQWCxh+BoliIMkKqJC51inpB9DQ9WtqR4oA0="; }; - buildInputs = lib.optionals stdenv.isDarwin [ + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ CoreServices libiconv ]; diff --git a/pkgs/development/python-modules/webdataset/default.nix b/pkgs/development/python-modules/webdataset/default.nix index 3c5b74eed4ae..da172aa79ff7 100644 --- a/pkgs/development/python-modules/webdataset/default.nix +++ b/pkgs/development/python-modules/webdataset/default.nix @@ -67,16 +67,16 @@ buildPythonPackage rec { "test_unbatched" "test_yaml3" ] - ++ lib.optionals stdenv.isDarwin [ + ++ lib.optionals stdenv.hostPlatform.isDarwin [ # pickling error "test_background_download" ] - ++ lib.optionals (stdenv.isx86_64 && stdenv.isDarwin) [ + ++ lib.optionals (stdenv.hostPlatform.isx86_64 && stdenv.hostPlatform.isDarwin) [ "test_concurrent_access" # fails to patch 'init_process_group' from torch.distributed "TestDistributedChunkedSampler" ] - ++ lib.optionals (stdenv.isAarch64 && stdenv.isLinux) [ + ++ lib.optionals (stdenv.hostPlatform.isAarch64 && stdenv.hostPlatform.isLinux) [ # segfaults on aarch64-linux "test_webloader" "test_webloader2" @@ -84,7 +84,7 @@ buildPythonPackage rec { "test_webloader_unbatched" ]; - disabledTestPaths = lib.optionals stdenv.isDarwin [ + disabledTestPaths = lib.optionals stdenv.hostPlatform.isDarwin [ # AttributeError: > $out/nix-support/depends - '' + lib.optionalString stdenv.isDarwin '' + '' + lib.optionalString stdenv.hostPlatform.isDarwin '' echo "${cctools}" >> $out/nix-support/depends ''; diff --git a/pkgs/development/tools/build-managers/bazel/bazel_6/default.nix b/pkgs/development/tools/build-managers/bazel/bazel_6/default.nix index a49530ecfc69..b1069673f14a 100644 --- a/pkgs/development/tools/build-managers/bazel/bazel_6/default.nix +++ b/pkgs/development/tools/build-managers/bazel/bazel_6/default.nix @@ -583,7 +583,7 @@ stdenv.mkDerivation rec { which zip python3.pkgs.absl-py # Needed to build fish completion - ] ++ lib.optionals (stdenv.isDarwin) [ cctools libcxx sigtool CoreFoundation CoreServices Foundation ]; + ] ++ lib.optionals (stdenv.hostPlatform.isDarwin) [ cctools libcxx sigtool CoreFoundation CoreServices Foundation ]; # Bazel makes extensive use of symlinks in the WORKSPACE. # This causes problems with infinite symlinks if the build output is in the same location as the @@ -622,7 +622,7 @@ stdenv.mkDerivation rec { '' + # disable execlog parser on darwin, since it fails to build # see https://github.com/NixOS/nixpkgs/pull/273774#issuecomment-1865322055 - lib.optionalString (!stdenv.isDarwin) '' + lib.optionalString (!stdenv.hostPlatform.isDarwin) '' # need to change directory for bazel to find the workspace cd ./bazel_src # build execlog tooling @@ -649,7 +649,7 @@ stdenv.mkDerivation rec { '' + # disable execlog parser on darwin, since it fails to build # see https://github.com/NixOS/nixpkgs/pull/273774#issuecomment-1865322055 - (lib.optionalString (!stdenv.isDarwin) '' + (lib.optionalString (!stdenv.hostPlatform.isDarwin) '' mkdir $out/share cp ./bazel_src/bazel-bin/src/tools/execlog/parser_deploy.jar $out/share/parser_deploy.jar cat < $out/bin/bazel-execlog @@ -730,7 +730,7 @@ stdenv.mkDerivation rec { # stored non-contiguously in the binary due to gcc optimisations, which leads # Nix to miss the hash when scanning for dependencies echo "${bazelRC}" >> $out/nix-support/depends - '' + lib.optionalString stdenv.isDarwin '' + '' + lib.optionalString stdenv.hostPlatform.isDarwin '' echo "${cctools}" >> $out/nix-support/depends ''; diff --git a/pkgs/development/tools/build-managers/bazel/bazel_7/cpp-test.nix b/pkgs/development/tools/build-managers/bazel/bazel_7/cpp-test.nix index 5722d26ea1ed..7f98f512c519 100644 --- a/pkgs/development/tools/build-managers/bazel/bazel_7/cpp-test.nix +++ b/pkgs/development/tools/build-managers/bazel/bazel_7/cpp-test.nix @@ -56,7 +56,7 @@ let cp ${./cpp-test-MODULE.bazel.lock} $out/MODULE.bazel.lock echo > $out/WORSPACE '' - + (lib.optionalString stdenv.isDarwin '' + + (lib.optionalString stdenv.hostPlatform.isDarwin '' mkdir $out/tools cp ${toolsBazel} $out/tools/bazel '')); @@ -71,10 +71,10 @@ let --verbose_failures \ --repository_cache=${mergedDistDir} \ --curses=no \ - '' + lib.optionalString (stdenv.isDarwin) '' + '' + lib.optionalString (stdenv.hostPlatform.isDarwin) '' --cxxopt=-x --cxxopt=c++ \ --host_cxxopt=-x --host_cxxopt=c++ \ - '' + lib.optionalString (stdenv.isDarwin && Foundation != null) '' + '' + lib.optionalString (stdenv.hostPlatform.isDarwin && Foundation != null) '' --linkopt=-Wl,-F${Foundation}/Library/Frameworks \ --linkopt=-L${darwin.libobjc}/lib \ '' + '' diff --git a/pkgs/development/tools/build-managers/bazel/bazel_7/default.nix b/pkgs/development/tools/build-managers/bazel/bazel_7/default.nix index 1a31de96ca4f..661eb1a71aa9 100644 --- a/pkgs/development/tools/build-managers/bazel/bazel_7/default.nix +++ b/pkgs/development/tools/build-managers/bazel/bazel_7/default.nix @@ -419,7 +419,7 @@ stdenv.mkDerivation rec { which zip python3.pkgs.absl-py # Needed to build fish completion - ] ++ lib.optionals (stdenv.isDarwin) [ + ] ++ lib.optionals (stdenv.hostPlatform.isDarwin) [ cctools libcxx Foundation @@ -561,7 +561,7 @@ stdenv.mkDerivation rec { # stored non-contiguously in the binary due to gcc optimisations, which leads # Nix to miss the hash when scanning for dependencies echo "${bazelRC}" >> $out/nix-support/depends - '' + lib.optionalString stdenv.isDarwin '' + '' + lib.optionalString stdenv.hostPlatform.isDarwin '' echo "${cctools}" >> $out/nix-support/depends ''; diff --git a/pkgs/development/tools/build-managers/bazel/bazel_7/java-test.nix b/pkgs/development/tools/build-managers/bazel/bazel_7/java-test.nix index 51fea3e32dc3..752ddc444855 100644 --- a/pkgs/development/tools/build-managers/bazel/bazel_7/java-test.nix +++ b/pkgs/development/tools/build-managers/bazel/bazel_7/java-test.nix @@ -55,7 +55,7 @@ let cp ${./cpp-test-MODULE.bazel} $out/MODULE.bazel cp ${./cpp-test-MODULE.bazel.lock} $out/MODULE.bazel.lock '' - + (lib.optionalString stdenv.isDarwin '' + + (lib.optionalString stdenv.hostPlatform.isDarwin '' mkdir $out/tools cp ${toolsBazel} $out/tools/bazel '')); diff --git a/pkgs/development/tools/build-managers/bazel/bazel_7/protobuf-test.nix b/pkgs/development/tools/build-managers/bazel/bazel_7/protobuf-test.nix index ebe4f13346bc..309bae9b2387 100644 --- a/pkgs/development/tools/build-managers/bazel/bazel_7/protobuf-test.nix +++ b/pkgs/development/tools/build-managers/bazel/bazel_7/protobuf-test.nix @@ -122,7 +122,7 @@ let cp ${personProto} $out/person/person.proto cp ${personBUILD} $out/person/BUILD.bazel '' - + (lib.optionalString stdenv.isDarwin '' + + (lib.optionalString stdenv.hostPlatform.isDarwin '' echo 'tools bazel created' mkdir $out/tools install ${toolsBazel} $out/tools/bazel @@ -155,7 +155,7 @@ let --host_javabase='@local_jdk//:jdk' \ --java_toolchain='@bazel_tools//tools/jdk:toolchain_hostjdk8' \ --javabase='@local_jdk//:jdk' \ - '' + lib.optionalString (stdenv.isDarwin) '' + '' + lib.optionalString (stdenv.hostPlatform.isDarwin) '' --cxxopt=-x --cxxopt=c++ --host_cxxopt=-x --host_cxxopt=c++ \ '' + '' diff --git a/pkgs/development/tools/build-managers/bazel/cpp-test.nix b/pkgs/development/tools/build-managers/bazel/cpp-test.nix index 6759bf14de10..cc3bc8d9a141 100644 --- a/pkgs/development/tools/build-managers/bazel/cpp-test.nix +++ b/pkgs/development/tools/build-managers/bazel/cpp-test.nix @@ -36,7 +36,7 @@ let cp -r ${bazel-examples}/cpp-tutorial/stage3 $out find $out -type d -exec chmod 755 {} \; '' - + (lib.optionalString stdenv.isDarwin '' + + (lib.optionalString stdenv.hostPlatform.isDarwin '' mkdir $out/tools cp ${toolsBazel} $out/tools/bazel '')); @@ -51,10 +51,10 @@ let --distdir=${distDir} \ --curses=no \ ${extraBazelArgs} \ - '' + lib.optionalString (stdenv.isDarwin) '' + '' + lib.optionalString (stdenv.hostPlatform.isDarwin) '' --cxxopt=-x --cxxopt=c++ --host_cxxopt=-x --host_cxxopt=c++ \ --linkopt=-stdlib=libc++ --host_linkopt=-stdlib=libc++ \ - '' + lib.optionalString (stdenv.isDarwin && Foundation != null) '' + '' + lib.optionalString (stdenv.hostPlatform.isDarwin && Foundation != null) '' --linkopt=-Wl,-F${Foundation}/Library/Frameworks \ --linkopt=-L${darwin.libobjc}/lib \ ''; diff --git a/pkgs/development/tools/build-managers/bazel/java-test.nix b/pkgs/development/tools/build-managers/bazel/java-test.nix index 3890d45d2b94..afdacaf6a844 100644 --- a/pkgs/development/tools/build-managers/bazel/java-test.nix +++ b/pkgs/development/tools/build-managers/bazel/java-test.nix @@ -35,7 +35,7 @@ let cp -r ${bazel-examples}/java-tutorial $out find $out -type d -exec chmod 755 {} \; '' - + (lib.optionalString stdenv.isDarwin '' + + (lib.optionalString stdenv.hostPlatform.isDarwin '' mkdir $out/tools cp ${toolsBazel} $out/tools/bazel '')); diff --git a/pkgs/development/tools/build-managers/bazel/protobuf-test.nix b/pkgs/development/tools/build-managers/bazel/protobuf-test.nix index 0466404ced96..5880c5dd95fe 100644 --- a/pkgs/development/tools/build-managers/bazel/protobuf-test.nix +++ b/pkgs/development/tools/build-managers/bazel/protobuf-test.nix @@ -154,7 +154,7 @@ let cp ${personProto} $out/person/person.proto cp ${personBUILD} $out/person/BUILD.bazel '' - + (lib.optionalString stdenv.isDarwin '' + + (lib.optionalString stdenv.hostPlatform.isDarwin '' mkdir $out/tools cp ${toolsBazel} $out/tools/bazel '')); @@ -178,7 +178,7 @@ let --host_javabase='@local_jdk//:jdk' \ --java_toolchain='@bazel_tools//tools/jdk:toolchain_hostjdk8' \ --javabase='@local_jdk//:jdk' \ - '' + lib.optionalString (stdenv.isDarwin) '' + '' + lib.optionalString (stdenv.hostPlatform.isDarwin) '' --cxxopt=-x --cxxopt=c++ --host_cxxopt=-x --host_cxxopt=c++ \ --linkopt=-stdlib=libc++ --host_linkopt=-stdlib=libc++ \ ''; diff --git a/pkgs/development/tools/build-managers/bazel/python-bin-path-test.nix b/pkgs/development/tools/build-managers/bazel/python-bin-path-test.nix index e0e59fb8891d..59f5d0c01fcc 100644 --- a/pkgs/development/tools/build-managers/bazel/python-bin-path-test.nix +++ b/pkgs/development/tools/build-managers/bazel/python-bin-path-test.nix @@ -65,7 +65,7 @@ let cp ${pythonBin} $out/python/bin.py cp ${pythonBUILD} $out/python/BUILD.bazel '' - + (lib.optionalString stdenv.isDarwin '' + + (lib.optionalString stdenv.hostPlatform.isDarwin '' mkdir $out/tools cp ${toolsBazel} $out/tools/bazel '')); diff --git a/pkgs/development/tools/build-managers/bloop/default.nix b/pkgs/development/tools/build-managers/bloop/default.nix index 01308d89050c..b0d9c72ad224 100644 --- a/pkgs/development/tools/build-managers/bloop/default.nix +++ b/pkgs/development/tools/build-managers/bloop/default.nix @@ -13,9 +13,9 @@ stdenv.mkDerivation rec { version = "2.0.2"; platform = - if stdenv.isLinux && stdenv.isx86_64 then "x86_64-pc-linux" - else if stdenv.isDarwin && stdenv.isx86_64 then "x86_64-apple-darwin" - else if stdenv.isDarwin && stdenv.isAarch64 then "aarch64-apple-darwin" + if stdenv.hostPlatform.isLinux && stdenv.hostPlatform.isx86_64 then "x86_64-pc-linux" + else if stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isx86_64 then "x86_64-apple-darwin" + else if stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isAarch64 then "aarch64-apple-darwin" else throw "unsupported platform"; bloop-bash = fetchurl { @@ -36,15 +36,15 @@ stdenv.mkDerivation rec { bloop-binary = fetchurl rec { url = "https://github.com/scalacenter/bloop/releases/download/v${version}/bloop-${platform}"; sha256 = - if stdenv.isLinux && stdenv.isx86_64 then "sha256-xYVfgi3ANjBiuf4/5FDgSYDL/fPsvuJn4jFxAEVYct4=" - else if stdenv.isDarwin && stdenv.isx86_64 then "sha256-lq0S2AsulcUUYDd3qnWonwd/W0/gb7lJwC+QTYTlTdg=" - else if stdenv.isDarwin && stdenv.isAarch64 then "sha256-e+9Q7xIEsHloaKOj13vZnGs2vulkOJv7tCOuACobHvk=" + if stdenv.hostPlatform.isLinux && stdenv.hostPlatform.isx86_64 then "sha256-xYVfgi3ANjBiuf4/5FDgSYDL/fPsvuJn4jFxAEVYct4=" + else if stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isx86_64 then "sha256-lq0S2AsulcUUYDd3qnWonwd/W0/gb7lJwC+QTYTlTdg=" + else if stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isAarch64 then "sha256-e+9Q7xIEsHloaKOj13vZnGs2vulkOJv7tCOuACobHvk=" else throw "unsupported platform"; }; dontUnpack = true; nativeBuildInputs = [ installShellFiles makeWrapper ] - ++ lib.optional stdenv.isLinux autoPatchelfHook; + ++ lib.optional stdenv.hostPlatform.isLinux autoPatchelfHook; buildInputs = [ stdenv.cc.cc.lib zlib ]; propagatedBuildInputs = [ jre ]; diff --git a/pkgs/development/tools/build-managers/buck/default.nix b/pkgs/development/tools/build-managers/buck/default.nix index f494e4053525..06246f6b081a 100644 --- a/pkgs/development/tools/build-managers/buck/default.nix +++ b/pkgs/development/tools/build-managers/buck/default.nix @@ -42,6 +42,6 @@ stdenv.mkDerivation rec { license = licenses.asl20; platforms = platforms.all; # https://github.com/facebook/buck/issues/2666 - broken = stdenv.isDarwin && stdenv.isAarch64; + broken = stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isAarch64; }; } diff --git a/pkgs/development/tools/build-managers/build2/bpkg.nix b/pkgs/development/tools/build-managers/build2/bpkg.nix index e4d212858690..bf9951e7ae17 100644 --- a/pkgs/development/tools/build-managers/build2/bpkg.nix +++ b/pkgs/development/tools/build-managers/build2/bpkg.nix @@ -38,7 +38,7 @@ stdenv.mkDerivation rec { openssl ]; - doCheck = !stdenv.isDarwin; # tests hang + doCheck = !stdenv.hostPlatform.isDarwin; # tests hang # Failing test postPatch = '' @@ -49,7 +49,7 @@ stdenv.mkDerivation rec { "config.bin.lib=${build2.configSharedStatic enableShared enableStatic}" ]; - postInstall = lib.optionalString stdenv.isDarwin '' + postInstall = lib.optionalString stdenv.hostPlatform.isDarwin '' install_name_tool -add_rpath '${lib.getLib build2}/lib' "''${!outputBin}/bin/bpkg" ''; diff --git a/pkgs/development/tools/build-managers/build2/default.nix b/pkgs/development/tools/build-managers/build2/default.nix index c420bd8c7320..c02334c98a51 100644 --- a/pkgs/development/tools/build-managers/build2/default.nix +++ b/pkgs/development/tools/build-managers/build2/default.nix @@ -72,7 +72,7 @@ stdenv.mkDerivation rec { "config.build2.libpkgconf=true" ]; - postInstall = lib.optionalString stdenv.isDarwin '' + postInstall = lib.optionalString stdenv.hostPlatform.isDarwin '' install_name_tool -add_rpath "''${!outputLib}/lib" "''${!outputBin}/bin/b" ''; diff --git a/pkgs/development/tools/build-managers/conan/default.nix b/pkgs/development/tools/build-managers/conan/default.nix index 5e7a0e866cff..f9bb2457a4fa 100644 --- a/pkgs/development/tools/build-managers/conan/default.nix +++ b/pkgs/development/tools/build-managers/conan/default.nix @@ -39,7 +39,7 @@ python3.pkgs.buildPythonApplication rec { requests tqdm urllib3 - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ idna cryptography pyopenssl @@ -49,7 +49,7 @@ python3.pkgs.buildPythonApplication rec { git pkg-config zlib - ] ++ lib.optionals (stdenv.isDarwin) [ + ] ++ lib.optionals (stdenv.hostPlatform.isDarwin) [ xcbuild.xcrun ] ++ (with python3.pkgs; [ mock @@ -73,7 +73,7 @@ python3.pkgs.buildPythonApplication rec { disabledTests = [ # Tests require network access "TestFTP" - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ # Rejects paths containing nix "test_conditional_os" # Requires Apple Clang diff --git a/pkgs/development/tools/build-managers/corrosion/default.nix b/pkgs/development/tools/build-managers/corrosion/default.nix index 6809ee7ffd7a..500e56e9cfcc 100644 --- a/pkgs/development/tools/build-managers/corrosion/default.nix +++ b/pkgs/development/tools/build-managers/corrosion/default.nix @@ -18,7 +18,7 @@ stdenv.mkDerivation rec { hash = "sha256-vaNXXXaGqYNmhonU+ANN857LAUgwv+PMcON+nBuUoeo="; }; - buildInputs = lib.optional stdenv.isDarwin libiconv; + buildInputs = lib.optional stdenv.hostPlatform.isDarwin libiconv; nativeBuildInputs = [ cmake diff --git a/pkgs/development/tools/build-managers/fac/default.nix b/pkgs/development/tools/build-managers/fac/default.nix index b44cefe6a953..63d53e123aad 100644 --- a/pkgs/development/tools/build-managers/fac/default.nix +++ b/pkgs/development/tools/build-managers/fac/default.nix @@ -11,7 +11,7 @@ rustPlatform.buildRustPackage rec { }; - buildInputs = lib.optionals stdenv.isDarwin [ CoreServices ]; + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ CoreServices ]; cargoHash = "sha256-XT4FQVE+buORuZAFZK5Qnf/Fl3QSvw4SHUuCzWhxUdk="; # fac includes a unit test called ls_files_works which assumes it's @@ -31,7 +31,7 @@ rustPlatform.buildRustPackage rec { ''; meta = with lib; { - broken = (stdenv.isLinux && stdenv.isAarch64); + broken = (stdenv.hostPlatform.isLinux && stdenv.hostPlatform.isAarch64); description = '' A build system that uses ptrace to handle dependencies automatically ''; diff --git a/pkgs/development/tools/build-managers/gn/generic.nix b/pkgs/development/tools/build-managers/gn/generic.nix index fe74486ccfaa..71242ceaba84 100644 --- a/pkgs/development/tools/build-managers/gn/generic.nix +++ b/pkgs/development/tools/build-managers/gn/generic.nix @@ -28,7 +28,7 @@ in stdenv.mkDerivation { }; nativeBuildInputs = [ ninja python3 ]; - buildInputs = lib.optionals stdenv.isDarwin (with darwin; with apple_sdk.frameworks; [ + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin (with darwin; with apple_sdk.frameworks; [ libobjc cctools diff --git a/pkgs/development/tools/build-managers/gnumake/4.2/default.nix b/pkgs/development/tools/build-managers/gnumake/4.2/default.nix index ac22eee7e206..1afadceb9b77 100644 --- a/pkgs/development/tools/build-managers/gnumake/4.2/default.nix +++ b/pkgs/development/tools/build-managers/gnumake/4.2/default.nix @@ -35,7 +35,7 @@ stdenv.mkDerivation rec { # a second. So, tell Make to ignore nanoseconds in mtime here by # overriding the autoconf test for the struct. # See https://github.com/NixOS/nixpkgs/issues/51221 for discussion. - ++ lib.optional stdenv.isDarwin "ac_cv_struct_st_mtim_nsec=no"; + ++ lib.optional stdenv.hostPlatform.isDarwin "ac_cv_struct_st_mtim_nsec=no"; outputs = [ "out" "man" "info" ]; diff --git a/pkgs/development/tools/build-managers/gnumake/default.nix b/pkgs/development/tools/build-managers/gnumake/default.nix index fcbb23a7119e..5f215be7386a 100644 --- a/pkgs/development/tools/build-managers/gnumake/default.nix +++ b/pkgs/development/tools/build-managers/gnumake/default.nix @@ -47,7 +47,7 @@ stdenv.mkDerivation rec { # a second. So, tell Make to ignore nanoseconds in mtime here by # overriding the autoconf test for the struct. # See https://github.com/NixOS/nixpkgs/issues/51221 for discussion. - ++ lib.optional stdenv.isDarwin "ac_cv_struct_st_mtim_nsec=no"; + ++ lib.optional stdenv.hostPlatform.isDarwin "ac_cv_struct_st_mtim_nsec=no"; outputs = [ "out" "man" "info" ]; separateDebugInfo = true; diff --git a/pkgs/development/tools/build-managers/gradle/default.nix b/pkgs/development/tools/build-managers/gradle/default.nix index a9827e7a0a7e..61510384e31e 100644 --- a/pkgs/development/tools/build-managers/gradle/default.nix +++ b/pkgs/development/tools/build-managers/gradle/default.nix @@ -61,7 +61,7 @@ rec { nativeBuildInputs = [ makeWrapper unzip - ] ++ lib.optionals stdenv.isLinux [ + ] ++ lib.optionals stdenv.hostPlatform.isLinux [ autoPatchelfHook ]; @@ -98,9 +98,9 @@ rec { --add-flags "-classpath $gradle_launcher_jar org.gradle.launcher.GradleMain${toolchain.property}" ''; - dontFixup = !stdenv.isLinux; + dontFixup = !stdenv.hostPlatform.isLinux; - fixupPhase = let arch = if stdenv.is64bit then "amd64" else "i386"; + fixupPhase = let arch = if stdenv.hostPlatform.is64bit then "amd64" else "i386"; in '' . ${./patching.sh} diff --git a/pkgs/development/tools/build-managers/gradle/fetch-deps.nix b/pkgs/development/tools/build-managers/gradle/fetch-deps.nix index 304898c0131c..a0d3b10ba863 100644 --- a/pkgs/development/tools/build-managers/gradle/fetch-deps.nix +++ b/pkgs/development/tools/build-managers/gradle/fetch-deps.nix @@ -22,7 +22,7 @@ in , data # redirect stdout to stderr to allow the update script to be used with update script combinators , silent ? true -, useBwrap ? stdenv.isLinux +, useBwrap ? stdenv.hostPlatform.isLinux } @ attrs: let diff --git a/pkgs/development/tools/build-managers/moon/default.nix b/pkgs/development/tools/build-managers/moon/default.nix index adb3c306a779..f576caef09df 100644 --- a/pkgs/development/tools/build-managers/moon/default.nix +++ b/pkgs/development/tools/build-managers/moon/default.nix @@ -26,7 +26,7 @@ rustPlatform.buildRustPackage rec { }; buildInputs = [ openssl ] ++ - lib.optionals stdenv.isDarwin [ + lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.Security darwin.apple_sdk.frameworks.SystemConfiguration ]; diff --git a/pkgs/development/tools/build-managers/msbuild/default.nix b/pkgs/development/tools/build-managers/msbuild/default.nix index 94469669a59e..8710ea93c0a9 100644 --- a/pkgs/development/tools/build-managers/msbuild/default.nix +++ b/pkgs/development/tools/build-managers/msbuild/default.nix @@ -45,7 +45,7 @@ mkPackage rec { # https://github.com/NixOS/nixpkgs/issues/38991 # bash: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8) - LOCALE_ARCHIVE = lib.optionalString stdenv.isLinux + LOCALE_ARCHIVE = lib.optionalString stdenv.hostPlatform.isLinux "${glibcLocales}/lib/locale/locale-archive"; postPatch = '' diff --git a/pkgs/development/tools/build-managers/sbt/default.nix b/pkgs/development/tools/build-managers/sbt/default.nix index 3977d5b18441..9c03f03be775 100644 --- a/pkgs/development/tools/build-managers/sbt/default.nix +++ b/pkgs/development/tools/build-managers/sbt/default.nix @@ -20,9 +20,9 @@ stdenv.mkDerivation (finalAttrs: { echo -java-home ${jre.home} >>conf/sbtopts ''; - nativeBuildInputs = lib.optionals stdenv.isLinux [ autoPatchelfHook ]; + nativeBuildInputs = lib.optionals stdenv.hostPlatform.isLinux [ autoPatchelfHook ]; - buildInputs = lib.optionals stdenv.isLinux [ + buildInputs = lib.optionals stdenv.hostPlatform.isLinux [ stdenv.cc.cc # libstdc++.so.6 zlib ]; @@ -39,7 +39,7 @@ stdenv.mkDerivation (finalAttrs: { cp -ra . $out/share/sbt ln -sT ../share/sbt/bin/sbt $out/bin/sbt ln -sT ../share/sbt/bin/sbtn-${ - if (stdenv.isDarwin) then "universal-apple-darwin" + if (stdenv.hostPlatform.isDarwin) then "universal-apple-darwin" else if (stdenv.hostPlatform.isAarch64) then "aarch64-pc-linux" else "x86_64-pc-linux" } $out/bin/sbtn diff --git a/pkgs/development/tools/build-managers/scala-cli/default.nix b/pkgs/development/tools/build-managers/scala-cli/default.nix index 5e2058899393..3a0eb79b2430 100644 --- a/pkgs/development/tools/build-managers/scala-cli/default.nix +++ b/pkgs/development/tools/build-managers/scala-cli/default.nix @@ -22,7 +22,7 @@ in stdenv.mkDerivation { inherit pname version; nativeBuildInputs = [ installShellFiles makeWrapper ] - ++ lib.optional stdenv.isLinux autoPatchelfHook; + ++ lib.optional stdenv.hostPlatform.isLinux autoPatchelfHook; buildInputs = assert lib.assertMsg (lib.versionAtLeast jre.version "17.0.0") '' scala-cli requires Java 17 or newer, but ${jre.name} is ${jre.version} @@ -54,7 +54,7 @@ stdenv.mkDerivation { # We need to call autopatchelf before generating completions dontAutoPatchelf = true; - postFixup = lib.optionalString stdenv.isLinux '' + postFixup = lib.optionalString stdenv.hostPlatform.isLinux '' autoPatchelf $out '' + '' # hack to ensure the completion function looks right diff --git a/pkgs/development/tools/buildah/default.nix b/pkgs/development/tools/buildah/default.nix index c242ab3b4ff3..fc9660eab411 100644 --- a/pkgs/development/tools/buildah/default.nix +++ b/pkgs/development/tools/buildah/default.nix @@ -36,7 +36,7 @@ buildGoModule rec { buildInputs = [ gpgme - ] ++ lib.optionals stdenv.isLinux [ + ] ++ lib.optionals stdenv.hostPlatform.isLinux [ btrfs-progs libapparmor libseccomp diff --git a/pkgs/development/tools/buildah/wrapper.nix b/pkgs/development/tools/buildah/wrapper.nix index 60670791827d..1b27c4899715 100644 --- a/pkgs/development/tools/buildah/wrapper.nix +++ b/pkgs/development/tools/buildah/wrapper.nix @@ -19,7 +19,7 @@ let binPath = lib.makeBinPath ([ - ] ++ lib.optionals stdenv.isLinux [ + ] ++ lib.optionals stdenv.hostPlatform.isLinux [ runc crun conmon @@ -34,7 +34,7 @@ let # this only works for some binaries, others may need to be added to `binPath` or in the modules paths = [ - ] ++ lib.optionals stdenv.isLinux [ + ] ++ lib.optionals stdenv.hostPlatform.isLinux [ aardvark-dns netavark passt diff --git a/pkgs/development/tools/buildkit/default.nix b/pkgs/development/tools/buildkit/default.nix index bddb8432109d..355233493c66 100644 --- a/pkgs/development/tools/buildkit/default.nix +++ b/pkgs/development/tools/buildkit/default.nix @@ -13,7 +13,7 @@ buildGoModule rec { vendorHash = null; - subPackages = [ "cmd/buildctl" ] ++ lib.optionals stdenv.isLinux [ "cmd/buildkitd" ]; + subPackages = [ "cmd/buildctl" ] ++ lib.optionals stdenv.hostPlatform.isLinux [ "cmd/buildkitd" ]; ldflags = [ "-s" "-w" "-X github.com/moby/buildkit/version.Version=${version}" "-X github.com/moby/buildkit/version.Revision=${src.rev}" ]; diff --git a/pkgs/development/tools/chit/default.nix b/pkgs/development/tools/chit/default.nix index 03c301f19362..7d140bf2a794 100644 --- a/pkgs/development/tools/chit/default.nix +++ b/pkgs/development/tools/chit/default.nix @@ -22,11 +22,11 @@ rustPlatform.buildRustPackage rec { lockFile = ./Cargo.lock; }; - nativeBuildInputs = lib.optionals stdenv.isLinux [ pkg-config ]; + nativeBuildInputs = lib.optionals stdenv.hostPlatform.isLinux [ pkg-config ]; - buildInputs = lib.optionals stdenv.isLinux [ + buildInputs = lib.optionals stdenv.hostPlatform.isLinux [ openssl - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.Security ]; diff --git a/pkgs/development/tools/cocogitto/default.nix b/pkgs/development/tools/cocogitto/default.nix index 6760b4754203..848b6fb2f10d 100644 --- a/pkgs/development/tools/cocogitto/default.nix +++ b/pkgs/development/tools/cocogitto/default.nix @@ -19,7 +19,7 @@ rustPlatform.buildRustPackage rec { nativeBuildInputs = [ installShellFiles ]; - buildInputs = [ libgit2 ] ++ lib.optional stdenv.isDarwin Security; + buildInputs = [ libgit2 ] ++ lib.optional stdenv.hostPlatform.isDarwin Security; postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) '' installShellCompletion --cmd cog \ diff --git a/pkgs/development/tools/comby/default.nix b/pkgs/development/tools/comby/default.nix index ad7ab8559688..4299c122109a 100644 --- a/pkgs/development/tools/comby/default.nix +++ b/pkgs/development/tools/comby/default.nix @@ -92,7 +92,7 @@ mkCombyPackage { ocamlPackages.dune-configurator combyKernel combySemantic - ] ++ (if !stdenv.isAarch32 && !stdenv.isAarch64 then + ] ++ (if !stdenv.hostPlatform.isAarch32 && !stdenv.hostPlatform.isAarch64 then [ ocamlPackages.hack_parallel ] else [ ]); diff --git a/pkgs/development/tools/confluent-cli/default.nix b/pkgs/development/tools/confluent-cli/default.nix index e614fe7d947d..09ca1e7ff8f1 100644 --- a/pkgs/development/tools/confluent-cli/default.nix +++ b/pkgs/development/tools/confluent-cli/default.nix @@ -27,7 +27,7 @@ stdenv.mkDerivation rec { nativeBuildInputs = lib.optionals stdenv.hostPlatform.isLinux [ autoPatchelfHook ]; - dontStrip = stdenv.isDarwin; + dontStrip = stdenv.hostPlatform.isDarwin; installPhase = '' mkdir -p $out/{bin,share/doc/confluent-cli} diff --git a/pkgs/development/tools/continuous-integration/buildbot/master.nix b/pkgs/development/tools/continuous-integration/buildbot/master.nix index d0a2efb32b57..a9e3b01e07e6 100644 --- a/pkgs/development/tools/continuous-integration/buildbot/master.nix +++ b/pkgs/development/tools/continuous-integration/buildbot/master.nix @@ -147,7 +147,7 @@ buildPythonApplication rec { SQLALCHEMY_SILENCE_UBER_WARNING = 1; # TimeoutErrors on slow machines -> aarch64 - doCheck = !stdenv.isAarch64; + doCheck = !stdenv.hostPlatform.isAarch64; preCheck = '' export LC_ALL="en_US.UTF-8" @@ -162,7 +162,7 @@ buildPythonApplication rec { passthru = { inherit withPlugins; updateScript = ./update.sh; - } // lib.optionalAttrs stdenv.isLinux { + } // lib.optionalAttrs stdenv.hostPlatform.isLinux { tests = { inherit (nixosTests) buildbot; }; @@ -174,6 +174,6 @@ buildPythonApplication rec { changelog = "https://github.com/buildbot/buildbot/releases/tag/v${version}"; maintainers = teams.buildbot.members; license = licenses.gpl2Only; - broken = stdenv.isDarwin; + broken = stdenv.hostPlatform.isDarwin; }; } diff --git a/pkgs/development/tools/continuous-integration/buildbot/worker.nix b/pkgs/development/tools/continuous-integration/buildbot/worker.nix index aacdf92e30a5..3abc10134322 100644 --- a/pkgs/development/tools/continuous-integration/buildbot/worker.nix +++ b/pkgs/development/tools/continuous-integration/buildbot/worker.nix @@ -56,6 +56,6 @@ buildPythonPackage ({ description = "Buildbot Worker Daemon"; maintainers = teams.buildbot.members; license = licenses.gpl2; - broken = stdenv.isDarwin; # https://hydra.nixos.org/build/243534318/nixlog/6 + broken = stdenv.hostPlatform.isDarwin; # https://hydra.nixos.org/build/243534318/nixlog/6 }; }) diff --git a/pkgs/development/tools/continuous-integration/buildkite-test-collector-rust/default.nix b/pkgs/development/tools/continuous-integration/buildkite-test-collector-rust/default.nix index 28630e43b766..84c62e556858 100644 --- a/pkgs/development/tools/continuous-integration/buildkite-test-collector-rust/default.nix +++ b/pkgs/development/tools/continuous-integration/buildkite-test-collector-rust/default.nix @@ -17,7 +17,7 @@ rustPlatform.buildRustPackage rec { sha256 = "sha256-PF2TFfzWmHXLgTopzJ04dfnzd3Sc/A6Hduffz2guxmU="; }; - buildInputs = lib.optionals stdenv.isDarwin [ + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ Security ]; diff --git a/pkgs/development/tools/continuous-integration/hci/default.nix b/pkgs/development/tools/continuous-integration/hci/default.nix index 4f04e0494f0f..6da44a4786cd 100644 --- a/pkgs/development/tools/continuous-integration/hci/default.nix +++ b/pkgs/development/tools/continuous-integration/hci/default.nix @@ -2,7 +2,7 @@ let inherit (haskell.lib.compose) overrideCabal addBuildTools justStaticExecutables appendConfigureFlags; inherit (lib) makeBinPath; - bundledBins = lib.optional stdenv.isLinux crun; + bundledBins = lib.optional stdenv.hostPlatform.isLinux crun; overrides = old: { hercules-ci-agent = diff --git a/pkgs/development/tools/continuous-integration/hercules-ci-agent/default.nix b/pkgs/development/tools/continuous-integration/hercules-ci-agent/default.nix index 0da85bae969a..a01febb9113d 100644 --- a/pkgs/development/tools/continuous-integration/hercules-ci-agent/default.nix +++ b/pkgs/development/tools/continuous-integration/hercules-ci-agent/default.nix @@ -15,7 +15,7 @@ let inherit (haskell.lib.compose) overrideCabal addBuildTools justStaticExecutables; inherit (lib) makeBinPath; - bundledBins = [ gnutar gzip git openssh ] ++ lib.optional stdenv.isLinux crun; + bundledBins = [ gnutar gzip git openssh ] ++ lib.optional stdenv.hostPlatform.isLinux crun; pkg = # justStaticExecutables is needed due to https://github.com/NixOS/nix/issues/2990 @@ -43,7 +43,7 @@ in pkg.overrideAttrs (finalAttrs: o: { package = finalAttrs.finalPackage; command = "hercules-ci-agent --help"; }; - } // lib.optionalAttrs (stdenv.isLinux) { + } // lib.optionalAttrs (stdenv.hostPlatform.isLinux) { # Does not test the package, but evaluation of the related NixOS module. nixos-simple-config = (nixos { boot.loader.grub.enable = false; diff --git a/pkgs/development/tools/cotton/default.nix b/pkgs/development/tools/cotton/default.nix index ec39c399bdd5..bc54f3154949 100644 --- a/pkgs/development/tools/cotton/default.nix +++ b/pkgs/development/tools/cotton/default.nix @@ -24,7 +24,7 @@ rustPlatform.buildRustPackage rec { }; }; - buildInputs = lib.optionals stdenv.isDarwin [ CoreServices ]; + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ CoreServices ]; meta = with lib; { description = "Package manager for JavaScript projects"; diff --git a/pkgs/development/tools/database/dynein/default.nix b/pkgs/development/tools/database/dynein/default.nix index 618ca16417db..167374348459 100644 --- a/pkgs/development/tools/database/dynein/default.nix +++ b/pkgs/development/tools/database/dynein/default.nix @@ -27,7 +27,7 @@ rustPlatform.buildRustPackage rec { buildInputs = [ openssl - ] ++ lib.optionals stdenv.isDarwin [ Security ]; + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ Security ]; preBuild = '' export OPENSSL_DIR=${lib.getDev openssl} diff --git a/pkgs/development/tools/database/movine/default.nix b/pkgs/development/tools/database/movine/default.nix index 51a4d8f2943b..41ea6a42a05d 100644 --- a/pkgs/development/tools/database/movine/default.nix +++ b/pkgs/development/tools/database/movine/default.nix @@ -24,7 +24,7 @@ rustPlatform.buildRustPackage rec { buildInputs = [ openssl - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.Security ]; diff --git a/pkgs/development/tools/database/prisma-engines/default.nix b/pkgs/development/tools/database/prisma-engines/default.nix index 295c791d4f5e..756d5e85ab90 100644 --- a/pkgs/development/tools/database/prisma-engines/default.nix +++ b/pkgs/development/tools/database/prisma-engines/default.nix @@ -42,7 +42,7 @@ rustPlatform.buildRustPackage rec { buildInputs = [ openssl protobuf - ] ++ lib.optionals stdenv.isDarwin [ Security ]; + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ Security ]; # FIXME: Workaround Rust 1.80 support by updating time to 0.3.36 # https://github.com/prisma/prisma-engines/issues/4989 diff --git a/pkgs/development/tools/database/prqlc/default.nix b/pkgs/development/tools/database/prqlc/default.nix index 2eac6f4a2073..008eba559b11 100644 --- a/pkgs/development/tools/database/prqlc/default.nix +++ b/pkgs/development/tools/database/prqlc/default.nix @@ -34,7 +34,7 @@ rustPlatform.buildRustPackage rec { sqlite zlib ] - ++ lib.optionals stdenv.isDarwin [ + ++ lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.CoreFoundation darwin.apple_sdk.frameworks.CoreServices darwin.apple_sdk.frameworks.Security diff --git a/pkgs/development/tools/database/replibyte/default.nix b/pkgs/development/tools/database/replibyte/default.nix index 4437e4738e16..f04a00e881ca 100644 --- a/pkgs/development/tools/database/replibyte/default.nix +++ b/pkgs/development/tools/database/replibyte/default.nix @@ -32,7 +32,7 @@ rustPlatform.buildRustPackage rec { nativeBuildInputs = [ pkg-config ]; - buildInputs = [ openssl ] ++ lib.optionals stdenv.isDarwin [ Security SystemConfiguration ]; + buildInputs = [ openssl ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ Security SystemConfiguration ]; cargoBuildFlags = [ "--all-features" ]; diff --git a/pkgs/development/tools/database/sqlitebrowser/default.nix b/pkgs/development/tools/database/sqlitebrowser/default.nix index 6b97b1c373d5..c90bfbd3b37d 100644 --- a/pkgs/development/tools/database/sqlitebrowser/default.nix +++ b/pkgs/development/tools/database/sqlitebrowser/default.nix @@ -13,13 +13,13 @@ stdenv.mkDerivation (finalAttrs: { sha256 = "sha256-2U0jnL2hmrxynMxEiObl10bKFAFlCrY2hulZ/Ggqimw="; }; - patches = lib.optional stdenv.isDarwin ./macos.patch; + patches = lib.optional stdenv.hostPlatform.isDarwin ./macos.patch; # We should be using qscintilla from nixpkgs instead of the vendored version, # but qscintilla is currently in a bit of a mess as some consumers expect a # -qt4 or -qt5 prefix while others do not. # We *really* should get that cleaned up. - buildInputs = [ qtbase sqlcipher ] ++ lib.optional stdenv.isDarwin qtmacextras; + buildInputs = [ qtbase sqlcipher ] ++ lib.optional stdenv.hostPlatform.isDarwin qtmacextras; nativeBuildInputs = [ cmake qttools wrapQtAppsHook ]; diff --git a/pkgs/development/tools/database/surrealdb-migrations/default.nix b/pkgs/development/tools/database/surrealdb-migrations/default.nix index a8243353adea..2fb443491650 100644 --- a/pkgs/development/tools/database/surrealdb-migrations/default.nix +++ b/pkgs/development/tools/database/surrealdb-migrations/default.nix @@ -25,7 +25,7 @@ rustPlatform.buildRustPackage rec { cargoHash = "sha256-jj1ytX44XoNKR+TCn/MpWk8CFM/DvHSwyfjVe3ca+AA="; buildInputs = [ ] - ++ lib.optionals stdenv.isDarwin [ Security ]; + ++ lib.optionals stdenv.hostPlatform.isDarwin [ Security ]; # Error: No such file or directory (os error 2) # failures: diff --git a/pkgs/development/tools/delve/default.nix b/pkgs/development/tools/delve/default.nix index 4552539bb76e..cae7c6145cb0 100644 --- a/pkgs/development/tools/delve/default.nix +++ b/pkgs/development/tools/delve/default.nix @@ -29,7 +29,7 @@ buildGoModule rec { # even with __darwinAllowLocalNetworking allowed. # - CGO_FLAGS warnings break tests' expected stdout/stderr outputs. # - DAP test binaries exit prematurely. - doCheck = !stdenv.isDarwin; + doCheck = !stdenv.hostPlatform.isDarwin; postInstall = '' # fortify source breaks build since delve compiles with -O0 diff --git a/pkgs/development/tools/devpod/default.nix b/pkgs/development/tools/devpod/default.nix index 75c1e27c41f3..057c0d1e9df5 100644 --- a/pkgs/development/tools/devpod/default.nix +++ b/pkgs/development/tools/devpod/default.nix @@ -122,7 +122,7 @@ rec { cp -r ${frontend-build} frontend-build substituteInPlace tauri.conf.json --replace '"distDir": "../dist",' '"distDir": "frontend-build",' - '' + lib.optionalString stdenv.isLinux '' + '' + lib.optionalString stdenv.hostPlatform.isLinux '' substituteInPlace $cargoDepsCopy/libappindicator-sys-*/src/lib.rs \ --replace "libayatana-appindicator3.so.1" "${libayatana-appindicator}/lib/libayatana-appindicator3.so.1" @@ -134,20 +134,20 @@ rec { nativeBuildInputs = [ copyDesktopItems pkg-config - ] ++ lib.optionals stdenv.isLinux [ + ] ++ lib.optionals stdenv.hostPlatform.isLinux [ jq - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ desktopToDarwinBundle ]; buildInputs = [ libsoup openssl - ] ++ lib.optionals stdenv.isLinux [ + ] ++ lib.optionals stdenv.hostPlatform.isLinux [ gtk3 libayatana-appindicator webkitgtk - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.Carbon darwin.apple_sdk.frameworks.Cocoa darwin.apple_sdk.frameworks.WebKit diff --git a/pkgs/development/tools/dive/default.nix b/pkgs/development/tools/dive/default.nix index a29e3a23a26b..06cb34499a72 100644 --- a/pkgs/development/tools/dive/default.nix +++ b/pkgs/development/tools/dive/default.nix @@ -24,7 +24,7 @@ buildGoModule rec { nativeBuildInputs = [ pkg-config ]; - buildInputs = lib.optionals stdenv.isLinux [ btrfs-progs gpgme lvm2 ]; + buildInputs = lib.optionals stdenv.hostPlatform.isLinux [ btrfs-progs gpgme lvm2 ]; patches = [ # fix scrolling diff --git a/pkgs/development/tools/documentation/doxygen/default.nix b/pkgs/development/tools/documentation/doxygen/default.nix index 35fcdc709521..455f18ba0a3d 100644 --- a/pkgs/development/tools/documentation/doxygen/default.nix +++ b/pkgs/development/tools/documentation/doxygen/default.nix @@ -41,7 +41,7 @@ stdenv.mkDerivation rec { buildInputs = [ libiconv spdlog sqlite ] ++ lib.optionals (qt5 != null) (with qt5; [ qtbase wrapQtAppsHook ]) - ++ lib.optionals stdenv.isDarwin [ CoreServices ]; + ++ lib.optionals stdenv.hostPlatform.isDarwin [ CoreServices ]; cmakeFlags = [ "-DICONV_INCLUDE_DIR=${libiconv}/include" @@ -50,7 +50,7 @@ stdenv.mkDerivation rec { ] ++ lib.optional (qt5 != null) "-Dbuild_wizard=YES"; env.NIX_CFLAGS_COMPILE = - lib.optionalString stdenv.isDarwin "-mmacosx-version-min=10.9"; + lib.optionalString stdenv.hostPlatform.isDarwin "-mmacosx-version-min=10.9"; # put examples in an output so people/tools can test against them outputs = [ "out" "examples" ]; diff --git a/pkgs/development/tools/dprint/default.nix b/pkgs/development/tools/dprint/default.nix index fbd8ea370866..d6b1266ab393 100644 --- a/pkgs/development/tools/dprint/default.nix +++ b/pkgs/development/tools/dprint/default.nix @@ -11,7 +11,7 @@ rustPlatform.buildRustPackage rec { cargoHash = "sha256-86ecnwDDVvgXgBBodP2rSZOn+R52Jap8RCKILttGOn8="; - buildInputs = lib.optionals stdenv.isDarwin [ CoreFoundation Security ]; + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ CoreFoundation Security ]; # Tests fail because they expect a test WASM plugin. Tests already run for # every commit upstream on GitHub Actions diff --git a/pkgs/development/tools/dump_syms/default.nix b/pkgs/development/tools/dump_syms/default.nix index 61d323d83274..7f723096a8a7 100644 --- a/pkgs/development/tools/dump_syms/default.nix +++ b/pkgs/development/tools/dump_syms/default.nix @@ -37,7 +37,7 @@ rustPlatform.buildRustPackage { buildInputs = [ openssl - ] ++ lib.optionals (stdenv.isDarwin) [ + ] ++ lib.optionals (stdenv.hostPlatform.isDarwin) [ Security SystemConfiguration ]; diff --git a/pkgs/development/tools/earthly/default.nix b/pkgs/development/tools/earthly/default.nix index 576c3edd405c..e36971390d4f 100644 --- a/pkgs/development/tools/earthly/default.nix +++ b/pkgs/development/tools/earthly/default.nix @@ -23,7 +23,7 @@ buildGoModule rec { "-X main.DefaultBuildkitdImage=docker.io/earthly/buildkitd:v${version}" "-X main.GitSha=v${version}" "-X main.DefaultInstallationName=earthly" - ] ++ lib.optionals stdenv.isLinux [ + ] ++ lib.optionals stdenv.hostPlatform.isLinux [ "-extldflags '-static'" ]; diff --git a/pkgs/development/tools/electron/binary/generic.nix b/pkgs/development/tools/electron/binary/generic.nix index 60255d21bcb1..39f1d1011b33 100644 --- a/pkgs/development/tools/electron/binary/generic.nix +++ b/pkgs/development/tools/electron/binary/generic.nix @@ -166,5 +166,5 @@ in stdenv.mkDerivation (finalAttrs: lib.recursiveUpdate (common stdenv.hostPlatform) - ((if stdenv.isDarwin then darwin else linux) finalAttrs) + ((if stdenv.hostPlatform.isDarwin then darwin else linux) finalAttrs) ) diff --git a/pkgs/development/tools/electron/chromedriver/generic.nix b/pkgs/development/tools/electron/chromedriver/generic.nix index edd648713e27..1eb1a8d870b8 100644 --- a/pkgs/development/tools/electron/chromedriver/generic.nix +++ b/pkgs/development/tools/electron/chromedriver/generic.nix @@ -92,5 +92,5 @@ let in stdenv.mkDerivation ( (common stdenv.hostPlatform) // - (if stdenv.isDarwin then darwin else linux) + (if stdenv.hostPlatform.isDarwin then darwin else linux) ) diff --git a/pkgs/development/tools/espup/default.nix b/pkgs/development/tools/espup/default.nix index ca650be0e386..336bdcdf5229 100644 --- a/pkgs/development/tools/espup/default.nix +++ b/pkgs/development/tools/espup/default.nix @@ -36,7 +36,7 @@ rustPlatform.buildRustPackage rec { openssl xz zstd - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.CoreFoundation darwin.apple_sdk.frameworks.Security darwin.apple_sdk.frameworks.SystemConfiguration diff --git a/pkgs/development/tools/explain/default.nix b/pkgs/development/tools/explain/default.nix index 66334b12d996..fb25deacb46c 100644 --- a/pkgs/development/tools/explain/default.nix +++ b/pkgs/development/tools/explain/default.nix @@ -44,6 +44,6 @@ stdenv.mkDerivation rec { maintainers = with maintainers; [ McSinyx ]; platforms = platforms.unix; # never built on aarch64-linux since first introduction in nixpkgs - broken = stdenv.isLinux && stdenv.isAarch64; + broken = stdenv.hostPlatform.isLinux && stdenv.hostPlatform.isAarch64; }; } diff --git a/pkgs/development/tools/fermyon-spin/default.nix b/pkgs/development/tools/fermyon-spin/default.nix index 17c525d801a5..aa6b1247b117 100644 --- a/pkgs/development/tools/fermyon-spin/default.nix +++ b/pkgs/development/tools/fermyon-spin/default.nix @@ -39,7 +39,7 @@ in stdenv.mkDerivation rec { sourceRoot = "."; - nativeBuildInputs = lib.optionals stdenv.isLinux [ + nativeBuildInputs = lib.optionals stdenv.hostPlatform.isLinux [ autoPatchelfHook ]; diff --git a/pkgs/development/tools/firebase-tools/default.nix b/pkgs/development/tools/firebase-tools/default.nix index 8222c1df9ea4..ccfb5f6e895f 100644 --- a/pkgs/development/tools/firebase-tools/default.nix +++ b/pkgs/development/tools/firebase-tools/default.nix @@ -25,7 +25,7 @@ buildNpmPackage rec { nativeBuildInputs = [ python3 - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ xcbuild ]; diff --git a/pkgs/development/tools/fnm/default.nix b/pkgs/development/tools/fnm/default.nix index 9aafdb4e02c1..145da019b6f6 100644 --- a/pkgs/development/tools/fnm/default.nix +++ b/pkgs/development/tools/fnm/default.nix @@ -21,7 +21,7 @@ rustPlatform.buildRustPackage rec { nativeBuildInputs = [ installShellFiles ]; - buildInputs = lib.optionals stdenv.isDarwin [ DiskArbitration Foundation Security ]; + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ DiskArbitration Foundation Security ]; cargoHash = "sha256-b15m5DjTDNWJBHOaKSEMwkO/o+0mV+JMBDBurml7xOs="; diff --git a/pkgs/development/tools/functiontrace-server/default.nix b/pkgs/development/tools/functiontrace-server/default.nix index abacb1d9f9d4..efb5026e069e 100644 --- a/pkgs/development/tools/functiontrace-server/default.nix +++ b/pkgs/development/tools/functiontrace-server/default.nix @@ -11,7 +11,7 @@ rustPlatform.buildRustPackage rec { cargoHash = "sha256-3tLjW7yiS1dNsV81KUZbfN2pvYT9kqiC62nWFid2NH8="; - buildInputs = lib.optionals stdenv.isDarwin + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.CoreFoundation ]; meta = with lib; { diff --git a/pkgs/development/tools/garble/default.nix b/pkgs/development/tools/garble/default.nix index 438d83405988..0735e283d6db 100644 --- a/pkgs/development/tools/garble/default.nix +++ b/pkgs/development/tools/garble/default.nix @@ -20,7 +20,7 @@ buildGoModule rec { # Used for some of the tests. nativeCheckInputs = [git]; - preBuild = lib.optionalString (!stdenv.isx86_64) '' + preBuild = lib.optionalString (!stdenv.hostPlatform.isx86_64) '' # The test assumex amd64 assembly rm testdata/script/asm.txtar ''; @@ -30,6 +30,6 @@ buildGoModule rec { homepage = "https://github.com/burrowers/garble/"; maintainers = with lib.maintainers; [ davhau ]; license = lib.licenses.bsd3; - broken = stdenv.isDarwin; # never built on Hydra https://hydra.nixos.org/job/nixpkgs/trunk/garble.x86_64-darwin + broken = stdenv.hostPlatform.isDarwin; # never built on Hydra https://hydra.nixos.org/job/nixpkgs/trunk/garble.x86_64-darwin }; } diff --git a/pkgs/development/tools/geckodriver/default.nix b/pkgs/development/tools/geckodriver/default.nix index f62ab97c1bee..7af8747ef8c4 100644 --- a/pkgs/development/tools/geckodriver/default.nix +++ b/pkgs/development/tools/geckodriver/default.nix @@ -19,7 +19,7 @@ rustPlatform.buildRustPackage rec { cargoHash = "sha256-gopI5iOCSzD23mvOues76WIiBtpNf9A6X9NoOULm6Qo="; - buildInputs = lib.optionals stdenv.isDarwin [ libiconv Security ]; + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ libiconv Security ]; meta = with lib; { description = "Proxy for using W3C WebDriver-compatible clients to interact with Gecko-based browsers"; diff --git a/pkgs/development/tools/git-ps-rs/default.nix b/pkgs/development/tools/git-ps-rs/default.nix index 667cafdf67a5..089c03268931 100644 --- a/pkgs/development/tools/git-ps-rs/default.nix +++ b/pkgs/development/tools/git-ps-rs/default.nix @@ -23,7 +23,7 @@ rustPlatform.buildRustPackage rec { nativeBuildInputs = [ pkg-config ]; - buildInputs = [ openssl dbus ] ++ lib.optionals stdenv.isDarwin [ Security ]; + buildInputs = [ openssl dbus ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ Security ]; meta = with lib; { description = "Tool for working with a stack of patches"; diff --git a/pkgs/development/tools/github-copilot-intellij-agent/default.nix b/pkgs/development/tools/github-copilot-intellij-agent/default.nix index c919e2de6281..13c28ca5b71a 100644 --- a/pkgs/development/tools/github-copilot-intellij-agent/default.nix +++ b/pkgs/development/tools/github-copilot-intellij-agent/default.nix @@ -19,7 +19,7 @@ stdenv.mkDerivation rec { mkdir -p $out/bin unzip -p $src github-copilot-intellij/copilot-agent/bin/copilot-agent-${ - if stdenv.isDarwin then (if stdenv.isAarch64 then "macos-arm64" else "macos") else "linux" + if stdenv.hostPlatform.isDarwin then (if stdenv.hostPlatform.isAarch64 then "macos-arm64" else "macos") else "linux" } | install -m755 /dev/stdin $out/bin/copilot-agent runHook postInstall diff --git a/pkgs/development/tools/glade/default.nix b/pkgs/development/tools/glade/default.nix index da706dcdb30a..2658cbe241fe 100644 --- a/pkgs/development/tools/glade/default.nix +++ b/pkgs/development/tools/glade/default.nix @@ -9,7 +9,7 @@ , gtk3 , glib , gjs -, enableWebkit2gtk ? stdenv.isLinux +, enableWebkit2gtk ? stdenv.hostPlatform.isLinux , webkitgtk_4_1 , gobject-introspection , wrapGAppsHook3 diff --git a/pkgs/development/tools/gllvm/default.nix b/pkgs/development/tools/gllvm/default.nix index b1350fba7c4e..26b820f26425 100644 --- a/pkgs/development/tools/gllvm/default.nix +++ b/pkgs/development/tools/gllvm/default.nix @@ -16,7 +16,7 @@ buildGoModule { nativeCheckInputs = with llvmPackages; [ clang llvm - ] ++ lib.optionals stdenv.isDarwin [ getconf ]; + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ getconf ]; meta = with lib; { homepage = "https://github.com/SRI-CSL/gllvm"; diff --git a/pkgs/development/tools/glslviewer/default.nix b/pkgs/development/tools/glslviewer/default.nix index 809a674a36a9..0d950d24bf60 100644 --- a/pkgs/development/tools/glslviewer/default.nix +++ b/pkgs/development/tools/glslviewer/default.nix @@ -39,7 +39,7 @@ stdenv.mkDerivation rec { ncurses ffmpeg ] - ++ lib.optional stdenv.isDarwin Cocoa; + ++ lib.optional stdenv.hostPlatform.isDarwin Cocoa; meta = with lib; { description = "Live GLSL coding renderer"; @@ -49,6 +49,6 @@ stdenv.mkDerivation rec { platforms = platforms.unix; mainProgram = "glslViewer"; # never built on aarch64-darwin since first introduction in nixpkgs - broken = stdenv.isDarwin; + broken = stdenv.hostPlatform.isDarwin; }; } diff --git a/pkgs/development/tools/gptcommit/default.nix b/pkgs/development/tools/gptcommit/default.nix index f1bd3376e160..2c97533a2696 100644 --- a/pkgs/development/tools/gptcommit/default.nix +++ b/pkgs/development/tools/gptcommit/default.nix @@ -30,8 +30,8 @@ rustPlatform.buildRustPackage { # 0.5.6 release has failing tests doCheck = false; - buildInputs = lib.optionals stdenv.isDarwin [ Security SystemConfiguration ] - ++ lib.optionals stdenv.isLinux [ openssl ]; + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ Security SystemConfiguration ] + ++ lib.optionals stdenv.hostPlatform.isLinux [ openssl ]; passthru = { updateScript = nix-update-script { }; diff --git a/pkgs/development/tools/graphql-client/default.nix b/pkgs/development/tools/graphql-client/default.nix index 241e1ef95faa..8fe6ff5bcf08 100644 --- a/pkgs/development/tools/graphql-client/default.nix +++ b/pkgs/development/tools/graphql-client/default.nix @@ -17,7 +17,7 @@ rustPlatform.buildRustPackage rec { ]; buildInputs = [ openssl - ] ++ lib.optionals stdenv.isDarwin [ Security ]; + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ Security ]; meta = with lib; { description = "GraphQL tool for Rust projects"; diff --git a/pkgs/development/tools/hobbes/default.nix b/pkgs/development/tools/hobbes/default.nix index d4a76bf29183..f6d8c0fb8624 100644 --- a/pkgs/development/tools/hobbes/default.nix +++ b/pkgs/development/tools/hobbes/default.nix @@ -58,7 +58,7 @@ llvmPackages.stdenv.mkDerivation { checkTarget = "test"; meta = with lib; { - broken = stdenv.isDarwin; + broken = stdenv.hostPlatform.isDarwin; description = "Language and an embedded JIT compiler"; longDescription = '' Hobbes is a a language, embedded compiler, and runtime for efficient diff --git a/pkgs/development/tools/hors/default.nix b/pkgs/development/tools/hors/default.nix index 4ecea68c18ec..03f53f1eabaf 100644 --- a/pkgs/development/tools/hors/default.nix +++ b/pkgs/development/tools/hors/default.nix @@ -13,7 +13,7 @@ rustPlatform.buildRustPackage rec { cargoHash = "sha256-1PB/JvgfC6qABI+cIePqtsSlZXPqMGQIay9SCXJkV9o="; - buildInputs = lib.optional stdenv.isDarwin Security; + buildInputs = lib.optional stdenv.hostPlatform.isDarwin Security; # requires network access doCheck = false; diff --git a/pkgs/development/tools/hotdoc/default.nix b/pkgs/development/tools/hotdoc/default.nix index 11d9cf11b152..8dcee1b730dd 100644 --- a/pkgs/development/tools/hotdoc/default.nix +++ b/pkgs/development/tools/hotdoc/default.nix @@ -91,7 +91,7 @@ buildPythonApplication rec { disabledTests = [ # Test does not correctly handle path normalization for test comparison "test_cli_overrides" - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ # Test does not correctly handle absolute /home paths on Darwin (even fake ones) "test_index" ]; diff --git a/pkgs/development/tools/htmlq/default.nix b/pkgs/development/tools/htmlq/default.nix index 7e55740d03ba..e9767ca60029 100644 --- a/pkgs/development/tools/htmlq/default.nix +++ b/pkgs/development/tools/htmlq/default.nix @@ -13,7 +13,7 @@ rustPlatform.buildRustPackage rec { cargoHash = "sha256-r9EnQQPGpPIcNYb1eqGrMnRdh0snIa5iVsTYTI+YErY="; - buildInputs = lib.optionals stdenv.isDarwin [ Security ]; + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ Security ]; doCheck = false; diff --git a/pkgs/development/tools/jaq/default.nix b/pkgs/development/tools/jaq/default.nix index 8304303d301f..4bd2f8cb1a3f 100644 --- a/pkgs/development/tools/jaq/default.nix +++ b/pkgs/development/tools/jaq/default.nix @@ -18,7 +18,7 @@ rustPlatform.buildRustPackage rec { cargoHash = "sha256-7MK0iLBpjvWE7UH5Tb3qIm2XnEVsAvBy34Ed4wHagZQ="; - buildInputs = lib.optionals stdenv.isDarwin [ + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.Security ]; diff --git a/pkgs/development/tools/java/java-language-server/default.nix b/pkgs/development/tools/java/java-language-server/default.nix index 723937f8f535..fa6bcbf10f5b 100644 --- a/pkgs/development/tools/java/java-language-server/default.nix +++ b/pkgs/development/tools/java/java-language-server/default.nix @@ -5,9 +5,9 @@ let platform = - if stdenv.isLinux then "linux" - else if stdenv.isDarwin then "mac" - else if stdenv.isWindows then "windows" + if stdenv.hostPlatform.isLinux then "linux" + else if stdenv.hostPlatform.isDarwin then "mac" + else if stdenv.hostPlatform.isWindows then "windows" else throw "unsupported platform"; in maven.buildMavenPackage rec { @@ -31,7 +31,7 @@ maven.buildMavenPackage rec { dontConfigure = true; preBuild = '' jlink \ - ${lib.optionalString (!stdenv.isDarwin) "--module-path './jdks/${platform}/jdk-13/jmods'"} \ + ${lib.optionalString (!stdenv.hostPlatform.isDarwin) "--module-path './jdks/${platform}/jdk-13/jmods'"} \ --add-modules java.base,java.compiler,java.logging,java.sql,java.xml,jdk.compiler,jdk.jdi,jdk.unsupported,jdk.zipfs \ --output dist/${platform} \ --no-header-files \ diff --git a/pkgs/development/tools/java/jprofiler/default.nix b/pkgs/development/tools/java/jprofiler/default.nix index 7f74d8665a80..400c339475fe 100644 --- a/pkgs/development/tools/java/jprofiler/default.nix +++ b/pkgs/development/tools/java/jprofiler/default.nix @@ -26,7 +26,7 @@ let maintainers = with maintainers; [ catap ]; }; - src = if stdenv.isLinux then fetchurl { + src = if stdenv.hostPlatform.isLinux then fetchurl { url = "https://download-gcdn.ej-technologies.com/jprofiler/jprofiler_linux_${lib.replaceStrings ["."] ["_"] version}.tar.gz"; hash = "sha256-orjBSaC7NvKcak+RSEa9V05oL3EZIBnp7TyaX/8XFyg="; } else fetchurl { @@ -99,4 +99,4 @@ let meta = meta // { platforms = lib.platforms.darwin; }; }; in -if stdenv.isDarwin then darwin else linux +if stdenv.hostPlatform.isDarwin then darwin else linux diff --git a/pkgs/development/tools/jless/default.nix b/pkgs/development/tools/jless/default.nix index e704ec994eed..0aba5e3f23f1 100644 --- a/pkgs/development/tools/jless/default.nix +++ b/pkgs/development/tools/jless/default.nix @@ -13,11 +13,11 @@ rustPlatform.buildRustPackage rec { cargoHash = "sha256-sas94liAOSIirIJGdexdApXic2gWIBDT4uJFRM3qMw0="; - nativeBuildInputs = lib.optionals stdenv.isLinux [ python3 ]; + nativeBuildInputs = lib.optionals stdenv.hostPlatform.isLinux [ python3 ]; buildInputs = [ ] - ++ lib.optionals stdenv.isDarwin [ AppKit ] - ++ lib.optionals stdenv.isLinux [ libxcb ]; + ++ lib.optionals stdenv.hostPlatform.isDarwin [ AppKit ] + ++ lib.optionals stdenv.hostPlatform.isLinux [ libxcb ]; meta = with lib; { description = "Command-line pager for JSON data"; diff --git a/pkgs/development/tools/jq/default.nix b/pkgs/development/tools/jq/default.nix index 8d4ec0d1c5a6..1443ca78371a 100644 --- a/pkgs/development/tools/jq/default.nix +++ b/pkgs/development/tools/jq/default.nix @@ -21,7 +21,7 @@ stdenv.mkDerivation rec { outputs = [ "bin" "doc" "man" "dev" "lib" "out" ]; # https://github.com/jqlang/jq/issues/2871 - postPatch = lib.optionalString stdenv.isFreeBSD '' + postPatch = lib.optionalString stdenv.hostPlatform.isFreeBSD '' substituteInPlace Makefile.am --replace-fail "tests/mantest" "" --replace-fail "tests/optionaltest" "" ''; @@ -47,7 +47,7 @@ stdenv.mkDerivation rec { # Otherwise, configure will detect that they’re in libm, but the build will fail # with clang 16+ due to calls to undeclared functions. # This is fixed upstream and can be removed once jq is updated (to 1.7 or an unstable release). - env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.isDarwin (toString [ + env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.hostPlatform.isDarwin (toString [ "-D_REENTRANT=1" "-D_DARWIN_C_SOURCE=1" ]); @@ -59,7 +59,7 @@ stdenv.mkDerivation rec { "--mandir=\${man}/share/man" ] ++ lib.optional (!onigurumaSupport) "--with-oniguruma=no" # jq is linked to libjq: - ++ lib.optional (!stdenv.isDarwin) "LDFLAGS=-Wl,-rpath,\\\${libdir}"; + ++ lib.optional (!stdenv.hostPlatform.isDarwin) "LDFLAGS=-Wl,-rpath,\\\${libdir}"; # Break the dependency cycle: $dev refers to $bin via propagated-build-outputs, and # $bin refers to $dev because of https://github.com/jqlang/jq/commit/583e4a27188a2db097dd043dd203b9c106bba100 diff --git a/pkgs/development/tools/kafka-delta-ingest/default.nix b/pkgs/development/tools/kafka-delta-ingest/default.nix index 8dd3cf1299cb..a5fea071b48e 100644 --- a/pkgs/development/tools/kafka-delta-ingest/default.nix +++ b/pkgs/development/tools/kafka-delta-ingest/default.nix @@ -42,7 +42,7 @@ rustPlatform.buildRustPackage rec { doCheck = false; meta = with lib; { - broken = stdenv.isDarwin; + broken = stdenv.hostPlatform.isDarwin; description = "Highly efficient daemon for streaming data from Kafka into Delta Lake"; mainProgram = "kafka-delta-ingest"; homepage = "https://github.com/delta-io/kafka-delta-ingest"; diff --git a/pkgs/development/tools/kdash/default.nix b/pkgs/development/tools/kdash/default.nix index 13edb7bd1fed..aceddd467b02 100644 --- a/pkgs/development/tools/kdash/default.nix +++ b/pkgs/development/tools/kdash/default.nix @@ -24,7 +24,7 @@ rustPlatform.buildRustPackage rec { nativeBuildInputs = [ perl python3 pkg-config ]; buildInputs = [ openssl xorg.xcbutil ] - ++ lib.optional stdenv.isDarwin AppKit; + ++ lib.optional stdenv.hostPlatform.isDarwin AppKit; cargoHash = "sha256-jm0UCKDy6TrogMPavB86lvk8yKZXubTGGbApk+oP2RQ="; diff --git a/pkgs/development/tools/kubie/default.nix b/pkgs/development/tools/kubie/default.nix index 42f19d97e4ff..18b429e2d434 100644 --- a/pkgs/development/tools/kubie/default.nix +++ b/pkgs/development/tools/kubie/default.nix @@ -15,7 +15,7 @@ rustPlatform.buildRustPackage rec { nativeBuildInputs = [ installShellFiles ]; - buildInputs = lib.optionals stdenv.isDarwin [ Security ]; + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ Security ]; postInstall = '' installShellCompletion completion/kubie.bash diff --git a/pkgs/development/tools/language-servers/lua-language-server/default.nix b/pkgs/development/tools/language-servers/lua-language-server/default.nix index 0bbab7942e8a..d187558a1c10 100644 --- a/pkgs/development/tools/language-servers/lua-language-server/default.nix +++ b/pkgs/development/tools/language-servers/lua-language-server/default.nix @@ -27,7 +27,7 @@ stdenv.mkDerivation (finalAttrs: { makeWrapper ]; - buildInputs = lib.optionals stdenv.isDarwin [ + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ CoreFoundation Foundation ditto @@ -41,7 +41,7 @@ stdenv.mkDerivation (finalAttrs: { pushd 3rd/luamake '' - + lib.optionalString stdenv.isDarwin '' + + lib.optionalString stdenv.hostPlatform.isDarwin '' # This package uses the program clang for C and C++ files. The language # is selected via the command line argument -std, but this do not work # in combination with the nixpkgs clang wrapper. Therefor we have to @@ -55,7 +55,7 @@ stdenv.mkDerivation (finalAttrs: { -e '/cxx_/s,$cc,clang++,' ''; - ninjaFlags = [ "-fcompile/ninja/${if stdenv.isDarwin then "macos" else "linux"}.ninja" ]; + ninjaFlags = [ "-fcompile/ninja/${if stdenv.hostPlatform.isDarwin then "macos" else "linux"}.ninja" ]; postBuild = '' popd diff --git a/pkgs/development/tools/language-servers/rune-languageserver/default.nix b/pkgs/development/tools/language-servers/rune-languageserver/default.nix index df2d91fa7e84..41977f89e909 100644 --- a/pkgs/development/tools/language-servers/rune-languageserver/default.nix +++ b/pkgs/development/tools/language-servers/rune-languageserver/default.nix @@ -16,7 +16,7 @@ rustPlatform.buildRustPackage rec { cargoHash = "sha256-GlzT7lN9iCNiPFIjhL/UfqohgtOwDaIeTVEWOyaeicM="; - buildInputs = lib.optionals stdenv.isDarwin [ + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.Security ]; diff --git a/pkgs/development/tools/language-servers/vala-language-server/default.nix b/pkgs/development/tools/language-servers/vala-language-server/default.nix index 0a8b3ef124a5..9faf60024c5d 100644 --- a/pkgs/development/tools/language-servers/vala-language-server/default.nix +++ b/pkgs/development/tools/language-servers/vala-language-server/default.nix @@ -34,7 +34,7 @@ stdenv.mkDerivation rec { ninja pkg-config scdoc - ] ++ lib.optionals stdenv.isLinux [ + ] ++ lib.optionals stdenv.hostPlatform.isLinux [ # GNOME Builder Plugin gnome-builder ]; diff --git a/pkgs/development/tools/language-servers/vscode-langservers-extracted/default.nix b/pkgs/development/tools/language-servers/vscode-langservers-extracted/default.nix index 4b7f571ead57..03dec7c8c2fb 100644 --- a/pkgs/development/tools/language-servers/vscode-langservers-extracted/default.nix +++ b/pkgs/development/tools/language-servers/vscode-langservers-extracted/default.nix @@ -23,7 +23,7 @@ buildNpmPackage rec { buildPhase = let extensions = - if stdenv.isDarwin + if stdenv.hostPlatform.isDarwin then "../VSCodium.app/Contents/Resources/app/extensions" else "../resources/app/extensions"; in diff --git a/pkgs/development/tools/ldid/default.nix b/pkgs/development/tools/ldid/default.nix index 38b252781c7e..c3a988885cec 100644 --- a/pkgs/development/tools/ldid/default.nix +++ b/pkgs/development/tools/ldid/default.nix @@ -24,7 +24,7 @@ stdenv.mkDerivation rec { libplist libxml2 openssl - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ CoreFoundation Security ]; @@ -33,7 +33,7 @@ stdenv.mkDerivation rec { "-lcrypto" "-lplist-2.0" "-lxml2" - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ "-framework CoreFoundation" "-framework Security" ]; diff --git a/pkgs/development/tools/libsigrok/default.nix b/pkgs/development/tools/libsigrok/default.nix index ca9aee9c4592..c93c27722ec2 100644 --- a/pkgs/development/tools/libsigrok/default.nix +++ b/pkgs/development/tools/libsigrok/default.nix @@ -33,7 +33,7 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ autoreconfHook doxygen pkg-config python ]; buildInputs = [ libzip glib libusb1 libftdi1 check libserialport glibmm hidapi - ] ++ lib.optionals stdenv.isLinux [ libieee1284 bluez ]; + ] ++ lib.optionals stdenv.hostPlatform.isLinux [ libieee1284 bluez ]; strictDeps = true; diff --git a/pkgs/development/tools/mars-mips/default.nix b/pkgs/development/tools/mars-mips/default.nix index 66b9684175c3..d5489e7e2537 100644 --- a/pkgs/development/tools/mars-mips/default.nix +++ b/pkgs/development/tools/mars-mips/default.nix @@ -26,7 +26,7 @@ stdenv.mkDerivation (finalAttrs: { copyDesktopItems unzip imagemagick - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ desktopToDarwinBundle ]; diff --git a/pkgs/development/tools/minizinc/ide.nix b/pkgs/development/tools/minizinc/ide.nix index 45fd8da44b5e..46025c0f9bb0 100644 --- a/pkgs/development/tools/minizinc/ide.nix +++ b/pkgs/development/tools/minizinc/ide.nix @@ -1,7 +1,7 @@ { lib, stdenv, fetchFromGitHub, qtbase, qmake, qtwebsockets, minizinc, makeWrapper, Cocoa }: let - executableLoc = if stdenv.isDarwin then "$out/Applications/MiniZincIDE.app/Contents/MacOS/MiniZincIDE" else "$out/bin/MiniZincIDE"; + executableLoc = if stdenv.hostPlatform.isDarwin then "$out/Applications/MiniZincIDE.app/Contents/MacOS/MiniZincIDE" else "$out/bin/MiniZincIDE"; in stdenv.mkDerivation rec { pname = "minizinc-ide"; @@ -16,7 +16,7 @@ stdenv.mkDerivation rec { }; nativeBuildInputs = [ qmake makeWrapper ]; - buildInputs = [ qtbase qtwebsockets ] ++ lib.optionals stdenv.isDarwin [ Cocoa ]; + buildInputs = [ qtbase qtwebsockets ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ Cocoa ]; sourceRoot = "${src.name}/MiniZincIDE"; diff --git a/pkgs/development/tools/misc/autoconf/2.64.nix b/pkgs/development/tools/misc/autoconf/2.64.nix index daf026dc3a5b..c505cc694805 100644 --- a/pkgs/development/tools/misc/autoconf/2.64.nix +++ b/pkgs/development/tools/misc/autoconf/2.64.nix @@ -17,7 +17,7 @@ stdenv.mkDerivation rec { # http://thread.gmane.org/gmane.comp.sysutils.autoconf.bugs/6822 for # details. # There are many test failures on `i386-pc-solaris2.11'. - #doCheck = ((!stdenv.isCygwin) && (!stdenv.isSunOS)); + #doCheck = ((!stdenv.hostPlatform.isCygwin) && (!stdenv.hostPlatform.isSunOS)); doCheck = false; # Don't fixup "#! /bin/sh" in Autoconf, otherwise it will use the diff --git a/pkgs/development/tools/misc/autoconf/2.69.nix b/pkgs/development/tools/misc/autoconf/2.69.nix index 870b0ae1d34a..bdd534055a5a 100644 --- a/pkgs/development/tools/misc/autoconf/2.69.nix +++ b/pkgs/development/tools/misc/autoconf/2.69.nix @@ -16,7 +16,7 @@ stdenv.mkDerivation rec { # http://thread.gmane.org/gmane.comp.sysutils.autoconf.bugs/6822 for # details. # There are many test failures on `i386-pc-solaris2.11'. - #doCheck = ((!stdenv.isCygwin) && (!stdenv.isSunOS)); + #doCheck = ((!stdenv.hostPlatform.isCygwin) && (!stdenv.hostPlatform.isSunOS)); doCheck = false; # Don't fixup "#! /bin/sh" in Autoconf, otherwise it will use the diff --git a/pkgs/development/tools/misc/autoconf/2.71.nix b/pkgs/development/tools/misc/autoconf/2.71.nix index 1fcb819bd4b7..bfc24892ecd9 100644 --- a/pkgs/development/tools/misc/autoconf/2.71.nix +++ b/pkgs/development/tools/misc/autoconf/2.71.nix @@ -35,7 +35,7 @@ stdenv.mkDerivation rec { # http://thread.gmane.org/gmane.comp.sysutils.autoconf.bugs/6822 for # details. # There are many test failures on `i386-pc-solaris2.11'. - doCheck = ((!stdenv.isCygwin) && (!stdenv.isSunOS)); + doCheck = ((!stdenv.hostPlatform.isCygwin) && (!stdenv.hostPlatform.isSunOS)); # Don't fixup "#! /bin/sh" in Autoconf, otherwise it will use the # "fixed" path in generated files! diff --git a/pkgs/development/tools/misc/autoconf/default.nix b/pkgs/development/tools/misc/autoconf/default.nix index 8039e36a4f20..9f4ee80d1a76 100644 --- a/pkgs/development/tools/misc/autoconf/default.nix +++ b/pkgs/development/tools/misc/autoconf/default.nix @@ -30,7 +30,7 @@ stdenv.mkDerivation rec { # http://thread.gmane.org/gmane.comp.sysutils.autoconf.bugs/6822 for # details. # There are many test failures on `i386-pc-solaris2.11'. - doCheck = ((!stdenv.isCygwin) && (!stdenv.isSunOS)); + doCheck = ((!stdenv.hostPlatform.isCygwin) && (!stdenv.hostPlatform.isSunOS)); # Don't fixup "#! /bin/sh" in Autoconf, otherwise it will use the # "fixed" path in generated files! diff --git a/pkgs/development/tools/misc/autogen/default.nix b/pkgs/development/tools/misc/autogen/default.nix index 3cb6760842f5..e43571666719 100644 --- a/pkgs/development/tools/misc/autogen/default.nix +++ b/pkgs/development/tools/misc/autogen/default.nix @@ -92,7 +92,7 @@ stdenv.mkDerivation rec { #"MAKEINFO=${buildPackages.texinfo}/bin/makeinfo" ] # See: https://sourceforge.net/p/autogen/bugs/187/ - ++ lib.optionals stdenv.isDarwin [ "ac_cv_func_utimensat=no" ]; + ++ lib.optionals stdenv.hostPlatform.isDarwin [ "ac_cv_func_utimensat=no" ]; #doCheck = true; # not reliable diff --git a/pkgs/development/tools/misc/binutils/2.38/libbfd.nix b/pkgs/development/tools/misc/binutils/2.38/libbfd.nix index 08cf35970a6c..313b610560da 100644 --- a/pkgs/development/tools/misc/binutils/2.38/libbfd.nix +++ b/pkgs/development/tools/misc/binutils/2.38/libbfd.nix @@ -32,7 +32,7 @@ stdenv.mkDerivation { strictDeps = true; nativeBuildInputs = [ autoreconfHook bison ]; - buildInputs = [ libiberty zlib ] ++ lib.optionals stdenv.isDarwin [ libintl ]; + buildInputs = [ libiberty zlib ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ libintl ]; configurePlatforms = [ "build" "host" ]; configureFlags = [ diff --git a/pkgs/development/tools/misc/blackfire/default.nix b/pkgs/development/tools/misc/blackfire/default.nix index 2640c67a53f4..e3114ea8bd3d 100644 --- a/pkgs/development/tools/misc/blackfire/default.nix +++ b/pkgs/development/tools/misc/blackfire/default.nix @@ -14,7 +14,7 @@ stdenv.mkDerivation rec { src = passthru.sources.${stdenv.hostPlatform.system} or (throw "Unsupported platform for blackfire: ${stdenv.hostPlatform.system}"); - nativeBuildInputs = lib.optionals stdenv.isLinux [ + nativeBuildInputs = lib.optionals stdenv.hostPlatform.isLinux [ dpkg ]; @@ -23,7 +23,7 @@ stdenv.mkDerivation rec { installPhase = '' runHook preInstall - if ${ lib.boolToString stdenv.isLinux } + if ${ lib.boolToString stdenv.hostPlatform.isLinux } then dpkg-deb -x $src $out mv $out/usr/* $out diff --git a/pkgs/development/tools/misc/blackfire/php-probe.nix b/pkgs/development/tools/misc/blackfire/php-probe.nix index 4a292f6079bc..c5b5aae3b96e 100644 --- a/pkgs/development/tools/misc/blackfire/php-probe.nix +++ b/pkgs/development/tools/misc/blackfire/php-probe.nix @@ -81,7 +81,7 @@ stdenv.mkDerivation (finalAttrs: { inherit system phpMajor; }; - nativeBuildInputs = lib.optionals stdenv.isLinux [ + nativeBuildInputs = lib.optionals stdenv.hostPlatform.isLinux [ autoPatchelfHook ]; diff --git a/pkgs/development/tools/misc/creduce/default.nix b/pkgs/development/tools/misc/creduce/default.nix index 7adc78013f47..a8b6acb1e3f9 100644 --- a/pkgs/development/tools/misc/creduce/default.nix +++ b/pkgs/development/tools/misc/creduce/default.nix @@ -39,7 +39,7 @@ stdenv.mkDerivation rec { # On Linux, c-reduce's preferred way to reason about # the cpu architecture/topology is to use 'lscpu', # so let's make sure it knows where to find it: - + lib.optionalString stdenv.isLinux '' + + lib.optionalString stdenv.hostPlatform.isLinux '' substituteInPlace creduce/creduce_utils.pm --replace \ lscpu ${util-linux}/bin/lscpu ''; diff --git a/pkgs/development/tools/misc/ddd/default.nix b/pkgs/development/tools/misc/ddd/default.nix index 0321b24de321..71a64d4b90ce 100644 --- a/pkgs/development/tools/misc/ddd/default.nix +++ b/pkgs/development/tools/misc/ddd/default.nix @@ -25,7 +25,7 @@ stdenv.mkDerivation (finalAttrs: { --replace-fail 'debuggerCommand:' 'debuggerCommand: ${gdb}/bin/gdb' ''; - nativeBuildInputs = [ imagemagick ] ++ lib.optionals stdenv.isDarwin [ desktopToDarwinBundle ]; + nativeBuildInputs = [ imagemagick ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ desktopToDarwinBundle ]; buildInputs = [ motif @@ -36,7 +36,7 @@ stdenv.mkDerivation (finalAttrs: { # ioctl is not found without this flag. fixed in next release # Upstream issue ref: https://savannah.gnu.org/bugs/index.php?64188 - env = lib.optionalAttrs stdenv.isDarwin { NIX_CFLAGS_COMPILE = "-DHAVE_SYS_IOCTL_H"; }; + env = lib.optionalAttrs stdenv.hostPlatform.isDarwin { NIX_CFLAGS_COMPILE = "-DHAVE_SYS_IOCTL_H"; }; configureFlags = [ "--enable-builtin-manual" diff --git a/pkgs/development/tools/misc/dura/default.nix b/pkgs/development/tools/misc/dura/default.nix index 34b5127e118e..34b966607a74 100644 --- a/pkgs/development/tools/misc/dura/default.nix +++ b/pkgs/development/tools/misc/dura/default.nix @@ -21,7 +21,7 @@ rustPlatform.buildRustPackage rec { buildInputs = [ openssl - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ Security ]; diff --git a/pkgs/development/tools/misc/ezno/default.nix b/pkgs/development/tools/misc/ezno/default.nix index 559622bf7da2..af035e7565ec 100644 --- a/pkgs/development/tools/misc/ezno/default.nix +++ b/pkgs/development/tools/misc/ezno/default.nix @@ -18,7 +18,7 @@ rustPlatform.buildRustPackage rec { cargoHash = "sha256-noMfKx6BsmWhAVI4r8LlC961Uwogv1JGMYSrNGlLGPQ="; - buildInputs = lib.optionals stdenv.isDarwin [ + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.CoreServices ]; diff --git a/pkgs/development/tools/misc/fswatch/default.nix b/pkgs/development/tools/misc/fswatch/default.nix index afeac90c58c0..05fbd759ffca 100644 --- a/pkgs/development/tools/misc/fswatch/default.nix +++ b/pkgs/development/tools/misc/fswatch/default.nix @@ -20,7 +20,7 @@ stdenv.mkDerivation rec { sha256 = "sha256-gVYDvda+6ZJkShJXUxUEVxq4enkRrhdvlTTxYWq4Aho="; }; - nativeBuildInputs = [ autoreconfHook makeWrapper ] ++ lib.optionals stdenv.isDarwin [ CoreServices ]; + nativeBuildInputs = [ autoreconfHook makeWrapper ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ CoreServices ]; buildInputs = [ gettext libtool texinfo ]; enableParallelBuilding = true; diff --git a/pkgs/development/tools/misc/funzzy/default.nix b/pkgs/development/tools/misc/funzzy/default.nix index c05def18404b..c1f4b642a86f 100644 --- a/pkgs/development/tools/misc/funzzy/default.nix +++ b/pkgs/development/tools/misc/funzzy/default.nix @@ -18,7 +18,7 @@ rustPlatform.buildRustPackage rec { cargoHash = "sha256-eq5d6oHWKip9K+9yszLXW+JHtzYzrThXfqoZGMhnSHk="; - buildInputs = lib.optionals stdenv.isDarwin [ + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.CoreServices ]; diff --git a/pkgs/development/tools/misc/gdb/default.nix b/pkgs/development/tools/misc/gdb/default.nix index 5cf686dcfb6b..ac1bd1627d1c 100644 --- a/pkgs/development/tools/misc/gdb/default.nix +++ b/pkgs/development/tools/misc/gdb/default.nix @@ -37,7 +37,7 @@ stdenv.mkDerivation rec { hash = "sha256-OCVOrNRXITS8qcWlqk1MpWTLvTDDadiB9zP7a5AzVPI="; }; - postPatch = lib.optionalString stdenv.isDarwin '' + postPatch = lib.optionalString stdenv.hostPlatform.isDarwin '' substituteInPlace gdb/darwin-nat.c \ --replace '#include "bfd/mach-o.h"' '#include "mach-o.h"' '' + lib.optionalString stdenv.hostPlatform.isMusl '' @@ -49,7 +49,7 @@ stdenv.mkDerivation rec { patches = [ ./debug-info-from-env.patch - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ ./darwin-target-match.patch ]; @@ -59,7 +59,7 @@ stdenv.mkDerivation rec { ++ lib.optional pythonSupport python3 ++ lib.optional doCheck dejagnu ++ lib.optional enableDebuginfod (elfutils.override { enableDebuginfod = true; }) - ++ lib.optional stdenv.isDarwin libiconv; + ++ lib.optional stdenv.hostPlatform.isDarwin libiconv; propagatedNativeBuildInputs = [ setupDebugInfoDirs ]; @@ -68,7 +68,7 @@ stdenv.mkDerivation rec { enableParallelBuilding = true; # darwin build fails with format hardening since v7.12 - hardeningDisable = lib.optionals stdenv.isDarwin [ "format" ]; + hardeningDisable = lib.optionals stdenv.hostPlatform.isDarwin [ "format" ]; env.NIX_CFLAGS_COMPILE = "-Wno-format-nonliteral"; diff --git a/pkgs/development/tools/misc/hydra-cli/default.nix b/pkgs/development/tools/misc/hydra-cli/default.nix index 527362114851..42ec5704bae7 100644 --- a/pkgs/development/tools/misc/hydra-cli/default.nix +++ b/pkgs/development/tools/misc/hydra-cli/default.nix @@ -27,7 +27,7 @@ rustPlatform.buildRustPackage rec { nativeBuildInputs = [ pkg-config ]; - buildInputs = [ openssl ] ++ lib.optionals stdenv.isDarwin [ darwin.apple_sdk.frameworks.Security ]; + buildInputs = [ openssl ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.Security ]; __darwinAllowLocalNetworking = true; diff --git a/pkgs/development/tools/misc/igprof/default.nix b/pkgs/development/tools/misc/igprof/default.nix index fc2036ec9bbd..229532c755e1 100644 --- a/pkgs/development/tools/misc/igprof/default.nix +++ b/pkgs/development/tools/misc/igprof/default.nix @@ -20,7 +20,7 @@ stdenv.mkDerivation rec { CXXFLAGS = ["-fPIC" "-O2" "-w" "-fpermissive"]; meta = { - broken = (stdenv.isLinux && stdenv.isAarch64); + broken = (stdenv.hostPlatform.isLinux && stdenv.hostPlatform.isAarch64); description = "Ignominous Profiler"; longDescription = '' diff --git a/pkgs/development/tools/misc/linuxkit/default.nix b/pkgs/development/tools/misc/linuxkit/default.nix index eacb70a5ea8f..f5af6c868c85 100644 --- a/pkgs/development/tools/misc/linuxkit/default.nix +++ b/pkgs/development/tools/misc/linuxkit/default.nix @@ -24,8 +24,8 @@ buildGoModule rec { # able to use the Virtualization framework at runtime. # - sigtool is allows us to validly sign such executables with a dummy # authority. - nativeBuildInputs = lib.optionals stdenv.isDarwin [ sigtool ]; - buildInputs = lib.optionals stdenv.isDarwin [ Cocoa Virtualization ]; + nativeBuildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ sigtool ]; + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ Cocoa Virtualization ]; ldflags = [ "-s" @@ -43,7 +43,7 @@ buildGoModule rec { # - Finally, at the start of the fixup phase, the working directory is # $sourceRoot/src/cmd/linuxkit, so it's simpler to use the sign target from # the Makefile in that directory rather than $sourceRoot/Makefile. - postFixup = lib.optionalString stdenv.isDarwin '' + postFixup = lib.optionalString stdenv.hostPlatform.isDarwin '' make sign LOCAL_TARGET=$out/bin/linuxkit ''; passthru.tests.version = testers.testVersion { diff --git a/pkgs/development/tools/misc/lsof/default.nix b/pkgs/development/tools/misc/lsof/default.nix index de1decee524f..98f7d239878d 100644 --- a/pkgs/development/tools/misc/lsof/default.nix +++ b/pkgs/development/tools/misc/lsof/default.nix @@ -21,7 +21,7 @@ stdenv.mkDerivation rec { # We remove phony 'FRC' target that forces rebuilds: # 'version.h: FRC ...' is translated to 'version.h: ...'. sed -i lib/dialects/*/Makefile -e 's/version.h:\s*FRC/version.h:/' - '' + lib.optionalString stdenv.isDarwin '' + '' + lib.optionalString stdenv.hostPlatform.isDarwin '' sed -i 's|lcurses|lncurses|g' Configure ''; diff --git a/pkgs/development/tools/misc/msitools/default.nix b/pkgs/development/tools/misc/msitools/default.nix index 0d4d5c2c4331..6b190f9c659e 100644 --- a/pkgs/development/tools/misc/msitools/default.nix +++ b/pkgs/development/tools/misc/msitools/default.nix @@ -44,7 +44,7 @@ stdenv.mkDerivation rec { ]; # WiX tests fail on darwin - doCheck = !stdenv.isDarwin; + doCheck = !stdenv.hostPlatform.isDarwin; postPatch = '' patchShebangs subprojects/bats-core/{bin,libexec} diff --git a/pkgs/development/tools/misc/netcoredbg/default.nix b/pkgs/development/tools/misc/netcoredbg/default.nix index d3c08025108e..3fd8c3eeaa94 100644 --- a/pkgs/development/tools/misc/netcoredbg/default.nix +++ b/pkgs/development/tools/misc/netcoredbg/default.nix @@ -62,8 +62,8 @@ stdenv.mkDerivation { # include source here so that autoPatchelfHook can do it's job src = managed; - nativeBuildInputs = lib.optionals stdenv.isLinux [ autoPatchelfHook ]; - buildInputs = lib.optionals stdenv.isLinux [ stdenv.cc.cc.lib ]; + nativeBuildInputs = lib.optionals stdenv.hostPlatform.isLinux [ autoPatchelfHook ]; + buildInputs = lib.optionals stdenv.hostPlatform.isLinux [ stdenv.cc.cc.lib ]; installPhase = '' mkdir -p $out/share/netcoredbg $out/bin cp ${unmanaged}/* $out/share/netcoredbg diff --git a/pkgs/development/tools/misc/orogene/default.nix b/pkgs/development/tools/misc/orogene/default.nix index 218fdf706885..0f772eac7dfc 100644 --- a/pkgs/development/tools/misc/orogene/default.nix +++ b/pkgs/development/tools/misc/orogene/default.nix @@ -27,7 +27,7 @@ rustPlatform.buildRustPackage rec { buildInputs = [ openssl - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.SystemConfiguration ]; diff --git a/pkgs/development/tools/misc/patchelf/unstable.nix b/pkgs/development/tools/misc/patchelf/unstable.nix index 951493b84395..646fbb1aff14 100644 --- a/pkgs/development/tools/misc/patchelf/unstable.nix +++ b/pkgs/development/tools/misc/patchelf/unstable.nix @@ -22,7 +22,7 @@ stdenv.mkDerivation { nativeBuildInputs = [ autoreconfHook ]; buildInputs = [ ]; - doCheck = !stdenv.isDarwin; + doCheck = !stdenv.hostPlatform.isDarwin; passthru = { updateScript = unstableGitUpdater { diff --git a/pkgs/development/tools/misc/pest-ide-tools/default.nix b/pkgs/development/tools/misc/pest-ide-tools/default.nix index a962444a6fa5..d71155bd6711 100644 --- a/pkgs/development/tools/misc/pest-ide-tools/default.nix +++ b/pkgs/development/tools/misc/pest-ide-tools/default.nix @@ -22,7 +22,7 @@ rustPlatform.buildRustPackage rec { nativeBuildInputs = [ pkg-config ]; buildInputs = [ openssl - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.Security ]; diff --git a/pkgs/development/tools/misc/pkg-config/default.nix b/pkgs/development/tools/misc/pkg-config/default.nix index ae567bb01b73..a04b8874e990 100644 --- a/pkgs/development/tools/misc/pkg-config/default.nix +++ b/pkgs/development/tools/misc/pkg-config/default.nix @@ -16,7 +16,7 @@ stdenv.mkDerivation rec { # http://bugs.freedesktop.org/show_bug.cgi?id=4738, migrated to # https://gitlab.freedesktop.org/pkg-config/pkg-config/issues/28 patches = lib.optional (!vanilla) ./requires-private.patch - ++ lib.optional stdenv.isCygwin ./2.36.3-not-win32.patch; + ++ lib.optional stdenv.hostPlatform.isCygwin ./2.36.3-not-win32.patch; # These three tests fail due to a (desired) behavior change from our ./requires-private.patch postPatch = @@ -31,7 +31,7 @@ stdenv.mkDerivation rec { buildInputs = [ libiconv ]; configureFlags = [ "--with-internal-glib" ] - ++ lib.optionals (stdenv.isSunOS) [ "--with-libiconv=gnu" "--with-system-library-path" "--with-system-include-path" "CFLAGS=-DENABLE_NLS" ] + ++ lib.optionals (stdenv.hostPlatform.isSunOS) [ "--with-libiconv=gnu" "--with-system-library-path" "--with-system-include-path" "CFLAGS=-DENABLE_NLS" ] # Can't run these tests while cross-compiling ++ lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) [ "glib_cv_stack_grows=no" diff --git a/pkgs/development/tools/misc/premake/5.nix b/pkgs/development/tools/misc/premake/5.nix index 64ee0c37317d..e84d2a57c943 100644 --- a/pkgs/development/tools/misc/premake/5.nix +++ b/pkgs/development/tools/misc/premake/5.nix @@ -11,13 +11,13 @@ stdenv.mkDerivation rec { sha256 = "sha256-2R5gq4jaQsp8Ny1oGuIYkef0kn2UG9jMf20vq0714oY="; }; - buildInputs = [ libuuid ] ++ lib.optionals stdenv.isDarwin [ Foundation readline ]; + buildInputs = [ libuuid ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ Foundation readline ]; patches = [ ./no-curl-ca.patch ]; postPatch = '' substituteInPlace contrib/curl/premake5.lua \ --replace "ca = nil" "ca = '${cacert}/etc/ssl/certs/ca-bundle.crt'" - '' + lib.optionalString stdenv.isDarwin '' + '' + lib.optionalString stdenv.hostPlatform.isDarwin '' substituteInPlace premake5.lua \ --replace -mmacosx-version-min=10.4 -mmacosx-version-min=10.5 \ --replace-fail '"-arch arm64"' '""' \ @@ -30,7 +30,7 @@ stdenv.mkDerivation rec { ''; buildPhase = - if stdenv.isDarwin then '' + if stdenv.hostPlatform.isDarwin then '' make -f Bootstrap.mak osx '' else '' make -f Bootstrap.mak linux diff --git a/pkgs/development/tools/misc/pwninit/default.nix b/pkgs/development/tools/misc/pwninit/default.nix index 341532d00422..d67c7e640611 100644 --- a/pkgs/development/tools/misc/pwninit/default.nix +++ b/pkgs/development/tools/misc/pwninit/default.nix @@ -21,7 +21,7 @@ rustPlatform.buildRustPackage rec { sha256 = "sha256-tbZS7PdRFvO2ifoHA/w3cSPfqqHrLeLHAg6V8oG9gVE="; }; - buildInputs = [ openssl xz ] ++ lib.optionals stdenv.isDarwin [ Security ]; + buildInputs = [ openssl xz ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ Security ]; nativeBuildInputs = [ pkg-config makeBinaryWrapper ]; postInstall = '' wrapProgram $out/bin/pwninit \ diff --git a/pkgs/development/tools/misc/riff/default.nix b/pkgs/development/tools/misc/riff/default.nix index d6c7ee8164b9..aa85616720dd 100644 --- a/pkgs/development/tools/misc/riff/default.nix +++ b/pkgs/development/tools/misc/riff/default.nix @@ -28,7 +28,7 @@ rustPlatform.buildRustPackage rec { buildInputs = [ openssl - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.Security ]; diff --git a/pkgs/development/tools/misc/runme/default.nix b/pkgs/development/tools/misc/runme/default.nix index 8299ceba5395..9f7c7d6415b3 100644 --- a/pkgs/development/tools/misc/runme/default.nix +++ b/pkgs/development/tools/misc/runme/default.nix @@ -45,7 +45,7 @@ buildGoModule rec { ]; # tests fail to access /etc/bashrc on darwin - doCheck = !stdenv.isDarwin; + doCheck = !stdenv.hostPlatform.isDarwin; postPatch = '' substituteInPlace testdata/{categories/basic,runall/basic,script/basic}.txtar \ diff --git a/pkgs/development/tools/misc/rustywind/default.nix b/pkgs/development/tools/misc/rustywind/default.nix index 6ffcd67a5557..12d3e2aa7f4c 100644 --- a/pkgs/development/tools/misc/rustywind/default.nix +++ b/pkgs/development/tools/misc/rustywind/default.nix @@ -18,7 +18,7 @@ rustPlatform.buildRustPackage rec { cargoHash = "sha256-yZQSY2zqVpmhMd6+Avg2vBh0WQB2FJ2fiMuy5x9Zl9U="; - buildInputs = lib.optionals stdenv.isDarwin [ + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.Security ]; diff --git a/pkgs/development/tools/misc/samply/default.nix b/pkgs/development/tools/misc/samply/default.nix index a929d90652a9..98dfbc3aca1e 100644 --- a/pkgs/development/tools/misc/samply/default.nix +++ b/pkgs/development/tools/misc/samply/default.nix @@ -41,7 +41,7 @@ rustPlatform.buildRustPackage rec { ''; }; - buildInputs = lib.optionals stdenv.isDarwin [ + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.CoreServices ]; diff --git a/pkgs/development/tools/misc/sccache/default.nix b/pkgs/development/tools/misc/sccache/default.nix index a268e1749f0d..fc7e2b485a09 100644 --- a/pkgs/development/tools/misc/sccache/default.nix +++ b/pkgs/development/tools/misc/sccache/default.nix @@ -25,7 +25,7 @@ rustPlatform.buildRustPackage rec { ]; buildInputs = [ openssl - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.Security darwin.apple_sdk.frameworks.SystemConfiguration ]; diff --git a/pkgs/development/tools/misc/sipp/default.nix b/pkgs/development/tools/misc/sipp/default.nix index 414be9560b9a..ae5441edb251 100644 --- a/pkgs/development/tools/misc/sipp/default.nix +++ b/pkgs/development/tools/misc/sipp/default.nix @@ -17,7 +17,7 @@ stdenv.mkDerivation rec { "-DUSE_GSL=1" "-DUSE_PCAP=1" "-DUSE_SSL=1" - "-DUSE_SCTP=${if stdenv.isLinux then "1" else "0"}" + "-DUSE_SCTP=${if stdenv.hostPlatform.isLinux then "1" else "0"}" # file RPATH_CHANGE could not write new RPATH "-DCMAKE_SKIP_BUILD_RPATH=ON" @@ -26,7 +26,7 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ cmake git ]; buildInputs = [ ncurses libpcap openssl ] - ++ lib.optional (stdenv.isLinux) lksctp-tools; + ++ lib.optional (stdenv.hostPlatform.isLinux) lksctp-tools; meta = with lib; { homepage = "http://sipp.sf.net"; diff --git a/pkgs/development/tools/misc/slint-lsp/default.nix b/pkgs/development/tools/misc/slint-lsp/default.nix index 9fee7cca7f7e..f51b848a621a 100644 --- a/pkgs/development/tools/misc/slint-lsp/default.nix +++ b/pkgs/development/tools/misc/slint-lsp/default.nix @@ -21,7 +21,7 @@ let rpathLibs = [ fontconfig libGL xorg.libxcb xorg.libX11 xorg.libXcursor xorg.libXrandr xorg.libXi ] - ++ lib.optionals stdenv.isLinux [ libxkbcommon wayland ]; + ++ lib.optionals stdenv.hostPlatform.isLinux [ libxkbcommon wayland ]; in rustPlatform.buildRustPackage rec { pname = "slint-lsp"; @@ -36,7 +36,7 @@ rustPlatform.buildRustPackage rec { nativeBuildInputs = [ cmake pkg-config fontconfig ]; buildInputs = rpathLibs ++ [ xorg.libxcb.dev ] - ++ lib.optionals stdenv.isDarwin [ + ++ lib.optionals stdenv.hostPlatform.isDarwin [ AppKit CoreGraphics CoreServices @@ -46,7 +46,7 @@ rustPlatform.buildRustPackage rec { OpenGL ]; - postInstall = lib.optionalString stdenv.isLinux '' + postInstall = lib.optionalString stdenv.hostPlatform.isLinux '' patchelf --set-rpath ${lib.makeLibraryPath rpathLibs} $out/bin/slint-lsp ''; diff --git a/pkgs/development/tools/misc/sqitch/default.nix b/pkgs/development/tools/misc/sqitch/default.nix index 612ef223e67b..458e3b51d309 100644 --- a/pkgs/development/tools/misc/sqitch/default.nix +++ b/pkgs/development/tools/misc/sqitch/default.nix @@ -20,7 +20,7 @@ stdenv.mkDerivation { pname = "sqitch"; version = sqitch.version; - nativeBuildInputs = [ makeWrapper ] ++ lib.optional stdenv.isDarwin shortenPerlShebang; + nativeBuildInputs = [ makeWrapper ] ++ lib.optional stdenv.hostPlatform.isDarwin shortenPerlShebang; src = sqitch; dontBuild = true; @@ -34,7 +34,7 @@ stdenv.mkDerivation { ln -s ${sqitch}/$d $out/$d fi done - '' + lib.optionalString stdenv.isDarwin '' + '' + lib.optionalString stdenv.hostPlatform.isDarwin '' shortenPerlShebang $out/bin/sqitch ''; dontStrip = true; diff --git a/pkgs/development/tools/misc/src-cli/default.nix b/pkgs/development/tools/misc/src-cli/default.nix index 44b8cc62145d..c809b52826ca 100644 --- a/pkgs/development/tools/misc/src-cli/default.nix +++ b/pkgs/development/tools/misc/src-cli/default.nix @@ -25,9 +25,9 @@ buildGoModule rec { "cmd/src" ]; - buildInputs = lib.optionals stdenv.isLinux [ + buildInputs = lib.optionals stdenv.hostPlatform.isLinux [ xorg.libX11 - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.Cocoa ]; diff --git a/pkgs/development/tools/misc/stlink/default.nix b/pkgs/development/tools/misc/stlink/default.nix index 16785e4d4b89..c5c54351ac64 100644 --- a/pkgs/development/tools/misc/stlink/default.nix +++ b/pkgs/development/tools/misc/stlink/default.nix @@ -11,7 +11,7 @@ let # The Darwin build of stlink explicitly refers to static libusb. - libusb1' = if stdenv.isDarwin then libusb1.override { withStatic = true; } else libusb1; + libusb1' = if stdenv.hostPlatform.isDarwin then libusb1.override { withStatic = true; } else libusb1; # IMPORTANT: You need permissions to access the stlink usb devices. # Add services.udev.packages = [ pkgs.stlink ] to your configuration.nix diff --git a/pkgs/development/tools/misc/strace-analyzer/default.nix b/pkgs/development/tools/misc/strace-analyzer/default.nix index 625683196923..ee4242c1ca3d 100644 --- a/pkgs/development/tools/misc/strace-analyzer/default.nix +++ b/pkgs/development/tools/misc/strace-analyzer/default.nix @@ -20,7 +20,7 @@ rustPlatform.buildRustPackage rec { nativeCheckInputs = [ strace ]; - checkFlags = lib.optionals stdenv.isAarch64 [ + checkFlags = lib.optionals stdenv.hostPlatform.isAarch64 [ # thread 'analysis::tests::analyze_dd' panicked at 'assertion failed: ...' "--skip=analysis::tests::analyze_dd" ]; diff --git a/pkgs/development/tools/misc/sysbench/default.nix b/pkgs/development/tools/misc/sysbench/default.nix index fa39c310a269..955a0296b72f 100644 --- a/pkgs/development/tools/misc/sysbench/default.nix +++ b/pkgs/development/tools/misc/sysbench/default.nix @@ -16,7 +16,7 @@ stdenv.mkDerivation rec { version = "1.0.20"; nativeBuildInputs = [ autoreconfHook pkg-config ]; - buildInputs = [ libmysqlclient luajit ] ++ lib.optionals stdenv.isLinux [ libaio ]; + buildInputs = [ libmysqlclient luajit ] ++ lib.optionals stdenv.hostPlatform.isLinux [ libaio ]; depsBuildBuild = [ pkg-config ]; src = fetchFromGitHub { diff --git a/pkgs/development/tools/misc/texinfo/common.nix b/pkgs/development/tools/misc/texinfo/common.nix index a43eab5f00e5..e630489ffae3 100644 --- a/pkgs/development/tools/misc/texinfo/common.nix +++ b/pkgs/development/tools/misc/texinfo/common.nix @@ -86,7 +86,7 @@ stdenv.mkDerivation { bash libintl ] - ++ optionals stdenv.isSunOS [ + ++ optionals stdenv.hostPlatform.isSunOS [ libiconv gawk ] @@ -104,7 +104,7 @@ stdenv.mkDerivation { ++ optionals (crossBuildTools && lib.versionAtLeast version "7.1") [ "texinfo_cv_sys_iconv_converts_euc_cn=yes" ] - ++ optional stdenv.isSunOS "AWK=${gawk}/bin/awk"; + ++ optional stdenv.hostPlatform.isSunOS "AWK=${gawk}/bin/awk"; installFlags = [ "TEXMF=$(out)/texmf-dist" ]; installTargets = [ @@ -114,7 +114,7 @@ stdenv.mkDerivation { nativeCheckInputs = [ procps ] ++ optionals stdenv.buildPlatform.isFreeBSD [ freebsd.locale ]; - doCheck = interactive && !stdenv.isDarwin && !stdenv.isSunOS; # flaky + doCheck = interactive && !stdenv.hostPlatform.isDarwin && !stdenv.hostPlatform.isSunOS; # flaky checkFlags = optionals (!stdenv.hostPlatform.isMusl && versionOlder version "7") [ # Test is known to fail on various locales on texinfo-6.8: diff --git a/pkgs/development/tools/misc/texlab/default.nix b/pkgs/development/tools/misc/texlab/default.nix index d691b94c38a3..68e29724eb00 100644 --- a/pkgs/development/tools/misc/texlab/default.nix +++ b/pkgs/development/tools/misc/texlab/default.nix @@ -31,7 +31,7 @@ rustPlatform.buildRustPackage rec { nativeBuildInputs = [ installShellFiles ] ++ lib.optional (!isCross) help2man; - buildInputs = lib.optionals stdenv.isDarwin [ + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ libiconv Security CoreServices diff --git a/pkgs/development/tools/misc/tokei/default.nix b/pkgs/development/tools/misc/tokei/default.nix index ff3ceafc7f5c..6c6b232e9354 100644 --- a/pkgs/development/tools/misc/tokei/default.nix +++ b/pkgs/development/tools/misc/tokei/default.nix @@ -13,11 +13,11 @@ rustPlatform.buildRustPackage rec { cargoHash = "sha256-U7Bode8qwDsNf4FVppfEHA9uiOFz74CtKgXG6xyYlT8="; - buildInputs = lib.optionals stdenv.isDarwin [ + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ libiconv Security ]; - checkInputs = lib.optionals stdenv.isDarwin [ zlib ]; + checkInputs = lib.optionals stdenv.hostPlatform.isDarwin [ zlib ]; # enable all output formats buildFeatures = [ "all" ]; diff --git a/pkgs/development/tools/misc/wasmer-pack/default.nix b/pkgs/development/tools/misc/wasmer-pack/default.nix index 7c1d84de885d..f1216ae12416 100644 --- a/pkgs/development/tools/misc/wasmer-pack/default.nix +++ b/pkgs/development/tools/misc/wasmer-pack/default.nix @@ -18,7 +18,7 @@ rustPlatform.buildRustPackage rec { cargoHash = "sha256-nyhjwEZyT8IEb0pTbou/EtN47gehge3fUCQVPs2TkIY="; - buildInputs = lib.optionals stdenv.isDarwin [ + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.Security ]; diff --git a/pkgs/development/tools/misc/xxgdb/default.nix b/pkgs/development/tools/misc/xxgdb/default.nix index 1c6eca4729a0..5ba3b74a5a3d 100644 --- a/pkgs/development/tools/misc/xxgdb/default.nix +++ b/pkgs/development/tools/misc/xxgdb/default.nix @@ -45,7 +45,7 @@ stdenv.mkDerivation rec { ''; meta = with lib; { - broken = stdenv.isDarwin; + broken = stdenv.hostPlatform.isDarwin; description = "Simple but powerful graphical interface to gdb"; mainProgram = "xxgdb"; license = licenses.mit; diff --git a/pkgs/development/tools/mysql-shell/8.nix b/pkgs/development/tools/mysql-shell/8.nix index 2f8983572f29..79ceb8a0aadd 100644 --- a/pkgs/development/tools/mysql-shell/8.nix +++ b/pkgs/development/tools/mysql-shell/8.nix @@ -72,8 +72,8 @@ stdenv.mkDerivation (finalAttrs: { ''; nativeBuildInputs = [ pkg-config cmake git bison makeWrapper ] - ++ lib.optionals (!stdenv.isDarwin) [ rpcsvc-proto ] - ++ lib.optionals stdenv.isDarwin [ cctools DarwinTools ]; + ++ lib.optionals (!stdenv.hostPlatform.isDarwin) [ rpcsvc-proto ] + ++ lib.optionals stdenv.hostPlatform.isDarwin [ cctools DarwinTools ]; buildInputs = [ curl @@ -95,8 +95,8 @@ stdenv.mkDerivation (finalAttrs: { python3 antlr.runtime.cpp ] ++ pythonDeps - ++ lib.optionals stdenv.isLinux [ libtirpc ] - ++ lib.optionals stdenv.isDarwin [ CoreServices ]; + ++ lib.optionals stdenv.hostPlatform.isLinux [ libtirpc ] + ++ lib.optionals stdenv.hostPlatform.isDarwin [ CoreServices ]; preConfigure = '' # Build MySQL diff --git a/pkgs/development/tools/mysql-shell/innovation.nix b/pkgs/development/tools/mysql-shell/innovation.nix index 32fd0746360f..14ff96542c46 100644 --- a/pkgs/development/tools/mysql-shell/innovation.nix +++ b/pkgs/development/tools/mysql-shell/innovation.nix @@ -72,8 +72,8 @@ stdenv.mkDerivation (finalAttrs: { ''; nativeBuildInputs = [ pkg-config cmake git bison makeWrapper ] - ++ lib.optionals (!stdenv.isDarwin) [ rpcsvc-proto ] - ++ lib.optionals stdenv.isDarwin [ cctools DarwinTools ]; + ++ lib.optionals (!stdenv.hostPlatform.isDarwin) [ rpcsvc-proto ] + ++ lib.optionals stdenv.hostPlatform.isDarwin [ cctools DarwinTools ]; buildInputs = [ curl @@ -95,8 +95,8 @@ stdenv.mkDerivation (finalAttrs: { python3 antlr.runtime.cpp ] ++ pythonDeps - ++ lib.optionals stdenv.isLinux [ libtirpc ] - ++ lib.optionals stdenv.isDarwin [ CoreServices ]; + ++ lib.optionals stdenv.hostPlatform.isLinux [ libtirpc ] + ++ lib.optionals stdenv.hostPlatform.isDarwin [ CoreServices ]; preConfigure = '' # Build MySQL diff --git a/pkgs/development/tools/nest-cli/default.nix b/pkgs/development/tools/nest-cli/default.nix index 9c5f8a12df5b..c9d422781827 100644 --- a/pkgs/development/tools/nest-cli/default.nix +++ b/pkgs/development/tools/nest-cli/default.nix @@ -27,7 +27,7 @@ buildNpmPackage rec { python3 ]; - buildInputs = lib.optionals stdenv.isDarwin [ + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.CoreServices ]; diff --git a/pkgs/development/tools/nodehun/default.nix b/pkgs/development/tools/nodehun/default.nix index 83ba3fe2e494..5bc067085ed8 100644 --- a/pkgs/development/tools/nodehun/default.nix +++ b/pkgs/development/tools/nodehun/default.nix @@ -30,9 +30,9 @@ buildNpmPackage { npmDepsHash = "sha256-mV6rWNf2p2w4H0ESUT0/Ybtx9YEdvO5l2gCvlWFXK+U="; - buildInputs = lib.optionals stdenv.isDarwin [ darwin.apple_sdk.frameworks.CoreServices ]; + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.CoreServices ]; nativeBuildInputs = [ node-gyp python3 ] - ++ lib.optionals stdenv.isDarwin [ cctools ]; + ++ lib.optionals stdenv.hostPlatform.isDarwin [ cctools ]; postInstall = '' # Only keep the necessary parts of build/Release to reduce closure size diff --git a/pkgs/development/tools/nsis/default.nix b/pkgs/development/tools/nsis/default.nix index 32e69dcf7042..1651a3c43d9f 100644 --- a/pkgs/development/tools/nsis/default.nix +++ b/pkgs/development/tools/nsis/default.nix @@ -31,16 +31,16 @@ stdenv.mkDerivation rec { ''; nativeBuildInputs = [ scons ]; - buildInputs = [ zlib ] ++ lib.optionals stdenv.isDarwin [ libiconv ]; + buildInputs = [ zlib ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ libiconv ]; CPPPATH = symlinkJoin { name = "nsis-includes"; - paths = [ zlib.dev ] ++ lib.optionals stdenv.isDarwin [ libiconv ]; + paths = [ zlib.dev ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ libiconv ]; }; LIBPATH = symlinkJoin { name = "nsis-libs"; - paths = [ zlib ] ++ lib.optionals stdenv.isDarwin [ libiconv ]; + paths = [ zlib ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ libiconv ]; }; sconsFlags = [ @@ -49,7 +49,7 @@ stdenv.mkDerivation rec { "SKIPUTILS=all" "SKIPMISC=all" "NSIS_CONFIG_CONST_DATA=no" - ] ++ lib.optional stdenv.isDarwin "APPEND_LINKFLAGS=-liconv"; + ] ++ lib.optional stdenv.hostPlatform.isDarwin "APPEND_LINKFLAGS=-liconv"; preBuild = '' sconsFlagsArray+=( @@ -71,6 +71,6 @@ stdenv.mkDerivation rec { platforms = platforms.unix; maintainers = with maintainers; [ pombeirp ]; mainProgram = "makensis"; - broken = stdenv.isDarwin; + broken = stdenv.hostPlatform.isDarwin; }; } diff --git a/pkgs/development/tools/nufmt/default.nix b/pkgs/development/tools/nufmt/default.nix index 4c9e6ff4af6a..e5e656877ef9 100644 --- a/pkgs/development/tools/nufmt/default.nix +++ b/pkgs/development/tools/nufmt/default.nix @@ -18,7 +18,7 @@ rustPlatform.buildRustPackage rec { hash = "sha256-BwKLl8eMCrqVt9PA5SHAXxu3ypP2ePcSuljKL+wSkvw="; }; - buildInputs = lib.optionals stdenv.isDarwin (with darwin.apple_sdk.frameworks; [ + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin (with darwin.apple_sdk.frameworks; [ IOKit ]); diff --git a/pkgs/development/tools/ocaml/dune/3.nix b/pkgs/development/tools/ocaml/dune/3.nix index f2c00e16c9e7..1aa192f1daab 100644 --- a/pkgs/development/tools/ocaml/dune/3.nix +++ b/pkgs/development/tools/ocaml/dune/3.nix @@ -15,7 +15,7 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ ocaml findlib ]; - buildInputs = lib.optionals stdenv.isDarwin [ + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.CoreServices ]; diff --git a/pkgs/development/tools/ocaml/opam/default.nix b/pkgs/development/tools/ocaml/opam/default.nix index ec34ba2f17fc..4e7d0af89ab0 100644 --- a/pkgs/development/tools/ocaml/opam/default.nix +++ b/pkgs/development/tools/ocaml/opam/default.nix @@ -17,8 +17,8 @@ stdenv.mkDerivation { nativeBuildInputs = [ makeWrapper unzip ocaml curl ]; buildInputs = [ ncurses getconf ] - ++ lib.optionals stdenv.isLinux [ bubblewrap ] - ++ lib.optionals stdenv.isDarwin [ Foundation ]; + ++ lib.optionals stdenv.hostPlatform.isLinux [ bubblewrap ] + ++ lib.optionals stdenv.hostPlatform.isDarwin [ Foundation ]; patches = [ ./opam-shebangs.patch ]; @@ -40,7 +40,7 @@ stdenv.mkDerivation { mv $out/bin/opam $out/bin/.opam-wrapped makeWrapper $out/bin/.opam-wrapped $out/bin/opam \ --argv0 "opam" \ - --suffix PATH : ${unzip}/bin:${curl}/bin:${lib.optionalString stdenv.isLinux "${bubblewrap}/bin:"}${getconf}/bin \ + --suffix PATH : ${unzip}/bin:${curl}/bin:${lib.optionalString stdenv.hostPlatform.isLinux "${bubblewrap}/bin:"}${getconf}/bin \ --set OPAM_USER_PATH_RO /run/current-system/sw/bin:/nix/ $out/bin/opam-installer --prefix=$installer opam-installer.install ''; diff --git a/pkgs/development/tools/open-policy-agent/default.nix b/pkgs/development/tools/open-policy-agent/default.nix index 891733635cce..4b11dd7576dd 100644 --- a/pkgs/development/tools/open-policy-agent/default.nix +++ b/pkgs/development/tools/open-policy-agent/default.nix @@ -8,7 +8,7 @@ , enableWasmEval ? false }: -assert enableWasmEval && stdenv.isDarwin -> builtins.throw "building with wasm on darwin is failing in nixpkgs"; +assert enableWasmEval && stdenv.hostPlatform.isDarwin -> builtins.throw "building with wasm on darwin is failing in nixpkgs"; buildGoModule rec { pname = "open-policy-agent"; @@ -55,9 +55,9 @@ buildGoModule rec { # want but also limits the tests # Also avoid wasm tests on darwin due to wasmtime-go build issues getGoDirs() { - go list ./... | grep -v -e e2e ${lib.optionalString stdenv.isDarwin "-e wasm"} + go list ./... | grep -v -e e2e ${lib.optionalString stdenv.hostPlatform.isDarwin "-e wasm"} } - '' + lib.optionalString stdenv.isDarwin '' + '' + lib.optionalString stdenv.hostPlatform.isDarwin '' # remove tests that have "too many open files"/"no space left on device" issues on darwin in hydra rm server/server_test.go ''; diff --git a/pkgs/development/tools/oxlint/default.nix b/pkgs/development/tools/oxlint/default.nix index 4625b97eb000..5feddddb90b6 100644 --- a/pkgs/development/tools/oxlint/default.nix +++ b/pkgs/development/tools/oxlint/default.nix @@ -21,7 +21,7 @@ rustPlatform.buildRustPackage rec { buildInputs = [ rust-jemalloc-sys - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.Security ]; diff --git a/pkgs/development/tools/pactorio/default.nix b/pkgs/development/tools/pactorio/default.nix index e6254bdbbb6f..06b55790ddf6 100644 --- a/pkgs/development/tools/pactorio/default.nix +++ b/pkgs/development/tools/pactorio/default.nix @@ -23,7 +23,7 @@ rustPlatform.buildRustPackage rec { nativeBuildInputs = [ installShellFiles pkg-config ]; - buildInputs = [ bzip2 ] ++ lib.optional stdenv.isDarwin Security; + buildInputs = [ bzip2 ] ++ lib.optional stdenv.hostPlatform.isDarwin Security; postInstall = '' installManPage artifacts/pactorio.1 diff --git a/pkgs/development/tools/parsing/antlr/2.7.7.nix b/pkgs/development/tools/parsing/antlr/2.7.7.nix index a47918f4354b..991925cb4e76 100644 --- a/pkgs/development/tools/parsing/antlr/2.7.7.nix +++ b/pkgs/development/tools/parsing/antlr/2.7.7.nix @@ -10,7 +10,7 @@ stdenv.mkDerivation rec { patches = [ ./2.7.7-fixes.patch ]; buildInputs = [ jdk ]; - CXXFLAGS = lib.optionalString stdenv.isDarwin "-D_LIBCPP_ENABLE_CXX17_REMOVED_UNARY_BINARY_FUNCTION"; + CXXFLAGS = lib.optionalString stdenv.hostPlatform.isDarwin "-D_LIBCPP_ENABLE_CXX17_REMOVED_UNARY_BINARY_FUNCTION"; meta = with lib; { description = "Powerful parser generator"; diff --git a/pkgs/development/tools/parsing/antlr/4.nix b/pkgs/development/tools/parsing/antlr/4.nix index 79db5301add9..f575110b87fd 100644 --- a/pkgs/development/tools/parsing/antlr/4.nix +++ b/pkgs/development/tools/parsing/antlr/4.nix @@ -89,7 +89,7 @@ let nativeBuildInputs = [ cmake ninja pkg-config ]; buildInputs = - lib.optional stdenv.isDarwin CoreFoundation ++ + lib.optional stdenv.hostPlatform.isDarwin CoreFoundation ++ extraCppBuildInputs; cmakeDir = "../runtime/Cpp"; @@ -153,7 +153,7 @@ in { version = "4.10.1"; sourceSha256 = "sha256-Z1P81L0aPbimitzrHH/9rxsMCA6Qn3i42jFbUmVqu1E="; jarSha256 = "sha256-QZSdQfINMdW4J3GHc13XVRCN9Ss422yGUQjTOCBA+Rg="; - extraCppBuildInputs = lib.optional stdenv.isLinux libuuid; + extraCppBuildInputs = lib.optional stdenv.hostPlatform.isLinux libuuid; extraCppCmakeFlags = [ "-DANTLR4_INSTALL=ON" "-DANTLR_BUILD_CPP_TESTS=OFF" @@ -165,7 +165,7 @@ in { sourceSha256 = "1af3cfqwk7lq1b5qsh1am0922fyhy7wmlpnrqdnvch3zzza9n1qm"; jarSha256 = "0dnz2x54kigc58bxnynjhmr5iq49f938vj6p50gdir1xdna41kdg"; extraCppBuildInputs = [ utf8cpp ] - ++ lib.optional stdenv.isLinux libuuid; + ++ lib.optional stdenv.hostPlatform.isLinux libuuid; extraCppCmakeFlags = [ "-DCMAKE_CXX_FLAGS='-I${lib.getDev utf8cpp}/include/utf8cpp'" ]; @@ -178,7 +178,7 @@ in { version = "4.8"; sourceSha256 = "1qal3add26qxskm85nk7r758arladn5rcyjinmhlhznmpbbv9j8m"; jarSha256 = "0nms976cnqyr1ndng3haxkmknpdq6xli4cpf4x4al0yr21l9v93k"; - extraCppBuildInputs = lib.optional stdenv.isLinux libuuid; + extraCppBuildInputs = lib.optional stdenv.hostPlatform.isLinux libuuid; extraCppCmakeFlags = [ "-DANTLR4_INSTALL=ON" ]; }).antlr; } diff --git a/pkgs/development/tools/parsing/bison/default.nix b/pkgs/development/tools/parsing/bison/default.nix index 43ef3ffa3e19..80a2ad835c28 100644 --- a/pkgs/development/tools/parsing/bison/default.nix +++ b/pkgs/development/tools/parsing/bison/default.nix @@ -23,7 +23,7 @@ stdenv.mkDerivation rec { # cannot add bash to buildInputs due to infinite recursion strictDeps = stdenv.hostPlatform != stdenv.buildPlatform; - nativeBuildInputs = [ m4 perl ] ++ lib.optional stdenv.isSunOS help2man; + nativeBuildInputs = [ m4 perl ] ++ lib.optional stdenv.hostPlatform.isSunOS help2man; propagatedBuildInputs = [ m4 ]; enableParallelBuilding = true; diff --git a/pkgs/development/tools/parsing/flex/default.nix b/pkgs/development/tools/parsing/flex/default.nix index bd62241ec98c..84cb5f35d3c6 100644 --- a/pkgs/development/tools/parsing/flex/default.nix +++ b/pkgs/development/tools/parsing/flex/default.nix @@ -41,7 +41,7 @@ stdenv.mkDerivation rec { export ac_cv_func_realloc_0_nonnull=yes ''; - postConfigure = lib.optionalString (stdenv.isDarwin || stdenv.isCygwin) '' + postConfigure = lib.optionalString (stdenv.hostPlatform.isDarwin || stdenv.hostPlatform.isCygwin) '' sed -i Makefile -e 's/-no-undefined//;' ''; diff --git a/pkgs/development/tools/parsing/jikespg/default.nix b/pkgs/development/tools/parsing/jikespg/default.nix index 03814d3cfbe7..a6b64efb7fcf 100644 --- a/pkgs/development/tools/parsing/jikespg/default.nix +++ b/pkgs/development/tools/parsing/jikespg/default.nix @@ -10,7 +10,7 @@ stdenv.mkDerivation rec { }; postPatch = '' - substituteInPlace Makefile --replace-fail "gcc" "${stdenv.cc.targetPrefix}cc ${lib.optionalString stdenv.isDarwin "-std=c89"}" + substituteInPlace Makefile --replace-fail "gcc" "${stdenv.cc.targetPrefix}cc ${lib.optionalString stdenv.hostPlatform.isDarwin "-std=c89"}" ''; sourceRoot = "jikespg/src"; diff --git a/pkgs/development/tools/parsing/ragel/default.nix b/pkgs/development/tools/parsing/ragel/default.nix index 72e77a55a152..a6090f104fa2 100644 --- a/pkgs/development/tools/parsing/ragel/default.nix +++ b/pkgs/development/tools/parsing/ragel/default.nix @@ -50,6 +50,6 @@ in version = "7.0.0.12"; sha256 = "0x3si355lv6q051lgpg8bpclpiq5brpri5lv3p8kk2qhzfbyz69r"; license = lib.licenses.mit; - broken = stdenv.isDarwin; + broken = stdenv.hostPlatform.isDarwin; }; } diff --git a/pkgs/development/tools/parsing/tree-sitter/default.nix b/pkgs/development/tools/parsing/tree-sitter/default.nix index ea3386e15d51..662d6ace13a9 100644 --- a/pkgs/development/tools/parsing/tree-sitter/default.nix +++ b/pkgs/development/tools/parsing/tree-sitter/default.nix @@ -114,7 +114,7 @@ rustPlatform.buildRustPackage { cargoHash = "sha256-44FIO0kPso6NxjLwmggsheILba3r9GEhDld2ddt601g="; buildInputs = - lib.optionals stdenv.isDarwin [ Security CoreServices ]; + lib.optionals stdenv.hostPlatform.isDarwin [ Security CoreServices ]; nativeBuildInputs = [ which ] ++ lib.optionals webUISupport [ emscripten ]; diff --git a/pkgs/development/tools/perseus-cli/default.nix b/pkgs/development/tools/perseus-cli/default.nix index cffa0299beab..ba795a6ef870 100644 --- a/pkgs/development/tools/perseus-cli/default.nix +++ b/pkgs/development/tools/perseus-cli/default.nix @@ -19,7 +19,7 @@ rustPlatform.buildRustPackage rec { cargoHash = "sha256-i7MPmO9MoANZLzmR5gsD+v0gyDtFbzhsmE9xOsb88L0="; nativeBuildInputs = [ makeWrapper ]; - buildInputs = lib.optionals stdenv.isDarwin [ CoreServices ]; + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ CoreServices ]; postInstall = '' wrapProgram $out/bin/perseus \ diff --git a/pkgs/development/tools/pgformatter/default.nix b/pkgs/development/tools/pgformatter/default.nix index d4407fa5ec24..cad3d2af4505 100644 --- a/pkgs/development/tools/pgformatter/default.nix +++ b/pkgs/development/tools/pgformatter/default.nix @@ -35,8 +35,8 @@ perlPackages.buildPerlPackage rec { --replace "'INSTALLDIRS' => \$INSTALLDIRS," "'INSTALLDIRS' => \$INSTALLDIRS, 'INSTALLVENDORLIB' => 'bin/lib', 'INSTALLVENDORBIN' => 'bin', 'INSTALLVENDORSCRIPT' => 'bin', 'INSTALLVENDORMAN1DIR' => 'share/man/man1', 'INSTALLVENDORMAN3DIR' => 'share/man/man3'," ''; - nativeBuildInputs = lib.optional stdenv.isDarwin shortenPerlShebang; - postInstall = lib.optionalString stdenv.isDarwin '' + nativeBuildInputs = lib.optional stdenv.hostPlatform.isDarwin shortenPerlShebang; + postInstall = lib.optionalString stdenv.hostPlatform.isDarwin '' shortenPerlShebang $out/bin/pg_format ''; diff --git a/pkgs/development/tools/pgtop/default.nix b/pkgs/development/tools/pgtop/default.nix index 5798b7da517a..066e07fd484a 100644 --- a/pkgs/development/tools/pgtop/default.nix +++ b/pkgs/development/tools/pgtop/default.nix @@ -15,8 +15,8 @@ perlPackages.buildPerlPackage rec { buildInputs = with perlPackages; [ DBI DBDPg TermReadKey JSON LWP ]; - nativeBuildInputs = lib.optional stdenv.isDarwin shortenPerlShebang; - postInstall = lib.optionalString stdenv.isDarwin '' + nativeBuildInputs = lib.optional stdenv.hostPlatform.isDarwin shortenPerlShebang; + postInstall = lib.optionalString stdenv.hostPlatform.isDarwin '' shortenPerlShebang $out/bin/pgtop ''; diff --git a/pkgs/development/tools/poac/default.nix b/pkgs/development/tools/poac/default.nix index 95a028c6f809..d6a1ad39bdaf 100644 --- a/pkgs/development/tools/poac/default.nix +++ b/pkgs/development/tools/poac/default.nix @@ -71,8 +71,8 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ cmake git cacert ]; buildInputs = [ (boost179.override { - enableShared = stdenv.isDarwin; - enableStatic = !stdenv.isDarwin; + enableShared = stdenv.hostPlatform.isDarwin; + enableStatic = !stdenv.hostPlatform.isDarwin; }) git2-cpp glob diff --git a/pkgs/development/tools/py-spy/default.nix b/pkgs/development/tools/py-spy/default.nix index 8522333ef9db..01d847649bbf 100644 --- a/pkgs/development/tools/py-spy/default.nix +++ b/pkgs/development/tools/py-spy/default.nix @@ -33,7 +33,7 @@ rustPlatform.buildRustPackage rec { python3 ]; - buildInputs = lib.optionals (stdenv.isDarwin && stdenv.isx86_64) [ + buildInputs = lib.optionals (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isx86_64) [ # Pull a header that contains a definition of proc_pid_rusage(). darwin.apple_sdk_11_0.Libsystem ]; diff --git a/pkgs/development/tools/rbspy/default.nix b/pkgs/development/tools/rbspy/default.nix index a109b0ea579e..beae01a2c57e 100644 --- a/pkgs/development/tools/rbspy/default.nix +++ b/pkgs/development/tools/rbspy/default.nix @@ -47,7 +47,7 @@ rustPlatform.buildRustPackage rec { nativeBuildInputs = [ ruby which - ] ++ lib.optional stdenv.isDarwin rustPlatform.bindgenHook; + ] ++ lib.optional stdenv.hostPlatform.isDarwin rustPlatform.bindgenHook; passthru.updateScript = nix-update-script { }; diff --git a/pkgs/development/tools/rcodesign/default.nix b/pkgs/development/tools/rcodesign/default.nix index 72c261cfa0ed..a110611ab4a9 100644 --- a/pkgs/development/tools/rcodesign/default.nix +++ b/pkgs/development/tools/rcodesign/default.nix @@ -18,7 +18,7 @@ rustPlatform.buildRustPackage rec { cargoHash = "sha256-cpQBdxTw/ge4VtzjdL2a2xgSeCT22fMIjuKu5UEedhI="; - buildInputs = lib.optionals stdenv.isDarwin [ + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk_11_0.frameworks.Security ]; diff --git a/pkgs/development/tools/rebazel/default.nix b/pkgs/development/tools/rebazel/default.nix index d5979ac53dbd..4b9549b8a58a 100644 --- a/pkgs/development/tools/rebazel/default.nix +++ b/pkgs/development/tools/rebazel/default.nix @@ -13,7 +13,7 @@ rustPlatform.buildRustPackage rec { cargoHash = "sha256-cBAm8LyNKEVJkhZJ+QZU5XtQutb1oNvad8xH70Bi2LM="; - buildInputs = lib.optionals stdenv.isDarwin [ CoreServices ]; + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ CoreServices ]; meta = with lib; { description = "tool for expediting bazel build workflows"; diff --git a/pkgs/development/tools/reindeer/default.nix b/pkgs/development/tools/reindeer/default.nix index f3d384c5bfa2..3989e24c763f 100644 --- a/pkgs/development/tools/reindeer/default.nix +++ b/pkgs/development/tools/reindeer/default.nix @@ -24,7 +24,7 @@ rustPlatform.buildRustPackage rec { nativeBuildInputs = [ pkg-config ]; buildInputs = - [ openssl ] ++ lib.optionals stdenv.isDarwin [ + [ openssl ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ libiconv darwin.apple_sdk.frameworks.Security darwin.apple_sdk.frameworks.CoreServices diff --git a/pkgs/development/tools/remodel/default.nix b/pkgs/development/tools/remodel/default.nix index 2788f4fb11d8..83b32a7dd26f 100644 --- a/pkgs/development/tools/remodel/default.nix +++ b/pkgs/development/tools/remodel/default.nix @@ -26,7 +26,7 @@ rustPlatform.buildRustPackage rec { buildInputs = [ openssl - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ Security ]; diff --git a/pkgs/development/tools/reshape/default.nix b/pkgs/development/tools/reshape/default.nix index 273b0577dc04..256f6515efd6 100644 --- a/pkgs/development/tools/reshape/default.nix +++ b/pkgs/development/tools/reshape/default.nix @@ -19,7 +19,7 @@ rustPlatform.buildRustPackage rec { cargoHash = "sha256-VTJ3FNhVLgxo/VVBhk1yF9UUktLXcbrEkYwoyoWFhXA="; buildInputs = - lib.optionals stdenv.isDarwin [ darwin.apple_sdk.frameworks.SystemConfiguration ]; + lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.SystemConfiguration ]; nativeCheckInputs = [ postgresqlTestHook diff --git a/pkgs/development/tools/rojo/default.nix b/pkgs/development/tools/rojo/default.nix index 32ebfcf4189c..ada53d437f4a 100644 --- a/pkgs/development/tools/rojo/default.nix +++ b/pkgs/development/tools/rojo/default.nix @@ -30,7 +30,7 @@ rustPlatform.buildRustPackage rec { buildInputs = [ openssl - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ CoreServices SystemConfiguration ]; @@ -39,7 +39,7 @@ rustPlatform.buildRustPackage rec { OPENSSL_NO_VENDOR = "1"; # tests flaky on darwin on hydra - doCheck = !stdenv.isDarwin; + doCheck = !stdenv.hostPlatform.isDarwin; meta = with lib; { description = "Project management tool for Roblox"; diff --git a/pkgs/development/tools/rover/default.nix b/pkgs/development/tools/rover/default.nix index c70869299c9d..92b5339fdfe9 100644 --- a/pkgs/development/tools/rover/default.nix +++ b/pkgs/development/tools/rover/default.nix @@ -19,7 +19,7 @@ rustPlatform.buildRustPackage rec { cargoHash = "sha256-Rf4kRXYW+WAF1rM7o8PmXBLgp/YyA8y/TqbZL22VOqI="; - buildInputs = lib.optionals stdenv.isDarwin [ + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.Security darwin.apple_sdk.frameworks.CoreServices darwin.apple_sdk.frameworks.SystemConfiguration diff --git a/pkgs/development/tools/rtags/default.nix b/pkgs/development/tools/rtags/default.nix index 3710cb6122a8..b3f9e00a81a5 100644 --- a/pkgs/development/tools/rtags/default.nix +++ b/pkgs/development/tools/rtags/default.nix @@ -6,7 +6,7 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ cmake pkg-config llvmPackages.llvm.dev ]; buildInputs = [ llvmPackages.llvm llvmPackages.libclang openssl emacs ] ++ lib.optionals stdenv.cc.isGNU [ llvmPackages.clang-unwrapped ] - ++ lib.optionals stdenv.isDarwin [ apple_sdk.libs.xpc apple_sdk.frameworks.CoreServices ]; + ++ lib.optionals stdenv.hostPlatform.isDarwin [ apple_sdk.libs.xpc apple_sdk.frameworks.CoreServices ]; src = fetchFromGitHub { owner = "andersbakken"; diff --git a/pkgs/development/tools/rubyfmt/default.nix b/pkgs/development/tools/rubyfmt/default.nix index 287959dbf0b5..480826ab55d0 100644 --- a/pkgs/development/tools/rubyfmt/default.nix +++ b/pkgs/development/tools/rubyfmt/default.nix @@ -42,7 +42,7 @@ rustPlatform.buildRustPackage rec { libxcrypt libyaml rust-jemalloc-sys-unprefixed - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ readline libiconv libobjc @@ -67,7 +67,7 @@ rustPlatform.buildRustPackage rec { cargoHash = "sha256-QZ26GmsKyENkzdCGg2peie/aJhEt7KQAF/lwsibonDk="; - env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.isDarwin "-fdeclspec"; + env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.hostPlatform.isDarwin "-fdeclspec"; preFixup = '' mv $out/bin/rubyfmt{-main,} @@ -78,7 +78,7 @@ rustPlatform.buildRustPackage rec { homepage = "https://github.com/fables-tales/rubyfmt"; license = lib.licenses.mit; maintainers = with lib.maintainers; [ bobvanderlinden ]; - broken = stdenv.isDarwin; + broken = stdenv.hostPlatform.isDarwin; mainProgram = "rubyfmt"; }; } diff --git a/pkgs/development/tools/rust/cargo-about/default.nix b/pkgs/development/tools/rust/cargo-about/default.nix index ee7da1db8890..3da8e4beea34 100644 --- a/pkgs/development/tools/rust/cargo-about/default.nix +++ b/pkgs/development/tools/rust/cargo-about/default.nix @@ -25,7 +25,7 @@ rustPlatform.buildRustPackage rec { buildInputs = [ zstd ] - ++ lib.optionals stdenv.isDarwin [ + ++ lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.Security darwin.apple_sdk.frameworks.SystemConfiguration ]; diff --git a/pkgs/development/tools/rust/cargo-asm/default.nix b/pkgs/development/tools/rust/cargo-asm/default.nix index 9c66f2cd9798..4e8cecb4a338 100644 --- a/pkgs/development/tools/rust/cargo-asm/default.nix +++ b/pkgs/development/tools/rust/cargo-asm/default.nix @@ -13,7 +13,7 @@ rustPlatform.buildRustPackage rec { cargoHash = "sha256-QsaOFman+VBSIAbCalW63I3QXY0uECZy9+ufOKhSQrA="; - buildInputs = lib.optional stdenv.isDarwin Security; + buildInputs = lib.optional stdenv.hostPlatform.isDarwin Security; # Test checks against machine code output, which fails with some # LLVM/compiler versions. diff --git a/pkgs/development/tools/rust/cargo-audit/default.nix b/pkgs/development/tools/rust/cargo-audit/default.nix index 01f72f1bc421..9de3d6c9437c 100644 --- a/pkgs/development/tools/rust/cargo-audit/default.nix +++ b/pkgs/development/tools/rust/cargo-audit/default.nix @@ -27,7 +27,7 @@ rustPlatform.buildRustPackage rec { buildInputs = [ openssl zlib - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ Security SystemConfiguration ]; diff --git a/pkgs/development/tools/rust/cargo-bazel/default.nix b/pkgs/development/tools/rust/cargo-bazel/default.nix index 22567ad2d135..151f155f9ee1 100644 --- a/pkgs/development/tools/rust/cargo-bazel/default.nix +++ b/pkgs/development/tools/rust/cargo-bazel/default.nix @@ -16,7 +16,7 @@ rustPlatform.buildRustPackage rec { cargoHash = "sha256-+PVNB/apG5AR236Ikqt+JTz20zxc0HUi7z6BU6xq/Fw="; - buildInputs = lib.optional stdenv.isDarwin Security; + buildInputs = lib.optional stdenv.hostPlatform.isDarwin Security; # `test_data` is explicitly excluded from the package published to crates.io, so tests cannot be run doCheck = false; diff --git a/pkgs/development/tools/rust/cargo-binstall/default.nix b/pkgs/development/tools/rust/cargo-binstall/default.nix index 205484f5fa70..f7b24266123f 100644 --- a/pkgs/development/tools/rust/cargo-binstall/default.nix +++ b/pkgs/development/tools/rust/cargo-binstall/default.nix @@ -30,7 +30,7 @@ rustPlatform.buildRustPackage rec { bzip2 xz zstd - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.SystemConfiguration ]; diff --git a/pkgs/development/tools/rust/cargo-bisect-rustc/default.nix b/pkgs/development/tools/rust/cargo-bisect-rustc/default.nix index 9babac9ebade..8a89387ca848 100644 --- a/pkgs/development/tools/rust/cargo-bisect-rustc/default.nix +++ b/pkgs/development/tools/rust/cargo-bisect-rustc/default.nix @@ -39,13 +39,13 @@ rustPlatform.buildRustPackage rec { --subst-var libPath ''; in - lib.optionals stdenv.isLinux [ patchelfPatch ]; + lib.optionals stdenv.hostPlatform.isLinux [ patchelfPatch ]; nativeBuildInputs = [ pkg-config ]; buildInputs = [ openssl ] - ++ lib.optionals stdenv.isDarwin [ + ++ lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.Security darwin.apple_sdk.frameworks.SystemConfiguration ]; diff --git a/pkgs/development/tools/rust/cargo-bundle/default.nix b/pkgs/development/tools/rust/cargo-bundle/default.nix index daf4bc230b8d..7d302da1003b 100644 --- a/pkgs/development/tools/rust/cargo-bundle/default.nix +++ b/pkgs/development/tools/rust/cargo-bundle/default.nix @@ -26,9 +26,9 @@ rustPlatform.buildRustPackage { pkg-config ]; - buildInputs = lib.optionals stdenv.isDarwin [ + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.AppKit - ] ++ lib.optionals stdenv.isLinux [ + ] ++ lib.optionals stdenv.hostPlatform.isLinux [ libxkbcommon wayland ]; diff --git a/pkgs/development/tools/rust/cargo-c/default.nix b/pkgs/development/tools/rust/cargo-c/default.nix index ca0f8a590ebd..3dd89aefe7ac 100644 --- a/pkgs/development/tools/rust/cargo-c/default.nix +++ b/pkgs/development/tools/rust/cargo-c/default.nix @@ -25,7 +25,7 @@ rustPlatform.buildRustPackage rec { cargoHash = "sha256-UfhIz87s0CLUDbIpWMPzGQ7qVmh14GuiFoquauSbTOw="; nativeBuildInputs = [ pkg-config (lib.getDev curl) ]; - buildInputs = [ openssl curl ] ++ lib.optionals stdenv.isDarwin [ + buildInputs = [ openssl curl ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ CoreFoundation libiconv Security diff --git a/pkgs/development/tools/rust/cargo-cache/default.nix b/pkgs/development/tools/rust/cargo-cache/default.nix index 1c19b61bf8b4..fc5da4b5b1cb 100644 --- a/pkgs/development/tools/rust/cargo-cache/default.nix +++ b/pkgs/development/tools/rust/cargo-cache/default.nix @@ -13,7 +13,7 @@ rustPlatform.buildRustPackage rec { cargoHash = "sha256-275QREIcncgBk4ah/CivSz5N2m6s/XPCfp6JGChpr38="; - buildInputs = lib.optionals stdenv.isDarwin [ libiconv Security ]; + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ libiconv Security ]; checkFlags = [ "offline_tests" ]; diff --git a/pkgs/development/tools/rust/cargo-clone/default.nix b/pkgs/development/tools/rust/cargo-clone/default.nix index c5e065eb2eaa..ee119146feaf 100644 --- a/pkgs/development/tools/rust/cargo-clone/default.nix +++ b/pkgs/development/tools/rust/cargo-clone/default.nix @@ -24,7 +24,7 @@ rustPlatform.buildRustPackage rec { nativeBuildInputs = [ pkg-config ]; - buildInputs = [ openssl ] ++ lib.optionals stdenv.isDarwin [ + buildInputs = [ openssl ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ CoreServices Security SystemConfiguration diff --git a/pkgs/development/tools/rust/cargo-codspeed/default.nix b/pkgs/development/tools/rust/cargo-codspeed/default.nix index 23880c2480fc..ce20d409df28 100644 --- a/pkgs/development/tools/rust/cargo-codspeed/default.nix +++ b/pkgs/development/tools/rust/cargo-codspeed/default.nix @@ -33,7 +33,7 @@ rustPlatform.buildRustPackage rec { libgit2 openssl zlib - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.Security ]; diff --git a/pkgs/development/tools/rust/cargo-component/default.nix b/pkgs/development/tools/rust/cargo-component/default.nix index fa8ba8accb04..e23844785c62 100644 --- a/pkgs/development/tools/rust/cargo-component/default.nix +++ b/pkgs/development/tools/rust/cargo-component/default.nix @@ -26,7 +26,7 @@ rustPlatform.buildRustPackage rec { buildInputs = [ openssl - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.SystemConfiguration ]; diff --git a/pkgs/development/tools/rust/cargo-crev/default.nix b/pkgs/development/tools/rust/cargo-crev/default.nix index 0a2b797610d4..67c5ca0bc0a3 100644 --- a/pkgs/development/tools/rust/cargo-crev/default.nix +++ b/pkgs/development/tools/rust/cargo-crev/default.nix @@ -33,7 +33,7 @@ rustPlatform.buildRustPackage rec { nativeBuildInputs = [ perl pkg-config ]; - buildInputs = [ openssl ] ++ lib.optionals stdenv.isDarwin [ SystemConfiguration Security CoreFoundation libiconv curl ]; + buildInputs = [ openssl ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ SystemConfiguration Security CoreFoundation libiconv curl ]; nativeCheckInputs = [ git ]; diff --git a/pkgs/development/tools/rust/cargo-cyclonedx/default.nix b/pkgs/development/tools/rust/cargo-cyclonedx/default.nix index 841a502a31f7..3fbb42c88aa1 100644 --- a/pkgs/development/tools/rust/cargo-cyclonedx/default.nix +++ b/pkgs/development/tools/rust/cargo-cyclonedx/default.nix @@ -29,7 +29,7 @@ rustPlatform.buildRustPackage rec { buildInputs = [ openssl - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ Security SystemConfiguration CoreFoundation diff --git a/pkgs/development/tools/rust/cargo-deadlinks/default.nix b/pkgs/development/tools/rust/cargo-deadlinks/default.nix index d206e739bb83..70c9a377f00c 100644 --- a/pkgs/development/tools/rust/cargo-deadlinks/default.nix +++ b/pkgs/development/tools/rust/cargo-deadlinks/default.nix @@ -20,7 +20,7 @@ rustPlatform.buildRustPackage rec { # assumes the target is x86_64-unknown-linux-gnu "--skip simple_project::it_checks_okay_project_correctly"; - buildInputs = lib.optional stdenv.isDarwin Security; + buildInputs = lib.optional stdenv.hostPlatform.isDarwin Security; meta = with lib; { description = "Cargo subcommand to check rust documentation for broken links"; diff --git a/pkgs/development/tools/rust/cargo-deny/default.nix b/pkgs/development/tools/rust/cargo-deny/default.nix index 573bdb96db02..71ff14557fec 100644 --- a/pkgs/development/tools/rust/cargo-deny/default.nix +++ b/pkgs/development/tools/rust/cargo-deny/default.nix @@ -26,7 +26,7 @@ rustPlatform.buildRustPackage rec { buildInputs = [ zstd - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.Security darwin.apple_sdk.frameworks.SystemConfiguration ]; diff --git a/pkgs/development/tools/rust/cargo-dephell/default.nix b/pkgs/development/tools/rust/cargo-dephell/default.nix index 1302fd581bbe..b1f390f77388 100644 --- a/pkgs/development/tools/rust/cargo-dephell/default.nix +++ b/pkgs/development/tools/rust/cargo-dephell/default.nix @@ -26,13 +26,13 @@ rustPlatform.buildRustPackage rec { nativeBuildInputs = [ pkg-config - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ curl ]; buildInputs = [ openssl - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ curl darwin.apple_sdk.frameworks.Security libgit2 diff --git a/pkgs/development/tools/rust/cargo-dist/default.nix b/pkgs/development/tools/rust/cargo-dist/default.nix index e7f5003768a6..cbdd2a90b591 100644 --- a/pkgs/development/tools/rust/cargo-dist/default.nix +++ b/pkgs/development/tools/rust/cargo-dist/default.nix @@ -33,7 +33,7 @@ rustPlatform.buildRustPackage rec { bzip2 xz zstd - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.SystemConfiguration ]; diff --git a/pkgs/development/tools/rust/cargo-duplicates/default.nix b/pkgs/development/tools/rust/cargo-duplicates/default.nix index f9417651cf6a..17c9cd7d83de 100644 --- a/pkgs/development/tools/rust/cargo-duplicates/default.nix +++ b/pkgs/development/tools/rust/cargo-duplicates/default.nix @@ -33,7 +33,7 @@ rustPlatform.buildRustPackage rec { libgit2 openssl zlib - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.Security ]; diff --git a/pkgs/development/tools/rust/cargo-edit/default.nix b/pkgs/development/tools/rust/cargo-edit/default.nix index 7a72bc360253..f42607332d71 100644 --- a/pkgs/development/tools/rust/cargo-edit/default.nix +++ b/pkgs/development/tools/rust/cargo-edit/default.nix @@ -23,7 +23,7 @@ rustPlatform.buildRustPackage rec { nativeBuildInputs = [ pkg-config ]; - buildInputs = [ openssl zlib ] ++ lib.optionals stdenv.isDarwin [ + buildInputs = [ openssl zlib ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ Security ]; diff --git a/pkgs/development/tools/rust/cargo-feature/default.nix b/pkgs/development/tools/rust/cargo-feature/default.nix index 1e713076e1f3..81f0a1c62bb6 100644 --- a/pkgs/development/tools/rust/cargo-feature/default.nix +++ b/pkgs/development/tools/rust/cargo-feature/default.nix @@ -13,7 +13,7 @@ rustPlatform.buildRustPackage rec { cargoHash = "sha256-8qrpW/gU7BvxN3nSbFWhbgu5bwsdzYZTS3w3kcwsGbU="; - buildInputs = lib.optional stdenv.isDarwin libiconv; + buildInputs = lib.optional stdenv.hostPlatform.isDarwin libiconv; meta = with lib; { description = "Cargo plugin to manage dependency features"; diff --git a/pkgs/development/tools/rust/cargo-flamegraph/default.nix b/pkgs/development/tools/rust/cargo-flamegraph/default.nix index 4a6d9c3ff39d..aca8e713e6e3 100644 --- a/pkgs/development/tools/rust/cargo-flamegraph/default.nix +++ b/pkgs/development/tools/rust/cargo-flamegraph/default.nix @@ -15,12 +15,12 @@ rustPlatform.buildRustPackage rec { cargoHash = "sha256-KwpveTiViY+C4A+fE5yeGuT9PXbDyi+YsOc75mX2KdU="; - nativeBuildInputs = lib.optionals stdenv.isLinux [ makeWrapper ]; - buildInputs = lib.optionals stdenv.isDarwin [ + nativeBuildInputs = lib.optionals stdenv.hostPlatform.isLinux [ makeWrapper ]; + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ Security ]; - postFixup = lib.optionalString stdenv.isLinux '' + postFixup = lib.optionalString stdenv.hostPlatform.isLinux '' wrapProgram $out/bin/cargo-flamegraph \ --set-default PERF ${perf}/bin/perf wrapProgram $out/bin/flamegraph \ diff --git a/pkgs/development/tools/rust/cargo-fund/default.nix b/pkgs/development/tools/rust/cargo-fund/default.nix index 42f703aaa240..23d13a8841ae 100644 --- a/pkgs/development/tools/rust/cargo-fund/default.nix +++ b/pkgs/development/tools/rust/cargo-fund/default.nix @@ -18,7 +18,7 @@ rustPlatform.buildRustPackage rec { nativeBuildInputs = [ pkg-config ]; - buildInputs = [ openssl ] ++ lib.optionals stdenv.isDarwin [ Security libiconv curl ]; + buildInputs = [ openssl ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ Security libiconv curl ]; meta = with lib; { description = "Discover funding links for your project's dependencies"; diff --git a/pkgs/development/tools/rust/cargo-fuzz/default.nix b/pkgs/development/tools/rust/cargo-fuzz/default.nix index fc60b761fe4e..6c296e8ccbce 100644 --- a/pkgs/development/tools/rust/cargo-fuzz/default.nix +++ b/pkgs/development/tools/rust/cargo-fuzz/default.nix @@ -13,7 +13,7 @@ rustPlatform.buildRustPackage rec { cargoHash = "sha256-sfvepPpYtgA0TuUlu0CD50HX933AVQbUGzJBNAzFR94="; - buildInputs = lib.optional stdenv.isDarwin libiconv; + buildInputs = lib.optional stdenv.hostPlatform.isDarwin libiconv; doCheck = false; diff --git a/pkgs/development/tools/rust/cargo-generate/default.nix b/pkgs/development/tools/rust/cargo-generate/default.nix index f4c25a60dbc4..fa6a0578028f 100644 --- a/pkgs/development/tools/rust/cargo-generate/default.nix +++ b/pkgs/development/tools/rust/cargo-generate/default.nix @@ -24,7 +24,7 @@ rustPlatform.buildRustPackage rec { nativeBuildInputs = [ pkg-config ]; - buildInputs = [ libgit2 openssl ] ++ lib.optionals stdenv.isDarwin [ + buildInputs = [ libgit2 openssl ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.Security ]; @@ -44,7 +44,7 @@ rustPlatform.buildRustPackage rec { # - should_canonicalize: the test assumes that it will be called from the /Users// folder on darwin variant. checkFlags = [ "--skip=favorites::favorites_default_to_git_if_not_defined" - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ "--skip=git::utils::should_canonicalize" ]; diff --git a/pkgs/development/tools/rust/cargo-guppy/default.nix b/pkgs/development/tools/rust/cargo-guppy/default.nix index 13bb3eaff1cf..68a696ab1ae9 100644 --- a/pkgs/development/tools/rust/cargo-guppy/default.nix +++ b/pkgs/development/tools/rust/cargo-guppy/default.nix @@ -22,7 +22,7 @@ rustPlatform.buildRustPackage rec { nativeBuildInputs = [ pkg-config ]; - buildInputs = [ openssl ] ++ lib.optionals stdenv.isDarwin [ + buildInputs = [ openssl ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.Security ]; diff --git a/pkgs/development/tools/rust/cargo-hf2/default.nix b/pkgs/development/tools/rust/cargo-hf2/default.nix index ec689cb515d6..8859fa605a42 100644 --- a/pkgs/development/tools/rust/cargo-hf2/default.nix +++ b/pkgs/development/tools/rust/cargo-hf2/default.nix @@ -20,7 +20,7 @@ rustPlatform.buildRustPackage rec { nativeBuildInputs = [ pkg-config ]; - buildInputs = [ libusb1 ] ++ lib.optionals stdenv.isDarwin [ AppKit ]; + buildInputs = [ libusb1 ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ AppKit ]; meta = with lib; { description = "Cargo Subcommand for Microsoft HID Flashing Library for UF2 Bootloaders"; diff --git a/pkgs/development/tools/rust/cargo-info/default.nix b/pkgs/development/tools/rust/cargo-info/default.nix index 096ef8f764e9..f6aa12d2c5a7 100644 --- a/pkgs/development/tools/rust/cargo-info/default.nix +++ b/pkgs/development/tools/rust/cargo-info/default.nix @@ -29,7 +29,7 @@ rustPlatform.buildRustPackage rec { buildInputs = [ openssl - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.Security ]; diff --git a/pkgs/development/tools/rust/cargo-inspect/default.nix b/pkgs/development/tools/rust/cargo-inspect/default.nix index e8b1443dd009..b1126b42f248 100644 --- a/pkgs/development/tools/rust/cargo-inspect/default.nix +++ b/pkgs/development/tools/rust/cargo-inspect/default.nix @@ -11,7 +11,7 @@ rustPlatform.buildRustPackage rec { sha256 = "026vc8d0jkc1d7dlp3ldmwks7svpvqzl0k5niri8a12cl5w5b9hj"; }; - buildInputs = lib.optionals stdenv.isDarwin [ Security ]; + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ Security ]; cargoHash = "sha256-+cYbejdZOmvaX8jdf1llAvaTefPVtIOl1fqGm5tHMRk="; diff --git a/pkgs/development/tools/rust/cargo-lambda/default.nix b/pkgs/development/tools/rust/cargo-lambda/default.nix index 75127127eae2..b63c9e43b415 100644 --- a/pkgs/development/tools/rust/cargo-lambda/default.nix +++ b/pkgs/development/tools/rust/cargo-lambda/default.nix @@ -36,7 +36,7 @@ rustPlatform.buildRustPackage rec { buildInputs = [ openssl ] - ++ lib.optionals stdenv.isDarwin [ + ++ lib.optionals stdenv.hostPlatform.isDarwin [ curl CoreServices Security diff --git a/pkgs/development/tools/rust/cargo-leptos/default.nix b/pkgs/development/tools/rust/cargo-leptos/default.nix index 2beed790ed69..5a14ac34252d 100644 --- a/pkgs/development/tools/rust/cargo-leptos/default.nix +++ b/pkgs/development/tools/rust/cargo-leptos/default.nix @@ -10,7 +10,7 @@ let SystemConfiguration Security; inherit (lib) optionals; - inherit (stdenv) isDarwin; + inherit (stdenv.hostPlatform) isDarwin; in rustPlatform.buildRustPackage rec { pname = "cargo-leptos"; diff --git a/pkgs/development/tools/rust/cargo-limit/default.nix b/pkgs/development/tools/rust/cargo-limit/default.nix index 958bfeb447c3..7132ebff02ad 100644 --- a/pkgs/development/tools/rust/cargo-limit/default.nix +++ b/pkgs/development/tools/rust/cargo-limit/default.nix @@ -19,7 +19,7 @@ rustPlatform.buildRustPackage rec { cargoHash = "sha256-dwqbG0UFeUQHa0K98ebHfjbcQuQOhK2s6ZxAT6r0cik="; - buildInputs = lib.optionals stdenv.isDarwin [ libiconv ]; + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ libiconv ]; passthru = { updateScript = nix-update-script { }; diff --git a/pkgs/development/tools/rust/cargo-llvm-cov/default.nix b/pkgs/development/tools/rust/cargo-llvm-cov/default.nix index 387460a0dd16..2672d165b26d 100644 --- a/pkgs/development/tools/rust/cargo-llvm-cov/default.nix +++ b/pkgs/development/tools/rust/cargo-llvm-cov/default.nix @@ -94,6 +94,6 @@ rustPlatform.buildRustPackage { maintainers = with lib.maintainers; [ wucke13 matthiasbeyer CobaltCause ]; # The profiler runtime is (currently) disabled on non-Linux platforms - broken = !(stdenv.isLinux && !stdenv.targetPlatform.isRedox); + broken = !(stdenv.hostPlatform.isLinux && !stdenv.targetPlatform.isRedox); }; } diff --git a/pkgs/development/tools/rust/cargo-local-registry/default.nix b/pkgs/development/tools/rust/cargo-local-registry/default.nix index 76f26decd868..7e6c0c917a73 100644 --- a/pkgs/development/tools/rust/cargo-local-registry/default.nix +++ b/pkgs/development/tools/rust/cargo-local-registry/default.nix @@ -33,9 +33,9 @@ rustPlatform.buildRustPackage rec { libgit2 openssl zlib - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.Security - ] ++ lib.optionals (stdenv.isDarwin && stdenv.isx86_64) [ + ] ++ lib.optionals (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isx86_64) [ darwin.apple_sdk.frameworks.CoreFoundation ]; diff --git a/pkgs/development/tools/rust/cargo-mobile2/default.nix b/pkgs/development/tools/rust/cargo-mobile2/default.nix index 28c94f9a0f02..17ba08923b1f 100644 --- a/pkgs/development/tools/rust/cargo-mobile2/default.nix +++ b/pkgs/development/tools/rust/cargo-mobile2/default.nix @@ -35,7 +35,7 @@ rustPlatform.buildRustPackage { export CARGO_HOME=$out/share/ ''; - buildInputs = [ openssl ] ++ lib.optionals stdenv.isDarwin [ CoreServices ]; + buildInputs = [ openssl ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ CoreServices ]; nativeBuildInputs = [ pkg-config git makeWrapper ]; preFixup = '' diff --git a/pkgs/development/tools/rust/cargo-modules/default.nix b/pkgs/development/tools/rust/cargo-modules/default.nix index 3787173f0fff..da236481f45d 100644 --- a/pkgs/development/tools/rust/cargo-modules/default.nix +++ b/pkgs/development/tools/rust/cargo-modules/default.nix @@ -13,7 +13,7 @@ rustPlatform.buildRustPackage rec { cargoHash = "sha256-j3AYWKq7SrlNlsY7A80iwcWKW8wi6hx0U9UwDIQkXZs="; - buildInputs = lib.optionals stdenv.isDarwin [ + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.CoreServices ]; diff --git a/pkgs/development/tools/rust/cargo-msrv/default.nix b/pkgs/development/tools/rust/cargo-msrv/default.nix index e8b23c70bd11..2db732560df1 100644 --- a/pkgs/development/tools/rust/cargo-msrv/default.nix +++ b/pkgs/development/tools/rust/cargo-msrv/default.nix @@ -34,7 +34,7 @@ rustPlatform.buildRustPackage rec { # Integration tests fail doCheck = false; - buildInputs = if stdenv.isDarwin + buildInputs = if stdenv.hostPlatform.isDarwin then [ libiconv Security ] else [ openssl ]; diff --git a/pkgs/development/tools/rust/cargo-mutants/default.nix b/pkgs/development/tools/rust/cargo-mutants/default.nix index 742000213879..e5e7fcde55cb 100644 --- a/pkgs/development/tools/rust/cargo-mutants/default.nix +++ b/pkgs/development/tools/rust/cargo-mutants/default.nix @@ -18,7 +18,7 @@ rustPlatform.buildRustPackage rec { cargoHash = "sha256-VRkhDgKunSUOz2/U4oC2t0YrDh5l48z4luevMazfj6o="; - buildInputs = lib.optionals stdenv.isDarwin [ + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.SystemConfiguration ]; diff --git a/pkgs/development/tools/rust/cargo-ndk/default.nix b/pkgs/development/tools/rust/cargo-ndk/default.nix index b1068127483b..1397ffc3742c 100644 --- a/pkgs/development/tools/rust/cargo-ndk/default.nix +++ b/pkgs/development/tools/rust/cargo-ndk/default.nix @@ -19,7 +19,7 @@ rustPlatform.buildRustPackage rec { cargoHash = "sha256-sIKan8LnGv4sGVrGOUOKSD3R4fNRu5yBFATm5MWDTSU="; - buildInputs = lib.optionals stdenv.isDarwin [ + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ CoreGraphics Foundation ]; diff --git a/pkgs/development/tools/rust/cargo-outdated/default.nix b/pkgs/development/tools/rust/cargo-outdated/default.nix index 64b7c4a77656..0c575c604cf8 100644 --- a/pkgs/development/tools/rust/cargo-outdated/default.nix +++ b/pkgs/development/tools/rust/cargo-outdated/default.nix @@ -29,7 +29,7 @@ rustPlatform.buildRustPackage rec { nativeBuildInputs = [ pkg-config ]; - buildInputs = [ openssl ] ++ lib.optionals stdenv.isDarwin [ + buildInputs = [ openssl ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ curl CoreFoundation CoreServices diff --git a/pkgs/development/tools/rust/cargo-pgrx/buildPgrxExtension.nix b/pkgs/development/tools/rust/cargo-pgrx/buildPgrxExtension.nix index 5c49d5bd2be7..89293ab62ef8 100644 --- a/pkgs/development/tools/rust/cargo-pgrx/buildPgrxExtension.nix +++ b/pkgs/development/tools/rust/cargo-pgrx/buildPgrxExtension.nix @@ -102,7 +102,7 @@ let # so we don't accidentally `(rustPlatform.buildRustPackage argsForBuildRustPackage) // { ... }` because # we forgot parentheses finalArgs = argsForBuildRustPackage // { - buildInputs = (args.buildInputs or [ ]) ++ lib.optionals stdenv.isDarwin [ Security ]; + buildInputs = (args.buildInputs or [ ]) ++ lib.optionals stdenv.hostPlatform.isDarwin [ Security ]; nativeBuildInputs = (args.nativeBuildInputs or [ ]) ++ [ cargo-pgrx @@ -119,7 +119,7 @@ let ${maybeEnterBuildAndTestSubdir} PGRX_BUILD_FLAGS="--frozen -j $NIX_BUILD_CORES ${builtins.concatStringsSep " " cargoBuildFlags}" \ - ${lib.optionalString stdenv.isDarwin ''RUSTFLAGS="''${RUSTFLAGS:+''${RUSTFLAGS} }-Clink-args=-Wl,-undefined,dynamic_lookup"''} \ + ${lib.optionalString stdenv.hostPlatform.isDarwin ''RUSTFLAGS="''${RUSTFLAGS:+''${RUSTFLAGS} }-Clink-args=-Wl,-undefined,dynamic_lookup"''} \ cargo pgrx package \ --pg-config ${lib.getDev postgresql}/bin/pg_config \ ${maybeDebugFlag} \ diff --git a/pkgs/development/tools/rust/cargo-pgrx/default.nix b/pkgs/development/tools/rust/cargo-pgrx/default.nix index ca7014cf1e3a..93010928ddc6 100644 --- a/pkgs/development/tools/rust/cargo-pgrx/default.nix +++ b/pkgs/development/tools/rust/cargo-pgrx/default.nix @@ -24,13 +24,13 @@ let inherit cargoHash; - nativeBuildInputs = lib.optionals stdenv.isLinux [ + nativeBuildInputs = lib.optionals stdenv.hostPlatform.isLinux [ pkg-config ]; - buildInputs = lib.optionals stdenv.isLinux [ + buildInputs = lib.optionals stdenv.hostPlatform.isLinux [ openssl - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.Security ]; diff --git a/pkgs/development/tools/rust/cargo-public-api/default.nix b/pkgs/development/tools/rust/cargo-public-api/default.nix index d7abd37316c1..8bc991d0bd4c 100644 --- a/pkgs/development/tools/rust/cargo-public-api/default.nix +++ b/pkgs/development/tools/rust/cargo-public-api/default.nix @@ -22,7 +22,7 @@ rustPlatform.buildRustPackage rec { nativeBuildInputs = [ pkg-config ]; buildInputs = [ curl openssl ] - ++ lib.optionals stdenv.isDarwin [ darwin.apple_sdk.frameworks.Security ]; + ++ lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.Security ]; # Tests fail doCheck = false; diff --git a/pkgs/development/tools/rust/cargo-release/default.nix b/pkgs/development/tools/rust/cargo-release/default.nix index 8f9abcb28da2..c818582433a2 100644 --- a/pkgs/development/tools/rust/cargo-release/default.nix +++ b/pkgs/development/tools/rust/cargo-release/default.nix @@ -35,7 +35,7 @@ rustPlatform.buildRustPackage rec { buildInputs = [ libgit2 openssl - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ curl darwin.apple_sdk.frameworks.SystemConfiguration ]; diff --git a/pkgs/development/tools/rust/cargo-risczero/default.nix b/pkgs/development/tools/rust/cargo-risczero/default.nix index ead0103d3f65..bf61c32cf778 100644 --- a/pkgs/development/tools/rust/cargo-risczero/default.nix +++ b/pkgs/development/tools/rust/cargo-risczero/default.nix @@ -24,7 +24,7 @@ rustPlatform.buildRustPackage rec { buildInputs = [ openssl - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.Security ]; diff --git a/pkgs/development/tools/rust/cargo-semver-checks/default.nix b/pkgs/development/tools/rust/cargo-semver-checks/default.nix index a219cbd41d1d..ad2e4b7f337e 100644 --- a/pkgs/development/tools/rust/cargo-semver-checks/default.nix +++ b/pkgs/development/tools/rust/cargo-semver-checks/default.nix @@ -27,7 +27,7 @@ rustPlatform.buildRustPackage rec { buildInputs = [ zlib - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.SystemConfiguration ]; diff --git a/pkgs/development/tools/rust/cargo-shuttle/default.nix b/pkgs/development/tools/rust/cargo-shuttle/default.nix index 61a0bf1c6c06..57d61041857a 100644 --- a/pkgs/development/tools/rust/cargo-shuttle/default.nix +++ b/pkgs/development/tools/rust/cargo-shuttle/default.nix @@ -37,7 +37,7 @@ rustPlatform.buildRustPackage rec { openssl zlib ] - ++ lib.optionals stdenv.isDarwin [ + ++ lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.CoreServices darwin.apple_sdk.frameworks.SystemConfiguration ]; diff --git a/pkgs/development/tools/rust/cargo-spellcheck/default.nix b/pkgs/development/tools/rust/cargo-spellcheck/default.nix index aae0be337614..6d6bfa5ae258 100644 --- a/pkgs/development/tools/rust/cargo-spellcheck/default.nix +++ b/pkgs/development/tools/rust/cargo-spellcheck/default.nix @@ -21,7 +21,7 @@ rustPlatform.buildRustPackage rec { nativeBuildInputs = [ rustPlatform.bindgenHook ]; - buildInputs = lib.optionals stdenv.isDarwin [ Security SystemConfiguration ]; + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ Security SystemConfiguration ]; preCheck = "HOME=$(mktemp -d)"; diff --git a/pkgs/development/tools/rust/cargo-supply-chain/default.nix b/pkgs/development/tools/rust/cargo-supply-chain/default.nix index 395a48498237..073500a16e2f 100644 --- a/pkgs/development/tools/rust/cargo-supply-chain/default.nix +++ b/pkgs/development/tools/rust/cargo-supply-chain/default.nix @@ -18,7 +18,7 @@ rustPlatform.buildRustPackage rec { cargoHash = "sha256-Fx1C4X0dQqePqLa+X+4ZDrIMFKBQ6J50nBApYXcGbFM="; - buildInputs = lib.optionals stdenv.isDarwin [ + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.Security ]; diff --git a/pkgs/development/tools/rust/cargo-tally/default.nix b/pkgs/development/tools/rust/cargo-tally/default.nix index 828f50e467c3..b85112f75538 100644 --- a/pkgs/development/tools/rust/cargo-tally/default.nix +++ b/pkgs/development/tools/rust/cargo-tally/default.nix @@ -11,7 +11,7 @@ rustPlatform.buildRustPackage rec { cargoHash = "sha256-Dkz3QJchUAn4/kQsmQcSfxVrRdiCA2qJSOTszfvE4No="; - buildInputs = lib.optionals stdenv.isDarwin (with darwin.apple_sdk_11_0.frameworks; [ + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin (with darwin.apple_sdk_11_0.frameworks; [ DiskArbitration Foundation IOKit diff --git a/pkgs/development/tools/rust/cargo-tauri/default.nix b/pkgs/development/tools/rust/cargo-tauri/default.nix index 1dcc79fb4b75..7ae69fa55283 100644 --- a/pkgs/development/tools/rust/cargo-tauri/default.nix +++ b/pkgs/development/tools/rust/cargo-tauri/default.nix @@ -35,14 +35,14 @@ rustPlatform.buildRustPackage rec { buildInputs = [ openssl ] - ++ lib.optionals stdenv.isLinux [ + ++ lib.optionals stdenv.hostPlatform.isLinux [ glibc libsoup cairo gtk3 webkitgtk ] - ++ lib.optionals stdenv.isDarwin [ + ++ lib.optionals stdenv.hostPlatform.isDarwin [ CoreServices Security SystemConfiguration diff --git a/pkgs/development/tools/rust/cargo-udeps/default.nix b/pkgs/development/tools/rust/cargo-udeps/default.nix index bc72b8a6a757..a41e2616ba89 100644 --- a/pkgs/development/tools/rust/cargo-udeps/default.nix +++ b/pkgs/development/tools/rust/cargo-udeps/default.nix @@ -17,7 +17,7 @@ rustPlatform.buildRustPackage rec { # TODO figure out how to use provided curl instead of compiling curl from curl-sys buildInputs = [ openssl ] - ++ lib.optionals stdenv.isDarwin [ CoreServices Security libiconv SystemConfiguration ]; + ++ lib.optionals stdenv.hostPlatform.isDarwin [ CoreServices Security libiconv SystemConfiguration ]; # Requires network access doCheck = false; diff --git a/pkgs/development/tools/rust/cargo-ui/default.nix b/pkgs/development/tools/rust/cargo-ui/default.nix index 01578e497deb..fedd72458c8e 100644 --- a/pkgs/development/tools/rust/cargo-ui/default.nix +++ b/pkgs/development/tools/rust/cargo-ui/default.nix @@ -30,7 +30,7 @@ rustPlatform.buildRustPackage rec { buildInputs = [ libgit2 openssl - ] ++ lib.optionals stdenv.isLinux [ + ] ++ lib.optionals stdenv.hostPlatform.isLinux [ expat fontconfig libGL @@ -39,11 +39,11 @@ rustPlatform.buildRustPackage rec { xorg.libXi xorg.libXrandr xorg.libxcb - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.AppKit ]; - postFixup = lib.optionalString stdenv.isLinux '' + postFixup = lib.optionalString stdenv.hostPlatform.isLinux '' patchelf $out/bin/cargo-ui \ --add-rpath ${lib.makeLibraryPath [ fontconfig libGL ]} ''; diff --git a/pkgs/development/tools/rust/cargo-unused-features/default.nix b/pkgs/development/tools/rust/cargo-unused-features/default.nix index 32fae29d903a..cf1fd1deb398 100644 --- a/pkgs/development/tools/rust/cargo-unused-features/default.nix +++ b/pkgs/development/tools/rust/cargo-unused-features/default.nix @@ -29,7 +29,7 @@ rustPlatform.buildRustPackage rec { curl libgit2 openssl - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.CoreFoundation darwin.apple_sdk.frameworks.Security ]; diff --git a/pkgs/development/tools/rust/cargo-update/default.nix b/pkgs/development/tools/rust/cargo-update/default.nix index f2aa80920811..b98d1dd513e0 100644 --- a/pkgs/development/tools/rust/cargo-update/default.nix +++ b/pkgs/development/tools/rust/cargo-update/default.nix @@ -30,7 +30,7 @@ rustPlatform.buildRustPackage rec { installShellFiles pkg-config ronn - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ curl ]; @@ -39,7 +39,7 @@ rustPlatform.buildRustPackage rec { libssh2 openssl zlib - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ curl darwin.apple_sdk.frameworks.Security ]; diff --git a/pkgs/development/tools/rust/cargo-vet/default.nix b/pkgs/development/tools/rust/cargo-vet/default.nix index 96822b3078d2..69c5d69d2c69 100644 --- a/pkgs/development/tools/rust/cargo-vet/default.nix +++ b/pkgs/development/tools/rust/cargo-vet/default.nix @@ -13,7 +13,7 @@ rustPlatform.buildRustPackage rec { cargoHash = "sha256-M8sZzgSEMIB6pPVaE+tC18MCbwYaYpHOnhrEvm9JTso="; - buildInputs = lib.optional stdenv.isDarwin Security; + buildInputs = lib.optional stdenv.hostPlatform.isDarwin Security; # the test_project tests require internet access checkFlags = [ diff --git a/pkgs/development/tools/rust/cargo-watch/default.nix b/pkgs/development/tools/rust/cargo-watch/default.nix index 69c04b520b30..1033476eb976 100644 --- a/pkgs/development/tools/rust/cargo-watch/default.nix +++ b/pkgs/development/tools/rust/cargo-watch/default.nix @@ -19,9 +19,9 @@ rustPlatform.buildRustPackage rec { cargoHash = "sha256-skUG1B6TCFEXeQSRwA6vWjXmNifk5bTR4+JESw7CZMo="; - buildInputs = lib.optionals stdenv.isDarwin [ Foundation Cocoa ]; + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ Foundation Cocoa ]; - NIX_LDFLAGS = lib.optionals (stdenv.isDarwin && stdenv.isx86_64) [ "-framework" "AppKit" ]; + NIX_LDFLAGS = lib.optionals (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isx86_64) [ "-framework" "AppKit" ]; # `test with_cargo` tries to call cargo-watch as a cargo subcommand # (calling cargo-watch with command `cargo watch`) diff --git a/pkgs/development/tools/rust/cargo-web/default.nix b/pkgs/development/tools/rust/cargo-web/default.nix index 11f1fc6aacf0..7bbc503fd128 100644 --- a/pkgs/development/tools/rust/cargo-web/default.nix +++ b/pkgs/development/tools/rust/cargo-web/default.nix @@ -16,7 +16,7 @@ rustPlatform.buildRustPackage rec { cargoHash = "sha256-apPXSG8RV9hZ+jttn4XHhgmuLQ7344SQJna7Z/fu/mA="; nativeBuildInputs = [ openssl perl pkg-config ]; - buildInputs = lib.optionals stdenv.isDarwin [ CoreServices Security ]; + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ CoreServices Security ]; meta = with lib; { description = "Cargo subcommand for the client-side Web"; diff --git a/pkgs/development/tools/rust/cargo-whatfeatures/default.nix b/pkgs/development/tools/rust/cargo-whatfeatures/default.nix index 4e757c6402a3..42b3078f4e94 100644 --- a/pkgs/development/tools/rust/cargo-whatfeatures/default.nix +++ b/pkgs/development/tools/rust/cargo-whatfeatures/default.nix @@ -16,7 +16,7 @@ rustPlatform.buildRustPackage rec { nativeBuildInputs = [ pkg-config ]; buildInputs = [ openssl ] - ++ lib.optionals stdenv.isDarwin [ Security ]; + ++ lib.optionals stdenv.hostPlatform.isDarwin [ Security ]; meta = with lib; { description = "Simple cargo plugin to get a list of features for a specific crate"; diff --git a/pkgs/development/tools/rust/cargo-workspaces/default.nix b/pkgs/development/tools/rust/cargo-workspaces/default.nix index 32c4730b3940..5e0b5483e754 100644 --- a/pkgs/development/tools/rust/cargo-workspaces/default.nix +++ b/pkgs/development/tools/rust/cargo-workspaces/default.nix @@ -28,7 +28,7 @@ rustPlatform.buildRustPackage rec { libssh2 openssl zlib - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.Security darwin.apple_sdk.frameworks.SystemConfiguration ]; diff --git a/pkgs/development/tools/rust/cbindgen/default.nix b/pkgs/development/tools/rust/cbindgen/default.nix index 95dacabcf5d2..ff4cfdf9ef86 100644 --- a/pkgs/development/tools/rust/cbindgen/default.nix +++ b/pkgs/development/tools/rust/cbindgen/default.nix @@ -25,7 +25,7 @@ rustPlatform.buildRustPackage rec { cargoHash = "sha256-l4FgwXdibek4BAnqjWd1rLxpEwuMNjYgvo6X3SS3fRo="; - buildInputs = lib.optional stdenv.isDarwin Security; + buildInputs = lib.optional stdenv.hostPlatform.isDarwin Security; nativeCheckInputs = [ cmake @@ -40,7 +40,7 @@ rustPlatform.buildRustPackage rec { "--skip lib_default_uses_debug_build" "--skip lib_explicit_debug_build" "--skip lib_explicit_release_build" - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ # WORKAROUND: test_body fails when using clang # https://github.com/eqrion/cbindgen/issues/628 "--skip test_body" diff --git a/pkgs/development/tools/rust/dioxus-cli/default.nix b/pkgs/development/tools/rust/dioxus-cli/default.nix index 68632a1d6002..b66b99b87bd3 100644 --- a/pkgs/development/tools/rust/dioxus-cli/default.nix +++ b/pkgs/development/tools/rust/dioxus-cli/default.nix @@ -23,7 +23,7 @@ rustPlatform.buildRustPackage rec { cargoHash = "sha256-shllaNdg9g6fD8qRyCKpN47keFUTu0g96MzVX4BrhXI="; nativeBuildInputs = [ pkg-config cacert ]; - buildInputs = [ openssl ] ++ lib.optionals stdenv.isDarwin [ + buildInputs = [ openssl ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.CoreServices darwin.apple_sdk.frameworks.SystemConfiguration ]; diff --git a/pkgs/development/tools/rust/duckscript/default.nix b/pkgs/development/tools/rust/duckscript/default.nix index be536194d290..dfdb3e5e008f 100644 --- a/pkgs/development/tools/rust/duckscript/default.nix +++ b/pkgs/development/tools/rust/duckscript/default.nix @@ -21,7 +21,7 @@ rustPlatform.buildRustPackage rec { nativeBuildInputs = [ pkg-config ]; buildInputs = [ openssl ] - ++ lib.optionals stdenv.isDarwin [ Security SystemConfiguration libiconv ]; + ++ lib.optionals stdenv.hostPlatform.isDarwin [ Security SystemConfiguration libiconv ]; cargoHash = "sha256-bBqcHETEWooMgQeqPOZIK/77DdTtGq1JusBKoRj5K6w="; diff --git a/pkgs/development/tools/rust/humility/default.nix b/pkgs/development/tools/rust/humility/default.nix index a8c157f9ac4d..5486d0785233 100644 --- a/pkgs/development/tools/rust/humility/default.nix +++ b/pkgs/development/tools/rust/humility/default.nix @@ -14,7 +14,7 @@ rustPlatform.buildRustPackage rec { version = "unstable-2023-11-08"; nativeBuildInputs = [ pkg-config cargo-readme ]; - buildInputs = [ libusb1 libftdi ] ++ lib.optionals stdenv.isDarwin [ + buildInputs = [ libusb1 libftdi ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ AppKit ]; diff --git a/pkgs/development/tools/rust/panamax/default.nix b/pkgs/development/tools/rust/panamax/default.nix index 16d8176de4eb..3ca774d0d30f 100644 --- a/pkgs/development/tools/rust/panamax/default.nix +++ b/pkgs/development/tools/rust/panamax/default.nix @@ -26,7 +26,7 @@ rustPlatform.buildRustPackage rec { libgit2 openssl zlib - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.Security darwin.apple_sdk.frameworks.SystemConfiguration ]; diff --git a/pkgs/development/tools/rust/rust-analyzer/default.nix b/pkgs/development/tools/rust/rust-analyzer/default.nix index 6326657372c4..7fd2aafb7054 100644 --- a/pkgs/development/tools/rust/rust-analyzer/default.nix +++ b/pkgs/development/tools/rust/rust-analyzer/default.nix @@ -32,7 +32,7 @@ rustPlatform.buildRustPackage rec { nativeBuildInputs = lib.optional useMimalloc cmake; - buildInputs = lib.optionals stdenv.isDarwin [ + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ CoreServices libiconv ]; diff --git a/pkgs/development/tools/rust/rustup-toolchain-install-master/default.nix b/pkgs/development/tools/rust/rustup-toolchain-install-master/default.nix index d71b1e655d78..f5dacb999a68 100644 --- a/pkgs/development/tools/rust/rustup-toolchain-install-master/default.nix +++ b/pkgs/development/tools/rust/rustup-toolchain-install-master/default.nix @@ -41,13 +41,13 @@ rustPlatform.buildRustPackage rec { --subst-var libPath ''; in - lib.optionals stdenv.isLinux [ patchelfPatch ]; + lib.optionals stdenv.hostPlatform.isLinux [ patchelfPatch ]; nativeBuildInputs = [ pkg-config ]; buildInputs = [ openssl xz - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ Security ]; diff --git a/pkgs/development/tools/rust/rustup/default.nix b/pkgs/development/tools/rust/rustup/default.nix index b59d9d08ef23..5824696a43ac 100644 --- a/pkgs/development/tools/rust/rustup/default.nix +++ b/pkgs/development/tools/rust/rustup/default.nix @@ -39,13 +39,13 @@ rustPlatform.buildRustPackage rec { buildInputs = [ (curl.override { inherit openssl; }) zlib - ] ++ lib.optionals stdenv.isDarwin [ CoreServices Security libiconv xz ]; + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ CoreServices Security libiconv xz ]; buildFeatures = [ "no-self-update" ]; checkFeatures = [ "test" ]; - patches = lib.optionals stdenv.isLinux [ + patches = lib.optionals stdenv.hostPlatform.isLinux [ (runCommand "0001-dynamically-patchelf-binaries.patch" { CC = stdenv.cc; @@ -62,7 +62,7 @@ rustPlatform.buildRustPackage rec { # Random tests fail nondeterministically on macOS. # TODO: Investigate this. - doCheck = !stdenv.isDarwin; + doCheck = !stdenv.hostPlatform.isDarwin; # skip failing tests checkFlags = [ diff --git a/pkgs/development/tools/rust/rustycli/default.nix b/pkgs/development/tools/rust/rustycli/default.nix index 09bc2e44f748..ce16743a0715 100644 --- a/pkgs/development/tools/rust/rustycli/default.nix +++ b/pkgs/development/tools/rust/rustycli/default.nix @@ -16,7 +16,7 @@ rustPlatform.buildRustPackage rec { cargoHash = "sha256-WU3lgGJH6qVDI1Un3HBqg0edqiP5sobTsAIXdnjeNTU="; - buildInputs = lib.optionals stdenv.isDarwin [ + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.Security ]; diff --git a/pkgs/development/tools/rust/sqlx-cli/default.nix b/pkgs/development/tools/rust/sqlx-cli/default.nix index ca608dafd10c..71f6b2b9ddcd 100644 --- a/pkgs/development/tools/rust/sqlx-cli/default.nix +++ b/pkgs/development/tools/rust/sqlx-cli/default.nix @@ -45,10 +45,10 @@ rustPlatform.buildRustPackage rec { ]; buildInputs = - lib.optionals stdenv.isLinux [ + lib.optionals stdenv.hostPlatform.isLinux [ openssl ] ++ - lib.optionals stdenv.isDarwin [ + lib.optionals stdenv.hostPlatform.isDarwin [ CoreFoundation Security SystemConfiguration diff --git a/pkgs/development/tools/sauce-connect/default.nix b/pkgs/development/tools/sauce-connect/default.nix index 562125acf068..6d3c5434e20a 100644 --- a/pkgs/development/tools/sauce-connect/default.nix +++ b/pkgs/development/tools/sauce-connect/default.nix @@ -23,7 +23,7 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ unzip ]; - patchPhase = lib.optionalString stdenv.isLinux '' + patchPhase = lib.optionalString stdenv.hostPlatform.isLinux '' patchelf \ --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \ --set-rpath "$out/lib:${lib.makeLibraryPath [zlib]}" \ diff --git a/pkgs/development/tools/scenic-view/default.nix b/pkgs/development/tools/scenic-view/default.nix index 3fc74d7e3c73..925fc8d5b29d 100644 --- a/pkgs/development/tools/scenic-view/default.nix +++ b/pkgs/development/tools/scenic-view/default.nix @@ -1,6 +1,6 @@ { lib, stdenv, fetchFromGitHub, openjdk, openjfx, gradle_7, makeDesktopItem, makeWrapper }: let - jdk = openjdk.override (lib.optionalAttrs stdenv.isLinux { + jdk = openjdk.override (lib.optionalAttrs stdenv.hostPlatform.isLinux { enableJavaFX = true; openjfx = openjfx.override { withWebKit = true; }; }); @@ -52,7 +52,7 @@ in stdenv.mkDerivation rec { desktopItems = [ desktopItem ]; meta = with lib; { - broken = stdenv.isDarwin; + broken = stdenv.hostPlatform.isDarwin; description = "JavaFx application to visualize and modify the scenegraph of running JavaFx applications"; mainProgram = "scenic-view"; longDescription = '' diff --git a/pkgs/development/tools/sea-orm-cli/default.nix b/pkgs/development/tools/sea-orm-cli/default.nix index 1562780858ae..6e9df125e3bb 100644 --- a/pkgs/development/tools/sea-orm-cli/default.nix +++ b/pkgs/development/tools/sea-orm-cli/default.nix @@ -18,7 +18,7 @@ rustPlatform.buildRustPackage rec { nativeBuildInputs = [ pkg-config ]; buildInputs = [ openssl ] - ++ lib.optionals stdenv.isDarwin [ darwin.apple_sdk.frameworks.SystemConfiguration ]; + ++ lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.SystemConfiguration ]; cargoHash = "sha256-ZGM+Y67ycBiukgEBUq+WiA1OUCGahya591gM6CGwzMQ="; diff --git a/pkgs/development/tools/selene/default.nix b/pkgs/development/tools/selene/default.nix index 0d836fe7a24d..bcd1409b9985 100644 --- a/pkgs/development/tools/selene/default.nix +++ b/pkgs/development/tools/selene/default.nix @@ -27,7 +27,7 @@ rustPlatform.buildRustPackage rec { buildInputs = lib.optionals robloxSupport [ openssl - ] ++ lib.optionals (robloxSupport && stdenv.isDarwin) [ + ] ++ lib.optionals (robloxSupport && stdenv.hostPlatform.isDarwin) [ darwin.apple_sdk.frameworks.Security ]; diff --git a/pkgs/development/tools/semantic-release/default.nix b/pkgs/development/tools/semantic-release/default.nix index 95f92919d15d..da97f7e61bb8 100644 --- a/pkgs/development/tools/semantic-release/default.nix +++ b/pkgs/development/tools/semantic-release/default.nix @@ -23,7 +23,7 @@ buildNpmPackage rec { nativeBuildInputs = [ python3 - ] ++ lib.optional stdenv.isDarwin cctools; + ] ++ lib.optional stdenv.hostPlatform.isDarwin cctools; # Fixes `semantic-release --version` output postPatch = '' diff --git a/pkgs/development/tools/sentry-cli/default.nix b/pkgs/development/tools/sentry-cli/default.nix index 2adcaf4dc462..52e7927bb18a 100644 --- a/pkgs/development/tools/sentry-cli/default.nix +++ b/pkgs/development/tools/sentry-cli/default.nix @@ -24,7 +24,7 @@ rustPlatform.buildRustPackage rec { # Needed to get openssl-sys to use pkgconfig. OPENSSL_NO_VENDOR = 1; - buildInputs = [ openssl ] ++ lib.optionals stdenv.isDarwin [ CoreServices Security SystemConfiguration ]; + buildInputs = [ openssl ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ CoreServices Security SystemConfiguration ]; nativeBuildInputs = [ installShellFiles pkg-config ]; cargoHash = "sha256-fzQfU3xlRwV/GI69+sd7zz4okbNHbFAskJPgI1X0KQo="; diff --git a/pkgs/development/tools/simavr/default.nix b/pkgs/development/tools/simavr/default.nix index deab8539ef14..e50986dd6502 100644 --- a/pkgs/development/tools/simavr/default.nix +++ b/pkgs/development/tools/simavr/default.nix @@ -31,12 +31,12 @@ in stdenv.mkDerivation rec { ]; nativeBuildInputs = [ which pkg-config avrgcc ] - ++ lib.optional stdenv.isDarwin setupHookDarwin; + ++ lib.optional stdenv.hostPlatform.isDarwin setupHookDarwin; buildInputs = [ libelf libglut libGLU libGL ] - ++ lib.optional stdenv.isDarwin GLUT; + ++ lib.optional stdenv.hostPlatform.isDarwin GLUT; # remove forbidden references to $TMPDIR - preFixup = lib.optionalString stdenv.isLinux '' + preFixup = lib.optionalString stdenv.hostPlatform.isLinux '' patchelf --shrink-rpath --allowed-rpath-prefixes "$NIX_STORE" "$out"/bin/* ''; diff --git a/pkgs/development/tools/skopeo/default.nix b/pkgs/development/tools/skopeo/default.nix index 082abb488cb7..facfb6e7c56a 100644 --- a/pkgs/development/tools/skopeo/default.nix +++ b/pkgs/development/tools/skopeo/default.nix @@ -36,7 +36,7 @@ buildGoModule rec { nativeBuildInputs = [ pkg-config go-md2man installShellFiles makeWrapper ]; buildInputs = [ gpgme ] - ++ lib.optionals stdenv.isLinux [ lvm2 btrfs-progs ]; + ++ lib.optionals stdenv.hostPlatform.isLinux [ lvm2 btrfs-progs ]; buildPhase = '' runHook preBuild @@ -49,7 +49,7 @@ buildGoModule rec { runHook preInstall PREFIX=${placeholder "out"} make install-binary install-completions install-docs install ${passthru.policy}/default-policy.json -Dt $out/etc/containers - '' + lib.optionalString stdenv.isLinux '' + '' + lib.optionalString stdenv.hostPlatform.isLinux '' wrapProgram $out/bin/skopeo \ --prefix PATH : ${lib.makeBinPath [ fuse-overlayfs ]} '' + '' diff --git a/pkgs/development/tools/spr/default.nix b/pkgs/development/tools/spr/default.nix index 7ecd5dcfb257..d7a9b4530c63 100644 --- a/pkgs/development/tools/spr/default.nix +++ b/pkgs/development/tools/spr/default.nix @@ -16,7 +16,7 @@ rustPlatform.buildRustPackage rec { cargoHash = "sha256-VQg3HDNw+L1FsFtHXnIw6dMVUxV63ZWHCxiknzsqXW8="; - buildInputs = lib.optional stdenv.isDarwin Security; + buildInputs = lib.optional stdenv.hostPlatform.isDarwin Security; meta = with lib; { description = "Submit pull requests for individual, amendable, rebaseable commits to GitHub"; diff --git a/pkgs/development/tools/sqsh/default.nix b/pkgs/development/tools/sqsh/default.nix index ec071f739efa..e7b0342ac697 100644 --- a/pkgs/development/tools/sqsh/default.nix +++ b/pkgs/development/tools/sqsh/default.nix @@ -14,7 +14,7 @@ in stdenv.mkDerivation rec { preConfigure = '' export SYBASE=${freetds} - '' + lib.optionalString stdenv.isDarwin '' + '' + lib.optionalString stdenv.hostPlatform.isDarwin '' substituteInPlace configure --replace "libct.so" "libct.dylib" ''; diff --git a/pkgs/development/tools/squawk/default.nix b/pkgs/development/tools/squawk/default.nix index 5270523caf6e..2190401c00bd 100644 --- a/pkgs/development/tools/squawk/default.nix +++ b/pkgs/development/tools/squawk/default.nix @@ -27,10 +27,10 @@ rustPlatform.buildRustPackage rec { rustPlatform.bindgenHook ]; - buildInputs = lib.optionals (!stdenv.isDarwin) [ + buildInputs = lib.optionals (!stdenv.hostPlatform.isDarwin) [ libiconv openssl - ] ++ lib.optionals stdenv.isDarwin (with darwin.apple_sdk.frameworks; [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin (with darwin.apple_sdk.frameworks; [ CoreFoundation Security ]); diff --git a/pkgs/development/tools/subxt/default.nix b/pkgs/development/tools/subxt/default.nix index e239483e4a61..73907cac3731 100644 --- a/pkgs/development/tools/subxt/default.nix +++ b/pkgs/development/tools/subxt/default.nix @@ -25,7 +25,7 @@ rustPlatform.buildRustPackage rec { # Needed by wabt-sys nativeBuildInputs = [ cmake ]; - buildInputs = lib.optionals stdenv.isDarwin [ + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.Security ]; diff --git a/pkgs/development/tools/taplo/default.nix b/pkgs/development/tools/taplo/default.nix index 77774a0d9a72..d353127070a8 100644 --- a/pkgs/development/tools/taplo/default.nix +++ b/pkgs/development/tools/taplo/default.nix @@ -26,7 +26,7 @@ rustPlatform.buildRustPackage rec { buildInputs = [ openssl - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.Security darwin.apple_sdk.frameworks.SystemConfiguration ]; diff --git a/pkgs/development/tools/tarmac/default.nix b/pkgs/development/tools/tarmac/default.nix index 34471106d73a..a2b03fa93cbd 100644 --- a/pkgs/development/tools/tarmac/default.nix +++ b/pkgs/development/tools/tarmac/default.nix @@ -28,7 +28,7 @@ rustPlatform.buildRustPackage rec { buildInputs = [ openssl - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ Security ]; diff --git a/pkgs/development/tools/teller/default.nix b/pkgs/development/tools/teller/default.nix index 16e44c4637c6..21eb39d6558a 100644 --- a/pkgs/development/tools/teller/default.nix +++ b/pkgs/development/tools/teller/default.nix @@ -33,7 +33,7 @@ rustPlatform.buildRustPackage { buildInputs = [ openssl - ] ++ lib.optionals stdenv.isDarwin [ darwin.apple_sdk.frameworks.SystemConfiguration ]; + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.SystemConfiguration ]; doCheck = false; diff --git a/pkgs/development/tools/the-way/default.nix b/pkgs/development/tools/the-way/default.nix index 550553385828..2101512886fc 100644 --- a/pkgs/development/tools/the-way/default.nix +++ b/pkgs/development/tools/the-way/default.nix @@ -13,7 +13,7 @@ rustPlatform.buildRustPackage rec { nativeBuildInputs = [ installShellFiles ]; - buildInputs = lib.optionals stdenv.isDarwin [ + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.AppKit ]; diff --git a/pkgs/development/tools/trunk/default.nix b/pkgs/development/tools/trunk/default.nix index 17cf053b98f1..9845c565196b 100644 --- a/pkgs/development/tools/trunk/default.nix +++ b/pkgs/development/tools/trunk/default.nix @@ -20,7 +20,7 @@ rustPlatform.buildRustPackage rec { }; nativeBuildInputs = [ pkg-config ]; - buildInputs = if stdenv.isDarwin + buildInputs = if stdenv.hostPlatform.isDarwin then [ CoreServices SystemConfiguration ] else [ openssl ]; # requires network diff --git a/pkgs/development/tools/ttfb/default.nix b/pkgs/development/tools/ttfb/default.nix index c2c599f32ff7..e9bc3c11bdfb 100644 --- a/pkgs/development/tools/ttfb/default.nix +++ b/pkgs/development/tools/ttfb/default.nix @@ -14,7 +14,7 @@ rustPlatform.buildRustPackage rec { hash = "sha256-Cdup65w31wF1RZu0g4/msHfLESrNTcuCU5kxkk0gnW8="; }; - buildInputs = lib.optionals stdenv.isDarwin [ + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.Security ]; diff --git a/pkgs/development/tools/vagrant/default.nix b/pkgs/development/tools/vagrant/default.nix index 064f1cf6baaa..6eb3ceca77aa 100644 --- a/pkgs/development/tools/vagrant/default.nix +++ b/pkgs/development/tools/vagrant/default.nix @@ -1,5 +1,5 @@ { stdenv, lib, fetchurl, buildRubyGem, bundlerEnv, ruby, libarchive -, libguestfs, qemu, writeText, withLibvirt ? stdenv.isLinux +, libguestfs, qemu, writeText, withLibvirt ? stdenv.hostPlatform.isLinux , openssl }: diff --git a/pkgs/development/tools/viceroy/default.nix b/pkgs/development/tools/viceroy/default.nix index 16282c7f7dd9..34c547a461fe 100644 --- a/pkgs/development/tools/viceroy/default.nix +++ b/pkgs/development/tools/viceroy/default.nix @@ -11,7 +11,7 @@ rustPlatform.buildRustPackage rec { hash = "sha256-0jED0Ju7ojqDxfEjZKmWuCfGR830/gJF5p+QtcVajIY="; }; - buildInputs = lib.optional stdenv.isDarwin Security; + buildInputs = lib.optional stdenv.hostPlatform.isDarwin Security; cargoHash = "sha256-rSZe/MrJlbB0oaAsKg38mEnS3pqe9Rk4/aoRuLlOUFc="; diff --git a/pkgs/development/tools/volta/default.nix b/pkgs/development/tools/volta/default.nix index 15c9c493b797..c49145e0a9d6 100644 --- a/pkgs/development/tools/volta/default.nix +++ b/pkgs/development/tools/volta/default.nix @@ -28,7 +28,7 @@ rustPlatform.buildRustPackage rec { }; buildInputs = [ installShellFiles ] - ++ lib.optionals stdenv.isDarwin [ darwin.apple_sdk.frameworks.Security libiconv ]; + ++ lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.Security libiconv ]; HOME = "$TMPDIR"; diff --git a/pkgs/development/tools/wails/default.nix b/pkgs/development/tools/wails/default.nix index 8988424d7738..de73c6b63764 100644 --- a/pkgs/development/tools/wails/default.nix +++ b/pkgs/development/tools/wails/default.nix @@ -46,7 +46,7 @@ buildGoModule rec { go stdenv.cc nodejs - ] ++ lib.optionals stdenv.isLinux [ + ] ++ lib.optionals stdenv.hostPlatform.isLinux [ gtk3 webkitgtk ]; @@ -60,7 +60,7 @@ buildGoModule rec { postFixup = '' wrapProgram $out/bin/wails \ --prefix PATH : ${lib.makeBinPath [ pkg-config go stdenv.cc nodejs ]} \ - --prefix LD_LIBRARY_PATH : "${lib.makeLibraryPath (lib.optionals stdenv.isLinux [ gtk3 webkitgtk ])}" \ + --prefix LD_LIBRARY_PATH : "${lib.makeLibraryPath (lib.optionals stdenv.hostPlatform.isLinux [ gtk3 webkitgtk ])}" \ --set PKG_CONFIG_PATH "$PKG_CONFIG_PATH" \ --set CGO_LDFLAGS "-L${lib.makeLibraryPath [ zlib ]}" ''; diff --git a/pkgs/development/tools/wasm-pack/default.nix b/pkgs/development/tools/wasm-pack/default.nix index 305a4e666c42..42f59dfd8403 100644 --- a/pkgs/development/tools/wasm-pack/default.nix +++ b/pkgs/development/tools/wasm-pack/default.nix @@ -27,7 +27,7 @@ rustPlatform.buildRustPackage rec { pkg-config ]; - buildInputs = lib.optional stdenv.isDarwin darwin.apple_sdk.frameworks.Security ++ [ zstd ]; + buildInputs = lib.optional stdenv.hostPlatform.isDarwin darwin.apple_sdk.frameworks.Security ++ [ zstd ]; # Most tests rely on external resources and build artifacts. # Disabling check here to work with build sandboxing. diff --git a/pkgs/development/tools/wasmedge/default.nix b/pkgs/development/tools/wasmedge/default.nix index 938fcba2da2e..3a6f256339ac 100644 --- a/pkgs/development/tools/wasmedge/default.nix +++ b/pkgs/development/tools/wasmedge/default.nix @@ -33,13 +33,13 @@ stdenv.mkDerivation (finalAttrs: { llvmPackages.llvm libxml2 libffi - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ Foundation ]; cmakeFlags = [ "-DWASMEDGE_BUILD_TESTS=OFF" # Tests are downloaded using git - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ "-DWASMEDGE_FORCE_DISABLE_LTO=ON" ]; diff --git a/pkgs/development/tools/watchman/default.nix b/pkgs/development/tools/watchman/default.nix index b60872dce673..aa915d89c7fa 100644 --- a/pkgs/development/tools/watchman/default.nix +++ b/pkgs/development/tools/watchman/default.nix @@ -49,7 +49,7 @@ stdenv.mkDerivation rec { "-DENABLE_EDEN_SUPPORT=NO" # requires sapling (formerly known as eden), which is not packaged in nixpkgs "-DWATCHMAN_STATE_DIR=${stateDir}" "-DWATCHMAN_VERSION_OVERRIDE=${version}" - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ "-DCMAKE_OSX_DEPLOYMENT_TARGET=10.14" # For aligned allocation ]; @@ -84,7 +84,7 @@ stdenv.mkDerivation rec { lz4 zstd libiconv - ] ++ lib.optionals stdenv.isDarwin [ CoreServices ]; + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ CoreServices ]; cargoRoot = "watchman/cli"; diff --git a/pkgs/development/tools/winhelpcgi/default.nix b/pkgs/development/tools/winhelpcgi/default.nix index c2d4dd31bf1c..51383b5b792d 100644 --- a/pkgs/development/tools/winhelpcgi/default.nix +++ b/pkgs/development/tools/winhelpcgi/default.nix @@ -19,6 +19,6 @@ license = lib.licenses.gpl2Only; maintainers = [ lib.maintainers.shlevy ]; platforms = lib.platforms.linux; - broken = stdenv.isAarch64; + broken = stdenv.hostPlatform.isAarch64; }; } diff --git a/pkgs/development/tools/worker-build/default.nix b/pkgs/development/tools/worker-build/default.nix index fd7c1e378603..cc48ae31d39b 100644 --- a/pkgs/development/tools/worker-build/default.nix +++ b/pkgs/development/tools/worker-build/default.nix @@ -18,7 +18,7 @@ rustPlatform.buildRustPackage rec { }; }; - buildInputs = lib.optionals stdenv.isDarwin [ Security ]; + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ Security ]; buildAndTestSubdir = "worker-build"; diff --git a/pkgs/development/tools/wrangler_1/default.nix b/pkgs/development/tools/wrangler_1/default.nix index 7fc33c2dda6d..570092b7ee48 100644 --- a/pkgs/development/tools/wrangler_1/default.nix +++ b/pkgs/development/tools/wrangler_1/default.nix @@ -16,7 +16,7 @@ rustPlatform.buildRustPackage rec { nativeBuildInputs = [ pkg-config ]; buildInputs = [ openssl ] - ++ lib.optionals stdenv.isDarwin [ curl CoreFoundation CoreServices Security libiconv ]; + ++ lib.optionals stdenv.hostPlatform.isDarwin [ curl CoreFoundation CoreServices Security libiconv ]; OPENSSL_NO_VENDOR = 1; diff --git a/pkgs/development/tools/wxformbuilder/default.nix b/pkgs/development/tools/wxformbuilder/default.nix index ad31bcad0d7b..7a5d7a933216 100644 --- a/pkgs/development/tools/wxformbuilder/default.nix +++ b/pkgs/development/tools/wxformbuilder/default.nix @@ -37,21 +37,21 @@ stdenv.mkDerivation (finalAttrs: { nativeBuildInputs = [ cmake - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ darwin.sigtool makeWrapper - ] ++ lib.optionals stdenv.isLinux [ + ] ++ lib.optionals stdenv.hostPlatform.isLinux [ shared-mime-info ]; buildInputs = [ boost wxGTK32 - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.Cocoa ]; - postInstall = lib.optionalString stdenv.isDarwin '' + postInstall = lib.optionalString stdenv.hostPlatform.isDarwin '' mkdir -p $out/{Applications,bin} mv $out/wxFormBuilder.app $out/Applications makeWrapper $out/Applications/wxFormBuilder.app/Contents/MacOS/wxFormBuilder $out/bin/wxformbuilder diff --git a/pkgs/development/tools/xcbuild/default.nix b/pkgs/development/tools/xcbuild/default.nix index 8dc527c0e1f5..e30700ca2025 100644 --- a/pkgs/development/tools/xcbuild/default.nix +++ b/pkgs/development/tools/xcbuild/default.nix @@ -38,7 +38,7 @@ in stdenv.mkDerivation { cp -r --no-preserve=all ${linenoise} ThirdParty/linenoise ''; - postPatch = lib.optionalString (!stdenv.isDarwin) '' + postPatch = lib.optionalString (!stdenv.hostPlatform.isDarwin) '' # Fix build on gcc-13 due to missing includes sed -e '1i #include ' -i \ Libraries/libutil/Headers/libutil/Permissions.h \ @@ -48,7 +48,7 @@ in stdenv.mkDerivation { # Avoid a glibc >= 2.25 deprecation warning that gets fatal via -Werror. sed 1i'#include ' \ -i Libraries/xcassets/Headers/xcassets/Slot/SystemVersion.h - '' + lib.optionalString stdenv.isDarwin '' + '' + lib.optionalString stdenv.hostPlatform.isDarwin '' # Apple Open Sourced LZFSE, but not libcompression, and it isn't # part of an impure framework we can add substituteInPlace Libraries/libcar/Sources/Rendition.cpp \ @@ -68,7 +68,7 @@ in stdenv.mkDerivation { nativeBuildInputs = [ cmake ninja ]; buildInputs = [ zlib libxml2 libpng ] - ++ lib.optionals stdenv.isDarwin [ CoreServices CoreGraphics ImageIO ]; + ++ lib.optionals stdenv.hostPlatform.isDarwin [ CoreServices CoreGraphics ImageIO ]; meta = with lib; { description = "Xcode-compatible build tool"; diff --git a/pkgs/development/tools/xcbuild/platforms.nix b/pkgs/development/tools/xcbuild/platforms.nix index 0108ac8ef697..333e5471b976 100644 --- a/pkgs/development/tools/xcbuild/platforms.nix +++ b/pkgs/development/tools/xcbuild/platforms.nix @@ -48,7 +48,7 @@ let ArchitectureSetting = "ARCHS_STANDARD_64_BIT"; } { - Identifier = if stdenv.isAarch64 then "arm64" else "x86_64"; + Identifier = if stdenv.hostPlatform.isAarch64 then "arm64" else "x86_64"; Type = "Architecture"; Name = "Apple Silicon or Intel 64-bit"; } diff --git a/pkgs/development/tools/xcbuild/toolchains.nix b/pkgs/development/tools/xcbuild/toolchains.nix index a5e8ed28ce1e..2da12ba7cbcb 100644 --- a/pkgs/development/tools/xcbuild/toolchains.nix +++ b/pkgs/development/tools/xcbuild/toolchains.nix @@ -59,7 +59,7 @@ runCommand "Toolchains" {} ('' ln -s ${buildPackages.gperf}/bin/gperf $toolchain/bin/gperf ln -s ${buildPackages.indent}/bin/indent $toolchain/bin/indent ln -s ${buildPackages.ctags}/bin/ctags $toolchain/bin/ctags -'' + optionalString stdenv.isDarwin '' +'' + optionalString stdenv.hostPlatform.isDarwin '' for bin in ${getBin buildPackages.cctools}/bin/*; do if ! [ -e "$toolchain/bin/$(basename $bin)" ]; then ln -s $bin $toolchain/bin diff --git a/pkgs/development/web/boa/default.nix b/pkgs/development/web/boa/default.nix index 122e0df08aa4..9f695ff7d793 100644 --- a/pkgs/development/web/boa/default.nix +++ b/pkgs/development/web/boa/default.nix @@ -38,7 +38,7 @@ rustPlatform.buildRustPackage rec { buildInputs = [ bzip2 openssl zstd ] - ++ lib.optionals stdenv.isDarwin [ + ++ lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.CoreFoundation darwin.apple_sdk.frameworks.Security ]; diff --git a/pkgs/development/web/bun/default.nix b/pkgs/development/web/bun/default.nix index c3ff06006b37..6e187aa3fe03 100644 --- a/pkgs/development/web/bun/default.nix +++ b/pkgs/development/web/bun/default.nix @@ -18,7 +18,7 @@ stdenvNoCC.mkDerivation rec { src = passthru.sources.${stdenvNoCC.hostPlatform.system} or (throw "Unsupported system: ${stdenvNoCC.hostPlatform.system}"); strictDeps = true; - nativeBuildInputs = [ unzip installShellFiles ] ++ lib.optionals stdenvNoCC.isLinux [ autoPatchelfHook ]; + nativeBuildInputs = [ unzip installShellFiles ] ++ lib.optionals stdenvNoCC.hostPlatform.isLinux [ autoPatchelfHook ]; buildInputs = [ openssl ]; dontConfigure = true; diff --git a/pkgs/development/web/deno/default.nix b/pkgs/development/web/deno/default.nix index c51adf84f6ee..1dcb7fde0136 100644 --- a/pkgs/development/web/deno/default.nix +++ b/pkgs/development/web/deno/default.nix @@ -39,7 +39,7 @@ rustPlatform.buildRustPackage rec { protobuf installShellFiles ]; - buildInputs = lib.optionals stdenv.isDarwin ( + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin ( [ libiconv darwin.libobjc ] ++ (with darwin.apple_sdk_11_0.frameworks; [ Security diff --git a/pkgs/development/web/edge-runtime/default.nix b/pkgs/development/web/edge-runtime/default.nix index 7a51944a4ff3..891c4ca303ca 100644 --- a/pkgs/development/web/edge-runtime/default.nix +++ b/pkgs/development/web/edge-runtime/default.nix @@ -33,8 +33,8 @@ rustPlatform.buildRustPackage { nativeBuildInputs = [ pkg-config rustPlatform.bindgenHook ]; - buildInputs = lib.optionals stdenv.isLinux [ openssl ] - ++ lib.optionals stdenv.isDarwin (with darwin.apple_sdk.frameworks; [ Security CoreFoundation SystemConfiguration ]); + buildInputs = lib.optionals stdenv.hostPlatform.isLinux [ openssl ] + ++ lib.optionals stdenv.hostPlatform.isDarwin (with darwin.apple_sdk.frameworks; [ Security CoreFoundation SystemConfiguration ]); # The v8 package will try to download a `librusty_v8.a` release at build time to our read-only filesystem # To avoid this we pre-download the file and export it via RUSTY_V8_ARCHIVE diff --git a/pkgs/development/web/insomnia/default.nix b/pkgs/development/web/insomnia/default.nix index 9317dbe8f4e9..9b7e05000075 100644 --- a/pkgs/development/web/insomnia/default.nix +++ b/pkgs/development/web/insomnia/default.nix @@ -29,7 +29,7 @@ let maintainers = with maintainers; [ markus1189 kashw2 DataHearth ]; }; in -if stdenv.isDarwin then stdenv.mkDerivation { +if stdenv.hostPlatform.isDarwin then stdenv.mkDerivation { inherit pname version src meta; sourceRoot = "."; diff --git a/pkgs/development/web/kcgi/default.nix b/pkgs/development/web/kcgi/default.nix index 84bfc654c773..7732ce9f4822 100644 --- a/pkgs/development/web/kcgi/default.nix +++ b/pkgs/development/web/kcgi/default.nix @@ -16,14 +16,14 @@ stdenv.mkDerivation rec { ''; nativeBuildInputs = [ pkg-config ]; - buildInputs = [ ] ++ lib.optionals stdenv.isLinux [ libbsd ] ; + buildInputs = [ ] ++ lib.optionals stdenv.hostPlatform.isLinux [ libbsd ] ; dontAddPrefix = true; installFlags = [ "DESTDIR=$(out)" ]; meta = with lib; { - broken = (stdenv.isLinux && stdenv.isAarch64); + broken = (stdenv.hostPlatform.isLinux && stdenv.hostPlatform.isAarch64); homepage = "https://kristaps.bsd.lv/kcgi"; description = "Minimal CGI and FastCGI library for C/C++"; license = licenses.isc; diff --git a/pkgs/development/web/netlify-cli/composition.nix b/pkgs/development/web/netlify-cli/composition.nix index 2e54104d7dce..4bd736ddc723 100644 --- a/pkgs/development/web/netlify-cli/composition.nix +++ b/pkgs/development/web/netlify-cli/composition.nix @@ -8,7 +8,7 @@ let nodeEnv = import ./node-env.nix { inherit (pkgs) stdenv lib python2 runCommand writeTextFile writeShellScript; inherit pkgs nodejs; - libtool = if pkgs.stdenv.isDarwin then pkgs.cctools or pkgs.darwin.cctools else null; + libtool = if pkgs.stdenv.hostPlatform.isDarwin then pkgs.cctools or pkgs.darwin.cctools else null; }; in import ./node-packages.nix { diff --git a/pkgs/development/web/netlify-cli/node-env.nix b/pkgs/development/web/netlify-cli/node-env.nix index bc1e36628ac8..eb94495aeba3 100644 --- a/pkgs/development/web/netlify-cli/node-env.nix +++ b/pkgs/development/web/netlify-cli/node-env.nix @@ -499,8 +499,8 @@ let stdenv.mkDerivation ({ name = "${name}${if version == null then "" else "-${version}"}"; buildInputs = [ tarWrapper python nodejs ] - ++ lib.optional (stdenv.isLinux) utillinux - ++ lib.optional (stdenv.isDarwin) libtool + ++ lib.optional (stdenv.hostPlatform.isLinux) utillinux + ++ lib.optional (stdenv.hostPlatform.isDarwin) libtool ++ buildInputs; inherit nodejs; @@ -591,8 +591,8 @@ let name = "node-dependencies-${name}${if version == null then "" else "-${version}"}"; buildInputs = [ tarWrapper python nodejs ] - ++ lib.optional (stdenv.isLinux) utillinux - ++ lib.optional (stdenv.isDarwin) libtool + ++ lib.optional (stdenv.hostPlatform.isLinux) utillinux + ++ lib.optional (stdenv.hostPlatform.isDarwin) libtool ++ buildInputs; inherit dontStrip; # Stripping may fail a build for some package deployments @@ -662,7 +662,7 @@ let stdenv.mkDerivation ({ name = "node-shell-${name}${if version == null then "" else "-${version}"}"; - buildInputs = [ python nodejs ] ++ lib.optional (stdenv.isLinux) utillinux ++ buildInputs; + buildInputs = [ python nodejs ] ++ lib.optional (stdenv.hostPlatform.isLinux) utillinux ++ buildInputs; buildCommand = '' mkdir -p $out/bin cat > $out/bin/shell <= 50 then "dwarfort" else "libs/Dwarf_Fortress" else "dwarfort.exe"; @@ -86,8 +86,8 @@ stdenv.mkDerivation { postUnpack = '' directory=${ - if stdenv.isLinux then "df_linux" - else if stdenv.isDarwin then "df_osx" + if stdenv.hostPlatform.isLinux then "df_linux" + else if stdenv.hostPlatform.isDarwin then "df_osx" else throw "Unsupported system" } if [ -d "$directory" ]; then @@ -95,7 +95,7 @@ stdenv.mkDerivation { fi ''; - nativeBuildInputs = optional stdenv.isLinux autoPatchelfHook; + nativeBuildInputs = optional stdenv.hostPlatform.isLinux autoPatchelfHook; buildInputs = optionals isAtLeast50 [ SDL2 SDL2_image SDL2_mixer ] ++ optional (!isAtLeast50) SDL ++ optional enableUnfuck dwarf-fortress-unfuck @@ -124,7 +124,7 @@ stdenv.mkDerivation { # Store the original hash md5sum $exe | awk '{ print $1 }' > $out/hash.md5.orig echo "Original MD5: $(<$out/hash.md5.orig)" >&2 - '' + optionalString stdenv.isDarwin '' + '' + optionalString stdenv.hostPlatform.isDarwin '' # My custom unfucked dwarfort.exe for macOS. Can't use # absolute paths because original doesn't have enough # header space. Someone plz break into Tarn's house & put diff --git a/pkgs/games/dwarf-fortress/lazy-pack.nix b/pkgs/games/dwarf-fortress/lazy-pack.nix index c94a46f04d9e..eef830965eb4 100644 --- a/pkgs/games/dwarf-fortress/lazy-pack.nix +++ b/pkgs/games/dwarf-fortress/lazy-pack.nix @@ -9,7 +9,7 @@ # This package should, at any given time, provide an opinionated "optimal" # DF experience. It's the equivalent of the Lazy Newbie Pack, that is, and # should contain every utility available unless you disable them. -, enableDFHack ? stdenvNoCC.isLinux +, enableDFHack ? stdenvNoCC.hostPlatform.isLinux , enableTWBT ? enableDFHack , enableSoundSense ? true , enableStoneSense ? true diff --git a/pkgs/games/dwarf-fortress/wrapper/default.nix b/pkgs/games/dwarf-fortress/wrapper/default.nix index daa27ce5dc00..268a5c1f5da5 100644 --- a/pkgs/games/dwarf-fortress/wrapper/default.nix +++ b/pkgs/games/dwarf-fortress/wrapper/default.nix @@ -197,8 +197,8 @@ stdenv.mkDerivation rec { chmod 755 $out/bin/soundsense ''; - doInstallCheck = stdenv.isLinux; - nativeInstallCheckInputs = lib.optionals stdenv.isLinux [ expect xvfb-run ]; + doInstallCheck = stdenv.hostPlatform.isLinux; + nativeInstallCheckInputs = lib.optionals stdenv.hostPlatform.isLinux [ expect xvfb-run ]; installCheckPhase = let commonExpectStatements = fmod: lib.optionalString isAtLeast50 '' diff --git a/pkgs/games/ecwolf/default.nix b/pkgs/games/ecwolf/default.nix index 8bbbc53a0dcd..77ccc9a929c3 100644 --- a/pkgs/games/ecwolf/default.nix +++ b/pkgs/games/ecwolf/default.nix @@ -25,16 +25,16 @@ stdenv.mkDerivation rec { }; nativeBuildInputs = [ cmake pkg-config ] - ++ lib.optionals stdenv.isDarwin [ makeWrapper ]; + ++ lib.optionals stdenv.hostPlatform.isDarwin [ makeWrapper ]; buildInputs = [ zlib bzip2 libjpeg SDL2 SDL2_net SDL2_mixer gtk3 ]; - NIX_LDFLAGS = lib.optionalString stdenv.isDarwin "-framework AppKit"; + NIX_LDFLAGS = lib.optionalString stdenv.hostPlatform.isDarwin "-framework AppKit"; # ECWolf installs its binary to the games/ directory, but Nix only adds bin/ # directories to the PATH. - postInstall = lib.optionalString stdenv.isLinux '' + postInstall = lib.optionalString stdenv.hostPlatform.isLinux '' mv "$out/games" "$out/bin" - '' + lib.optionalString stdenv.isDarwin '' + '' + lib.optionalString stdenv.hostPlatform.isDarwin '' mkdir -p $out/{Applications,bin} cp -R ecwolf.app $out/Applications makeWrapper $out/{Applications/ecwolf.app/Contents/MacOS,bin}/ecwolf diff --git a/pkgs/games/eduke32/default.nix b/pkgs/games/eduke32/default.nix index 740d0bc47ea7..c213a6317b10 100644 --- a/pkgs/games/eduke32/default.nix +++ b/pkgs/games/eduke32/default.nix @@ -49,11 +49,11 @@ in stdenv.mkDerivation (finalAttrs: { libvpx SDL2 SDL2_mixer - ] ++ lib.optionals stdenv.isLinux [ + ] ++ lib.optionals stdenv.hostPlatform.isLinux [ alsa-lib gtk2 libGL - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ AGL Cocoa GLUT @@ -74,7 +74,7 @@ in stdenv.mkDerivation (finalAttrs: { --replace-fail '#include ' '#include ' \ --replace-fail '#include ' '#include ' \ --replace-fail '#include ' '#include ' - '' + lib.optionalString stdenv.isLinux '' + '' + lib.optionalString stdenv.hostPlatform.isLinux '' for f in glad.c glad_wgl.c ; do substituteInPlace source/glad/src/$f \ --replace-fail libGL.so ${libGL}/lib/libGL.so @@ -117,7 +117,7 @@ in stdenv.mkDerivation (finalAttrs: { runHook preInstall install -Dm755 -t $out/bin eduke32 mapster32 voidsw wangulator - '' + lib.optionalString stdenv.isLinux '' + '' + lib.optionalString stdenv.hostPlatform.isLinux '' makeWrapper $out/bin/eduke32 $out/bin/${wrapper} \ --set-default EDUKE32_DATA_DIR /var/lib/games/eduke32 \ --add-flags '-g "$EDUKE32_DATA_DIR/DUKE3D.GRP"' @@ -127,7 +127,7 @@ in stdenv.mkDerivation (finalAttrs: { mkdir -p $out/share/icons/hicolor/scalable/apps gm convert "./source/duke3d/rsrc/game_icon.ico[10]" $out/share/icons/hicolor/scalable/apps/eduke32.png install -Dm644 ./source/sw/rsrc/game_icon.svg $out/share/icons/hicolor/scalable/apps/voidsw.svg - '' + lib.optionalString stdenv.isDarwin '' + '' + lib.optionalString stdenv.hostPlatform.isDarwin '' mkdir -p $out/Applications/EDuke32.app/Contents/MacOS mkdir -p $out/Applications/Mapster32.app/Contents/MacOS mkdir -p $out/Applications/VoidSW.app/Contents/MacOS diff --git a/pkgs/games/ferium/default.nix b/pkgs/games/ferium/default.nix index 294421527d72..08710c42214d 100644 --- a/pkgs/games/ferium/default.nix +++ b/pkgs/games/ferium/default.nix @@ -18,7 +18,7 @@ rustPlatform.buildRustPackage rec { hash = "sha256-eeQjezB6pRdnPADLgDLo8b+bUSP12gfBhFNt/uYCwHU="; }; - buildInputs = lib.optionals stdenv.isDarwin [ Security SystemConfiguration ]; + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ Security SystemConfiguration ]; cargoHash = "sha256-yBi6zyljkYEIUvSH4nXMw8fjPnt4kjqiuZ/QLT5IbqQ="; diff --git a/pkgs/games/fheroes2/default.nix b/pkgs/games/fheroes2/default.nix index bc87f453d32b..c505970c964f 100644 --- a/pkgs/games/fheroes2/default.nix +++ b/pkgs/games/fheroes2/default.nix @@ -19,7 +19,7 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ imagemagick ]; buildInputs = [ gettext glibcLocalesUtf8 libpng SDL2 SDL2_image SDL2_mixer SDL2_ttf zlib ] - ++ lib.optionals stdenv.isDarwin [ libiconv ]; + ++ lib.optionals stdenv.hostPlatform.isDarwin [ libiconv ]; makeFlags = [ "FHEROES2_STRICT_COMPILATION=1" diff --git a/pkgs/games/flare/engine.nix b/pkgs/games/flare/engine.nix index a1f8761815aa..b404e8ecfcd0 100644 --- a/pkgs/games/flare/engine.nix +++ b/pkgs/games/flare/engine.nix @@ -15,7 +15,7 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ cmake ]; buildInputs = [ SDL2 SDL2_image SDL2_mixer SDL2_ttf ] - ++ lib.optional stdenv.isDarwin Cocoa; + ++ lib.optional stdenv.hostPlatform.isDarwin Cocoa; meta = with lib; { description = "Free/Libre Action Roleplaying Engine"; diff --git a/pkgs/games/freeciv/default.nix b/pkgs/games/freeciv/default.nix index 47dfb0840509..1a0cb892dcea 100644 --- a/pkgs/games/freeciv/default.nix +++ b/pkgs/games/freeciv/default.nix @@ -83,6 +83,6 @@ stdenv.mkDerivation rec { maintainers = with lib.maintainers; [ pierron ]; platforms = lib.platforms.unix; hydraPlatforms = lib.platforms.linux; # sdl-config times out on darwin - broken = qtClient && stdenv.isDarwin; # Missing Qt5 development files + broken = qtClient && stdenv.hostPlatform.isDarwin; # Missing Qt5 development files }; } diff --git a/pkgs/games/freedroid/default.nix b/pkgs/games/freedroid/default.nix index a3aba7313111..130b02997b59 100644 --- a/pkgs/games/freedroid/default.nix +++ b/pkgs/games/freedroid/default.nix @@ -49,6 +49,6 @@ stdenv.mkDerivation rec { maintainers = with maintainers; [ iblech ]; platforms = platforms.unix; # Builds but fails to render to the screen at runtime. - broken = stdenv.isDarwin; + broken = stdenv.hostPlatform.isDarwin; }; } diff --git a/pkgs/games/freedroidrpg/default.nix b/pkgs/games/freedroidrpg/default.nix index b41b91855ee0..8c9b3e0cbf0d 100644 --- a/pkgs/games/freedroidrpg/default.nix +++ b/pkgs/games/freedroidrpg/default.nix @@ -20,7 +20,7 @@ in stdenv.mkDerivation { buildInputs = [ glew SDL SDL_image SDL_gfx SDL_mixer libogg libvorbis lua5_3 libjpeg libpng zlib - ] ++ lib.optional stdenv.isDarwin libiconv; + ] ++ lib.optional stdenv.hostPlatform.isDarwin libiconv; enableParallelBuilding = true; diff --git a/pkgs/games/freenukum/default.nix b/pkgs/games/freenukum/default.nix index af202ffd528d..e0f90773810e 100644 --- a/pkgs/games/freenukum/default.nix +++ b/pkgs/games/freenukum/default.nix @@ -69,6 +69,6 @@ rustPlatform.buildRustPackage rec { changelog = "https://salsa.debian.org/silwol/freenukum/-/blob/v${version}/CHANGELOG.md"; license = licenses.agpl3Plus; maintainers = with maintainers; [ _0x4A6F ]; - broken = stdenv.isDarwin; + broken = stdenv.hostPlatform.isDarwin; }; } diff --git a/pkgs/games/gargoyle/default.nix b/pkgs/games/gargoyle/default.nix index 35b8dc733031..d7863361b846 100644 --- a/pkgs/games/gargoyle/default.nix +++ b/pkgs/games/gargoyle/default.nix @@ -5,7 +5,7 @@ let jamenv = '' unset AR - '' + (if stdenv.isDarwin then '' + '' + (if stdenv.hostPlatform.isDarwin then '' export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -I${lib.getDev SDL}/include/SDL" export GARGLKINI="$out/Applications/Gargoyle.app/Contents/Resources/garglk.ini" '' else '' @@ -30,10 +30,10 @@ stdenv.mkDerivation rec { sha256 = "0w54avmbp4i4zps2rb4acmpa641s6wvwbrln4vbdhcz97fx48nzz"; }; - nativeBuildInputs = [ jam pkg-config ] ++ lib.optional stdenv.isDarwin cctools; + nativeBuildInputs = [ jam pkg-config ] ++ lib.optional stdenv.hostPlatform.isDarwin cctools; buildInputs = [ SDL SDL_mixer SDL_sound gtk2 ] - ++ lib.optionals stdenv.isDarwin [ smpeg libvorbis ]; + ++ lib.optionals stdenv.hostPlatform.isDarwin [ smpeg libvorbis ]; # Workaround build failure on -fno-common toolchains: # ld: build/linux.release/alan3/Location.o:(.bss+0x0): multiple definition of @@ -44,7 +44,7 @@ stdenv.mkDerivation rec { buildPhase = jamenv + "jam -j$NIX_BUILD_CORES"; installPhase = - if stdenv.isDarwin then + if stdenv.hostPlatform.isDarwin then (substituteAll { inherit (stdenv) shell; isExecutable = true; @@ -65,7 +65,7 @@ stdenv.mkDerivation rec { enableParallelBuilding = true; meta = with lib; { - broken = stdenv.isDarwin; + broken = stdenv.hostPlatform.isDarwin; homepage = "http://ccxvii.net/gargoyle/"; license = licenses.gpl2Plus; description = "Interactive fiction interpreter GUI"; diff --git a/pkgs/games/gemrb/default.nix b/pkgs/games/gemrb/default.nix index 5906fb6f1cd8..85ea2954309e 100644 --- a/pkgs/games/gemrb/default.nix +++ b/pkgs/games/gemrb/default.nix @@ -20,7 +20,7 @@ let backend = if stdenv.hostPlatform.isx86 then "OpenGL" else "GLES"; - withVLC = stdenv.isDarwin; + withVLC = stdenv.hostPlatform.isDarwin; inherit (lib) optional optionalString; diff --git a/pkgs/games/gmad/default.nix b/pkgs/games/gmad/default.nix index 97538679ee59..799609856137 100644 --- a/pkgs/games/gmad/default.nix +++ b/pkgs/games/gmad/default.nix @@ -22,8 +22,8 @@ stdenv.mkDerivation rec { buildInputs = [ premake4 bootil ]; targetName = - if stdenv.isLinux then "gmad_linux" - else if stdenv.isDarwin then "gmad_osx" + if stdenv.hostPlatform.isLinux then "gmad_linux" + else if stdenv.hostPlatform.isDarwin then "gmad_osx" else "gmad"; premakeFlags = [ "--bootil_lib=${bootil}/lib" "--bootil_inc=${bootil}/include" ]; diff --git a/pkgs/games/gtypist/default.nix b/pkgs/games/gtypist/default.nix index 169b0fa77db0..4d9fe630ca42 100644 --- a/pkgs/games/gtypist/default.nix +++ b/pkgs/games/gtypist/default.nix @@ -13,7 +13,7 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ makeWrapper ]; buildInputs = [ ncurses perl fortune ] - ++ lib.optional stdenv.isDarwin libiconv; + ++ lib.optional stdenv.hostPlatform.isDarwin libiconv; preFixup = '' wrapProgram "$out/bin/typefortune" \ diff --git a/pkgs/games/hedgewars/default.nix b/pkgs/games/hedgewars/default.nix index 351dd15c417f..389beb7b51c8 100644 --- a/pkgs/games/hedgewars/default.nix +++ b/pkgs/games/hedgewars/default.nix @@ -88,7 +88,7 @@ stdenv.mkDerivation rec { hedgehog or hedgehogs after a player's or CPU turn is shown only when all movement on the battlefield has ceased).''; maintainers = with maintainers; [ kragniz fpletz ]; - broken = stdenv.isDarwin; + broken = stdenv.hostPlatform.isDarwin; platforms = platforms.linux; }; } diff --git a/pkgs/games/hheretic/default.nix b/pkgs/games/hheretic/default.nix index 6e4be6bd54b7..83b0ccb620cf 100644 --- a/pkgs/games/hheretic/default.nix +++ b/pkgs/games/hheretic/default.nix @@ -52,6 +52,6 @@ stdenv.mkDerivation (finalAttrs: { mainProgram = "hheretic-gl"; maintainers = with lib.maintainers; [ moody ]; inherit (SDL.meta) platforms; - broken = stdenv.isDarwin; + broken = stdenv.hostPlatform.isDarwin; }; }) diff --git a/pkgs/games/hhexen/default.nix b/pkgs/games/hhexen/default.nix index 0e5345e85a7d..c73040a30f7e 100644 --- a/pkgs/games/hhexen/default.nix +++ b/pkgs/games/hhexen/default.nix @@ -52,6 +52,6 @@ stdenv.mkDerivation (finalAttrs: { maintainers = with lib.maintainers; [ moody djanatyn ]; mainProgram = "hhexen-gl"; inherit (SDL.meta) platforms; - broken = stdenv.isDarwin; + broken = stdenv.hostPlatform.isDarwin; }; }) diff --git a/pkgs/games/hmcl/default.nix b/pkgs/games/hmcl/default.nix index 69b546183406..7a330c399272 100644 --- a/pkgs/games/hmcl/default.nix +++ b/pkgs/games/hmcl/default.nix @@ -75,7 +75,7 @@ stdenv.mkDerivation (finalAttrs: { glib openal libglvnd - ] ++ lib.optionals stdenv.isLinux [ + ] ++ lib.optionals stdenv.hostPlatform.isLinux [ xorg.libX11 xorg.libXxf86vm xorg.libXext diff --git a/pkgs/games/ja2-stracciatella/default.nix b/pkgs/games/ja2-stracciatella/default.nix index ea363c969429..9ad6e3105406 100644 --- a/pkgs/games/ja2-stracciatella/default.nix +++ b/pkgs/games/ja2-stracciatella/default.nix @@ -29,7 +29,7 @@ stdenv.mkDerivation { inherit src version; nativeBuildInputs = [ cmake python3 ]; - buildInputs = [ SDL2 fltk rapidjson gtest ] ++ lib.optionals stdenv.isDarwin [ Carbon Cocoa ]; + buildInputs = [ SDL2 fltk rapidjson gtest ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ Carbon Cocoa ]; patches = [ ./remove-rust-buildstep.patch diff --git a/pkgs/games/jfsw/default.nix b/pkgs/games/jfsw/default.nix index ed82964e4d0e..181b28e06c9d 100644 --- a/pkgs/games/jfsw/default.nix +++ b/pkgs/games/jfsw/default.nix @@ -51,7 +51,7 @@ stdenv.mkDerivation (finalAttrs: { license = lib.licenses.gpl2Plus; mainProgram = "sw"; maintainers = with lib.maintainers; [ moody ]; - broken = stdenv.isDarwin; + broken = stdenv.hostPlatform.isDarwin; inherit (SDL2.meta) platforms; }; }) diff --git a/pkgs/games/julius/default.nix b/pkgs/games/julius/default.nix index 69f3c34a1f0f..f5f5bb6d1eb4 100644 --- a/pkgs/games/julius/default.nix +++ b/pkgs/games/julius/default.nix @@ -28,7 +28,7 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ cmake - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ darwin.sigtool libicns imagemagick @@ -38,11 +38,11 @@ stdenv.mkDerivation rec { SDL2 SDL2_mixer libpng - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.Cocoa ]; - installPhase = lib.optionalString stdenv.isDarwin '' + installPhase = lib.optionalString stdenv.hostPlatform.isDarwin '' runHook preInstall mkdir -p $out/Applications cp -r julius.app $out/Applications/ diff --git a/pkgs/games/jumpy/default.nix b/pkgs/games/jumpy/default.nix index 23e130582a3d..7040aa4e3401 100644 --- a/pkgs/games/jumpy/default.nix +++ b/pkgs/games/jumpy/default.nix @@ -41,7 +41,7 @@ rustPlatform.buildRustPackage rec { buildInputs = [ zstd - ] ++ lib.optionals stdenv.isLinux [ + ] ++ lib.optionals stdenv.hostPlatform.isLinux [ alsa-lib libxkbcommon udev @@ -51,7 +51,7 @@ rustPlatform.buildRustPackage rec { xorg.libXcursor xorg.libXi xorg.libXrandr - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk_11_0.frameworks.Cocoa rustPlatform.bindgenHook ]; @@ -70,7 +70,7 @@ rustPlatform.buildRustPackage rec { wrapProgram $out/bin/jumpy --chdir $out/share ''; - postFixup = lib.optionalString stdenv.isLinux '' + postFixup = lib.optionalString stdenv.hostPlatform.isLinux '' patchelf $out/bin/.jumpy-wrapped \ --add-rpath ${lib.makeLibraryPath [ vulkan-loader ]} ''; diff --git a/pkgs/games/klavaro/default.nix b/pkgs/games/klavaro/default.nix index 58dda8d23a63..adaae799cb5c 100644 --- a/pkgs/games/klavaro/default.nix +++ b/pkgs/games/klavaro/default.nix @@ -38,7 +38,7 @@ stdenv.mkDerivation rec { ''; # remove forbidden references to $TMPDIR - preFixup = lib.optionalString stdenv.isLinux '' + preFixup = lib.optionalString stdenv.hostPlatform.isLinux '' for f in "$out"/bin/*; do if isELF "$f"; then patchelf --shrink-rpath --allowed-rpath-prefixes "$NIX_STORE" "$f" diff --git a/pkgs/games/ldmud/default.nix b/pkgs/games/ldmud/default.nix index 83bbadfe7dc4..de92518781fe 100644 --- a/pkgs/games/ldmud/default.nix +++ b/pkgs/games/ldmud/default.nix @@ -46,7 +46,7 @@ stdenv.mkDerivation rec { ++ lib.optional postgresSupport postgresql ++ lib.optional sqliteSupport sqlite ++ lib.optional tlsSupport openssl ++ lib.optional pythonSupport python310 - ++ lib.optionals stdenv.isDarwin [ libiconv ]; + ++ lib.optionals stdenv.hostPlatform.isDarwin [ libiconv ]; # To support systems without autoconf LD puts its configure.ac in a non-default # location and uses a helper script. We skip that script and symlink the .ac diff --git a/pkgs/games/libremines/default.nix b/pkgs/games/libremines/default.nix index f1a79e54bd62..e639b981369e 100644 --- a/pkgs/games/libremines/default.nix +++ b/pkgs/games/libremines/default.nix @@ -22,7 +22,7 @@ stdenv.mkDerivation rec { buildInputs = [ qtmultimedia - ] ++ lib.optionals stdenv.isLinux [ + ] ++ lib.optionals stdenv.hostPlatform.isLinux [ qtwayland ]; diff --git a/pkgs/games/lincity/default.nix b/pkgs/games/lincity/default.nix index 3f77d9bbe415..deb4f2eb0250 100644 --- a/pkgs/games/lincity/default.nix +++ b/pkgs/games/lincity/default.nix @@ -38,6 +38,6 @@ stdenv.mkDerivation rec { homepage = "https://sourceforge.net/projects/lincity"; maintainers = [ ]; # ../lcintl.h:14:10: fatal error: 'libintl.h' file not found - broken = stdenv.isDarwin; + broken = stdenv.hostPlatform.isDarwin; }; } diff --git a/pkgs/games/liquidwar/5.nix b/pkgs/games/liquidwar/5.nix index 9c61f97d1a7f..64ea76560f13 100644 --- a/pkgs/games/liquidwar/5.nix +++ b/pkgs/games/liquidwar/5.nix @@ -9,7 +9,7 @@ stdenv.mkDerivation rec { buildInputs = [ allegro ]; - configureFlags = lib.optional stdenv.isx86_64 "--disable-asm"; + configureFlags = lib.optional stdenv.hostPlatform.isx86_64 "--disable-asm"; hardeningDisable = [ "format" ]; diff --git a/pkgs/games/manaplus/default.nix b/pkgs/games/manaplus/default.nix index deb12d45ad4b..768a971d8346 100644 --- a/pkgs/games/manaplus/default.nix +++ b/pkgs/games/manaplus/default.nix @@ -28,6 +28,6 @@ stdenv.mkDerivation rec { description = "Free OpenSource 2D MMORPG client"; homepage = "https://manaplus.org/"; license = lib.licenses.gpl2Plus; - broken = stdenv.isDarwin; + broken = stdenv.hostPlatform.isDarwin; }; } diff --git a/pkgs/games/mchprs/default.nix b/pkgs/games/mchprs/default.nix index 49ef836423cd..97fc84b5d9b4 100644 --- a/pkgs/games/mchprs/default.nix +++ b/pkgs/games/mchprs/default.nix @@ -36,7 +36,7 @@ rustPlatform.buildRustPackage rec { openssl sqlite zlib - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.CoreFoundation darwin.apple_sdk.frameworks.Security ]; diff --git a/pkgs/games/mindustry/default.nix b/pkgs/games/mindustry/default.nix index 789b2bca65a5..43001343b748 100644 --- a/pkgs/games/mindustry/default.nix +++ b/pkgs/games/mindustry/default.nix @@ -187,7 +187,7 @@ stdenv.mkDerivation { mkdir -p $out/bin makeWrapper ${jdk}/bin/java $out/bin/mindustry \ --add-flags "-jar $out/share/mindustry.jar" \ - ${lib.optionalString stdenv.isLinux "--suffix PATH : ${lib.makeBinPath [zenity]}"} \ + ${lib.optionalString stdenv.hostPlatform.isLinux "--suffix PATH : ${lib.makeBinPath [zenity]}"} \ --suffix LD_LIBRARY_PATH : ${lib.makeLibraryPath [libpulseaudio alsa-lib libjack2]} \ --set ALSA_PLUGIN_DIR ${alsa-plugins}/lib/alsa-lib/'' + lib.optionalString enableWayland '' \ --set SDL_VIDEODRIVER wayland \ @@ -240,6 +240,6 @@ stdenv.mkDerivation { maintainers = with lib.maintainers; [ chkno fgaz thekostins ]; platforms = lib.platforms.all; # TODO alsa-lib is linux-only, figure out what dependencies are required on Darwin - broken = enableClient && stdenv.isDarwin; + broken = enableClient && stdenv.hostPlatform.isDarwin; }; } diff --git a/pkgs/games/minecraft-servers/derivation.nix b/pkgs/games/minecraft-servers/derivation.nix index a94a2daecac2..c6f26d73eb6f 100644 --- a/pkgs/games/minecraft-servers/derivation.nix +++ b/pkgs/games/minecraft-servers/derivation.nix @@ -16,7 +16,7 @@ stdenv.mkDerivation { makeWrapper ${lib.getExe jre_headless} $out/bin/minecraft-server \ --append-flags "-jar $out/lib/minecraft/server.jar nogui" \ - ${lib.optionalString stdenv.isLinux "--prefix LD_LIBRARY_PATH : ${lib.makeLibraryPath [ udev ]}"} + ${lib.optionalString stdenv.hostPlatform.isLinux "--prefix LD_LIBRARY_PATH : ${lib.makeLibraryPath [ udev ]}"} runHook postInstall ''; diff --git a/pkgs/games/minetest/default.nix b/pkgs/games/minetest/default.nix index 3a49b5b90f44..f4ccf5ac71e9 100644 --- a/pkgs/games/minetest/default.nix +++ b/pkgs/games/minetest/default.nix @@ -119,13 +119,13 @@ stdenv.mkDerivation (finalAttrs: { postPatch = '' substituteInPlace src/filesys.cpp --replace "/bin/rm" "${coreutils}/bin/rm" - '' + lib.optionalString stdenv.isDarwin '' + '' + lib.optionalString stdenv.hostPlatform.isDarwin '' sed -i '/pagezero_size/d;/fixup_bundle/d' src/CMakeLists.txt ''; - postInstall = lib.optionalString stdenv.isLinux '' + postInstall = lib.optionalString stdenv.hostPlatform.isLinux '' patchShebangs $out - '' + lib.optionalString stdenv.isDarwin '' + '' + lib.optionalString stdenv.hostPlatform.isDarwin '' mkdir -p $out/Applications mv $out/minetest.app $out/Applications ''; diff --git a/pkgs/games/mudlet/default.nix b/pkgs/games/mudlet/default.nix index 78a7eb901c50..eef4560e386a 100644 --- a/pkgs/games/mudlet/default.nix +++ b/pkgs/games/mudlet/default.nix @@ -97,7 +97,7 @@ stdenv.mkDerivation rec { qtmultimedia yajl discord-rpc - ] ++ lib.optional stdenv.isDarwin [ + ] ++ lib.optional stdenv.hostPlatform.isDarwin [ AppKit ]; @@ -122,7 +122,7 @@ stdenv.mkDerivation rec { cp -r ../translations $out/share/ - '' + lib.optionalString stdenv.isDarwin '' + '' + lib.optionalString stdenv.hostPlatform.isDarwin '' mkdir -p $out/Applications cp -r src/mudlet.app/ $out/Applications/mudlet.app mv $out/Applications/mudlet.app/Contents/MacOS/mudlet $out/Applications/mudlet.app/Contents/MacOS/mudlet-unwrapped @@ -132,7 +132,7 @@ stdenv.mkDerivation rec { --prefix DYLD_LIBRARY_PATH : "${lib.makeLibraryPath [ libsForQt5.qtkeychain discord-rpc ]}:$out/lib" \ --chdir "$out"; - '' + lib.optionalString (!stdenv.isDarwin) '' + '' + lib.optionalString (!stdenv.hostPlatform.isDarwin) '' mkdir -pv $out/bin cp src/mudlet $out/bin/mudlet-unwrapped makeQtWrapper $out/bin/mudlet-unwrapped $out/bin/mudlet \ diff --git a/pkgs/games/npush/default.nix b/pkgs/games/npush/default.nix index 7a061a4bc638..e3d199c7fa87 100644 --- a/pkgs/games/npush/default.nix +++ b/pkgs/games/npush/default.nix @@ -39,7 +39,7 @@ stdenv.mkDerivation rec { ''; meta = with lib; { - broken = stdenv.isDarwin; + broken = stdenv.hostPlatform.isDarwin; homepage = "https://npush.sourceforge.net/"; description = "Sokoban-like game"; mainProgram = "npush"; diff --git a/pkgs/games/opendungeons/default.nix b/pkgs/games/opendungeons/default.nix index 3562aa8c6f89..a66504fa1d83 100644 --- a/pkgs/games/opendungeons/default.nix +++ b/pkgs/games/opendungeons/default.nix @@ -38,7 +38,7 @@ stdenv.mkDerivation { ]; # source/utils/StackTraceUnix.cpp:122:2: error: #error Unsupported architecture. - postPatch = lib.optionalString (!stdenv.isx86_64) '' + postPatch = lib.optionalString (!stdenv.hostPlatform.isx86_64) '' cp source/utils/StackTrace{Stub,Unix}.cpp ''; diff --git a/pkgs/games/openmw/default.nix b/pkgs/games/openmw/default.nix index edeed841c923..22bd90a348a9 100644 --- a/pkgs/games/openmw/default.nix +++ b/pkgs/games/openmw/default.nix @@ -66,7 +66,7 @@ stdenv.mkDerivation rec { postPatch = '' sed '1i#include ' -i components/myguiplatform/myguidatamanager.cpp # gcc12 - '' + lib.optionalString stdenv.isDarwin '' + '' + lib.optionalString stdenv.hostPlatform.isDarwin '' # Don't fix Darwin app bundle sed -i '/fixup_bundle/d' CMakeLists.txt ''; @@ -74,7 +74,7 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ cmake pkg-config wrapQtAppsHook ]; # If not set, OSG plugin .so files become shell scripts on Darwin. - dontWrapQtApps = stdenv.isDarwin; + dontWrapQtApps = stdenv.hostPlatform.isDarwin; buildInputs = [ SDL2 @@ -90,7 +90,7 @@ stdenv.mkDerivation rec { recastnavigation unshield yaml-cpp - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ CoreMedia VideoDecodeAcceleration VideoToolbox @@ -99,7 +99,7 @@ stdenv.mkDerivation rec { cmakeFlags = [ "-DOpenGL_GL_PREFERENCE=${GL}" "-DOPENMW_USE_SYSTEM_RECASTNAVIGATION=1" - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ "-DOPENMW_OSX_DEPLOYMENT=ON" ]; diff --git a/pkgs/games/openrw/default.nix b/pkgs/games/openrw/default.nix index 061d053e34ec..d2d86226af26 100644 --- a/pkgs/games/openrw/default.nix +++ b/pkgs/games/openrw/default.nix @@ -43,7 +43,7 @@ stdenv.mkDerivation { buildInputs = [ sfml libGLU libGL bullet glm libmad openal SDL2 boost ffmpeg_6 - ] ++ lib.optionals stdenv.isDarwin [ OpenAL Cocoa ]; + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ OpenAL Cocoa ]; meta = with lib; { description = "Unofficial open source recreation of the classic Grand Theft Auto III game executable"; diff --git a/pkgs/games/openspades/default.nix b/pkgs/games/openspades/default.nix index ebab9a018fbf..fd070312b1f9 100644 --- a/pkgs/games/openspades/default.nix +++ b/pkgs/games/openspades/default.nix @@ -65,6 +65,6 @@ stdenv.mkDerivation rec { platforms = platforms.all; maintainers = with maintainers; [ abbradar azahi ]; # never built on aarch64-linux since first introduction in nixpkgs - broken = stdenv.isDarwin || (stdenv.isLinux && stdenv.isAarch64); + broken = stdenv.hostPlatform.isDarwin || (stdenv.hostPlatform.isLinux && stdenv.hostPlatform.isAarch64); }; } diff --git a/pkgs/games/osu-lazer/bin.nix b/pkgs/games/osu-lazer/bin.nix index d3dd268620ed..89ebe14cb41e 100644 --- a/pkgs/games/osu-lazer/bin.nix +++ b/pkgs/games/osu-lazer/bin.nix @@ -43,7 +43,7 @@ let passthru.updateScript = ./update-bin.sh; in -if stdenv.isDarwin +if stdenv.hostPlatform.isDarwin then stdenv.mkDerivation { inherit pname version src meta passthru; diff --git a/pkgs/games/papermc/derivation.nix b/pkgs/games/papermc/derivation.nix index 5dd169dbc9b4..c7ad650d00f6 100644 --- a/pkgs/games/papermc/derivation.nix +++ b/pkgs/games/papermc/derivation.nix @@ -22,7 +22,7 @@ stdenvNoCC.mkDerivation (finalAttrs: { makeWrapper ${lib.getExe jre} "$out/bin/minecraft-server" \ --append-flags "-jar $out/share/papermc/papermc.jar nogui" \ - ${lib.optionalString stdenvNoCC.isLinux "--prefix LD_LIBRARY_PATH : ${lib.makeLibraryPath [ udev ]}"} + ${lib.optionalString stdenvNoCC.hostPlatform.isLinux "--prefix LD_LIBRARY_PATH : ${lib.makeLibraryPath [ udev ]}"} runHook postInstall ''; diff --git a/pkgs/games/path-of-building/default.nix b/pkgs/games/path-of-building/default.nix index 0fcd79b4b956..622df7873b38 100644 --- a/pkgs/games/path-of-building/default.nix +++ b/pkgs/games/path-of-building/default.nix @@ -64,7 +64,7 @@ stdenv.mkDerivation { qttools wrapQtAppsHook icoutils - ] ++ lib.optional stdenv.isLinux copyDesktopItems; + ] ++ lib.optional stdenv.hostPlatform.isLinux copyDesktopItems; buildInputs = [ qtbase @@ -126,6 +126,6 @@ stdenv.mkDerivation { license = lib.licenses.mit; maintainers = [ lib.maintainers.k900 ]; mainProgram = "pobfrontend"; - broken = stdenv.isDarwin; # doesn't find uic6 for some reason + broken = stdenv.hostPlatform.isDarwin; # doesn't find uic6 for some reason }; } diff --git a/pkgs/games/powermanga/default.nix b/pkgs/games/powermanga/default.nix index 3c89266370cf..eaa45460be92 100644 --- a/pkgs/games/powermanga/default.nix +++ b/pkgs/games/powermanga/default.nix @@ -55,6 +55,6 @@ stdenv.mkDerivation (finalAttrs: { license = licenses.gpl3Plus; maintainers = with maintainers; [ fgaz ]; platforms = platforms.all; - broken = stdenv.isDarwin; + broken = stdenv.hostPlatform.isDarwin; }; }) diff --git a/pkgs/games/quake2/yquake2/default.nix b/pkgs/games/quake2/yquake2/default.nix index 4135706c9813..3c78d0e5f233 100644 --- a/pkgs/games/quake2/yquake2/default.nix +++ b/pkgs/games/quake2/yquake2/default.nix @@ -25,13 +25,13 @@ let postPatch = '' substituteInPlace src/client/curl/qcurl.c \ --replace "\"libcurl.so.3\", \"libcurl.so.4\"" "\"${curl.out}/lib/libcurl.so\", \"libcurl.so.3\", \"libcurl.so.4\"" - '' + lib.optionalString (openalSupport && !stdenv.isDarwin) '' + '' + lib.optionalString (openalSupport && !stdenv.hostPlatform.isDarwin) '' substituteInPlace Makefile \ --replace "\"libopenal.so.1\"" "\"${openal}/lib/libopenal.so.1\"" ''; buildInputs = [ SDL2 libGL curl ] - ++ lib.optionals stdenv.isDarwin [ Cocoa OpenAL ] + ++ lib.optionals stdenv.hostPlatform.isDarwin [ Cocoa OpenAL ] ++ lib.optional openalSupport openal; makeFlags = [ diff --git a/pkgs/games/quakespasm/default.nix b/pkgs/games/quakespasm/default.nix index 6b3080c7573e..5b124cb464d1 100644 --- a/pkgs/games/quakespasm/default.nix +++ b/pkgs/games/quakespasm/default.nix @@ -1,7 +1,7 @@ { lib, stdenv, SDL, SDL2, fetchurl, gzip, libvorbis, libmad, flac, libopus, opusfile, libogg, libxmp , Cocoa, CoreAudio, CoreFoundation, IOKit, OpenGL , copyDesktopItems, makeDesktopItem, pkg-config -, useSDL2 ? stdenv.isDarwin # TODO: CoreAudio fails to initialize with SDL 1.x for some reason. +, useSDL2 ? stdenv.hostPlatform.isDarwin # TODO: CoreAudio fails to initialize with SDL 1.x for some reason. }: stdenv.mkDerivation rec { @@ -15,7 +15,7 @@ stdenv.mkDerivation rec { sourceRoot = "${pname}-${version}/Quake"; - patches = lib.optionals stdenv.isDarwin [ + patches = lib.optionals stdenv.hostPlatform.isDarwin [ # Makes Darwin Makefile use system libraries instead of ones from app bundle ./quakespasm-darwin-makefile-improvements.patch ]; @@ -28,9 +28,9 @@ stdenv.mkDerivation rec { buildInputs = [ gzip libvorbis libmad flac libopus opusfile libogg libxmp (if useSDL2 then SDL2 else SDL) - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ Cocoa CoreAudio IOKit OpenGL - ] ++ lib.optionals (stdenv.isDarwin && useSDL2) [ + ] ++ lib.optionals (stdenv.hostPlatform.isDarwin && useSDL2) [ CoreFoundation ]; @@ -52,7 +52,7 @@ stdenv.mkDerivation rec { "USE_SDL2=1" ]; - makefile = if (stdenv.isDarwin) then "Makefile.darwin" else "Makefile"; + makefile = if (stdenv.hostPlatform.isDarwin) then "Makefile.darwin" else "Makefile"; preInstall = '' mkdir -p "$out/bin" @@ -60,7 +60,7 @@ stdenv.mkDerivation rec { substituteInPlace Makefile.darwin --replace "/usr/local/games" "$out/bin" ''; - postInstall = lib.optionalString stdenv.isDarwin '' + postInstall = lib.optionalString stdenv.hostPlatform.isDarwin '' # Let's build app bundle mkdir -p $out/Applications/Quake.app/Contents/MacOS mkdir -p $out/Applications/Quake.app/Contents/Resources diff --git a/pkgs/games/quakespasm/vulkan.nix b/pkgs/games/quakespasm/vulkan.nix index 32428107d850..d4fdc41b4a32 100644 --- a/pkgs/games/quakespasm/vulkan.nix +++ b/pkgs/games/quakespasm/vulkan.nix @@ -47,14 +47,14 @@ stdenv.mkDerivation rec { libvorbis opusfile vulkan-loader - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ moltenvk vulkan-headers ]; buildFlags = [ "DO_USERDIRS=1" ]; - env = lib.optionalAttrs stdenv.isDarwin { + env = lib.optionalAttrs stdenv.hostPlatform.isDarwin { NIX_CFLAGS_COMPILE = lib.concatStringsSep " " [ "-Wno-error=unused-but-set-variable" "-Wno-error=implicit-const-int-float-conversion" @@ -66,7 +66,7 @@ stdenv.mkDerivation rec { cp vkquake "$out/bin" ''; - postFixup = lib.optionalString (!stdenv.isDarwin) '' + postFixup = lib.optionalString (!stdenv.hostPlatform.isDarwin) '' patchelf $out/bin/vkquake \ --add-rpath ${lib.makeLibraryPath [ vulkan-loader ]} ''; diff --git a/pkgs/games/quantumminigolf/default.nix b/pkgs/games/quantumminigolf/default.nix index c91fb8b28c53..b7e8feae2428 100644 --- a/pkgs/games/quantumminigolf/default.nix +++ b/pkgs/games/quantumminigolf/default.nix @@ -36,6 +36,6 @@ stdenv.mkDerivation rec { maintainers = with maintainers; [ raskin ]; platforms = platforms.linux; # never built on aarch64-linux since first introduction in nixpkgs - broken = stdenv.isLinux && stdenv.isAarch64; + broken = stdenv.hostPlatform.isLinux && stdenv.hostPlatform.isAarch64; }; } diff --git a/pkgs/games/randtype/default.nix b/pkgs/games/randtype/default.nix index f7e6ee06ceac..ba5c40367ec0 100644 --- a/pkgs/games/randtype/default.nix +++ b/pkgs/games/randtype/default.nix @@ -28,6 +28,6 @@ stdenv.mkDerivation rec { maintainers = with maintainers; [ dandellion ]; license = licenses.gpl2Only; platforms = platforms.unix; - broken = stdenv.isDarwin; # never built on Hydra https://hydra.nixos.org/job/nixpkgs/trunk/randtype.x86_64-darwin + broken = stdenv.hostPlatform.isDarwin; # never built on Hydra https://hydra.nixos.org/job/nixpkgs/trunk/randtype.x86_64-darwin }; } diff --git a/pkgs/games/raylib-games/default.nix b/pkgs/games/raylib-games/default.nix index 7a0d80a4c5e6..cad4424a3088 100644 --- a/pkgs/games/raylib-games/default.nix +++ b/pkgs/games/raylib-games/default.nix @@ -15,7 +15,7 @@ stdenv.mkDerivation rec { }; buildInputs = [ raylib ] - ++ lib.optionals stdenv.isDarwin [ Cocoa ]; + ++ lib.optionals stdenv.hostPlatform.isDarwin [ Cocoa ]; configurePhase = '' runHook preConfigure diff --git a/pkgs/games/scummvm/default.nix b/pkgs/games/scummvm/default.nix index 2252146679b2..6c6fc7fac0ae 100644 --- a/pkgs/games/scummvm/default.nix +++ b/pkgs/games/scummvm/default.nix @@ -16,9 +16,9 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ nasm ]; - buildInputs = lib.optionals stdenv.isLinux [ + buildInputs = lib.optionals stdenv.hostPlatform.isLinux [ alsa-lib libGLU libGL - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ Cocoa AudioToolbox Carbon CoreMIDI AudioUnit ] ++ [ curl freetype flac fluidsynth libjpeg libmad libmpeg2 libogg libtheora libvorbis SDL2 zlib @@ -36,7 +36,7 @@ stdenv.mkDerivation rec { # They use 'install -s', that calls the native strip instead of the cross postConfigure = '' sed -i "s/-c -s/-c -s --strip-program=''${STRIP@Q}/" ports.mk - '' + lib.optionalString stdenv.isDarwin '' + '' + lib.optionalString stdenv.hostPlatform.isDarwin '' substituteInPlace config.mk \ --replace x86_64-apple-darwin-ranlib ${cctools}/bin/ranlib \ --replace aarch64-apple-darwin-ranlib ${cctools}/bin/ranlib diff --git a/pkgs/games/shipwright/default.nix b/pkgs/games/shipwright/default.nix index d214e6934b19..2ff8c063f5f0 100644 --- a/pkgs/games/shipwright/default.nix +++ b/pkgs/games/shipwright/default.nix @@ -62,10 +62,10 @@ stdenv.mkDerivation (finalAttrs: { python3 imagemagick makeWrapper - ] ++ lib.optionals stdenv.isLinux [ + ] ++ lib.optionals stdenv.hostPlatform.isLinux [ lsb-release copyDesktopItems - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ libicns darwin.sigtool ]; @@ -76,7 +76,7 @@ stdenv.mkDerivation (finalAttrs: { SDL2 SDL2_net libpng - ] ++ lib.optionals stdenv.isLinux [ + ] ++ lib.optionals stdenv.hostPlatform.isLinux [ libX11 libXrandr libXinerama @@ -85,7 +85,7 @@ stdenv.mkDerivation (finalAttrs: { libXext libpulseaudio zenity - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ IOSurface Metal QuartzCore @@ -100,7 +100,7 @@ stdenv.mkDerivation (finalAttrs: { ]; env.NIX_CFLAGS_COMPILE = - lib.optionalString stdenv.isDarwin "-Wno-int-conversion -Wno-implicit-int"; + lib.optionalString stdenv.hostPlatform.isDarwin "-Wno-int-conversion -Wno-implicit-int"; dontAddPrefix = true; @@ -114,18 +114,18 @@ stdenv.mkDerivation (finalAttrs: { popd ''; - preInstall = lib.optionalString stdenv.isLinux '' + preInstall = lib.optionalString stdenv.hostPlatform.isLinux '' # Cmake likes it here for its install paths cp ../OTRExporter/soh.otr .. - '' + lib.optionalString stdenv.isDarwin '' + '' + lib.optionalString stdenv.hostPlatform.isDarwin '' cp ../OTRExporter/soh.otr soh/soh.otr ''; - postInstall = lib.optionalString stdenv.isLinux '' + postInstall = lib.optionalString stdenv.hostPlatform.isLinux '' mkdir -p $out/bin ln -s $out/lib/soh.elf $out/bin/soh install -Dm644 ../soh/macosx/sohIcon.png $out/share/pixmaps/soh.png - '' + lib.optionalString stdenv.isDarwin '' + '' + lib.optionalString stdenv.hostPlatform.isDarwin '' # Recreate the macOS bundle (without using cpack) # We mirror the structure of the bundle distributed by the project @@ -167,7 +167,7 @@ stdenv.mkDerivation (finalAttrs: { codesign -f -s - $out/Applications/soh.app/Contents/Resources/soh-macos ''; - fixupPhase = lib.optionalString stdenv.isLinux '' + fixupPhase = lib.optionalString stdenv.hostPlatform.isLinux '' wrapProgram $out/lib/soh.elf --prefix PATH ":" ${lib.makeBinPath [ zenity ]} ''; diff --git a/pkgs/games/simutrans/default.nix b/pkgs/games/simutrans/default.nix index 6a48c5a2caeb..b6452819bee5 100644 --- a/pkgs/games/simutrans/default.nix +++ b/pkgs/games/simutrans/default.nix @@ -121,8 +121,8 @@ let configurePhase = let # Configuration as per the readme.txt and config.template platform = - if stdenv.isLinux then "linux" else - if stdenv.isDarwin then "mac" else throw "add your platform"; + if stdenv.hostPlatform.isLinux then "linux" else + if stdenv.hostPlatform.isDarwin then "mac" else throw "add your platform"; config = '' BACKEND = mixer_sdl COLOUR_DEPTH = 16 diff --git a/pkgs/games/sm64ex/generic.nix b/pkgs/games/sm64ex/generic.nix index fcdd6616a506..fd53b78042f5 100644 --- a/pkgs/games/sm64ex/generic.nix +++ b/pkgs/games/sm64ex/generic.nix @@ -50,7 +50,7 @@ stdenv.mkDerivation rec { makeFlags = [ "VERSION=${region}" - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ "OSX_BUILD=1" ] ++ compileFlags; diff --git a/pkgs/games/snipes/default.nix b/pkgs/games/snipes/default.nix index f978a1b71d7b..7212d6d81670 100644 --- a/pkgs/games/snipes/default.nix +++ b/pkgs/games/snipes/default.nix @@ -42,6 +42,6 @@ in stdenv.mkDerivation { homepage = "https://www.vogons.org/viewtopic.php?f=7&t=49073"; license = licenses.free; # This reverse-engineered source code is released with the original authors' permission. maintainers = with maintainers; [ peterhoeg cybershadow ]; - broken = stdenv.isDarwin; # not supported upstream - https://github.com/Davidebyzero/Snipes/issues/8#issuecomment-433720046 + broken = stdenv.hostPlatform.isDarwin; # not supported upstream - https://github.com/Davidebyzero/Snipes/issues/8#issuecomment-433720046 }; } diff --git a/pkgs/games/space-cadet-pinball/default.nix b/pkgs/games/space-cadet-pinball/default.nix index 53edf5860518..0f3009e4abe5 100644 --- a/pkgs/games/space-cadet-pinball/default.nix +++ b/pkgs/games/space-cadet-pinball/default.nix @@ -27,11 +27,11 @@ stdenv.mkDerivation rec { buildInputs = [ SDL2 SDL2_mixer - ] ++ lib.optional stdenv.isDarwin Cocoa; + ] ++ lib.optional stdenv.hostPlatform.isDarwin Cocoa; # Darwin needs a custom installphase since it is excluded from the cmake install # https://github.com/k4zmu2a/SpaceCadetPinball/blob/0f88e43ba261bc21fa5c3ef9d44969a2a079d0de/CMakeLists.txt#L221 - installPhase = lib.optionalString stdenv.isDarwin '' + installPhase = lib.optionalString stdenv.hostPlatform.isDarwin '' runHook preInstall mkdir -p $out/bin install ../bin/SpaceCadetPinball $out/bin diff --git a/pkgs/games/space-orbit/default.nix b/pkgs/games/space-orbit/default.nix index 74db273bb879..c5bd6fdf77f0 100644 --- a/pkgs/games/space-orbit/default.nix +++ b/pkgs/games/space-orbit/default.nix @@ -38,7 +38,7 @@ EOF ''; meta = with lib; { - broken = stdenv.isDarwin; + broken = stdenv.hostPlatform.isDarwin; description = "Space combat simulator"; mainProgram = "space-orbit"; license = licenses.gpl2Plus; diff --git a/pkgs/games/steam/fhsenv.nix b/pkgs/games/steam/fhsenv.nix index 1c92bb261765..6a4a1e002058 100644 --- a/pkgs/games/steam/fhsenv.nix +++ b/pkgs/games/steam/fhsenv.nix @@ -46,7 +46,7 @@ let sqlite ] ++ extraPkgs pkgs; - ldPath = lib.optionals stdenv.is64bit [ "/lib64" ] + ldPath = lib.optionals stdenv.hostPlatform.is64bit [ "/lib64" ] ++ [ "/lib32" ] ++ map (x: "/steamrt/${steam-runtime-wrapped.arch}/" + x) steam-runtime-wrapped.libs ++ lib.optionals (steam-runtime-wrapped-i686 != null) (map (x: "/steamrt/${steam-runtime-wrapped-i686.arch}/" + x) steam-runtime-wrapped-i686.libs); diff --git a/pkgs/games/stockfish/default.nix b/pkgs/games/stockfish/default.nix index 456c36784d5f..b4531fc0015d 100644 --- a/pkgs/games/stockfish/default.nix +++ b/pkgs/games/stockfish/default.nix @@ -4,11 +4,11 @@ let # The x86-64-modern may need to be refined further in the future # but stdenv.hostPlatform CPU flags do not currently work on Darwin # https://discourse.nixos.org/t/darwin-system-and-stdenv-hostplatform-features/9745 - archDarwin = if stdenv.isx86_64 then "x86-64-modern" else "apple-silicon"; - arch = if stdenv.isDarwin then archDarwin else - if stdenv.isx86_64 then "x86-64" else - if stdenv.isi686 then "x86-32" else - if stdenv.isAarch64 then "armv8" else + archDarwin = if stdenv.hostPlatform.isx86_64 then "x86-64-modern" else "apple-silicon"; + arch = if stdenv.hostPlatform.isDarwin then archDarwin else + if stdenv.hostPlatform.isx86_64 then "x86-64" else + if stdenv.hostPlatform.isi686 then "x86-32" else + if stdenv.hostPlatform.isAarch64 then "armv8" else "unknown"; # These files can be found in src/evaluate.h diff --git a/pkgs/games/system-syzygy/default.nix b/pkgs/games/system-syzygy/default.nix index b478259a8a9c..d321284b7427 100644 --- a/pkgs/games/system-syzygy/default.nix +++ b/pkgs/games/system-syzygy/default.nix @@ -43,7 +43,7 @@ rustPlatform.buildRustPackage rec { meta = with lib; { - broken = stdenv.isDarwin; + broken = stdenv.hostPlatform.isDarwin; description = "Story and a puzzle game, where you solve a variety of puzzle"; mainProgram = "syzygy"; homepage = "https://mdsteele.games/syzygy"; diff --git a/pkgs/games/taisei/default.nix b/pkgs/games/taisei/default.nix index cb87e48da38e..ee5712f7b7f6 100644 --- a/pkgs/games/taisei/default.nix +++ b/pkgs/games/taisei/default.nix @@ -31,7 +31,7 @@ stdenv.mkDerivation rec { ''; meta = with lib; { - broken = stdenv.isDarwin; + broken = stdenv.hostPlatform.isDarwin; description = "Free and open-source Touhou Project clone and fangame"; mainProgram = "taisei"; longDescription = '' diff --git a/pkgs/games/tecnoballz/default.nix b/pkgs/games/tecnoballz/default.nix index 0d19a2c0f7e2..b3f1914bc18e 100644 --- a/pkgs/games/tecnoballz/default.nix +++ b/pkgs/games/tecnoballz/default.nix @@ -65,6 +65,6 @@ stdenv.mkDerivation (finalAttrs: { license = licenses.gpl3Plus; maintainers = with maintainers; [ fgaz ]; platforms = platforms.all; - broken = stdenv.isDarwin; + broken = stdenv.hostPlatform.isDarwin; }; }) diff --git a/pkgs/games/teeworlds/default.nix b/pkgs/games/teeworlds/default.nix index 505c61588e3e..b07dbc311a2c 100644 --- a/pkgs/games/teeworlds/default.nix +++ b/pkgs/games/teeworlds/default.nix @@ -51,19 +51,19 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ cmake pkg-config - ] ++ lib.optionals (buildClient && stdenv.isLinux) [ + ] ++ lib.optionals (buildClient && stdenv.hostPlatform.isLinux) [ icoutils ]; buildInputs = [ python3 lua5_3 zlib wavpack - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ Cocoa ] ++ lib.optionals buildClient ([ SDL2 freetype - ] ++ lib.optionals stdenv.isLinux [ + ] ++ lib.optionals stdenv.hostPlatform.isLinux [ libGLU alsa-lib libX11 @@ -73,14 +73,14 @@ stdenv.mkDerivation rec { "-DCLIENT=${if buildClient then "ON" else "OFF"}" ]; - postInstall = lib.optionalString buildClient (lib.optionalString stdenv.isLinux '' + postInstall = lib.optionalString buildClient (lib.optionalString stdenv.hostPlatform.isLinux '' # Convert and install desktop icon mkdir -p $out/share/pixmaps icotool --extract --index 1 --output $out/share/pixmaps/teeworlds.png $src/other/icons/teeworlds.ico # Install menu item install -D $src/other/teeworlds.desktop $out/share/applications/teeworlds.desktop - '' + lib.optionalString stdenv.isDarwin '' + '' + lib.optionalString stdenv.hostPlatform.isDarwin '' mkdir -p "$out/Applications/teeworlds.app/Contents/MacOS" mkdir -p "$out/Applications/teeworlds.app/Contents/Resources" diff --git a/pkgs/games/uhexen2/default.nix b/pkgs/games/uhexen2/default.nix index 1d44b16c3aef..a0922a145703 100644 --- a/pkgs/games/uhexen2/default.nix +++ b/pkgs/games/uhexen2/default.nix @@ -51,7 +51,7 @@ stdenv.mkDerivation rec { ''; meta = with lib; { - broken = stdenv.isDarwin; + broken = stdenv.hostPlatform.isDarwin; description = "Cross-platform port of Hexen II game"; longDescription = '' Hammer of Thyrion (uHexen2) is a cross-platform port of Raven Software's Hexen II source. diff --git a/pkgs/games/vessel/default.nix b/pkgs/games/vessel/default.nix index 42408cd042aa..ddbbf68bbc08 100644 --- a/pkgs/games/vessel/default.nix +++ b/pkgs/games/vessel/default.nix @@ -11,7 +11,7 @@ stdenv.mkDerivation rec { directory where you saved it. ''; - src = if (stdenv.isi686) then + src = if (stdenv.hostPlatform.isi686) then requireFile { message = goBuyItNow; name = "vessel-${version}-bin"; diff --git a/pkgs/games/voxelands/default.nix b/pkgs/games/voxelands/default.nix index bac78ab72f35..b1b30a7e769d 100644 --- a/pkgs/games/voxelands/default.nix +++ b/pkgs/games/voxelands/default.nix @@ -69,6 +69,6 @@ stdenv.mkDerivation rec { license = licenses.gpl3Plus; platforms = platforms.linux; maintainers = [ ]; - broken = stdenv.isAarch64; # build fails with "libIrrlicht.so: undefined reference to `png_init_filter_functions_neon'" + broken = stdenv.hostPlatform.isAarch64; # build fails with "libIrrlicht.so: undefined reference to `png_init_filter_functions_neon'" }; } diff --git a/pkgs/games/warsow/engine.nix b/pkgs/games/warsow/engine.nix index 5bc2ef7dbd91..71bf581f14fa 100644 --- a/pkgs/games/warsow/engine.nix +++ b/pkgs/games/warsow/engine.nix @@ -54,6 +54,6 @@ stdenv.mkDerivation rec { license = licenses.gpl2Plus; maintainers = with maintainers; [ astsmtl abbradar ]; platforms = platforms.linux; - broken = stdenv.isAarch64; + broken = stdenv.hostPlatform.isAarch64; }; } diff --git a/pkgs/games/warzone2100/default.nix b/pkgs/games/warzone2100/default.nix index 45b2123e443a..81ab98e67bc9 100644 --- a/pkgs/games/warzone2100/default.nix +++ b/pkgs/games/warzone2100/default.nix @@ -68,7 +68,7 @@ stdenv.mkDerivation (finalAttrs: { freetype harfbuzz sqlite - ] ++ lib.optionals (!stdenv.isDarwin) [ + ] ++ lib.optionals (!stdenv.hostPlatform.isDarwin) [ vulkan-headers vulkan-loader ]; @@ -102,7 +102,7 @@ stdenv.mkDerivation (finalAttrs: { # # Alternatively, we could have set CMAKE_INSTALL_BINDIR to "bin". "-DCMAKE_INSTALL_DATAROOTDIR=${placeholder "out"}/share" - ] ++ lib.optional stdenv.isDarwin "-P../configure_mac.cmake"; + ] ++ lib.optional stdenv.hostPlatform.isDarwin "-P../configure_mac.cmake"; postInstall = lib.optionalString withVideos '' cp ${sequences_src} $out/share/warzone2100/sequences.wz @@ -141,6 +141,6 @@ stdenv.mkDerivation (finalAttrs: { platforms = platforms.all; # configure_mac.cmake tries to download stuff # https://github.com/Warzone2100/warzone2100/blob/master/macosx/README.md - broken = stdenv.isDarwin; + broken = stdenv.hostPlatform.isDarwin; }; }) diff --git a/pkgs/games/wesnoth/default.nix b/pkgs/games/wesnoth/default.nix index 01dd8ceaca17..5017216aecc4 100644 --- a/pkgs/games/wesnoth/default.nix +++ b/pkgs/games/wesnoth/default.nix @@ -20,13 +20,13 @@ stdenv.mkDerivation rec { buildInputs = [ SDL2 SDL2_image SDL2_mixer SDL2_net SDL2_ttf pango gettext boost libvorbis fribidi dbus libpng pcre openssl icu lua curl ] - ++ lib.optionals stdenv.isDarwin [ Cocoa Foundation]; + ++ lib.optionals stdenv.hostPlatform.isDarwin [ Cocoa Foundation]; cmakeFlags = [ "-DENABLE_SYSTEM_LUA=ON" ]; - NIX_LDFLAGS = lib.optionalString stdenv.isDarwin "-framework AppKit"; + NIX_LDFLAGS = lib.optionalString stdenv.hostPlatform.isDarwin "-framework AppKit"; meta = with lib; { description = "Battle for Wesnoth, a free, turn-based strategy game with a fantasy theme"; diff --git a/pkgs/games/widelands/default.nix b/pkgs/games/widelands/default.nix index c2d7e48e456d..e34e23ab6035 100644 --- a/pkgs/games/widelands/default.nix +++ b/pkgs/games/widelands/default.nix @@ -72,12 +72,12 @@ stdenv.mkDerivation rec { libSM # XXX: these should be propagated by SDL2? libICE ] - ++ lib.optional stdenv.isLinux libXext - ++ lib.optionals stdenv.isDarwin (with darwin.apple_sdk.frameworks; [ + ++ lib.optional stdenv.hostPlatform.isLinux libXext + ++ lib.optionals stdenv.hostPlatform.isDarwin (with darwin.apple_sdk.frameworks; [ Cocoa ]); - postInstall = lib.optionalString stdenv.isLinux '' + postInstall = lib.optionalString stdenv.hostPlatform.isLinux '' install -Dm444 -t $out/share/applications ../xdg/org.widelands.Widelands.desktop for s in 16 32 48 64 128; do diff --git a/pkgs/games/zaz/default.nix b/pkgs/games/zaz/default.nix index 3af6f069a5aa..dca1d74a43ff 100644 --- a/pkgs/games/zaz/default.nix +++ b/pkgs/games/zaz/default.nix @@ -48,7 +48,7 @@ stdenv.mkDerivation (finalAttrs: { ]; meta = with lib; { - broken = stdenv.isDarwin; + broken = stdenv.hostPlatform.isDarwin; description = "Puzzle game about arranging balls in triplets, like Luxor, Zuma, or Puzzle Bobble"; homepage = "https://zaz.sourceforge.net/"; license = licenses.gpl3; diff --git a/pkgs/misc/base16-builder/node-packages.nix b/pkgs/misc/base16-builder/node-packages.nix index f4120816cba9..b4bd9d9d41d2 100644 --- a/pkgs/misc/base16-builder/node-packages.nix +++ b/pkgs/misc/base16-builder/node-packages.nix @@ -8,7 +8,7 @@ let nodeEnv = import ../../development/node-packages/node-env.nix { inherit (pkgs) stdenv lib python2 runCommand writeTextFile writeShellScript; inherit pkgs nodejs; - libtool = if pkgs.stdenv.isDarwin then pkgs.cctools or pkgs.darwin.cctools else null; + libtool = if pkgs.stdenv.hostPlatform.isDarwin then pkgs.cctools or pkgs.darwin.cctools else null; }; in import ./node-packages-generated.nix { diff --git a/pkgs/misc/calaos/installer/default.nix b/pkgs/misc/calaos/installer/default.nix index fc312b1d519c..853c187d38ae 100644 --- a/pkgs/misc/calaos/installer/default.nix +++ b/pkgs/misc/calaos/installer/default.nix @@ -16,7 +16,7 @@ mkDerivation rec { qmakeFlags = [ "REVISION=${version}" ]; - installPhase = if stdenv.isDarwin then '' + installPhase = if stdenv.hostPlatform.isDarwin then '' mkdir -p $out/Applications cp -a calaos_installer.app $out/Applications '' else '' diff --git a/pkgs/misc/cliscord/default.nix b/pkgs/misc/cliscord/default.nix index bdfa620ef3f2..0617b0f8069b 100644 --- a/pkgs/misc/cliscord/default.nix +++ b/pkgs/misc/cliscord/default.nix @@ -18,7 +18,7 @@ rustPlatform.buildRustPackage rec { hash = "sha256-dmR49yyErahOUxR9pGW1oYy8Wq5SWOprK317u+JPBv4="; }; - buildInputs = [ openssl ] ++ lib.optional stdenv.isDarwin Security; + buildInputs = [ openssl ] ++ lib.optional stdenv.hostPlatform.isDarwin Security; nativeBuildInputs = [ pkg-config ]; diff --git a/pkgs/misc/cups/default.nix b/pkgs/misc/cups/default.nix index 194074ce9cb6..4c9d2de10873 100644 --- a/pkgs/misc/cups/default.nix +++ b/pkgs/misc/cups/default.nix @@ -48,21 +48,21 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ pkg-config removeReferencesTo ]; buildInputs = [ zlib libjpeg libpng libtiff libusb1 gnutls libpaper ] - ++ lib.optionals stdenv.isLinux [ avahi pam dbus acl ] + ++ lib.optionals stdenv.hostPlatform.isLinux [ avahi pam dbus acl ] ++ lib.optional enableSystemd systemd - ++ lib.optionals stdenv.isDarwin (with darwin; [ + ++ lib.optionals stdenv.hostPlatform.isDarwin (with darwin; [ configd apple_sdk.frameworks.ApplicationServices ]); propagatedBuildInputs = [ gmp ]; - configurePlatforms = lib.optionals stdenv.isLinux [ "build" "host" ]; + configurePlatforms = lib.optionals stdenv.hostPlatform.isLinux [ "build" "host" ]; configureFlags = [ "--localstatedir=/var" "--sysconfdir=/etc" "--enable-raw-printing" "--enable-threads" - ] ++ lib.optionals stdenv.isLinux [ + ] ++ lib.optionals stdenv.hostPlatform.isLinux [ "--enable-dbus" "--enable-pam" "--with-dbusdir=${placeholder "out"}/share/dbus-1" @@ -84,7 +84,7 @@ stdenv.mkDerivation rec { "--with-systemd=$out/lib/systemd/system" - ${lib.optionalString stdenv.isDarwin '' + ${lib.optionalString stdenv.hostPlatform.isDarwin '' "--with-bundledir=$out" ''} ) @@ -111,7 +111,7 @@ stdenv.mkDerivation rec { enableParallelBuilding = true; postInstall = '' - libexec=${if stdenv.isDarwin then "libexec/cups" else "lib/cups"} + libexec=${if stdenv.hostPlatform.isDarwin then "libexec/cups" else "lib/cups"} moveToOutput $libexec "$out" # $lib contains references to $out/share/cups. @@ -130,7 +130,7 @@ stdenv.mkDerivation rec { for f in "$out"/lib/systemd/system/*; do substituteInPlace "$f" --replace "$lib/$libexec" "$out/$libexec" done - '' + lib.optionalString stdenv.isLinux '' + '' + lib.optionalString stdenv.hostPlatform.isLinux '' # Use xdg-open when on Linux substituteInPlace "$out"/share/applications/cups.desktop \ --replace "Exec=htmlview" "Exec=xdg-open" diff --git a/pkgs/misc/cups/drivers/brgenml1lpr/default.nix b/pkgs/misc/cups/drivers/brgenml1lpr/default.nix index d683e80b2893..98116903ec64 100644 --- a/pkgs/misc/cups/drivers/brgenml1lpr/default.nix +++ b/pkgs/misc/cups/drivers/brgenml1lpr/default.nix @@ -30,7 +30,7 @@ let myPatchElf = file: '' patchelf --set-interpreter \ - ${stdenv.cc.libc}/lib/ld-linux${lib.optionalString stdenv.is64bit "-x86-64"}.so.2 \ + ${stdenv.cc.libc}/lib/ld-linux${lib.optionalString stdenv.hostPlatform.is64bit "-x86-64"}.so.2 \ ${file} ''; in diff --git a/pkgs/misc/drivers/spacenavd/default.nix b/pkgs/misc/drivers/spacenavd/default.nix index eb2fc165cccb..27ea69943cc1 100644 --- a/pkgs/misc/drivers/spacenavd/default.nix +++ b/pkgs/misc/drivers/spacenavd/default.nix @@ -29,7 +29,7 @@ stdenv.mkDerivation rec { ]; buildInputs = [ libX11 ] - ++ lib.optional stdenv.isDarwin IOKit; + ++ lib.optional stdenv.hostPlatform.isDarwin IOKit; configureFlags = [ "--disable-debug" ]; diff --git a/pkgs/misc/frescobaldi/default.nix b/pkgs/misc/frescobaldi/default.nix index f37826501d72..653c4747c933 100644 --- a/pkgs/misc/frescobaldi/default.nix +++ b/pkgs/misc/frescobaldi/default.nix @@ -56,7 +56,7 @@ python311Packages.buildPythonApplication rec { license = licenses.gpl2Plus; maintainers = with maintainers; [ sepi ]; platforms = platforms.all; - broken = stdenv.isDarwin; # never built on Hydra https://hydra.nixos.org/job/nixpkgs/trunk/frescobaldi.x86_64-darwin + broken = stdenv.hostPlatform.isDarwin; # never built on Hydra https://hydra.nixos.org/job/nixpkgs/trunk/frescobaldi.x86_64-darwin mainProgram = "frescobaldi"; }; } diff --git a/pkgs/misc/ghostscript/default.nix b/pkgs/misc/ghostscript/default.nix index 466bd1c90938..c5cb69bea4b5 100644 --- a/pkgs/misc/ghostscript/default.nix +++ b/pkgs/misc/ghostscript/default.nix @@ -21,7 +21,7 @@ , bash , buildPackages , openjpeg -, cupsSupport ? config.ghostscript.cups or (!stdenv.isDarwin) +, cupsSupport ? config.ghostscript.cups or (!stdenv.hostPlatform.isDarwin) , cups , x11Support ? cupsSupport , xorg # with CUPS, X11 only adds very little @@ -125,7 +125,7 @@ stdenv.mkDerivation rec { buildFlags = [ "so" ] # without -headerpad, the following error occurs on Darwin when compiling with X11 support (as of 10.02.0) # error: install_name_tool: changing install names or rpaths can't be redone for: [...]libgs.dylib.10 (the program must be relinked, and you may need to use -headerpad or -headerpad_max_install_names) - ++ lib.optional (x11Support && stdenv.isDarwin) "LDFLAGS=-headerpad_max_install_names"; + ++ lib.optional (x11Support && stdenv.hostPlatform.isDarwin) "LDFLAGS=-headerpad_max_install_names"; installTargets = [ "soinstall" ]; postInstall = '' @@ -136,7 +136,7 @@ stdenv.mkDerivation rec { mkdir -p $fonts/share/fonts cp -rv ${fonts}/* "$fonts/share/fonts/" ln -s "$fonts/share/fonts" "$out/share/ghostscript/fonts" - '' + lib.optionalString stdenv.isDarwin '' + '' + lib.optionalString stdenv.hostPlatform.isDarwin '' for file in $out/lib/*.dylib* ; do install_name_tool -id "$file" $file done @@ -144,7 +144,7 @@ stdenv.mkDerivation rec { # dynamic library name only contains maj.min, eg. '9.53' dylib_version = lib.versions.majorMinor version; - preFixup = lib.optionalString stdenv.isDarwin '' + preFixup = lib.optionalString stdenv.hostPlatform.isDarwin '' install_name_tool -change libgs.dylib.$dylib_version $out/lib/libgs.dylib.$dylib_version $out/bin/gs install_name_tool -change libgs.dylib.$dylib_version $out/lib/libgs.dylib.$dylib_version $out/bin/gsx ''; diff --git a/pkgs/misc/jackaudio/default.nix b/pkgs/misc/jackaudio/default.nix index 09e158da3ac3..54827497f846 100644 --- a/pkgs/misc/jackaudio/default.nix +++ b/pkgs/misc/jackaudio/default.nix @@ -20,7 +20,7 @@ let libOnly = prefix == "lib"; - optDbus = if stdenv.isDarwin then null else shouldUsePkg dbus; + optDbus = if stdenv.hostPlatform.isDarwin then null else shouldUsePkg dbus; optPythonDBus = if libOnly then null else shouldUsePkg dbus-python; optLibffado = if libOnly then null else shouldUsePkg libffado; optAlsaLib = if libOnly then null else shouldUsePkg alsa-lib; @@ -42,7 +42,7 @@ stdenv.mkDerivation (finalAttrs: { nativeBuildInputs = [ pkg-config python makeWrapper wafHook ]; buildInputs = [ libsamplerate libsndfile readline eigen celt optDbus optPythonDBus optLibffado optAlsaLib optLibopus - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ aften AudioUnit CoreAudio Accelerate libobjc ]; diff --git a/pkgs/misc/jackaudio/jack1.nix b/pkgs/misc/jackaudio/jack1.nix index 428bb9685f47..d50f21f53fcb 100644 --- a/pkgs/misc/jackaudio/jack1.nix +++ b/pkgs/misc/jackaudio/jack1.nix @@ -35,7 +35,7 @@ stdenv.mkDerivation (finalAttrs: { passthru.tests.pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage; meta = with lib; { - broken = stdenv.isDarwin; + broken = stdenv.hostPlatform.isDarwin; description = "JACK audio connection kit"; homepage = "https://jackaudio.org"; license = with licenses; [ gpl2Plus lgpl21 ]; diff --git a/pkgs/misc/jackaudio/tools.nix b/pkgs/misc/jackaudio/tools.nix index e0e51a0ba4d9..76826d30cae9 100644 --- a/pkgs/misc/jackaudio/tools.nix +++ b/pkgs/misc/jackaudio/tools.nix @@ -16,7 +16,7 @@ , zita-alsa-pcmi , zita-resampler -, enableAlsa ? stdenv.isLinux +, enableAlsa ? stdenv.hostPlatform.isLinux }: stdenv.mkDerivation (final: { diff --git a/pkgs/misc/lilypond/default.nix b/pkgs/misc/lilypond/default.nix index 327882951d29..95bc57227e20 100644 --- a/pkgs/misc/lilypond/default.nix +++ b/pkgs/misc/lilypond/default.nix @@ -63,7 +63,7 @@ stdenv.mkDerivation rec { platforms = platforms.all; }; - FONTCONFIG_FILE = lib.optional stdenv.isDarwin (makeFontsConf { + FONTCONFIG_FILE = lib.optional stdenv.hostPlatform.isDarwin (makeFontsConf { fontDirectories = [ freefont_ttf ]; }); } diff --git a/pkgs/misc/moonfire-nvr/default.nix b/pkgs/misc/moonfire-nvr/default.nix index d6a994ac3e68..67e5f129927c 100644 --- a/pkgs/misc/moonfire-nvr/default.nix +++ b/pkgs/misc/moonfire-nvr/default.nix @@ -54,7 +54,7 @@ in rustPlatform.buildRustPackage { buildInputs = [ ncurses sqlite - ] ++ lib.optionals stdenv.isDarwin (with darwin.apple_sdk.frameworks; [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin (with darwin.apple_sdk.frameworks; [ Security ]); diff --git a/pkgs/misc/opcua-client-gui/default.nix b/pkgs/misc/opcua-client-gui/default.nix index c37568cfc9cb..226697060365 100644 --- a/pkgs/misc/opcua-client-gui/default.nix +++ b/pkgs/misc/opcua-client-gui/default.nix @@ -20,7 +20,7 @@ python3Packages.buildPythonApplication rec { }; nativeBuildInputs = [ copyDesktopItems wrapQtAppsHook ] - ++ lib.optionals stdenv.isDarwin [ desktopToDarwinBundle ]; + ++ lib.optionals stdenv.hostPlatform.isDarwin [ desktopToDarwinBundle ]; makeWrapperArgs = [ "\${qtWrapperArgs[@]}" diff --git a/pkgs/misc/source-and-tags/default.nix b/pkgs/misc/source-and-tags/default.nix index eb243aa4f9b8..9e73b77c59cf 100644 --- a/pkgs/misc/source-and-tags/default.nix +++ b/pkgs/misc/source-and-tags/default.nix @@ -58,7 +58,7 @@ # without this creating tag files for lifted-base fails export LC_ALL=en_US.UTF-8 export LANG=en_US.UTF-8 - ${lib.optionalString stdenv.isLinux "export LOCALE_ARCHIVE=${glibcLocales}/lib/locale/locale-archive;"} + ${lib.optionalString stdenv.hostPlatform.isLinux "export LOCALE_ARCHIVE=${glibcLocales}/lib/locale/locale-archive;"} ${toString hasktags}/bin/hasktags --ignore-close-implementation --ctags . mv tags \$TAG_FILE diff --git a/pkgs/misc/stabber/default.nix b/pkgs/misc/stabber/default.nix index fd64b3942b5a..5ca07007d14a 100644 --- a/pkgs/misc/stabber/default.nix +++ b/pkgs/misc/stabber/default.nix @@ -23,7 +23,7 @@ stdenv.mkDerivation { nativeBuildInputs = [ pkg-config autoreconfHook ]; buildInputs = [ glib expat libmicrohttpd ] ++ - lib.optionals stdenv.isDarwin [ darwin.apple_sdk.frameworks.Security ]; + lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.Security ]; meta = with lib; { description = "Stubbed XMPP Server"; diff --git a/pkgs/misc/t-rec/default.nix b/pkgs/misc/t-rec/default.nix index ac99abb7e5cd..c67a8d60557b 100644 --- a/pkgs/misc/t-rec/default.nix +++ b/pkgs/misc/t-rec/default.nix @@ -20,7 +20,7 @@ rustPlatform.buildRustPackage rec { nativeBuildInputs = [ makeWrapper ]; buildInputs = [ imagemagick ] - ++ lib.optionals stdenv.isDarwin [ libiconv Foundation ]; + ++ lib.optionals stdenv.hostPlatform.isDarwin [ libiconv Foundation ]; postInstall = '' wrapProgram "$out/bin/t-rec" --prefix PATH : "${binPath}" diff --git a/pkgs/misc/tmux-plugins/default.nix b/pkgs/misc/tmux-plugins/default.nix index dacf6ba1ef6f..d8da9f10164c 100644 --- a/pkgs/misc/tmux-plugins/default.nix +++ b/pkgs/misc/tmux-plugins/default.nix @@ -593,7 +593,7 @@ in rec { rev = "e91b178ff832b7bcbbf4d99d9f467f63fd1b76b5"; sha256 = "1z8dfbwblrbmb8sgb0k8h1q0dvfdz7gw57las8nwd5gj6ss1jyvx"; }; - postInstall = lib.optionalString stdenv.isDarwin '' + postInstall = lib.optionalString stdenv.hostPlatform.isDarwin '' sed -e 's:reattach-to-user-namespace:${pkgs.reattach-to-user-namespace}/bin/reattach-to-user-namespace:g' -i $target/sensible.tmux ''; }; diff --git a/pkgs/misc/urbit/default.nix b/pkgs/misc/urbit/default.nix index aa78c949e5c0..955b16bf693e 100644 --- a/pkgs/misc/urbit/default.nix +++ b/pkgs/misc/urbit/default.nix @@ -4,8 +4,8 @@ }: let - os = if stdenv.isDarwin then "macos" else "linux"; - arch = if stdenv.isAarch64 then "aarch64" else "x86_64"; + os = if stdenv.hostPlatform.isDarwin then "macos" else "linux"; + arch = if stdenv.hostPlatform.isAarch64 then "aarch64" else "x86_64"; platform = "${os}-${arch}"; in stdenv.mkDerivation rec { diff --git a/pkgs/misc/wiki-tui/default.nix b/pkgs/misc/wiki-tui/default.nix index 1724fe435faa..4d96c78cb560 100644 --- a/pkgs/misc/wiki-tui/default.nix +++ b/pkgs/misc/wiki-tui/default.nix @@ -29,7 +29,7 @@ rustPlatform.buildRustPackage rec { buildInputs = [ ncurses openssl - ] ++ lib.optionals stdenv.isDarwin [ Security ]; + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ Security ]; cargoHash = "sha256-XovbT+KC0va7yC5j7kf6t1SnXe1uyy1KI8FRV1AwkS0="; diff --git a/pkgs/os-specific/bsd/freebsd/pkgs/make.nix b/pkgs/os-specific/bsd/freebsd/pkgs/make.nix index ecf231c30414..a622e25f7a77 100644 --- a/pkgs/os-specific/bsd/freebsd/pkgs/make.nix +++ b/pkgs/os-specific/bsd/freebsd/pkgs/make.nix @@ -13,7 +13,7 @@ mkDerivation { export NIX_CFLAGS_COMPILE+=" -D_PATH_DEFSYSPATH=\"$out/share/mk\"" '' - + lib.optionalString stdenv.isDarwin '' + + lib.optionalString stdenv.hostPlatform.isDarwin '' substituteInPlace $BSDSRCDIR/share/mk/bsd.sys.mk \ --replace '-Wl,--fatal-warnings' "" \ --replace '-Wl,--warn-shared-textrel' "" diff --git a/pkgs/os-specific/bsd/freebsd/pkgs/mkDerivation.nix b/pkgs/os-specific/bsd/freebsd/pkgs/mkDerivation.nix index 4c2fe571999f..1a3b0f823253 100644 --- a/pkgs/os-specific/bsd/freebsd/pkgs/mkDerivation.nix +++ b/pkgs/os-specific/bsd/freebsd/pkgs/mkDerivation.nix @@ -89,14 +89,14 @@ lib.makeOverridable ( # Since STRIP in `makeFlags` has to be a flag, not the binary itself STRIPBIN = "${stdenv'.cc.bintools.targetPrefix}strip"; } - // lib.optionalAttrs stdenv'.isDarwin { MKRELRO = "no"; } + // lib.optionalAttrs stdenv'.hostPlatform.isDarwin { MKRELRO = "no"; } // lib.optionalAttrs (stdenv'.cc.isClang or false) { HAVE_LLVM = lib.versions.major (lib.getVersion stdenv'.cc.cc); } // lib.optionalAttrs (stdenv'.cc.isGNU or false) { HAVE_GCC = lib.versions.major (lib.getVersion stdenv'.cc.cc); } - // lib.optionalAttrs (stdenv'.isx86_32) { USE_SSP = "no"; } + // lib.optionalAttrs (stdenv'.hostPlatform.isx86_32) { USE_SSP = "no"; } // lib.optionalAttrs (attrs.headersOnly or false) { installPhase = "includesPhase"; dontBuild = true; diff --git a/pkgs/os-specific/bsd/freebsd/pkgs/mtree.nix b/pkgs/os-specific/bsd/freebsd/pkgs/mtree.nix index bbcaff3a1c6a..f1cf4f9bd220 100644 --- a/pkgs/os-specific/bsd/freebsd/pkgs/mtree.nix +++ b/pkgs/os-specific/bsd/freebsd/pkgs/mtree.nix @@ -18,7 +18,7 @@ mkDerivation { libmd libnetbsd ] - ++ lib.optional (stdenv.isFreeBSD) libutil; + ++ lib.optional (stdenv.hostPlatform.isFreeBSD) libutil; postPatch = '' ln -s $BSDSRCDIR/contrib/mknod/*.c $BSDSRCDIR/contrib/mknod/*.h $BSDSRCDIR/contrib/mtree @@ -32,7 +32,7 @@ mkDerivation { "-lnetbsd" ] ++ lib.optional compatIsNeeded "-legacy" - ++ lib.optional stdenv.isFreeBSD "-lutil" + ++ lib.optional stdenv.hostPlatform.isFreeBSD "-lutil" ) }" ''; diff --git a/pkgs/os-specific/bsd/netbsd/pkgs/compat/package.nix b/pkgs/os-specific/bsd/netbsd/pkgs/compat/package.nix index 40113028bbf1..ad83b0650202 100644 --- a/pkgs/os-specific/bsd/netbsd/pkgs/compat/package.nix +++ b/pkgs/os-specific/bsd/netbsd/pkgs/compat/package.nix @@ -118,7 +118,7 @@ mkDerivation ( install -D $BSDSRCDIR/common/include/rpc/types.h $dev/include/rpc/types.h sed -i '1s;^;#include "nbtool_config.h"\n;' $dev/include/rpc/types.h '' - + lib.optionalString stdenv.isDarwin '' + + lib.optionalString stdenv.hostPlatform.isDarwin '' mkdir -p $dev/include/ssp touch $dev/include/ssp/ssp.h '' diff --git a/pkgs/os-specific/bsd/netbsd/pkgs/libcurses.nix b/pkgs/os-specific/bsd/netbsd/pkgs/libcurses.nix index 8d61bcfdf7d9..75ca446b708c 100644 --- a/pkgs/os-specific/bsd/netbsd/pkgs/libcurses.nix +++ b/pkgs/os-specific/bsd/netbsd/pkgs/libcurses.nix @@ -16,12 +16,12 @@ mkDerivation { "-D__va_list=va_list" "-D__warn_references(a,b)=" ] - ++ lib.optional stdenv.isDarwin "-D__strong_alias(a,b)=" + ++ lib.optional stdenv.hostPlatform.isDarwin "-D__strong_alias(a,b)=" ); propagatedBuildInputs = compatIfNeeded; MKDOC = "no"; # missing vfontedpr makeFlags = defaultMakeFlags ++ [ "LIBDO.terminfo=${libterminfo}/lib" ]; - postPatch = lib.optionalString (!stdenv.isDarwin) '' + postPatch = lib.optionalString (!stdenv.hostPlatform.isDarwin) '' substituteInPlace $COMPONENT_PATH/printw.c \ --replace "funopen(win, NULL, __winwrite, NULL, NULL)" NULL \ --replace "__strong_alias(vwprintw, vw_printw)" 'extern int vwprintw(WINDOW*, const char*, va_list) __attribute__ ((alias ("vw_printw")));' diff --git a/pkgs/os-specific/bsd/netbsd/pkgs/mkDerivation.nix b/pkgs/os-specific/bsd/netbsd/pkgs/mkDerivation.nix index eb010749ada1..e926557fc444 100644 --- a/pkgs/os-specific/bsd/netbsd/pkgs/mkDerivation.nix +++ b/pkgs/os-specific/bsd/netbsd/pkgs/mkDerivation.nix @@ -104,14 +104,14 @@ lib.makeOverridable ( # TODO should CC wrapper set this? CPP = "${stdenv'.cc.targetPrefix}cpp"; } - // lib.optionalAttrs stdenv'.isDarwin { MKRELRO = "no"; } + // lib.optionalAttrs stdenv'.hostPlatform.isDarwin { MKRELRO = "no"; } // lib.optionalAttrs (stdenv'.cc.isClang or false) { HAVE_LLVM = lib.versions.major (lib.getVersion stdenv'.cc.cc); } // lib.optionalAttrs (stdenv'.cc.isGNU or false) { HAVE_GCC = lib.versions.major (lib.getVersion stdenv'.cc.cc); } - // lib.optionalAttrs (stdenv'.isx86_32) { USE_SSP = "no"; } + // lib.optionalAttrs (stdenv'.hostPlatform.isx86_32) { USE_SSP = "no"; } // lib.optionalAttrs (attrs.headersOnly or false) { installPhase = "includesPhase"; dontBuild = true; diff --git a/pkgs/os-specific/bsd/netbsd/pkgs/uudecode.nix b/pkgs/os-specific/bsd/netbsd/pkgs/uudecode.nix index 1e58df16ceee..da3c9bb05dc0 100644 --- a/pkgs/os-specific/bsd/netbsd/pkgs/uudecode.nix +++ b/pkgs/os-specific/bsd/netbsd/pkgs/uudecode.nix @@ -6,6 +6,6 @@ mkDerivation { path = "usr.bin/uudecode"; - env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.isLinux "-DNO_BASE64"; - NIX_LDFLAGS = lib.optional stdenv.isDarwin "-lresolv"; + env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.hostPlatform.isLinux "-DNO_BASE64"; + NIX_LDFLAGS = lib.optional stdenv.hostPlatform.isDarwin "-lresolv"; } diff --git a/pkgs/os-specific/darwin/apple-sdk-11.0/default.nix b/pkgs/os-specific/darwin/apple-sdk-11.0/default.nix index 7262400c3eb0..c64f011c0534 100644 --- a/pkgs/os-specific/darwin/apple-sdk-11.0/default.nix +++ b/pkgs/os-specific/darwin/apple-sdk-11.0/default.nix @@ -127,7 +127,7 @@ let }) bindgenHook; }; - callPackage = newScope (lib.optionalAttrs stdenv.isDarwin (stdenvs // rec { + callPackage = newScope (lib.optionalAttrs stdenv.hostPlatform.isDarwin (stdenvs // rec { inherit (pkgs.darwin.apple_sdk_11_0) xcodebuild rustPlatform; darwin = pkgs.darwin.overrideScope (_: prev: { inherit (prev.darwin.apple_sdk_11_0) diff --git a/pkgs/os-specific/darwin/apple-source-releases/diskdev_cmds/default.nix b/pkgs/os-specific/darwin/apple-source-releases/diskdev_cmds/default.nix index b642b993df0e..787fc93da1f6 100644 --- a/pkgs/os-specific/darwin/apple-source-releases/diskdev_cmds/default.nix +++ b/pkgs/os-specific/darwin/apple-source-releases/diskdev_cmds/default.nix @@ -2,8 +2,8 @@ , libutil }: let - xnu-src = if stdenv.isAarch64 then macosPackages_11_0_1.xnu.src else xnu.src; - arch = if stdenv.isAarch64 then "arm" else "i386"; + xnu-src = if stdenv.hostPlatform.isAarch64 then macosPackages_11_0_1.xnu.src else xnu.src; + arch = if stdenv.hostPlatform.isAarch64 then "arm" else "i386"; in appleDerivation { patches = [ # Fixes a build failure with newer versions of clang that make implicit int an error. diff --git a/pkgs/os-specific/darwin/apple-source-releases/xnu/default.nix b/pkgs/os-specific/darwin/apple-source-releases/xnu/default.nix index 1ba9a278ecc5..20a34e814d42 100644 --- a/pkgs/os-specific/darwin/apple-source-releases/xnu/default.nix +++ b/pkgs/os-specific/darwin/apple-source-releases/xnu/default.nix @@ -5,7 +5,7 @@ }: appleDerivation' (if headersOnly then stdenvNoCC else stdenv) ( - let arch = if stdenv.isx86_64 then "x86_64" else "arm64"; + let arch = if stdenv.hostPlatform.isx86_64 then "x86_64" else "arm64"; in { depsBuildBuild = [ buildPackages.stdenv.cc ]; diff --git a/pkgs/os-specific/darwin/goku/default.nix b/pkgs/os-specific/darwin/goku/default.nix index 13aadfce2404..4babe83c6351 100644 --- a/pkgs/os-specific/darwin/goku/default.nix +++ b/pkgs/os-specific/darwin/goku/default.nix @@ -9,7 +9,7 @@ stdenv.mkDerivation rec { pname = "goku"; version = "0.6.0"; - src = if stdenv.isAarch64 then + src = if stdenv.hostPlatform.isAarch64 then fetchurl { url = "https://github.com/yqrashawn/GokuRakuJoudo/releases/download/v${version}/goku-arm.zip"; hash = "sha256-TIoda2kDckK1FBLAmKudsDs3LXO4J0KWiAD2JlFb4rk="; @@ -27,7 +27,7 @@ stdenv.mkDerivation rec { joker ]; - sourceRoot = if stdenv.isAarch64 then "goku" else "."; + sourceRoot = if stdenv.hostPlatform.isAarch64 then "goku" else "."; installPhase = '' chmod +x goku diff --git a/pkgs/os-specific/darwin/noah/default.nix b/pkgs/os-specific/darwin/noah/default.nix index 502a165c33d4..ed20f67e48e9 100644 --- a/pkgs/os-specific/darwin/noah/default.nix +++ b/pkgs/os-specific/darwin/noah/default.nix @@ -21,6 +21,6 @@ stdenv.mkDerivation rec { maintainers = [ ]; platforms = platforms.darwin; # never built on aarch64-darwin since first introduction in nixpkgs - broken = stdenv.isDarwin && stdenv.isAarch64; + broken = stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isAarch64; }; } diff --git a/pkgs/os-specific/darwin/openwith/default.nix b/pkgs/os-specific/darwin/openwith/default.nix index d28ed4942821..dbbd94fe4363 100644 --- a/pkgs/os-specific/darwin/openwith/default.nix +++ b/pkgs/os-specific/darwin/openwith/default.nix @@ -2,7 +2,7 @@ let inherit (swiftPackages) apple_sdk stdenv swift; - arch = if stdenv.isAarch64 then "arm64" else "x86_64"; + arch = if stdenv.hostPlatform.isAarch64 then "arm64" else "x86_64"; in stdenv.mkDerivation rec { pname = "openwith"; diff --git a/pkgs/os-specific/linux/afuse/default.nix b/pkgs/os-specific/linux/afuse/default.nix index df64c0d1f56c..33d950b76cd6 100644 --- a/pkgs/os-specific/linux/afuse/default.nix +++ b/pkgs/os-specific/linux/afuse/default.nix @@ -14,7 +14,7 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ autoreconfHook pkg-config ]; buildInputs = [ fuse ]; - postPatch = lib.optionalString stdenv.isDarwin '' + postPatch = lib.optionalString stdenv.hostPlatform.isDarwin '' # Fix the build on macOS with macFUSE installed substituteInPlace configure.ac --replace \ 'export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:$PKG_CONFIG_PATH' \ diff --git a/pkgs/os-specific/linux/dpdk/default.nix b/pkgs/os-specific/linux/dpdk/default.nix index 3fd703c7ce1e..f49a723e2b0a 100644 --- a/pkgs/os-specific/linux/dpdk/default.nix +++ b/pkgs/os-specific/linux/dpdk/default.nix @@ -6,8 +6,8 @@ , withExamples ? [] , shared ? false , machine ? ( - if stdenv.isx86_64 then "nehalem" - else if stdenv.isAarch64 then "generic" + if stdenv.hostPlatform.isx86_64 then "nehalem" + else if stdenv.hostPlatform.isAarch64 then "generic" else null ) }: diff --git a/pkgs/os-specific/linux/firmware/raspberrypi/armstubs.nix b/pkgs/os-specific/linux/firmware/raspberrypi/armstubs.nix index 3f1a0ed04bb1..0393174d889d 100644 --- a/pkgs/os-specific/linux/firmware/raspberrypi/armstubs.nix +++ b/pkgs/os-specific/linux/firmware/raspberrypi/armstubs.nix @@ -32,8 +32,8 @@ stdenv.mkDerivation { "OBJCOPY7=${stdenv.cc.targetPrefix}objcopy" "OBJDUMP7=${stdenv.cc.targetPrefix}objdump" ] - ++ optionals (stdenv.isAarch64) [ "armstub8.bin" "armstub8-gic.bin" ] - ++ optionals (stdenv.isAarch32) [ "armstub7.bin" "armstub8-32.bin" "armstub8-32-gic.bin" ] + ++ optionals (stdenv.hostPlatform.isAarch64) [ "armstub8.bin" "armstub8-gic.bin" ] + ++ optionals (stdenv.hostPlatform.isAarch32) [ "armstub7.bin" "armstub8-32.bin" "armstub8-32-gic.bin" ] ; installPhase = '' diff --git a/pkgs/os-specific/linux/firmware/raspberrypi/default.nix b/pkgs/os-specific/linux/firmware/raspberrypi/default.nix index 5dede06d9269..02db2a2c82ad 100644 --- a/pkgs/os-specific/linux/firmware/raspberrypi/default.nix +++ b/pkgs/os-specific/linux/firmware/raspberrypi/default.nix @@ -28,6 +28,6 @@ stdenvNoCC.mkDerivation rec { maintainers = with maintainers; [ dezgeg ]; # Hash mismatch on source, mystery. # Maybe due to https://github.com/NixOS/nix/issues/847 - broken = stdenvNoCC.isDarwin; + broken = stdenvNoCC.hostPlatform.isDarwin; }; } diff --git a/pkgs/os-specific/linux/fuse/common.nix b/pkgs/os-specific/linux/fuse/common.nix index f4b8bfc5661a..cadf176b7c6e 100644 --- a/pkgs/os-specific/linux/fuse/common.nix +++ b/pkgs/os-specific/linux/fuse/common.nix @@ -24,7 +24,7 @@ in stdenv.mkDerivation rec { patches = lib.optional - (!isFuse3 && (stdenv.isAarch64 || stdenv.hostPlatform.isLoongArch64)) + (!isFuse3 && (stdenv.hostPlatform.isAarch64 || stdenv.hostPlatform.isLoongArch64)) (fetchpatch { url = "https://github.com/libfuse/libfuse/commit/914871b20a901e3e1e981c92bc42b1c93b7ab81b.patch"; sha256 = "1w4j6f1awjrycycpvmlv0x5v9gprllh4dnbjxl4dyl2jgbkaw6pa"; diff --git a/pkgs/os-specific/linux/guvcview/default.nix b/pkgs/os-specific/linux/guvcview/default.nix index e41f5c8e3c52..52a71d57199e 100644 --- a/pkgs/os-specific/linux/guvcview/default.nix +++ b/pkgs/os-specific/linux/guvcview/default.nix @@ -13,7 +13,7 @@ , gsl , libpng , sfml -, pulseaudioSupport ? config.pulseaudio or stdenv.isLinux +, pulseaudioSupport ? config.pulseaudio or stdenv.hostPlatform.isLinux , libpulseaudio ? null , useQt ? false , qtbase ? null diff --git a/pkgs/os-specific/linux/kernel/common-config.nix b/pkgs/os-specific/linux/kernel/common-config.nix index aeb78f1ad38a..d3226b767076 100644 --- a/pkgs/os-specific/linux/kernel/common-config.nix +++ b/pkgs/os-specific/linux/kernel/common-config.nix @@ -182,7 +182,7 @@ let # Collect ECC errors and retire pages that fail too often RAS_CEC = yes; - } // lib.optionalAttrs (stdenv.is32bit) { + } // lib.optionalAttrs (stdenv.hostPlatform.is32bit) { # Enable access to the full memory range (aka PAE) on 32-bit architectures # This check isn't super accurate but it's close enough HIGHMEM = option yes; @@ -214,7 +214,7 @@ let timer = { # Enable Full Dynticks System. # NO_HZ_FULL depends on HAVE_VIRT_CPU_ACCOUNTING_GEN depends on 64BIT - NO_HZ_FULL = lib.mkIf stdenv.is64bit yes; + NO_HZ_FULL = lib.mkIf stdenv.hostPlatform.is64bit yes; }; # Enable NUMA. @@ -411,7 +411,7 @@ let }; video = let - whenHasDevicePrivate = lib.mkIf (!stdenv.isx86_32); + whenHasDevicePrivate = lib.mkIf (!stdenv.hostPlatform.isx86_32); in { # compile in DRM so simpledrm can load before initrd if necessary AGP = yes; @@ -836,9 +836,9 @@ let KSM = yes; VIRT_DRIVERS = yes; # We need 64 GB (PAE) support for Xen guest support - HIGHMEM64G = { optional = true; tristate = lib.mkIf (!stdenv.is64bit) "y";}; + HIGHMEM64G = { optional = true; tristate = lib.mkIf (!stdenv.hostPlatform.is64bit) "y";}; - VFIO_PCI_VGA = lib.mkIf stdenv.is64bit yes; + VFIO_PCI_VGA = lib.mkIf stdenv.hostPlatform.is64bit yes; UDMABUF = yes; @@ -940,7 +940,7 @@ let # Allows soft-dirty tracking on pages, used by CRIU. # See https://docs.kernel.org/admin-guide/mm/soft-dirty.html - MEM_SOFT_DIRTY = lib.mkIf (!stdenv.isx86_32) yes; + MEM_SOFT_DIRTY = lib.mkIf (!stdenv.hostPlatform.isx86_32) yes; }; misc = let diff --git a/pkgs/os-specific/linux/kernel/generic.nix b/pkgs/os-specific/linux/kernel/generic.nix index 74e603623412..fdfc78235226 100644 --- a/pkgs/os-specific/linux/kernel/generic.nix +++ b/pkgs/os-specific/linux/kernel/generic.nix @@ -84,7 +84,7 @@ lib.makeOverridable ({ # The kernel source tarball. # cgit) that are needed here should be included directly in Nixpkgs as # files. -assert stdenv.isLinux; +assert stdenv.hostPlatform.isLinux; let # Dirty hack to make sure that `version` & `src` have diff --git a/pkgs/os-specific/linux/kernel/linux-rpi.nix b/pkgs/os-specific/linux/kernel/linux-rpi.nix index 8ea483fc2579..54c5ace09154 100644 --- a/pkgs/os-specific/linux/kernel/linux-rpi.nix +++ b/pkgs/os-specific/linux/kernel/linux-rpi.nix @@ -72,7 +72,7 @@ lib.overrideDerivation (buildLinux (args // { # Make copies of the DTBs named after the upstream names so that U-Boot finds them. # This is ugly as heck, but I don't know a better solution so far. postFixup = '' - dtbDir=${if stdenv.isAarch64 then "$out/dtbs/broadcom" else "$out/dtbs"} + dtbDir=${if stdenv.hostPlatform.isAarch64 then "$out/dtbs/broadcom" else "$out/dtbs"} rm $dtbDir/bcm283*.dtb copyDTB() { cp -v "$dtbDir/$1" "$dtbDir/$2" diff --git a/pkgs/os-specific/linux/kernel/xanmod-kernels.nix b/pkgs/os-specific/linux/kernel/xanmod-kernels.nix index e063a4148edc..5b6f24ae3183 100644 --- a/pkgs/os-specific/linux/kernel/xanmod-kernels.nix +++ b/pkgs/os-specific/linux/kernel/xanmod-kernels.nix @@ -59,7 +59,7 @@ let branch = lib.versions.majorMinor version; maintainers = with lib.maintainers; [ moni lovesegfault atemu shawn8901 zzzsy ]; description = "Built with custom settings and new features built to provide a stable, responsive and smooth desktop experience"; - broken = stdenv.isAarch64; + broken = stdenv.hostPlatform.isAarch64; }; } // (args.argsOverride or { })); in diff --git a/pkgs/os-specific/linux/kernel/zen-kernels.nix b/pkgs/os-specific/linux/kernel/zen-kernels.nix index 113627e0fd5d..9b1dbc3c9bbe 100644 --- a/pkgs/os-specific/linux/kernel/zen-kernels.nix +++ b/pkgs/os-specific/linux/kernel/zen-kernels.nix @@ -120,7 +120,7 @@ let maintainers = with lib.maintainers; [ thiagokokada jerrysm64 ]; description = "Built using the best configuration and kernel sources for desktop, multimedia, and gaming workloads." + lib.optionalString isLqx " (Same as linux_zen, but less aggressive release schedule and additional extra config)"; - broken = stdenv.isAarch64; + broken = stdenv.hostPlatform.isAarch64; }; } // (args.argsOverride or { })); diff --git a/pkgs/os-specific/linux/libaio/default.nix b/pkgs/os-specific/linux/libaio/default.nix index 4986f0abf4a3..080571ad71d1 100644 --- a/pkgs/os-specific/linux/libaio/default.nix +++ b/pkgs/os-specific/linux/libaio/default.nix @@ -21,7 +21,7 @@ stdenv.mkDerivation rec { "prefix=${placeholder "out"}" ] ++ lib.optional stdenv.hostPlatform.isStatic "ENABLE_SHARED=0"; - hardeningDisable = lib.optional (stdenv.isi686) "stackprotector"; + hardeningDisable = lib.optional (stdenv.hostPlatform.isi686) "stackprotector"; checkTarget = "partcheck"; # "check" needs root diff --git a/pkgs/os-specific/linux/lsirec/default.nix b/pkgs/os-specific/linux/lsirec/default.nix index 10da88b691d9..aab36459ae95 100644 --- a/pkgs/os-specific/linux/lsirec/default.nix +++ b/pkgs/os-specific/linux/lsirec/default.nix @@ -33,6 +33,6 @@ stdenv.mkDerivation rec { license = licenses.bsd2; maintainers = with maintainers; [ Luflosi ]; # never built on aarch64-linux since first introduction in nixpkgs - broken = stdenv.isLinux && stdenv.isAarch64; + broken = stdenv.hostPlatform.isLinux && stdenv.hostPlatform.isAarch64; }; } diff --git a/pkgs/os-specific/linux/mwprocapture/default.nix b/pkgs/os-specific/linux/mwprocapture/default.nix index b0513f5663d4..c83596a1fbe0 100644 --- a/pkgs/os-specific/linux/mwprocapture/default.nix +++ b/pkgs/os-specific/linux/mwprocapture/default.nix @@ -2,7 +2,7 @@ let bits = - if stdenv.is64bit then "64" + if stdenv.hostPlatform.is64bit then "64" else "32"; libpath = lib.makeLibraryPath [ stdenv.cc.cc stdenv.cc.libc alsa-lib ]; diff --git a/pkgs/os-specific/linux/new-lg4ff/default.nix b/pkgs/os-specific/linux/new-lg4ff/default.nix index a92ee9ae64b5..8eed8edbc166 100644 --- a/pkgs/os-specific/linux/new-lg4ff/default.nix +++ b/pkgs/os-specific/linux/new-lg4ff/default.nix @@ -31,6 +31,6 @@ stdenv.mkDerivation rec { license = licenses.gpl2Only; maintainers = with maintainers; [ matthiasbenaets ]; platforms = platforms.linux; - broken = stdenv.isAarch64; + broken = stdenv.hostPlatform.isAarch64; }; } diff --git a/pkgs/os-specific/linux/nfs-utils/default.nix b/pkgs/os-specific/linux/nfs-utils/default.nix index 74f560992ade..5f0e62b1b811 100644 --- a/pkgs/os-specific/linux/nfs-utils/default.nix +++ b/pkgs/os-specific/linux/nfs-utils/default.nix @@ -106,7 +106,7 @@ stdenv.mkDerivation rec { ''; # One test fails on mips. - # doCheck = !stdenv.isMips; + # doCheck = !stdenv.hostPlatform.isMips; # https://bugzilla.kernel.org/show_bug.cgi?id=203793 doCheck = false; diff --git a/pkgs/os-specific/linux/nsncd/default.nix b/pkgs/os-specific/linux/nsncd/default.nix index 9acef3cd9342..4e0b76dac223 100644 --- a/pkgs/os-specific/linux/nsncd/default.nix +++ b/pkgs/os-specific/linux/nsncd/default.nix @@ -44,6 +44,6 @@ rustPlatform.buildRustPackage { picnoir ]; # never built on aarch64-darwin, x86_64-darwin since first introduction in nixpkgs - broken = stdenv.isDarwin; + broken = stdenv.hostPlatform.isDarwin; }; } diff --git a/pkgs/os-specific/linux/pam_p11/default.nix b/pkgs/os-specific/linux/pam_p11/default.nix index 0a7e02f4ad81..a1e1dc109a15 100644 --- a/pkgs/os-specific/linux/pam_p11/default.nix +++ b/pkgs/os-specific/linux/pam_p11/default.nix @@ -24,7 +24,7 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ autoreconfHook pkg-config ]; buildInputs = [ pam libp11.passthru.openssl libp11 ] - ++ lib.optionals stdenv.isDarwin [ libintl ]; + ++ lib.optionals stdenv.hostPlatform.isDarwin [ libintl ]; meta = with lib; { homepage = "https://github.com/OpenSC/pam_p11"; diff --git a/pkgs/os-specific/linux/pax-utils/default.nix b/pkgs/os-specific/linux/pax-utils/default.nix index dcecfa4c13b8..ac4cae906a2b 100644 --- a/pkgs/os-specific/linux/pax-utils/default.nix +++ b/pkgs/os-specific/linux/pax-utils/default.nix @@ -4,7 +4,7 @@ , buildPackages , docbook_xml_dtd_44 , docbook_xsl -, withLibcap ? stdenv.isLinux, libcap +, withLibcap ? stdenv.hostPlatform.isLinux, libcap , pkg-config , meson , ninja diff --git a/pkgs/os-specific/linux/prl-tools/default.nix b/pkgs/os-specific/linux/prl-tools/default.nix index 4474b07229c2..15ca9f9212e4 100644 --- a/pkgs/os-specific/linux/prl-tools/default.nix +++ b/pkgs/os-specific/linux/prl-tools/default.nix @@ -80,7 +80,7 @@ stdenv.mkDerivation (finalAttrs: { undmg $src export sourceRoot=prl-tools-build - 7z x "Parallels Desktop.app/Contents/Resources/Tools/prl-tools-lin${lib.optionalString stdenv.isAarch64 "-arm"}.iso" -o$sourceRoot + 7z x "Parallels Desktop.app/Contents/Resources/Tools/prl-tools-lin${lib.optionalString stdenv.hostPlatform.isAarch64 "-arm"}.iso" -o$sourceRoot ( cd $sourceRoot/kmods; tar -xaf prl_mod.tar.gz ) runHook postUnpack @@ -111,12 +111,12 @@ stdenv.mkDerivation (finalAttrs: { cp prl_fs/SharedFolders/Guest/Linux/prl_fs/prl_fs.ko $out/lib/modules/${kernelVersion}/extra cp prl_fs_freeze/Snapshot/Guest/Linux/prl_freeze/prl_fs_freeze.ko $out/lib/modules/${kernelVersion}/extra cp prl_tg/Toolgate/Guest/Linux/prl_tg/prl_tg.ko $out/lib/modules/${kernelVersion}/extra - ${lib.optionalString stdenv.isAarch64 + ${lib.optionalString stdenv.hostPlatform.isAarch64 "cp prl_notifier/Installation/lnx/prl_notifier/prl_notifier.ko $out/lib/modules/${kernelVersion}/extra"} ) ( # tools - cd tools/tools${if stdenv.isAarch64 then "-arm64" else if stdenv.isx86_64 then "64" else "32"} + cd tools/tools${if stdenv.hostPlatform.isAarch64 then "-arm64" else if stdenv.hostPlatform.isx86_64 then "64" else "32"} mkdir -p $out/lib # prltoolsd contains hardcoded /bin/bash path diff --git a/pkgs/os-specific/linux/procps-ng/default.nix b/pkgs/os-specific/linux/procps-ng/default.nix index da2c80934172..32a7f7865b12 100644 --- a/pkgs/os-specific/linux/procps-ng/default.nix +++ b/pkgs/os-specific/linux/procps-ng/default.nix @@ -14,7 +14,7 @@ # system (or very similar like that found in Cygwin). The one # exception is ‘watch’ which is portable enough to run on pretty much # any UNIX-compatible system. -, watchOnly ? !(stdenv.isLinux || stdenv.isCygwin) +, watchOnly ? !(stdenv.hostPlatform.isLinux || stdenv.hostPlatform.isCygwin) , binlore , procps diff --git a/pkgs/os-specific/linux/rasdaemon/default.nix b/pkgs/os-specific/linux/rasdaemon/default.nix index 35478732fb8c..5a1df895b4c0 100644 --- a/pkgs/os-specific/linux/rasdaemon/default.nix +++ b/pkgs/os-specific/linux/rasdaemon/default.nix @@ -36,7 +36,7 @@ stdenv.mkDerivation rec { libtraceevent (perl.withPackages (ps: with ps; [ DBI DBDSQLite ])) ] - ++ lib.optionals (!stdenv.isAarch64) [ dmidecode ]; + ++ lib.optionals (!stdenv.hostPlatform.isAarch64) [ dmidecode ]; configureFlags = [ "--sysconfdir=/etc" @@ -82,7 +82,7 @@ stdenv.mkDerivation rec { substituteInPlace $out/bin/ras-mc-ctl \ --replace 'find_prog ("modprobe") or exit (1)' '"${kmod}/bin/modprobe"' '' - + lib.optionalString (!stdenv.isAarch64) '' + + lib.optionalString (!stdenv.hostPlatform.isAarch64) '' substituteInPlace $out/bin/ras-mc-ctl \ --replace 'find_prog ("dmidecode")' '"${dmidecode}/bin/dmidecode"' ''; diff --git a/pkgs/os-specific/linux/rtl8821ce/default.nix b/pkgs/os-specific/linux/rtl8821ce/default.nix index 434397ebc7c1..532ed4998918 100644 --- a/pkgs/os-specific/linux/rtl8821ce/default.nix +++ b/pkgs/os-specific/linux/rtl8821ce/default.nix @@ -45,6 +45,6 @@ stdenv.mkDerivation (finalAttrs: { defelo ]; broken = - stdenv.isAarch64 || ((lib.versions.majorMinor kernel.version) == "5.4" && kernel.isHardened); + stdenv.hostPlatform.isAarch64 || ((lib.versions.majorMinor kernel.version) == "5.4" && kernel.isHardened); }; }) diff --git a/pkgs/os-specific/linux/shadow/default.nix b/pkgs/os-specific/linux/shadow/default.nix index 98cb0c061ef5..682434fa0372 100644 --- a/pkgs/os-specific/linux/shadow/default.nix +++ b/pkgs/os-specific/linux/shadow/default.nix @@ -38,7 +38,7 @@ stdenv.mkDerivation rec { ]; buildInputs = [ libbsd libxcrypt ] - ++ lib.optional (pam != null && stdenv.isLinux) pam + ++ lib.optional (pam != null && stdenv.hostPlatform.isLinux) pam ++ lib.optional withTcb tcb; patches = [ diff --git a/pkgs/os-specific/linux/tuxedo-keyboard/default.nix b/pkgs/os-specific/linux/tuxedo-keyboard/default.nix index 2e0a13846f32..23285d5e26d2 100644 --- a/pkgs/os-specific/linux/tuxedo-keyboard/default.nix +++ b/pkgs/os-specific/linux/tuxedo-keyboard/default.nix @@ -31,7 +31,7 @@ stdenv.mkDerivation (finalAttrs: { ''; meta = { - broken = stdenv.isAarch64 || (lib.versionOlder kernel.version "5.5"); + broken = stdenv.hostPlatform.isAarch64 || (lib.versionOlder kernel.version "5.5"); description = "Keyboard and hardware I/O driver for TUXEDO Computers laptops"; homepage = "https://github.com/tuxedocomputers/tuxedo-keyboard/"; license = lib.licenses.gpl3Plus; diff --git a/pkgs/os-specific/linux/util-linux/default.nix b/pkgs/os-specific/linux/util-linux/default.nix index e393bf1ac08e..61b52ede774e 100644 --- a/pkgs/os-specific/linux/util-linux/default.nix +++ b/pkgs/os-specific/linux/util-linux/default.nix @@ -1,5 +1,5 @@ { lib, stdenv, fetchurl, pkg-config, zlib, shadow -, capabilitiesSupport ? stdenv.isLinux +, capabilitiesSupport ? stdenv.hostPlatform.isLinux , libcap_ng , libxcrypt , ncursesSupport ? true @@ -12,8 +12,8 @@ , translateManpages ? true , po4a , installShellFiles -, writeSupport ? stdenv.isLinux -, shadowSupport ? stdenv.isLinux +, writeSupport ? stdenv.hostPlatform.isLinux +, shadowSupport ? stdenv.hostPlatform.isLinux , memstreamHook , gitUpdater }: @@ -36,7 +36,7 @@ stdenv.mkDerivation rec { # the greater util-linux toolset. # Compatibility is maintained by symlinking the binaries from the # smaller outputs in the bin output. - outputs = [ "bin" "dev" "out" "lib" "man" ] ++ lib.optionals stdenv.isLinux [ "mount" ] ++ [ "login" ] ++ lib.optionals stdenv.isLinux [ "swap" ]; + outputs = [ "bin" "dev" "out" "lib" "man" ] ++ lib.optionals stdenv.hostPlatform.isLinux [ "mount" ] ++ [ "login" ] ++ lib.optionals stdenv.hostPlatform.isLinux [ "swap" ]; separateDebugInfo = true; postPatch = '' @@ -91,7 +91,7 @@ stdenv.mkDerivation rec { enableParallelBuilding = true; - postInstall = lib.optionalString stdenv.isLinux '' + postInstall = lib.optionalString stdenv.hostPlatform.isLinux '' moveToOutput bin/mount "$mount" moveToOutput bin/umount "$mount" ln -svf "$mount/bin/"* $bin/bin/ @@ -101,7 +101,7 @@ stdenv.mkDerivation rec { moveToOutput sbin/sulogin "$login" prefix=$login _moveSbin ln -svf "$login/bin/"* $bin/bin/ - '' + lib.optionalString stdenv.isLinux '' + '' + lib.optionalString stdenv.hostPlatform.isLinux '' moveToOutput sbin/swapon "$swap" moveToOutput sbin/swapoff "$swap" diff --git a/pkgs/servers/amqp/rabbitmq-server/default.nix b/pkgs/servers/amqp/rabbitmq-server/default.nix index 68cad9be1a69..f741858b011a 100644 --- a/pkgs/servers/amqp/rabbitmq-server/default.nix +++ b/pkgs/servers/amqp/rabbitmq-server/default.nix @@ -33,7 +33,7 @@ let procps gnused coreutils # used by helper scripts - ] ++ lib.optionals stdenv.isLinux [ systemd ]); # for systemd unit activation check + ] ++ lib.optionals stdenv.hostPlatform.isLinux [ systemd ]); # for systemd unit activation check in stdenv.mkDerivation rec { @@ -49,7 +49,7 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ unzip xmlto docbook_xml_dtd_45 docbook_xsl zip rsync python3 ]; buildInputs = [ erlang elixir libxml2 libxslt glibcLocales ] - ++ lib.optionals stdenv.isDarwin [ AppKit Carbon Cocoa ]; + ++ lib.optionals stdenv.hostPlatform.isDarwin [ AppKit Carbon Cocoa ]; outputs = [ "out" "man" "doc" ]; diff --git a/pkgs/servers/apache-airflow/python-package.nix b/pkgs/servers/apache-airflow/python-package.nix index 14c39ede5a85..d178a3d15064 100644 --- a/pkgs/servers/apache-airflow/python-package.nix +++ b/pkgs/servers/apache-airflow/python-package.nix @@ -244,7 +244,7 @@ buildPythonPackage rec { # https://github.com/apache/airflow/issues/33854 substituteInPlace pyproject.toml \ --replace '[project]' $'[project]\nname = "apache-airflow"\nversion = "${version}"' - '' + lib.optionalString stdenv.isDarwin '' + '' + lib.optionalString stdenv.hostPlatform.isDarwin '' # Fix failing test on Hydra substituteInPlace airflow/utils/db.py \ --replace "/tmp/sqlite_default.db" "$TMPDIR/sqlite_default.db" @@ -287,7 +287,7 @@ buildPythonPackage rec { "tests/core/test_core.py" ]; - disabledTests = lib.optionals stdenv.isDarwin [ + disabledTests = lib.optionals stdenv.hostPlatform.isDarwin [ "bash_operator_kill" # psutil.AccessDenied ]; diff --git a/pkgs/servers/bindle/default.nix b/pkgs/servers/bindle/default.nix index b9ff3937e973..bfd9b2872bc3 100644 --- a/pkgs/servers/bindle/default.nix +++ b/pkgs/servers/bindle/default.nix @@ -18,7 +18,7 @@ rustPlatform.buildRustPackage rec { doCheck = false; # Tests require a network nativeBuildInputs = [ pkg-config ]; - buildInputs = [ openssl ] ++ lib.optional stdenv.isDarwin Security; + buildInputs = [ openssl ] ++ lib.optional stdenv.hostPlatform.isDarwin Security; cargoHash = "sha256-RECEeo0uoGO5bBe+r++zpTjYYX3BIkT58uht2MLYkN0="; diff --git a/pkgs/servers/binserve/default.nix b/pkgs/servers/binserve/default.nix index 62cddd3e0dbf..3864c7929945 100644 --- a/pkgs/servers/binserve/default.nix +++ b/pkgs/servers/binserve/default.nix @@ -11,7 +11,7 @@ rustPlatform.buildRustPackage rec { sha256 = "sha256-Chm2xPB0BrLXSZslg9wnbDyHSJRQAvOtpH0Rw6w1q1s="; }; - buildInputs = lib.optionals stdenv.isDarwin [ + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ CoreServices ]; diff --git a/pkgs/servers/blockbook/default.nix b/pkgs/servers/blockbook/default.nix index f4ffeeb33471..47eb65bf70d2 100644 --- a/pkgs/servers/blockbook/default.nix +++ b/pkgs/servers/blockbook/default.nix @@ -54,7 +54,7 @@ buildGoModule rec { "-lstdc++" ]; - preBuild = lib.optionalString stdenv.isDarwin '' + preBuild = lib.optionalString stdenv.hostPlatform.isDarwin '' ulimit -n 8192 ''; diff --git a/pkgs/servers/clickhouse/default.nix b/pkgs/servers/clickhouse/default.nix index 4b5071be7bd2..7589ae36304a 100644 --- a/pkgs/servers/clickhouse/default.nix +++ b/pkgs/servers/clickhouse/default.nix @@ -24,7 +24,7 @@ let inherit (llvmPackages) stdenv; mkDerivation = ( - if stdenv.isDarwin + if stdenv.hostPlatform.isDarwin then darwin.apple_sdk_11_0.llvmPackages_16.stdenv else llvmPackages.stdenv).mkDerivation; in mkDerivation rec { @@ -83,10 +83,10 @@ in mkDerivation rec { python3 perl llvmPackages.lld - ] ++ lib.optionals stdenv.isx86_64 [ + ] ++ lib.optionals stdenv.hostPlatform.isx86_64 [ nasm yasm - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ llvmPackages.bintools findutils darwin.bootstrap_cmds @@ -96,7 +96,7 @@ in mkDerivation rec { rustPlatform.cargoSetupHook ]; - buildInputs = lib.optionals stdenv.isDarwin [ libiconv ]; + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ libiconv ]; # their vendored version is too old and missing this patch: https://github.com/corrosion-rs/corrosion/pull/205 corrosionSrc = if rustSupport then fetchFromGitHub { @@ -154,7 +154,7 @@ in mkDerivation rec { --replace 'git rev-parse --show-toplevel' '$src' substituteInPlace utils/check-style/check-style \ --replace 'git rev-parse --show-toplevel' '$src' - '' + lib.optionalString stdenv.isDarwin '' + '' + lib.optionalString stdenv.hostPlatform.isDarwin '' sed -i 's|gfind|find|' cmake/tools.cmake sed -i 's|ggrep|grep|' cmake/tools.cmake '' + lib.optionalString rustSupport '' @@ -168,7 +168,7 @@ in mkDerivation rec { popd cargoSetupPostPatchHook() { true; } - '' + lib.optionalString stdenv.isDarwin '' + '' + lib.optionalString stdenv.hostPlatform.isDarwin '' # Make sure Darwin invokes lld.ld64 not lld. substituteInPlace cmake/tools.cmake \ --replace '--ld-path=''${LLD_PATH}' '-fuse-ld=lld' @@ -183,10 +183,10 @@ in mkDerivation rec { env = { NIX_CFLAGS_COMPILE = # undefined reference to '__sync_val_compare_and_swap_16' - lib.optionalString stdenv.isx86_64 " -mcx16" + + lib.optionalString stdenv.hostPlatform.isx86_64 " -mcx16" + # Silence ``-Wimplicit-const-int-float-conversion` error in MemoryTracker.cpp and # ``-Wno-unneeded-internal-declaration` TreeOptimizer.cpp. - lib.optionalString stdenv.isDarwin " -Wno-implicit-const-int-float-conversion -Wno-unneeded-internal-declaration"; + lib.optionalString stdenv.hostPlatform.isDarwin " -Wno-implicit-const-int-float-conversion -Wno-unneeded-internal-declaration"; }; # https://github.com/ClickHouse/ClickHouse/issues/49988 diff --git a/pkgs/servers/code-server/default.nix b/pkgs/servers/code-server/default.nix index 5fd0f7867dcd..5662dc5d333b 100644 --- a/pkgs/servers/code-server/default.nix +++ b/pkgs/servers/code-server/default.nix @@ -133,9 +133,9 @@ stdenv.mkDerivation (finalAttrs: { buildInputs = [ xorg.libX11 xorg.libxkbfile - ] ++ lib.optionals (!stdenv.isDarwin) [ + ] ++ lib.optionals (!stdenv.hostPlatform.isDarwin) [ libsecret - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ AppKit Cocoa CoreServices @@ -246,7 +246,7 @@ stdenv.mkDerivation (finalAttrs: { xargs -I {} sh -c 'jq -e ".scripts.postinstall" {}/package.json >/dev/null && yarn --cwd {} postinstall --frozen-lockfile --offline || true' patchShebangs . - '' + lib.optionalString stdenv.isDarwin '' + '' + lib.optionalString stdenv.hostPlatform.isDarwin '' # Use prebuilt binary for @parcel/watcher, which requires macOS SDK 10.13+ # (see issue #101229). pushd ./lib/vscode/remote/node_modules/@parcel/watcher diff --git a/pkgs/servers/confluencepot/default.nix b/pkgs/servers/confluencepot/default.nix index d1aa0031f20f..89233d2063d5 100644 --- a/pkgs/servers/confluencepot/default.nix +++ b/pkgs/servers/confluencepot/default.nix @@ -22,7 +22,7 @@ buildGoModule rec { --replace "confluence.html" "$out/share/confluence.html" ''; - postInstall = lib.optionalString (!stdenv.isDarwin) '' + postInstall = lib.optionalString (!stdenv.hostPlatform.isDarwin) '' mv $out/bin/confluencePot $out/bin/${pname} ''; diff --git a/pkgs/servers/coturn/default.nix b/pkgs/servers/coturn/default.nix index 8578940b660c..061ea520731b 100644 --- a/pkgs/servers/coturn/default.nix +++ b/pkgs/servers/coturn/default.nix @@ -55,6 +55,6 @@ stdenv.mkDerivation rec { license = with licenses; [ bsd3 ]; platforms = platforms.all; maintainers = with maintainers; [ _0x4A6F ]; - broken = stdenv.isDarwin; # 2018-10-21 + broken = stdenv.hostPlatform.isDarwin; # 2018-10-21 }; } diff --git a/pkgs/servers/dante/default.nix b/pkgs/servers/dante/default.nix index 278c518a8106..9b99f51aef59 100644 --- a/pkgs/servers/dante/default.nix +++ b/pkgs/servers/dante/default.nix @@ -16,11 +16,11 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ autoreconfHook ]; buildInputs = [ pam libkrb5 cyrus_sasl miniupnpc libxcrypt ]; - configureFlags = if !stdenv.isDarwin + configureFlags = if !stdenv.hostPlatform.isDarwin then [ "--with-libc=libc.so.6" ] else [ "--with-libc=libc${stdenv.hostPlatform.extensions.sharedLibrary}" ]; - dontAddDisableDepTrack = stdenv.isDarwin; + dontAddDisableDepTrack = stdenv.hostPlatform.isDarwin; patches = [ # Fixes several issues with `osint.m4` that causes incorrect check failures when using newer diff --git a/pkgs/servers/dendrite/default.nix b/pkgs/servers/dendrite/default.nix index a590036ea5a2..bb72aeb170db 100644 --- a/pkgs/servers/dendrite/default.nix +++ b/pkgs/servers/dendrite/default.nix @@ -52,7 +52,7 @@ buildGoModule rec { ''; # PostgreSQL's request for a shared memory segment exceeded your kernel's SHMALL parameter - doCheck = !stdenv.isDarwin; + doCheck = !stdenv.hostPlatform.isDarwin; passthru.tests = { inherit (nixosTests) dendrite; diff --git a/pkgs/servers/dico/default.nix b/pkgs/servers/dico/default.nix index 658d477a483d..de43d3389b0b 100644 --- a/pkgs/servers/dico/default.nix +++ b/pkgs/servers/dico/default.nix @@ -20,7 +20,7 @@ stdenv.mkDerivation rec { strictDeps = true; # ERROR: All 188 tests were run, 90 failed unexpectedly. - doCheck = !stdenv.isDarwin; + doCheck = !stdenv.hostPlatform.isDarwin; meta = with lib; { description = "Flexible dictionary server and client implementing RFC 2229"; diff --git a/pkgs/servers/dns/bind/default.nix b/pkgs/servers/dns/bind/default.nix index fde2c94306f2..545474200bf8 100644 --- a/pkgs/servers/dns/bind/default.nix +++ b/pkgs/servers/dns/bind/default.nix @@ -40,10 +40,10 @@ stdenv.mkDerivation (finalAttrs: { nativeBuildInputs = [ perl pkg-config ]; buildInputs = [ libidn2 libtool libxml2 openssl libuv nghttp2 jemalloc ] - ++ lib.optional stdenv.isLinux libcap + ++ lib.optional stdenv.hostPlatform.isLinux libcap ++ lib.optional enableGSSAPI libkrb5 ++ lib.optional enablePython (python3.withPackages (ps: with ps; [ ply ])) - ++ lib.optionals stdenv.isDarwin [ darwin.apple_sdk.frameworks.CoreServices ]; + ++ lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.CoreServices ]; depsBuildBuild = [ buildPackages.stdenv.cc ]; diff --git a/pkgs/servers/dns/coredns/default.nix b/pkgs/servers/dns/coredns/default.nix index bb85bdb320e5..3cda1b6cf1dc 100644 --- a/pkgs/servers/dns/coredns/default.nix +++ b/pkgs/servers/dns/coredns/default.nix @@ -62,7 +62,7 @@ in buildGoModule rec { # it's a lint rather than a test of functionality, so it's safe to disable. substituteInPlace test/presubmit_test.go \ --replace "TestImportOrdering" "SkipImportOrdering" - '' + lib.optionalString stdenv.isDarwin '' + '' + lib.optionalString stdenv.hostPlatform.isDarwin '' # loopback interface is lo0 on macos sed -E -i 's/\blo\b/lo0/' plugin/bind/setup_test.go diff --git a/pkgs/servers/dns/doh-proxy-rust/default.nix b/pkgs/servers/dns/doh-proxy-rust/default.nix index 244ec35a6768..5de2732b186a 100644 --- a/pkgs/servers/dns/doh-proxy-rust/default.nix +++ b/pkgs/servers/dns/doh-proxy-rust/default.nix @@ -12,7 +12,7 @@ rustPlatform.buildRustPackage rec { cargoHash = "sha256-eXPAn2ziSdciZa6YrOIa7y7Lms681X+yVAD9HrvsZHg="; - buildInputs = lib.optionals stdenv.isDarwin [ Security libiconv ]; + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ Security libiconv ]; passthru.tests = { inherit (nixosTests) doh-proxy-rust; }; diff --git a/pkgs/servers/dns/knot-dns/default.nix b/pkgs/servers/dns/knot-dns/default.nix index fb71f0e3442f..5c3c5df26210 100644 --- a/pkgs/servers/dns/knot-dns/default.nix +++ b/pkgs/servers/dns/knot-dns/default.nix @@ -43,10 +43,10 @@ stdenv.mkDerivation rec { libmaxminddb # optional for geoip module (it's tiny) # without sphinx &al. for developer documentation fstrm protobufc # dnstap support - ] ++ lib.optionals stdenv.isLinux [ + ] ++ lib.optionals stdenv.hostPlatform.isLinux [ libcap_ng systemd xdp-tools libbpf libmnl # XDP support (it's Linux kernel API) - ] ++ lib.optional stdenv.isDarwin zlib; # perhaps due to gnutls + ] ++ lib.optional stdenv.hostPlatform.isDarwin zlib; # perhaps due to gnutls enableParallelBuilding = true; @@ -62,7 +62,7 @@ stdenv.mkDerivation rec { passthru.tests = { inherit knot-resolver; - } // lib.optionalAttrs stdenv.isLinux { + } // lib.optionalAttrs stdenv.hostPlatform.isLinux { inherit (nixosTests) knot kea; prometheus-exporter = nixosTests.prometheus-exporters.knot; # Some dependencies are very version-sensitive, so the might get dropped diff --git a/pkgs/servers/dns/knot-resolver/default.nix b/pkgs/servers/dns/knot-resolver/default.nix index 198c7835fd8b..315a1e3aaf0d 100644 --- a/pkgs/servers/dns/knot-resolver/default.nix +++ b/pkgs/servers/dns/knot-resolver/default.nix @@ -64,7 +64,7 @@ unwrapped = stdenv.mkDerivation rec { # http://knot-resolver.readthedocs.io/en/latest/build.html#requirements buildInputs = [ knot-dns lua.lua libuv gnutls lmdb ] ## the rest are optional dependencies - ++ optionals stdenv.isLinux [ /*lib*/systemd libcap_ng ] + ++ optionals stdenv.hostPlatform.isLinux [ /*lib*/systemd libcap_ng ] ++ [ jemalloc nghttp2 ] ++ [ fstrm protobufc ] # dnstap support ; @@ -78,7 +78,7 @@ unwrapped = stdenv.mkDerivation rec { ] ++ optional doInstallCheck "-Dunit_tests=enabled" ++ optional doInstallCheck "-Dconfig_tests=enabled" - ++ optional stdenv.isLinux "-Dsystemd_files=enabled" # used by NixOS service + ++ optional stdenv.hostPlatform.isLinux "-Dsystemd_files=enabled" # used by NixOS service #"-Dextra_tests=enabled" # not suitable as in-distro tests; many deps, too. ; diff --git a/pkgs/servers/dns/pdns/default.nix b/pkgs/servers/dns/pdns/default.nix index 1037c88229aa..e7633761a5d7 100644 --- a/pkgs/servers/dns/pdns/default.nix +++ b/pkgs/servers/dns/pdns/default.nix @@ -96,7 +96,7 @@ stdenv.mkDerivation (finalAttrs: { description = "Authoritative DNS server"; homepage = "https://www.powerdns.com"; platforms = platforms.unix; - broken = stdenv.isDarwin; + broken = stdenv.hostPlatform.isDarwin; license = licenses.gpl2Only; maintainers = with maintainers; [ mic92 disassembler nickcao ]; }; diff --git a/pkgs/servers/domoticz/default.nix b/pkgs/servers/domoticz/default.nix index 72b4d71a62af..7f89645b3f97 100644 --- a/pkgs/servers/domoticz/default.nix +++ b/pkgs/servers/domoticz/default.nix @@ -85,7 +85,7 @@ stdenv.mkDerivation rec { changelog = "https://github.com/domoticz/domoticz/blob/${version}/History.txt"; license = licenses.gpl3Plus; platforms = platforms.all; - broken = stdenv.isDarwin; # never built on Hydra https://hydra.nixos.org/job/nixpkgs/staging-next/domoticz.x86_64-darwin + broken = stdenv.hostPlatform.isDarwin; # never built on Hydra https://hydra.nixos.org/job/nixpkgs/staging-next/domoticz.x86_64-darwin mainProgram = "domoticz"; }; } diff --git a/pkgs/servers/fedigroups/default.nix b/pkgs/servers/fedigroups/default.nix index e823a5017ef0..764dee9ff4b1 100644 --- a/pkgs/servers/fedigroups/default.nix +++ b/pkgs/servers/fedigroups/default.nix @@ -41,7 +41,7 @@ rustPlatform.buildRustPackage rec { buildInputs = [ openssl - ] ++ lib.optional stdenv.isDarwin Security; + ] ++ lib.optional stdenv.hostPlatform.isDarwin Security; meta = with lib; { homepage = "https://git.ondrovo.com/MightyPork/group-actor#fedi-groups"; diff --git a/pkgs/servers/foundationdb/cmake.nix b/pkgs/servers/foundationdb/cmake.nix index bc0a17166631..287809a451d7 100644 --- a/pkgs/servers/foundationdb/cmake.nix +++ b/pkgs/servers/foundationdb/cmake.nix @@ -81,7 +81,7 @@ let # Needed with GCC 12 "-Wno-error=missing-template-keyword" # Needed to compile on aarch64 - (lib.optionalString stdenv.isAarch64 "-march=armv8-a+crc") + (lib.optionalString stdenv.hostPlatform.isAarch64 "-march=armv8-a+crc") ]; inherit patches; diff --git a/pkgs/servers/frr/default.nix b/pkgs/servers/frr/default.nix index 76d0dc8b2a8f..bcb829d716bf 100644 --- a/pkgs/servers/frr/default.nix +++ b/pkgs/servers/frr/default.nix @@ -127,7 +127,7 @@ stdenv.mkDerivation (finalAttrs: { readline rtrlib zeromq - ] ++ lib.optionals stdenv.isLinux [ + ] ++ lib.optionals stdenv.hostPlatform.isLinux [ libcap ] ++ lib.optionals snmpSupport [ net-snmp diff --git a/pkgs/servers/ftp/bftpd/default.nix b/pkgs/servers/ftp/bftpd/default.nix index 0aba1e90a164..895e3cd063fc 100644 --- a/pkgs/servers/ftp/bftpd/default.nix +++ b/pkgs/servers/ftp/bftpd/default.nix @@ -10,7 +10,7 @@ stdenv.mkDerivation rec { }; # utmp.h is deprecated on aarch64-darwin - postPatch = lib.optionals (stdenv.isDarwin && stdenv.isAarch64) '' + postPatch = lib.optionals (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isAarch64) '' for file in login.*; do substituteInPlace $file --replace "#ifdef HAVE_UTMP_H" "#if 0" done diff --git a/pkgs/servers/gemini/stargazer/default.nix b/pkgs/servers/gemini/stargazer/default.nix index 8aae6fa7b7fe..4c6b178ae37b 100644 --- a/pkgs/servers/gemini/stargazer/default.nix +++ b/pkgs/servers/gemini/stargazer/default.nix @@ -29,7 +29,7 @@ rustPlatform.buildRustPackage rec { nativeBuildInputs = [ installShellFiles scdoc ]; - buildInputs = lib.optional stdenv.isDarwin Security; + buildInputs = lib.optional stdenv.hostPlatform.isDarwin Security; postInstall = '' scdoc < doc/stargazer.scd > stargazer.1 diff --git a/pkgs/servers/geospatial/martin/default.nix b/pkgs/servers/geospatial/martin/default.nix index d871c79d6c20..dbd1c527ef6a 100644 --- a/pkgs/servers/geospatial/martin/default.nix +++ b/pkgs/servers/geospatial/martin/default.nix @@ -15,7 +15,7 @@ rustPlatform.buildRustPackage rec { nativeBuildInputs = [ pkg-config ]; - buildInputs = [ openssl ] ++ lib.optionals stdenv.isDarwin [ Security SystemConfiguration ]; + buildInputs = [ openssl ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ Security SystemConfiguration ]; checkFlags = [ "--skip function_source_schemas" diff --git a/pkgs/servers/gotosocial/default.nix b/pkgs/servers/gotosocial/default.nix index 3f57180795ee..c313b5f8d5cb 100644 --- a/pkgs/servers/gotosocial/default.nix +++ b/pkgs/servers/gotosocial/default.nix @@ -40,7 +40,7 @@ buildGoModule rec { ''; # tests are working only on x86_64-linux - # doCheck = stdenv.isLinux && stdenv.isx86_64; + # doCheck = stdenv.hostPlatform.isLinux && stdenv.hostPlatform.isx86_64; # checks are currently very unstable in our setup, so we should test manually for now doCheck = false; diff --git a/pkgs/servers/gpsd/default.nix b/pkgs/servers/gpsd/default.nix index ab1668ccfb92..4b9269ab6692 100644 --- a/pkgs/servers/gpsd/default.nix +++ b/pkgs/servers/gpsd/default.nix @@ -11,7 +11,7 @@ , dbus , libusb1 , ncurses -, kppsSupport ? stdenv.isLinux, pps-tools +, kppsSupport ? stdenv.hostPlatform.isLinux, pps-tools , python3Packages # optional deps for GUI packages diff --git a/pkgs/servers/home-assistant/default.nix b/pkgs/servers/home-assistant/default.nix index a664cf0fa9d7..4a4a6b8eed80 100644 --- a/pkgs/servers/home-assistant/default.nix +++ b/pkgs/servers/home-assistant/default.nix @@ -537,7 +537,7 @@ in python.pkgs.buildPythonApplication rec { makeWrapperArgs = lib.optional skipPip "--add-flags --skip-pip"; # upstream only tests on Linux, so do we. - doCheck = stdenv.isLinux; + doCheck = stdenv.hostPlatform.isLinux; nativeCheckInputs = with python.pkgs; [ # test infrastructure (selectively from requirement_test.txt) diff --git a/pkgs/servers/home-automation/evcc/default.nix b/pkgs/servers/home-automation/evcc/default.nix index d7377a5d3e6f..5f93c5586719 100644 --- a/pkgs/servers/home-automation/evcc/default.nix +++ b/pkgs/servers/home-automation/evcc/default.nix @@ -67,7 +67,7 @@ buildGo123Module rec { make ui ''; - doCheck = !stdenv.isDarwin; # darwin sandbox limitations around network access, access to /etc/protocols and likely more + doCheck = !stdenv.hostPlatform.isDarwin; # darwin sandbox limitations around network access, access to /etc/protocols and likely more checkFlags = let skippedTests = [ diff --git a/pkgs/servers/homepage-dashboard/default.nix b/pkgs/servers/homepage-dashboard/default.nix index 0b957e6337b9..dde6162438cb 100644 --- a/pkgs/servers/homepage-dashboard/default.nix +++ b/pkgs/servers/homepage-dashboard/default.nix @@ -50,9 +50,9 @@ buildNpmPackage rec { patchShebangs .next/standalone/server.js ''; - nativeBuildInputs = [ git ] ++ lib.optionals stdenv.isDarwin [ cctools ]; + nativeBuildInputs = [ git ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ cctools ]; - buildInputs = [ nodePackages.node-gyp-build ] ++ lib.optionals stdenv.isDarwin [ IOKit ]; + buildInputs = [ nodePackages.node-gyp-build ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ IOKit ]; env.PYTHON = "${python3}/bin/python"; @@ -107,6 +107,6 @@ buildNpmPackage rec { license = lib.licenses.gpl3; maintainers = with lib.maintainers; [ jnsgruk ]; platforms = lib.platforms.all; - broken = stdenv.isDarwin; + broken = stdenv.hostPlatform.isDarwin; }; } diff --git a/pkgs/servers/http/apache-httpd/2.4.nix b/pkgs/servers/http/apache-httpd/2.4.nix index c0ebb2e8bfcc..2d9ac45b8e82 100644 --- a/pkgs/servers/http/apache-httpd/2.4.nix +++ b/pkgs/servers/http/apache-httpd/2.4.nix @@ -41,11 +41,11 @@ stdenv.mkDerivation rec { lib.optional brotliSupport brotli ++ lib.optional sslSupport openssl ++ lib.optional modTlsSupport rustls-ffi ++ - lib.optional (modTlsSupport && stdenv.isDarwin) Foundation ++ + lib.optional (modTlsSupport && stdenv.hostPlatform.isDarwin) Foundation ++ lib.optional ldapSupport openldap ++ # there is no --with-ldap flag lib.optional libxml2Support libxml2 ++ lib.optional http2Support nghttp2 ++ - lib.optional stdenv.isDarwin libiconv; + lib.optional stdenv.hostPlatform.isDarwin libiconv; postPatch = '' sed -i config.layout -e "s|installbuilddir:.*|installbuilddir: $dev/share/build|" @@ -53,7 +53,7 @@ stdenv.mkDerivation rec { ''; # Required for ‘pthread_cancel’. - NIX_LDFLAGS = lib.optionalString (!stdenv.isDarwin) "-lgcc_s"; + NIX_LDFLAGS = lib.optionalString (!stdenv.hostPlatform.isDarwin) "-lgcc_s"; configureFlags = [ "--with-apr=${apr.dev}" diff --git a/pkgs/servers/http/apache-modules/mod_python/default.nix b/pkgs/servers/http/apache-modules/mod_python/default.nix index ddd33184e046..bebd1278acc2 100644 --- a/pkgs/servers/http/apache-modules/mod_python/default.nix +++ b/pkgs/servers/http/apache-modules/mod_python/default.nix @@ -29,7 +29,7 @@ stdenv.mkDerivation rec { buildInputs = [ apacheHttpd python3 - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ libintl ]; diff --git a/pkgs/servers/http/couchdb/3.nix b/pkgs/servers/http/couchdb/3.nix index 87e80976b8c5..092c13f070a1 100644 --- a/pkgs/servers/http/couchdb/3.nix +++ b/pkgs/servers/http/couchdb/3.nix @@ -22,7 +22,7 @@ stdenv.mkDerivation rec { substituteInPlace src/couch/rebar.config.script --replace '/usr/include/mozjs-91' "${spidermonkey_91.dev}/include/mozjs-91" substituteInPlace configure --replace '/usr/include/''${SM_HEADERS}' "${spidermonkey_91.dev}/include/mozjs-91" patchShebangs bin/rebar - '' + lib.optionalString stdenv.isDarwin '' + '' + lib.optionalString stdenv.hostPlatform.isDarwin '' # LTO with Clang produces LLVM bitcode, which causes linking to fail quietly. # (There are warnings, but no hard errors, and it produces an empty dylib.) substituteInPlace src/jiffy/rebar.config.script --replace '"-flto"' '""' diff --git a/pkgs/servers/http/dufs/default.nix b/pkgs/servers/http/dufs/default.nix index be7ed60083ed..b7dfb2d3b643 100644 --- a/pkgs/servers/http/dufs/default.nix +++ b/pkgs/servers/http/dufs/default.nix @@ -21,13 +21,13 @@ rustPlatform.buildRustPackage rec { nativeBuildInputs = [ installShellFiles ]; - buildInputs = lib.optionals stdenv.isDarwin [ + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.Security ]; # FIXME: checkPhase on darwin will leave some zombie spawn processes # see https://github.com/NixOS/nixpkgs/issues/205620 - doCheck = !stdenv.isDarwin; + doCheck = !stdenv.hostPlatform.isDarwin; checkFlags = [ # tests depend on network interface, may fail with virtual IPs. "--skip=validate_printed_urls" diff --git a/pkgs/servers/http/merecat/default.nix b/pkgs/servers/http/merecat/default.nix index 6231fb9e2ad2..344f81da2ff7 100644 --- a/pkgs/servers/http/merecat/default.nix +++ b/pkgs/servers/http/merecat/default.nix @@ -47,6 +47,6 @@ stdenv.mkDerivation (finalAttrs: { maintainers = with maintainers; [ fgaz ]; platforms = platforms.all; # Strange header and/or linker errors - broken = stdenv.isDarwin; + broken = stdenv.hostPlatform.isDarwin; }; }) diff --git a/pkgs/servers/http/nginx/generic.nix b/pkgs/servers/http/nginx/generic.nix index 9369259ff65e..266c09755ab0 100644 --- a/pkgs/servers/http/nginx/generic.nix +++ b/pkgs/servers/http/nginx/generic.nix @@ -129,7 +129,7 @@ stdenv.mkDerivation { ] ++ lib.optionals (stdenv.cc.isGNU && lib.versionAtLeast stdenv.cc.version "11") [ # fix build vts module on gcc11 "-Wno-error=stringop-overread" - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ "-Wno-error=deprecated-declarations" "-Wno-error=gnu-folding-constant" "-Wno-error=unused-but-set-variable" @@ -173,7 +173,7 @@ stdenv.mkDerivation { inherit postPatch; - hardeningEnable = lib.optional (!stdenv.isDarwin) "pie"; + hardeningEnable = lib.optional (!stdenv.hostPlatform.isDarwin) "pie"; enableParallelBuilding = true; diff --git a/pkgs/servers/http/tengine/default.nix b/pkgs/servers/http/tengine/default.nix index 6f7ff9ceb765..bddb334e8c5d 100644 --- a/pkgs/servers/http/tengine/default.nix +++ b/pkgs/servers/http/tengine/default.nix @@ -100,11 +100,11 @@ stdenv.mkDerivation rec { ++ map (mod: "--add-module=${mod.src}") modules; env.NIX_CFLAGS_COMPILE = "-I${libxml2.dev}/include/libxml2 -Wno-error=implicit-fallthrough" - + optionalString stdenv.isDarwin " -Wno-error=deprecated-declarations"; + + optionalString stdenv.hostPlatform.isDarwin " -Wno-error=deprecated-declarations"; preConfigure = (lib.concatMapStringsSep "\n" (mod: mod.preConfigure or "") modules); - hardeningEnable = optional (!stdenv.isDarwin) "pie"; + hardeningEnable = optional (!stdenv.hostPlatform.isDarwin) "pie"; enableParallelBuilding = true; diff --git a/pkgs/servers/http/trafficserver/default.nix b/pkgs/servers/http/trafficserver/default.nix index 59b199bd9a2a..e0b20f68bf06 100644 --- a/pkgs/servers/http/trafficserver/default.nix +++ b/pkgs/servers/http/trafficserver/default.nix @@ -18,9 +18,9 @@ , curl , withCurses ? true , ncurses -, withCap ? stdenv.isLinux +, withCap ? stdenv.hostPlatform.isLinux , libcap -, withUnwind ? stdenv.isLinux +, withUnwind ? stdenv.hostPlatform.isLinux , libunwind # optional dependencies , withBrotli ? false @@ -64,7 +64,7 @@ stdenv.mkDerivation rec { # [2]: https://github.com/apache/trafficserver/blob/3fd2c60/configure.ac#L742-L788 nativeBuildInputs = [ makeWrapper pkg-config file python3 ] ++ (with perlPackages; [ perl ExtUtilsMakeMaker ]) - ++ lib.optionals stdenv.isLinux [ linuxHeaders ]; + ++ lib.optionals stdenv.hostPlatform.isLinux [ linuxHeaders ]; buildInputs = [ openssl @@ -95,10 +95,10 @@ stdenv.mkDerivation rec { tools/check-unused-dependencies substituteInPlace configure --replace '/usr/bin/file' '${file}/bin/file' - '' + lib.optionalString stdenv.isLinux '' + '' + lib.optionalString stdenv.hostPlatform.isLinux '' substituteInPlace configure \ --replace '/usr/include/linux' '${linuxHeaders}/include/linux' - '' + lib.optionalString stdenv.isDarwin '' + '' + lib.optionalString stdenv.hostPlatform.isDarwin '' # 'xcrun leaks' probably requires non-free XCode substituteInPlace iocore/net/test_certlookup.cc \ --replace 'xcrun leaks' 'true' diff --git a/pkgs/servers/imgproxy/default.nix b/pkgs/servers/imgproxy/default.nix index 5388376720c9..52a871092270 100644 --- a/pkgs/servers/imgproxy/default.nix +++ b/pkgs/servers/imgproxy/default.nix @@ -17,7 +17,7 @@ buildGoModule rec { nativeBuildInputs = [ pkg-config gobject-introspection ]; buildInputs = [ vips ] - ++ lib.optionals stdenv.isDarwin [ libunwind ]; + ++ lib.optionals stdenv.hostPlatform.isDarwin [ libunwind ]; preBuild = '' export CGO_LDFLAGS_ALLOW='-(s|w)' diff --git a/pkgs/servers/irc/solanum/default.nix b/pkgs/servers/irc/solanum/default.nix index e70d6cc0a8e6..b31a7e16cd1f 100644 --- a/pkgs/servers/irc/solanum/default.nix +++ b/pkgs/servers/irc/solanum/default.nix @@ -38,7 +38,7 @@ stdenv.mkDerivation rec { "--localstatedir=/var/lib" "--with-rundir=/run" "--with-logdir=/var/log" - ] ++ lib.optionals (stdenv.isLinux) [ + ] ++ lib.optionals (stdenv.hostPlatform.isLinux) [ "--enable-sctp=${lksctp-tools.out}/lib" ]; @@ -55,7 +55,7 @@ stdenv.mkDerivation rec { sqlite ]; - doCheck = !stdenv.isDarwin; + doCheck = !stdenv.hostPlatform.isDarwin; enableParallelBuilding = true; # Missing install depends: diff --git a/pkgs/servers/jackett/default.nix b/pkgs/servers/jackett/default.nix index 64ce9873f45f..b0d5ffaa17cf 100644 --- a/pkgs/servers/jackett/default.nix +++ b/pkgs/servers/jackett/default.nix @@ -28,7 +28,7 @@ buildDotnetModule rec { runtimeDeps = [ openssl ]; - doCheck = !(stdenv.isDarwin && stdenv.isAarch64); # mono is not available on aarch64-darwin + doCheck = !(stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isAarch64); # mono is not available on aarch64-darwin nativeCheckInputs = [ mono ]; testProjectFile = "src/Jackett.Test/Jackett.Test.csproj"; diff --git a/pkgs/servers/krill/default.nix b/pkgs/servers/krill/default.nix index a8847215d65c..f310b4d020ef 100644 --- a/pkgs/servers/krill/default.nix +++ b/pkgs/servers/krill/default.nix @@ -20,14 +20,14 @@ rustPlatform.buildRustPackage rec { cargoHash = "sha256-Z12fUK4TUgk38/vNAt8RWLFGLc8WnZAgHWz0xl1QKLI="; - buildInputs = [ openssl ] ++ lib.optional stdenv.isDarwin Security; + buildInputs = [ openssl ] ++ lib.optional stdenv.hostPlatform.isDarwin Security; nativeBuildInputs = [ pkg-config ]; # Needed to get openssl-sys to use pkgconfig. OPENSSL_NO_VENDOR = 1; # disable failing tests on darwin - doCheck = !stdenv.isDarwin; + doCheck = !stdenv.hostPlatform.isDarwin; meta = with lib; { description = "RPKI Certificate Authority and Publication Server written in Rust"; diff --git a/pkgs/servers/lidarr/default.nix b/pkgs/servers/lidarr/default.nix index 279a099c9c3c..6c5e88633e96 100644 --- a/pkgs/servers/lidarr/default.nix +++ b/pkgs/servers/lidarr/default.nix @@ -1,7 +1,7 @@ { lib, stdenv, fetchurl, mono, libmediainfo, sqlite, curl, chromaprint, makeWrapper, icu, dotnet-runtime, openssl, nixosTests, zlib }: let - os = if stdenv.isDarwin then "osx" else "linux"; + os = if stdenv.hostPlatform.isDarwin then "osx" else "linux"; arch = { x86_64-linux = "x64"; aarch64-linux = "arm64"; diff --git a/pkgs/servers/mail/dovecot/default.nix b/pkgs/servers/mail/dovecot/default.nix index e7be597d7e4f..7a2c42fad1f9 100644 --- a/pkgs/servers/mail/dovecot/default.nix +++ b/pkgs/servers/mail/dovecot/default.nix @@ -17,7 +17,7 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ perl pkg-config ]; buildInputs = [ openssl bzip2 zlib lz4 clucene_core_2 icu openldap libsodium libstemmer cyrus_sasl.dev ] - ++ lib.optionals (stdenv.isLinux) [ systemd pam libcap inotify-tools ] + ++ lib.optionals (stdenv.hostPlatform.isLinux) [ systemd pam libcap inotify-tools ] ++ lib.optional withMySQL libmysqlclient ++ lib.optional withPgSQL postgresql ++ lib.optional withSQLite sqlite @@ -44,7 +44,7 @@ stdenv.mkDerivation rec { # DES-encrypted passwords are not supported by NixPkgs anymore sed '/test_password_scheme("CRYPT"/d' -i src/auth/test-libpassword.c - '' + lib.optionalString stdenv.isLinux '' + '' + lib.optionalString stdenv.hostPlatform.isLinux '' export systemdsystemunitdir=$out/etc/systemd/system ''; @@ -66,7 +66,7 @@ stdenv.mkDerivation rec { url = "https://salsa.debian.org/debian/dovecot/-/raw/debian/1%252.3.19.1+dfsg1-2/debian/patches/Support-openssl-3.0.patch"; hash = "sha256-PbBB1jIY3jIC8Js1NY93zkV0gISGUq7Nc67Ul5tN7sw="; }) - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ # fix timespec calls ./timespec.patch ]; @@ -86,9 +86,9 @@ stdenv.mkDerivation rec { "--with-lucene" "--with-icu" ] ++ lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) [ - "i_cv_epoll_works=${if stdenv.isLinux then "yes" else "no"}" - "i_cv_posix_fallocate_works=${if stdenv.isDarwin then "no" else "yes"}" - "i_cv_inotify_works=${if stdenv.isLinux then "yes" else "no"}" + "i_cv_epoll_works=${if stdenv.hostPlatform.isLinux then "yes" else "no"}" + "i_cv_posix_fallocate_works=${if stdenv.hostPlatform.isDarwin then "no" else "yes"}" + "i_cv_inotify_works=${if stdenv.hostPlatform.isLinux then "yes" else "no"}" "i_cv_signed_size_t=no" "i_cv_signed_time_t=yes" "i_cv_c99_vsnprintf=yes" @@ -100,14 +100,14 @@ stdenv.mkDerivation rec { "lib_cv_va_copy=yes" "lib_cv___va_copy=yes" "lib_cv_va_val_copy=yes" - ] ++ lib.optional stdenv.isLinux "--with-systemd" - ++ lib.optional stdenv.isDarwin "--enable-static" + ] ++ lib.optional stdenv.hostPlatform.isLinux "--with-systemd" + ++ lib.optional stdenv.hostPlatform.isDarwin "--enable-static" ++ lib.optional withMySQL "--with-mysql" ++ lib.optional withPgSQL "--with-pgsql" ++ lib.optional withSQLite "--with-sqlite" ++ lib.optional withLua "--with-lua"; - doCheck = !stdenv.isDarwin; + doCheck = !stdenv.hostPlatform.isDarwin; meta = with lib; { homepage = "https://dovecot.org/"; diff --git a/pkgs/servers/mail/dovecot/plugins/fts_xapian/default.nix b/pkgs/servers/mail/dovecot/plugins/fts_xapian/default.nix index 283e47965110..78bb5b1e1cc4 100644 --- a/pkgs/servers/mail/dovecot/plugins/fts_xapian/default.nix +++ b/pkgs/servers/mail/dovecot/plugins/fts_xapian/default.nix @@ -31,6 +31,6 @@ stdenv.mkDerivation rec { license = licenses.lgpl21Only; maintainers = with maintainers; [ julm symphorien ]; platforms = platforms.unix; - broken = stdenv.isDarwin; # never built on Hydra https://hydra.nixos.org/job/nixpkgs/trunk/dovecot_fts_xapian.x86_64-darwin + broken = stdenv.hostPlatform.isDarwin; # never built on Hydra https://hydra.nixos.org/job/nixpkgs/trunk/dovecot_fts_xapian.x86_64-darwin }; } diff --git a/pkgs/servers/mail/mailpit/default.nix b/pkgs/servers/mail/mailpit/default.nix index fd8f01674d80..c29baacd447c 100644 --- a/pkgs/servers/mail/mailpit/default.nix +++ b/pkgs/servers/mail/mailpit/default.nix @@ -39,7 +39,7 @@ let hash = source.npmDepsHash; }; - env = lib.optionalAttrs (stdenv.isDarwin && stdenv.isx86_64) { + env = lib.optionalAttrs (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isx86_64) { # Make sure libc++ uses `posix_memalign` instead of `aligned_alloc` on x86_64-darwin. # Otherwise, nodejs would require the 11.0 SDK and macOS 10.15+. NIX_CFLAGS_COMPILE = "-D__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__=101300"; diff --git a/pkgs/servers/mail/public-inbox/default.nix b/pkgs/servers/mail/public-inbox/default.nix index 05dc98b466d4..72caae6a5b05 100644 --- a/pkgs/servers/mail/public-inbox/default.nix +++ b/pkgs/servers/mail/public-inbox/default.nix @@ -126,7 +126,7 @@ buildPerlPackage rec { man ]; - doCheck = !stdenv.isDarwin; + doCheck = !stdenv.hostPlatform.isDarwin; nativeCheckInputs = [ curl git @@ -138,7 +138,7 @@ buildPerlPackage rec { PlackTestExternalServer TestSimple13 XMLTreePP - ] ++ lib.optionals stdenv.isLinux [ + ] ++ lib.optionals stdenv.hostPlatform.isLinux [ LinuxInotify2 ]; preCheck = '' diff --git a/pkgs/servers/mail/rspamd/default.nix b/pkgs/servers/mail/rspamd/default.nix index aff57ef0e137..65fec7bad3f5 100644 --- a/pkgs/servers/mail/rspamd/default.nix +++ b/pkgs/servers/mail/rspamd/default.nix @@ -24,12 +24,12 @@ zstd, libarchive, withBlas ? true, - withHyperscan ? stdenv.isx86_64, - withLuaJIT ? stdenv.isx86_64, + withHyperscan ? stdenv.hostPlatform.isx86_64, + withLuaJIT ? stdenv.hostPlatform.isx86_64, nixosTests, }: -assert withHyperscan -> stdenv.isx86_64; +assert withHyperscan -> stdenv.hostPlatform.isx86_64; stdenv.mkDerivation rec { pname = "rspamd"; diff --git a/pkgs/servers/matrix-conduit/default.nix b/pkgs/servers/matrix-conduit/default.nix index 91cdded5a2fe..4e3ddb37db4d 100644 --- a/pkgs/servers/matrix-conduit/default.nix +++ b/pkgs/servers/matrix-conduit/default.nix @@ -44,7 +44,7 @@ rustPlatform.buildRustPackage rec { buildInputs = [ sqlite rust-jemalloc-sys - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.Security darwin.apple_sdk.frameworks.SystemConfiguration ]; @@ -55,7 +55,7 @@ rustPlatform.buildRustPackage rec { }; # tests failed on x86_64-darwin with SIGILL: illegal instruction - doCheck = !(stdenv.isx86_64 && stdenv.isDarwin); + doCheck = !(stdenv.hostPlatform.isx86_64 && stdenv.hostPlatform.isDarwin); passthru.tests = { inherit (nixosTests) matrix-conduit; diff --git a/pkgs/servers/matrix-hebbot/default.nix b/pkgs/servers/matrix-hebbot/default.nix index ca90304ed32f..a2f222e6d489 100644 --- a/pkgs/servers/matrix-hebbot/default.nix +++ b/pkgs/servers/matrix-hebbot/default.nix @@ -29,9 +29,9 @@ rustPlatform.buildRustPackage rec { }; nativeBuildInputs = [ pkg-config cmake ] ++ - lib.optionals stdenv.isDarwin [ autoconf automake ]; + lib.optionals stdenv.hostPlatform.isDarwin [ autoconf automake ]; - buildInputs = [ openssl ] ++ lib.optional stdenv.isDarwin Security; + buildInputs = [ openssl ] ++ lib.optional stdenv.hostPlatform.isDarwin Security; meta = with lib; { description = "Matrix bot which can generate \"This Week in X\" like blog posts "; diff --git a/pkgs/servers/matrix-synapse/default.nix b/pkgs/servers/matrix-synapse/default.nix index 1ce8a8a2f9dc..0e80af5a21ef 100644 --- a/pkgs/servers/matrix-synapse/default.nix +++ b/pkgs/servers/matrix-synapse/default.nix @@ -58,7 +58,7 @@ python3.pkgs.buildPythonApplication rec { buildInputs = [ openssl - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ libiconv ]; @@ -140,7 +140,7 @@ python3.pkgs.buildPythonApplication rec { ]) ++ lib.flatten (lib.attrValues passthru.optional-dependencies); - doCheck = !stdenv.isDarwin; + doCheck = !stdenv.hostPlatform.isDarwin; checkPhase = '' runHook preCheck diff --git a/pkgs/servers/matrix-synapse/plugins/mjolnir-antispam.nix b/pkgs/servers/matrix-synapse/plugins/mjolnir-antispam.nix index e728e1cb013a..364abdb95196 100644 --- a/pkgs/servers/matrix-synapse/plugins/mjolnir-antispam.nix +++ b/pkgs/servers/matrix-synapse/plugins/mjolnir-antispam.nix @@ -28,6 +28,6 @@ buildPythonPackage rec { homepage = "https://github.com/matrix-org/mjolnir/blob/main/docs/synapse_module.md"; license = licenses.asl20; maintainers = with maintainers; [ jojosch ]; - broken = stdenv.isDarwin; + broken = stdenv.hostPlatform.isDarwin; }; } diff --git a/pkgs/servers/matrix-synapse/tools/rust-synapse-compress-state/default.nix b/pkgs/servers/matrix-synapse/tools/rust-synapse-compress-state/default.nix index a66a1bdb89fe..de1cc21cf47d 100644 --- a/pkgs/servers/matrix-synapse/tools/rust-synapse-compress-state/default.nix +++ b/pkgs/servers/matrix-synapse/tools/rust-synapse-compress-state/default.nix @@ -30,7 +30,7 @@ rustPlatform.buildRustPackage rec { buildInputs = [ openssl ]; meta = with lib; { - broken = stdenv.isDarwin; + broken = stdenv.hostPlatform.isDarwin; description = "Tool to compress some state in a Synapse instance's database"; homepage = "https://github.com/matrix-org/rust-synapse-compress-state"; license = licenses.asl20; diff --git a/pkgs/servers/memcached/default.nix b/pkgs/servers/memcached/default.nix index ccc9fff51ace..71e77f4940ad 100644 --- a/pkgs/servers/memcached/default.nix +++ b/pkgs/servers/memcached/default.nix @@ -18,7 +18,7 @@ stdenv.mkDerivation rec { hardeningEnable = [ "pie" ]; env.NIX_CFLAGS_COMPILE = toString ([ "-Wno-error=deprecated-declarations" ] - ++ lib.optional stdenv.isDarwin "-Wno-error"); + ++ lib.optional stdenv.hostPlatform.isDarwin "-Wno-error"); meta = with lib; { description = "Distributed memory object caching system"; diff --git a/pkgs/servers/meteor/default.nix b/pkgs/servers/meteor/default.nix index 2036d31e5b20..1454f4994c15 100644 --- a/pkgs/servers/meteor/default.nix +++ b/pkgs/servers/meteor/default.nix @@ -58,7 +58,7 @@ stdenv.mkDerivation { chmod +x $out/bin/meteor ''; - postFixup = lib.optionalString stdenv.isLinux '' + postFixup = lib.optionalString stdenv.hostPlatform.isLinux '' # Patch Meteor to dynamically fixup shebangs and ELF metadata where # necessary. pushd $out diff --git a/pkgs/servers/microbin/default.nix b/pkgs/servers/microbin/default.nix index 55ebc572b686..62cb97ce1b2f 100644 --- a/pkgs/servers/microbin/default.nix +++ b/pkgs/servers/microbin/default.nix @@ -67,7 +67,7 @@ rustPlatform.buildRustPackage rec { buildInputs = [ oniguruma openssl - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.Security ]; diff --git a/pkgs/servers/microserver/default.nix b/pkgs/servers/microserver/default.nix index acc223627fce..810128a5d6ea 100644 --- a/pkgs/servers/microserver/default.nix +++ b/pkgs/servers/microserver/default.nix @@ -13,7 +13,7 @@ rustPlatform.buildRustPackage rec { cargoHash = "sha256-JGsMtlWuww1rYE4w6i2VlyD6gGHqnLehLDZmW57R+Fo="; - buildInputs = lib.optionals stdenv.isDarwin (with darwin.apple_sdk.frameworks; [ Security ]); + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin (with darwin.apple_sdk.frameworks; [ Security ]); meta = with lib; { homepage = "https://github.com/robertohuertasm/microserver"; diff --git a/pkgs/servers/misc/qremotecontrol-server/default.nix b/pkgs/servers/misc/qremotecontrol-server/default.nix index 5fba2c0a382f..104a2b876c9b 100644 --- a/pkgs/servers/misc/qremotecontrol-server/default.nix +++ b/pkgs/servers/misc/qremotecontrol-server/default.nix @@ -56,6 +56,6 @@ stdenv.mkDerivation { powering on the computer via Wake On Lan is supported. ''; # never built on aarch64-darwin, x86_64-darwin since first introduction in nixpkgs - broken = stdenv.isDarwin; + broken = stdenv.hostPlatform.isDarwin; }; } diff --git a/pkgs/servers/monitoring/bosun/default.nix b/pkgs/servers/monitoring/bosun/default.nix index d001d245d4c0..3158f9b2424b 100644 --- a/pkgs/servers/monitoring/bosun/default.nix +++ b/pkgs/servers/monitoring/bosun/default.nix @@ -22,6 +22,6 @@ buildGoModule { license = licenses.mit; homepage = "https://bosun.org"; maintainers = with maintainers; [ offline ]; - broken = stdenv.isDarwin; + broken = stdenv.hostPlatform.isDarwin; }; } diff --git a/pkgs/servers/monitoring/grafana-agent/default.nix b/pkgs/servers/monitoring/grafana-agent/default.nix index fd1307c10f61..c45ea47bac92 100644 --- a/pkgs/servers/monitoring/grafana-agent/default.nix +++ b/pkgs/servers/monitoring/grafana-agent/default.nix @@ -79,12 +79,12 @@ buildGoModule rec { # uses go-systemd, which uses libsystemd headers # https://github.com/coreos/go-systemd/issues/351 - env.NIX_CFLAGS_COMPILE = toString (lib.optionals stdenv.isLinux [ "-I${lib.getDev systemd}/include" ]); + env.NIX_CFLAGS_COMPILE = toString (lib.optionals stdenv.hostPlatform.isLinux [ "-I${lib.getDev systemd}/include" ]); # go-systemd uses libsystemd under the hood, which does dlopen(libsystemd) at # runtime. # Add to RUNPATH so it can be found. - postFixup = lib.optionalString stdenv.isLinux '' + postFixup = lib.optionalString stdenv.hostPlatform.isLinux '' patchelf \ --set-rpath "${lib.makeLibraryPath [ (lib.getLib systemd) ]}:$(patchelf --print-rpath $out/bin/grafana-agent)" \ $out/bin/grafana-agent diff --git a/pkgs/servers/monitoring/grafana/default.nix b/pkgs/servers/monitoring/grafana/default.nix index 4eca91169012..cb5f14fa28c4 100644 --- a/pkgs/servers/monitoring/grafana/default.nix +++ b/pkgs/servers/monitoring/grafana/default.nix @@ -22,7 +22,7 @@ buildGoModule rec { # borrowed from: https://github.com/NixOS/nixpkgs/blob/d70d9425f49f9aba3c49e2c389fe6d42bac8c5b0/pkgs/development/tools/analysis/snyk/default.nix#L20-L22 env = { CYPRESS_INSTALL_BINARY = 0; - } // lib.optionalAttrs (stdenv.isDarwin && stdenv.isx86_64) { + } // lib.optionalAttrs (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isx86_64) { # Fix error: no member named 'aligned_alloc' in the global namespace. # Occurs while building @esfx/equatable@npm:1.0.2 on x86_64-darwin NIX_CFLAGS_COMPILE = "-D_LIBCPP_HAS_NO_LIBRARY_ALIGNED_ALLOCATION=1"; @@ -35,7 +35,7 @@ buildGoModule rec { yarn nodejs cacert jq moreutils python3 # @esfx/equatable@npm:1.0.2 fails to build on darwin as it requires `xcbuild` - ] ++ lib.optionals stdenv.isDarwin [ xcbuild.xcbuild ]; + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ xcbuild.xcbuild ]; buildPhase = '' runHook preBuild export HOME="$(mktemp -d)" @@ -65,7 +65,7 @@ buildGoModule rec { proxyVendor = true; nativeBuildInputs = [ wire yarn jq moreutils removeReferencesTo python3 faketty ] - ++ lib.optionals stdenv.isDarwin [ xcbuild.xcbuild ]; + ++ lib.optionals stdenv.hostPlatform.isDarwin [ xcbuild.xcbuild ]; postConfigure = '' # Generate DI code that's required to compile the package. diff --git a/pkgs/servers/monitoring/kapacitor/default.nix b/pkgs/servers/monitoring/kapacitor/default.nix index 20525bfbf965..76048222edb7 100644 --- a/pkgs/servers/monitoring/kapacitor/default.nix +++ b/pkgs/servers/monitoring/kapacitor/default.nix @@ -42,7 +42,7 @@ let sourceRoot = "${src.name}/libflux"; cargoHash = "sha256-oAMoGGdR0QEjSzZ0/J5J9s/ekSlryCcRBSo5N2r70Ko="; nativeBuildInputs = [ rustPlatform.bindgenHook ]; - buildInputs = lib.optional stdenv.isDarwin libiconv; + buildInputs = lib.optional stdenv.hostPlatform.isDarwin libiconv; pkgcfg = '' Name: flux Version: ${libflux_version} @@ -56,7 +56,7 @@ let cp -r $NIX_BUILD_TOP/source/libflux/include/influxdata $out/include substitute $pkgcfgPath $out/pkgconfig/flux.pc \ --replace /out $out - '' + lib.optionalString stdenv.isDarwin '' + '' + lib.optionalString stdenv.hostPlatform.isDarwin '' install_name_tool -id $out/lib/libflux.dylib $out/lib/libflux.dylib ''; }; diff --git a/pkgs/servers/monitoring/lcdproc/default.nix b/pkgs/servers/monitoring/lcdproc/default.nix index d70ba0ea1991..7570428d7f3e 100644 --- a/pkgs/servers/monitoring/lcdproc/default.nix +++ b/pkgs/servers/monitoring/lcdproc/default.nix @@ -75,6 +75,6 @@ stdenv.mkDerivation rec { maintainers = with maintainers; [ peterhoeg ]; platforms = platforms.unix; # never built on aarch64-darwin since first introduction in nixpkgs - broken = stdenv.isDarwin && stdenv.isAarch64; + broken = stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isAarch64; }; } diff --git a/pkgs/servers/monitoring/loki/default.nix b/pkgs/servers/monitoring/loki/default.nix index aa70eda0de81..987ec3f5419b 100644 --- a/pkgs/servers/monitoring/loki/default.nix +++ b/pkgs/servers/monitoring/loki/default.nix @@ -34,9 +34,9 @@ buildGoModule rec { tags = ["promtail_journal_enabled"]; nativeBuildInputs = [ makeWrapper ]; - buildInputs = lib.optionals stdenv.isLinux [ systemd.dev ]; + buildInputs = lib.optionals stdenv.hostPlatform.isLinux [ systemd.dev ]; - preFixup = lib.optionalString stdenv.isLinux '' + preFixup = lib.optionalString stdenv.hostPlatform.isLinux '' wrapProgram $out/bin/promtail \ --prefix LD_LIBRARY_PATH : "${lib.getLib systemd}/lib" ''; diff --git a/pkgs/servers/monitoring/mackerel-agent/default.nix b/pkgs/servers/monitoring/mackerel-agent/default.nix index 9507b5d1dcf4..69538107ad4f 100644 --- a/pkgs/servers/monitoring/mackerel-agent/default.nix +++ b/pkgs/servers/monitoring/mackerel-agent/default.nix @@ -12,8 +12,8 @@ buildGoModule rec { }; nativeBuildInputs = [ makeWrapper ]; - nativeCheckInputs = lib.optionals (!stdenv.isDarwin) [ nettools ]; - buildInputs = lib.optionals (!stdenv.isDarwin) [ iproute2 ]; + nativeCheckInputs = lib.optionals (!stdenv.hostPlatform.isDarwin) [ nettools ]; + buildInputs = lib.optionals (!stdenv.hostPlatform.isDarwin) [ iproute2 ]; vendorHash = "sha256-JIqQXS2iw3opeotpfqC16w7hdu+7XjxhIyVj2M+98ec="; diff --git a/pkgs/servers/monitoring/mtail/default.nix b/pkgs/servers/monitoring/mtail/default.nix index e64ac1375414..4c05a7513eca 100644 --- a/pkgs/servers/monitoring/mtail/default.nix +++ b/pkgs/servers/monitoring/mtail/default.nix @@ -24,7 +24,7 @@ buildGoModule rec { ]; # fails on darwin with: write unixgram -> /rsyncd.log: write: message too long - doCheck = !stdenv.isDarwin; + doCheck = !stdenv.hostPlatform.isDarwin; meta = with lib; { description = "Tool for extracting metrics from application logs"; diff --git a/pkgs/servers/monitoring/nagios/plugins/check_ssl_cert.nix b/pkgs/servers/monitoring/nagios/plugins/check_ssl_cert.nix index f0bcd2bde80a..e6e4f6f3559b 100644 --- a/pkgs/servers/monitoring/nagios/plugins/check_ssl_cert.nix +++ b/pkgs/servers/monitoring/nagios/plugins/check_ssl_cert.nix @@ -37,7 +37,7 @@ stdenv.mkDerivation rec { postInstall = '' wrapProgram $out/bin/check_ssl_cert \ - --prefix PATH : "${lib.makeBinPath ([ openssl file which curl bc coreutils bind nmap netcat-gnu python3 ] ++ lib.optional stdenv.isLinux iproute2) }" + --prefix PATH : "${lib.makeBinPath ([ openssl file which curl bc coreutils bind nmap netcat-gnu python3 ] ++ lib.optional stdenv.hostPlatform.isLinux iproute2) }" ''; meta = with lib; { diff --git a/pkgs/servers/monitoring/net-snmp/default.nix b/pkgs/servers/monitoring/net-snmp/default.nix index b7db5e56fd77..5aa0e8697c58 100644 --- a/pkgs/servers/monitoring/net-snmp/default.nix +++ b/pkgs/servers/monitoring/net-snmp/default.nix @@ -45,7 +45,7 @@ in stdenv.mkDerivation rec { "--with-openssl=${openssl.dev}" "--disable-embedded-perl" "--without-perl-modules" - ] ++ lib.optional stdenv.isLinux "--with-mnttab=/proc/mounts"; + ] ++ lib.optional stdenv.hostPlatform.isLinux "--with-mnttab=/proc/mounts"; postPatch = '' substituteInPlace testing/fulltests/support/simple_TESTCONF.sh --replace "/bin/netstat" "${nettools}/bin/netstat" @@ -61,7 +61,7 @@ in stdenv.mkDerivation rec { nativeBuildInputs = [ nettools file autoreconfHook ]; buildInputs = [ openssl ] ++ lib.optional withPerlTools perlWithPkgs - ++ lib.optionals stdenv.isDarwin [ + ++ lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.ApplicationServices darwin.apple_sdk.frameworks.CoreServices darwin.apple_sdk.frameworks.IOKit diff --git a/pkgs/servers/monitoring/openobserve/default.nix b/pkgs/servers/monitoring/openobserve/default.nix index 5ff8616225c6..0948f72fcb09 100644 --- a/pkgs/servers/monitoring/openobserve/default.nix +++ b/pkgs/servers/monitoring/openobserve/default.nix @@ -82,7 +82,7 @@ rustPlatform.buildRustPackage { xz zlib zstd - ] ++ lib.optionals stdenv.isDarwin (with apple_sdk.frameworks; [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin (with apple_sdk.frameworks; [ CoreFoundation CoreServices IOKit diff --git a/pkgs/servers/monitoring/prometheus/default.nix b/pkgs/servers/monitoring/prometheus/default.nix index 5e33eefa9544..6d3e32640fe1 100644 --- a/pkgs/servers/monitoring/prometheus/default.nix +++ b/pkgs/servers/monitoring/prometheus/default.nix @@ -121,7 +121,7 @@ buildGoModule rec { # https://hydra.nixos.org/build/130673870/nixlog/1 # Test mock data uses 64 bit data without an explicit (u)int64 - doCheck = !(stdenv.isDarwin || stdenv.hostPlatform.parsed.cpu.bits < 64); + doCheck = !(stdenv.hostPlatform.isDarwin || stdenv.hostPlatform.parsed.cpu.bits < 64); passthru.tests = { inherit (nixosTests) prometheus; }; diff --git a/pkgs/servers/monitoring/prometheus/exportarr/default.nix b/pkgs/servers/monitoring/prometheus/exportarr/default.nix index caef8c57605d..d23cc62c80ff 100644 --- a/pkgs/servers/monitoring/prometheus/exportarr/default.nix +++ b/pkgs/servers/monitoring/prometheus/exportarr/default.nix @@ -23,7 +23,7 @@ buildGoModule rec { ldflags = [ "-s" "-w" ]; - tags = lib.optionals stdenv.isLinux [ "netgo" ]; + tags = lib.optionals stdenv.hostPlatform.isLinux [ "netgo" ]; preCheck = '' # Run all tests. diff --git a/pkgs/servers/monitoring/prometheus/wireguard-exporter.nix b/pkgs/servers/monitoring/prometheus/wireguard-exporter.nix index 50fe085d4a0d..51a13f1efcd0 100644 --- a/pkgs/servers/monitoring/prometheus/wireguard-exporter.nix +++ b/pkgs/servers/monitoring/prometheus/wireguard-exporter.nix @@ -18,7 +18,7 @@ rustPlatform.buildRustPackage rec { rm .cargo/config.toml ''; - buildInputs = lib.optionals stdenv.isDarwin [ libiconv Security ]; + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ libiconv Security ]; passthru.tests = { inherit (nixosTests.prometheus-exporters) wireguard; }; diff --git a/pkgs/servers/monitoring/uptime-kuma/default.nix b/pkgs/servers/monitoring/uptime-kuma/default.nix index f787588aa90e..e53e641e5d88 100644 --- a/pkgs/servers/monitoring/uptime-kuma/default.nix +++ b/pkgs/servers/monitoring/uptime-kuma/default.nix @@ -46,6 +46,6 @@ buildNpmPackage rec { license = licenses.mit; maintainers = with maintainers; [ julienmalka ]; # FileNotFoundError: [Errno 2] No such file or directory: 'xcrun' - broken = stdenv.isDarwin; + broken = stdenv.hostPlatform.isDarwin; }; } diff --git a/pkgs/servers/mpd/default.nix b/pkgs/servers/mpd/default.nix index 57178da7297f..ee70b1b1e0c4 100644 --- a/pkgs/servers/mpd/default.nix +++ b/pkgs/servers/mpd/default.nix @@ -97,8 +97,8 @@ let # Disable platform specific features if needed # using libmad to decode mp3 files on darwin is causing a segfault -- there # is probably a solution, but I'm disabling it for now - platformMask = lib.optionals stdenv.isDarwin [ "mad" "pulse" "jack" "smbclient" ] - ++ lib.optionals (!stdenv.isLinux) [ "alsa" "pipewire" "io_uring" "systemd" "syslog" ]; + platformMask = lib.optionals stdenv.hostPlatform.isDarwin [ "mad" "pulse" "jack" "smbclient" ] + ++ lib.optionals (!stdenv.hostPlatform.isLinux) [ "alsa" "pipewire" "io_uring" "systemd" "syslog" ]; knownFeatures = builtins.attrNames featureDependencies ++ builtins.attrNames nativeFeatureDependencies; platformFeatures = lib.subtractLists platformMask knownFeatures; @@ -137,7 +137,7 @@ let gtest ] ++ concatAttrVals features_ featureDependencies - ++ lib.optionals stdenv.isDarwin [ AudioToolbox AudioUnit ]; + ++ lib.optionals stdenv.hostPlatform.isDarwin [ AudioToolbox AudioUnit ]; nativeBuildInputs = [ meson @@ -148,7 +148,7 @@ let depsBuildBuild = [ buildPackages.stdenv.cc ]; - postPatch = lib.optionalString (stdenv.isDarwin && lib.versionOlder stdenv.hostPlatform.darwinSdkVersion "12.0") '' + postPatch = lib.optionalString (stdenv.hostPlatform.isDarwin && lib.versionOlder stdenv.hostPlatform.darwinSdkVersion "12.0") '' substituteInPlace src/output/plugins/OSXOutputPlugin.cxx \ --replace kAudioObjectPropertyElement{Main,Master} \ --replace kAudioHardwareServiceDeviceProperty_Virtual{Main,Master}Volume @@ -166,7 +166,7 @@ let outputs = [ "out" "doc" ] ++ lib.optional (builtins.elem "documentation" features_) "man"; - CXXFLAGS = lib.optionals stdenv.isDarwin [ + CXXFLAGS = lib.optionals stdenv.hostPlatform.isDarwin [ "-D__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES=0" ]; @@ -210,9 +210,9 @@ in "libmpdclient" "id3tag" "expat" "pcre" "yajl" "sqlite" "soundcloud" "qobuz" - ] ++ lib.optionals stdenv.isLinux [ + ] ++ lib.optionals stdenv.hostPlatform.isLinux [ "alsa" "systemd" "syslog" "io_uring" - ] ++ lib.optionals (!stdenv.isDarwin) [ + ] ++ lib.optionals (!stdenv.hostPlatform.isDarwin) [ "mad" "jack" ]; }; mpdWithFeatures = run; diff --git a/pkgs/servers/mqtt/mosquitto/default.nix b/pkgs/servers/mqtt/mosquitto/default.nix index 7f32957fdbf4..3c3a6199f7b5 100644 --- a/pkgs/servers/mqtt/mosquitto/default.nix +++ b/pkgs/servers/mqtt/mosquitto/default.nix @@ -39,7 +39,7 @@ stdenv.mkDerivation rec { sha256 = "sha256-Vs0blV2IhnlEAm0WtOartz+0vLesJfp78FNJCivRxHk="; }; - patches = lib.optionals stdenv.isDarwin [ + patches = lib.optionals stdenv.hostPlatform.isDarwin [ (fetchpatch { name = "revert-cmake-shared-to-module.patch"; # See https://github.com/eclipse/mosquitto/issues/2277 url = "https://github.com/eclipse/mosquitto/commit/e21eaeca37196439b3e89bb8fd2eb1903ef94845.patch"; diff --git a/pkgs/servers/mx-puppet-discord/default.nix b/pkgs/servers/mx-puppet-discord/default.nix index 27fde8301a22..254434a8ba3d 100644 --- a/pkgs/servers/mx-puppet-discord/default.nix +++ b/pkgs/servers/mx-puppet-discord/default.nix @@ -47,7 +47,7 @@ in myNodePackages.package.override { maintainers = with maintainers; [ expipiplus1 ]; platforms = platforms.unix; # never built on aarch64-darwin since first introduction in nixpkgs - broken = stdenv.isDarwin && stdenv.isAarch64; + broken = stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isAarch64; mainProgram = "mx-puppet-discord"; }; } diff --git a/pkgs/servers/mx-puppet-discord/node-composition.nix b/pkgs/servers/mx-puppet-discord/node-composition.nix index c5d958bef2c4..f47a724999ed 100644 --- a/pkgs/servers/mx-puppet-discord/node-composition.nix +++ b/pkgs/servers/mx-puppet-discord/node-composition.nix @@ -8,7 +8,7 @@ let nodeEnv = import ../../development/node-packages/node-env.nix { inherit (pkgs) stdenv lib python2 runCommand writeTextFile writeShellScript; inherit pkgs nodejs; - libtool = if pkgs.stdenv.isDarwin then pkgs.cctools or pkgs.darwin.cctools else null; + libtool = if pkgs.stdenv.hostPlatform.isDarwin then pkgs.cctools or pkgs.darwin.cctools else null; }; in import ./node-packages.nix { diff --git a/pkgs/servers/networking/rustus/default.nix b/pkgs/servers/networking/rustus/default.nix index 77bf8ce7d776..3819a23781ef 100644 --- a/pkgs/servers/networking/rustus/default.nix +++ b/pkgs/servers/networking/rustus/default.nix @@ -32,7 +32,7 @@ rustPlatform.buildRustPackage { buildInputs = [ openssl - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ Security ]; diff --git a/pkgs/servers/nosql/eventstore/default.nix b/pkgs/servers/nosql/eventstore/default.nix index d068f28ccf21..9269993a845e 100644 --- a/pkgs/servers/nosql/eventstore/default.nix +++ b/pkgs/servers/nosql/eventstore/default.nix @@ -37,7 +37,7 @@ buildDotnetModule rec { executables = [ mainProgram ]; # This test has a problem running on macOS - disabledTests = lib.optionals stdenv.isDarwin [ + disabledTests = lib.optionals stdenv.hostPlatform.isDarwin [ "EventStore.Projections.Core.Tests.Services.grpc_service.ServerFeaturesTests.should_receive_expected_endpoints" "EventStore.Projections.Core.Tests.Services.grpc_service.ServerFeaturesTests.should_receive_expected_endpoints" ]; diff --git a/pkgs/servers/nosql/influxdb/default.nix b/pkgs/servers/nosql/influxdb/default.nix index 739fab6f8119..384958624611 100644 --- a/pkgs/servers/nosql/influxdb/default.nix +++ b/pkgs/servers/nosql/influxdb/default.nix @@ -28,7 +28,7 @@ let sourceRoot = "${src.name}/libflux"; cargoHash = "sha256-O+t4f4P5291BuyARH6Xf3LejMFEQEBv+qKtyjHRhclA="; nativeBuildInputs = [ rustPlatform.bindgenHook ]; - buildInputs = lib.optional stdenv.isDarwin libiconv; + buildInputs = lib.optional stdenv.hostPlatform.isDarwin libiconv; pkgcfg = '' Name: flux Version: ${libflux_version} @@ -42,7 +42,7 @@ let cp -r $NIX_BUILD_TOP/source/libflux/include/influxdata $out/include substitute $pkgcfgPath $out/pkgconfig/flux.pc \ --replace /out $out - '' + lib.optionalString stdenv.isDarwin '' + '' + lib.optionalString stdenv.hostPlatform.isDarwin '' install_name_tool -id $out/lib/libflux.dylib $out/lib/libflux.dylib ''; }; diff --git a/pkgs/servers/nosql/influxdb2/default.nix b/pkgs/servers/nosql/influxdb2/default.nix index 81333a9f1ec3..99ae9bc38c2b 100644 --- a/pkgs/servers/nosql/influxdb2/default.nix +++ b/pkgs/servers/nosql/influxdb2/default.nix @@ -53,7 +53,7 @@ let sourceRoot = "${src.name}/libflux"; cargoHash = "sha256-O+t4f4P5291BuyARH6Xf3LejMFEQEBv+qKtyjHRhclA="; nativeBuildInputs = [ rustPlatform.bindgenHook ]; - buildInputs = lib.optional stdenv.isDarwin libiconv; + buildInputs = lib.optional stdenv.hostPlatform.isDarwin libiconv; pkgcfg = '' Name: flux Version: ${libflux_version} @@ -67,7 +67,7 @@ let cp -r $NIX_BUILD_TOP/source/libflux/include/influxdata $out/include substitute $pkgcfgPath $out/pkgconfig/flux.pc \ --replace /out $out - '' + lib.optionalString stdenv.isDarwin '' + '' + lib.optionalString stdenv.hostPlatform.isDarwin '' install_name_tool -id $out/lib/libflux.dylib $out/lib/libflux.dylib ''; }; diff --git a/pkgs/servers/nosql/mongodb/5.0.nix b/pkgs/servers/nosql/mongodb/5.0.nix index f69ad97f8ac6..84c0991515b0 100644 --- a/pkgs/servers/nosql/mongodb/5.0.nix +++ b/pkgs/servers/nosql/mongodb/5.0.nix @@ -8,13 +8,13 @@ let buildMongoDB = callPackage ./mongodb.nix { inherit sasl boost Security CoreFoundation cctools; }; - variants = if stdenv.isLinux then + variants = if stdenv.hostPlatform.isLinux then { version = "5.0.29"; sha256 = "sha256-27+SXo0fjFwJFFm/NhpDhq95dMwiN8RCJO7j5ic49Ls="; patches = [ ./fix-build-with-boost-1.79-5_0-linux.patch ]; } - else lib.optionalAttrs stdenv.isDarwin + else lib.optionalAttrs stdenv.hostPlatform.isDarwin { version = "5.0.3"; # at least darwin has to stay on 5.0.3 until the SDK used by nixpkgs is bumped to 10.13 sha256 = "1p9pq0dfd6lynvnz5p1c8dqp4filzrz86j840xwxwx82dm1zl6p0"; diff --git a/pkgs/servers/nosql/mongodb/mongodb.nix b/pkgs/servers/nosql/mongodb/mongodb.nix index 9c26f5fa701d..f90695934121 100644 --- a/pkgs/servers/nosql/mongodb/mongodb.nix +++ b/pkgs/servers/nosql/mongodb/mongodb.nix @@ -56,7 +56,7 @@ let #"stemmer" -- not nice to package yet (no versioning, no makefile, no shared libs). #"valgrind" -- mongodb only requires valgrind.h, which is vendored in the source. #"wiredtiger" - ] ++ lib.optionals stdenv.isLinux [ "tcmalloc" ]; + ] ++ lib.optionals stdenv.hostPlatform.isLinux [ "tcmalloc" ]; inherit (lib) systems subtractLists; in stdenv.mkDerivation rec { @@ -73,7 +73,7 @@ in stdenv.mkDerivation rec { nativeBuildInputs = [ scons python - ] ++ lib.optional stdenv.isLinux net-snmp; + ] ++ lib.optional stdenv.hostPlatform.isLinux net-snmp; buildInputs = [ boost @@ -87,8 +87,8 @@ in stdenv.mkDerivation rec { sasl snappy zlib - ] ++ lib.optionals stdenv.isDarwin [ Security CoreFoundation cctools ] - ++ lib.optional stdenv.isLinux net-snmp + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ Security CoreFoundation cctools ] + ++ lib.optional stdenv.hostPlatform.isLinux net-snmp ++ [ xz ]; # MongoDB keeps track of its build parameters, which tricks nix into @@ -107,9 +107,9 @@ in stdenv.mkDerivation rec { #include ' substituteInPlace src/mongo/db/exec/plan_stats.h --replace '#include ' '#include #include ' - '' + lib.optionalString (stdenv.isDarwin && lib.versionOlder version "6.0") '' + '' + lib.optionalString (stdenv.hostPlatform.isDarwin && lib.versionOlder version "6.0") '' substituteInPlace src/third_party/mozjs-${mozjsVersion}/extract/js/src/jsmath.cpp --replace '${mozjsReplace}' 0 - '' + lib.optionalString stdenv.isi686 '' + '' + lib.optionalString stdenv.hostPlatform.isi686 '' # don't fail by default on i686 substituteInPlace src/mongo/db/storage/storage_options.h \ @@ -142,9 +142,9 @@ in stdenv.mkDerivation rec { preBuild = '' sconsFlags+=" CC=$CC" sconsFlags+=" CXX=$CXX" - '' + lib.optionalString (!stdenv.isDarwin) '' + '' + lib.optionalString (!stdenv.hostPlatform.isDarwin) '' sconsFlags+=" AR=$AR" - '' + lib.optionalString stdenv.isAarch64 '' + '' + lib.optionalString stdenv.hostPlatform.isAarch64 '' sconsFlags+=" CCFLAGS='-march=armv8-a+crc'" ''; diff --git a/pkgs/servers/nosql/redis/default.nix b/pkgs/servers/nosql/redis/default.nix index d15b05699d63..42bafb37c819 100644 --- a/pkgs/servers/nosql/redis/default.nix +++ b/pkgs/servers/nosql/redis/default.nix @@ -41,7 +41,7 @@ stdenv.mkDerivation (finalAttrs: { ++ lib.optional withSystemd systemd ++ lib.optionals tlsSupport [ openssl ]; - preBuild = lib.optionalString stdenv.isDarwin '' + preBuild = lib.optionalString stdenv.hostPlatform.isDarwin '' substituteInPlace src/Makefile --replace "-flto" "" ''; @@ -53,12 +53,12 @@ stdenv.mkDerivation (finalAttrs: { enableParallelBuilding = true; - hardeningEnable = lib.optionals (!stdenv.isDarwin) [ "pie" ]; + hardeningEnable = lib.optionals (!stdenv.hostPlatform.isDarwin) [ "pie" ]; env.NIX_CFLAGS_COMPILE = toString (lib.optionals stdenv.cc.isClang [ "-std=c11" ]); # darwin currently lacks a pure `pgrep` which is extensively used here - doCheck = !stdenv.isDarwin; + doCheck = !stdenv.hostPlatform.isDarwin; nativeCheckInputs = [ which tcl ps ] ++ lib.optionals stdenv.hostPlatform.isStatic [ getconf ]; checkPhase = '' runHook preCheck diff --git a/pkgs/servers/nosql/rethinkdb/default.nix b/pkgs/servers/nosql/rethinkdb/default.nix index 2ba228dd699b..03aed49f564b 100644 --- a/pkgs/servers/nosql/rethinkdb/default.nix +++ b/pkgs/servers/nosql/rethinkdb/default.nix @@ -23,7 +23,7 @@ stdenv.mkDerivation rec { patchShebangs . ''; - configureFlags = lib.optionals (!stdenv.isDarwin) [ + configureFlags = lib.optionals (!stdenv.hostPlatform.isDarwin) [ "--with-jemalloc" "--lib-path=${jemalloc}/lib" ]; @@ -31,8 +31,8 @@ stdenv.mkDerivation rec { makeFlags = [ "rethinkdb" ]; buildInputs = [ protobuf boost zlib curl openssl icu ] - ++ lib.optional (!stdenv.isDarwin) jemalloc - ++ lib.optional stdenv.isDarwin libtool; + ++ lib.optional (!stdenv.hostPlatform.isDarwin) jemalloc + ++ lib.optional stdenv.hostPlatform.isDarwin libtool; nativeBuildInputs = [ which m4 python3Packages.python makeWrapper ]; diff --git a/pkgs/servers/nostr-rs-relay/default.nix b/pkgs/servers/nostr-rs-relay/default.nix index db7dd125567c..c63f4d2a057f 100644 --- a/pkgs/servers/nostr-rs-relay/default.nix +++ b/pkgs/servers/nostr-rs-relay/default.nix @@ -22,7 +22,7 @@ rustPlatform.buildRustPackage rec { cargoHash = "sha256-+agmlg6tAnEJ5o586fUY7V4fdNScDPKCbaZqt7R3gqg="; buildInputs = [ openssl.dev ] - ++ lib.optionals stdenv.isDarwin [ + ++ lib.optionals stdenv.hostPlatform.isDarwin [ libiconv darwin.apple_sdk.frameworks.Security darwin.apple_sdk.frameworks.SystemConfiguration diff --git a/pkgs/servers/ombi/default.nix b/pkgs/servers/ombi/default.nix index 6e6ece8ea7cb..a9fb9aa33586 100644 --- a/pkgs/servers/ombi/default.nix +++ b/pkgs/servers/ombi/default.nix @@ -1,7 +1,7 @@ { lib, stdenv, fetchurl, makeWrapper, autoPatchelfHook, fixDarwinDylibNames, zlib, krb5, openssl, icu, nixosTests }: let - os = if stdenv.isDarwin then "osx" else "linux"; + os = if stdenv.hostPlatform.isDarwin then "osx" else "linux"; arch = { x86_64-linux = "x64"; aarch64-linux = "arm64"; diff --git a/pkgs/servers/openvscode-server/default.nix b/pkgs/servers/openvscode-server/default.nix index bc1e7a3f5e18..f21693591672 100644 --- a/pkgs/servers/openvscode-server/default.nix +++ b/pkgs/servers/openvscode-server/default.nix @@ -103,9 +103,9 @@ stdenv.mkDerivation (finalAttrs: { moreutils ]; - buildInputs = lib.optionals (!stdenv.isDarwin) [ libsecret ] + buildInputs = lib.optionals (!stdenv.hostPlatform.isDarwin) [ libsecret ] ++ (with xorg; [ libX11 libxkbfile libkrb5 ]) - ++ lib.optionals stdenv.isDarwin [ + ++ lib.optionals stdenv.hostPlatform.isDarwin [ AppKit Cocoa Security @@ -181,7 +181,7 @@ stdenv.mkDerivation (finalAttrs: { find -path "*@vscode/ripgrep" -type d \ -execdir mkdir -p {}/bin \; \ -execdir ln -s ${ripgrep}/bin/rg {}/bin/rg \; - '' + lib.optionalString stdenv.isDarwin '' + '' + lib.optionalString stdenv.hostPlatform.isDarwin '' # use prebuilt binary for @parcel/watcher, which requires macOS SDK 10.13+ # (see issue #101229) pushd ./remote/node_modules/@parcel/watcher diff --git a/pkgs/servers/osmocom/osmo-bsc/default.nix b/pkgs/servers/osmocom/osmo-bsc/default.nix index 647a54bf5328..ced3be6b350f 100644 --- a/pkgs/servers/osmocom/osmo-bsc/default.nix +++ b/pkgs/servers/osmocom/osmo-bsc/default.nix @@ -11,7 +11,7 @@ }: let - inherit (stdenv) isLinux; + inherit (stdenv.hostPlatform) isLinux; in stdenv.mkDerivation rec { diff --git a/pkgs/servers/osmocom/osmo-ggsn/default.nix b/pkgs/servers/osmocom/osmo-ggsn/default.nix index 87c1ee1d9573..f2c77d33ddb1 100644 --- a/pkgs/servers/osmocom/osmo-ggsn/default.nix +++ b/pkgs/servers/osmocom/osmo-ggsn/default.nix @@ -7,7 +7,7 @@ }: let - inherit (stdenv) isLinux; + inherit (stdenv.hostPlatform) isLinux; in stdenv.mkDerivation rec { diff --git a/pkgs/servers/osmocom/osmo-hlr/default.nix b/pkgs/servers/osmocom/osmo-hlr/default.nix index ec8d4622a848..a287619155ed 100644 --- a/pkgs/servers/osmocom/osmo-hlr/default.nix +++ b/pkgs/servers/osmocom/osmo-hlr/default.nix @@ -9,7 +9,7 @@ }: let - inherit (stdenv) isLinux; + inherit (stdenv.hostPlatform) isLinux; in stdenv.mkDerivation rec { diff --git a/pkgs/servers/osmocom/osmo-hnbgw/default.nix b/pkgs/servers/osmocom/osmo-hnbgw/default.nix index fc3798fde18d..e074e0100d28 100644 --- a/pkgs/servers/osmocom/osmo-hnbgw/default.nix +++ b/pkgs/servers/osmocom/osmo-hnbgw/default.nix @@ -13,7 +13,7 @@ }: let - inherit (stdenv) isLinux; + inherit (stdenv.hostPlatform) isLinux; in stdenv.mkDerivation rec { diff --git a/pkgs/servers/osmocom/osmo-hnodeb/default.nix b/pkgs/servers/osmocom/osmo-hnodeb/default.nix index 9455b14aad2a..27cf6c04f41a 100644 --- a/pkgs/servers/osmocom/osmo-hnodeb/default.nix +++ b/pkgs/servers/osmocom/osmo-hnodeb/default.nix @@ -13,7 +13,7 @@ }: let - inherit (stdenv) isLinux; + inherit (stdenv.hostPlatform) isLinux; in stdenv.mkDerivation rec { diff --git a/pkgs/servers/osmocom/osmo-iuh/default.nix b/pkgs/servers/osmocom/osmo-iuh/default.nix index 98629719ee8d..55add5a09b73 100644 --- a/pkgs/servers/osmocom/osmo-iuh/default.nix +++ b/pkgs/servers/osmocom/osmo-iuh/default.nix @@ -12,7 +12,7 @@ }: let - inherit (stdenv) isLinux; + inherit (stdenv.hostPlatform) isLinux; in stdenv.mkDerivation rec { diff --git a/pkgs/servers/osmocom/osmo-mgw/default.nix b/pkgs/servers/osmocom/osmo-mgw/default.nix index 23959b3be9ec..08774c723651 100644 --- a/pkgs/servers/osmocom/osmo-mgw/default.nix +++ b/pkgs/servers/osmocom/osmo-mgw/default.nix @@ -9,7 +9,7 @@ }: let - inherit (stdenv) isLinux; + inherit (stdenv.hostPlatform) isLinux; in stdenv.mkDerivation rec { diff --git a/pkgs/servers/osmocom/osmo-msc/default.nix b/pkgs/servers/osmocom/osmo-msc/default.nix index 679c88e5cff9..352489af8b68 100644 --- a/pkgs/servers/osmocom/osmo-msc/default.nix +++ b/pkgs/servers/osmocom/osmo-msc/default.nix @@ -14,7 +14,7 @@ }: let - inherit (stdenv) isLinux; + inherit (stdenv.hostPlatform) isLinux; in stdenv.mkDerivation rec { diff --git a/pkgs/servers/osmocom/osmo-pcu/default.nix b/pkgs/servers/osmocom/osmo-pcu/default.nix index 74f56957059b..a8b2000ec852 100644 --- a/pkgs/servers/osmocom/osmo-pcu/default.nix +++ b/pkgs/servers/osmocom/osmo-pcu/default.nix @@ -8,7 +8,7 @@ }: let - inherit (stdenv) isLinux; + inherit (stdenv.hostPlatform) isLinux; in stdenv.mkDerivation rec { diff --git a/pkgs/servers/osmocom/osmo-sgsn/default.nix b/pkgs/servers/osmocom/osmo-sgsn/default.nix index d9ca0d72084c..a182986ee27c 100644 --- a/pkgs/servers/osmocom/osmo-sgsn/default.nix +++ b/pkgs/servers/osmocom/osmo-sgsn/default.nix @@ -12,7 +12,7 @@ }: let - inherit (stdenv) isLinux; + inherit (stdenv.hostPlatform) isLinux; in stdenv.mkDerivation rec { diff --git a/pkgs/servers/osmocom/osmo-sip-connector/default.nix b/pkgs/servers/osmocom/osmo-sip-connector/default.nix index c10361f119b3..b1f810d0f5f7 100644 --- a/pkgs/servers/osmocom/osmo-sip-connector/default.nix +++ b/pkgs/servers/osmocom/osmo-sip-connector/default.nix @@ -9,7 +9,7 @@ }: let - inherit (stdenv) isLinux; + inherit (stdenv.hostPlatform) isLinux; in stdenv.mkDerivation rec { diff --git a/pkgs/servers/oxigraph/default.nix b/pkgs/servers/oxigraph/default.nix index 868ec8f8bd39..091b2037d235 100644 --- a/pkgs/servers/oxigraph/default.nix +++ b/pkgs/servers/oxigraph/default.nix @@ -23,7 +23,7 @@ rustPlatform.buildRustPackage rec { nativeBuildInputs = [ rustPlatform.bindgenHook ]; - buildInputs = lib.optionals stdenv.isDarwin [ IOKit Security ]; + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ IOKit Security ]; cargoBuildFlags = [ "--package" "oxigraph_server" ]; diff --git a/pkgs/servers/pim6sd/default.nix b/pkgs/servers/pim6sd/default.nix index e1bc6ce48ff4..81b60d46e28b 100644 --- a/pkgs/servers/pim6sd/default.nix +++ b/pkgs/servers/pim6sd/default.nix @@ -19,6 +19,6 @@ stdenv.mkDerivation rec { license = licenses.bsd3; maintainers = with maintainers; [ hexa ]; platforms = platforms.unix; - broken = stdenv.isDarwin; # never built on Hydra https://hydra.nixos.org/job/nixpkgs/trunk/pim6sd.x86_64-darwin + broken = stdenv.hostPlatform.isDarwin; # never built on Hydra https://hydra.nixos.org/job/nixpkgs/trunk/pim6sd.x86_64-darwin }; } diff --git a/pkgs/servers/piping-server-rust/default.nix b/pkgs/servers/piping-server-rust/default.nix index f3cc1c5543c4..0e081884e4cf 100644 --- a/pkgs/servers/piping-server-rust/default.nix +++ b/pkgs/servers/piping-server-rust/default.nix @@ -13,7 +13,7 @@ rustPlatform.buildRustPackage rec { cargoHash = "sha256-YSiClSnjgqFqT2IGJoatcy7j3NUKcff826AvJ/+RNNU="; - buildInputs = lib.optionals stdenv.isDarwin [ CoreServices Security ]; + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ CoreServices Security ]; meta = with lib; { description = "Infinitely transfer between every device over pure HTTP with pipes or browsers"; diff --git a/pkgs/servers/polaris/default.nix b/pkgs/servers/polaris/default.nix index b19eb1c47e7d..002a04f4f62e 100644 --- a/pkgs/servers/polaris/default.nix +++ b/pkgs/servers/polaris/default.nix @@ -41,7 +41,7 @@ rustPlatform.buildRustPackage rec { cargoHash = "sha256-PnNLSL6YIpM6b3+oCh2eNRNPpCKyvnWEW7uNaYTKzAU="; - buildInputs = lib.optionals stdenv.isDarwin [ + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ darwin.Security ]; diff --git a/pkgs/servers/prowlarr/default.nix b/pkgs/servers/prowlarr/default.nix index 6421688976c2..5e24932517da 100644 --- a/pkgs/servers/prowlarr/default.nix +++ b/pkgs/servers/prowlarr/default.nix @@ -6,9 +6,9 @@ let unsupported = throw "Unsupported system ${stdenv.hostPlatform.system} for ${pname}"; os = - if stdenv.isDarwin then + if stdenv.hostPlatform.isDarwin then "osx" - else if stdenv.isLinux then + else if stdenv.hostPlatform.isLinux then "linux" else unsupported; diff --git a/pkgs/servers/ps3netsrv/default.nix b/pkgs/servers/ps3netsrv/default.nix index 30ca1318b9cf..4d9e221a30b9 100644 --- a/pkgs/servers/ps3netsrv/default.nix +++ b/pkgs/servers/ps3netsrv/default.nix @@ -19,7 +19,7 @@ stdenv.mkDerivation rec { mbedtls ]; - env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.isDarwin "-Doff64_t=off_t"; + env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.hostPlatform.isDarwin "-Doff64_t=off_t"; postInstall = '' install -Dm644 ../LICENSE.TXT $out/usr/share/licenses/${pname}/LICENSE.TXT diff --git a/pkgs/servers/pulseaudio/default.nix b/pkgs/servers/pulseaudio/default.nix index 0186de73fddf..44f89234ec6d 100644 --- a/pkgs/servers/pulseaudio/default.nix +++ b/pkgs/servers/pulseaudio/default.nix @@ -21,15 +21,15 @@ , airtunesSupport ? false -, bluetoothSupport ? stdenv.isLinux +, bluetoothSupport ? stdenv.hostPlatform.isLinux , advancedBluetoothCodecs ? false , remoteControlSupport ? false , zeroconfSupport ? false -, alsaSupport ? stdenv.isLinux -, udevSupport ? stdenv.isLinux +, alsaSupport ? stdenv.hostPlatform.isLinux +, udevSupport ? stdenv.hostPlatform.isLinux , # Whether to build only the library. libOnly ? false @@ -68,23 +68,23 @@ stdenv.mkDerivation rec { outputs = [ "out" "dev" ]; nativeBuildInputs = [ pkg-config meson ninja makeWrapper perlPackages.perl perlPackages.XMLParser m4 ] - ++ lib.optionals stdenv.isLinux [ glib ] + ++ lib.optionals stdenv.hostPlatform.isLinux [ glib ] # gstreamer plugin discovery requires wrapping ++ lib.optional (bluetoothSupport && advancedBluetoothCodecs) wrapGAppsHook3; propagatedBuildInputs = - lib.optionals stdenv.isLinux [ libcap ]; + lib.optionals stdenv.hostPlatform.isLinux [ libcap ]; buildInputs = [ libtool libsndfile soxr speexdsp fftwFloat check ] - ++ lib.optionals stdenv.isLinux [ glib dbus ] - ++ lib.optionals stdenv.isDarwin [ AudioUnit Cocoa CoreServices CoreAudio libintl ] + ++ lib.optionals stdenv.hostPlatform.isLinux [ glib dbus ] + ++ lib.optionals stdenv.hostPlatform.isDarwin [ AudioUnit Cocoa CoreServices CoreAudio libintl ] ++ lib.optionals (!libOnly) ( [ libasyncns webrtc-audio-processing_1 ] ++ lib.optional jackaudioSupport libjack2 ++ lib.optionals x11Support [ xorg.libICE xorg.libSM xorg.libX11 xorg.libXi xorg.libXtst ] ++ lib.optional useSystemd systemd - ++ lib.optionals stdenv.isLinux [ alsa-lib udev ] + ++ lib.optionals stdenv.hostPlatform.isLinux [ alsa-lib udev ] ++ lib.optional airtunesSupport openssl ++ lib.optionals bluetoothSupport [ bluez5 sbc ] # aptX and LDAC codecs are in gst-plugins-bad so far, rtpldacpay is in -good @@ -104,7 +104,7 @@ stdenv.mkDerivation rec { (lib.mesonBool "doxygen" false) (lib.mesonEnable "elogind" false) # gsettings does not support cross-compilation - (lib.mesonEnable "gsettings" (stdenv.isLinux && (stdenv.buildPlatform == stdenv.hostPlatform))) + (lib.mesonEnable "gsettings" (stdenv.hostPlatform.isLinux && (stdenv.buildPlatform == stdenv.hostPlatform))) (lib.mesonEnable "gstreamer" false) (lib.mesonEnable "gtk" false) (lib.mesonEnable "jack" (jackaudioSupport && !libOnly)) @@ -128,10 +128,10 @@ stdenv.mkDerivation rec { # renaming the unwrapped binaries (see below) "--bindir=${placeholder "out"}/.bin-unwrapped" ] - ++ lib.optionals (stdenv.isLinux && useSystemd) [ + ++ lib.optionals (stdenv.hostPlatform.isLinux && useSystemd) [ (lib.mesonOption "systemduserunitdir" "${placeholder "out"}/lib/systemd/user") ] - ++ lib.optionals stdenv.isDarwin [ + ++ lib.optionals stdenv.hostPlatform.isDarwin [ (lib.mesonEnable "consolekit" false) (lib.mesonEnable "dbus" false) (lib.mesonEnable "glib" false) @@ -139,7 +139,7 @@ stdenv.mkDerivation rec { ]; # tests fail on Darwin because of timeouts - doCheck = !stdenv.isDarwin; + doCheck = !stdenv.hostPlatform.isDarwin; preCheck = '' export HOME=$(mktemp -d) ''; @@ -156,13 +156,13 @@ stdenv.mkDerivation rec { cp config.h $dev/include/pulse ''; - preFixup = lib.optionalString (stdenv.isLinux && (stdenv.hostPlatform == stdenv.buildPlatform)) '' + preFixup = lib.optionalString (stdenv.hostPlatform.isLinux && (stdenv.hostPlatform == stdenv.buildPlatform)) '' wrapProgram $out/libexec/pulse/gsettings-helper \ --prefix XDG_DATA_DIRS : "$out/share/gsettings-schemas/${pname}-${version}" \ --prefix GIO_EXTRA_MODULES : "${lib.getLib dconf}/lib/gio/modules" '' # add .so symlinks for modules to be found under macOS - + lib.optionalString stdenv.isDarwin '' + + lib.optionalString stdenv.hostPlatform.isDarwin '' for file in $out/lib/pulseaudio/modules/*.dylib; do ln -s "''$file" "''${file%.dylib}.so" ln -s "''$file" "$out/lib/pulseaudio/''$(basename ''$file .dylib).so" diff --git a/pkgs/servers/radarr/default.nix b/pkgs/servers/radarr/default.nix index 896e8b3d1f1a..d0ef6198f41a 100644 --- a/pkgs/servers/radarr/default.nix +++ b/pkgs/servers/radarr/default.nix @@ -1,7 +1,7 @@ { lib, stdenv, fetchurl, mono, libmediainfo, sqlite, curl, makeWrapper, icu, dotnet-runtime, openssl, nixosTests, zlib }: let - os = if stdenv.isDarwin then "osx" else "linux"; + os = if stdenv.hostPlatform.isDarwin then "osx" else "linux"; arch = { x86_64-linux = "x64"; aarch64-linux = "arm64"; diff --git a/pkgs/servers/readarr/default.nix b/pkgs/servers/readarr/default.nix index a0c1cea2c586..3a67b592fcc3 100644 --- a/pkgs/servers/readarr/default.nix +++ b/pkgs/servers/readarr/default.nix @@ -1,7 +1,7 @@ { lib, stdenv, fetchurl, libmediainfo, sqlite, curl, makeWrapper, icu, dotnet-runtime, openssl, nixosTests, zlib }: let - os = if stdenv.isDarwin then "osx" else "linux"; + os = if stdenv.hostPlatform.isDarwin then "osx" else "linux"; arch = { x86_64-linux = "x64"; aarch64-linux = "arm64"; diff --git a/pkgs/servers/redpanda/default.nix b/pkgs/servers/redpanda/default.nix index 5202cce75b9e..231f6ee216a5 100644 --- a/pkgs/servers/redpanda/default.nix +++ b/pkgs/servers/redpanda/default.nix @@ -1,5 +1,5 @@ { buildGoModule -, doCheck ? !stdenv.isDarwin # Can't start localhost test server in MacOS sandbox. +, doCheck ? !stdenv.hostPlatform.isDarwin # Can't start localhost test server in MacOS sandbox. , fetchFromGitHub , installShellFiles , lib diff --git a/pkgs/servers/roapi/http.nix b/pkgs/servers/roapi/http.nix index 019c979b47a2..8c0dc4ee59f2 100644 --- a/pkgs/servers/roapi/http.nix +++ b/pkgs/servers/roapi/http.nix @@ -5,7 +5,7 @@ let pname = "roapi-http"; version = "0.6.0"; - target = lib.optionalString stdenv.isDarwin "apple-darwin"; + target = lib.optionalString stdenv.hostPlatform.isDarwin "apple-darwin"; in # TODO build from source, currently compilation fails on darwin on snmalloc with # ./mem/../ds/../pal/pal_apple.h:277:64: error: use of undeclared identifier 'kCCSuccess' diff --git a/pkgs/servers/rpiplay/default.nix b/pkgs/servers/rpiplay/default.nix index 90f773c73db1..8ca4cb534197 100644 --- a/pkgs/servers/rpiplay/default.nix +++ b/pkgs/servers/rpiplay/default.nix @@ -40,7 +40,7 @@ stdenv.mkDerivation rec { ]; meta = with lib; { - broken = stdenv.isDarwin; + broken = stdenv.hostPlatform.isDarwin; homepage = "https://github.com/FD-/RPiPlay"; description = "Open-source implementation of an AirPlay mirroring server"; license = licenses.gpl3Plus; diff --git a/pkgs/servers/rtrtr/default.nix b/pkgs/servers/rtrtr/default.nix index fa5b4a30c63a..3697043c246e 100644 --- a/pkgs/servers/rtrtr/default.nix +++ b/pkgs/servers/rtrtr/default.nix @@ -19,7 +19,7 @@ rustPlatform.buildRustPackage rec { cargoHash = "sha256-ToJLE4nqgTqg5D4Qh2zi+wjmcdwDo0aupoDwKJCTwnM="; - buildInputs = lib.optional stdenv.isDarwin Security; + buildInputs = lib.optional stdenv.hostPlatform.isDarwin Security; nativeBuildInputs = [ pkg-config ]; buildNoDefaultFeatures = true; diff --git a/pkgs/servers/rustdesk-server/default.nix b/pkgs/servers/rustdesk-server/default.nix index 14cc9afcf484..3b6ddf3bb1ec 100644 --- a/pkgs/servers/rustdesk-server/default.nix +++ b/pkgs/servers/rustdesk-server/default.nix @@ -38,7 +38,7 @@ rustPlatform.buildRustPackage rec { buildInputs = [ libsodium sqlite - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ Security ]; diff --git a/pkgs/servers/rustypaste/default.nix b/pkgs/servers/rustypaste/default.nix index 97fdacecb9db..f0a1fc8c3b9c 100644 --- a/pkgs/servers/rustypaste/default.nix +++ b/pkgs/servers/rustypaste/default.nix @@ -13,7 +13,7 @@ rustPlatform.buildRustPackage rec { cargoHash = "sha256-b9KZzevaTl52pduN4gkF8k6yqgDcE8x5sOwmPxzYfWA="; - buildInputs = lib.optionals stdenv.isDarwin [ + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.CoreServices ]; diff --git a/pkgs/servers/samba/4.x.nix b/pkgs/servers/samba/4.x.nix index e2a9345d4c07..1e0f60224b5f 100644 --- a/pkgs/servers/samba/4.x.nix +++ b/pkgs/servers/samba/4.x.nix @@ -45,9 +45,9 @@ , enableRegedit ? true, ncurses , enableCephFS ? false, ceph , enableGlusterFS ? false, glusterfs, libuuid -, enableAcl ? (!stdenv.isDarwin), acl -, enableLibunwind ? (!stdenv.isDarwin), libunwind -, enablePam ? (!stdenv.isDarwin), pam +, enableAcl ? (!stdenv.hostPlatform.isDarwin), acl +, enableLibunwind ? (!stdenv.hostPlatform.isDarwin), libunwind +, enablePam ? (!stdenv.hostPlatform.isDarwin), pam }: let @@ -100,10 +100,10 @@ stdenv.mkDerivation (finalAttrs: { docbook_xml_dtd_45 cmocka rpcsvc-proto - ] ++ optionals stdenv.isLinux [ + ] ++ optionals stdenv.hostPlatform.isLinux [ buildPackages.stdenv.cc ] ++ optional (stdenv.buildPlatform != stdenv.hostPlatform) samba # asn1_compile/compile_et - ++ optionals stdenv.isDarwin [ + ++ optionals stdenv.hostPlatform.isDarwin [ fixDarwinDylibNames ]; @@ -124,16 +124,16 @@ stdenv.mkDerivation (finalAttrs: { libtasn1 tdb libxcrypt - ] ++ optionals stdenv.isLinux [ liburing systemd ] - ++ optionals stdenv.isDarwin [ libiconv ] + ] ++ optionals stdenv.hostPlatform.isLinux [ liburing systemd ] + ++ optionals stdenv.hostPlatform.isDarwin [ libiconv ] ++ optionals enableLDAP [ openldap.dev python3Packages.markdown ] - ++ optionals (!enableLDAP && stdenv.isLinux) [ ldb talloc tevent ] - ++ optional (enablePrinting && stdenv.isLinux) cups + ++ optionals (!enableLDAP && stdenv.hostPlatform.isLinux) [ ldb talloc tevent ] + ++ optional (enablePrinting && stdenv.hostPlatform.isLinux) cups ++ optional enableMDNS avahi ++ optionals enableDomainController [ gpgme lmdb python3Packages.dnspython ] ++ optional enableRegedit ncurses - ++ optional (enableCephFS && stdenv.isLinux) (lib.getDev ceph) - ++ optionals (enableGlusterFS && stdenv.isLinux) [ glusterfs libuuid ] + ++ optional (enableCephFS && stdenv.hostPlatform.isLinux) (lib.getDev ceph) + ++ optionals (enableGlusterFS && stdenv.hostPlatform.isLinux) [ glusterfs libuuid ] ++ optional enableAcl acl ++ optional enableLibunwind libunwind ++ optional enablePam pam; @@ -165,7 +165,7 @@ stdenv.mkDerivation (finalAttrs: { ++ optionals (!enableLDAP) [ "--without-ldap" "--without-ads" - ] ++ optionals (!enableLDAP && stdenv.isLinux) [ + ] ++ optionals (!enableLDAP && stdenv.hostPlatform.isLinux) [ "--bundled-libraries=!ldb,!pyldb-util!talloc,!pytalloc-util,!tevent,!tdb,!pytdb" ] ++ optional enableLibunwind "--with-libunwind" ++ optional enableProfiling "--with-profiling-data" @@ -212,12 +212,12 @@ stdenv.mkDerivation (finalAttrs: { read -r -d "" SCRIPT << EOF || true [ -z "\$SAMBA_LIBS" ] && exit 1; BIN='{}'; - '' + lib.optionalString stdenv.isLinux '' + '' + lib.optionalString stdenv.hostPlatform.isLinux '' OLD_LIBS="\$(patchelf --print-rpath "\$BIN" 2>/dev/null | tr ':' '\n')"; ALL_LIBS="\$(echo -e "\$SAMBA_LIBS\n\$OLD_LIBS" | sort | uniq | tr '\n' ':')"; patchelf --set-rpath "\$ALL_LIBS" "\$BIN" 2>/dev/null || exit $?; patchelf --shrink-rpath "\$BIN"; - '' + lib.optionalString stdenv.isDarwin '' + '' + lib.optionalString stdenv.hostPlatform.isDarwin '' install_name_tool -id \$BIN \$BIN for old_rpath in \$(otool -L \$BIN | grep /private/tmp/ | awk '{print \$1}'); do new_rpath=\$(find \$SAMBA_LIBS -name \$(basename \$old_rpath) | head -n 1) diff --git a/pkgs/servers/search/lnx/default.nix b/pkgs/servers/search/lnx/default.nix index 447602b0463f..7cda5d44c442 100644 --- a/pkgs/servers/search/lnx/default.nix +++ b/pkgs/servers/search/lnx/default.nix @@ -25,7 +25,7 @@ rustPlatform.buildRustPackage { "compose-0.1.0" = "sha256-zcniGI3wa+gI3jFTDqHcesX+6hAtNEbW81ABPUcFTXk="; }; }; - buildInputs = lib.optionals stdenv.isDarwin [ DiskArbitration Foundation ]; + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ DiskArbitration Foundation ]; meta = with lib; { description = "Insanely fast, Feature-rich searching. lnx is the adaptable, typo tollerant deployment of the tantivy search engine. Standing on the shoulders of giants."; mainProgram = "lnx"; diff --git a/pkgs/servers/search/meilisearch/default.nix b/pkgs/servers/search/meilisearch/default.nix index cbb440086976..a58af212b20a 100644 --- a/pkgs/servers/search/meilisearch/default.nix +++ b/pkgs/servers/search/meilisearch/default.nix @@ -43,7 +43,7 @@ rustPlatform.buildRustPackage { nativeBuildInputs = [ rustPlatform.bindgenHook ]; - buildInputs = lib.optionals stdenv.isDarwin [ + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ Security SystemConfiguration ]; diff --git a/pkgs/servers/search/qdrant/default.nix b/pkgs/servers/search/qdrant/default.nix index f9669759171a..587c4aa1d170 100644 --- a/pkgs/servers/search/qdrant/default.nix +++ b/pkgs/servers/search/qdrant/default.nix @@ -33,7 +33,7 @@ rustPlatform.buildRustPackage rec { buildInputs = [ openssl rust-jemalloc-sys - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ Security SystemConfiguration ]; diff --git a/pkgs/servers/search/quickwit/default.nix b/pkgs/servers/search/quickwit/default.nix index ccc32cb90056..8f89e1893c3b 100644 --- a/pkgs/servers/search/quickwit/default.nix +++ b/pkgs/servers/search/quickwit/default.nix @@ -82,7 +82,7 @@ rustPlatform.buildRustPackage rec { buildInputs = [ rust-jemalloc-sys - ] ++ lib.optionals stdenv.isDarwin [ Security ]; + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ Security ]; cargoLock = { lockFile = ./Cargo.lock; diff --git a/pkgs/servers/search/typesense/default.nix b/pkgs/servers/search/typesense/default.nix index 762cc190f242..2a641cd752fc 100644 --- a/pkgs/servers/search/typesense/default.nix +++ b/pkgs/servers/search/typesense/default.nix @@ -21,7 +21,7 @@ stdenv.mkDerivation { inherit hash; }; - nativeBuildInputs = lib.optionals stdenv.isLinux [ + nativeBuildInputs = lib.optionals stdenv.hostPlatform.isLinux [ autoPatchelfHook ]; diff --git a/pkgs/servers/shairplay/default.nix b/pkgs/servers/shairplay/default.nix index 2a7e643b60fd..63de8df58fd8 100644 --- a/pkgs/servers/shairplay/default.nix +++ b/pkgs/servers/shairplay/default.nix @@ -19,7 +19,7 @@ stdenv.mkDerivation rec { enableParallelBuilding = true; # the build will fail without complaining about a reference to /tmp - preFixup = lib.optionalString stdenv.isLinux '' + preFixup = lib.optionalString stdenv.hostPlatform.isLinux '' patchelf \ --set-rpath "${lib.makeLibraryPath buildInputs}:$out/lib" \ $out/bin/shairplay diff --git a/pkgs/servers/shairport-sync/default.nix b/pkgs/servers/shairport-sync/default.nix index a9043f65331d..f74813cd4608 100644 --- a/pkgs/servers/shairport-sync/default.nix +++ b/pkgs/servers/shairport-sync/default.nix @@ -28,8 +28,8 @@ , enablePipewire ? true , enableJack ? true , enableMetadata ? false -, enableMpris ? stdenv.isLinux -, enableDbus ? stdenv.isLinux +, enableMpris ? stdenv.hostPlatform.isLinux +, enableDbus ? stdenv.hostPlatform.isLinux , enableSoxr ? true , enableLibdaemon ? false }: @@ -81,7 +81,7 @@ stdenv.mkDerivation rec { libuuid ffmpeg ] - ++ optional stdenv.isLinux glib; + ++ optional stdenv.hostPlatform.isLinux glib; postPatch = '' sed -i -e 's/G_BUS_TYPE_SYSTEM/G_BUS_TYPE_SESSION/g' dbus-service.c diff --git a/pkgs/servers/shishi/default.nix b/pkgs/servers/shishi/default.nix index 4b3060d90b04..926486c73c97 100644 --- a/pkgs/servers/shishi/default.nix +++ b/pkgs/servers/shishi/default.nix @@ -48,7 +48,7 @@ stdenv.mkDerivation rec { ]; env.NIX_CFLAGS_COMPILE - = optionalString stdenv.isDarwin "-DBIND_8_COMPAT"; + = optionalString stdenv.hostPlatform.isDarwin "-DBIND_8_COMPAT"; doCheck = true; diff --git a/pkgs/servers/simple-http-server/default.nix b/pkgs/servers/simple-http-server/default.nix index ff83e3f62d08..cb4fe1300062 100644 --- a/pkgs/servers/simple-http-server/default.nix +++ b/pkgs/servers/simple-http-server/default.nix @@ -22,7 +22,7 @@ rustPlatform.buildRustPackage rec { nativeBuildInputs = [ pkg-config ]; - buildInputs = [ openssl ] ++ lib.optionals stdenv.isDarwin [ + buildInputs = [ openssl ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.Security ]; diff --git a/pkgs/servers/sip/freeswitch/default.nix b/pkgs/servers/sip/freeswitch/default.nix index 1e7021c7a7e5..9d11ad68a405 100644 --- a/pkgs/servers/sip/freeswitch/default.nix +++ b/pkgs/servers/sip/freeswitch/default.nix @@ -90,7 +90,7 @@ defaultModules = mods: with mods; [ xml_int.cdr xml_int.rpc xml_int.scgi -] ++ lib.optionals stdenv.isLinux [ endpoints.gsmopen ]; +] ++ lib.optionals stdenv.hostPlatform.isLinux [ endpoints.gsmopen ]; enabledModules = (if modules != null then modules else defaultModules) availableModules; @@ -134,7 +134,7 @@ stdenv.mkDerivation rec { libuuid libxcrypt ] ++ lib.unique (lib.concatMap (mod: mod.inputs) enabledModules) - ++ lib.optionals stdenv.isDarwin [ SystemConfiguration ]; + ++ lib.optionals stdenv.hostPlatform.isDarwin [ SystemConfiguration ]; enableParallelBuilding = true; @@ -168,6 +168,6 @@ stdenv.mkDerivation rec { license = lib.licenses.mpl11; maintainers = with lib.maintainers; [ mikaelfangel ]; platforms = with lib.platforms; unix; - broken = stdenv.isDarwin; + broken = stdenv.hostPlatform.isDarwin; }; } diff --git a/pkgs/servers/snac2/default.nix b/pkgs/servers/snac2/default.nix index c4e30fa74f66..0b8f718d0c96 100644 --- a/pkgs/servers/snac2/default.nix +++ b/pkgs/servers/snac2/default.nix @@ -24,7 +24,7 @@ stdenv.mkDerivation rec { makeFlags = [ "PREFIX=$(out)" ]; - env.NIX_CFLAGS_COMPILE = toString (lib.optionals stdenv.isDarwin [ + env.NIX_CFLAGS_COMPILE = toString (lib.optionals stdenv.hostPlatform.isDarwin [ "-Dst_mtim=st_mtimespec" "-Dst_ctim=st_ctimespec" ]); diff --git a/pkgs/servers/sozu/default.nix b/pkgs/servers/sozu/default.nix index f0467f7f9c27..10427438e27d 100644 --- a/pkgs/servers/sozu/default.nix +++ b/pkgs/servers/sozu/default.nix @@ -25,7 +25,7 @@ rustPlatform.buildRustPackage rec { nativeBuildInputs = [ protobuf ]; buildInputs = - lib.optional stdenv.isDarwin darwin.apple_sdk.frameworks.Security; + lib.optional stdenv.hostPlatform.isDarwin darwin.apple_sdk.frameworks.Security; doCheck = false; @@ -47,6 +47,6 @@ rustPlatform.buildRustPackage rec { maintainers = with maintainers; [ Br1ght0ne gaelreyrol ]; mainProgram = "sozu"; # error[E0432]: unresolved import `std::arch::x86_64` - broken = !stdenv.isx86_64; + broken = !stdenv.hostPlatform.isx86_64; }; } diff --git a/pkgs/servers/sql/mariadb/connector-c/default.nix b/pkgs/servers/sql/mariadb/connector-c/default.nix index a2da81a0094f..e27179e8ab2f 100644 --- a/pkgs/servers/sql/mariadb/connector-c/default.nix +++ b/pkgs/servers/sql/mariadb/connector-c/default.nix @@ -44,7 +44,7 @@ in stdenv.mkDerivation { ''; # The cmake setup-hook uses $out/lib by default, this is not the case here. - preConfigure = lib.optionalString stdenv.isDarwin '' + preConfigure = lib.optionalString stdenv.hostPlatform.isDarwin '' cmakeFlagsArray+=("-DCMAKE_INSTALL_NAME_DIR=$out/lib/mariadb") ''; diff --git a/pkgs/servers/sql/materialize/default.nix b/pkgs/servers/sql/materialize/default.nix index 346e83f12206..1738b4fb92d6 100644 --- a/pkgs/servers/sql/materialize/default.nix +++ b/pkgs/servers/sql/materialize/default.nix @@ -101,13 +101,13 @@ rustPlatform.buildRustPackage rec { rustPlatform.bindgenHook ] # Provides the mig command used by the krb5-src build script - ++ lib.optional stdenv.isDarwin bootstrap_cmds; + ++ lib.optional stdenv.hostPlatform.isDarwin bootstrap_cmds; # Needed to get openssl-sys to use pkg-config. OPENSSL_NO_VENDOR = 1; buildInputs = [ openssl rdkafka libclang ] - ++ lib.optionals stdenv.isDarwin [ libiconv DiskArbitration Foundation ]; + ++ lib.optionals stdenv.hostPlatform.isDarwin [ libiconv DiskArbitration Foundation ]; # the check phase requires linking with rocksdb which can be a problem since # the rust rocksdb crate is not updated very often. diff --git a/pkgs/servers/sql/mysql/8.0.x.nix b/pkgs/servers/sql/mysql/8.0.x.nix index 4a072ae3f46b..dbd09f9516a4 100644 --- a/pkgs/servers/sql/mysql/8.0.x.nix +++ b/pkgs/servers/sql/mysql/8.0.x.nix @@ -13,7 +13,7 @@ stdenv.mkDerivation (finalAttrs: { }; nativeBuildInputs = [ bison cmake pkg-config ] - ++ lib.optionals (!stdenv.isDarwin) [ rpcsvc-proto ]; + ++ lib.optionals (!stdenv.hostPlatform.isDarwin) [ rpcsvc-proto ]; patches = [ ./no-force-outline-atomics.patch # Do not force compilers to turn on -moutline-atomics switch @@ -28,9 +28,9 @@ stdenv.mkDerivation (finalAttrs: { buildInputs = [ boost (curl.override { inherit openssl; }) icu libedit libevent lz4 ncurses openssl protobuf re2 readline zlib zstd libfido2 - ] ++ lib.optionals stdenv.isLinux [ + ] ++ lib.optionals stdenv.hostPlatform.isLinux [ numactl libtirpc - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ cctools CoreServices developer_cmds DarwinTools ]; diff --git a/pkgs/servers/sql/percona-server/innovation.nix b/pkgs/servers/sql/percona-server/innovation.nix index 27272410033f..61b2ff7bb4a1 100644 --- a/pkgs/servers/sql/percona-server/innovation.nix +++ b/pkgs/servers/sql/percona-server/innovation.nix @@ -25,7 +25,7 @@ stdenv.mkDerivation (finalAttrs: { bison cmake pkg-config makeWrapper # required for scripts/CMakeLists.txt coreutils gnugrep procps - ] ++ lib.optionals (!stdenv.isDarwin) [ rpcsvc-proto ]; + ] ++ lib.optionals (!stdenv.hostPlatform.isDarwin) [ rpcsvc-proto ]; patches = [ ./no-force-outline-atomics.patch # Do not force compilers to turn on -moutline-atomics switch @@ -45,13 +45,13 @@ stdenv.mkDerivation (finalAttrs: { buildInputs = [ boost (curl.override { inherit openssl; }) icu libedit libevent lz4 ncurses openssl protobuf re2 readline zlib zstd libfido2 openldap perl cyrus_sasl - ] ++ lib.optionals stdenv.isLinux [ + ] ++ lib.optionals stdenv.hostPlatform.isLinux [ numactl libtirpc systemd - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ cctools CoreServices developer_cmds DarwinTools ] - ++ lib.optional (stdenv.isLinux && withJemalloc) jemalloc - ++ lib.optional (stdenv.isLinux && withTcmalloc) gperftools; + ++ lib.optional (stdenv.hostPlatform.isLinux && withJemalloc) jemalloc + ++ lib.optional (stdenv.hostPlatform.isLinux && withTcmalloc) gperftools; outputs = [ "out" "static" ]; @@ -81,12 +81,12 @@ stdenv.mkDerivation (finalAttrs: { "-DINSTALL_SHAREDIR=share/mysql" - ] ++ lib.optionals stdenv.isLinux [ + ] ++ lib.optionals stdenv.hostPlatform.isLinux [ "-DWITH_SYSTEMD=1" "-DWITH_SYSTEMD_DEBUG=1" ] - ++ lib.optional (stdenv.isLinux && withJemalloc) "-DWITH_JEMALLOC=1" - ++ lib.optional (stdenv.isLinux && withTcmalloc) "-DWITH_TCMALLOC=1"; + ++ lib.optional (stdenv.hostPlatform.isLinux && withJemalloc) "-DWITH_JEMALLOC=1" + ++ lib.optional (stdenv.hostPlatform.isLinux && withTcmalloc) "-DWITH_TCMALLOC=1"; postInstall = '' moveToOutput "lib/*.a" $static @@ -97,7 +97,7 @@ stdenv.mkDerivation (finalAttrs: { wrapProgram $out/bin/mysql_config --prefix PATH : ${lib.makeBinPath [ coreutils gnused ]} wrapProgram $out/bin/ps_mysqld_helper --prefix PATH : ${lib.makeBinPath [ coreutils gnugrep ]} wrapProgram $out/bin/ps-admin --prefix PATH : ${lib.makeBinPath [ coreutils gnugrep ]} - '' + lib.optionalString stdenv.isDarwin '' + '' + lib.optionalString stdenv.hostPlatform.isDarwin '' wrapProgram $out/bin/mysqld_multi --prefix PATH : ${lib.makeBinPath [ coreutils gnugrep ]} ''; diff --git a/pkgs/servers/sql/percona-server/lts.nix b/pkgs/servers/sql/percona-server/lts.nix index 19e81654dd7b..352b0239c429 100644 --- a/pkgs/servers/sql/percona-server/lts.nix +++ b/pkgs/servers/sql/percona-server/lts.nix @@ -19,7 +19,7 @@ stdenv.mkDerivation (finalAttrs: { bison cmake pkg-config makeWrapper # required for scripts/CMakeLists.txt coreutils gnugrep procps - ] ++ lib.optionals (!stdenv.isDarwin) [ rpcsvc-proto ]; + ] ++ lib.optionals (!stdenv.hostPlatform.isDarwin) [ rpcsvc-proto ]; patches = [ ./no-force-outline-atomics.patch # Do not force compilers to turn on -moutline-atomics switch @@ -39,9 +39,9 @@ stdenv.mkDerivation (finalAttrs: { buildInputs = [ boost (curl.override { inherit openssl; }) icu libedit libevent lz4 ncurses openssl protobuf re2 readline zlib zstd libfido2 openldap perl cyrus_sasl - ] ++ lib.optionals stdenv.isLinux [ + ] ++ lib.optionals stdenv.hostPlatform.isLinux [ numactl libtirpc - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ cctools CoreServices developer_cmds DarwinTools ]; diff --git a/pkgs/servers/sql/pgbouncer/default.nix b/pkgs/servers/sql/pgbouncer/default.nix index 17bb24562d7e..dfffa518a5fd 100644 --- a/pkgs/servers/sql/pgbouncer/default.nix +++ b/pkgs/servers/sql/pgbouncer/default.nix @@ -11,9 +11,9 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ pkg-config ]; buildInputs = [ libevent openssl c-ares ] - ++ lib.optional stdenv.isLinux systemd; + ++ lib.optional stdenv.hostPlatform.isLinux systemd; enableParallelBuilding = true; - configureFlags = lib.optional stdenv.isLinux "--with-systemd"; + configureFlags = lib.optional stdenv.hostPlatform.isLinux "--with-systemd"; passthru.tests = { pgbouncer = nixosTests.pgbouncer; diff --git a/pkgs/servers/sql/pgcat/default.nix b/pkgs/servers/sql/pgcat/default.nix index 49de401a75dd..525380e46f24 100644 --- a/pkgs/servers/sql/pgcat/default.nix +++ b/pkgs/servers/sql/pgcat/default.nix @@ -22,7 +22,7 @@ rustPlatform.buildRustPackage rec { cargoHash = "sha256-QqwUEbWKSUuxzYjWpVpQuKZDiNib1gM2eZJ4y7XIzXY="; - buildInputs = lib.optionals stdenv.isDarwin [ + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.Security ]; diff --git a/pkgs/servers/sql/pgpool/default.nix b/pkgs/servers/sql/pgpool/default.nix index f1762be17f2c..b4f5724bcf77 100644 --- a/pkgs/servers/sql/pgpool/default.nix +++ b/pkgs/servers/sql/pgpool/default.nix @@ -4,7 +4,7 @@ , postgresql , openssl , libxcrypt -, withPam ? stdenv.isLinux +, withPam ? stdenv.hostPlatform.isLinux , pam }: @@ -34,7 +34,7 @@ stdenv.mkDerivation rec { "sysconfdir=\${out}/etc" ]; - patches = lib.optionals (stdenv.isDarwin) [ + patches = lib.optionals (stdenv.hostPlatform.isDarwin) [ # Build checks for strlcpy being available in the system, but doesn't # actually exclude its own copy from being built ./darwin-strlcpy.patch diff --git a/pkgs/servers/sql/postgresql/ext/h3-pg.nix b/pkgs/servers/sql/postgresql/ext/h3-pg.nix index 2b8edb366ffa..ae5252092530 100644 --- a/pkgs/servers/sql/postgresql/ext/h3-pg.nix +++ b/pkgs/servers/sql/postgresql/ext/h3-pg.nix @@ -21,7 +21,7 @@ stdenv.mkDerivation (finalAttrs: { postPatch = '' substituteInPlace CMakeLists.txt \ --replace "add_subdirectory(cmake/h3)" "include_directories(${lib.getDev h3_4}/include/h3)" - '' + lib.optionalString stdenv.isDarwin '' + '' + lib.optionalString stdenv.hostPlatform.isDarwin '' substituteInPlace cmake/AddPostgreSQLExtension.cmake \ --replace "INTERPROCEDURAL_OPTIMIZATION TRUE" "" ''; diff --git a/pkgs/servers/sql/postgresql/ext/lantern.nix b/pkgs/servers/sql/postgresql/ext/lantern.nix index 1e632228663b..9a3e01d53537 100644 --- a/pkgs/servers/sql/postgresql/ext/lantern.nix +++ b/pkgs/servers/sql/postgresql/ext/lantern.nix @@ -74,6 +74,6 @@ stdenv.mkDerivation (finalAttrs: { maintainers = [ ]; platforms = postgresql.meta.platforms; # error: use of undeclared identifier 'aligned_alloc' - broken = stdenv.isDarwin && lib.versionOlder stdenv.hostPlatform.darwinMinVersion "10.13"; + broken = stdenv.hostPlatform.isDarwin && lib.versionOlder stdenv.hostPlatform.darwinMinVersion "10.13"; }; }) diff --git a/pkgs/servers/sql/postgresql/ext/pgvecto-rs/default.nix b/pkgs/servers/sql/postgresql/ext/pgvecto-rs/default.nix index aca5c543cb24..e8b3af416ca7 100644 --- a/pkgs/servers/sql/postgresql/ext/pgvecto-rs/default.nix +++ b/pkgs/servers/sql/postgresql/ext/pgvecto-rs/default.nix @@ -93,7 +93,7 @@ in meta = with lib; { # Upstream removed support for PostgreSQL 12 and 13 on 0.3.0: https://github.com/tensorchord/pgvecto.rs/issues/343 - broken = stdenv.isDarwin || (versionOlder postgresql.version "14"); + broken = stdenv.hostPlatform.isDarwin || (versionOlder postgresql.version "14"); description = "Scalable, Low-latency and Hybrid-enabled Vector Search in Postgres"; homepage = "https://github.com/tensorchord/pgvecto.rs"; license = licenses.asl20; diff --git a/pkgs/servers/sql/postgresql/ext/postgis.nix b/pkgs/servers/sql/postgresql/ext/postgis.nix index 240137846b24..109876b6e9d2 100644 --- a/pkgs/servers/sql/postgresql/ext/postgis.nix +++ b/pkgs/servers/sql/postgresql/ext/postgis.nix @@ -49,7 +49,7 @@ stdenv.mkDerivation rec { json_c protobufc pcre2.dev - ] ++ lib.optional stdenv.isDarwin libiconv; + ] ++ lib.optional stdenv.hostPlatform.isDarwin libiconv; nativeBuildInputs = [ perl pkg-config @@ -89,7 +89,7 @@ stdenv.mkDerivation rec { ln -s ${postgresql}/bin/postgres $out/bin/postgres ''; - doCheck = stdenv.isLinux; + doCheck = stdenv.hostPlatform.isLinux; preCheck = '' substituteInPlace regress/run_test.pl --replace-fail "/share/contrib/postgis" "$out/share/postgresql/contrib/postgis" diff --git a/pkgs/servers/sql/postgresql/ext/timescaledb.nix b/pkgs/servers/sql/postgresql/ext/timescaledb.nix index 0e5651085ea1..92b6ad4fea88 100644 --- a/pkgs/servers/sql/postgresql/ext/timescaledb.nix +++ b/pkgs/servers/sql/postgresql/ext/timescaledb.nix @@ -16,7 +16,7 @@ stdenv.mkDerivation rec { cmakeFlags = [ "-DSEND_TELEMETRY_DEFAULT=OFF" "-DREGRESS_CHECKS=OFF" "-DTAP_CHECKS=OFF" ] ++ lib.optionals (!enableUnfree) [ "-DAPACHE_ONLY=ON" ] - ++ lib.optionals stdenv.isDarwin [ "-DLINTER=OFF" ]; + ++ lib.optionals stdenv.hostPlatform.isDarwin [ "-DLINTER=OFF" ]; # Fix the install phase which tries to install into the pgsql extension dir, # and cannot be manually overridden. This is rather fragile but works OK. diff --git a/pkgs/servers/sql/postgresql/generic.nix b/pkgs/servers/sql/postgresql/generic.nix index 474ca2563ba1..69aa8a377443 100644 --- a/pkgs/servers/sql/postgresql/generic.nix +++ b/pkgs/servers/sql/postgresql/generic.nix @@ -103,8 +103,8 @@ let ++ lib.optionals systemdSupport' [ systemdLibs ] ++ lib.optionals pythonSupport [ python3 ] ++ lib.optionals gssSupport [ libkrb5 ] - ++ lib.optionals stdenv'.isLinux [ linux-pam ] - ++ lib.optionals (!stdenv'.isDarwin) [ libossp_uuid ]; + ++ lib.optionals stdenv'.hostPlatform.isLinux [ linux-pam ] + ++ lib.optionals (!stdenv'.hostPlatform.isDarwin) [ libossp_uuid ]; nativeBuildInputs = [ makeWrapper @@ -138,16 +138,16 @@ let "--with-system-tzdata=${tzdata}/share/zoneinfo" "--enable-debug" (lib.optionalString systemdSupport' "--with-systemd") - (if stdenv'.isDarwin then "--with-uuid=e2fs" else "--with-ossp-uuid") + (if stdenv'.hostPlatform.isDarwin then "--with-uuid=e2fs" else "--with-ossp-uuid") ] ++ lib.optionals lz4Enabled [ "--with-lz4" ] ++ lib.optionals zstdEnabled [ "--with-zstd" ] ++ lib.optionals gssSupport [ "--with-gssapi" ] ++ lib.optionals pythonSupport [ "--with-python" ] ++ lib.optionals jitSupport [ "--with-llvm" ] - ++ lib.optionals stdenv'.isLinux [ "--with-pam" ] + ++ lib.optionals stdenv'.hostPlatform.isLinux [ "--with-pam" ] # This could be removed once the upstream issue is resolved: # https://postgr.es/m/flat/427c7c25-e8e1-4fc5-a1fb-01ceff185e5b%40technowledgy.de - ++ lib.optionals (stdenv'.isDarwin && atLeast "16") [ "LDFLAGS_EX_BE=-Wl,-export_dynamic" ]; + ++ lib.optionals (stdenv'.hostPlatform.isDarwin && atLeast "16") [ "LDFLAGS_EX_BE=-Wl,-export_dynamic" ]; patches = [ (if atLeast "16" then ./patches/relative-to-symlinks-16+.patch else ./patches/relative-to-symlinks.patch) @@ -158,14 +158,14 @@ let (substituteAll { src = ./patches/locale-binary-path.patch; - locale = "${if stdenv.isDarwin then darwin.adv_cmds else lib.getBin stdenv.cc.libc}/bin/locale"; + locale = "${if stdenv.hostPlatform.isDarwin then darwin.adv_cmds else lib.getBin stdenv.cc.libc}/bin/locale"; }) ] ++ lib.optionals stdenv'.hostPlatform.isMusl ( # Using fetchurl instead of fetchpatch on purpose: https://github.com/NixOS/nixpkgs/issues/240141 map fetchurl (lib.attrValues muslPatches) - ) ++ lib.optionals stdenv'.isLinux [ + ) ++ lib.optionals stdenv'.hostPlatform.isLinux [ (if atLeast "13" then ./patches/socketdir-in-run-13+.patch else ./patches/socketdir-in-run.patch) - ] ++ lib.optionals (stdenv'.isDarwin && olderThan "16") [ + ] ++ lib.optionals (stdenv'.hostPlatform.isDarwin && olderThan "16") [ ./patches/export-dynamic-darwin-15-.patch ]; @@ -229,7 +229,7 @@ let wrapProgram $out/bin/initdb --prefix PATH ":" ${glibc.bin}/bin ''; - doCheck = !stdenv'.isDarwin; + doCheck = !stdenv'.hostPlatform.isDarwin; # autodetection doesn't seem to able to find this, but it's there. checkTarget = "check"; diff --git a/pkgs/servers/sql/proxysql/default.nix b/pkgs/servers/sql/proxysql/default.nix index e0a6f23a4631..ed04908180ee 100644 --- a/pkgs/servers/sql/proxysql/default.nix +++ b/pkgs/servers/sql/proxysql/default.nix @@ -164,7 +164,7 @@ stdenv.mkDerivation (finalAttrs: { ''; meta = with lib; { - broken = stdenv.isDarwin; + broken = stdenv.hostPlatform.isDarwin; description = "High-performance MySQL proxy"; mainProgram = "proxysql"; homepage = "https://proxysql.com/"; diff --git a/pkgs/servers/sql/sqld/default.nix b/pkgs/servers/sql/sqld/default.nix index db78ebafc812..79c52798c6b8 100644 --- a/pkgs/servers/sql/sqld/default.nix +++ b/pkgs/servers/sql/sqld/default.nix @@ -51,7 +51,7 @@ rustPlatform.buildRustPackage rec { openssl sqlite zstd - ] ++ lib.optionals stdenv.isDarwin [ darwin.apple_sdk.frameworks.Security ]; + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.Security ]; env.ZSTD_SYS_USE_PKG_CONFIG = true; diff --git a/pkgs/servers/sqlpage/default.nix b/pkgs/servers/sqlpage/default.nix index c7c06a6d50c4..c6055d601535 100644 --- a/pkgs/servers/sqlpage/default.nix +++ b/pkgs/servers/sqlpage/default.nix @@ -86,7 +86,7 @@ rustPlatform.buildRustPackage rec { sqlite zstd ] - ++ lib.optionals stdenv.isDarwin [ + ++ lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.CoreFoundation darwin.apple_sdk.frameworks.Security darwin.apple_sdk.frameworks.SystemConfiguration diff --git a/pkgs/servers/squid/default.nix b/pkgs/servers/squid/default.nix index 9229359d9159..998b2d9ada44 100644 --- a/pkgs/servers/squid/default.nix +++ b/pkgs/servers/squid/default.nix @@ -15,7 +15,7 @@ stdenv.mkDerivation (finalAttrs: { nativeBuildInputs = [ pkg-config ]; buildInputs = [ perl openldap db cyrus_sasl expat libxml2 openssl - ] ++ lib.optionals stdenv.isLinux [ libcap pam systemd ]; + ] ++ lib.optionals stdenv.hostPlatform.isLinux [ libcap pam systemd ]; enableParallelBuilding = true; @@ -30,7 +30,7 @@ stdenv.mkDerivation (finalAttrs: { "--enable-delay-pools" "--enable-x-accelerator-vary" "--enable-htcp" - ] ++ lib.optional (stdenv.isLinux && !stdenv.hostPlatform.isMusl) + ] ++ lib.optional (stdenv.hostPlatform.isLinux && !stdenv.hostPlatform.isMusl) "--enable-linux-netfilter"; doCheck = true; diff --git a/pkgs/servers/sslh/default.nix b/pkgs/servers/sslh/default.nix index a9ca0c8f2585..cfb15d6d54f8 100644 --- a/pkgs/servers/sslh/default.nix +++ b/pkgs/servers/sslh/default.nix @@ -13,9 +13,9 @@ stdenv.mkDerivation rec { postPatch = "patchShebangs *.sh"; - buildInputs = [ libev libconfig perl pcre2 ] ++ lib.optionals stdenv.isLinux [ libcap tcp_wrappers ]; + buildInputs = [ libev libconfig perl pcre2 ] ++ lib.optionals stdenv.hostPlatform.isLinux [ libcap tcp_wrappers ]; - makeFlags = lib.optionals stdenv.isLinux [ "USELIBCAP=1" "USELIBWRAP=1" ]; + makeFlags = lib.optionals stdenv.hostPlatform.isLinux [ "USELIBCAP=1" "USELIBWRAP=1" ]; postInstall = '' # install all flavours diff --git a/pkgs/servers/static-web-server/default.nix b/pkgs/servers/static-web-server/default.nix index 3e29f5aa42d7..b57dafed1d48 100644 --- a/pkgs/servers/static-web-server/default.nix +++ b/pkgs/servers/static-web-server/default.nix @@ -28,7 +28,7 @@ rustPlatform.buildRustPackage rec { }) ]; - buildInputs = lib.optionals stdenv.isDarwin [ darwin.apple_sdk.frameworks.Security ]; + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.Security ]; # Some tests rely on timestamps newer than 18 Nov 1974 00:00:00 preCheck = '' diff --git a/pkgs/servers/sunshine/default.nix b/pkgs/servers/sunshine/default.nix index 9b56cccf1528..6ced9624b741 100644 --- a/pkgs/servers/sunshine/default.nix +++ b/pkgs/servers/sunshine/default.nix @@ -139,7 +139,7 @@ stdenv'.mkDerivation rec { miniupnpc ] ++ lib.optionals cudaSupport [ cudaPackages.cudatoolkit - ] ++ lib.optionals stdenv.isx86_64 [ + ] ++ lib.optionals stdenv.hostPlatform.isx86_64 [ intel-media-sdk ]; diff --git a/pkgs/servers/swego/default.nix b/pkgs/servers/swego/default.nix index a44664809944..f26b33856d11 100644 --- a/pkgs/servers/swego/default.nix +++ b/pkgs/servers/swego/default.nix @@ -38,7 +38,7 @@ buildGoModule rec { maintainers = with maintainers; [ fab ]; # darwin crashes with: # src/controllers/parsingArgs.go:130:4: undefined: PrintEmbeddedFiles - broken = stdenv.isDarwin; + broken = stdenv.hostPlatform.isDarwin; mainProgram = "swego"; }; } diff --git a/pkgs/servers/tailscale/default.nix b/pkgs/servers/tailscale/default.nix index 10b88a04c707..b24131411987 100644 --- a/pkgs/servers/tailscale/default.nix +++ b/pkgs/servers/tailscale/default.nix @@ -39,7 +39,7 @@ buildGoModule { vendorHash = "sha256-HJEgBs2GOzXvRa95LdwySQmG4/+QwupFDBGrQT6Y2vE="; - nativeBuildInputs = lib.optionals stdenv.isLinux [ makeWrapper ] ++ [ installShellFiles ]; + nativeBuildInputs = lib.optionals stdenv.hostPlatform.isLinux [ makeWrapper ] ++ [ installShellFiles ]; CGO_ENABLED = 0; @@ -60,7 +60,7 @@ buildGoModule { postInstall = '' ln -s $out/bin/tailscaled $out/bin/tailscale - '' + lib.optionalString stdenv.isLinux '' + '' + lib.optionalString stdenv.hostPlatform.isLinux '' wrapProgram $out/bin/tailscaled \ --prefix PATH : ${lib.makeBinPath [ iproute2 iptables getent shadow ]} \ --suffix PATH : ${lib.makeBinPath [ procps ]} diff --git a/pkgs/servers/teleport/generic.nix b/pkgs/servers/teleport/generic.nix index 87719f03eb72..2fcdc7f4a655 100644 --- a/pkgs/servers/teleport/generic.nix +++ b/pkgs/servers/teleport/generic.nix @@ -54,7 +54,7 @@ let buildAndTestSubdir = "lib/srv/desktop/rdp/rdpclient"; buildInputs = [ openssl ] - ++ lib.optionals stdenv.isDarwin [ CoreFoundation Security ]; + ++ lib.optionals stdenv.hostPlatform.isDarwin [ CoreFoundation Security ]; nativeBuildInputs = [ pkg-config ]; # https://github.com/NixOS/nixpkgs/issues/161570 , @@ -144,7 +144,7 @@ buildGoModule rec { ++ lib.optional withRdpClient "desktop_access_rdp"; buildInputs = [ openssl libfido2 ] - ++ lib.optionals (stdenv.isDarwin && withRdpClient) [ CoreFoundation Security AppKit ]; + ++ lib.optionals (stdenv.hostPlatform.isDarwin && withRdpClient) [ CoreFoundation Security AppKit ]; nativeBuildInputs = [ makeWrapper pkg-config ]; patches = extPatches ++ [ diff --git a/pkgs/servers/trezord/default.nix b/pkgs/servers/trezord/default.nix index 247ac6832db3..3852f139935c 100644 --- a/pkgs/servers/trezord/default.nix +++ b/pkgs/servers/trezord/default.nix @@ -30,8 +30,8 @@ buildGoModule rec { }) ]; - propagatedBuildInputs = lib.optionals stdenv.isLinux [ trezor-udev-rules ] - ++ lib.optionals stdenv.isDarwin [ AppKit ]; + propagatedBuildInputs = lib.optionals stdenv.hostPlatform.isLinux [ trezor-udev-rules ] + ++ lib.optionals stdenv.hostPlatform.isDarwin [ AppKit ]; ldflags = [ "-s" "-w" diff --git a/pkgs/servers/unpackerr/default.nix b/pkgs/servers/unpackerr/default.nix index d3cb4c7d47b2..30091834a856 100644 --- a/pkgs/servers/unpackerr/default.nix +++ b/pkgs/servers/unpackerr/default.nix @@ -13,7 +13,7 @@ buildGoModule rec { vendorHash = "sha256-wWIw0gNn5tqRq0udzPy/n2OkiIVESpSotOSn2YlBNS4="; - buildInputs = lib.optionals stdenv.isDarwin [ Cocoa WebKit ]; + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ Cocoa WebKit ]; ldflags = [ "-s" "-w" "-X golift.io/version.Version=${version}" ]; diff --git a/pkgs/servers/ursadb/default.nix b/pkgs/servers/ursadb/default.nix index c79156a8f3c2..c8111fc648b9 100644 --- a/pkgs/servers/ursadb/default.nix +++ b/pkgs/servers/ursadb/default.nix @@ -32,6 +32,6 @@ stdenv.mkDerivation (finalAttrs: { license = licenses.bsd3; maintainers = with maintainers; [ msm ]; platforms = platforms.unix; - broken = stdenv.isDarwin; + broken = stdenv.hostPlatform.isDarwin; }; }) diff --git a/pkgs/servers/uwsgi/default.nix b/pkgs/servers/uwsgi/default.nix index 1f874236fbd6..7d0729ee4621 100644 --- a/pkgs/servers/uwsgi/default.nix +++ b/pkgs/servers/uwsgi/default.nix @@ -9,9 +9,9 @@ , zlib # plugins: list of strings, eg. [ "python2" "python3" ] , plugins ? [] -, pam, withPAM ? stdenv.isLinux +, pam, withPAM ? stdenv.hostPlatform.isLinux , systemd, withSystemd ? lib.meta.availableOn stdenv.hostPlatform systemd -, libcap, withCap ? stdenv.isLinux +, libcap, withCap ? stdenv.hostPlatform.isLinux , python2, python3, ncurses , ruby, php , makeWrapper, fetchFromGitHub @@ -92,7 +92,7 @@ stdenv.mkDerivation (finalAttrs: { ]; buildInputs = [ jansson pcre libxcrypt ] - ++ lib.optionals (stdenv.isDarwin && stdenv.isAarch64) [ expat zlib ] + ++ lib.optionals (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isAarch64) [ expat zlib ] ++ lib.optional withPAM pam ++ lib.optional withSystemd systemd ++ lib.optional withCap libcap diff --git a/pkgs/servers/varnish/default.nix b/pkgs/servers/varnish/default.nix index ddc190a2887a..8814bd41e04b 100644 --- a/pkgs/servers/varnish/default.nix +++ b/pkgs/servers/varnish/default.nix @@ -32,7 +32,7 @@ let ''; # https://github.com/varnishcache/varnish-cache/issues/1875 - env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.isi686 "-fexcess-precision=standard"; + env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.hostPlatform.isi686 "-fexcess-precision=standard"; outputs = [ "out" "dev" "man" ]; diff --git a/pkgs/servers/web-apps/ethercalc/node-packages.nix b/pkgs/servers/web-apps/ethercalc/node-packages.nix index e9c5ff0e4fee..0a4e2b7c9aba 100644 --- a/pkgs/servers/web-apps/ethercalc/node-packages.nix +++ b/pkgs/servers/web-apps/ethercalc/node-packages.nix @@ -8,7 +8,7 @@ let nodeEnv = import ../../../development/node-packages/node-env.nix { inherit (pkgs) stdenv lib python2 runCommand writeTextFile writeShellScript; inherit pkgs nodejs; - libtool = if pkgs.stdenv.isDarwin then pkgs.cctools or pkgs.darwin.cctools else null; + libtool = if pkgs.stdenv.hostPlatform.isDarwin then pkgs.cctools or pkgs.darwin.cctools else null; }; in import ./node-packages-generated.nix { diff --git a/pkgs/servers/web-apps/lemmy/server.nix b/pkgs/servers/web-apps/lemmy/server.nix index 8cb65bfef2bf..416de2b21db7 100644 --- a/pkgs/servers/web-apps/lemmy/server.nix +++ b/pkgs/servers/web-apps/lemmy/server.nix @@ -34,7 +34,7 @@ rustPlatform.buildRustPackage rec { cargoHash = pinData.serverCargoHash; buildInputs = [ postgresql ] - ++ lib.optionals stdenv.isDarwin [ libiconv Security SystemConfiguration ]; + ++ lib.optionals stdenv.hostPlatform.isDarwin [ libiconv Security SystemConfiguration ]; # Using OPENSSL_NO_VENDOR is not an option on darwin # As of version 0.10.35 rust-openssl looks for openssl on darwin diff --git a/pkgs/servers/web-apps/pict-rs/0.3.nix b/pkgs/servers/web-apps/pict-rs/0.3.nix index 11f2479efdbe..9e7ad6e3d204 100644 --- a/pkgs/servers/web-apps/pict-rs/0.3.nix +++ b/pkgs/servers/web-apps/pict-rs/0.3.nix @@ -35,7 +35,7 @@ rustPlatform.buildRustPackage rec { PROTOC_INCLUDE = "${protobuf}/include"; nativeBuildInputs = [ makeWrapper ]; - buildInputs = lib.optionals stdenv.isDarwin [ Security ]; + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ Security ]; postInstall = '' wrapProgram "$out/bin/pict-rs" \ diff --git a/pkgs/servers/web-apps/pict-rs/default.nix b/pkgs/servers/web-apps/pict-rs/default.nix index 6033db65bf30..fddfd6fffebd 100644 --- a/pkgs/servers/web-apps/pict-rs/default.nix +++ b/pkgs/servers/web-apps/pict-rs/default.nix @@ -30,7 +30,7 @@ rustPlatform.buildRustPackage rec { PROTOC_INCLUDE = "${protobuf}/include"; nativeBuildInputs = [ makeWrapper ]; - buildInputs = lib.optional stdenv.isDarwin darwin.apple_sdk.frameworks.Security; + buildInputs = lib.optional stdenv.hostPlatform.isDarwin darwin.apple_sdk.frameworks.Security; postInstall = '' wrapProgram "$out/bin/pict-rs" \ @@ -40,7 +40,7 @@ rustPlatform.buildRustPackage rec { passthru.tests = { inherit (nixosTests) pict-rs; }; meta = with lib; { - broken = stdenv.isDarwin; + broken = stdenv.hostPlatform.isDarwin; description = "Simple image hosting service"; mainProgram = "pict-rs"; homepage = "https://git.asonix.dog/asonix/pict-rs"; diff --git a/pkgs/servers/webdav-server-rs/default.nix b/pkgs/servers/webdav-server-rs/default.nix index ad1084597604..e7e5b6a0edb8 100644 --- a/pkgs/servers/webdav-server-rs/default.nix +++ b/pkgs/servers/webdav-server-rs/default.nix @@ -5,7 +5,7 @@ , libtirpc , pam , rpcsvc-proto -, enablePAM ? stdenv.isLinux +, enablePAM ? stdenv.hostPlatform.isLinux }: rustPlatform.buildRustPackage rec { diff --git a/pkgs/servers/x11/xorg/overrides.nix b/pkgs/servers/x11/xorg/overrides.nix index b3eb0e74dc68..ad631e419aae 100644 --- a/pkgs/servers/x11/xorg/overrides.nix +++ b/pkgs/servers/x11/xorg/overrides.nix @@ -11,7 +11,7 @@ }: let - inherit (stdenv) isDarwin; + inherit (stdenv.hostPlatform) isDarwin; malloc0ReturnsNullCrossFlag = lib.optional (stdenv.hostPlatform != stdenv.buildPlatform) @@ -87,7 +87,7 @@ self: super: x11BuildHook = ./imake.sh; patches = [./imake.patch ./imake-cc-wrapper-uberhack.patch]; setupHook = ./imake-setup-hook.sh; - CFLAGS = "-DIMAKE_COMPILETIME_CPP='\"${if stdenv.isDarwin + CFLAGS = "-DIMAKE_COMPILETIME_CPP='\"${if stdenv.hostPlatform.isDarwin then "${tradcpp}/bin/cpp" else "gcc"}\"'"; @@ -164,7 +164,7 @@ self: super: # Remove useless DocBook XML files. rm -rf $out/share/doc ''; - CPP = lib.optionalString stdenv.isDarwin "clang -E -"; + CPP = lib.optionalString stdenv.hostPlatform.isDarwin "clang -E -"; propagatedBuildInputs = attrs.propagatedBuildInputs or [] ++ [ xorg.xorgproto ]; }); @@ -263,7 +263,7 @@ self: super: ++ lib.optional (stdenv.targetPlatform.useLLVM or false) "ac_cv_path_RAWCPP=cpp"; propagatedBuildInputs = attrs.propagatedBuildInputs or [] ++ [ xorg.libSM ]; depsBuildBuild = [ buildPackages.stdenv.cc ]; - CPP = if stdenv.isDarwin then "clang -E -" else "${stdenv.cc.targetPrefix}cc -E -"; + CPP = if stdenv.hostPlatform.isDarwin then "clang -E -" else "${stdenv.cc.targetPrefix}cc -E -"; outputDoc = "devdoc"; outputs = [ "out" "dev" "devdoc" ]; }); @@ -794,7 +794,7 @@ self: super: ./dont-create-logdir-during-build.patch ]; buildInputs = commonBuildInputs ++ [ libdrm mesa ]; - propagatedBuildInputs = attrs.propagatedBuildInputs or [] ++ [ xorg.libpciaccess ] ++ commonPropagatedBuildInputs ++ lib.optionals stdenv.isLinux [ + propagatedBuildInputs = attrs.propagatedBuildInputs or [] ++ [ xorg.libpciaccess ] ++ commonPropagatedBuildInputs ++ lib.optionals stdenv.hostPlatform.isLinux [ udev ]; depsBuildBuild = [ buildPackages.stdenv.cc ]; @@ -926,7 +926,7 @@ self: super: "--with-xkb-bin-directory=${xorg.xkbcomp}/bin" "--with-xkb-path=${xorg.xkeyboardconfig}/share/X11/xkb" "--with-xkb-output=$out/share/X11/xkb/compiled" - ] ++ lib.optional stdenv.isDarwin [ + ] ++ lib.optional stdenv.hostPlatform.isDarwin [ "--without-dtrace" ]; @@ -935,7 +935,7 @@ self: super: xorg.libXfont2 xorg.xtrans xorg.libxcvt - ] ++ lib.optional stdenv.isDarwin [ Xplugin ]; + ] ++ lib.optional stdenv.hostPlatform.isDarwin [ Xplugin ]; }); lndir = super.lndir.overrideAttrs (attrs: { @@ -1083,7 +1083,7 @@ self: super: xmore = addMainProgram super.xmore { }; xorgcffiles = super.xorgcffiles.overrideAttrs (attrs: { - postInstall = lib.optionalString stdenv.isDarwin '' + postInstall = lib.optionalString stdenv.hostPlatform.isDarwin '' substituteInPlace $out/lib/X11/config/darwin.cf --replace "/usr/bin/" "" ''; }); diff --git a/pkgs/shells/bash/5.nix b/pkgs/shells/bash/5.nix index 614b3c377ea2..91da1f05a528 100644 --- a/pkgs/shells/bash/5.nix +++ b/pkgs/shells/bash/5.nix @@ -7,7 +7,7 @@ , util-linux # patch for cygwin requires readline support -, interactive ? stdenv.isCygwin +, interactive ? stdenv.hostPlatform.isCygwin , readline , withDocs ? false , texinfo diff --git a/pkgs/shells/bash/bash-completion/default.nix b/pkgs/shells/bash/bash-completion/default.nix index 9e65dcd7c289..6408f0610ff6 100644 --- a/pkgs/shells/bash/bash-completion/default.nix +++ b/pkgs/shells/bash/bash-completion/default.nix @@ -59,7 +59,7 @@ stdenv.mkDerivation rec { --ignore=test/t/test_screen.py ''; - prePatch = lib.optionalString stdenv.isDarwin '' + prePatch = lib.optionalString stdenv.hostPlatform.isDarwin '' sed -i -e 's/readlink -f/readlink/g' bash_completion completions/* ''; diff --git a/pkgs/shells/fish/default.nix b/pkgs/shells/fish/default.nix index 73065cb380fd..82ba76c005b8 100644 --- a/pkgs/shells/fish/default.nix +++ b/pkgs/shells/fish/default.nix @@ -177,7 +177,7 @@ let # tests/checks/complete.fish sed -i 's|/bin/ls|${coreutils}/bin/ls|' tests/checks/complete.fish - '' + lib.optionalString stdenv.isDarwin '' + '' + lib.optionalString stdenv.hostPlatform.isDarwin '' # Tests use pkill/pgrep which are currently not built on Darwin # See https://github.com/NixOS/nixpkgs/pull/103180 rm tests/pexpects/exit.py @@ -187,7 +187,7 @@ let # pexpect tests are flaky in general # See https://github.com/fish-shell/fish-shell/issues/8789 rm tests/pexpects/bind.py - '' + lib.optionalString stdenv.isLinux '' + '' + lib.optionalString stdenv.hostPlatform.isLinux '' # pexpect tests are flaky on aarch64-linux (also x86_64-linux) # See https://github.com/fish-shell/fish-shell/issues/8789 rm tests/pexpects/exit_handlers.py @@ -208,12 +208,12 @@ let cmakeFlags = [ "-DCMAKE_INSTALL_DOCDIR=${placeholder "doc"}/share/doc/fish" - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ "-DMAC_CODESIGN_ID=OFF" ]; # Fish’s test suite needs to be able to look up process information and send signals. - sandboxProfile = lib.optionalString stdenv.isDarwin '' + sandboxProfile = lib.optionalString stdenv.hostPlatform.isDarwin '' (allow mach-lookup mach-task-name) (allow signal (target children)) ''; @@ -235,7 +235,7 @@ let gnused groff gettext - ] ++ lib.optional (!stdenv.isDarwin) man-db; + ] ++ lib.optional (!stdenv.hostPlatform.isDarwin) man-db; doCheck = true; @@ -278,13 +278,13 @@ let end EOF - '' + lib.optionalString stdenv.isLinux '' + '' + lib.optionalString stdenv.hostPlatform.isLinux '' for cur in $out/share/fish/functions/*.fish; do sed -e "s|/usr/bin/getent|${getent}/bin/getent|" \ -i "$cur" done - '' + lib.optionalString (!stdenv.isDarwin) '' + '' + lib.optionalString (!stdenv.hostPlatform.isDarwin) '' sed -i "s|Popen(\['manpath'|Popen(\['${man-db}/bin/manpath'|" \ "$out/share/fish/tools/create_manpage_completions.py" sed -i "s|command manpath|command ${man-db}/bin/manpath|" \ @@ -308,7 +308,7 @@ let passthru = { shellPath = "/bin/fish"; tests = { - nixos = lib.optionalAttrs stdenv.isLinux nixosTests.fish; + nixos = lib.optionalAttrs stdenv.hostPlatform.isLinux nixosTests.fish; # Test the fish_config tool by checking the generated splash page. # Since the webserver requires a port to run, it is not started. diff --git a/pkgs/shells/fish/plugins/fzf-fish.nix b/pkgs/shells/fish/plugins/fzf-fish.nix index 3a70c888c352..1ad4764c46c5 100644 --- a/pkgs/shells/fish/plugins/fzf-fish.nix +++ b/pkgs/shells/fish/plugins/fzf-fish.nix @@ -31,7 +31,7 @@ buildFishPlugin rec { # Disable tests that are failing, because there is not 'rev' command rm tests/preview_file/custom_file_preview.fish '' + ( - if stdenv.isDarwin then ''script /dev/null fish -c "fishtape tests/*/*.fish"'' + if stdenv.hostPlatform.isDarwin then ''script /dev/null fish -c "fishtape tests/*/*.fish"'' else ''script -c 'fish -c "fishtape tests/*/*.fish"' '' ); diff --git a/pkgs/shells/ion/default.nix b/pkgs/shells/ion/default.nix index 0440a79e760f..a5e7f9edeb9a 100644 --- a/pkgs/shells/ion/default.nix +++ b/pkgs/shells/ion/default.nix @@ -34,11 +34,11 @@ rustPlatform.buildRustPackage rec { ./build-script.patch ]; - buildInputs = lib.optionals stdenv.isDarwin [ + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.Security ]; - checkFlags = lib.optionals stdenv.isDarwin [ + checkFlags = lib.optionals stdenv.hostPlatform.isDarwin [ # test assumes linux "--skip=binary::completer::tests::filename_completion" ]; diff --git a/pkgs/shells/nushell/default.nix b/pkgs/shells/nushell/default.nix index b763526dda60..ef0edeb6a24c 100644 --- a/pkgs/shells/nushell/default.nix +++ b/pkgs/shells/nushell/default.nix @@ -38,18 +38,18 @@ rustPlatform.buildRustPackage { cargoHash = "sha256-43V0TnYGG2tyWRIGaohIaoN7dxnY1fle2Bp5lDiFlWg="; nativeBuildInputs = [ pkg-config ] - ++ lib.optionals (withDefaultFeatures && stdenv.isLinux) [ python3 ] - ++ lib.optionals stdenv.isDarwin [ rustPlatform.bindgenHook ]; + ++ lib.optionals (withDefaultFeatures && stdenv.hostPlatform.isLinux) [ python3 ] + ++ lib.optionals stdenv.hostPlatform.isDarwin [ rustPlatform.bindgenHook ]; buildInputs = [ openssl zstd ] - ++ lib.optionals stdenv.isDarwin [ zlib Libsystem Security ] - ++ lib.optionals (withDefaultFeatures && stdenv.isLinux) [ xorg.libX11 ] - ++ lib.optionals (withDefaultFeatures && stdenv.isDarwin) [ AppKit nghttp2 libgit2 ]; + ++ lib.optionals stdenv.hostPlatform.isDarwin [ zlib Libsystem Security ] + ++ lib.optionals (withDefaultFeatures && stdenv.hostPlatform.isLinux) [ xorg.libX11 ] + ++ lib.optionals (withDefaultFeatures && stdenv.hostPlatform.isDarwin) [ AppKit nghttp2 libgit2 ]; buildNoDefaultFeatures = !withDefaultFeatures; buildFeatures = additionalFeatures [ ]; - doCheck = ! stdenv.isDarwin; # Skip checks on darwin. Failing tests since 0.96.0 + doCheck = ! stdenv.hostPlatform.isDarwin; # Skip checks on darwin. Failing tests since 0.96.0 checkPhase = '' runHook preCheck diff --git a/pkgs/shells/nushell/plugins/formats.nix b/pkgs/shells/nushell/plugins/formats.nix index a74721ad9031..7d693118ac01 100644 --- a/pkgs/shells/nushell/plugins/formats.nix +++ b/pkgs/shells/nushell/plugins/formats.nix @@ -15,7 +15,7 @@ rustPlatform.buildRustPackage rec { cargoHash = "sha256-Lcgf6+Li1STl4Sko81oBHAnX09A6F7dwYmHJiF2CZ3s="; nativeBuildInputs = [ pkg-config ] ++ lib.optionals stdenv.cc.isClang [ rustPlatform.bindgenHook ]; - buildInputs = lib.optionals stdenv.isDarwin [ + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ IOKit Foundation ]; diff --git a/pkgs/shells/nushell/plugins/gstat.nix b/pkgs/shells/nushell/plugins/gstat.nix index e430820247dc..06a2fb38d926 100644 --- a/pkgs/shells/nushell/plugins/gstat.nix +++ b/pkgs/shells/nushell/plugins/gstat.nix @@ -15,7 +15,7 @@ rustPlatform.buildRustPackage rec { cargoHash = "sha256-NLGEaIGUqgyGegzVyZloLckVGYmfMjwhzVXh327kxRA="; nativeBuildInputs = [ pkg-config ] ++ lib.optionals stdenv.cc.isClang [ rustPlatform.bindgenHook ]; - buildInputs = [ openssl ] ++ lib.optionals stdenv.isDarwin [ Security ]; + buildInputs = [ openssl ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ Security ]; cargoBuildFlags = [ "--package nu_plugin_gstat" ]; checkPhase = '' diff --git a/pkgs/shells/nushell/plugins/net.nix b/pkgs/shells/nushell/plugins/net.nix index 95d1c36b467f..981f1d208e11 100644 --- a/pkgs/shells/nushell/plugins/net.nix +++ b/pkgs/shells/nushell/plugins/net.nix @@ -23,7 +23,7 @@ rustPlatform.buildRustPackage rec { nativeBuildInputs = [ rustPlatform.bindgenHook ]; - buildInputs = lib.optionals stdenv.isDarwin [ + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ CoreFoundation IOKit ]; diff --git a/pkgs/shells/nushell/plugins/polars.nix b/pkgs/shells/nushell/plugins/polars.nix index 7e9e1623bea6..5865af7139fd 100644 --- a/pkgs/shells/nushell/plugins/polars.nix +++ b/pkgs/shells/nushell/plugins/polars.nix @@ -19,7 +19,7 @@ rustPlatform.buildRustPackage rec { nativeBuildInputs = [ pkg-config ] ++ lib.optionals stdenv.cc.isClang [ rustPlatform.bindgenHook ]; buildInputs = [ openssl ] - ++ lib.optionals stdenv.isDarwin [ + ++ lib.optionals stdenv.hostPlatform.isDarwin [ IOKit Foundation ]; diff --git a/pkgs/shells/nushell/plugins/query.nix b/pkgs/shells/nushell/plugins/query.nix index 85520b32e0e3..55bd221c8b54 100644 --- a/pkgs/shells/nushell/plugins/query.nix +++ b/pkgs/shells/nushell/plugins/query.nix @@ -22,7 +22,7 @@ rustPlatform.buildRustPackage { openssl curl ] - ++ lib.optionals stdenv.isDarwin [ + ++ lib.optionals stdenv.hostPlatform.isDarwin [ IOKit CoreFoundation ]; diff --git a/pkgs/shells/powershell/default.nix b/pkgs/shells/powershell/default.nix index c6d123701589..a29bb9c99010 100644 --- a/pkgs/shells/powershell/default.nix +++ b/pkgs/shells/powershell/default.nix @@ -41,7 +41,7 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ less makeWrapper - ] ++ lib.optionals stdenv.isLinux [ + ] ++ lib.optionals stdenv.hostPlatform.isLinux [ autoPatchelfHook ]; @@ -51,9 +51,9 @@ stdenv.mkDerivation rec { libuuid libunwind openssl - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ darwin.Libsystem - ] ++ lib.optionals stdenv.isLinux [ + ] ++ lib.optionals stdenv.hostPlatform.isLinux [ lttng-ust pam ]; @@ -70,7 +70,7 @@ stdenv.mkDerivation rec { --set POWERSHELL_TELEMETRY_OPTOUT 1 \ --set DOTNET_CLI_TELEMETRY_OPTOUT 1 - '' + lib.optionalString stdenv.isLinux '' + '' + lib.optionalString stdenv.hostPlatform.isLinux '' patchelf --replace-needed liblttng-ust${ext}.0 liblttng-ust${ext}.1 $out/share/powershell/libcoreclrtraceptprovider.so '' + '' diff --git a/pkgs/shells/rush/default.nix b/pkgs/shells/rush/default.nix index 6e7e256561b6..7b606178973e 100644 --- a/pkgs/shells/rush/default.nix +++ b/pkgs/shells/rush/default.nix @@ -20,7 +20,7 @@ stdenv.mkDerivation rec { doCheck = true; meta = { - broken = stdenv.isDarwin; + broken = stdenv.hostPlatform.isDarwin; description = "Restricted User Shell"; longDescription = diff --git a/pkgs/shells/yash/default.nix b/pkgs/shells/yash/default.nix index a88049ca0147..3e57b7b9a0fb 100644 --- a/pkgs/shells/yash/default.nix +++ b/pkgs/shells/yash/default.nix @@ -13,7 +13,7 @@ stdenv.mkDerivation rec { strictDeps = true; nativeBuildInputs = [ asciidoc gettext ]; - buildInputs = [ ncurses ] ++ lib.optionals stdenv.isDarwin [ gettext ]; + buildInputs = [ ncurses ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ gettext ]; meta = with lib; { homepage = "https://yash.osdn.jp/index.html.en"; diff --git a/pkgs/shells/zsh/antibody/default.nix b/pkgs/shells/zsh/antibody/default.nix index fe32821dd611..7c1f0eb56cbd 100644 --- a/pkgs/shells/zsh/antibody/default.nix +++ b/pkgs/shells/zsh/antibody/default.nix @@ -30,6 +30,6 @@ buildGoModule rec { # # but this package is no longer maintained. # - broken = stdenv.isDarwin; + broken = stdenv.hostPlatform.isDarwin; }; } diff --git a/pkgs/shells/zsh/default.nix b/pkgs/shells/zsh/default.nix index ac8d3aa9a736..0955c9c47fa0 100644 --- a/pkgs/shells/zsh/default.nix +++ b/pkgs/shells/zsh/default.nix @@ -49,7 +49,7 @@ stdenv.mkDerivation { strictDeps = true; nativeBuildInputs = [ autoreconfHook perl groff texinfo pkg-config ] - ++ lib.optionals stdenv.isLinux [ util-linux yodl ]; + ++ lib.optionals stdenv.hostPlatform.isLinux [ util-linux yodl ]; buildInputs = [ ncurses pcre ]; diff --git a/pkgs/shells/zsh/grml-zsh-config/default.nix b/pkgs/shells/zsh/grml-zsh-config/default.nix index 00349696bd3f..d7b745c63c5f 100644 --- a/pkgs/shells/zsh/grml-zsh-config/default.nix +++ b/pkgs/shells/zsh/grml-zsh-config/default.nix @@ -13,7 +13,7 @@ stdenv.mkDerivation rec { strictDeps = true; nativeBuildInputs = [ txt2tags ]; buildInputs = [ zsh coreutils procps ] - ++ lib.optional stdenv.isLinux inetutils; + ++ lib.optional stdenv.hostPlatform.isLinux inetutils; buildPhase = '' cd doc diff --git a/pkgs/test/cc-wrapper/default.nix b/pkgs/test/cc-wrapper/default.nix index 6a0b11a6cc97..3de359d15b4a 100644 --- a/pkgs/test/cc-wrapper/default.nix +++ b/pkgs/test/cc-wrapper/default.nix @@ -3,9 +3,9 @@ let # Sanitizers are not supported on Darwin. # Sanitizer headers aren't available in older libc++ stdenvs due to a bug - sanitizersWorking = (stdenv.buildPlatform == stdenv.hostPlatform) && !stdenv.isDarwin && !stdenv.hostPlatform.isMusl && ( + sanitizersWorking = (stdenv.buildPlatform == stdenv.hostPlatform) && !stdenv.hostPlatform.isDarwin && !stdenv.hostPlatform.isMusl && ( (stdenv.cc.isClang && lib.versionAtLeast (lib.getVersion stdenv.cc.name) "5.0.0") - || (stdenv.cc.isGNU && stdenv.isLinux) + || (stdenv.cc.isGNU && stdenv.hostPlatform.isLinux) ); staticLibc = lib.optionalString (stdenv.hostPlatform.libc == "glibc") "-L ${glibc.static}/lib"; emulator = stdenv.hostPlatform.emulator buildPackages; @@ -57,7 +57,7 @@ in stdenv.mkDerivation { rm cxx-main{,-static,.o} ''} - ${lib.optionalString (stdenv.isDarwin && stdenv.cc.isClang) '' + ${lib.optionalString (stdenv.hostPlatform.isDarwin && stdenv.cc.isClang) '' echo "checking whether compiler can build with CoreFoundation.framework... " >&2 mkdir -p foo/lib $CC -framework CoreFoundation -o core-foundation-check ${./core-foundation-main.c} @@ -65,7 +65,7 @@ in stdenv.mkDerivation { ''} - ${lib.optionalString (!stdenv.isDarwin) '' + ${lib.optionalString (!stdenv.hostPlatform.isDarwin) '' echo "checking whether compiler builds valid static C binaries... " >&2 $CC ${staticLibc} -static -o cc-static ${./cc-main.c} ${emulator} ./cc-static @@ -106,7 +106,7 @@ in stdenv.mkDerivation { echo "checking whether compiler uses NIX_LDFLAGS... " >&2 mkdir -p foo/lib $CC -shared \ - ${lib.optionalString stdenv.isDarwin "-Wl,-install_name,@rpath/libfoo.dylib"} \ + ${lib.optionalString stdenv.hostPlatform.isDarwin "-Wl,-install_name,@rpath/libfoo.dylib"} \ -DVALUE=42 \ -o foo/lib/libfoo${stdenv.hostPlatform.extensions.sharedLibrary} \ ${./foo.c} diff --git a/pkgs/test/default.nix b/pkgs/test/default.nix index 0a9df68ecc95..adb112fd3668 100644 --- a/pkgs/test/default.nix +++ b/pkgs/test/default.nix @@ -167,7 +167,7 @@ with pkgs; makeBinaryWrapper = pkgs.makeBinaryWrapper.override { # Enable sanitizers in the tests only, to avoid the performance cost in regular usage. # The sanitizers cause errors on aarch64-darwin, see https://github.com/NixOS/nixpkgs/pull/150079#issuecomment-994132734 - sanitizers = pkgs.lib.optionals (! (pkgs.stdenv.isDarwin && pkgs.stdenv.isAarch64)) + sanitizers = pkgs.lib.optionals (! (pkgs.stdenv.hostPlatform.isDarwin && pkgs.stdenv.hostPlatform.isAarch64)) [ "undefined" "address" ]; }; }; diff --git a/pkgs/test/make-binary-wrapper/default.nix b/pkgs/test/make-binary-wrapper/default.nix index 0d699900cf6d..29e4272fd672 100644 --- a/pkgs/test/make-binary-wrapper/default.nix +++ b/pkgs/test/make-binary-wrapper/default.nix @@ -60,7 +60,7 @@ let "overlength-strings" "prefix" "suffix" - ] makeGoldenTest // lib.optionalAttrs (! stdenv.isDarwin) { + ] makeGoldenTest // lib.optionalAttrs (! stdenv.hostPlatform.isDarwin) { cross = pkgsCross.${if stdenv.buildPlatform.isAarch64 then "gnu64" else "aarch64-multiplatform"}.callPackage ./cross.nix { }; }; in diff --git a/pkgs/test/release/default.nix b/pkgs/test/release/default.nix index 19ff08b6f9a1..2fdc6d0dc38c 100644 --- a/pkgs/test/release/default.nix +++ b/pkgs/test/release/default.nix @@ -13,7 +13,7 @@ pkgs.runCommand "all-attrs-eval-under-tryEval" { nativeBuildInputs = [ nix pkgs.gitMinimal - ] ++ lib.optional pkgs.stdenv.isLinux pkgs.inotify-tools; + ] ++ lib.optional pkgs.stdenv.hostPlatform.isLinux pkgs.inotify-tools; strictDeps = true; src = with lib.fileset; toSource { diff --git a/pkgs/test/stdenv-inputs/default.nix b/pkgs/test/stdenv-inputs/default.nix index 6a2e441d0191..deb97b822423 100644 --- a/pkgs/test/stdenv-inputs/default.nix +++ b/pkgs/test/stdenv-inputs/default.nix @@ -12,7 +12,7 @@ let chmod +x $out/bin/foo cp ${./foo.c} $out/include/foo.h $CC -shared \ - ${lib.optionalString stdenv.isDarwin "-Wl,-install_name,$out/lib/libfoo.dylib"} \ + ${lib.optionalString stdenv.hostPlatform.isDarwin "-Wl,-install_name,$out/lib/libfoo.dylib"} \ -o $out/lib/libfoo${stdenv.hostPlatform.extensions.sharedLibrary} \ ${./foo.c} ''; @@ -30,7 +30,7 @@ let chmod +x $out/bin/bar cp ${./bar.c} $dev/include/bar.h $CC -shared \ - ${lib.optionalString stdenv.isDarwin "-Wl,-install_name,$dev/lib/libbar.dylib"} \ + ${lib.optionalString stdenv.hostPlatform.isDarwin "-Wl,-install_name,$dev/lib/libbar.dylib"} \ -o $dev/lib/libbar${stdenv.hostPlatform.extensions.sharedLibrary} \ ${./bar.c} ''; diff --git a/pkgs/test/stdenv/default.nix b/pkgs/test/stdenv/default.nix index 6ed430f5da3f..a916e9b65a34 100644 --- a/pkgs/test/stdenv/default.nix +++ b/pkgs/test/stdenv/default.nix @@ -168,7 +168,7 @@ in { # Disable on Darwin due to assumptions with __bootPackages - __attrsFailEvaluation = stdenv.isDarwin; + __attrsFailEvaluation = stdenv.hostPlatform.isDarwin; # tests for hooks in `stdenv.defaultNativeBuildInputs` hooks = lib.recurseIntoAttrs (import ./hooks.nix { stdenv = bootStdenv; pkgs = earlyPkgs; inherit lib; }); diff --git a/pkgs/test/texlive/default.nix b/pkgs/test/texlive/default.nix index c142623233ac..f9e0bc51e3d4 100644 --- a/pkgs/test/texlive/default.nix +++ b/pkgs/test/texlive/default.nix @@ -375,7 +375,7 @@ rec { # 'Error initialising QuantumRenderer: no suitable pipeline found' "tlcockpit" - ] ++ lib.optional stdenv.isDarwin "epspdftk"; # wish shebang is a script, not a binary! + ] ++ lib.optional stdenv.hostPlatform.isDarwin "epspdftk"; # wish shebang is a script, not a binary! # (1) binaries requiring -v shortVersion = [ "devnag" "diadia" "pmxchords" "ptex2pdf" "simpdftex" "ttf2afm" ]; diff --git a/pkgs/tools/X11/inputplug/default.nix b/pkgs/tools/X11/inputplug/default.nix index 5d756844e375..c14ff710d4a7 100644 --- a/pkgs/tools/X11/inputplug/default.nix +++ b/pkgs/tools/X11/inputplug/default.nix @@ -32,7 +32,7 @@ rustPlatform.buildRustPackage rec { license = licenses.mit; platforms = platforms.unix; # `daemon(3)` is deprecated on macOS and `pidfile-rs` needs updating - broken = stdenv.isDarwin; + broken = stdenv.hostPlatform.isDarwin; maintainers = with maintainers; [ jecaro ]; mainProgram = "inputplug"; }; diff --git a/pkgs/tools/X11/xidlehook/default.nix b/pkgs/tools/X11/xidlehook/default.nix index 80407564a2aa..6c7aa89e01d3 100644 --- a/pkgs/tools/X11/xidlehook/default.nix +++ b/pkgs/tools/X11/xidlehook/default.nix @@ -26,13 +26,13 @@ rustPlatform.buildRustPackage rec { cargoHash = "sha256-uroO0PgnCkFRNYAZgdTZWgDDbBqq1ZM+dni/A2Qw9fg="; - buildInputs = [ xorg.libX11 xorg.libXScrnSaver libpulseaudio ] ++ lib.optional stdenv.isDarwin Security; + buildInputs = [ xorg.libX11 xorg.libXScrnSaver libpulseaudio ] ++ lib.optional stdenv.hostPlatform.isDarwin Security; nativeBuildInputs = [ pkg-config patchelf python3 ]; - buildNoDefaultFeatures = !stdenv.isLinux; - buildFeatures = lib.optional (!stdenv.isLinux) "pulse"; + buildNoDefaultFeatures = !stdenv.hostPlatform.isLinux; + buildFeatures = lib.optional (!stdenv.hostPlatform.isLinux) "pulse"; - postFixup = lib.optionalString stdenv.isLinux '' + postFixup = lib.optionalString stdenv.hostPlatform.isLinux '' RPATH="$(patchelf --print-rpath $out/bin/xidlehook)" patchelf --set-rpath "$RPATH:${libpulseaudio}/lib" $out/bin/xidlehook ''; diff --git a/pkgs/tools/X11/xpra/default.nix b/pkgs/tools/X11/xpra/default.nix index 625dde8f825c..fe3f4ba0f4fb 100644 --- a/pkgs/tools/X11/xpra/default.nix +++ b/pkgs/tools/X11/xpra/default.nix @@ -88,7 +88,7 @@ in buildPythonApplication rec { ./fix-122159.patch # https://github.com/NixOS/nixpkgs/issues/122159 ]; - postPatch = lib.optionalString stdenv.isLinux '' + postPatch = lib.optionalString stdenv.hostPlatform.isLinux '' substituteInPlace xpra/platform/posix/features.py \ --replace-fail "/usr/bin/xdg-open" "${xdg-utils}/bin/xdg-open" ''; diff --git a/pkgs/tools/admin/acme-sh/default.nix b/pkgs/tools/admin/acme-sh/default.nix index e7fbb962c831..b0e0d79d27b7 100644 --- a/pkgs/tools/admin/acme-sh/default.nix +++ b/pkgs/tools/admin/acme-sh/default.nix @@ -37,7 +37,7 @@ stdenv.mkDerivation rec { gnused openssl socat - (if stdenv.isLinux then iproute2 else unixtools.netstat) + (if stdenv.hostPlatform.isLinux then iproute2 else unixtools.netstat) ]; in '' diff --git a/pkgs/tools/admin/balena-cli/default.nix b/pkgs/tools/admin/balena-cli/default.nix index 936cfaec1e98..ed945be9fc7f 100644 --- a/pkgs/tools/admin/balena-cli/default.nix +++ b/pkgs/tools/admin/balena-cli/default.nix @@ -15,7 +15,7 @@ let # Fix for: https://github.com/NixOS/nixpkgs/issues/272156 buildNpmPackage' = buildNpmPackage.override { - stdenv = if stdenv.isDarwin then overrideSDK stdenv "11.0" else stdenv; + stdenv = if stdenv.hostPlatform.isDarwin then overrideSDK stdenv "11.0" else stdenv; }; in buildNpmPackage' rec { pname = "balena-cli"; @@ -38,13 +38,13 @@ in buildNpmPackage' rec { nativeBuildInputs = [ node-gyp python3 - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ cctools ]; - buildInputs = lib.optionals stdenv.isLinux [ + buildInputs = lib.optionals stdenv.hostPlatform.isLinux [ udev - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.Foundation darwin.apple_sdk.frameworks.Cocoa ]; diff --git a/pkgs/tools/admin/coldsnap/default.nix b/pkgs/tools/admin/coldsnap/default.nix index b2825ce7d5a8..23360dc7f726 100644 --- a/pkgs/tools/admin/coldsnap/default.nix +++ b/pkgs/tools/admin/coldsnap/default.nix @@ -19,7 +19,7 @@ rustPlatform.buildRustPackage rec { }; cargoHash = "sha256-ngkoxybl52zTH4wo+sIUtU8vtzOAp+jU1RyTO2KbCgU="; - buildInputs = [ openssl ] ++ lib.optionals stdenv.isDarwin [ Security ]; + buildInputs = [ openssl ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ Security ]; nativeBuildInputs = [ pkg-config ]; meta = with lib; { diff --git a/pkgs/tools/admin/docker-credential-helpers/default.nix b/pkgs/tools/admin/docker-credential-helpers/default.nix index f9e90afb272a..54de6d17e36e 100644 --- a/pkgs/tools/admin/docker-credential-helpers/default.nix +++ b/pkgs/tools/admin/docker-credential-helpers/default.nix @@ -13,9 +13,9 @@ buildGoModule rec { vendorHash = null; - nativeBuildInputs = lib.optionals stdenv.isLinux [ pkg-config ]; + nativeBuildInputs = lib.optionals stdenv.hostPlatform.isLinux [ pkg-config ]; - buildInputs = lib.optionals stdenv.isLinux [ libsecret ]; + buildInputs = lib.optionals stdenv.hostPlatform.isLinux [ libsecret ]; ldflags = [ "-s" @@ -25,7 +25,7 @@ buildGoModule rec { buildPhase = let - cmds = if stdenv.isDarwin then [ "osxkeychain" "pass" ] else [ "secretservice" "pass" ]; + cmds = if stdenv.hostPlatform.isDarwin then [ "osxkeychain" "pass" ] else [ "secretservice" "pass" ]; in '' for cmd in ${builtins.toString cmds}; do @@ -47,7 +47,7 @@ buildGoModule rec { homepage = "https://github.com/docker/docker-credential-helpers"; license = licenses.mit; maintainers = [ ]; - } // lib.optionalAttrs stdenv.isDarwin { + } // lib.optionalAttrs stdenv.hostPlatform.isDarwin { mainProgram = "docker-credential-osxkeychain"; }; } diff --git a/pkgs/tools/admin/google-cloud-sdk/components.nix b/pkgs/tools/admin/google-cloud-sdk/components.nix index f63b5049e201..c337112762b6 100644 --- a/pkgs/tools/admin/google-cloud-sdk/components.nix +++ b/pkgs/tools/admin/google-cloud-sdk/components.nix @@ -164,7 +164,7 @@ let nativeBuildInputs = [ python3 stdenv.cc.cc - ] ++ lib.optionals stdenv.isLinux [ + ] ++ lib.optionals stdenv.hostPlatform.isLinux [ autoPatchelfHook ]; buildInputs = [ diff --git a/pkgs/tools/admin/gtk-vnc/default.nix b/pkgs/tools/admin/gtk-vnc/default.nix index 704bdf84e07c..6ffed3604c64 100644 --- a/pkgs/tools/admin/gtk-vnc/default.nix +++ b/pkgs/tools/admin/gtk-vnc/default.nix @@ -9,7 +9,7 @@ , glib , pkg-config , cyrus_sasl -, pulseaudioSupport ? stdenv.isLinux +, pulseaudioSupport ? stdenv.hostPlatform.isLinux , libpulseaudio , libgcrypt , gtk3 diff --git a/pkgs/tools/admin/netbox2netshot/default.nix b/pkgs/tools/admin/netbox2netshot/default.nix index 82f2825bcdea..0b5e1ed73793 100644 --- a/pkgs/tools/admin/netbox2netshot/default.nix +++ b/pkgs/tools/admin/netbox2netshot/default.nix @@ -26,7 +26,7 @@ rustPlatform.buildRustPackage rec { buildInputs = [ openssl - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.CoreFoundation darwin.apple_sdk.frameworks.Security ]; diff --git a/pkgs/tools/admin/pgadmin/default.nix b/pkgs/tools/admin/pgadmin/default.nix index 4325040dd683..37725ad4b9d0 100644 --- a/pkgs/tools/admin/pgadmin/default.nix +++ b/pkgs/tools/admin/pgadmin/default.nix @@ -39,7 +39,7 @@ let # skip tests on macOS which fail due to an error in keyring, see https://github.com/NixOS/nixpkgs/issues/281214 skippedTests = builtins.concatStringsSep "," ( [ "browser.tests.test_kerberos_with_mocking" ] - ++ lib.optionals stdenv.isDarwin [ + ++ lib.optionals stdenv.hostPlatform.isDarwin [ "browser.server_groups.servers.tests.test_all_server_get" "browser.server_groups.servers.tests.test_check_connect" "browser.server_groups.servers.tests.test_check_ssh_mock_connect" diff --git a/pkgs/tools/admin/procs/default.nix b/pkgs/tools/admin/procs/default.nix index d4071186f988..4e574e407e2e 100644 --- a/pkgs/tools/admin/procs/default.nix +++ b/pkgs/tools/admin/procs/default.nix @@ -14,7 +14,7 @@ rustPlatform.buildRustPackage rec { cargoHash = "sha256-EifER0wt2Nw7WrlVwc49tZHH/av4OkzTPYSzl9mVJI8="; nativeBuildInputs = [ installShellFiles ] - ++ lib.optionals stdenv.isDarwin [ rustPlatform.bindgenHook ]; + ++ lib.optionals stdenv.hostPlatform.isDarwin [ rustPlatform.bindgenHook ]; postInstall = '' for shell in bash fish zsh; do @@ -23,7 +23,7 @@ rustPlatform.buildRustPackage rec { installShellCompletion procs.{bash,fish} --zsh _procs ''; - buildInputs = lib.optionals stdenv.isDarwin [ Security libiconv Libsystem ]; + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ Security libiconv Libsystem ]; meta = with lib; { description = "Modern replacement for ps written in Rust"; diff --git a/pkgs/tools/admin/pulumi-bin/default.nix b/pkgs/tools/admin/pulumi-bin/default.nix index 25351db6fd3f..ec61e5aef2d0 100644 --- a/pkgs/tools/admin/pulumi-bin/default.nix +++ b/pkgs/tools/admin/pulumi-bin/default.nix @@ -14,7 +14,7 @@ in stdenv.mkDerivation { installPhase = '' install -D -t $out/bin/ * - '' + lib.optionalString stdenv.isLinux '' + '' + lib.optionalString stdenv.hostPlatform.isLinux '' wrapProgram $out/bin/pulumi --set LD_LIBRARY_PATH "${stdenv.cc.cc.lib}/lib" '' + '' installShellCompletion --cmd pulumi \ @@ -23,7 +23,7 @@ in stdenv.mkDerivation { --zsh <($out/bin/pulumi completion zsh) ''; - nativeBuildInputs = [ installShellFiles ] ++ lib.optionals stdenv.isLinux [ autoPatchelfHook makeWrapper ]; + nativeBuildInputs = [ installShellFiles ] ++ lib.optionals stdenv.hostPlatform.isLinux [ autoPatchelfHook makeWrapper ]; buildInputs = [ stdenv.cc.cc.libgcc or null ]; meta = with lib; { diff --git a/pkgs/tools/admin/pulumi/default.nix b/pkgs/tools/admin/pulumi/default.nix index 9d715ea7edf9..e79000e70217 100644 --- a/pkgs/tools/admin/pulumi/default.nix +++ b/pkgs/tools/admin/pulumi/default.nix @@ -74,7 +74,7 @@ buildGoModule rec { rm codegen/{docs,dotnet,go,nodejs,python,schema}/*_test.go rm -R codegen/{dotnet,go,nodejs,python}/gen_program_test - '' + lib.optionalString stdenv.isDarwin '' + '' + lib.optionalString stdenv.hostPlatform.isDarwin '' export PULUMI_HOME=$(mktemp -d) ''; diff --git a/pkgs/tools/admin/tigervnc/default.nix b/pkgs/tools/admin/tigervnc/default.nix index e1a10334f45b..c54ce8bfe142 100644 --- a/pkgs/tools/admin/tigervnc/default.nix +++ b/pkgs/tools/admin/tigervnc/default.nix @@ -33,7 +33,7 @@ stdenv.mkDerivation rec { sha256 = "sha256-TgVV/4MRsQHYKpDf9L5eHMLVpdwvNy1KPDIe7xMlQ9o="; }; - postPatch = lib.optionalString stdenv.isLinux '' + postPatch = lib.optionalString stdenv.hostPlatform.isLinux '' sed -i -e '/^\$cmd \.= " -pn";/a$cmd .= " -xkbdir ${xkeyboard_config}/etc/X11/xkb";' unix/vncserver/vncserver.in fontPath= substituteInPlace vncviewer/vncviewer.cxx \ @@ -57,7 +57,7 @@ stdenv.mkDerivation rec { "-Wno-error=array-bounds" ]; - postBuild = lib.optionalString stdenv.isLinux '' + postBuild = lib.optionalString stdenv.hostPlatform.isLinux '' export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -Wno-error=int-to-pointer-cast -Wno-error=pointer-to-int-cast" export CXXFLAGS="$CXXFLAGS -fpermissive" # Build Xvnc @@ -84,11 +84,11 @@ stdenv.mkDerivation rec { --with-xkb-output=$out/share/X11/xkb/compiled make TIGERVNC_SRC=$src TIGERVNC_BUILDDIR=`pwd`/../.. -j$NIX_BUILD_CORES popd - '' + lib.optionalString stdenv.isDarwin '' + '' + lib.optionalString stdenv.hostPlatform.isDarwin '' make dmg ''; - postInstall = lib.optionalString stdenv.isLinux '' + postInstall = lib.optionalString stdenv.hostPlatform.isLinux '' pushd unix/xserver/hw/vnc make TIGERVNC_SRC=$src TIGERVNC_BUILDDIR=`pwd`/../../../.. install popd @@ -96,7 +96,7 @@ stdenv.mkDerivation rec { wrapProgram $out/bin/vncserver \ --prefix PATH : ${lib.makeBinPath (with xorg; [ xterm twm xsetroot xauth ]) } - '' + lib.optionalString stdenv.isDarwin '' + '' + lib.optionalString stdenv.hostPlatform.isDarwin '' mkdir -p $out/Applications mv 'TigerVNC Viewer ${version}.app' $out/Applications/ rm $out/bin/vncviewer @@ -111,7 +111,7 @@ stdenv.mkDerivation rec { libjpeg_turbo pixman gawk - ] ++ lib.optionals stdenv.isLinux (with xorg; [ + ] ++ lib.optionals stdenv.hostPlatform.isLinux (with xorg; [ nettle pam perl @@ -137,7 +137,7 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ cmake gettext - ] ++ lib.optionals stdenv.isLinux (with xorg; [ + ] ++ lib.optionals stdenv.hostPlatform.isLinux (with xorg; [ fontutil libtool makeWrapper @@ -145,7 +145,7 @@ stdenv.mkDerivation rec { zlib ] ++ xorg.xorgserver.nativeBuildInputs); - propagatedBuildInputs = lib.optional stdenv.isLinux xorg.xorgserver.propagatedBuildInputs; + propagatedBuildInputs = lib.optional stdenv.hostPlatform.isLinux xorg.xorgserver.propagatedBuildInputs; passthru.tests.tigervnc = nixosTests.tigervnc; diff --git a/pkgs/tools/admin/trinsic-cli/default.nix b/pkgs/tools/admin/trinsic-cli/default.nix index 547d3020620a..afa431ecd76f 100644 --- a/pkgs/tools/admin/trinsic-cli/default.nix +++ b/pkgs/tools/admin/trinsic-cli/default.nix @@ -12,7 +12,7 @@ rustPlatform.buildRustPackage rec { cargoVendorDir = "vendor"; doCheck = false; - buildInputs = lib.optionals stdenv.isDarwin [ Security ]; + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ Security ]; meta = with lib; { description = "Trinsic CLI"; diff --git a/pkgs/tools/admin/uacme/default.nix b/pkgs/tools/admin/uacme/default.nix index 6bf1d55e4375..659ca720856b 100644 --- a/pkgs/tools/admin/uacme/default.nix +++ b/pkgs/tools/admin/uacme/default.nix @@ -39,6 +39,6 @@ stdenv.mkDerivation rec { license = licenses.gpl3Plus; maintainers = with maintainers; [ malte-v ]; platforms = platforms.unix; - broken = stdenv.isDarwin; + broken = stdenv.hostPlatform.isDarwin; }; } diff --git a/pkgs/tools/archivers/7zz/default.nix b/pkgs/tools/archivers/7zz/default.nix index 74746fa5f1f3..8a0b1365ee2d 100644 --- a/pkgs/tools/archivers/7zz/default.nix +++ b/pkgs/tools/archivers/7zz/default.nix @@ -4,7 +4,7 @@ # Only used for Linux's x86/x86_64 , uasm -, useUasm ? (stdenv.isLinux && stdenv.hostPlatform.isx86) +, useUasm ? (stdenv.hostPlatform.isLinux && stdenv.hostPlatform.isx86) # RAR code is under non-free unRAR license # see the meta.license section below for more details @@ -52,7 +52,7 @@ stdenv.mkDerivation (finalAttrs: { --replace windres.exe ${stdenv.cc.targetPrefix}windres ''; - env.NIX_CFLAGS_COMPILE = toString (lib.optionals stdenv.isDarwin [ + env.NIX_CFLAGS_COMPILE = toString (lib.optionals stdenv.hostPlatform.isDarwin [ "-Wno-deprecated-copy-dtor" ] ++ lib.optionals stdenv.hostPlatform.isMinGW [ "-Wno-conversion" @@ -80,7 +80,7 @@ stdenv.mkDerivation (finalAttrs: { # We need at minimum 10.13 here because of utimensat, however since # we need a bump anyway, let's set the same minimum version as the one in # aarch64-darwin so we don't need additional changes for it - ++ lib.optionals stdenv.isDarwin [ "MACOSX_DEPLOYMENT_TARGET=10.16" ] + ++ lib.optionals stdenv.hostPlatform.isDarwin [ "MACOSX_DEPLOYMENT_TARGET=10.16" ] # it's the compression code with the restriction, see DOC/License.txt ++ lib.optionals (!enableUnfree) [ "DISABLE_RAR_COMPRESS=true" ] ++ lib.optionals (stdenv.hostPlatform.isMinGW) [ "IS_MINGW=1" "MSYSTEM=1" ]; diff --git a/pkgs/tools/archivers/arc_unpacker/default.nix b/pkgs/tools/archivers/arc_unpacker/default.nix index 057efacdbe76..24a1d01b64da 100644 --- a/pkgs/tools/archivers/arc_unpacker/default.nix +++ b/pkgs/tools/archivers/arc_unpacker/default.nix @@ -82,7 +82,7 @@ stdenv.mkDerivation { ''; # A few tests fail on aarch64-linux - doCheck = !(stdenv.isLinux && stdenv.isAarch64); + doCheck = !(stdenv.hostPlatform.isLinux && stdenv.hostPlatform.isAarch64); meta = with lib; { description = "Tool to extract files from visual novel archives"; @@ -93,6 +93,6 @@ stdenv.mkDerivation { mainProgram = "arc_unpacker"; # unit test failures - broken = stdenv.isDarwin && stdenv.isAarch64; + broken = stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isAarch64; }; } diff --git a/pkgs/tools/archivers/arj/default.nix b/pkgs/tools/archivers/arj/default.nix index 6f365e226e20..5ec946788d92 100644 --- a/pkgs/tools/archivers/arj/default.nix +++ b/pkgs/tools/archivers/arj/default.nix @@ -128,7 +128,7 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ autoreconfHook ]; - postPatch = lib.optionalString stdenv.isDarwin '' + postPatch = lib.optionalString stdenv.hostPlatform.isDarwin '' substituteInPlace environ.c \ --replace " #include " " #include " ''; diff --git a/pkgs/tools/archivers/cpio/default.nix b/pkgs/tools/archivers/cpio/default.nix index 04c0300944eb..ba178fb3eb7e 100644 --- a/pkgs/tools/archivers/cpio/default.nix +++ b/pkgs/tools/archivers/cpio/default.nix @@ -23,7 +23,7 @@ stdenv.mkDerivation rec { separateDebugInfo = true; - preConfigure = lib.optionalString stdenv.isCygwin '' + preConfigure = lib.optionalString stdenv.hostPlatform.isCygwin '' sed -i gnu/fpending.h -e 's,include ,,' ''; diff --git a/pkgs/tools/archivers/gbl/default.nix b/pkgs/tools/archivers/gbl/default.nix index f025a0c578c1..6bbc31a6b1c6 100644 --- a/pkgs/tools/archivers/gbl/default.nix +++ b/pkgs/tools/archivers/gbl/default.nix @@ -38,7 +38,7 @@ rustPlatform.buildRustPackage rec { cargoHash = "sha256-CeGLSseKUe2XudRqZm5Y7o7ZLDtDBg/MFunOGqxFZGM="; nativeBuildInputs = [ pkg-config ]; - buildInputs = [ openssl ] ++ lib.optionals stdenv.isDarwin [ Security ]; + buildInputs = [ openssl ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ Security ]; passthru.tests.version = testers.testVersion { package = gbl; }; diff --git a/pkgs/tools/archivers/gnutar/default.nix b/pkgs/tools/archivers/gnutar/default.nix index 723c6b75ca9f..f9b5415b4f8e 100644 --- a/pkgs/tools/archivers/gnutar/default.nix +++ b/pkgs/tools/archivers/gnutar/default.nix @@ -18,7 +18,7 @@ stdenv.mkDerivation rec { }; # avoid retaining reference to CF during stdenv bootstrap - configureFlags = lib.optionals stdenv.isDarwin [ + configureFlags = lib.optionals stdenv.hostPlatform.isDarwin [ "gt_cv_func_CFPreferencesCopyAppValue=no" "gt_cv_func_CFLocaleCopyCurrent=no" "gt_cv_func_CFLocaleCopyPreferredLanguages=no" @@ -27,26 +27,26 @@ stdenv.mkDerivation rec { # gnutar tries to call into gettext between `fork` and `exec`, # which is not safe on darwin. # see http://article.gmane.org/gmane.os.macosx.fink.devel/21882 - postPatch = lib.optionalString stdenv.isDarwin '' + postPatch = lib.optionalString stdenv.hostPlatform.isDarwin '' substituteInPlace src/system.c --replace '_(' 'N_(' ''; outputs = [ "out" "info" ]; - nativeBuildInputs = lib.optional stdenv.isDarwin autoreconfHook - ++ lib.optional (!stdenv.isDarwin) updateAutotoolsGnuConfigScriptsHook; + nativeBuildInputs = lib.optional stdenv.hostPlatform.isDarwin autoreconfHook + ++ lib.optional (!stdenv.hostPlatform.isDarwin) updateAutotoolsGnuConfigScriptsHook; # Add libintl on Darwin specifically as it fails to link (or skip) # NLS on it's own: # "_libintl_textdomain", referenced from: # _main in tar.o # ld: symbol(s) not found for architecture x86_64 - buildInputs = lib.optional aclSupport acl ++ lib.optional stdenv.isDarwin libintl; + buildInputs = lib.optional aclSupport acl ++ lib.optional stdenv.hostPlatform.isDarwin libintl; # May have some issues with root compilation because the bootstrap tool # cannot be used as a login shell for now. - FORCE_UNSAFE_CONFIGURE = lib.optionalString (stdenv.hostPlatform.system == "armv7l-linux" || stdenv.isSunOS) "1"; + FORCE_UNSAFE_CONFIGURE = lib.optionalString (stdenv.hostPlatform.system == "armv7l-linux" || stdenv.hostPlatform.isSunOS) "1"; - preConfigure = if stdenv.isCygwin then '' + preConfigure = if stdenv.hostPlatform.isCygwin then '' sed -i gnu/fpending.h -e 's,include ,,' '' else null; diff --git a/pkgs/tools/archivers/innoextract/default.nix b/pkgs/tools/archivers/innoextract/default.nix index 1219c48ab7d2..e2e3ddcdc3e7 100644 --- a/pkgs/tools/archivers/innoextract/default.nix +++ b/pkgs/tools/archivers/innoextract/default.nix @@ -20,7 +20,7 @@ stdenv.mkDerivation rec { }; buildInputs = [ xz boost ] - ++ lib.optionals stdenv.isDarwin [ libiconv ]; + ++ lib.optionals stdenv.hostPlatform.isDarwin [ libiconv ]; # Python is reported as missing during the build, however # including Python does not change the output. diff --git a/pkgs/tools/archivers/p7zip/default.nix b/pkgs/tools/archivers/p7zip/default.nix index 3ced84bed025..e77904e120d6 100644 --- a/pkgs/tools/archivers/p7zip/default.nix +++ b/pkgs/tools/archivers/p7zip/default.nix @@ -40,7 +40,7 @@ stdenv.mkDerivation (finalAttrs: { preConfigure = '' buildFlags=all3 - '' + lib.optionalString stdenv.isDarwin '' + '' + lib.optionalString stdenv.hostPlatform.isDarwin '' cp makefile.macosx_llvm_64bits makefile.machine ''; diff --git a/pkgs/tools/archivers/pax/default.nix b/pkgs/tools/archivers/pax/default.nix index feacf73fe87b..42668a4d1d68 100644 --- a/pkgs/tools/archivers/pax/default.nix +++ b/pkgs/tools/archivers/pax/default.nix @@ -9,7 +9,7 @@ stdenv.mkDerivation rec { sha256 = "1p18nxijh323f4i1s2pg7pcr0557xljl5avv8ll5s9nfr34r5j0w"; }; - buildInputs = lib.optional stdenv.isDarwin utmp + buildInputs = lib.optional stdenv.hostPlatform.isDarwin utmp ++ lib.optional stdenv.hostPlatform.isMusl musl-fts; NIX_LDFLAGS = lib.optionalString stdenv.hostPlatform.isMusl "-lfts"; diff --git a/pkgs/tools/archivers/rar/default.nix b/pkgs/tools/archivers/rar/default.nix index cd78e11e80bb..fe378514adea 100644 --- a/pkgs/tools/archivers/rar/default.nix +++ b/pkgs/tools/archivers/rar/default.nix @@ -41,10 +41,10 @@ stdenv.mkDerivation { dontBuild = true; - buildInputs = lib.optionals stdenv.isLinux [ stdenv.cc.cc.lib ]; + buildInputs = lib.optionals stdenv.hostPlatform.isLinux [ stdenv.cc.cc.lib ]; nativeBuildInputs = [ installShellFiles ] - ++ lib.optionals stdenv.isLinux [ autoPatchelfHook ]; + ++ lib.optionals stdenv.hostPlatform.isLinux [ autoPatchelfHook ]; installPhase = '' runHook preInstall diff --git a/pkgs/tools/archivers/unar/default.nix b/pkgs/tools/archivers/unar/default.nix index 44a5d4d1192d..96090b88f6b2 100644 --- a/pkgs/tools/archivers/unar/default.nix +++ b/pkgs/tools/archivers/unar/default.nix @@ -26,7 +26,7 @@ stdenv.mkDerivation rec { }; postPatch = - if stdenv.isDarwin then '' + if stdenv.hostPlatform.isDarwin then '' substituteInPlace "./XADMaster.xcodeproj/project.pbxproj" \ --replace "libstdc++.6.dylib" "libc++.1.dylib" '' else '' @@ -43,21 +43,21 @@ stdenv.mkDerivation rec { ''; buildInputs = [ bzip2 icu openssl wavpack zlib ] ++ - lib.optionals stdenv.isLinux [ gnustep.base ] ++ - lib.optionals stdenv.isDarwin [ Foundation AppKit ]; + lib.optionals stdenv.hostPlatform.isLinux [ gnustep.base ] ++ + lib.optionals stdenv.hostPlatform.isDarwin [ Foundation AppKit ]; nativeBuildInputs = [ installShellFiles ] ++ - lib.optionals stdenv.isLinux [ gnustep.make ] ++ - lib.optionals stdenv.isDarwin [ xcbuildHook ]; + lib.optionals stdenv.hostPlatform.isLinux [ gnustep.make ] ++ + lib.optionals stdenv.hostPlatform.isDarwin [ xcbuildHook ]; - xcbuildFlags = lib.optionals stdenv.isDarwin [ + xcbuildFlags = lib.optionals stdenv.hostPlatform.isDarwin [ "-target unar" "-target lsar" "-configuration Release" "MACOSX_DEPLOYMENT_TARGET=${stdenv.hostPlatform.darwinMinVersion}" ]; - makefile = lib.optionalString (!stdenv.isDarwin) "Makefile.linux"; + makefile = lib.optionalString (!stdenv.hostPlatform.isDarwin) "Makefile.linux"; enableParallelBuilding = true; @@ -68,7 +68,7 @@ stdenv.mkDerivation rec { installPhase = '' runHook preInstall - install -Dm555 -t $out/bin ${lib.optionalString stdenv.isDarwin "Products/Release/"}{lsar,unar} + install -Dm555 -t $out/bin ${lib.optionalString stdenv.hostPlatform.isDarwin "Products/Release/"}{lsar,unar} for f in lsar unar; do installManPage ./Extra/$f.? installShellCompletion --bash --name $f ./Extra/$f.bash_completion diff --git a/pkgs/tools/archivers/unzip/default.nix b/pkgs/tools/archivers/unzip/default.nix index ae9a129c766f..2b353598a328 100644 --- a/pkgs/tools/archivers/unzip/default.nix +++ b/pkgs/tools/archivers/unzip/default.nix @@ -85,7 +85,7 @@ stdenv.mkDerivation rec { ] # `lchmod` is not available on Linux, so we remove it to fix "not supported" errors (when the zip file contains symlinks). # Alpine (musl) and Debian (glibc) also add this flag. - ++ lib.optionals stdenv.isLinux [ "LOCAL_UNZIP=-DNO_LCHMOD" ]; + ++ lib.optionals stdenv.hostPlatform.isLinux [ "LOCAL_UNZIP=-DNO_LCHMOD" ]; preConfigure = '' sed -i -e 's@CF="-O3 -Wall -I. -DASM_CRC $(LOC)"@CF="-O3 -Wall -I. -DASM_CRC -DLARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 $(LOC)"@' unix/Makefile diff --git a/pkgs/tools/archivers/wimlib/default.nix b/pkgs/tools/archivers/wimlib/default.nix index 6aa2c95fa140..18013b39015e 100644 --- a/pkgs/tools/archivers/wimlib/default.nix +++ b/pkgs/tools/archivers/wimlib/default.nix @@ -13,7 +13,7 @@ stdenv.mkDerivation rec { pname = "wimlib"; nativeBuildInputs = [ pkg-config makeWrapper ]; - buildInputs = [ ntfs3g ] ++ lib.optionals (!stdenv.isDarwin) [ fuse3 ]; + buildInputs = [ ntfs3g ] ++ lib.optionals (!stdenv.hostPlatform.isDarwin) [ fuse3 ]; src = fetchurl { url = "https://wimlib.net/downloads/${pname}-${version}.tar.gz"; @@ -22,20 +22,20 @@ stdenv.mkDerivation rec { enableParallelBuilding = true; - preBuild = lib.optionalString (!stdenv.isDarwin) '' + preBuild = lib.optionalString (!stdenv.hostPlatform.isDarwin) '' substituteInPlace programs/mkwinpeimg.in \ --replace '/usr/lib/syslinux' "${syslinux}/share/syslinux" ''; postInstall = let - path = lib.makeBinPath ([ cabextract mtools ntfs3g ] ++ lib.optionals (!stdenv.isDarwin) [ cdrkit syslinux fuse3 ]); + path = lib.makeBinPath ([ cabextract mtools ntfs3g ] ++ lib.optionals (!stdenv.hostPlatform.isDarwin) [ cdrkit syslinux fuse3 ]); in '' for prog in $out/bin/*; do wrapProgram $prog --prefix PATH : $out/bin:${path} done ''; - doCheck = (!stdenv.isDarwin); + doCheck = (!stdenv.hostPlatform.isDarwin); preCheck = '' patchShebangs tests diff --git a/pkgs/tools/archivers/xarchiver/default.nix b/pkgs/tools/archivers/xarchiver/default.nix index c41a6010ef6f..a1604f707846 100644 --- a/pkgs/tools/archivers/xarchiver/default.nix +++ b/pkgs/tools/archivers/xarchiver/default.nix @@ -21,7 +21,7 @@ stdenv.mkDerivation rec { ''; meta = { - broken = stdenv.isDarwin; + broken = stdenv.hostPlatform.isDarwin; description = "GTK frontend to 7z,zip,rar,tar,bzip2, gzip,arj, lha, rpm and deb (open and extract only)"; homepage = "https://github.com/ib/xarchiver"; maintainers = [ lib.maintainers.domenkozar ]; diff --git a/pkgs/tools/archivers/zip/default.nix b/pkgs/tools/archivers/zip/default.nix index a192b3878504..2c225489a346 100644 --- a/pkgs/tools/archivers/zip/default.nix +++ b/pkgs/tools/archivers/zip/default.nix @@ -20,7 +20,7 @@ stdenv.mkDerivation rec { hardeningDisable = [ "format" ]; makefile = "unix/Makefile"; - buildFlags = if stdenv.isCygwin then [ "cygwin" ] else [ "generic" ]; + buildFlags = if stdenv.hostPlatform.isCygwin then [ "cygwin" ] else [ "generic" ]; installFlags = [ "prefix=${placeholder "out"}" "INSTALL=cp" @@ -38,10 +38,10 @@ stdenv.mkDerivation rec { ./buffer-overflow-on-utf8-rh-bug-2165653.patch # Fixes forward declaration errors with timezone.c ./fix-time.h-not-included.patch - ] ++ lib.optionals (enableNLS && !stdenv.isCygwin) [ ./natspec-gentoo.patch.bz2 ]; + ] ++ lib.optionals (enableNLS && !stdenv.hostPlatform.isCygwin) [ ./natspec-gentoo.patch.bz2 ]; buildInputs = lib.optional enableNLS libnatspec - ++ lib.optional stdenv.isCygwin libiconv; + ++ lib.optional stdenv.hostPlatform.isCygwin libiconv; meta = with lib; { description = "Compressor/archiver for creating and modifying zipfiles"; diff --git a/pkgs/tools/archivers/zpaq/default.nix b/pkgs/tools/archivers/zpaq/default.nix index 6a03b825e902..791c4fd14f3a 100644 --- a/pkgs/tools/archivers/zpaq/default.nix +++ b/pkgs/tools/archivers/zpaq/default.nix @@ -14,7 +14,7 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ perl /* for pod2man */ ]; CPPFLAGS = [ "-Dunix" ] ++ - lib.optional (!stdenv.isi686 && !stdenv.isx86_64) "-DNOJIT"; + lib.optional (!stdenv.hostPlatform.isi686 && !stdenv.hostPlatform.isx86_64) "-DNOJIT"; CXXFLAGS = [ "-O3" "-DNDEBUG" ]; enableParallelBuilding = true; diff --git a/pkgs/tools/audio/dl-librescore/default.nix b/pkgs/tools/audio/dl-librescore/default.nix index 78a2b80a0cc7..147ef1094ef2 100644 --- a/pkgs/tools/audio/dl-librescore/default.nix +++ b/pkgs/tools/audio/dl-librescore/default.nix @@ -30,7 +30,7 @@ buildNpmPackage rec { nativeBuildInputs = [ python3 - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ cctools ]; diff --git a/pkgs/tools/audio/kaldi/default.nix b/pkgs/tools/audio/kaldi/default.nix index 5b7242364834..b1daf3aa13e6 100644 --- a/pkgs/tools/audio/kaldi/default.nix +++ b/pkgs/tools/audio/kaldi/default.nix @@ -39,7 +39,7 @@ stdenv.mkDerivation (finalAttrs: { buildInputs = [ openblas icu - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ Accelerate ]; diff --git a/pkgs/tools/audio/mpd-discord-rpc/default.nix b/pkgs/tools/audio/mpd-discord-rpc/default.nix index 1da562085158..1dada2fcfc3f 100644 --- a/pkgs/tools/audio/mpd-discord-rpc/default.nix +++ b/pkgs/tools/audio/mpd-discord-rpc/default.nix @@ -26,7 +26,7 @@ rustPlatform.buildRustPackage rec { buildInputs = [ openssl - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.Security darwin.apple_sdk.frameworks.SystemConfiguration ]; diff --git a/pkgs/tools/audio/mpdcron/default.nix b/pkgs/tools/audio/mpdcron/default.nix index c2e93d592f4c..3ced3d5d1382 100644 --- a/pkgs/tools/audio/mpdcron/default.nix +++ b/pkgs/tools/audio/mpdcron/default.nix @@ -56,7 +56,7 @@ in stdenv.mkDerivation { license = licenses.gpl2Plus; platforms = platforms.unix; maintainers = with maintainers; [ lovek323 manveru ]; - broken = stdenv.isDarwin; # fails due to old nokogiri https://github.com/sparklemotion/nokogiri/discussions/3152#discussioncomment-8806607 + broken = stdenv.hostPlatform.isDarwin; # fails due to old nokogiri https://github.com/sparklemotion/nokogiri/discussions/3152#discussioncomment-8806607 }; } # TODO: autoreconfHook this diff --git a/pkgs/tools/audio/mpris-scrobbler/default.nix b/pkgs/tools/audio/mpris-scrobbler/default.nix index 859cc9dd6df9..4628ad4910d1 100644 --- a/pkgs/tools/audio/mpris-scrobbler/default.nix +++ b/pkgs/tools/audio/mpris-scrobbler/default.nix @@ -28,7 +28,7 @@ stdenv.mkDerivation rec { postPatch = '' substituteInPlace src/signon.c \ --replace "/usr/bin/xdg-open" "${xdg-utils}/bin/xdg-open" - '' + lib.optionalString stdenv.isDarwin '' + '' + lib.optionalString stdenv.hostPlatform.isDarwin '' substituteInPlace meson.build \ --replace "-Werror=format-truncation=0" "" \ --replace "-Wno-stringop-overflow" "" @@ -56,10 +56,10 @@ stdenv.mkDerivation rec { env.NIX_CFLAGS_COMPILE = toString ([ # Needed with GCC 12 "-Wno-error=address" - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ "-Wno-sometimes-uninitialized" "-Wno-tautological-pointer-compare" - ] ++ lib.optionals stdenv.isLinux [ + ] ++ lib.optionals stdenv.hostPlatform.isLinux [ "-Wno-array-bounds" "-Wno-free-nonheap-object" "-Wno-stringop-truncation" diff --git a/pkgs/tools/audio/openai-whisper-cpp/default.nix b/pkgs/tools/audio/openai-whisper-cpp/default.nix index c74919dbcb0e..931bcb32743b 100644 --- a/pkgs/tools/audio/openai-whisper-cpp/default.nix +++ b/pkgs/tools/audio/openai-whisper-cpp/default.nix @@ -50,7 +50,7 @@ effectiveStdenv.mkDerivation (finalAttrs: { buildInputs = [ SDL2 - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ Accelerate CoreGraphics CoreML @@ -70,7 +70,7 @@ effectiveStdenv.mkDerivation (finalAttrs: { --replace '${cudaOldStr}' '${cudaNewStr}' ''; - env = lib.optionalAttrs stdenv.isDarwin { + env = lib.optionalAttrs stdenv.hostPlatform.isDarwin { WHISPER_COREML = "1"; WHISPER_COREML_ALLOW_FALLBACK = "1"; WHISPER_METAL_EMBED_LIBRARY = "1"; diff --git a/pkgs/tools/backup/awsbck/default.nix b/pkgs/tools/backup/awsbck/default.nix index 8e00b8787c4a..756d7aa1261f 100644 --- a/pkgs/tools/backup/awsbck/default.nix +++ b/pkgs/tools/backup/awsbck/default.nix @@ -18,7 +18,7 @@ rustPlatform.buildRustPackage rec { cargoHash = "sha256-dMXaIFc0e6PMYiQrokQoUc1xAVCccE92WzM2fl7tOBQ="; - buildInputs = lib.optionals stdenv.isDarwin [ Security ]; + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ Security ]; # tests run in CI on the source repo doCheck = false; diff --git a/pkgs/tools/backup/bacula/default.nix b/pkgs/tools/backup/bacula/default.nix index 386775960a73..d21336813008 100644 --- a/pkgs/tools/backup/bacula/default.nix +++ b/pkgs/tools/backup/bacula/default.nix @@ -12,7 +12,7 @@ stdenv.mkDerivation rec { }; # libtool.m4 only matches macOS 10.* - postPatch = lib.optionalString (stdenv.isDarwin && stdenv.isAarch64) '' + postPatch = lib.optionalString (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isAarch64) '' substituteInPlace configure \ --replace "10.*)" "*)" ''; @@ -23,7 +23,7 @@ stdenv.mkDerivation rec { IOKit ] # acl relies on attr, which I can't get to build on darwin - ++ lib.optional (!stdenv.isDarwin) acl; + ++ lib.optional (!stdenv.hostPlatform.isDarwin) acl; configureFlags = [ "--with-sqlite3=${sqlite.dev}" diff --git a/pkgs/tools/backup/borgbackup/default.nix b/pkgs/tools/backup/borgbackup/default.nix index ab43dfbef0ce..e0c148108362 100644 --- a/pkgs/tools/backup/borgbackup/default.nix +++ b/pkgs/tools/backup/borgbackup/default.nix @@ -58,14 +58,14 @@ python.pkgs.buildPythonApplication rec { xxHash zstd openssl - ] ++ lib.optionals stdenv.isLinux [ + ] ++ lib.optionals stdenv.hostPlatform.isLinux [ acl ]; dependencies = with python.pkgs; [ msgpack packaging - (if stdenv.isLinux then pyfuse3 else llfuse) + (if stdenv.hostPlatform.isLinux then pyfuse3 else llfuse) ]; makeWrapperArgs = [ diff --git a/pkgs/tools/backup/burp/default.nix b/pkgs/tools/backup/burp/default.nix index 4684631efe9a..dad8fefced89 100644 --- a/pkgs/tools/backup/burp/default.nix +++ b/pkgs/tools/backup/burp/default.nix @@ -25,7 +25,7 @@ stdenv.mkDerivation rec { # use openssl_legacy due to burp-2.4.0 not supporting file encryption with openssl 3.0 # replace with 'openssl' once burp-3.x has been declared stable and this package upgraded buildInputs = [ librsync ncurses openssl_legacy zlib uthash ] - ++ lib.optional (!stdenv.isDarwin) acl; + ++ lib.optional (!stdenv.hostPlatform.isDarwin) acl; configureFlags = [ "--localstatedir=/var" ]; diff --git a/pkgs/tools/backup/dar/default.nix b/pkgs/tools/backup/dar/default.nix index 56a5a9313911..d3424c4ac0c8 100644 --- a/pkgs/tools/backup/dar/default.nix +++ b/pkgs/tools/backup/dar/default.nix @@ -48,10 +48,10 @@ stdenv.mkDerivation rec { xz zlib zstd - ] ++ lib.optionals stdenv.isLinux [ + ] ++ lib.optionals stdenv.hostPlatform.isLinux [ attr e2fsprogs - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ CoreFoundation ]; diff --git a/pkgs/tools/backup/duplicity/default.nix b/pkgs/tools/backup/duplicity/default.nix index da32f2323343..9411c2e13ea7 100644 --- a/pkgs/tools/backup/duplicity/default.nix +++ b/pkgs/tools/backup/duplicity/default.nix @@ -39,7 +39,7 @@ let self = python3.pkgs.buildPythonApplication rec { # don't try to use gtar on darwin/bsd substituteInPlace testing/functional/test_restart.py \ --replace-fail 'tarcmd = "gtar"' 'tarcmd = "tar"' - '' + lib.optionalString stdenv.isDarwin '' + '' + lib.optionalString stdenv.hostPlatform.isDarwin '' # tests try to access these files in the sandbox, but can't deal with EPERM substituteInPlace testing/unit/test_globmatch.py \ --replace-fail /var/log /test/log @@ -50,7 +50,7 @@ let self = python3.pkgs.buildPythonApplication rec { --replace-fail '"/tmp/' 'os.environ.get("TMPDIR")+"/' ''; - disabledTests = lib.optionals stdenv.isDarwin [ + disabledTests = lib.optionals stdenv.hostPlatform.isDarwin [ # uses /tmp/ "testing/unit/test_cli_main.py::CommandlineTest::test_intermixed_args" ]; @@ -91,9 +91,9 @@ let self = python3.pkgs.buildPythonApplication rec { gnutar # Add 'tar' to PATH. librsync # Add 'rdiff' to PATH. par2cmdline # Add 'par2' to PATH. - ] ++ lib.optionals stdenv.isLinux [ + ] ++ lib.optionals stdenv.hostPlatform.isLinux [ util-linux # Add 'setsid' to PATH. - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ getconf ] ++ (with python3.pkgs; [ lockfile @@ -111,7 +111,7 @@ let self = python3.pkgs.buildPythonApplication rec { gnupg ncftp rsync - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ getconf ]); in '' makeWrapperArgsBak=("''${makeWrapperArgs[@]}") diff --git a/pkgs/tools/backup/httrack/qt.nix b/pkgs/tools/backup/httrack/qt.nix index 061c8b2ad6de..d178185229fd 100644 --- a/pkgs/tools/backup/httrack/qt.nix +++ b/pkgs/tools/backup/httrack/qt.nix @@ -29,7 +29,7 @@ mkDerivation rec { ''; meta = with lib; { - broken = stdenv.isDarwin; + broken = stdenv.hostPlatform.isDarwin; description = "Easy-to-use offline browser / website mirroring utility - QT frontend"; mainProgram = "httraqt"; homepage = "http://www.httrack.com"; diff --git a/pkgs/tools/backup/monolith/default.nix b/pkgs/tools/backup/monolith/default.nix index b95ada9574ed..307ca6251ca4 100644 --- a/pkgs/tools/backup/monolith/default.nix +++ b/pkgs/tools/backup/monolith/default.nix @@ -21,9 +21,9 @@ rustPlatform.buildRustPackage rec { cargoHash = "sha256-FeD0+s79orFDUVsb205W0pdXgDI+p1UrH3GIfKwUqDQ="; - nativeBuildInputs = lib.optionals stdenv.isLinux [ pkg-config ]; - buildInputs = lib.optionals stdenv.isLinux [ openssl ] - ++ lib.optionals stdenv.isDarwin [ libiconv Security SystemConfiguration ]; + nativeBuildInputs = lib.optionals stdenv.hostPlatform.isLinux [ pkg-config ]; + buildInputs = lib.optionals stdenv.hostPlatform.isLinux [ openssl ] + ++ lib.optionals stdenv.hostPlatform.isDarwin [ libiconv Security SystemConfiguration ]; checkFlags = [ "--skip=tests::cli" ]; diff --git a/pkgs/tools/backup/rdedup/default.nix b/pkgs/tools/backup/rdedup/default.nix index af62fede4071..fdda197f18c5 100644 --- a/pkgs/tools/backup/rdedup/default.nix +++ b/pkgs/tools/backup/rdedup/default.nix @@ -17,7 +17,7 @@ rustPlatform.buildRustPackage rec { nativeBuildInputs = [ pkg-config rustPlatform.bindgenHook ]; buildInputs = [ openssl libsodium xz ] - ++ (lib.optional stdenv.isDarwin Security); + ++ (lib.optional stdenv.hostPlatform.isDarwin Security); meta = with lib; { description = "Data deduplication with compression and public key encryption"; diff --git a/pkgs/tools/backup/tarsnap/default.nix b/pkgs/tools/backup/tarsnap/default.nix index ad7fc761d843..83d205bb9b50 100644 --- a/pkgs/tools/backup/tarsnap/default.nix +++ b/pkgs/tools/backup/tarsnap/default.nix @@ -31,8 +31,8 @@ stdenv.mkDerivation rec { install -m 444 -D ${zshCompletion} $out/share/zsh/site-functions/_tarsnap ''; - buildInputs = [ openssl zlib ] ++ lib.optional stdenv.isLinux e2fsprogs - ++ lib.optional stdenv.isDarwin bzip2; + buildInputs = [ openssl zlib ] ++ lib.optional stdenv.hostPlatform.isLinux e2fsprogs + ++ lib.optional stdenv.hostPlatform.isDarwin bzip2; meta = { description = "Online backups for the truly paranoid"; diff --git a/pkgs/tools/bluetooth/blueman/default.nix b/pkgs/tools/bluetooth/blueman/default.nix index 572a73be3c88..effde184d1f8 100644 --- a/pkgs/tools/bluetooth/blueman/default.nix +++ b/pkgs/tools/bluetooth/blueman/default.nix @@ -1,7 +1,7 @@ { config, stdenv, lib, fetchurl, intltool, pkg-config, python3Packages, bluez, gtk3 , obex_data_server, xdg-utils, dnsmasq, dhcpcd, iproute2 , adwaita-icon-theme, librsvg, wrapGAppsHook3, gobject-introspection -, networkmanager, withPulseAudio ? config.pulseaudio or stdenv.isLinux, libpulseaudio }: +, networkmanager, withPulseAudio ? config.pulseaudio or stdenv.hostPlatform.isLinux, libpulseaudio }: let pythonPackages = python3Packages; diff --git a/pkgs/tools/cd-dvd/cdrdao/default.nix b/pkgs/tools/cd-dvd/cdrdao/default.nix index 84cad2a5d96d..b4e93adce864 100644 --- a/pkgs/tools/cd-dvd/cdrdao/default.nix +++ b/pkgs/tools/cd-dvd/cdrdao/default.nix @@ -32,7 +32,7 @@ stdenv.mkDerivation (finalAttrs: { libvorbis libmad libao - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ CoreServices IOKit ]; diff --git a/pkgs/tools/cd-dvd/cdrkit/default.nix b/pkgs/tools/cd-dvd/cdrkit/default.nix index ae4a06bb57f2..7fd51d5d254f 100644 --- a/pkgs/tools/cd-dvd/cdrkit/default.nix +++ b/pkgs/tools/cd-dvd/cdrkit/default.nix @@ -11,8 +11,8 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ cmake ]; buildInputs = [ zlib bzip2 perl ] ++ - lib.optionals stdenv.isLinux [ libcap ] ++ - lib.optionals stdenv.isDarwin (with darwin.apple_sdk.frameworks; [ Carbon IOKit iconv ]); + lib.optionals stdenv.hostPlatform.isLinux [ libcap ] ++ + lib.optionals stdenv.hostPlatform.isDarwin (with darwin.apple_sdk.frameworks; [ Carbon IOKit iconv ]); hardeningDisable = [ "format" ]; env.NIX_CFLAGS_COMPILE = toString (lib.optionals stdenv.hostPlatform.isMusl [ @@ -25,7 +25,7 @@ stdenv.mkDerivation rec { # efi-boot-patch extracted from http://arm.koji.fedoraproject.org/koji/rpminfo?rpmID=174244 patches = [ ./include-path.patch ./cdrkit-1.1.9-efi-boot.patch ./cdrkit-1.1.11-fno-common.patch ]; - postPatch = lib.optionalString stdenv.isDarwin '' + postPatch = lib.optionalString stdenv.hostPlatform.isDarwin '' substituteInPlace libusal/scsi-mac-iokit.c \ --replace "IOKit/scsi-commands/SCSITaskLib.h" "IOKit/scsi/SCSITaskLib.h" substituteInPlace genisoimage/sha256.c \ @@ -43,7 +43,7 @@ stdenv.mkDerivation rec { --replace "#define HAVE_RCMD 1" "#undef HAVE_RCMD" ''; - postConfigure = lib.optionalString stdenv.isDarwin '' + postConfigure = lib.optionalString stdenv.hostPlatform.isDarwin '' for f in */CMakeFiles/*.dir/link.txt ; do substituteInPlace "$f" \ --replace "-lrt" "-framework IOKit" diff --git a/pkgs/tools/cd-dvd/cdrtools/default.nix b/pkgs/tools/cd-dvd/cdrtools/default.nix index 053aebecaf41..d264a0f8bdb3 100644 --- a/pkgs/tools/cd-dvd/cdrtools/default.nix +++ b/pkgs/tools/cd-dvd/cdrtools/default.nix @@ -10,7 +10,7 @@ stdenv.mkDerivation rec { }; nativeBuildInputs = [ m4 ]; - buildInputs = if stdenv.isDarwin then [ Carbon IOKit ] else [ acl libcap ]; + buildInputs = if stdenv.hostPlatform.isDarwin then [ Carbon IOKit ] else [ acl libcap ]; postPatch = '' sed "/\.mk3/d" -i libschily/Targets.man diff --git a/pkgs/tools/cd-dvd/dvd+rw-tools/default.nix b/pkgs/tools/cd-dvd/dvd+rw-tools/default.nix index a6b75e14bef7..5b0287efed81 100644 --- a/pkgs/tools/cd-dvd/dvd+rw-tools/default.nix +++ b/pkgs/tools/cd-dvd/dvd+rw-tools/default.nix @@ -32,7 +32,7 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ m4 ]; buildInputs = [ cdrtools ] - ++ lib.optionals stdenv.isDarwin [ IOKit ]; + ++ lib.optionals stdenv.hostPlatform.isDarwin [ IOKit ]; makeFlags = [ "prefix=${placeholder "out"}" @@ -40,7 +40,7 @@ stdenv.mkDerivation rec { "CXX=${stdenv.cc.targetPrefix}c++" ]; - env.NIX_CFLAGS_COMPILE = toString (lib.optionals stdenv.isDarwin [ + env.NIX_CFLAGS_COMPILE = toString (lib.optionals stdenv.hostPlatform.isDarwin [ # error: invalid suffix on literal; C++11 requires a space between literal and identifier "-Wno-reserved-user-defined-literal" # error: non-constant-expression cannot be narrowed from type 'size_t' (aka 'unsigned long') to 'IOByteCount' (aka 'unsigned int') in initializer list diff --git a/pkgs/tools/compression/bzip3/default.nix b/pkgs/tools/compression/bzip3/default.nix index 92ddefdb8662..889f64b52d8b 100644 --- a/pkgs/tools/compression/bzip3/default.nix +++ b/pkgs/tools/compression/bzip3/default.nix @@ -34,7 +34,7 @@ stdenv.mkDerivation (finalAttrs: { configureFlags = [ "--disable-arch-native" - ] ++ lib.optionals stdenv.isDarwin [ "--disable-link-time-optimization" ]; + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ "--disable-link-time-optimization" ]; passthru.tests.pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage; diff --git a/pkgs/tools/compression/imagelol/default.nix b/pkgs/tools/compression/imagelol/default.nix index 89515e31b4d2..9d5cc34b3827 100644 --- a/pkgs/tools/compression/imagelol/default.nix +++ b/pkgs/tools/compression/imagelol/default.nix @@ -45,7 +45,7 @@ stdenv.mkDerivation rec { cp ./ImageLOL $out/bin ''; - cmakeFlags = [ (lib.cmakeFeature "CMAKE_C_FLAGS" "-std=gnu90") ] ++ lib.optional (stdenv.isDarwin && stdenv.isAarch64) "-DPNG_ARM_NEON=off"; + cmakeFlags = [ (lib.cmakeFeature "CMAKE_C_FLAGS" "-std=gnu90") ] ++ lib.optional (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isAarch64) "-DPNG_ARM_NEON=off"; meta = with lib; { homepage = "https://github.com/MCredstoner2004/ImageLOL"; diff --git a/pkgs/tools/compression/lrzip/default.nix b/pkgs/tools/compression/lrzip/default.nix index f485bab4a749..eab035f06204 100644 --- a/pkgs/tools/compression/lrzip/default.nix +++ b/pkgs/tools/compression/lrzip/default.nix @@ -14,7 +14,7 @@ stdenv.mkDerivation rec { sha256 = "sha256-Mb324ojtLV0S10KhL7Vjf3DhSOtCy1pFMTzvLkTnpXM="; }; - postPatch = lib.optionalString stdenv.isDarwin '' + postPatch = lib.optionalString stdenv.hostPlatform.isDarwin '' # Building the ASM/x86 directory creates an empty archive, # which fails on darwin, so remove it # https://github.com/ckolivas/lrzip/issues/193 diff --git a/pkgs/tools/compression/pigz/default.nix b/pkgs/tools/compression/pigz/default.nix index 106b14b81b64..a6eaab1a6ef2 100644 --- a/pkgs/tools/compression/pigz/default.nix +++ b/pkgs/tools/compression/pigz/default.nix @@ -13,11 +13,11 @@ stdenv.mkDerivation rec { enableParallelBuilding = true; - buildInputs = [ zlib ] ++ lib.optional stdenv.isLinux util-linux; + buildInputs = [ zlib ] ++ lib.optional stdenv.hostPlatform.isLinux util-linux; makeFlags = [ "CC=${stdenv.cc}/bin/${stdenv.cc.targetPrefix}cc" ]; - doCheck = stdenv.isLinux; + doCheck = stdenv.hostPlatform.isLinux; checkTarget = "tests"; installPhase = '' runHook preInstall diff --git a/pkgs/tools/compression/zstd/default.nix b/pkgs/tools/compression/zstd/default.nix index ba5fb90c1360..f9d3a3d074c9 100644 --- a/pkgs/tools/compression/zstd/default.nix +++ b/pkgs/tools/compression/zstd/default.nix @@ -31,7 +31,7 @@ stdenv.mkDerivation rec { }; nativeBuildInputs = [ cmake ] - ++ lib.optional stdenv.isDarwin fixDarwinDylibNames; + ++ lib.optional stdenv.hostPlatform.isDarwin fixDarwinDylibNames; buildInputs = lib.optional stdenv.hostPlatform.isUnix bash; patches = [ @@ -46,7 +46,7 @@ stdenv.mkDerivation rec { substituteInPlace build/cmake/tests/CMakeLists.txt \ --replace 'libzstd_static' 'libzstd_shared' sed -i \ - "1aexport ${lib.optionalString stdenv.isDarwin "DY"}LD_LIBRARY_PATH=$PWD/build_/lib" \ + "1aexport ${lib.optionalString stdenv.hostPlatform.isDarwin "DY"}LD_LIBRARY_PATH=$PWD/build_/lib" \ tests/playTests.sh ''; @@ -87,7 +87,7 @@ stdenv.mkDerivation rec { '' + lib.optionalString buildContrib ( '' cp contrib/pzstd/pzstd $bin/bin/pzstd - '' + lib.optionalString stdenv.isDarwin '' + '' + lib.optionalString stdenv.hostPlatform.isDarwin '' install_name_tool -change @rpath/libzstd.1.dylib $out/lib/libzstd.1.dylib $bin/bin/pzstd '' ); diff --git a/pkgs/tools/filesystems/aefs/default.nix b/pkgs/tools/filesystems/aefs/default.nix index af4e20ac55ee..c56a4b189e15 100644 --- a/pkgs/tools/filesystems/aefs/default.nix +++ b/pkgs/tools/filesystems/aefs/default.nix @@ -25,7 +25,7 @@ stdenv.mkDerivation { # # $ tar xf "$(nix-build -A aefs.src)" # $ grep -R FUSE_USE_VERSION - configureFlags = lib.optional stdenv.isDarwin "CPPFLAGS=-DFUSE_USE_VERSION=26"; + configureFlags = lib.optional stdenv.hostPlatform.isDarwin "CPPFLAGS=-DFUSE_USE_VERSION=26"; nativeBuildInputs = [ autoreconfHook git ]; @@ -37,6 +37,6 @@ stdenv.mkDerivation { maintainers = [ ]; license = licenses.gpl2Plus; platforms = platforms.unix; - broken = stdenv.isDarwin; + broken = stdenv.hostPlatform.isDarwin; }; } diff --git a/pkgs/tools/filesystems/android-file-transfer/default.nix b/pkgs/tools/filesystems/android-file-transfer/default.nix index b5fe1a4e85ea..78d60b90b395 100644 --- a/pkgs/tools/filesystems/android-file-transfer/default.nix +++ b/pkgs/tools/filesystems/android-file-transfer/default.nix @@ -26,7 +26,7 @@ mkDerivation rec { nativeBuildInputs = [ cmake readline pkg-config wrapQtAppsHook ]; buildInputs = [ fuse qtbase qttools ]; - postInstall = lib.optionalString stdenv.isDarwin '' + postInstall = lib.optionalString stdenv.hostPlatform.isDarwin '' mkdir $out/Applications mv $out/*.app $out/Applications ''; diff --git a/pkgs/tools/filesystems/apfs-fuse/default.nix b/pkgs/tools/filesystems/apfs-fuse/default.nix index 5881d361c549..88b2c5d3e624 100644 --- a/pkgs/tools/filesystems/apfs-fuse/default.nix +++ b/pkgs/tools/filesystems/apfs-fuse/default.nix @@ -12,7 +12,7 @@ stdenv.mkDerivation { fetchSubmodules = true; }; - postPatch = lib.optionalString stdenv.isDarwin '' + postPatch = lib.optionalString stdenv.hostPlatform.isDarwin '' substituteInPlace CMakeLists.txt \ --replace "/usr/local/lib/libosxfuse.dylib" "fuse" ''; @@ -20,14 +20,14 @@ stdenv.mkDerivation { nativeBuildInputs = [ cmake ]; buildInputs = [ - (if stdenv.isDarwin then fuse else fuse3) + (if stdenv.hostPlatform.isDarwin then fuse else fuse3) bzip2 zlib - ] ++ lib.optional stdenv.isLinux attr; + ] ++ lib.optional stdenv.hostPlatform.isLinux attr; - cmakeFlags = lib.optional stdenv.isDarwin "-DUSE_FUSE3=OFF"; + cmakeFlags = lib.optional stdenv.hostPlatform.isDarwin "-DUSE_FUSE3=OFF"; - env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.isDarwin "-DUSE_FUSE2"; + env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.hostPlatform.isDarwin "-DUSE_FUSE2"; postFixup = '' ln -s $out/bin/apfs-fuse $out/bin/mount.fuse.apfs-fuse diff --git a/pkgs/tools/filesystems/bindfs/default.nix b/pkgs/tools/filesystems/bindfs/default.nix index a8013bd8600b..f086e9416ad6 100644 --- a/pkgs/tools/filesystems/bindfs/default.nix +++ b/pkgs/tools/filesystems/bindfs/default.nix @@ -19,9 +19,9 @@ stdenv.mkDerivation (finalAttrs: { pkg-config ]; - buildInputs = if stdenv.isDarwin then [ fuse ] else [ fuse3 ]; + buildInputs = if stdenv.hostPlatform.isDarwin then [ fuse ] else [ fuse3 ]; - configureFlags = lib.optional stdenv.isDarwin "--disable-macos-fs-link"; + configureFlags = lib.optional stdenv.hostPlatform.isDarwin "--disable-macos-fs-link"; postFixup = '' ln -s $out/bin/bindfs $out/bin/mount.fuse.bindfs diff --git a/pkgs/tools/filesystems/boxfs/default.nix b/pkgs/tools/filesystems/boxfs/default.nix index 04106ee68b31..b12966541c99 100644 --- a/pkgs/tools/filesystems/boxfs/default.nix +++ b/pkgs/tools/filesystems/boxfs/default.nix @@ -43,7 +43,7 @@ in stdenv.mkDerivation { buildFlags = [ "static" "CC=${stdenv.cc.targetPrefix}cc" - ] ++ lib.optional stdenv.isDarwin "CFLAGS=-D_BSD_SOURCE"; + ] ++ lib.optional stdenv.hostPlatform.isDarwin "CFLAGS=-D_BSD_SOURCE"; installPhase = '' mkdir -p $out/bin diff --git a/pkgs/tools/filesystems/ceph/default.nix b/pkgs/tools/filesystems/ceph/default.nix index e4f0bae9b27b..e5beaf3841df 100644 --- a/pkgs/tools/filesystems/ceph/default.nix +++ b/pkgs/tools/filesystems/ceph/default.nix @@ -382,7 +382,7 @@ in rec { utf8proc zlib zstd - ] ++ lib.optionals stdenv.isLinux [ + ] ++ lib.optionals stdenv.hostPlatform.isLinux [ keyutils libcap_ng liburing @@ -457,7 +457,7 @@ in rec { "-DWITH_MGR_DASHBOARD_FRONTEND:BOOL=OFF" # WITH_XFS has been set default ON from Ceph 16, keeping it optional in nixpkgs for now ''-DWITH_XFS=${if optLibxfs != null then "ON" else "OFF"}'' - ] ++ lib.optional stdenv.isLinux "-DWITH_SYSTEM_LIBURING=ON"; + ] ++ lib.optional stdenv.hostPlatform.isLinux "-DWITH_SYSTEM_LIBURING=ON"; preBuild = # The legacy-option-headers target is not correctly empbedded in the build graph. diff --git a/pkgs/tools/filesystems/ceph/old-python-packages/cryptography.nix b/pkgs/tools/filesystems/ceph/old-python-packages/cryptography.nix index 8583cce73dae..4da68dfb751b 100644 --- a/pkgs/tools/filesystems/ceph/old-python-packages/cryptography.nix +++ b/pkgs/tools/filesystems/ceph/old-python-packages/cryptography.nix @@ -81,7 +81,7 @@ buildPythonPackage rec { buildInputs = [ openssl ] - ++ lib.optionals stdenv.isDarwin [ + ++ lib.optionals stdenv.hostPlatform.isDarwin [ Security libiconv ] @@ -107,7 +107,7 @@ buildPythonPackage rec { # save compute time by not running benchmarks "tests/bench" ] - ++ lib.optionals (stdenv.isDarwin && stdenv.isAarch64) [ + ++ lib.optionals (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isAarch64) [ # aarch64-darwin forbids W+X memory, but this tests depends on it: # * https://cffi.readthedocs.io/en/latest/using.html#callbacks "tests/hazmat/backends/test_openssl_memleak.py" diff --git a/pkgs/tools/filesystems/cryfs/default.nix b/pkgs/tools/filesystems/cryfs/default.nix index 588dcb320aa5..52444e56cb05 100644 --- a/pkgs/tools/filesystems/cryfs/default.nix +++ b/pkgs/tools/filesystems/cryfs/default.nix @@ -54,7 +54,7 @@ stdenv.mkDerivation rec { ]; # ++ lib.optional doCheck "-DCMAKE_PREFIX_PATH=${gtest.dev}/lib/cmake"; # macFUSE needs to be installed for the test to succeed on Darwin - doCheck = !stdenv.isDarwin; + doCheck = !stdenv.hostPlatform.isDarwin; checkPhase = '' runHook preCheck diff --git a/pkgs/tools/filesystems/curlftpfs/default.nix b/pkgs/tools/filesystems/curlftpfs/default.nix index 7b3760ba5aa2..06a86a74b523 100644 --- a/pkgs/tools/filesystems/curlftpfs/default.nix +++ b/pkgs/tools/filesystems/curlftpfs/default.nix @@ -21,9 +21,9 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ autoreconfHook pkg-config ]; buildInputs = [ fuse curl glib zlib ]; - CFLAGS = lib.optionalString stdenv.isDarwin "-D__off_t=off_t"; + CFLAGS = lib.optionalString stdenv.hostPlatform.isDarwin "-D__off_t=off_t"; - postPatch = lib.optionalString stdenv.isDarwin '' + postPatch = lib.optionalString stdenv.hostPlatform.isDarwin '' # Fix the build on macOS with macFUSE installed. Needs autoreconfHook for # this change to effect substituteInPlace configure.ac --replace \ diff --git a/pkgs/tools/filesystems/dosfstools/default.nix b/pkgs/tools/filesystems/dosfstools/default.nix index eda54d341f9a..0305e6514640 100644 --- a/pkgs/tools/filesystems/dosfstools/default.nix +++ b/pkgs/tools/filesystems/dosfstools/default.nix @@ -32,7 +32,7 @@ stdenv.mkDerivation rec { ]; nativeBuildInputs = [ autoreconfHook pkg-config ] - ++ lib.optional stdenv.isDarwin libiconv; + ++ lib.optional stdenv.hostPlatform.isDarwin libiconv; # configure.ac:75: error: required file './config.rpath' not found # https://github.com/dosfstools/dosfstools/blob/master/autogen.sh diff --git a/pkgs/tools/filesystems/e2fsprogs/default.nix b/pkgs/tools/filesystems/e2fsprogs/default.nix index b8443e8ac880..4d0849b896d0 100644 --- a/pkgs/tools/filesystems/e2fsprogs/default.nix +++ b/pkgs/tools/filesystems/e2fsprogs/default.nix @@ -1,5 +1,5 @@ { lib, stdenv, buildPackages, fetchurl, fetchpatch, pkg-config, libuuid, gettext, texinfo -, withFuse ? stdenv.isLinux, fuse3 +, withFuse ? stdenv.hostPlatform.isLinux, fuse3 , shared ? !stdenv.hostPlatform.isStatic , e2fsprogs, runCommand }: @@ -43,7 +43,7 @@ stdenv.mkDerivation rec { ]; configureFlags = - if stdenv.isLinux then [ + if stdenv.hostPlatform.isLinux then [ # It seems that the e2fsprogs is one of the few packages that cannot be # build with shared and static libs. (if shared then "--enable-elf-shlibs" else "--disable-elf-shlibs") diff --git a/pkgs/tools/filesystems/erofs-utils/default.nix b/pkgs/tools/filesystems/erofs-utils/default.nix index 3946523ccb10..93e6fd18f984 100644 --- a/pkgs/tools/filesystems/erofs-utils/default.nix +++ b/pkgs/tools/filesystems/erofs-utils/default.nix @@ -10,7 +10,7 @@ xz, zlib, libselinux, - fuseSupport ? stdenv.isLinux, + fuseSupport ? stdenv.hostPlatform.isLinux, selinuxSupport ? false, lzmaSupport ? false, }: diff --git a/pkgs/tools/filesystems/f3/default.nix b/pkgs/tools/filesystems/f3/default.nix index ebdedd5b4aa3..04430fc23ee4 100644 --- a/pkgs/tools/filesystems/f3/default.nix +++ b/pkgs/tools/filesystems/f3/default.nix @@ -26,13 +26,13 @@ stdenv.mkDerivation rec { done ''; - buildInputs = lib.optionals stdenv.isLinux [ systemd parted ] - ++ lib.optionals stdenv.isDarwin [ argp-standalone ]; + buildInputs = lib.optionals stdenv.hostPlatform.isLinux [ systemd parted ] + ++ lib.optionals stdenv.hostPlatform.isDarwin [ argp-standalone ]; buildFlags = [ "all" # f3read, f3write ] - ++ lib.optional stdenv.isLinux "extra"; # f3brew, f3fix, f3probe + ++ lib.optional stdenv.hostPlatform.isLinux "extra"; # f3brew, f3fix, f3probe installFlags = [ "PREFIX=${placeholder "out"}" @@ -41,7 +41,7 @@ stdenv.mkDerivation rec { installTargets = [ "install" ] - ++ lib.optional stdenv.isLinux "install-extra"; + ++ lib.optional stdenv.hostPlatform.isLinux "install-extra"; postInstall = '' install -Dm555 -t $out/bin f3write.h2w log-f3wr diff --git a/pkgs/tools/filesystems/file-rename/default.nix b/pkgs/tools/filesystems/file-rename/default.nix index 8bc7a899cd3b..e2e1eccae216 100644 --- a/pkgs/tools/filesystems/file-rename/default.nix +++ b/pkgs/tools/filesystems/file-rename/default.nix @@ -20,7 +20,7 @@ perlPackages.buildPerlPackage { --replace "#!${perl}/bin/perl" "#!${perl}/bin/perl -I $out/${perl.libPrefix}" ''; - doCheck = !stdenv.isDarwin; + doCheck = !stdenv.hostPlatform.isDarwin; meta = with lib; { description = "Perl extension for renaming multiple files"; diff --git a/pkgs/tools/filesystems/garage/default.nix b/pkgs/tools/filesystems/garage/default.nix index 2430536656dc..34f9da67ae64 100644 --- a/pkgs/tools/filesystems/garage/default.nix +++ b/pkgs/tools/filesystems/garage/default.nix @@ -35,7 +35,7 @@ let buildInputs = [ openssl - ] ++ lib.optional stdenv.isDarwin Security; + ] ++ lib.optional stdenv.hostPlatform.isDarwin Security; checkInputs = [ cacert @@ -99,7 +99,7 @@ rec { hash = "sha256-2QGbR6YvMQeMxN3n1MMJ5qfBcEJ5hjXARUOfEn+m4Jc="; cargoHash = "sha256-1cGlJP/RRgxt3GGMN1c+7Y5lLHJyvHEnpLsR35R5FfI="; cargoPatches = [ ./update-time-0.8.patch ]; - broken = stdenv.isDarwin; + broken = stdenv.hostPlatform.isDarwin; }; garage_0_9_4 = generic { @@ -107,14 +107,14 @@ rec { hash = "sha256-2ZaxenwaVGYYUjUJaGgnGpZNQprQV9+Jns2sXM6cowk="; cargoHash = "sha256-1Hrip4R5dr31czOcFMGW4ZvVfVwvdd7LkwukwNpS3o4="; cargoPatches = [ ./update-time.patch ]; - broken = stdenv.isDarwin; + broken = stdenv.hostPlatform.isDarwin; }; garage_1_0_1 = generic { version = "1.0.1"; hash = "sha256-f6N2asycN04I6U5XQ5LEAqYu/v5jYZiFCxZ8YQ32XyM="; cargoHash = "sha256-jpc/vaygC5WNSkVA3P01mCRk9Nx/CUumE893tHWoe34="; - broken = stdenv.isDarwin; + broken = stdenv.hostPlatform.isDarwin; }; garage_0_8 = garage_0_8_7; diff --git a/pkgs/tools/filesystems/genimage/default.nix b/pkgs/tools/filesystems/genimage/default.nix index 8de22d3efcdf..3e6ae58049bd 100644 --- a/pkgs/tools/filesystems/genimage/default.nix +++ b/pkgs/tools/filesystems/genimage/default.nix @@ -21,7 +21,7 @@ stdenv.mkDerivation rec { ''; meta = with lib; { - broken = stdenv.isDarwin; + broken = stdenv.hostPlatform.isDarwin; homepage = "https://git.pengutronix.de/cgit/genimage"; description = "Generate filesystem images from directory trees"; license = licenses.gpl2Plus; diff --git a/pkgs/tools/filesystems/go-mtpfs/default.nix b/pkgs/tools/filesystems/go-mtpfs/default.nix index 4a1341dce7b0..26655053574e 100644 --- a/pkgs/tools/filesystems/go-mtpfs/default.nix +++ b/pkgs/tools/filesystems/go-mtpfs/default.nix @@ -29,7 +29,7 @@ buildGoModule rec { homepage = "https://github.com/hanwen/go-mtpfs"; license = licenses.bsd3; maintainers = [ ]; - broken = stdenv.isDarwin; + broken = stdenv.hostPlatform.isDarwin; mainProgram = "go-mtpfs"; }; } diff --git a/pkgs/tools/filesystems/goofys/default.nix b/pkgs/tools/filesystems/goofys/default.nix index c8840e0fd3bc..06039d529d56 100644 --- a/pkgs/tools/filesystems/goofys/default.nix +++ b/pkgs/tools/filesystems/goofys/default.nix @@ -30,7 +30,7 @@ buildGoModule { description = "High-performance, POSIX-ish Amazon S3 file system written in Go"; license = [ lib.licenses.mit ]; maintainers = [ lib.maintainers.adisbladis ]; - broken = stdenv.isDarwin; # needs to update gopsutil to at least v3.21.3 to include https://github.com/shirou/gopsutil/pull/1042 + broken = stdenv.hostPlatform.isDarwin; # needs to update gopsutil to at least v3.21.3 to include https://github.com/shirou/gopsutil/pull/1042 mainProgram = "goofys"; }; diff --git a/pkgs/tools/filesystems/moosefs/default.nix b/pkgs/tools/filesystems/moosefs/default.nix index 4f5524d6734c..51066544749b 100644 --- a/pkgs/tools/filesystems/moosefs/default.nix +++ b/pkgs/tools/filesystems/moosefs/default.nix @@ -28,15 +28,15 @@ stdenv.mkDerivation rec { strictDeps = true; - buildFlags = lib.optionals stdenv.isDarwin [ "CPPFLAGS=-UHAVE_STRUCT_STAT_ST_BIRTHTIME" ]; + buildFlags = lib.optionals stdenv.hostPlatform.isDarwin [ "CPPFLAGS=-UHAVE_STRUCT_STAT_ST_BIRTHTIME" ]; # Fix the build on macOS with macFUSE installed - postPatch = lib.optionalString stdenv.isDarwin '' + postPatch = lib.optionalString stdenv.hostPlatform.isDarwin '' substituteInPlace configure --replace \ "/usr/local/lib/pkgconfig" "/nonexistent" ''; - preBuild = lib.optionalString stdenv.isDarwin '' + preBuild = lib.optionalString stdenv.hostPlatform.isDarwin '' substituteInPlace config.h --replace \ "#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1" \ "#undef HAVE_STRUCT_STAT_ST_BIRTHTIME" diff --git a/pkgs/tools/filesystems/mtools/default.nix b/pkgs/tools/filesystems/mtools/default.nix index ef5eafc40508..3e2c75aeb092 100644 --- a/pkgs/tools/filesystems/mtools/default.nix +++ b/pkgs/tools/filesystems/mtools/default.nix @@ -9,12 +9,12 @@ stdenv.mkDerivation rec { hash = "sha256-N9xN8CJTPD1LLsHHiXPCfH6LWFN0wtRqtkxqPbMe3bg="; }; - patches = lib.optional stdenv.isDarwin ./UNUSED-darwin.patch; + patches = lib.optional stdenv.hostPlatform.isDarwin ./UNUSED-darwin.patch; # fails to find X on darwin - configureFlags = lib.optional stdenv.isDarwin "--without-x"; + configureFlags = lib.optional stdenv.hostPlatform.isDarwin "--without-x"; - buildInputs = lib.optional stdenv.isDarwin libiconv; + buildInputs = lib.optional stdenv.hostPlatform.isDarwin libiconv; doCheck = true; diff --git a/pkgs/tools/filesystems/mtpfs/default.nix b/pkgs/tools/filesystems/mtpfs/default.nix index d84f9cc9b9b1..a0ca5e5a82aa 100644 --- a/pkgs/tools/filesystems/mtpfs/default.nix +++ b/pkgs/tools/filesystems/mtpfs/default.nix @@ -18,7 +18,7 @@ stdenv.mkDerivation rec { platforms = platforms.all; license = licenses.gpl3; maintainers = [ maintainers.qknight ]; - broken = stdenv.isDarwin; # never built on Hydra https://hydra.nixos.org/job/nixpkgs/trunk/mtpfs.x86_64-darwin + broken = stdenv.hostPlatform.isDarwin; # never built on Hydra https://hydra.nixos.org/job/nixpkgs/trunk/mtpfs.x86_64-darwin mainProgram = "mtpfs"; }; } diff --git a/pkgs/tools/filesystems/ntfs-3g/default.nix b/pkgs/tools/filesystems/ntfs-3g/default.nix index 56d6bdc7fba2..5a9426cee486 100644 --- a/pkgs/tools/filesystems/ntfs-3g/default.nix +++ b/pkgs/tools/filesystems/ntfs-3g/default.nix @@ -18,7 +18,7 @@ stdenv.mkDerivation rec { buildInputs = [ gettext libuuid ] ++ lib.optionals crypto [ gnutls libgcrypt ] - ++ lib.optionals stdenv.isDarwin [ macfuse-stubs DiskArbitration ]; + ++ lib.optionals stdenv.hostPlatform.isDarwin [ macfuse-stubs DiskArbitration ]; # Note: libgcrypt is listed here non-optionally because its m4 macros are # being used in ntfs-3g's configure.ac. @@ -40,7 +40,7 @@ stdenv.mkDerivation rec { "--enable-extras" "--with-mount-helper=${mount}/bin/mount" "--with-umount-helper=${mount}/bin/umount" - ] ++ lib.optionals stdenv.isLinux [ + ] ++ lib.optionals stdenv.hostPlatform.isLinux [ "--with-modprobe-helper=${kmod}/bin/modprobe" ]; diff --git a/pkgs/tools/filesystems/snapraid/default.nix b/pkgs/tools/filesystems/snapraid/default.nix index 83353394e009..e964f944d3a8 100644 --- a/pkgs/tools/filesystems/snapraid/default.nix +++ b/pkgs/tools/filesystems/snapraid/default.nix @@ -20,7 +20,7 @@ stdenv.mkDerivation rec { VERSION = version; - doCheck = !(stdenv.isDarwin && stdenv.isx86_64); + doCheck = !(stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isx86_64); nativeBuildInputs = [ autoreconfHook @@ -30,7 +30,7 @@ stdenv.mkDerivation rec { buildInputs = [ ]; # SMART is only supported on Linux and requires the smartmontools package - postInstall = lib.optionalString stdenv.isLinux '' + postInstall = lib.optionalString stdenv.hostPlatform.isLinux '' wrapProgram $out/bin/snapraid \ --prefix PATH : ${lib.makeBinPath [ smartmontools ]} ''; diff --git a/pkgs/tools/filesystems/sshfs-fuse/common.nix b/pkgs/tools/filesystems/sshfs-fuse/common.nix index 932c7693dc88..3654c77cc4b8 100644 --- a/pkgs/tools/filesystems/sshfs-fuse/common.nix +++ b/pkgs/tools/filesystems/sshfs-fuse/common.nix @@ -8,7 +8,7 @@ }: let - fuse = if stdenv.isDarwin then macfuse-stubs else fuse3; + fuse = if stdenv.hostPlatform.isDarwin then macfuse-stubs else fuse3; in stdenv.mkDerivation rec { pname = "sshfs-fuse"; inherit version; @@ -33,12 +33,12 @@ in stdenv.mkDerivation rec { postInstall = '' mkdir -p $out/sbin ln -sf $out/bin/sshfs $out/sbin/mount.sshfs - '' + lib.optionalString (!stdenv.isDarwin) '' + '' + lib.optionalString (!stdenv.hostPlatform.isDarwin) '' wrapProgram $out/bin/sshfs --prefix PATH : "${openssh}/bin" ''; # doCheck = true; - checkPhase = lib.optionalString (!stdenv.isDarwin) '' + checkPhase = lib.optionalString (!stdenv.hostPlatform.isDarwin) '' # The tests need fusermount: mkdir bin cp ${fuse}/bin/fusermount3 bin/fusermount diff --git a/pkgs/tools/filesystems/sshfs-fuse/default.nix b/pkgs/tools/filesystems/sshfs-fuse/default.nix index 2f11bb0047ad..bc836ac3abad 100644 --- a/pkgs/tools/filesystems/sshfs-fuse/default.nix +++ b/pkgs/tools/filesystems/sshfs-fuse/default.nix @@ -1,7 +1,7 @@ { lib, stdenv, callPackage, fetchpatch }: let mkSSHFS = args: callPackage (import ./common.nix args) { }; -in if stdenv.isDarwin then +in if stdenv.hostPlatform.isDarwin then mkSSHFS { version = "2.10"; # macFUSE isn't yet compatible with libfuse 3.x sha256 = "1dmw4kx6vyawcywiv8drrajnam0m29mxfswcp4209qafzx3mjlp1"; diff --git a/pkgs/tools/filesystems/svnfs/default.nix b/pkgs/tools/filesystems/svnfs/default.nix index 8aa66de8da3f..2f0e32799d80 100644 --- a/pkgs/tools/filesystems/svnfs/default.nix +++ b/pkgs/tools/filesystems/svnfs/default.nix @@ -20,7 +20,7 @@ stdenv.mkDerivation rec { # # $ tar xf "$(nix-build -A svnfs.src)" # $ grep -R FUSE_USE_VERSION - configureFlags = lib.optionals stdenv.isDarwin [ "CFLAGS=-DFUSE_USE_VERSION=25" ]; + configureFlags = lib.optionals stdenv.hostPlatform.isDarwin [ "CFLAGS=-DFUSE_USE_VERSION=25" ]; # why is this required? preConfigure='' diff --git a/pkgs/tools/filesystems/unionfs-fuse/default.nix b/pkgs/tools/filesystems/unionfs-fuse/default.nix index 4dc9ca9de6e6..2518cfb24ba3 100644 --- a/pkgs/tools/filesystems/unionfs-fuse/default.nix +++ b/pkgs/tools/filesystems/unionfs-fuse/default.nix @@ -19,7 +19,7 @@ stdenv.mkDerivation rec { ./prevent-kill-on-shutdown.patch ]; - postPatch = lib.optionalString stdenv.isDarwin '' + postPatch = lib.optionalString stdenv.hostPlatform.isDarwin '' substituteInPlace CMakeLists.txt \ --replace '/usr/local/include/osxfuse/fuse' '${fuse}/include/fuse' ''; @@ -33,7 +33,7 @@ stdenv.mkDerivation rec { # # This must be done in preConfigure because the build process removes # helper from the source directory during the build. - preConfigure = lib.optionalString (!stdenv.isDarwin) '' + preConfigure = lib.optionalString (!stdenv.hostPlatform.isDarwin) '' mkdir -p $out/sbin cp -a mount.unionfs $out/sbin/mount.unionfs-fuse substituteInPlace $out/sbin/mount.unionfs-fuse --replace mount.fuse ${fuse}/sbin/mount.fuse @@ -41,7 +41,7 @@ stdenv.mkDerivation rec { ''; meta = with lib; { - broken = stdenv.isDarwin; + broken = stdenv.hostPlatform.isDarwin; description = "FUSE UnionFS implementation"; homepage = "https://github.com/rpodgorny/unionfs-fuse"; license = licenses.bsd3; diff --git a/pkgs/tools/filesystems/wdfs/default.nix b/pkgs/tools/filesystems/wdfs/default.nix index 3f8897c091bc..9c1b68cc6307 100644 --- a/pkgs/tools/filesystems/wdfs/default.nix +++ b/pkgs/tools/filesystems/wdfs/default.nix @@ -11,7 +11,7 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ autoreconfHook pkg-config ]; buildInputs = [fuse glib neon]; - postPatch = lib.optionalString stdenv.isDarwin '' + postPatch = lib.optionalString stdenv.hostPlatform.isDarwin '' # Fix the build on macOS with macFUSE installed. Needs autoreconfHook to # take effect. substituteInPlace configure.ac --replace \ diff --git a/pkgs/tools/filesystems/yandex-disk/default.nix b/pkgs/tools/filesystems/yandex-disk/default.nix index ad3c44faf616..6e7a19ad8ee8 100644 --- a/pkgs/tools/filesystems/yandex-disk/default.nix +++ b/pkgs/tools/filesystems/yandex-disk/default.nix @@ -1,7 +1,7 @@ { lib, stdenv, fetchurl, writeText, zlib, rpmextract, patchelf, which }: let - p = if stdenv.is64bit then { + p = if stdenv.hostPlatform.is64bit then { arch = "x86_64"; gcclib = "${stdenv.cc.cc.lib}/lib64"; sha256 = "sha256-HH/pLZmDr6m/B3e6MHafDGnNWR83oR2y1ijVMR/LOF0="; diff --git a/pkgs/tools/games/ajour/default.nix b/pkgs/tools/games/ajour/default.nix index 7416d4f717ab..5ed670a77de6 100644 --- a/pkgs/tools/games/ajour/default.nix +++ b/pkgs/tools/games/ajour/default.nix @@ -92,7 +92,7 @@ in rustPlatform.buildRustPackage rec { homepage = "https://github.com/casperstorm/ajour"; changelog = "https://github.com/casperstorm/ajour/blob/master/CHANGELOG.md"; license = licenses.mit; - broken = stdenv.isDarwin; + broken = stdenv.hostPlatform.isDarwin; maintainers = with maintainers; [ hexa ]; }; } diff --git a/pkgs/tools/games/pokefinder/default.nix b/pkgs/tools/games/pokefinder/default.nix index e4d773684343..6ea5f168a8f4 100644 --- a/pkgs/tools/games/pokefinder/default.nix +++ b/pkgs/tools/games/pokefinder/default.nix @@ -42,10 +42,10 @@ stdenv.mkDerivation rec { installPhase = '' runHook preInstall - '' + lib.optionalString (stdenv.isDarwin) '' + '' + lib.optionalString (stdenv.hostPlatform.isDarwin) '' mkdir -p $out/Applications cp -R Source/PokeFinder.app $out/Applications - '' + lib.optionalString (!stdenv.isDarwin) '' + '' + lib.optionalString (!stdenv.hostPlatform.isDarwin) '' install -D Source/PokeFinder $out/bin/PokeFinder mkdir -p $out/share/pixmaps convert "$src/Source/Form/Images/pokefinder.ico[-1]" $out/share/pixmaps/pokefinder.png @@ -53,7 +53,7 @@ stdenv.mkDerivation rec { runHook postInstall ''; - nativeBuildInputs = [ cmake wrapQtAppsHook python3 ] ++ lib.optionals (!stdenv.isDarwin) [ copyDesktopItems imagemagick ]; + nativeBuildInputs = [ cmake wrapQtAppsHook python3 ] ++ lib.optionals (!stdenv.hostPlatform.isDarwin) [ copyDesktopItems imagemagick ]; desktopItems = [ (makeDesktopItem { @@ -67,7 +67,7 @@ stdenv.mkDerivation rec { ]; buildInputs = [ qtbase qttools ] - ++ lib.optionals stdenv.isLinux [ qtwayland ]; + ++ lib.optionals stdenv.hostPlatform.isLinux [ qtwayland ]; passthru.updateScript = gitUpdater { rev-prefix = "v"; diff --git a/pkgs/tools/games/ukmm/default.nix b/pkgs/tools/games/ukmm/default.nix index 98709602dcde..9a640b004bf8 100644 --- a/pkgs/tools/games/ukmm/default.nix +++ b/pkgs/tools/games/ukmm/default.nix @@ -82,7 +82,7 @@ rustPlatform.buildRustPackage rec { license = licenses.gpl3Plus; maintainers = with maintainers; [ kira-bruneau ]; platforms = platforms.linux; - broken = stdenv.isLinux && stdenv.isAarch64; + broken = stdenv.hostPlatform.isLinux && stdenv.hostPlatform.isAarch64; mainProgram = "ukmm"; }; } diff --git a/pkgs/tools/graphics/amber/default.nix b/pkgs/tools/graphics/amber/default.nix index 0d86e5c75bfb..12ff88d1340e 100644 --- a/pkgs/tools/graphics/amber/default.nix +++ b/pkgs/tools/graphics/amber/default.nix @@ -70,7 +70,7 @@ stdenv.mkDerivation (finalAttrs: { makeWrapper pkg-config python3 - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ cctools ]; diff --git a/pkgs/tools/graphics/astc-encoder/default.nix b/pkgs/tools/graphics/astc-encoder/default.nix index a67fdc1d3978..31758877c469 100644 --- a/pkgs/tools/graphics/astc-encoder/default.nix +++ b/pkgs/tools/graphics/astc-encoder/default.nix @@ -81,6 +81,6 @@ stdenv.mkDerivation rec { platforms = platforms.unix; license = licenses.asl20; maintainers = with maintainers; [ dasisdormax ]; - broken = !stdenv.is64bit; + broken = !stdenv.hostPlatform.is64bit; }; } diff --git a/pkgs/tools/graphics/asymptote/default.nix b/pkgs/tools/graphics/asymptote/default.nix index 55fce30cd990..ba0dd70254b3 100644 --- a/pkgs/tools/graphics/asymptote/default.nix +++ b/pkgs/tools/graphics/asymptote/default.nix @@ -41,13 +41,13 @@ stdenv.mkDerivation (finalAttrs: { boehmgc ncurses readline gsl libsigsegv zlib perl curl qtbase qtsvg boost (python3.withPackages (ps: with ps; [ cson numpy pyqt5 ])) - ] ++ lib.optionals stdenv.isLinux [ libtirpc ]; + ] ++ lib.optionals stdenv.hostPlatform.isLinux [ libtirpc ]; propagatedBuildInputs = [ glm - ] ++ lib.optionals stdenv.isLinux [ + ] ++ lib.optionals stdenv.hostPlatform.isLinux [ libglut libGLU libGL - ] ++ lib.optionals stdenv.isDarwin (with darwin.apple_sdk.frameworks; [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin (with darwin.apple_sdk.frameworks; [ OpenGL GLUT Cocoa ]); @@ -77,7 +77,7 @@ stdenv.mkDerivation (finalAttrs: { # do not use bundled libgc.so configureFlags = [ "--enable-gc=system" ] # TODO add open_memstream to enable XDR/V3D on Darwin (requires memstream or >=10.13 Apple SDK) - ++ lib.optional stdenv.isDarwin "--enable-xdr=no"; + ++ lib.optional stdenv.hostPlatform.isDarwin "--enable-xdr=no"; env.NIX_CFLAGS_COMPILE = "-I${boehmgc.dev}/include/gc"; diff --git a/pkgs/tools/graphics/barcode/default.nix b/pkgs/tools/graphics/barcode/default.nix index 9eb368b83af6..6199a87925d3 100644 --- a/pkgs/tools/graphics/barcode/default.nix +++ b/pkgs/tools/graphics/barcode/default.nix @@ -16,7 +16,7 @@ stdenv.mkDerivation rec { }) ]; - configureFlags = lib.optional stdenv.isDarwin "ac_cv_func_calloc_0_nonnull=yes"; + configureFlags = lib.optional stdenv.hostPlatform.isDarwin "ac_cv_func_calloc_0_nonnull=yes"; hardeningDisable = [ "format" ]; diff --git a/pkgs/tools/graphics/dcraw/default.nix b/pkgs/tools/graphics/dcraw/default.nix index 35657cf8fc53..9e35c1bfdc86 100644 --- a/pkgs/tools/graphics/dcraw/default.nix +++ b/pkgs/tools/graphics/dcraw/default.nix @@ -9,7 +9,7 @@ stdenv.mkDerivation rec { sha256 = "1fdl3xa1fbm71xzc3760rsjkvf0x5jdjrvdzyg2l9ka24vdc7418"; }; - nativeBuildInputs = lib.optional stdenv.isDarwin libiconv; + nativeBuildInputs = lib.optional stdenv.hostPlatform.isDarwin libiconv; buildInputs = [ libjpeg lcms2 gettext ]; # Jasper is disabled because the library is abandoned and has many diff --git a/pkgs/tools/graphics/dmtx-utils/default.nix b/pkgs/tools/graphics/dmtx-utils/default.nix index f03f38742e19..4c5883d56804 100644 --- a/pkgs/tools/graphics/dmtx-utils/default.nix +++ b/pkgs/tools/graphics/dmtx-utils/default.nix @@ -22,7 +22,7 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ autoreconfHook pkg-config ]; buildInputs = [ libdmtx imagemagick ] - ++ lib.optional stdenv.isDarwin Foundation; + ++ lib.optional stdenv.hostPlatform.isDarwin Foundation; meta = { description = "Data matrix command-line utilities"; diff --git a/pkgs/tools/graphics/esshader/default.nix b/pkgs/tools/graphics/esshader/default.nix index 38bd4d1b7f0a..b425ce5721ce 100644 --- a/pkgs/tools/graphics/esshader/default.nix +++ b/pkgs/tools/graphics/esshader/default.nix @@ -35,7 +35,7 @@ stdenv.mkDerivation { maintainers = with maintainers; [ astro ]; platforms = lib.platforms.unix; # never built on aarch64-darwin, x86_64-darwin since first introduction in nixpkgs - broken = stdenv.isDarwin; + broken = stdenv.hostPlatform.isDarwin; mainProgram = "esshader"; }; } diff --git a/pkgs/tools/graphics/feedgnuplot/default.nix b/pkgs/tools/graphics/feedgnuplot/default.nix index 6503a2887ab2..423d8d8d92f3 100644 --- a/pkgs/tools/graphics/feedgnuplot/default.nix +++ b/pkgs/tools/graphics/feedgnuplot/default.nix @@ -30,7 +30,7 @@ perlPackages.buildPerlPackage rec { outputs = [ "out" ]; - nativeBuildInputs = [ makeWrapper installShellFiles ] ++ lib.optional stdenv.isDarwin shortenPerlShebang; + nativeBuildInputs = [ makeWrapper installShellFiles ] ++ lib.optional stdenv.hostPlatform.isDarwin shortenPerlShebang; buildInputs = [ gnuplot perl ] ++ (with perlPackages; [ ListMoreUtils IPCRun StringShellQuote ]); @@ -45,7 +45,7 @@ perlPackages.buildPerlPackage rec { # Tests require gnuplot 4.6.4 and are completely skipped with gnuplot 5. doCheck = false; - postInstall = lib.optionalString stdenv.isDarwin '' + postInstall = lib.optionalString stdenv.hostPlatform.isDarwin '' shortenPerlShebang $out/bin/feedgnuplot '' + '' wrapProgram $out/bin/feedgnuplot \ diff --git a/pkgs/tools/graphics/gnuplot/default.nix b/pkgs/tools/graphics/gnuplot/default.nix index 97e566b561d2..c43059c03af5 100644 --- a/pkgs/tools/graphics/gnuplot/default.nix +++ b/pkgs/tools/graphics/gnuplot/default.nix @@ -17,7 +17,7 @@ assert libX11 != null -> (fontconfig != null && gnused != null && coreutils != null); let - withX = libX11 != null && !aquaterm && !stdenv.isDarwin; + withX = libX11 != null && !aquaterm && !stdenv.hostPlatform.isDarwin; in (if withQt then mkDerivation else stdenv.mkDerivation) rec { pname = "gnuplot"; @@ -38,7 +38,7 @@ in ++ lib.optionals withX [ libX11 libXpm libXt libXaw ] ++ lib.optionals withQt [ qtbase qtsvg ] ++ lib.optional withWxGTK wxGTK32 - ++ lib.optional (withWxGTK && stdenv.isDarwin) Cocoa; + ++ lib.optional (withWxGTK && stdenv.hostPlatform.isDarwin) Cocoa; postPatch = '' # lrelease is in qttools, not in qtbase. @@ -51,7 +51,7 @@ in (if aquaterm then "--with-aquaterm" else "--without-aquaterm") ] ++ lib.optional withCaca "--with-caca"; - CXXFLAGS = lib.optionalString (stdenv.isDarwin && withQt) "-std=c++11"; + CXXFLAGS = lib.optionalString (stdenv.hostPlatform.isDarwin && withQt) "-std=c++11"; # we'll wrap things ourselves dontWrapGApps = true; diff --git a/pkgs/tools/graphics/graphviz/default.nix b/pkgs/tools/graphics/graphviz/default.nix index 5cb3c24bc150..e27c35fd72c7 100644 --- a/pkgs/tools/graphics/graphviz/default.nix +++ b/pkgs/tools/graphics/graphviz/default.nix @@ -59,7 +59,7 @@ stdenv.mkDerivation rec { pango bash ] ++ optionals withXorg (with xorg; [ libXrender libXaw libXpm ]) - ++ optionals stdenv.isDarwin [ ApplicationServices Foundation ]; + ++ optionals stdenv.hostPlatform.isDarwin [ ApplicationServices Foundation ]; hardeningDisable = [ "fortify" ]; @@ -70,7 +70,7 @@ stdenv.mkDerivation rec { enableParallelBuilding = true; - CPPFLAGS = optionalString (withXorg && stdenv.isDarwin) + CPPFLAGS = optionalString (withXorg && stdenv.hostPlatform.isDarwin) "-I${cairo.dev}/include/cairo"; doCheck = false; # fails with "Graphviz test suite requires ksh93" which is not in nixpkgs diff --git a/pkgs/tools/graphics/icoutils/default.nix b/pkgs/tools/graphics/icoutils/default.nix index 0e22fe72c594..8c50ffdce62e 100644 --- a/pkgs/tools/graphics/icoutils/default.nix +++ b/pkgs/tools/graphics/icoutils/default.nix @@ -23,7 +23,7 @@ stdenv.mkDerivation rec { # Fixes a build failure on aarch64-darwin. Define for all Darwin targets for when x86_64-darwin # upgrades to a newer SDK. - env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.isDarwin "-DTARGET_OS_IPHONE=0"; + env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.hostPlatform.isDarwin "-DTARGET_OS_IPHONE=0"; postPatch = '' patchShebangs extresso/extresso diff --git a/pkgs/tools/graphics/lepton/default.nix b/pkgs/tools/graphics/lepton/default.nix index 27fcca3cacbf..980f729e9725 100644 --- a/pkgs/tools/graphics/lepton/default.nix +++ b/pkgs/tools/graphics/lepton/default.nix @@ -12,7 +12,7 @@ stdenv.mkDerivation rec { }; nativeBuildInputs = [ cmake git ]; - buildInputs = lib.optionals stdenv.isLinux [ glibc.static ]; + buildInputs = lib.optionals stdenv.hostPlatform.isLinux [ glibc.static ]; meta = with lib; { homepage = "https://github.com/dropbox/lepton"; diff --git a/pkgs/tools/graphics/mesa-demos/default.nix b/pkgs/tools/graphics/mesa-demos/default.nix index 02cb25d251da..3ac1ede77eac 100644 --- a/pkgs/tools/graphics/mesa-demos/default.nix +++ b/pkgs/tools/graphics/mesa-demos/default.nix @@ -55,8 +55,8 @@ stdenv.mkDerivation rec { ]; mesonFlags = [ - "-Degl=${if stdenv.isDarwin then "disabled" else "auto"}" - (lib.mesonEnable "libdrm" (stdenv.isLinux)) + "-Degl=${if stdenv.hostPlatform.isDarwin then "disabled" else "auto"}" + (lib.mesonEnable "libdrm" (stdenv.hostPlatform.isLinux)) (lib.mesonEnable "osmesa" false) (lib.mesonEnable "wayland" (lib.meta.availableOn stdenv.hostPlatform wayland)) ]; diff --git a/pkgs/tools/graphics/netpbm/default.nix b/pkgs/tools/graphics/netpbm/default.nix index bbd24d056bdb..8426fbcc2032 100644 --- a/pkgs/tools/graphics/netpbm/default.nix +++ b/pkgs/tools/graphics/netpbm/default.nix @@ -87,7 +87,7 @@ stdenv.mkDerivation { # Fix path to rgb.txt echo "RGB_DB_PATH = $out/share/netpbm/misc/rgb.txt" >> config.mk - '' + lib.optionalString stdenv.isDarwin '' + '' + lib.optionalString stdenv.hostPlatform.isDarwin '' echo "LDSHLIB=-dynamiclib -install_name $out/lib/libnetpbm.\$(MAJ).dylib" >> config.mk echo "NETPBMLIBTYPE = dylib" >> config.mk echo "NETPBMLIBSUFFIX = dylib" >> config.mk diff --git a/pkgs/tools/graphics/nifskope/default.nix b/pkgs/tools/graphics/nifskope/default.nix index 3d9d89af0c96..4022c363ef64 100644 --- a/pkgs/tools/graphics/nifskope/default.nix +++ b/pkgs/tools/graphics/nifskope/default.nix @@ -23,7 +23,7 @@ stdenv.mkDerivation { url = "https://github.com/niftools/nifskope/commit/30954e7f01f3d779a2a1fd37d363e8a6ad560bd3.patch"; sha256 = "0d6xjj2mjjhdd7w1aig5f75jksjni16jyj0lxsz51pys6xqb6fpj"; }) - ] ++ (lib.optional stdenv.isAarch64 ./no-sse-on-arm.patch); + ] ++ (lib.optional stdenv.hostPlatform.isAarch64 ./no-sse-on-arm.patch); buildInputs = [ qtbase qttools libGLU ]; nativeBuildInputs = [ qmake wrapQtAppsHook ]; diff --git a/pkgs/tools/graphics/oxipng/default.nix b/pkgs/tools/graphics/oxipng/default.nix index e127e2a3aa3c..d0715d8f1aa3 100644 --- a/pkgs/tools/graphics/oxipng/default.nix +++ b/pkgs/tools/graphics/oxipng/default.nix @@ -11,7 +11,7 @@ rustPlatform.buildRustPackage rec { cargoHash = "sha256-LZ3YIosDpjDYVACWQsr/0XhgX4fyo8CyZG58WfLSzCs="; - doCheck = !stdenv.isAarch64 && !stdenv.isDarwin; + doCheck = !stdenv.hostPlatform.isAarch64 && !stdenv.hostPlatform.isDarwin; meta = { homepage = "https://github.com/shssoichiro/oxipng"; diff --git a/pkgs/tools/graphics/pfstools/default.nix b/pkgs/tools/graphics/pfstools/default.nix index 7d595c5e4ce1..b164799e9cc2 100644 --- a/pkgs/tools/graphics/pfstools/default.nix +++ b/pkgs/tools/graphics/pfstools/default.nix @@ -32,7 +32,7 @@ mkDerivation rec { buildInputs = [ openexr zlib imagemagick6 fftwFloat fftw gsl libexif perl qtbase netpbm - ] ++ (if stdenv.isDarwin then (with darwin.apple_sdk.frameworks; [ + ] ++ (if stdenv.hostPlatform.isDarwin then (with darwin.apple_sdk.frameworks; [ OpenGL GLUT ]) else [ libGLU libGL libglut diff --git a/pkgs/tools/graphics/pngout/default.nix b/pkgs/tools/graphics/pngout/default.nix index 41724043930c..03d25acd2986 100644 --- a/pkgs/tools/graphics/pngout/default.nix +++ b/pkgs/tools/graphics/pngout/default.nix @@ -14,7 +14,7 @@ let }; platform = platforms."${stdenv.hostPlatform.system}" or (throw "Unsupported system: ${stdenv.hostPlatform.system}"); - download = if stdenv.isDarwin + download = if stdenv.hostPlatform.isDarwin then { extension = "macos.zip"; hash = "sha256-MnL6lH7q/BrACG4fFJNfnvoh0JClVeaJIlX+XIj2aG4="; } else { extension = "linux.tar.gz"; hash = "sha256-rDi7pvDeKQM96GZTjDr6ZDQTGbaVu+OI77xf2egw6Sg="; }; in @@ -27,15 +27,15 @@ stdenv.mkDerivation rec { url = "http://static.jonof.id.au/dl/kenutils/pngout-${version}-${download.extension}"; }; - nativeBuildInputs = lib.optionals stdenv.isDarwin [ unzip ]; + nativeBuildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ unzip ]; # pngout is code-signed on Darwin, so don’t alter the binary to avoid breaking the signature. - dontFixup = stdenv.isDarwin; + dontFixup = stdenv.hostPlatform.isDarwin; installPhase = '' mkdir -p $out/bin cp ${platform.folder}/pngout $out/bin - '' + lib.optionalString stdenv.isLinux '' + '' + lib.optionalString stdenv.hostPlatform.isLinux '' patchelf --set-interpreter ${stdenv.cc.libc}/lib/${platform.ld-linux} $out/bin/pngout ''; diff --git a/pkgs/tools/graphics/pstoedit/default.nix b/pkgs/tools/graphics/pstoedit/default.nix index 810c2365b2c3..c9e8512b7755 100644 --- a/pkgs/tools/graphics/pstoedit/default.nix +++ b/pkgs/tools/graphics/pstoedit/default.nix @@ -20,7 +20,7 @@ stdenv.mkDerivation rec { outputs = [ "out" "dev" ]; nativeBuildInputs = [ pkg-config ]; buildInputs = [ zlib ghostscript imagemagick plotutils gd libjpeg libwebp ] - ++ lib.optionals stdenv.isDarwin (with darwin.apple_sdk.frameworks; [ + ++ lib.optionals stdenv.hostPlatform.isDarwin (with darwin.apple_sdk.frameworks; [ libiconv ApplicationServices ]); diff --git a/pkgs/tools/graphics/quirc/default.nix b/pkgs/tools/graphics/quirc/default.nix index b2d1e795155a..43144ce037b0 100644 --- a/pkgs/tools/graphics/quirc/default.nix +++ b/pkgs/tools/graphics/quirc/default.nix @@ -34,7 +34,7 @@ stdenv.mkDerivation (finalAttrs: { url = "https://github.com/dlbeer/quirc/commit/257c6c94d99960819ecabf72199e5822f60a3bc5.patch?full_index=1"; hash = "sha256-WLQK7vy34VmgJzppTnRjAcZoSGWVaXQSaGq9An8W0rw="; }) - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ # Disable building of linux-only demos on darwin systems ./0001-Don-t-build-demos.patch ]; @@ -50,7 +50,7 @@ stdenv.mkDerivation (finalAttrs: { postInstall = '' # don't install static library rm $out/lib/libquirc.a - '' + lib.optionalString stdenv.isDarwin '' + '' + lib.optionalString stdenv.hostPlatform.isDarwin '' # Set absolute install name to avoid the need for DYLD_LIBRARY_PATH dylib=$out/lib/libquirc.${finalAttrs.version}.dylib ${stdenv.cc.targetPrefix}install_name_tool -id "$dylib" "$dylib" diff --git a/pkgs/tools/graphics/realesrgan-ncnn-vulkan/default.nix b/pkgs/tools/graphics/realesrgan-ncnn-vulkan/default.nix index 59c2753011d3..450e36e6d3ee 100644 --- a/pkgs/tools/graphics/realesrgan-ncnn-vulkan/default.nix +++ b/pkgs/tools/graphics/realesrgan-ncnn-vulkan/default.nix @@ -55,7 +55,7 @@ stdenv.mkDerivation rec { cp -r ${models}/models $out/share ''; - postFixup = lib.optionalString stdenv.isLinux '' + postFixup = lib.optionalString stdenv.hostPlatform.isLinux '' patchelf $out/bin/realesrgan-ncnn-vulkan --add-needed libvulkan.so ''; diff --git a/pkgs/tools/graphics/texture-synthesis/default.nix b/pkgs/tools/graphics/texture-synthesis/default.nix index 7122450587a7..cd7d437c4d41 100644 --- a/pkgs/tools/graphics/texture-synthesis/default.nix +++ b/pkgs/tools/graphics/texture-synthesis/default.nix @@ -19,7 +19,7 @@ rustPlatform.buildRustPackage rec { }; # tests fail for unknown reasons on aarch64-darwin - doCheck = !(stdenv.isDarwin && stdenv.isAarch64); + doCheck = !(stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isAarch64); meta = with lib; { description = "Example-based texture synthesis written in Rust"; diff --git a/pkgs/tools/graphics/vips/default.nix b/pkgs/tools/graphics/vips/default.nix index 129b33427bc3..c8f41167f865 100644 --- a/pkgs/tools/graphics/vips/default.nix +++ b/pkgs/tools/graphics/vips/default.nix @@ -44,7 +44,7 @@ stdenv.mkDerivation (finalAttrs: { pname = "vips"; version = "8.15.3"; - outputs = [ "bin" "out" "man" "dev" ] ++ lib.optionals (!stdenv.isDarwin) [ "devdoc" ]; + outputs = [ "bin" "out" "man" "dev" ] ++ lib.optionals (!stdenv.hostPlatform.isDarwin) [ "devdoc" ]; src = fetchFromGitHub { owner = "libvips"; @@ -64,7 +64,7 @@ stdenv.mkDerivation (finalAttrs: { ninja docbook-xsl-nons gobject-introspection - ] ++ lib.optionals (!stdenv.isDarwin) [ + ] ++ lib.optionals (!stdenv.hostPlatform.isDarwin) [ gtk-doc ]; @@ -96,7 +96,7 @@ stdenv.mkDerivation (finalAttrs: { cgif libarchive libhwy - ] ++ lib.optionals stdenv.isDarwin [ ApplicationServices Foundation ]; + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ ApplicationServices Foundation ]; # Required by .pc file propagatedBuildInputs = [ @@ -107,7 +107,7 @@ stdenv.mkDerivation (finalAttrs: { "-Dpdfium=disabled" "-Dnifti=disabled" ] - ++ lib.optional (!stdenv.isDarwin) "-Dgtk_doc=true" + ++ lib.optional (!stdenv.hostPlatform.isDarwin) "-Dgtk_doc=true" ++ lib.optional (imagemagick == null) "-Dmagick=disabled" ; diff --git a/pkgs/tools/graphics/vulkan-caps-viewer/default.nix b/pkgs/tools/graphics/vulkan-caps-viewer/default.nix index 0c60a11db88b..da52cb1b6ea9 100644 --- a/pkgs/tools/graphics/vulkan-caps-viewer/default.nix +++ b/pkgs/tools/graphics/vulkan-caps-viewer/default.nix @@ -58,6 +58,6 @@ stdenv.mkDerivation rec { maintainers = with maintainers; [ pedrohlc ]; changelog = "https://github.com/SaschaWillems/VulkanCapsViewer/releases/tag/${version}"; # never built on aarch64-darwin, x86_64-darwin since first introduction in nixpkgs - broken = stdenv.isDarwin; + broken = stdenv.hostPlatform.isDarwin; }; } diff --git a/pkgs/tools/graphics/vulkan-tools/default.nix b/pkgs/tools/graphics/vulkan-tools/default.nix index 759841d02e66..c21ece529459 100644 --- a/pkgs/tools/graphics/vulkan-tools/default.nix +++ b/pkgs/tools/graphics/vulkan-tools/default.nix @@ -45,7 +45,7 @@ stdenv.mkDerivation rec { vulkan-headers vulkan-loader vulkan-volk - ] ++ lib.optionals (!stdenv.isDarwin) [ + ] ++ lib.optionals (!stdenv.hostPlatform.isDarwin) [ libffi libX11 libXau @@ -55,7 +55,7 @@ stdenv.mkDerivation rec { wayland wayland-protocols wayland-scanner - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ moltenvk moltenvk.dev AppKit @@ -76,7 +76,7 @@ stdenv.mkDerivation rec { "-DGLSLANG_INSTALL_DIR=${glslang}" # Hide dev warnings that are useless for packaging "-Wno-dev" - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ "-DMOLTENVK_REPO_ROOT=${moltenvk}/share/vulkan/icd.d" # Don’t build the cube demo because it requires `ibtool`, which is not available in nixpkgs. "-DBUILD_CUBE=OFF" diff --git a/pkgs/tools/graphics/waifu2x-converter-cpp/default.nix b/pkgs/tools/graphics/waifu2x-converter-cpp/default.nix index dd2c15c8fda4..cf150a59c8db 100644 --- a/pkgs/tools/graphics/waifu2x-converter-cpp/default.nix +++ b/pkgs/tools/graphics/waifu2x-converter-cpp/default.nix @@ -22,12 +22,12 @@ stdenv.mkDerivation rec { buildInputs = [ opencv4 ] ++ lib.optional cudaSupport cudatoolkit - ++ lib.optional stdenv.isDarwin OpenCL - ++ lib.optionals stdenv.isLinux [ ocl-icd opencl-headers ]; + ++ lib.optional stdenv.hostPlatform.isDarwin OpenCL + ++ lib.optionals stdenv.hostPlatform.isLinux [ ocl-icd opencl-headers ]; nativeBuildInputs = [ cmake makeWrapper ]; - preFixup = lib.optionalString stdenv.isLinux '' + preFixup = lib.optionalString stdenv.hostPlatform.isLinux '' wrapProgram $out/bin/waifu2x-converter-cpp --prefix LD_LIBRARY_PATH : "${ocl-icd}/lib" ''; diff --git a/pkgs/tools/graphics/wgpu-utils/default.nix b/pkgs/tools/graphics/wgpu-utils/default.nix index 236cf3f7a7fa..51d4c018e459 100644 --- a/pkgs/tools/graphics/wgpu-utils/default.nix +++ b/pkgs/tools/graphics/wgpu-utils/default.nix @@ -24,7 +24,7 @@ rustPlatform.buildRustPackage rec { makeWrapper ]; - buildInputs = lib.optional stdenv.isDarwin QuartzCore; + buildInputs = lib.optional stdenv.hostPlatform.isDarwin QuartzCore; # Tests fail, as the Nix sandbox doesn't provide an appropriate adapter (e.g. Vulkan). doCheck = false; diff --git a/pkgs/tools/graphics/zbar/default.nix b/pkgs/tools/graphics/zbar/default.nix index c3429069d203..951e6b26bf11 100644 --- a/pkgs/tools/graphics/zbar/default.nix +++ b/pkgs/tools/graphics/zbar/default.nix @@ -16,7 +16,7 @@ , docbook_xsl , autoreconfHook , dbus -, enableVideo ? stdenv.isLinux +, enableVideo ? stdenv.hostPlatform.isLinux # The implementation is buggy and produces an error like # Name Error (Connection ":1.4380" is not allowed to own the service "org.linuxtv.Zbar" due to security policies in the configuration file) # for every scanned code. @@ -70,7 +70,7 @@ stdenv.mkDerivation rec { buildInputs = [ imagemagickBig libintl - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ libiconv Foundation ] ++ lib.optionals enableDbus [ @@ -89,7 +89,7 @@ stdenv.mkDerivation rec { python3 ]; - checkInputs = lib.optionals stdenv.isDarwin [ + checkInputs = lib.optionals stdenv.hostPlatform.isDarwin [ argp-standalone ]; @@ -119,7 +119,7 @@ stdenv.mkDerivation rec { doCheck = true; - preCheck = lib.optionalString stdenv.isDarwin '' + preCheck = lib.optionalString stdenv.hostPlatform.isDarwin '' export NIX_LDFLAGS="$NIX_LDFLAGS -largp" ''; diff --git a/pkgs/tools/misc/abduco/default.nix b/pkgs/tools/misc/abduco/default.nix index 011f186bbbe2..eef5fe0df344 100644 --- a/pkgs/tools/misc/abduco/default.nix +++ b/pkgs/tools/misc/abduco/default.nix @@ -19,7 +19,7 @@ stdenv.mkDerivation { "cp ${writeText "config.def.h" conf} config.def.h"; installFlags = [ "install-completion" ]; - CFLAGS = lib.optionalString stdenv.isDarwin "-D_DARWIN_C_SOURCE"; + CFLAGS = lib.optionalString stdenv.hostPlatform.isDarwin "-D_DARWIN_C_SOURCE"; patches = [ # https://github.com/martanne/abduco/pull/22 diff --git a/pkgs/tools/misc/aescrypt/default.nix b/pkgs/tools/misc/aescrypt/default.nix index 67739f575169..2517724c8c39 100644 --- a/pkgs/tools/misc/aescrypt/default.nix +++ b/pkgs/tools/misc/aescrypt/default.nix @@ -9,7 +9,7 @@ stdenv.mkDerivation rec { sha256 = "sha256-4uGS0LReq5dI7+Wel7ZWzFXx+utZWi93q4TUSw7AhNI="; }; - NIX_LDFLAGS = lib.optionalString stdenv.isDarwin "-liconv"; + NIX_LDFLAGS = lib.optionalString stdenv.hostPlatform.isDarwin "-liconv"; preBuild = '' substituteInPlace src/Makefile --replace "CC=gcc" "CC?=gcc" diff --git a/pkgs/tools/misc/aichat/default.nix b/pkgs/tools/misc/aichat/default.nix index 6aed08780987..bea3026ea606 100644 --- a/pkgs/tools/misc/aichat/default.nix +++ b/pkgs/tools/misc/aichat/default.nix @@ -25,7 +25,7 @@ rustPlatform.buildRustPackage rec { installShellFiles ]; - buildInputs = lib.optionals stdenv.isDarwin [ + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.AppKit darwin.apple_sdk.frameworks.CoreFoundation darwin.apple_sdk.frameworks.Security diff --git a/pkgs/tools/misc/aoc-cli/default.nix b/pkgs/tools/misc/aoc-cli/default.nix index 4fec5647e04d..693f87389e1b 100644 --- a/pkgs/tools/misc/aoc-cli/default.nix +++ b/pkgs/tools/misc/aoc-cli/default.nix @@ -21,7 +21,7 @@ rustPlatform.buildRustPackage rec { nativeBuildInputs = [ pkg-config ]; buildInputs = [ openssl ] - ++ lib.optional stdenv.isDarwin Security; + ++ lib.optional stdenv.hostPlatform.isDarwin Security; cargoHash = "sha256-EluP4N3UBQeEKVdHTs4O0THXji+nAyE52nGKsxA3AA4="; diff --git a/pkgs/tools/misc/apkeep/default.nix b/pkgs/tools/misc/apkeep/default.nix index 084997765868..8e31710ff324 100644 --- a/pkgs/tools/misc/apkeep/default.nix +++ b/pkgs/tools/misc/apkeep/default.nix @@ -29,7 +29,7 @@ rustPlatform.buildRustPackage rec { buildInputs = [ openssl - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ Security SystemConfiguration ]; diff --git a/pkgs/tools/misc/archi/default.nix b/pkgs/tools/misc/archi/default.nix index e933edf3642b..7afbce58c106 100644 --- a/pkgs/tools/misc/archi/default.nix +++ b/pkgs/tools/misc/archi/default.nix @@ -42,7 +42,7 @@ stdenv.mkDerivation rec { autoPatchelfHook ]; - sourceRoot = if stdenv.isDarwin then "." else null; + sourceRoot = if stdenv.hostPlatform.isDarwin then "." else null; installPhase = if stdenv.hostPlatform.system == "x86_64-linux" then diff --git a/pkgs/tools/misc/asciinema-agg/default.nix b/pkgs/tools/misc/asciinema-agg/default.nix index 238a5c8af073..e7f7334de3e0 100644 --- a/pkgs/tools/misc/asciinema-agg/default.nix +++ b/pkgs/tools/misc/asciinema-agg/default.nix @@ -18,7 +18,7 @@ rustPlatform.buildRustPackage rec { }; }; - buildInputs = lib.optionals stdenv.isDarwin [ + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ Security ]; diff --git a/pkgs/tools/misc/barman/default.nix b/pkgs/tools/misc/barman/default.nix index 20bdb11d0179..7e1eea61d0a9 100644 --- a/pkgs/tools/misc/barman/default.nix +++ b/pkgs/tools/misc/barman/default.nix @@ -48,7 +48,7 @@ python3Packages.buildPythonApplication rec { # Assertion error "test_help_output" ] - ++ lib.optionals stdenv.isDarwin [ + ++ lib.optionals stdenv.hostPlatform.isDarwin [ # FsOperationFailed "test_get_file_mode" ]; diff --git a/pkgs/tools/misc/bat-extras/default.nix b/pkgs/tools/misc/bat-extras/default.nix index 1c3a805367f2..0891499b2261 100644 --- a/pkgs/tools/misc/bat-extras/default.nix +++ b/pkgs/tools/misc/bat-extras/default.nix @@ -55,7 +55,7 @@ let # Run the library tests as they don't have external dependencies doCheck = true; - nativeCheckInputs = [ bash fish zsh ] ++ (lib.optionals stdenv.isDarwin [ getconf ]); + nativeCheckInputs = [ bash fish zsh ] ++ (lib.optionals stdenv.hostPlatform.isDarwin [ getconf ]); checkPhase = '' runHook preCheck # test list repeats suites. Unique them @@ -112,7 +112,7 @@ let dontBuild = true; # we've already built doCheck = true; - nativeCheckInputs = [ bat bash fish zsh ] ++ (lib.optionals stdenv.isDarwin [ getconf ]); + nativeCheckInputs = [ bat bash fish zsh ] ++ (lib.optionals stdenv.hostPlatform.isDarwin [ getconf ]); checkPhase = '' runHook preCheck bash ./test.sh --compiled --suite ${name} @@ -144,7 +144,7 @@ in { batdiff = script "batdiff" ([ less coreutils gitMinimal ] ++ optionalDep withDelta delta); batgrep = script "batgrep" [ less coreutils ripgrep ]; - batman = script "batman" (lib.optionals stdenv.isLinux [ util-linux ]); + batman = script "batman" (lib.optionals stdenv.hostPlatform.isLinux [ util-linux ]); batpipe = script "batpipe" [ less ]; batwatch = script "batwatch" ([ less coreutils ] ++ optionalDep withEntr entr); prettybat = script "prettybat" ([] diff --git a/pkgs/tools/misc/bibutils/default.nix b/pkgs/tools/misc/bibutils/default.nix index ea5360549b20..c6dd28777b4d 100644 --- a/pkgs/tools/misc/bibutils/default.nix +++ b/pkgs/tools/misc/bibutils/default.nix @@ -13,7 +13,7 @@ stdenv.mkDerivation rec { sha256 = "sha256-bgKK7x6Kaz5azvCYWEp7tocI81z+dAEbNBwR/qXktcM="; }; - preConfigure = lib.optionalString stdenv.isDarwin '' + preConfigure = lib.optionalString stdenv.hostPlatform.isDarwin '' substituteInPlace lib/Makefile.dynamic \ --replace '-Wl,-soname,$(SONAME)' "" ''; @@ -36,7 +36,7 @@ stdenv.mkDerivation rec { doCheck = true; checkTarget = "test"; - preCheck = lib.optionalString stdenv.isDarwin '' + preCheck = lib.optionalString stdenv.hostPlatform.isDarwin '' export DYLD_LIBRARY_PATH=`pwd`/lib ''; diff --git a/pkgs/tools/misc/bmon/default.nix b/pkgs/tools/misc/bmon/default.nix index 237eb7476da5..a123a3380f1b 100644 --- a/pkgs/tools/misc/bmon/default.nix +++ b/pkgs/tools/misc/bmon/default.nix @@ -24,7 +24,7 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ autoreconfHook pkg-config ]; - buildInputs = [ ncurses libconfuse ] ++ lib.optional stdenv.isLinux libnl; + buildInputs = [ ncurses libconfuse ] ++ lib.optional stdenv.hostPlatform.isLinux libnl; preConfigure = '' # Must be an absolute path diff --git a/pkgs/tools/misc/boxxy/default.nix b/pkgs/tools/misc/boxxy/default.nix index b2596746f7df..845ccf532b8e 100644 --- a/pkgs/tools/misc/boxxy/default.nix +++ b/pkgs/tools/misc/boxxy/default.nix @@ -37,7 +37,7 @@ rustPlatform.buildRustPackage rec { license = licenses.mit; maintainers = with maintainers; [ dit7ya figsoda ]; platforms = platforms.linux; - broken = stdenv.isAarch64; + broken = stdenv.hostPlatform.isAarch64; mainProgram = "boxxy"; }; } diff --git a/pkgs/tools/misc/brltty/default.nix b/pkgs/tools/misc/brltty/default.nix index f2de104c5825..745f39b4363a 100644 --- a/pkgs/tools/misc/brltty/default.nix +++ b/pkgs/tools/misc/brltty/default.nix @@ -1,6 +1,6 @@ { lib, stdenv, fetchurl, pkg-config, python3, bluez , tcl, acl, kmod, coreutils, shadow, util-linux -, alsaSupport ? stdenv.isLinux, alsa-lib +, alsaSupport ? stdenv.hostPlatform.isLinux, alsa-lib , systemdSupport ? lib.meta.availableOn stdenv.hostPlatform systemd, systemd }: diff --git a/pkgs/tools/misc/broot/default.nix b/pkgs/tools/misc/broot/default.nix index 9097f4e335ec..17c28c8f3bdd 100644 --- a/pkgs/tools/misc/broot/default.nix +++ b/pkgs/tools/misc/broot/default.nix @@ -13,8 +13,8 @@ , xorg , zlib , buildPackages -, withClipboard ? !stdenv.isDarwin -, withTrash ? !stdenv.isDarwin +, withClipboard ? !stdenv.hostPlatform.isDarwin +, withTrash ? !stdenv.hostPlatform.isDarwin }: rustPlatform.buildRustPackage rec { @@ -36,7 +36,7 @@ rustPlatform.buildRustPackage rec { pkg-config ]; - buildInputs = [ libgit2 oniguruma xorg.libxcb ] ++ lib.optionals stdenv.isDarwin [ + buildInputs = [ libgit2 oniguruma xorg.libxcb ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ Foundation libiconv Security diff --git a/pkgs/tools/misc/chafa/default.nix b/pkgs/tools/misc/chafa/default.nix index 6272fdc8914d..a6a376abd930 100644 --- a/pkgs/tools/misc/chafa/default.nix +++ b/pkgs/tools/misc/chafa/default.nix @@ -26,7 +26,7 @@ stdenv.mkDerivation rec { ]; buildInputs = [ glib imagemagick ] - ++ lib.optional stdenv.isDarwin Foundation; + ++ lib.optional stdenv.hostPlatform.isDarwin Foundation; patches = [ ./xmlcatalog_patch.patch ]; diff --git a/pkgs/tools/misc/checkpwn/default.nix b/pkgs/tools/misc/checkpwn/default.nix index 994fecc6c4db..e89e6b880097 100644 --- a/pkgs/tools/misc/checkpwn/default.nix +++ b/pkgs/tools/misc/checkpwn/default.nix @@ -16,7 +16,7 @@ rustPlatform.buildRustPackage rec { cargoHash = "sha256-G+QWnGf+Zp94EHVnYM3Q/iEhEQMU2O/c4i5ya/dY7K4="; - buildInputs = lib.optionals stdenv.isDarwin [ + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.Security ]; diff --git a/pkgs/tools/misc/ckb-next/default.nix b/pkgs/tools/misc/ckb-next/default.nix index ca0f6705b9fe..6c077b227274 100644 --- a/pkgs/tools/misc/ckb-next/default.nix +++ b/pkgs/tools/misc/ckb-next/default.nix @@ -1,6 +1,6 @@ { lib, wrapQtAppsHook, fetchFromGitHub, substituteAll, udev, stdenv , pkg-config, qtbase, cmake, zlib, kmod, libXdmcp, qttools, qtx11extras, libdbusmenu, gnused -, withPulseaudio ? stdenv.isLinux, libpulseaudio, quazip +, withPulseaudio ? stdenv.hostPlatform.isLinux, libpulseaudio, quazip }: stdenv.mkDerivation rec { diff --git a/pkgs/tools/misc/clipboard-jh/default.nix b/pkgs/tools/misc/clipboard-jh/default.nix index 78ba8e6c3ba7..9b0369e8fad2 100644 --- a/pkgs/tools/misc/clipboard-jh/default.nix +++ b/pkgs/tools/misc/clipboard-jh/default.nix @@ -34,13 +34,13 @@ stdenv.mkDerivation rec { wayland-scanner ]; - buildInputs = lib.optionals stdenv.isLinux [ + buildInputs = lib.optionals stdenv.hostPlatform.isLinux [ libffi wayland-protocols wayland xorg.libX11 alsa-lib - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.AppKit ]; @@ -51,7 +51,7 @@ stdenv.mkDerivation rec { "-DINSTALL_PREFIX=${placeholder "out"}" ]; - postFixup = lib.optionalString stdenv.isLinux '' + postFixup = lib.optionalString stdenv.hostPlatform.isLinux '' patchelf $out/bin/cb --add-rpath $out/lib ''; diff --git a/pkgs/tools/misc/cod/default.nix b/pkgs/tools/misc/cod/default.nix index eba78d6c2263..08ea681eedb8 100644 --- a/pkgs/tools/misc/cod/default.nix +++ b/pkgs/tools/misc/cod/default.nix @@ -33,7 +33,7 @@ buildGoModule rec { homepage = "https://github.com/dim-an/cod/"; license = licenses.asl20; maintainers = with maintainers; [ SuperSandro2000 ]; - broken = stdenv.isDarwin; + broken = stdenv.hostPlatform.isDarwin; mainProgram = "cod"; }; } diff --git a/pkgs/tools/misc/code-minimap/default.nix b/pkgs/tools/misc/code-minimap/default.nix index db58ede25abf..2bc64b425e5f 100644 --- a/pkgs/tools/misc/code-minimap/default.nix +++ b/pkgs/tools/misc/code-minimap/default.nix @@ -18,7 +18,7 @@ rustPlatform.buildRustPackage rec { cargoHash = "sha256-5/UgEzkJw9XDgtS1jKyWh5ijTp3L+UQLuE5CXcyIgTs="; - buildInputs = lib.optional stdenv.isDarwin libiconv; + buildInputs = lib.optional stdenv.hostPlatform.isDarwin libiconv; meta = with lib; { description = "High performance code minimap render"; diff --git a/pkgs/tools/misc/coinlive/default.nix b/pkgs/tools/misc/coinlive/default.nix index 2db008551c8b..564f19f85b97 100644 --- a/pkgs/tools/misc/coinlive/default.nix +++ b/pkgs/tools/misc/coinlive/default.nix @@ -26,7 +26,7 @@ rustPlatform.buildRustPackage rec { buildInputs = [ openssl - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ Security ]; diff --git a/pkgs/tools/misc/convbin/default.nix b/pkgs/tools/misc/convbin/default.nix index 96164902dc2c..7d61c684f9cb 100644 --- a/pkgs/tools/misc/convbin/default.nix +++ b/pkgs/tools/misc/convbin/default.nix @@ -13,7 +13,7 @@ stdenv.mkDerivation rec { sha256 = "sha256-zCRM62xwaPaN8+cg+CeaqK/9hKpZmSBBeUOQqAvQGYw="; }; - postPatch = lib.optionalString stdenv.isDarwin '' + postPatch = lib.optionalString stdenv.hostPlatform.isDarwin '' substituteInPlace Makefile --replace "-flto" "" ''; diff --git a/pkgs/tools/misc/coreutils/default.nix b/pkgs/tools/misc/coreutils/default.nix index d9fbd4459f04..5bbc3b9581ee 100644 --- a/pkgs/tools/misc/coreutils/default.nix +++ b/pkgs/tools/misc/coreutils/default.nix @@ -98,7 +98,7 @@ stdenv.mkDerivation rec { echo "int main() { return 77; }" > gnulib-tests/test-parse-datetime.c echo "int main() { return 77; }" > gnulib-tests/test-getlogin.c '' - ])) + (optionalString stdenv.isAarch64 '' + ])) + (optionalString stdenv.hostPlatform.isAarch64 '' # Sometimes fails: https://github.com/NixOS/nixpkgs/pull/143097#issuecomment-954462584 sed '2i echo Skipping cut huge range test && exit 77' -i ./tests/cut/cut-huge-range.sh ''); @@ -135,7 +135,7 @@ stdenv.mkDerivation rec { ++ optional withPrefix "--program-prefix=g" # the shipped configure script doesn't enable nls, but using autoreconfHook # does so which breaks the build - ++ optional stdenv.isDarwin "--disable-nls" + ++ optional stdenv.hostPlatform.isDarwin "--disable-nls" ++ optionals (isCross && stdenv.hostPlatform.libc == "glibc") [ # TODO(19b98110126fde7cbb1127af7e3fe1568eacad3d): Needed for fstatfs() I # don't know why it is not properly detected cross building with glibc. @@ -154,7 +154,7 @@ stdenv.mkDerivation rec { # With non-standard storeDir: https://github.com/NixOS/nix/issues/512 doCheck = (!isCross) && (stdenv.hostPlatform.libc == "glibc" || stdenv.hostPlatform.libc == "musl") - && !stdenv.isAarch32; + && !stdenv.hostPlatform.isAarch32; # Prevents attempts of running 'help2man' on cross-built binaries. PERL = if isCross then "missing" else null; diff --git a/pkgs/tools/misc/cutecom/default.nix b/pkgs/tools/misc/cutecom/default.nix index e36bd288b2ae..9ed7ef6295e6 100644 --- a/pkgs/tools/misc/cutecom/default.nix +++ b/pkgs/tools/misc/cutecom/default.nix @@ -19,7 +19,7 @@ stdenv.mkDerivation rec { buildInputs = [ qtserialport ]; nativeBuildInputs = [ cmake wrapQtAppsHook ]; - postInstall = if stdenv.isDarwin then '' + postInstall = if stdenv.hostPlatform.isDarwin then '' mkdir -p $out/Applications '' else '' cd .. diff --git a/pkgs/tools/misc/daktilo/default.nix b/pkgs/tools/misc/daktilo/default.nix index e557862b6713..3d9b4161e299 100644 --- a/pkgs/tools/misc/daktilo/default.nix +++ b/pkgs/tools/misc/daktilo/default.nix @@ -33,7 +33,7 @@ rustPlatform.buildRustPackage rec { xorg.libX11 xorg.libXi xorg.libXtst - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.Security ]; diff --git a/pkgs/tools/misc/dialogbox/default.nix b/pkgs/tools/misc/dialogbox/default.nix index 7012f9d69ad5..e6849fa84310 100644 --- a/pkgs/tools/misc/dialogbox/default.nix +++ b/pkgs/tools/misc/dialogbox/default.nix @@ -37,7 +37,7 @@ mkDerivation rec { ''; meta = with lib; { - broken = stdenv.isDarwin; + broken = stdenv.hostPlatform.isDarwin; homepage = "https://github.com/martynets/dialogbox/"; description = "Qt-based scriptable engine providing GUI dialog boxes"; license = licenses.gpl3Plus; diff --git a/pkgs/tools/misc/didyoumean/default.nix b/pkgs/tools/misc/didyoumean/default.nix index 362673a5ca82..94efc1af33db 100644 --- a/pkgs/tools/misc/didyoumean/default.nix +++ b/pkgs/tools/misc/didyoumean/default.nix @@ -25,14 +25,14 @@ rustPlatform.buildRustPackage rec { nativeBuildInputs = [ installShellFiles - ] ++ lib.optionals stdenv.isLinux [ + ] ++ lib.optionals stdenv.hostPlatform.isLinux [ pkg-config ]; - buildInputs = lib.optionals stdenv.isLinux [ + buildInputs = lib.optionals stdenv.hostPlatform.isLinux [ libxcb openssl - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ AppKit ]; diff --git a/pkgs/tools/misc/diffoscope/default.nix b/pkgs/tools/misc/diffoscope/default.nix index f76b7a766e77..96d8976922bd 100644 --- a/pkgs/tools/misc/diffoscope/default.nix +++ b/pkgs/tools/misc/diffoscope/default.nix @@ -245,7 +245,7 @@ python.pkgs.buildPythonApplication rec { # docx2txt, nixpkgs packages another project named the same, which does not work ]) # oggvideotools is broken on Darwin, please put it back when it will be fixed? - ++ lib.optionals stdenv.isLinux [ oggvideotools ] + ++ lib.optionals stdenv.hostPlatform.isLinux [ oggvideotools ] # This doesn't work on aarch64-darwin ++ lib.optionals (stdenv.hostPlatform.system != "aarch64-darwin") [ gnumeric ] ) @@ -272,7 +272,7 @@ python.pkgs.buildPythonApplication rec { # Fails because it fails to determine llvm version "test_item3_deflate_llvm_bitcode" ] - ++ lib.optionals stdenv.isDarwin [ + ++ lib.optionals stdenv.hostPlatform.isDarwin [ # Disable flaky tests on Darwin "test_non_unicode_filename" "test_listing" @@ -288,7 +288,7 @@ python.pkgs.buildPythonApplication rec { "test_libmix_differences" ]; - disabledTestPaths = lib.optionals stdenv.isDarwin [ + disabledTestPaths = lib.optionals stdenv.hostPlatform.isDarwin [ "tests/comparators/test_git.py" "tests/comparators/test_java.py" "tests/comparators/test_uimage.py" diff --git a/pkgs/tools/misc/dijo/default.nix b/pkgs/tools/misc/dijo/default.nix index 1a73a4d84faf..344faf84f60b 100644 --- a/pkgs/tools/misc/dijo/default.nix +++ b/pkgs/tools/misc/dijo/default.nix @@ -3,7 +3,7 @@ rustPlatform.buildRustPackage rec { pname = "dijo"; version = "0.2.7"; - buildInputs = [ ncurses ] ++ lib.optional stdenv.isDarwin CoreServices; + buildInputs = [ ncurses ] ++ lib.optional stdenv.hostPlatform.isDarwin CoreServices; src = fetchFromGitHub { owner = "NerdyPepper"; repo = "dijo"; diff --git a/pkgs/tools/misc/diskonaut/default.nix b/pkgs/tools/misc/diskonaut/default.nix index d9738b398b04..fa9d7f00a83b 100644 --- a/pkgs/tools/misc/diskonaut/default.nix +++ b/pkgs/tools/misc/diskonaut/default.nix @@ -14,7 +14,7 @@ rustPlatform.buildRustPackage rec { cargoHash = "sha256-S/ne3iTEnlA3AqcPg3geLzV4bYVuYPjMCITSVJFnWYI="; # 1 passed; 44 failed https://hydra.nixos.org/build/148943783/nixlog/1 - doCheck = !stdenv.isDarwin; + doCheck = !stdenv.hostPlatform.isDarwin; meta = with lib; { description = "Terminal disk space navigator"; diff --git a/pkgs/tools/misc/diskus/default.nix b/pkgs/tools/misc/diskus/default.nix index fd37b2b9c99b..683da47d6af6 100644 --- a/pkgs/tools/misc/diskus/default.nix +++ b/pkgs/tools/misc/diskus/default.nix @@ -11,7 +11,7 @@ rustPlatform.buildRustPackage rec { sha256 = "sha256-SKd2CU0F2iR4bSHntu2VKvZyjjf2XJeXJG6XS/fIBMU="; }; - buildInputs = lib.optionals stdenv.isDarwin [ Security ]; + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ Security ]; cargoHash = "sha256-qNXv6Z9sKl7rol78UTOSRFML/JCGfOJMGOdt49KHD50="; diff --git a/pkgs/tools/misc/docui/default.nix b/pkgs/tools/misc/docui/default.nix index d226c2fc8f00..a42e57ebc5ae 100644 --- a/pkgs/tools/misc/docui/default.nix +++ b/pkgs/tools/misc/docui/default.nix @@ -18,7 +18,7 @@ buildGoModule rec { homepage = "https://github.com/skanehira/docui"; license = licenses.mit; maintainers = with maintainers; [ aethelz ]; - broken = stdenv.isDarwin; + broken = stdenv.hostPlatform.isDarwin; mainProgram = "docui"; }; } diff --git a/pkgs/tools/misc/dtool/default.nix b/pkgs/tools/misc/dtool/default.nix index 8b4349dbb59a..0e62d91cdbc9 100644 --- a/pkgs/tools/misc/dtool/default.nix +++ b/pkgs/tools/misc/dtool/default.nix @@ -18,7 +18,7 @@ rustPlatform.buildRustPackage rec { cargoHash = "sha256-o5Xvc0tnoUgfp5k7EqVuEH9Zyo3C+A+mVqPhMtZCYKw="; - buildInputs = lib.optionals stdenv.isDarwin [ + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.Security ]; # FIXME: remove patch when upstream version of rustc-serialize is updated diff --git a/pkgs/tools/misc/dua/default.nix b/pkgs/tools/misc/dua/default.nix index 130a21d0709a..aed4b2d53c88 100644 --- a/pkgs/tools/misc/dua/default.nix +++ b/pkgs/tools/misc/dua/default.nix @@ -23,7 +23,7 @@ rustPlatform.buildRustPackage rec { cargoHash = "sha256-bqWYXcry+mCUNgYS+7+MWfiV+u+3oZZg1o3Q6Mac+vE="; - buildInputs = lib.optionals stdenv.isDarwin [ + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.Foundation ]; diff --git a/pkgs/tools/misc/duc/default.nix b/pkgs/tools/misc/duc/default.nix index 56fe697528ab..8ef860f32e05 100644 --- a/pkgs/tools/misc/duc/default.nix +++ b/pkgs/tools/misc/duc/default.nix @@ -1,7 +1,7 @@ { lib, stdenv, fetchFromGitHub, autoreconfHook, pkg-config , tokyocabinet, ncurses , cairo ? null, pango ? null -, enableCairo ? stdenv.isLinux +, enableCairo ? stdenv.hostPlatform.isLinux }: assert enableCairo -> cairo != null && pango != null; diff --git a/pkgs/tools/misc/dvtm/dvtm.nix b/pkgs/tools/misc/dvtm/dvtm.nix index aedac2d61f98..f4e36f271bab 100644 --- a/pkgs/tools/misc/dvtm/dvtm.nix +++ b/pkgs/tools/misc/dvtm/dvtm.nix @@ -3,7 +3,7 @@ stdenv.mkDerivation { inherit pname version src patches; - CFLAGS = lib.optionalString stdenv.isDarwin "-D_DARWIN_C_SOURCE"; + CFLAGS = lib.optionalString stdenv.hostPlatform.isDarwin "-D_DARWIN_C_SOURCE"; postPatch = lib.optionalString (customConfig != null) '' cp ${builtins.toFile "config.h" customConfig} ./config.h diff --git a/pkgs/tools/misc/ea/default.nix b/pkgs/tools/misc/ea/default.nix index d45f3b431dcd..7ea3b5c11ca8 100644 --- a/pkgs/tools/misc/ea/default.nix +++ b/pkgs/tools/misc/ea/default.nix @@ -31,7 +31,7 @@ rustPlatform.buildRustPackage rec { nativeBuildInputs = [ installShellFiles ]; - buildInputs = lib.optionals stdenv.isDarwin [ + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ libiconv ]; diff --git a/pkgs/tools/misc/edid-generator/default.nix b/pkgs/tools/misc/edid-generator/default.nix index fc7f01226972..e3855fc76f2f 100644 --- a/pkgs/tools/misc/edid-generator/default.nix +++ b/pkgs/tools/misc/edid-generator/default.nix @@ -74,6 +74,6 @@ stdenv.mkDerivation { license = lib.licenses.gpl3; maintainers = with lib.maintainers; [ flokli nazarewk ]; platforms = lib.platforms.all; - broken = stdenv.isDarwin; # never built on Hydra https://hydra.nixos.org/job/nixpkgs/trunk/edid-generator.x86_64-darwin + broken = stdenv.hostPlatform.isDarwin; # never built on Hydra https://hydra.nixos.org/job/nixpkgs/trunk/edid-generator.x86_64-darwin }; } diff --git a/pkgs/tools/misc/edk2-uefi-shell/default.nix b/pkgs/tools/misc/edk2-uefi-shell/default.nix index 0ec010472645..723833ab45cf 100644 --- a/pkgs/tools/misc/edk2-uefi-shell/default.nix +++ b/pkgs/tools/misc/edk2-uefi-shell/default.nix @@ -38,6 +38,6 @@ edk2.mkDerivation "ShellPkg/ShellPkg.dsc" (finalAttrs: { description = "UEFI Shell from Tianocore EFI development kit"; homepage = "https://github.com/tianocore/tianocore.github.io/wiki/ShellPkg"; maintainers = with lib.maintainers; [ LunNova mjoerg ]; - broken = stdenv.isDarwin && stdenv.isAarch64; + broken = stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isAarch64; }; }) diff --git a/pkgs/tools/misc/eludris/default.nix b/pkgs/tools/misc/eludris/default.nix index e0762d179ec0..756324c1a8b2 100644 --- a/pkgs/tools/misc/eludris/default.nix +++ b/pkgs/tools/misc/eludris/default.nix @@ -22,7 +22,7 @@ rustPlatform.buildRustPackage rec { cargoBuildFlags = [ "-p eludris" ]; cargoTestFlags = [ "-p eludris" ]; - buildInputs = [ openssl ] ++ lib.optionals stdenv.isDarwin [ Security ]; + buildInputs = [ openssl ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ Security ]; nativeBuildInputs = [ pkg-config ]; meta = with lib; { diff --git a/pkgs/tools/misc/envchain/default.nix b/pkgs/tools/misc/envchain/default.nix index 984dd60082e3..22a007536399 100644 --- a/pkgs/tools/misc/envchain/default.nix +++ b/pkgs/tools/misc/envchain/default.nix @@ -18,7 +18,7 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ pkg-config ]; buildInputs = [ libsecret readline ] - ++ lib.optionals stdenv.isDarwin [ libedit ncurses Security ]; + ++ lib.optionals stdenv.hostPlatform.isDarwin [ libedit ncurses Security ]; makeFlags = [ "DESTDIR=$(out)" ]; diff --git a/pkgs/tools/misc/expect/default.nix b/pkgs/tools/misc/expect/default.nix index 102120a8604e..ffbfb3a64141 100644 --- a/pkgs/tools/misc/expect/default.nix +++ b/pkgs/tools/misc/expect/default.nix @@ -42,7 +42,7 @@ tcl.mkTclDerivation rec { postInstall = '' tclWrapperArgs+=(--prefix PATH : ${lib.makeBinPath [ tcl ]}) - ${lib.optionalString stdenv.isDarwin "tclWrapperArgs+=(--prefix DYLD_LIBRARY_PATH : $out/lib/expect${version})"} + ${lib.optionalString stdenv.hostPlatform.isDarwin "tclWrapperArgs+=(--prefix DYLD_LIBRARY_PATH : $out/lib/expect${version})"} ''; outputs = [ "out" "dev" ]; diff --git a/pkgs/tools/misc/fclones/default.nix b/pkgs/tools/misc/fclones/default.nix index deb97aced8ef..f7a70b966acf 100644 --- a/pkgs/tools/misc/fclones/default.nix +++ b/pkgs/tools/misc/fclones/default.nix @@ -18,12 +18,12 @@ rustPlatform.buildRustPackage rec { cargoHash = "sha256-mEgFfg8I+JJuUEvj+sia2aL3BVg3HteQorZ2EOiLo64="; - buildInputs = lib.optionals stdenv.isDarwin [ + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk_11_0.frameworks.AppKit ]; # device::test_physical_device_name test fails on Darwin - doCheck = !stdenv.isDarwin; + doCheck = !stdenv.hostPlatform.isDarwin; checkFlags = [ # ofborg sometimes fails with "Resource temporarily unavailable" diff --git a/pkgs/tools/misc/fclones/gui.nix b/pkgs/tools/misc/fclones/gui.nix index 8dff1eec4928..bf010cfa798e 100644 --- a/pkgs/tools/misc/fclones/gui.nix +++ b/pkgs/tools/misc/fclones/gui.nix @@ -32,7 +32,7 @@ rustPlatform.buildRustPackage rec { gdk-pixbuf gtk4 libadwaita - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk_11_0.frameworks.IOKit ]; diff --git a/pkgs/tools/misc/fcp/default.nix b/pkgs/tools/misc/fcp/default.nix index 814d764a7999..9d3a7c4074fe 100644 --- a/pkgs/tools/misc/fcp/default.nix +++ b/pkgs/tools/misc/fcp/default.nix @@ -16,7 +16,7 @@ rustPlatform.buildRustPackage rec { nativeBuildInputs = [ expect ]; # character_device fails with "File name too long" on darwin - doCheck = !stdenv.isDarwin; + doCheck = !stdenv.hostPlatform.isDarwin; postPatch = '' patchShebangs tests/*.exp diff --git a/pkgs/tools/misc/fend/default.nix b/pkgs/tools/misc/fend/default.nix index 860906fdd555..aa1fda03a455 100644 --- a/pkgs/tools/misc/fend/default.nix +++ b/pkgs/tools/misc/fend/default.nix @@ -30,7 +30,7 @@ rustPlatform.buildRustPackage rec { cargoHash = "sha256-R5p7f+eEMDs0rs+45XNJC4znrJ9BrPBv5+dvMgoHFdA="; nativeBuildInputs = [ pandoc installShellFiles pkg-config copyDesktopItems ]; - buildInputs = [ pkg-config openssl ] ++ lib.optionals stdenv.isDarwin [ darwin.apple_sdk.frameworks.Security ]; + buildInputs = [ pkg-config openssl ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.Security ]; postBuild = '' patchShebangs --build ./documentation/build.sh diff --git a/pkgs/tools/misc/ffsend/default.nix b/pkgs/tools/misc/ffsend/default.nix index 91fcaf4ac449..c24650d4ffbc 100644 --- a/pkgs/tools/misc/ffsend/default.nix +++ b/pkgs/tools/misc/ffsend/default.nix @@ -2,13 +2,13 @@ , installShellFiles , Security, AppKit -, x11Support ? stdenv.isLinux || stdenv.hostPlatform.isBSD +, x11Support ? stdenv.hostPlatform.isLinux || stdenv.hostPlatform.isBSD , xclip ? null, xsel ? null , preferXsel ? false # if true and xsel is non-null, use it instead of xclip }: let - usesX11 = stdenv.isLinux || stdenv.isBSD; + usesX11 = stdenv.hostPlatform.isLinux || stdenv.hostPlatform.isBSD; in assert (x11Support && usesX11) -> xclip != null || xsel != null; @@ -58,9 +58,9 @@ rustPlatform.buildRustPackage rec { ]; nativeBuildInputs = [ installShellFiles ] - ++ lib.optionals stdenv.isLinux [ pkg-config ]; + ++ lib.optionals stdenv.hostPlatform.isLinux [ pkg-config ]; buildInputs = - if stdenv.isDarwin then [ Security AppKit ] + if stdenv.hostPlatform.isDarwin then [ Security AppKit ] else [ openssl ]; preBuild = lib.optionalString (x11Support && usesX11) ( diff --git a/pkgs/tools/misc/findutils/default.nix b/pkgs/tools/misc/findutils/default.nix index 41432415a2c6..239aa98b04e0 100644 --- a/pkgs/tools/misc/findutils/default.nix +++ b/pkgs/tools/misc/findutils/default.nix @@ -43,7 +43,7 @@ stdenv.mkDerivation rec { "--localstatedir=/var/cache" ]; - CFLAGS = lib.optionals stdenv.isDarwin [ + CFLAGS = lib.optionals stdenv.hostPlatform.isDarwin [ # TODO: Revisit upstream issue https://savannah.gnu.org/bugs/?59972 # https://github.com/Homebrew/homebrew-core/pull/69761#issuecomment-770268478 "-D__nonnull\\(params\\)=" diff --git a/pkgs/tools/misc/flashrom/default.nix b/pkgs/tools/misc/flashrom/default.nix index 190841582a4f..744876ffb62e 100644 --- a/pkgs/tools/misc/flashrom/default.nix +++ b/pkgs/tools/misc/flashrom/default.nix @@ -21,7 +21,7 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ pkg-config installShellFiles ]; buildInputs = [ libftdi1 libusb1 ] - ++ lib.optionals (!stdenv.isDarwin) [ pciutils ] + ++ lib.optionals (!stdenv.hostPlatform.isDarwin) [ pciutils ] ++ lib.optional jlinkSupport libjaylink; postPatch = '' @@ -31,7 +31,7 @@ stdenv.mkDerivation rec { makeFlags = [ "PREFIX=$(out)" "libinstall" ] ++ lib.optional jlinkSupport "CONFIG_JLINK_SPI=yes" - ++ lib.optionals (stdenv.isDarwin && stdenv.isx86_64) [ "CONFIG_INTERNAL_X86=no" "CONFIG_INTERNAL_DMI=no" "CONFIG_RAYER_SPI=no" ]; + ++ lib.optionals (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isx86_64) [ "CONFIG_INTERNAL_X86=no" "CONFIG_INTERNAL_DMI=no" "CONFIG_RAYER_SPI=no" ]; postInstall = '' install -Dm644 util/flashrom_udev.rules $out/lib/udev/rules.d/flashrom.rules diff --git a/pkgs/tools/misc/flitter/default.nix b/pkgs/tools/misc/flitter/default.nix index b32329efd9eb..01f231db4475 100644 --- a/pkgs/tools/misc/flitter/default.nix +++ b/pkgs/tools/misc/flitter/default.nix @@ -34,6 +34,6 @@ rustPlatform.buildRustPackage rec { homepage = "https://github.com/alexozer/flitter"; platforms = platforms.unix; mainProgram = "flitter"; - broken = stdenv.isDarwin; + broken = stdenv.hostPlatform.isDarwin; }; } diff --git a/pkgs/tools/misc/flowgger/default.nix b/pkgs/tools/misc/flowgger/default.nix index 6783e9dc80cf..1cff8298ca9b 100644 --- a/pkgs/tools/misc/flowgger/default.nix +++ b/pkgs/tools/misc/flowgger/default.nix @@ -25,7 +25,7 @@ rustPlatform.buildRustPackage rec { ]; buildInputs = [ openssl ] - ++ lib.optional stdenv.isDarwin CoreServices; + ++ lib.optional stdenv.hostPlatform.isDarwin CoreServices; checkFlags = [ # test failed diff --git a/pkgs/tools/misc/fondu/default.nix b/pkgs/tools/misc/fondu/default.nix index 9435d0487b76..fe6ab396d139 100644 --- a/pkgs/tools/misc/fondu/default.nix +++ b/pkgs/tools/misc/fondu/default.nix @@ -9,11 +9,11 @@ stdenv.mkDerivation rec { sha256 = "152prqad9jszjmm4wwqrq83zk13ypsz09n02nrk1gg0fcxfm7fr2"; }; - postConfigure = lib.optionalString stdenv.isDarwin '' + postConfigure = lib.optionalString stdenv.hostPlatform.isDarwin '' substituteInPlace Makefile --replace /System/Library/Frameworks/CoreServices.framework/CoreServices "-framework CoreServices" ''; - buildInputs = lib.optionals stdenv.isDarwin [ CoreServices ]; + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ CoreServices ]; makeFlags = [ "DESTDIR=$(out)" ]; diff --git a/pkgs/tools/misc/fontforge/default.nix b/pkgs/tools/misc/fontforge/default.nix index fe626a417ab3..495a3dad8330 100644 --- a/pkgs/tools/misc/fontforge/default.nix +++ b/pkgs/tools/misc/fontforge/default.nix @@ -44,7 +44,7 @@ stdenv.mkDerivation rec { ''; # do not use x87's 80-bit arithmetic, rouding errors result in very different font binaries - env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.isi686 "-msse2 -mfpmath=sse"; + env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.hostPlatform.isi686 "-msse2 -mfpmath=sse"; nativeBuildInputs = [ pkg-config cmake ]; buildInputs = [ @@ -53,7 +53,7 @@ stdenv.mkDerivation rec { ] ++ lib.optionals withSpiro [ libspiro ] ++ lib.optionals withGUI [ gtk3 cairo pango ] - ++ lib.optionals stdenv.isDarwin [ Carbon Cocoa ]; + ++ lib.optionals stdenv.hostPlatform.isDarwin [ Carbon Cocoa ]; cmakeFlags = [ "-DCMAKE_BUILD_WITH_INSTALL_RPATH=ON" ] ++ lib.optional (!withSpiro) "-DENABLE_LIBSPIRO=OFF" diff --git a/pkgs/tools/misc/freshfetch/default.nix b/pkgs/tools/misc/freshfetch/default.nix index 40119d9f0b3d..ccbaa1f1bfa8 100644 --- a/pkgs/tools/misc/freshfetch/default.nix +++ b/pkgs/tools/misc/freshfetch/default.nix @@ -30,7 +30,7 @@ rustPlatform.buildRustPackage rec { # freshfetch depends on rust nightly features RUSTC_BOOTSTRAP = 1; - buildInputs = lib.optionals stdenv.isDarwin [ + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ AppKit CoreFoundation DiskArbitration diff --git a/pkgs/tools/misc/fsearch/default.nix b/pkgs/tools/misc/fsearch/default.nix index 43902b5d99ca..453e200ea609 100644 --- a/pkgs/tools/misc/fsearch/default.nix +++ b/pkgs/tools/misc/fsearch/default.nix @@ -52,6 +52,6 @@ stdenv.mkDerivation rec { maintainers = with maintainers; [ artturin ]; platforms = platforms.unix; mainProgram = "fsearch"; - broken = stdenv.isDarwin; # never built on Hydra https://hydra.nixos.org/job/nixpkgs/trunk/fsearch.x86_64-darwin + broken = stdenv.hostPlatform.isDarwin; # never built on Hydra https://hydra.nixos.org/job/nixpkgs/trunk/fsearch.x86_64-darwin }; } diff --git a/pkgs/tools/misc/fselect/default.nix b/pkgs/tools/misc/fselect/default.nix index feeb9f3a3d21..95c5b4af0520 100644 --- a/pkgs/tools/misc/fselect/default.nix +++ b/pkgs/tools/misc/fselect/default.nix @@ -14,7 +14,7 @@ rustPlatform.buildRustPackage rec { cargoHash = "sha256-eqzqIyQHHklxo3aojCvY06TUPSqChoz6yZ2zzpgRNqs="; nativeBuildInputs = [ installShellFiles ]; - buildInputs = lib.optional stdenv.isDarwin libiconv; + buildInputs = lib.optional stdenv.hostPlatform.isDarwin libiconv; postInstall = '' installManPage docs/fselect.1 diff --git a/pkgs/tools/misc/fw/default.nix b/pkgs/tools/misc/fw/default.nix index 5483bc872d4a..7855747c5999 100644 --- a/pkgs/tools/misc/fw/default.nix +++ b/pkgs/tools/misc/fw/default.nix @@ -30,7 +30,7 @@ rustPlatform.buildRustPackage rec { libgit2 openssl zlib - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.SystemConfiguration ]; diff --git a/pkgs/tools/misc/fwup/default.nix b/pkgs/tools/misc/fwup/default.nix index 904aca205214..c7226904af62 100644 --- a/pkgs/tools/misc/fwup/default.nix +++ b/pkgs/tools/misc/fwup/default.nix @@ -42,7 +42,7 @@ stdenv.mkDerivation rec { libsodium xz zlib - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ DiskArbitration ]; @@ -60,7 +60,7 @@ stdenv.mkDerivation rec { xdelta ]; - doCheck = !stdenv.isDarwin; + doCheck = !stdenv.hostPlatform.isDarwin; meta = with lib; { description = "Configurable embedded Linux firmware update creator and runner"; diff --git a/pkgs/tools/misc/geekbench/6.nix b/pkgs/tools/misc/geekbench/6.nix index 2aca571e2cf9..2f1d2d0b6be1 100644 --- a/pkgs/tools/misc/geekbench/6.nix +++ b/pkgs/tools/misc/geekbench/6.nix @@ -21,7 +21,7 @@ let hash = "sha256-fbf01qa9wx3k9j8AEqv38fAM3F9tZOcnpH/wa/9rawQ="; }; }; - geekbench_avx2 = lib.optionalString stdenv.isx86_64 "geekbench_avx2"; + geekbench_avx2 = lib.optionalString stdenv.hostPlatform.isx86_64 "geekbench_avx2"; in stdenv.mkDerivation { inherit version; diff --git a/pkgs/tools/misc/getoptions/default.nix b/pkgs/tools/misc/getoptions/default.nix index 2ff3d4c64403..d3dcde29dcd6 100644 --- a/pkgs/tools/misc/getoptions/default.nix +++ b/pkgs/tools/misc/getoptions/default.nix @@ -16,14 +16,14 @@ stdenvNoCC.mkDerivation rec { doCheck = true; nativeCheckInputs = [ shellspec ksh mksh yash zsh ] - ++ lib.lists.optional (!stdenvNoCC.isDarwin) busybox-sandbox-shell; + ++ lib.lists.optional (!stdenvNoCC.hostPlatform.isDarwin) busybox-sandbox-shell; # Disable checks against yash, since shellspec seems to be broken for yash>=2.54 # (see: https://github.com/NixOS/nixpkgs/pull/218264#pullrequestreview-1434402054) preCheck = '' sed -i '/shellspec -s posh/d' Makefile sed -i '/shellspec -s yash/d' Makefile - '' + lib.strings.optionalString stdenvNoCC.isDarwin '' + '' + lib.strings.optionalString stdenvNoCC.hostPlatform.isDarwin '' sed -i "/shellspec -s 'busybox ash'/d" Makefile ''; diff --git a/pkgs/tools/misc/gh-cal/default.nix b/pkgs/tools/misc/gh-cal/default.nix index e14acf372a79..2e4d05b1c274 100644 --- a/pkgs/tools/misc/gh-cal/default.nix +++ b/pkgs/tools/misc/gh-cal/default.nix @@ -18,7 +18,7 @@ rustPlatform.buildRustPackage rec { cargoHash = "sha256-73gqk0DjhaLGIEP5VQQlubPomxHQyg4RnY5XTgE7msQ="; nativeBuildInputs = [ pkg-config ]; - buildInputs = [ openssl ] ++ lib.optionals stdenv.isDarwin [ Security ]; + buildInputs = [ openssl ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ Security ]; meta = with lib; { description = "GitHub contributions calender terminal viewer"; diff --git a/pkgs/tools/misc/ghostie/default.nix b/pkgs/tools/misc/ghostie/default.nix index 0a4e1cb695e0..e6a47a557738 100644 --- a/pkgs/tools/misc/ghostie/default.nix +++ b/pkgs/tools/misc/ghostie/default.nix @@ -33,14 +33,14 @@ rustPlatform.buildRustPackage rec { buildInputs = [ openssl sqlite - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.Cocoa ]; # 4 out of 5 tests are notification tests which do not work in nix builds doCheck = false; - preBuild = lib.optionalString stdenv.isDarwin '' + preBuild = lib.optionalString stdenv.hostPlatform.isDarwin '' export HOME=$(mktemp -d) ''; @@ -50,7 +50,7 @@ rustPlatform.buildRustPackage rec { changelog = "https://github.com/attriaayush/ghostie/releases/tag/v${version}"; license = licenses.mit; maintainers = with maintainers; [ matthiasbeyer ]; - broken = stdenv.isx86_64 && stdenv.isDarwin; + broken = stdenv.hostPlatform.isx86_64 && stdenv.hostPlatform.isDarwin; mainProgram = "ghostie"; }; } diff --git a/pkgs/tools/misc/gigalixir/default.nix b/pkgs/tools/misc/gigalixir/default.nix index 101b5f6a9346..8628fdfcffb3 100644 --- a/pkgs/tools/misc/gigalixir/default.nix +++ b/pkgs/tools/misc/gigalixir/default.nix @@ -55,7 +55,7 @@ python3.pkgs.buildPythonApplication rec { ]; meta = with lib; { - broken = stdenv.isDarwin; + broken = stdenv.hostPlatform.isDarwin; description = "Gigalixir Command-Line Interface"; homepage = "https://github.com/gigalixir/gigalixir-cli"; license = licenses.mit; diff --git a/pkgs/tools/misc/gitrs/default.nix b/pkgs/tools/misc/gitrs/default.nix index f6a49fe850ce..99139437b4a7 100644 --- a/pkgs/tools/misc/gitrs/default.nix +++ b/pkgs/tools/misc/gitrs/default.nix @@ -26,7 +26,7 @@ rustPlatform.buildRustPackage rec { ]; buildInputs = [ openssl.dev ] - ++ lib.optionals stdenv.isDarwin [ + ++ lib.optionals stdenv.hostPlatform.isDarwin [ libiconv darwin.apple_sdk.frameworks.Security darwin.apple_sdk.frameworks.SystemConfiguration diff --git a/pkgs/tools/misc/goaccess/default.nix b/pkgs/tools/misc/goaccess/default.nix index 9fd40e7fc334..81cf43feb659 100644 --- a/pkgs/tools/misc/goaccess/default.nix +++ b/pkgs/tools/misc/goaccess/default.nix @@ -26,7 +26,7 @@ stdenv.mkDerivation rec { buildInputs = [ ncurses openssl - ] ++ lib.optionals withGeolocation [ libmaxminddb ] ++ lib.optionals stdenv.isDarwin [ gettext ]; + ] ++ lib.optionals withGeolocation [ libmaxminddb ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ gettext ]; configureFlags = [ "--enable-utf8" diff --git a/pkgs/tools/misc/goose/default.nix b/pkgs/tools/misc/goose/default.nix index b329eeea9691..058408ca9f2c 100644 --- a/pkgs/tools/misc/goose/default.nix +++ b/pkgs/tools/misc/goose/default.nix @@ -40,7 +40,7 @@ buildGoModule rec { "-skip=TestClickUpDown|TestClickHouseFirstThree|TestLockModeAdvisorySession|TestDialectStore|TestGoMigrationStats|TestPostgresSessionLocker" ]; - doCheck = !stdenv.isDarwin; + doCheck = !stdenv.hostPlatform.isDarwin; meta = with lib; { description = "Database migration tool which supports SQL migrations and Go functions"; diff --git a/pkgs/tools/misc/gotify-desktop/default.nix b/pkgs/tools/misc/gotify-desktop/default.nix index d1b67d927cf7..e184c38d5eb7 100644 --- a/pkgs/tools/misc/gotify-desktop/default.nix +++ b/pkgs/tools/misc/gotify-desktop/default.nix @@ -22,7 +22,7 @@ rustPlatform.buildRustPackage rec { homepage = "https://github.com/desbma/gotify-desktop"; license = licenses.gpl3Plus; maintainers = with maintainers; [ bryanasdev000 genofire ]; - broken = stdenv.isDarwin; + broken = stdenv.hostPlatform.isDarwin; mainProgram = "gotify-desktop"; }; } diff --git a/pkgs/tools/misc/grex/default.nix b/pkgs/tools/misc/grex/default.nix index 2697c6b3febe..f3263303f96d 100644 --- a/pkgs/tools/misc/grex/default.nix +++ b/pkgs/tools/misc/grex/default.nix @@ -17,7 +17,7 @@ rustPlatform.buildRustPackage rec { cargoHash = "sha256-ZRE1vKgi0/UtSe2bdN0BLdtDfAauTfwcqOcl3y63fAA="; - buildInputs = lib.optionals stdenv.isDarwin [ Security ]; + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ Security ]; doInstallCheck = true; installCheckPhase = '' diff --git a/pkgs/tools/misc/grit/default.nix b/pkgs/tools/misc/grit/default.nix index ca68506faab7..d9cffca07f0c 100644 --- a/pkgs/tools/misc/grit/default.nix +++ b/pkgs/tools/misc/grit/default.nix @@ -14,7 +14,7 @@ buildGoModule rec { vendorHash = "sha256-iMMkjJ5dnlr0oSCifBQPWkInQBCp1bh23s+BcKzDNCg="; meta = with lib; { - broken = stdenv.isDarwin; + broken = stdenv.hostPlatform.isDarwin; description = "Multitree-based personal task manager"; homepage = "https://github.com/climech/grit"; license = licenses.mit; diff --git a/pkgs/tools/misc/grub4dos/default.nix b/pkgs/tools/misc/grub4dos/default.nix index 8b78c29defe7..b18298e37b66 100644 --- a/pkgs/tools/misc/grub4dos/default.nix +++ b/pkgs/tools/misc/grub4dos/default.nix @@ -1,8 +1,8 @@ { lib, stdenv, fetchFromGitHub, nasm }: let arch = - if stdenv.isi686 then "i386" - else if stdenv.isx86_64 then "x86_64" + if stdenv.hostPlatform.isi686 then "i386" + else if stdenv.hostPlatform.isx86_64 then "x86_64" else throw "Unknown architecture"; in stdenv.mkDerivation { pname = "grub4dos"; diff --git a/pkgs/tools/misc/halp/default.nix b/pkgs/tools/misc/halp/default.nix index e036336eb10c..2a8b869861cd 100644 --- a/pkgs/tools/misc/halp/default.nix +++ b/pkgs/tools/misc/halp/default.nix @@ -29,7 +29,7 @@ rustPlatform.buildRustPackage rec { installShellFiles ]; - buildInputs = lib.optionals stdenv.isDarwin [ + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.Security ]; @@ -38,7 +38,7 @@ rustPlatform.buildRustPackage rec { ]; # tests are failing on darwin - doCheck = !stdenv.isDarwin; + doCheck = !stdenv.hostPlatform.isDarwin; checkFlags = [ # requires internet access diff --git a/pkgs/tools/misc/handlr/default.nix b/pkgs/tools/misc/handlr/default.nix index b2245eafe534..612331138572 100644 --- a/pkgs/tools/misc/handlr/default.nix +++ b/pkgs/tools/misc/handlr/default.nix @@ -14,7 +14,7 @@ rustPlatform.buildRustPackage rec { cargoHash = "sha256-30fSOzWq1CoIabPWGWndi/SaCN/ckxjlbtzuwV8rk6M="; nativeBuildInputs = [ installShellFiles shared-mime-info ]; - buildInputs = lib.optionals stdenv.isDarwin [ libiconv ]; + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ libiconv ]; preCheck = '' export HOME=$TEMPDIR diff --git a/pkgs/tools/misc/hdf4/default.nix b/pkgs/tools/misc/hdf4/default.nix index 2636cb71717b..6553c1c70d65 100644 --- a/pkgs/tools/misc/hdf4/default.nix +++ b/pkgs/tools/misc/hdf4/default.nix @@ -5,7 +5,7 @@ , fixDarwinDylibNames , cmake , libjpeg -, uselibtirpc ? stdenv.isLinux +, uselibtirpc ? stdenv.hostPlatform.isLinux , libtirpc , zlib , szipSupport ? false @@ -51,7 +51,7 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ cmake - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ fixDarwinDylibNames ] ++ lib.optional fortranSupport gfortran; @@ -104,7 +104,7 @@ stdenv.mkDerivation rec { doCheck = true; - excludedTests = lib.optionals stdenv.isDarwin [ + excludedTests = lib.optionals stdenv.hostPlatform.isDarwin [ "MFHDF_TEST-hdftest" "MFHDF_TEST-hdftest-shared" "HDP-dumpsds-18" diff --git a/pkgs/tools/misc/hdf5/default.nix b/pkgs/tools/misc/hdf5/default.nix index 226143c44be6..80f7c151bf95 100644 --- a/pkgs/tools/misc/hdf5/default.nix +++ b/pkgs/tools/misc/hdf5/default.nix @@ -71,7 +71,7 @@ stdenv.mkDerivation rec { cmakeFlags = [ "-DHDF5_INSTALL_CMAKE_DIR=${placeholder "dev"}/lib/cmake" "-DBUILD_STATIC_LIBS=${lib.boolToString enableStatic}" - ] ++ lib.optional stdenv.isDarwin "-DHDF5_BUILD_WITH_INSTALL_NAME=ON" + ] ++ lib.optional stdenv.hostPlatform.isDarwin "-DHDF5_BUILD_WITH_INSTALL_NAME=ON" ++ lib.optional cppSupport "-DHDF5_BUILD_CPP_LIB=ON" ++ lib.optional fortranSupport "-DHDF5_BUILD_FORTRAN=ON" ++ lib.optional szipSupport "-DHDF5_ENABLE_SZIP_SUPPORT=ON" @@ -82,7 +82,7 @@ stdenv.mkDerivation rec { ++ lib.optionals threadsafe [ "-DDHDF5_ENABLE_THREADSAFE:BOOL=ON" "-DHDF5_BUILD_HL_LIB=OFF" ] # broken in nixpkgs since around 1.14.3 -> 1.14.4.3 # https://github.com/HDFGroup/hdf5/issues/4208#issuecomment-2098698567 - ++ lib.optional (stdenv.isDarwin && stdenv.isx86_64) "-DHDF5_ENABLE_NONSTANDARD_FEATURE_FLOAT16=OFF" + ++ lib.optional (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isx86_64) "-DHDF5_ENABLE_NONSTANDARD_FEATURE_FLOAT16=OFF" ; postInstall = '' diff --git a/pkgs/tools/misc/hdfview/default.nix b/pkgs/tools/misc/hdfview/default.nix index bbc6f512be7d..83597d45004e 100644 --- a/pkgs/tools/misc/hdfview/default.nix +++ b/pkgs/tools/misc/hdfview/default.nix @@ -31,7 +31,7 @@ stdenv.mkDerivation rec { buildPhase = let - arch = if stdenv.isx86_64 then "x86_64" else "aarch64"; + arch = if stdenv.hostPlatform.isx86_64 then "x86_64" else "aarch64"; in '' runHook preBuild @@ -52,7 +52,7 @@ stdenv.mkDerivation rec { installPhase = '' runHook preInstall - '' + lib.optionalString stdenv.isLinux '' + '' + lib.optionalString stdenv.hostPlatform.isLinux '' mkdir -p $out/bin $out/lib cp -a build/dist/HDFView/bin/HDFView $out/bin/ cp -a build/dist/HDFView/lib/app $out/lib/ @@ -61,7 +61,7 @@ stdenv.mkDerivation rec { mkdir -p $out/share/applications $out/share/icons/hicolor/32x32/apps cp src/HDFView.png $out/share/icons/hicolor/32x32/apps/ - '' + lib.optionalString stdenv.isDarwin '' + '' + lib.optionalString stdenv.hostPlatform.isDarwin '' mkdir -p $out/Applications cp -a build/dist/HDFView.app $out/Applications/ '' + '' diff --git a/pkgs/tools/misc/heimdall/default.nix b/pkgs/tools/misc/heimdall/default.nix index ce56a4f4057b..d750bdb131c6 100644 --- a/pkgs/tools/misc/heimdall/default.nix +++ b/pkgs/tools/misc/heimdall/default.nix @@ -27,11 +27,11 @@ mkDerivation rec { preConfigure = '' # Give ownership of the Galaxy S USB device to the logged in user. substituteInPlace heimdall/60-heimdall.rules --replace 'MODE="0666"' 'TAG+="uaccess"' - '' + lib.optionalString stdenv.isDarwin '' + '' + lib.optionalString stdenv.hostPlatform.isDarwin '' substituteInPlace libpit/CMakeLists.txt --replace "-std=gnu++11" "" ''; - installPhase = lib.optionalString (stdenv.isDarwin && enableGUI) '' + installPhase = lib.optionalString (stdenv.hostPlatform.isDarwin && enableGUI) '' mkdir -p $out/Applications mv bin/heimdall-frontend.app $out/Applications/heimdall-frontend.app wrapQtApp $out/Applications/heimdall-frontend.app/Contents/MacOS/heimdall-frontend @@ -44,7 +44,7 @@ mkDerivation rec { ''; meta = with lib; { - broken = stdenv.isDarwin; + broken = stdenv.hostPlatform.isDarwin; homepage = "http://www.glassechidna.com.au/products/heimdall/"; description = "Cross-platform tool suite to flash firmware onto Samsung Galaxy S devices"; license = licenses.mit; diff --git a/pkgs/tools/misc/hidrd/default.nix b/pkgs/tools/misc/hidrd/default.nix index 5ce3e969f276..d3a8a4012433 100644 --- a/pkgs/tools/misc/hidrd/default.nix +++ b/pkgs/tools/misc/hidrd/default.nix @@ -19,7 +19,7 @@ stdenv.mkDerivation { license = licenses.gpl2Plus; maintainers = with maintainers; [ pacien ]; platforms = platforms.all; - broken = stdenv.isDarwin; # never built on Hydra https://hydra.nixos.org/job/nixpkgs/trunk/hidrd.x86_64-darwin + broken = stdenv.hostPlatform.isDarwin; # never built on Hydra https://hydra.nixos.org/job/nixpkgs/trunk/hidrd.x86_64-darwin mainProgram = "hidrd-convert"; }; } diff --git a/pkgs/tools/misc/hiksink/default.nix b/pkgs/tools/misc/hiksink/default.nix index def3f4776949..77e74e8116f7 100644 --- a/pkgs/tools/misc/hiksink/default.nix +++ b/pkgs/tools/misc/hiksink/default.nix @@ -26,7 +26,7 @@ rustPlatform.buildRustPackage rec { buildInputs = [ openssl - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ Security ]; diff --git a/pkgs/tools/misc/hoard/default.nix b/pkgs/tools/misc/hoard/default.nix index 4bdf7b7127b8..1972c9c79386 100644 --- a/pkgs/tools/misc/hoard/default.nix +++ b/pkgs/tools/misc/hoard/default.nix @@ -24,7 +24,7 @@ rustPlatform.buildRustPackage rec { buildInputs = [ openssl - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.Security ]; diff --git a/pkgs/tools/misc/hsd/default.nix b/pkgs/tools/misc/hsd/default.nix index 44100e15283c..d1f41a72a1c2 100644 --- a/pkgs/tools/misc/hsd/default.nix +++ b/pkgs/tools/misc/hsd/default.nix @@ -22,7 +22,7 @@ buildNpmPackage rec { nativeBuildInputs = [ python3 - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ cctools ]; diff --git a/pkgs/tools/misc/hyperfine/default.nix b/pkgs/tools/misc/hyperfine/default.nix index 16de5fa76f3d..e4922824d729 100644 --- a/pkgs/tools/misc/hyperfine/default.nix +++ b/pkgs/tools/misc/hyperfine/default.nix @@ -20,7 +20,7 @@ rustPlatform.buildRustPackage rec { cargoHash = "sha256-E2y/hQNcpW6b/ZJBlsp+2RDH2OgpX4kbn36aBHA5X6U="; nativeBuildInputs = [ installShellFiles ]; - buildInputs = lib.optional stdenv.isDarwin Security; + buildInputs = lib.optional stdenv.hostPlatform.isDarwin Security; postInstall = '' installManPage doc/hyperfine.1 diff --git a/pkgs/tools/misc/iay/default.nix b/pkgs/tools/misc/iay/default.nix index 1ef3d332e75d..5973ed258b59 100644 --- a/pkgs/tools/misc/iay/default.nix +++ b/pkgs/tools/misc/iay/default.nix @@ -28,14 +28,14 @@ rustPlatform.buildRustPackage rec { buildInputs = [ openssl ] - ++ lib.optionals stdenv.isDarwin [ + ++ lib.optionals stdenv.hostPlatform.isDarwin [ AppKit Cocoa Foundation Security ]; - NIX_LDFLAGS = lib.optionals stdenv.isDarwin [ "-framework" "AppKit" ]; + NIX_LDFLAGS = lib.optionals stdenv.hostPlatform.isDarwin [ "-framework" "AppKit" ]; meta = with lib; { description = "Minimalistic, blazing-fast, and extendable prompt for bash and zsh"; diff --git a/pkgs/tools/misc/idutils/default.nix b/pkgs/tools/misc/idutils/default.nix index cbdf1b761049..d065800b458f 100644 --- a/pkgs/tools/misc/idutils/default.nix +++ b/pkgs/tools/misc/idutils/default.nix @@ -16,15 +16,15 @@ stdenv.mkDerivation rec { ./bootstrap --force --gnulib-srcdir=${gnulib} --skip-po --bootstrap-sync --no-git ''; - buildInputs = lib.optionals stdenv.isLinux [ + buildInputs = lib.optionals stdenv.hostPlatform.isLinux [ emacs - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.CoreServices ]; nativeBuildInputs = [ gnulib autoconf bison automake gettext gperf texinfo perl rsync ]; - doCheck = !stdenv.isDarwin; + doCheck = !stdenv.hostPlatform.isDarwin; patches = [ ./nix-mapping.patch ]; diff --git a/pkgs/tools/misc/inav-blackbox-tools/default.nix b/pkgs/tools/misc/inav-blackbox-tools/default.nix index 43524f6a3fe2..228035108a81 100644 --- a/pkgs/tools/misc/inav-blackbox-tools/default.nix +++ b/pkgs/tools/misc/inav-blackbox-tools/default.nix @@ -30,6 +30,6 @@ stdenv.mkDerivation rec { license = licenses.gpl3Only; maintainers = with maintainers; [ expipiplus1 ]; platforms = platforms.all; - broken = stdenv.isDarwin; # never built on Hydra https://hydra.nixos.org/job/nixpkgs/trunk/inav-blackbox-tools.x86_64-darwin + broken = stdenv.hostPlatform.isDarwin; # never built on Hydra https://hydra.nixos.org/job/nixpkgs/trunk/inav-blackbox-tools.x86_64-darwin }; } diff --git a/pkgs/tools/misc/intermodal/default.nix b/pkgs/tools/misc/intermodal/default.nix index 4d6868d5d364..b4b7d7807cb4 100644 --- a/pkgs/tools/misc/intermodal/default.nix +++ b/pkgs/tools/misc/intermodal/default.nix @@ -14,7 +14,7 @@ rustPlatform.buildRustPackage rec { cargoHash = "sha256-k34psGOs6G+B/msmLSDHLNxnjO1yyE4OY6aQU8bt+is="; # include_hidden test tries to use `chflags` on darwin - checkFlags = lib.optionals stdenv.isDarwin [ "--skip=subcommand::torrent::create::tests::include_hidden" ]; + checkFlags = lib.optionals stdenv.hostPlatform.isDarwin [ "--skip=subcommand::torrent::create::tests::include_hidden" ]; nativeBuildInputs = [ installShellFiles ]; diff --git a/pkgs/tools/misc/jdupes/default.nix b/pkgs/tools/misc/jdupes/default.nix index 9c6988846990..6a4b5c3c393c 100644 --- a/pkgs/tools/misc/jdupes/default.nix +++ b/pkgs/tools/misc/jdupes/default.nix @@ -27,7 +27,7 @@ stdenv.mkDerivation (finalAttrs: { makeFlags = [ "PREFIX=${placeholder "out"}" ] - ++ lib.optionals stdenv.isLinux [ + ++ lib.optionals stdenv.hostPlatform.isLinux [ "ENABLE_DEDUPE=1" "STATIC_DEDUPE_H=1" ] diff --git a/pkgs/tools/misc/jsonwatch/default.nix b/pkgs/tools/misc/jsonwatch/default.nix index 451089dc185e..c40e91c87c32 100644 --- a/pkgs/tools/misc/jsonwatch/default.nix +++ b/pkgs/tools/misc/jsonwatch/default.nix @@ -18,7 +18,7 @@ rustPlatform.buildRustPackage rec { cargoHash = "sha256-Gjb7v3kz11iOml3Ykxhy43KNxzaprgMbb5DpPNChLTc="; - buildInputs = lib.optionals stdenv.isDarwin [ + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ Security ]; @@ -35,7 +35,7 @@ rustPlatform.buildRustPackage rec { license = licenses.mit; maintainers = with maintainers; [ fab ]; # never built on aarch64-darwin since first introduction in nixpkgs - broken = stdenv.isDarwin && stdenv.isAarch64; + broken = stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isAarch64; mainProgram = "jsonwatch"; }; } diff --git a/pkgs/tools/misc/krapslog/default.nix b/pkgs/tools/misc/krapslog/default.nix index 5448fa942763..f4f1410ec512 100644 --- a/pkgs/tools/misc/krapslog/default.nix +++ b/pkgs/tools/misc/krapslog/default.nix @@ -13,7 +13,7 @@ rustPlatform.buildRustPackage rec { cargoHash = "sha256-5jhEcwOdzLqzxQsEBqo4d5ecsg/vhiKuVjGYIwFzihE="; - buildInputs = lib.optional stdenv.isDarwin libiconv; + buildInputs = lib.optional stdenv.hostPlatform.isDarwin libiconv; meta = with lib; { description = "Visualize a log file with sparklines"; diff --git a/pkgs/tools/misc/lbdb/default.nix b/pkgs/tools/misc/lbdb/default.nix index 20ea8beaaa83..cd1f8d0c4861 100644 --- a/pkgs/tools/misc/lbdb/default.nix +++ b/pkgs/tools/misc/lbdb/default.nix @@ -29,7 +29,7 @@ stdenv.mkDerivation rec { }; buildInputs = [ perl' ] - ++ lib.optional (!stdenv.isDarwin) bsd-finger + ++ lib.optional (!stdenv.hostPlatform.isDarwin) bsd-finger ++ lib.optional withAbook abook ++ lib.optional withGnupg gnupg ++ lib.optional withGoobook goobook diff --git a/pkgs/tools/misc/leanify/default.nix b/pkgs/tools/misc/leanify/default.nix index f0006ff7f183..81f6205986df 100644 --- a/pkgs/tools/misc/leanify/default.nix +++ b/pkgs/tools/misc/leanify/default.nix @@ -15,14 +15,14 @@ stdenv.mkDerivation rec { hash = "sha256-fLazKCQnOT3bN3Kz25Q80RLk54EU5U6HCf6kPLcXn9c="; }; - postPatch = lib.optionalString stdenv.isDarwin '' + postPatch = lib.optionalString stdenv.hostPlatform.isDarwin '' substituteInPlace Makefile \ --replace-fail "-flto" "" \ --replace-fail "lib/LZMA/Alloc.o" "lib/LZMA/CpuArch.o lib/LZMA/Alloc.o" \ --replace-quiet "-Werror" "" ''; - buildInputs = lib.optionals stdenv.isDarwin [ libiconv ]; + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ libiconv ]; doCheck = true; diff --git a/pkgs/tools/misc/lesspipe/default.nix b/pkgs/tools/misc/lesspipe/default.nix index b2c310bc5f40..8fd4689aaeac 100644 --- a/pkgs/tools/misc/lesspipe/default.nix +++ b/pkgs/tools/misc/lesspipe/default.nix @@ -74,7 +74,7 @@ stdenv.mkDerivation rec { "mdcat" "pandoc" "docx2txt" "libreoffice" "pptx2md" "mdcat" "xlscat" "odt2txt" "wvText" "antiword" "catdoc" "broken_catppt" "sxw2txt" "groff" "mandoc" "unrtf" "dvi2tty" "pod2text" "perldoc" "h5dump" "ncdump" "matdump" "djvutxt" "openssl" "gpg" "plistutil" "plutil" "id3v2" "csvlook" "jq" "zlib-flate" "lessfilter" - ] ++ lib.optional (stdenv.isDarwin || stdenv.isFreeBSD) [ + ] ++ lib.optional (stdenv.hostPlatform.isDarwin || stdenv.hostPlatform.isFreeBSD) [ # resholve only identifies this on darwin/bsd # call site is guarded by || so it's safe to leave dynamic "locale" diff --git a/pkgs/tools/misc/lighthouse-steamvr/default.nix b/pkgs/tools/misc/lighthouse-steamvr/default.nix index 4ddd33ff1872..1898bfc7b295 100644 --- a/pkgs/tools/misc/lighthouse-steamvr/default.nix +++ b/pkgs/tools/misc/lighthouse-steamvr/default.nix @@ -27,7 +27,7 @@ rustPlatform.buildRustPackage rec { buildInputs = [ dbus ]; meta = with lib; { - broken = stdenv.isDarwin; + broken = stdenv.hostPlatform.isDarwin; description = "VR Lighthouse power state management"; homepage = "https://github.com/ShayBox/Lighthouse"; license = licenses.mit; diff --git a/pkgs/tools/misc/livedl/default.nix b/pkgs/tools/misc/livedl/default.nix index 6db500695933..9a3b4c3fd1f6 100644 --- a/pkgs/tools/misc/livedl/default.nix +++ b/pkgs/tools/misc/livedl/default.nix @@ -22,7 +22,7 @@ buildGoModule rec { license = licenses.mit; maintainers = with maintainers; [ wakira ]; platforms = platforms.linux ++ platforms.darwin; - broken = stdenv.isDarwin; # build fails with go > 1.17 + broken = stdenv.hostPlatform.isDarwin; # build fails with go > 1.17 mainProgram = "livedl"; }; } diff --git a/pkgs/tools/misc/lorri/default.nix b/pkgs/tools/misc/lorri/default.nix index 001efe6563b8..6ba07b3d874e 100644 --- a/pkgs/tools/misc/lorri/default.nix +++ b/pkgs/tools/misc/lorri/default.nix @@ -38,7 +38,7 @@ in (rustPlatform.buildRustPackage rec { RUN_TIME_CLOSURE = pkgs.callPackage ./runtime.nix { }; nativeBuildInputs = [ rustPackages.rustfmt ]; - buildInputs = lib.optionals stdenv.isDarwin [ CoreServices Security ]; + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ CoreServices Security ]; # copy the docs to the $man and $doc outputs postInstall = '' diff --git a/pkgs/tools/misc/macchina/default.nix b/pkgs/tools/misc/macchina/default.nix index 036d500f6b65..d5b4343362a6 100644 --- a/pkgs/tools/misc/macchina/default.nix +++ b/pkgs/tools/misc/macchina/default.nix @@ -23,7 +23,7 @@ rustPlatform.buildRustPackage rec { installShellFiles ]; - buildInputs = lib.optionals stdenv.isDarwin [ + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.AppKit darwin.apple_sdk.frameworks.DisplayServices ]; diff --git a/pkgs/tools/misc/marlin-calc/default.nix b/pkgs/tools/misc/marlin-calc/default.nix index dc8ff4221009..ec8e90631b54 100644 --- a/pkgs/tools/misc/marlin-calc/default.nix +++ b/pkgs/tools/misc/marlin-calc/default.nix @@ -32,7 +32,7 @@ stdenv.mkDerivation { license = licenses.gpl3; maintainers = with maintainers; [ gebner ]; platforms = platforms.unix; - broken = stdenv.isDarwin; # never built on Hydra https://hydra.nixos.org/job/nixpkgs/trunk/marlin-calc.x86_64-darwin + broken = stdenv.hostPlatform.isDarwin; # never built on Hydra https://hydra.nixos.org/job/nixpkgs/trunk/marlin-calc.x86_64-darwin mainProgram = "marlin-calc"; }; } diff --git a/pkgs/tools/misc/memtest86+/default.nix b/pkgs/tools/misc/memtest86+/default.nix index 72b74039f780..d7dc5606a647 100644 --- a/pkgs/tools/misc/memtest86+/default.nix +++ b/pkgs/tools/misc/memtest86+/default.nix @@ -19,7 +19,7 @@ stdenv.mkDerivation (finalAttrs: { passthru.efi = "${finalAttrs.finalPackage}/memtest.efi"; preBuild = '' - cd ${if stdenv.isi686 then "build32" else "build64"} + cd ${if stdenv.hostPlatform.isi686 then "build32" else "build64"} ''; installPhase = '' diff --git a/pkgs/tools/misc/minicom/default.nix b/pkgs/tools/misc/minicom/default.nix index 50043a132b14..89653c26d6a0 100644 --- a/pkgs/tools/misc/minicom/default.nix +++ b/pkgs/tools/misc/minicom/default.nix @@ -22,7 +22,7 @@ stdenv.mkDerivation rec { sha256 = "sha256-+fKvHrApDXm94LItXv+xSDIE5zD7rTY5IeNSuzQglpg="; }; - buildInputs = [ ncurses ] ++ lib.optionals stdenv.isDarwin [ libiconv IOKit ]; + buildInputs = [ ncurses ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ libiconv IOKit ]; nativeBuildInputs = [ autoreconfHook makeWrapper pkg-config ]; diff --git a/pkgs/tools/misc/miniserve/default.nix b/pkgs/tools/misc/miniserve/default.nix index 745d18715ba3..7822fd6d8d20 100644 --- a/pkgs/tools/misc/miniserve/default.nix +++ b/pkgs/tools/misc/miniserve/default.nix @@ -24,7 +24,7 @@ rustPlatform.buildRustPackage rec { installShellFiles ]; - buildInputs = lib.optionals stdenv.isDarwin [ + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.Security darwin.apple_sdk.frameworks.SystemConfiguration ]; diff --git a/pkgs/tools/misc/mise/default.nix b/pkgs/tools/misc/mise/default.nix index 473d7a308f23..ace598e053b7 100644 --- a/pkgs/tools/misc/mise/default.nix +++ b/pkgs/tools/misc/mise/default.nix @@ -35,7 +35,7 @@ rustPlatform.buildRustPackage rec { cargoHash = "sha256-jGqaGbue+AEK0YjhHMlm84XBgA20p8Um03TjctjXVz0="; nativeBuildInputs = [ installShellFiles pkg-config ]; - buildInputs = [ openssl ] ++ lib.optionals stdenv.isDarwin [ Security SystemConfiguration ]; + buildInputs = [ openssl ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ Security SystemConfiguration ]; postPatch = '' patchShebangs --build \ diff --git a/pkgs/tools/misc/mktorrent/default.nix b/pkgs/tools/misc/mktorrent/default.nix index 74f449969a66..3fb3f7390fe6 100644 --- a/pkgs/tools/misc/mktorrent/default.nix +++ b/pkgs/tools/misc/mktorrent/default.nix @@ -12,8 +12,8 @@ stdenv.mkDerivation rec { }; makeFlags = [ "USE_PTHREADS=1" "USE_OPENSSL=1" "USE_LONG_OPTIONS=1" ] - ++ lib.optional stdenv.isi686 "USE_LARGE_FILES=1" - ++ lib.optional stdenv.isLinux "CFLAGS=-lgcc_s"; + ++ lib.optional stdenv.hostPlatform.isi686 "USE_LARGE_FILES=1" + ++ lib.optional stdenv.hostPlatform.isLinux "CFLAGS=-lgcc_s"; installFlags = [ "PREFIX=${placeholder "out"}" ]; diff --git a/pkgs/tools/misc/moreutils/default.nix b/pkgs/tools/misc/moreutils/default.nix index 694e9ac93ee1..e557a05f3062 100644 --- a/pkgs/tools/misc/moreutils/default.nix +++ b/pkgs/tools/misc/moreutils/default.nix @@ -26,7 +26,7 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ makeWrapper perl libxml2 libxslt docbook-xsl docbook_xml_dtd_44 ]; buildInputs = [ (perl.withPackages (p: [ p.IPCRun p.TimeDate p.TimeDuration ])) - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ cctools ]; diff --git a/pkgs/tools/misc/mpdscribble/default.nix b/pkgs/tools/misc/mpdscribble/default.nix index e7baa6641ccf..c4e7ad591eb6 100644 --- a/pkgs/tools/misc/mpdscribble/default.nix +++ b/pkgs/tools/misc/mpdscribble/default.nix @@ -38,7 +38,7 @@ stdenv.mkDerivation rec { curl boost libgcrypt - ] ++ lib.optional stdenv.isLinux systemd; + ] ++ lib.optional stdenv.hostPlatform.isLinux systemd; meta = with lib; { description = "MPD client which submits info about tracks being played to a scrobbler"; diff --git a/pkgs/tools/misc/mpy-utils/default.nix b/pkgs/tools/misc/mpy-utils/default.nix index 0ee7701b730b..342b6875c204 100644 --- a/pkgs/tools/misc/mpy-utils/default.nix +++ b/pkgs/tools/misc/mpy-utils/default.nix @@ -16,6 +16,6 @@ buildPythonApplication rec { homepage = "https://github.com/nickzoic/mpy-utils"; license = licenses.mit; maintainers = with maintainers; [ aciceri ]; - broken = stdenv.isDarwin; + broken = stdenv.hostPlatform.isDarwin; }; } diff --git a/pkgs/tools/misc/mynewt-newtmgr/default.nix b/pkgs/tools/misc/mynewt-newtmgr/default.nix index 1ad1bb7ac1bb..d78c6304a1e3 100644 --- a/pkgs/tools/misc/mynewt-newtmgr/default.nix +++ b/pkgs/tools/misc/mynewt-newtmgr/default.nix @@ -34,6 +34,6 @@ buildGoModule rec { license = licenses.asl20; maintainers = with maintainers; [ bezmuth ]; # never built on aarch64-darwin, x86_64-darwin since first introduction in nixpkgs - broken = stdenv.isDarwin; + broken = stdenv.hostPlatform.isDarwin; }; } diff --git a/pkgs/tools/misc/nbench/default.nix b/pkgs/tools/misc/nbench/default.nix index 44beea57fbb3..b8fa6abfbada 100644 --- a/pkgs/tools/misc/nbench/default.nix +++ b/pkgs/tools/misc/nbench/default.nix @@ -12,7 +12,7 @@ stdenv.mkDerivation rec { prePatch = '' substituteInPlace nbench1.h --replace '"NNET.DAT"' "\"$out/NNET.DAT\"" substituteInPlace sysspec.h --replace "malloc.h" "stdlib.h" - '' + lib.optionalString stdenv.isDarwin '' + '' + lib.optionalString stdenv.hostPlatform.isDarwin '' substituteInPlace Makefile --replace "-static" "" ''; diff --git a/pkgs/tools/misc/ncdu/default.nix b/pkgs/tools/misc/ncdu/default.nix index 5209522d2529..abde0b0d79e1 100644 --- a/pkgs/tools/misc/ncdu/default.nix +++ b/pkgs/tools/misc/ncdu/default.nix @@ -5,7 +5,7 @@ , zig , installShellFiles , testers -, pie ? stdenv.isDarwin +, pie ? stdenv.hostPlatform.isDarwin }: stdenv.mkDerivation (finalAttrs: { diff --git a/pkgs/tools/misc/noti/default.nix b/pkgs/tools/misc/noti/default.nix index 3401f74de937..1c33f4ff73d3 100644 --- a/pkgs/tools/misc/noti/default.nix +++ b/pkgs/tools/misc/noti/default.nix @@ -21,7 +21,7 @@ buildGoModule rec { nativeBuildInputs = [ installShellFiles ]; - buildInputs = lib.optional stdenv.isDarwin Cocoa; + buildInputs = lib.optional stdenv.hostPlatform.isDarwin Cocoa; ldflags = [ "-s" diff --git a/pkgs/tools/misc/ntfy/default.nix b/pkgs/tools/misc/ntfy/default.nix index 54e232eafd9c..d28688c63399 100644 --- a/pkgs/tools/misc/ntfy/default.nix +++ b/pkgs/tools/misc/ntfy/default.nix @@ -3,12 +3,12 @@ , python39 , fetchFromGitHub , fetchpatch -, withXmpp ? !stdenv.isDarwin +, withXmpp ? !stdenv.hostPlatform.isDarwin , withMatrix ? true , withSlack ? true , withEmoji ? true , withPid ? true -, withDbus ? stdenv.isLinux +, withDbus ? stdenv.hostPlatform.isLinux }: let diff --git a/pkgs/tools/misc/nurl/default.nix b/pkgs/tools/misc/nurl/default.nix index e0af2ff638dd..752427cdb0e9 100644 --- a/pkgs/tools/misc/nurl/default.nix +++ b/pkgs/tools/misc/nurl/default.nix @@ -33,7 +33,7 @@ rustPlatform.buildRustPackage rec { makeBinaryWrapper ]; - buildInputs = lib.optionals stdenv.isDarwin [ + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.Security ]; diff --git a/pkgs/tools/misc/nvimpager/default.nix b/pkgs/tools/misc/nvimpager/default.nix index 80900bf30ae8..364b825292f2 100644 --- a/pkgs/tools/misc/nvimpager/default.nix +++ b/pkgs/tools/misc/nvimpager/default.nix @@ -33,7 +33,7 @@ stdenv.mkDerivation rec { # filter out one test that fails in the sandbox of nix or with neovim v0.10 # or on macOS preCheck = '' - checkFlagsArray+=('BUSTED=busted --output TAP --exclude-tags=${"nix,v10" + lib.optionalString stdenv.isDarwin ",mac"}') + checkFlagsArray+=('BUSTED=busted --output TAP --exclude-tags=${"nix,v10" + lib.optionalString stdenv.hostPlatform.isDarwin ",mac"}') ''; meta = with lib; { diff --git a/pkgs/tools/misc/octofetch/default.nix b/pkgs/tools/misc/octofetch/default.nix index f254e77ebdea..1218cb1f7b0f 100644 --- a/pkgs/tools/misc/octofetch/default.nix +++ b/pkgs/tools/misc/octofetch/default.nix @@ -22,8 +22,8 @@ rustPlatform.buildRustPackage rec { nativeBuildInputs = [ pkg-config ]; - buildInputs = lib.optionals stdenv.isLinux [ openssl ] - ++ lib.optionals stdenv.isDarwin [ Security ]; + buildInputs = lib.optionals stdenv.hostPlatform.isLinux [ openssl ] + ++ lib.optionals stdenv.hostPlatform.isDarwin [ Security ]; meta = with lib; { homepage = "https://github.com/azur1s/octofetch"; diff --git a/pkgs/tools/misc/oggvideotools/default.nix b/pkgs/tools/misc/oggvideotools/default.nix index 13c13f086a29..004fb3579253 100644 --- a/pkgs/tools/misc/oggvideotools/default.nix +++ b/pkgs/tools/misc/oggvideotools/default.nix @@ -46,6 +46,6 @@ stdenv.mkDerivation rec { # Compilation error on Darwin: # error: invalid argument '--std=c++0x' not allowed with 'C' # make[2]: *** [src/libresample/CMakeFiles/resample.dir/build.make:76: src/libresample/CMakeFiles/resample.dir/filterkit.c.o] Error 1 - broken = stdenv.isDarwin; + broken = stdenv.hostPlatform.isDarwin; }; } diff --git a/pkgs/tools/misc/onefetch/default.nix b/pkgs/tools/misc/onefetch/default.nix index 2436b68da434..2beca6a81501 100644 --- a/pkgs/tools/misc/onefetch/default.nix +++ b/pkgs/tools/misc/onefetch/default.nix @@ -33,7 +33,7 @@ rustPlatform.buildRustPackage rec { nativeBuildInputs = [ cmake installShellFiles pkg-config ]; buildInputs = [ zstd ] - ++ lib.optionals stdenv.isDarwin [ CoreFoundation libresolv Security ]; + ++ lib.optionals stdenv.hostPlatform.isDarwin [ CoreFoundation libresolv Security ]; nativeCheckInputs = [ git diff --git a/pkgs/tools/misc/opentelemetry-collector/contrib.nix b/pkgs/tools/misc/opentelemetry-collector/contrib.nix index 017fd1a015d7..a2a0b255d008 100644 --- a/pkgs/tools/misc/opentelemetry-collector/contrib.nix +++ b/pkgs/tools/misc/opentelemetry-collector/contrib.nix @@ -30,7 +30,7 @@ buildGoModule rec { CGO_ENABLED = 0; # journalctl is required in-$PATH for the journald receiver tests. - nativeCheckInputs = lib.optionals stdenv.isLinux [ systemdMinimal ]; + nativeCheckInputs = lib.optionals stdenv.hostPlatform.isLinux [ systemdMinimal ]; # We don't inject the package into propagatedBuildInputs unless # asked to avoid hard-requiring a large package. For the journald diff --git a/pkgs/tools/misc/ostree-rs-ext/default.nix b/pkgs/tools/misc/ostree-rs-ext/default.nix index d7b09b65f7ae..ece63fe6768a 100644 --- a/pkgs/tools/misc/ostree-rs-ext/default.nix +++ b/pkgs/tools/misc/ostree-rs-ext/default.nix @@ -44,7 +44,7 @@ rustPlatform.buildRustPackage rec { openssl zlib ostree - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.CoreFoundation darwin.apple_sdk.frameworks.Security ]; diff --git a/pkgs/tools/misc/otel-cli/default.nix b/pkgs/tools/misc/otel-cli/default.nix index 09c248178244..b0c4e38c4c52 100644 --- a/pkgs/tools/misc/otel-cli/default.nix +++ b/pkgs/tools/misc/otel-cli/default.nix @@ -15,7 +15,7 @@ buildGoModule rec { preCheck = '' ln -s $GOPATH/bin/otel-cli . - '' + lib.optionalString (!stdenv.isDarwin) '' + '' + lib.optionalString (!stdenv.hostPlatform.isDarwin) '' substituteInPlace main_test.go \ --replace-fail 'const minimumPath = `/bin:/usr/bin`' 'const minimumPath = `${lib.makeBinPath [ getent coreutils ]}`' ''; diff --git a/pkgs/tools/misc/otfcc/default.nix b/pkgs/tools/misc/otfcc/default.nix index aa0d86253d77..d45c800464ab 100644 --- a/pkgs/tools/misc/otfcc/default.nix +++ b/pkgs/tools/misc/otfcc/default.nix @@ -18,7 +18,7 @@ stdenv.mkDerivation rec { ./move-makefiles.patch ]; - buildFlags = lib.optionals stdenv.isAarch64 [ "config=release_arm" ]; + buildFlags = lib.optionals stdenv.hostPlatform.isAarch64 [ "config=release_arm" ]; installPhase = '' mkdir -p $out/bin diff --git a/pkgs/tools/misc/owofetch/default.nix b/pkgs/tools/misc/owofetch/default.nix index 22bbc4ba72fb..20d9cc160d7a 100644 --- a/pkgs/tools/misc/owofetch/default.nix +++ b/pkgs/tools/misc/owofetch/default.nix @@ -20,7 +20,7 @@ rustPlatform.buildRustPackage rec { cargoHash = "sha256-rfN4QERs1H1G7ZZim//78vlxbYfU4Cx7SYYUz/QLKeU="; - buildInputs = lib.optionals stdenvNoCC.isDarwin [ + buildInputs = lib.optionals stdenvNoCC.hostPlatform.isDarwin [ Foundation DiskArbitration ]; diff --git a/pkgs/tools/misc/pazi/default.nix b/pkgs/tools/misc/pazi/default.nix index de771e9e86a5..2ccabe628098 100644 --- a/pkgs/tools/misc/pazi/default.nix +++ b/pkgs/tools/misc/pazi/default.nix @@ -13,7 +13,7 @@ rustPlatform.buildRustPackage rec { nativeBuildInputs = [ installShellFiles ]; - buildInputs = lib.optionals stdenv.isDarwin [ darwin.apple_sdk.frameworks.Security ]; + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.Security ]; cargoHash = "sha256-7ChHYcyzRPFkZ+zh9lBOHcOizDvJf2cp9ULoI7Ofmqk="; diff --git a/pkgs/tools/misc/pfetch-rs/default.nix b/pkgs/tools/misc/pfetch-rs/default.nix index 0a2e3c9ec38d..f86b71f72c7b 100644 --- a/pkgs/tools/misc/pfetch-rs/default.nix +++ b/pkgs/tools/misc/pfetch-rs/default.nix @@ -13,7 +13,7 @@ rustPlatform.buildRustPackage rec { cargoHash = "sha256-/gYL32kUA4gKTGogMrOghQ3XYFjw3GsDhzynUC/OyXY="; - buildInputs = lib.optionals stdenv.isDarwin [ + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.AppKit darwin.apple_sdk.frameworks.DisplayServices ]; diff --git a/pkgs/tools/misc/pgbadger/default.nix b/pkgs/tools/misc/pgbadger/default.nix index 27c532e8144c..d25b4db9068f 100644 --- a/pkgs/tools/misc/pgbadger/default.nix +++ b/pkgs/tools/misc/pgbadger/default.nix @@ -32,7 +32,7 @@ buildPerlPackage rec { # pgbadger has too many `-Idir` flags on its shebang line on Darwin, # causing the build to fail when trying to generate the documentation. # Rewrite the -I flags in `use lib` form. - preBuild = lib.optionalString stdenv.isDarwin '' + preBuild = lib.optionalString stdenv.hostPlatform.isDarwin '' shortenPerlShebang ./pgbadger ''; @@ -46,7 +46,7 @@ buildPerlPackage rec { TextCSV_XS ]; - nativeBuildInputs = lib.optionals stdenv.isDarwin [ shortenPerlShebang ]; + nativeBuildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ shortenPerlShebang ]; nativeCheckInputs = [ bzip2 diff --git a/pkgs/tools/misc/piston-cli/default.nix b/pkgs/tools/misc/piston-cli/default.nix index 68519f2eb643..0309832787a4 100644 --- a/pkgs/tools/misc/piston-cli/default.nix +++ b/pkgs/tools/misc/piston-cli/default.nix @@ -27,7 +27,7 @@ python3Packages.buildPythonApplication rec { ]; meta = with lib; { - broken = stdenv.isDarwin; + broken = stdenv.hostPlatform.isDarwin; description = "Piston api tool"; homepage = "https://github.com/Shivansh-007/piston-cli"; license = licenses.mit; diff --git a/pkgs/tools/misc/powerline-rs/default.nix b/pkgs/tools/misc/powerline-rs/default.nix index 53077c58848a..77506e95ba0a 100644 --- a/pkgs/tools/misc/powerline-rs/default.nix +++ b/pkgs/tools/misc/powerline-rs/default.nix @@ -15,7 +15,7 @@ rustPlatform.buildRustPackage rec { cargoHash = "sha256-NAhLTrTshCm1QKGaOdD/YaqD6c3oYZwVBst8fvTlScQ="; nativeBuildInputs = [ pkg-config file perl cmake curl ]; - buildInputs = [ openssl libssh2 libgit2 libzip ] ++ lib.optional stdenv.isDarwin Security; + buildInputs = [ openssl libssh2 libgit2 libzip ] ++ lib.optional stdenv.hostPlatform.isDarwin Security; COMPLETION_OUT = "out"; postInstall = '' diff --git a/pkgs/tools/misc/pre-commit/default.nix b/pkgs/tools/misc/pre-commit/default.nix index 0afa9180a47d..4901663d0d02 100644 --- a/pkgs/tools/misc/pre-commit/default.nix +++ b/pkgs/tools/misc/pre-commit/default.nix @@ -81,7 +81,7 @@ buildPythonApplication rec { "--forked" ]; - preCheck = lib.optionalString (!(stdenv.isLinux && stdenv.isAarch64)) '' + preCheck = lib.optionalString (!(stdenv.hostPlatform.isLinux && stdenv.hostPlatform.isAarch64)) '' # Disable outline atomics for rust tests on aarch64-linux. export RUSTFLAGS="-Ctarget-feature=-outline-atomics" '' + '' diff --git a/pkgs/tools/misc/qflipper/default.nix b/pkgs/tools/misc/qflipper/default.nix index 7a344e9b0c43..5ad26ab739e7 100644 --- a/pkgs/tools/misc/qflipper/default.nix +++ b/pkgs/tools/misc/qflipper/default.nix @@ -62,7 +62,7 @@ mkDerivation { qtquickcontrols qtquickcontrols2 qtgraphicaleffects - ] ++ lib.optionals (stdenv.isLinux) [ + ] ++ lib.optionals (stdenv.hostPlatform.isLinux) [ qtwayland ]; @@ -83,7 +83,7 @@ mkDerivation { postInstall = '' mkdir -p $out/bin - ${lib.optionalString stdenv.isDarwin '' + ${lib.optionalString stdenv.hostPlatform.isDarwin '' cp qFlipper.app/Contents/MacOS/qFlipper $out/bin ''} cp qFlipper-cli $out/bin @@ -95,7 +95,7 @@ mkDerivation { passthru.updateScript = nix-update-script { }; meta = with lib; { - broken = stdenv.isDarwin; + broken = stdenv.hostPlatform.isDarwin; description = "Cross-platform desktop tool to manage your flipper device"; homepage = "https://flipperzero.one/"; license = licenses.gpl3Only; diff --git a/pkgs/tools/misc/qrscan/default.nix b/pkgs/tools/misc/qrscan/default.nix index 1ad4c526e752..479c6102818a 100644 --- a/pkgs/tools/misc/qrscan/default.nix +++ b/pkgs/tools/misc/qrscan/default.nix @@ -33,7 +33,7 @@ rustPlatform.buildRustPackage rec { mainProgram = "qrscan"; homepage = "https://github.com/sayanarijit/qrscan"; license = licenses.mit; - broken = stdenv.isDarwin; + broken = stdenv.hostPlatform.isDarwin; maintainers = [ maintainers.sayanarijit ]; }; } diff --git a/pkgs/tools/misc/rates/default.nix b/pkgs/tools/misc/rates/default.nix index d121453bd7d9..c774721eeecc 100644 --- a/pkgs/tools/misc/rates/default.nix +++ b/pkgs/tools/misc/rates/default.nix @@ -18,7 +18,7 @@ rustPlatform.buildRustPackage rec { cargoHash = "sha256-5EcTeMfa1GNp1q60qSgEi/I3298hXUD1Vc1K55XGW4I="; - buildInputs = lib.optional stdenv.isDarwin Security; + buildInputs = lib.optional stdenv.hostPlatform.isDarwin Security; meta = with lib; { description = "CLI tool that brings currency exchange rates right into your terminal"; diff --git a/pkgs/tools/misc/remote-exec/default.nix b/pkgs/tools/misc/remote-exec/default.nix index edf581b183ce..e9edaacd6a27 100644 --- a/pkgs/tools/misc/remote-exec/default.nix +++ b/pkgs/tools/misc/remote-exec/default.nix @@ -56,7 +56,7 @@ buildPythonApplication rec { pytest-cov-stub ]; - disabledTestPaths = lib.optionals stdenv.isDarwin [ + disabledTestPaths = lib.optionals stdenv.hostPlatform.isDarwin [ # `watchdog` dependency does not correctly detect fsevents on darwin. # this only affects `remote --stream-changes` "test/test_file_changes.py" diff --git a/pkgs/tools/misc/renameutils/default.nix b/pkgs/tools/misc/renameutils/default.nix index e3ce23eca0a3..e09b7c60f971 100644 --- a/pkgs/tools/misc/renameutils/default.nix +++ b/pkgs/tools/misc/renameutils/default.nix @@ -11,7 +11,7 @@ stdenv.mkDerivation rec { patches = [ ./install-exec.patch ]; - postPatch = lib.optionalString stdenv.isDarwin '' + postPatch = lib.optionalString stdenv.hostPlatform.isDarwin '' substituteInPlace src/apply.c \ --replace "command = \"mv\"" "command = \"${coreutils}/bin/mv\"" \ --replace "command = \"cp\"" "command = \"${coreutils}/bin/cp\"" @@ -24,7 +24,7 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ readline ]; - preConfigure = lib.optionalString (stdenv.isDarwin && stdenv.isAarch64) '' + preConfigure = lib.optionalString (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isAarch64) '' export ac_cv_func_lstat64=no ''; diff --git a/pkgs/tools/misc/rlwrap/default.nix b/pkgs/tools/misc/rlwrap/default.nix index f1c2d6a58971..68baa3318871 100644 --- a/pkgs/tools/misc/rlwrap/default.nix +++ b/pkgs/tools/misc/rlwrap/default.nix @@ -20,7 +20,7 @@ stdenv.mkDerivation rec { buildInputs = [ readline ]; - env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.isDarwin "-Wno-error=implicit-function-declaration"; + env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.hostPlatform.isDarwin "-Wno-error=implicit-function-declaration"; meta = with lib; { description = "Readline wrapper for console programs"; diff --git a/pkgs/tools/misc/rmlint/default.nix b/pkgs/tools/misc/rmlint/default.nix index 08a0a0c5e146..829987d6094e 100644 --- a/pkgs/tools/misc/rmlint/default.nix +++ b/pkgs/tools/misc/rmlint/default.nix @@ -17,7 +17,7 @@ , wrapGAppsHook3 , withGui ? false }: -assert withGui -> !stdenv.isDarwin; +assert withGui -> !stdenv.hostPlatform.isDarwin; stdenv.mkDerivation rec { pname = "rmlint"; diff --git a/pkgs/tools/misc/routino/default.nix b/pkgs/tools/misc/routino/default.nix index 75ea2c24ecb8..e430a3063e2c 100644 --- a/pkgs/tools/misc/routino/default.nix +++ b/pkgs/tools/misc/routino/default.nix @@ -10,7 +10,7 @@ stdenv.mkDerivation rec { }; patchFlags = [ "-p0" ]; - patches = lib.optionals stdenv.isDarwin [ + patches = lib.optionals stdenv.hostPlatform.isDarwin [ (fetchpatch { url = "https://raw.githubusercontent.com/macports/macports-ports/18fd229516a46e7272003acbe555735b2a902db7/gis/routino/files/patch-Makefile_conf.diff"; sha256 = "1b7hpa4sizansnwwxq1c031nxwdwh71pg08jl9z9apiab8pjsn53"; @@ -21,7 +21,7 @@ stdenv.mkDerivation rec { }) ]; - postPatch = lib.optionalString stdenv.isDarwin '' + postPatch = lib.optionalString stdenv.hostPlatform.isDarwin '' substituteInPlace Makefile.conf \ --subst-var-by PREFIX $out ''; diff --git a/pkgs/tools/misc/rtz/default.nix b/pkgs/tools/misc/rtz/default.nix index 61bf79379ee5..a5f55342a13a 100644 --- a/pkgs/tools/misc/rtz/default.nix +++ b/pkgs/tools/misc/rtz/default.nix @@ -36,7 +36,7 @@ rustPlatform.buildRustPackage rec { bzip2 openssl zstd - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.Security darwin.apple_sdk.frameworks.SystemConfiguration ]; diff --git a/pkgs/tools/misc/rust-motd/default.nix b/pkgs/tools/misc/rust-motd/default.nix index 26b582e5e944..df79acf5f1c5 100644 --- a/pkgs/tools/misc/rust-motd/default.nix +++ b/pkgs/tools/misc/rust-motd/default.nix @@ -26,7 +26,7 @@ rustPlatform.buildRustPackage rec { buildInputs = [ openssl - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ Security ]; diff --git a/pkgs/tools/misc/rustypaste-cli/default.nix b/pkgs/tools/misc/rustypaste-cli/default.nix index 8f87e508a7be..a59668353739 100644 --- a/pkgs/tools/misc/rustypaste-cli/default.nix +++ b/pkgs/tools/misc/rustypaste-cli/default.nix @@ -18,7 +18,7 @@ rustPlatform.buildRustPackage rec { cargoHash = "sha256-UaOUEuh7NNIhXOKqHEfVRv1hXld7qmdPdazATalXvQU="; - buildInputs = lib.optionals stdenv.isDarwin [ + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.Security ]; diff --git a/pkgs/tools/misc/sagoin/default.nix b/pkgs/tools/misc/sagoin/default.nix index 1469bb6e3454..7764781dc01b 100644 --- a/pkgs/tools/misc/sagoin/default.nix +++ b/pkgs/tools/misc/sagoin/default.nix @@ -21,7 +21,7 @@ rustPlatform.buildRustPackage rec { nativeBuildInputs = [ installShellFiles ]; - buildInputs = lib.optionals stdenv.isDarwin [ + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.CoreServices ]; diff --git a/pkgs/tools/misc/screen/default.nix b/pkgs/tools/misc/screen/default.nix index 29f7fe5ea846..e952fa6f253c 100644 --- a/pkgs/tools/misc/screen/default.nix +++ b/pkgs/tools/misc/screen/default.nix @@ -31,8 +31,8 @@ stdenv.mkDerivation rec { buildInputs = [ ncurses libxcrypt - ] ++ lib.optional stdenv.isLinux pam - ++ lib.optional stdenv.isDarwin utmp; + ] ++ lib.optional stdenv.hostPlatform.isLinux pam + ++ lib.optional stdenv.hostPlatform.isDarwin utmp; doCheck = true; diff --git a/pkgs/tools/misc/screenfetch/default.nix b/pkgs/tools/misc/screenfetch/default.nix index e3ad0e5c51c8..c4eb669875d6 100644 --- a/pkgs/tools/misc/screenfetch/default.nix +++ b/pkgs/tools/misc/screenfetch/default.nix @@ -7,11 +7,11 @@ let path = lib.makeBinPath ([ coreutils gawk gnused findutils gnugrep ncurses bc pciutils - ] ++ lib.optionals stdenv.isLinux [ + ] ++ lib.optionals stdenv.hostPlatform.isLinux [ procps xdpyinfo xprop - ] ++ lib.optionals stdenv.isDarwin (with darwin; [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin (with darwin; [ adv_cmds DarwinTools system_cmds diff --git a/pkgs/tools/misc/sfeed/default.nix b/pkgs/tools/misc/sfeed/default.nix index 3217b8f20d52..818f84ed37df 100644 --- a/pkgs/tools/misc/sfeed/default.nix +++ b/pkgs/tools/misc/sfeed/default.nix @@ -14,12 +14,12 @@ stdenv.mkDerivation rec { makeFlags = [ "RANLIB:=$(RANLIB)" "SFEED_CURSES_LDFLAGS:=-lncurses" ] # use macOS's strlcat() and strlcpy() instead of vendored ones - ++ lib.optional stdenv.isDarwin "COMPATOBJ:="; + ++ lib.optional stdenv.hostPlatform.isDarwin "COMPATOBJ:="; installFlags = [ "PREFIX=$(out)" ]; # otherwise does not find SIGWINCH - env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.isDarwin "-D_DARWIN_C_SOURCE"; + env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.hostPlatform.isDarwin "-D_DARWIN_C_SOURCE"; meta = with lib; { homepage = "https://codemadness.org/sfeed-simple-feed-parser.html"; diff --git a/pkgs/tools/misc/shadowenv/default.nix b/pkgs/tools/misc/shadowenv/default.nix index 34597142522c..3c18662db5e7 100644 --- a/pkgs/tools/misc/shadowenv/default.nix +++ b/pkgs/tools/misc/shadowenv/default.nix @@ -15,7 +15,7 @@ rustPlatform.buildRustPackage rec { nativeBuildInputs = [ installShellFiles ]; - buildInputs = lib.optionals stdenv.isDarwin [ Security ]; + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ Security ]; postInstall = '' installManPage man/man1/shadowenv.1 diff --git a/pkgs/tools/misc/sheldon/default.nix b/pkgs/tools/misc/sheldon/default.nix index cf48868097b5..3d5e2e84a566 100644 --- a/pkgs/tools/misc/sheldon/default.nix +++ b/pkgs/tools/misc/sheldon/default.nix @@ -22,7 +22,7 @@ rustPlatform.buildRustPackage rec { cargoHash = "sha256-+yTX1wUfVVjsM42X0QliL+0xbzTPheADZibPh/5Czh8="; - buildInputs = [ openssl ] ++ lib.optionals stdenv.isDarwin [ Security curl ]; + buildInputs = [ openssl ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ Security curl ]; nativeBuildInputs = [ installShellFiles pkg-config ]; # Needs network connection diff --git a/pkgs/tools/misc/shelldap/default.nix b/pkgs/tools/misc/shelldap/default.nix index dcc95b24ef48..1b3fd5c5806d 100644 --- a/pkgs/tools/misc/shelldap/default.nix +++ b/pkgs/tools/misc/shelldap/default.nix @@ -28,7 +28,7 @@ perlPackages.buildPerlPackage rec { YAMLSyck ]; - nativeBuildInputs = lib.optional stdenv.isDarwin shortenPerlShebang; + nativeBuildInputs = lib.optional stdenv.hostPlatform.isDarwin shortenPerlShebang; prePatch = '' touch Makefile.PL @@ -40,7 +40,7 @@ perlPackages.buildPerlPackage rec { runHook postInstall ''; - postInstall = lib.optionalString stdenv.isDarwin '' + postInstall = lib.optionalString stdenv.hostPlatform.isDarwin '' shortenPerlShebang $out/bin/shelldap ''; diff --git a/pkgs/tools/misc/skim/default.nix b/pkgs/tools/misc/skim/default.nix index bb51fd8899bd..4e09f021cc5f 100644 --- a/pkgs/tools/misc/skim/default.nix +++ b/pkgs/tools/misc/skim/default.nix @@ -43,7 +43,7 @@ rustPlatform.buildRustPackage rec { ''; # https://github.com/lotabout/skim/issues/440 - doCheck = !stdenv.isAarch64; + doCheck = !stdenv.hostPlatform.isAarch64; meta = with lib; { description = "Command-line fuzzy finder written in Rust"; diff --git a/pkgs/tools/misc/sshx/default.nix b/pkgs/tools/misc/sshx/default.nix index 1daddeb8182a..0929703288e0 100644 --- a/pkgs/tools/misc/sshx/default.nix +++ b/pkgs/tools/misc/sshx/default.nix @@ -27,7 +27,7 @@ let nativeBuildInputs = [ protobuf ]; - buildInputs = lib.optional stdenv.isDarwin darwin.apple_sdk.frameworks.Security; + buildInputs = lib.optional stdenv.hostPlatform.isDarwin darwin.apple_sdk.frameworks.Security; cargoBuildFlags = [ "--package" pname ]; diff --git a/pkgs/tools/misc/star-history/default.nix b/pkgs/tools/misc/star-history/default.nix index bb84b843a9ea..e8d96eb4249b 100644 --- a/pkgs/tools/misc/star-history/default.nix +++ b/pkgs/tools/misc/star-history/default.nix @@ -20,7 +20,7 @@ rustPlatform.buildRustPackage rec { nativeBuildInputs = [ pkg-config ]; - buildInputs = [ openssl ] ++ lib.optionals stdenv.isDarwin [ + buildInputs = [ openssl ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.SystemConfiguration ]; diff --git a/pkgs/tools/misc/starry/default.nix b/pkgs/tools/misc/starry/default.nix index a59fb3127f17..cb6535baf3ac 100644 --- a/pkgs/tools/misc/starry/default.nix +++ b/pkgs/tools/misc/starry/default.nix @@ -24,7 +24,7 @@ rustPlatform.buildRustPackage rec { buildInputs = [ openssl - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.Security ]; diff --git a/pkgs/tools/misc/starship/default.nix b/pkgs/tools/misc/starship/default.nix index 37d38016b882..587d07eaf5bd 100644 --- a/pkgs/tools/misc/starship/default.nix +++ b/pkgs/tools/misc/starship/default.nix @@ -24,12 +24,12 @@ rustPlatform.buildRustPackage rec { nativeBuildInputs = [ installShellFiles cmake ]; - buildInputs = lib.optionals stdenv.isDarwin [ Security Foundation Cocoa ]; + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ Security Foundation Cocoa ]; - NIX_LDFLAGS = lib.optionals (stdenv.isDarwin && stdenv.isx86_64) [ "-framework" "AppKit" ]; + NIX_LDFLAGS = lib.optionals (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isx86_64) [ "-framework" "AppKit" ]; # tries to access HOME only in aarch64-darwin environment when building mac-notification-sys - preBuild = lib.optionalString (stdenv.isDarwin && stdenv.isAarch64) '' + preBuild = lib.optionalString (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isAarch64) '' export HOME=$TMPDIR ''; diff --git a/pkgs/tools/misc/synth/default.nix b/pkgs/tools/misc/synth/default.nix index 688454c8ded1..4977372ee4ee 100644 --- a/pkgs/tools/misc/synth/default.nix +++ b/pkgs/tools/misc/synth/default.nix @@ -19,7 +19,7 @@ rustPlatform.buildRustPackage rec { cargoHash = "sha256-i2Pp9sfTBth3DtrQ99Vw+KLnGECrkqtlRNAKiwSWf48="; - buildInputs = lib.optionals stdenv.isDarwin [ + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ AppKit Security ]; diff --git a/pkgs/tools/misc/szyszka/default.nix b/pkgs/tools/misc/szyszka/default.nix index 980b37a910df..8bd133e6dae0 100644 --- a/pkgs/tools/misc/szyszka/default.nix +++ b/pkgs/tools/misc/szyszka/default.nix @@ -38,7 +38,7 @@ rustPlatform.buildRustPackage rec { atk gdk-pixbuf gtk4 - ] ++ lib.optionals stdenv.isDarwin (with darwin.apple_sdk.frameworks; [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin (with darwin.apple_sdk.frameworks; [ Foundation ]); diff --git a/pkgs/tools/misc/tab-rs/default.nix b/pkgs/tools/misc/tab-rs/default.nix index 6298d84c41fd..7d3721acb3c4 100644 --- a/pkgs/tools/misc/tab-rs/default.nix +++ b/pkgs/tools/misc/tab-rs/default.nix @@ -13,7 +13,7 @@ rustPlatform.buildRustPackage rec { cargoHash = "sha256-56gy9AH3i4OSvExMuR3n/2hF5pJgbn5JJpxZLXKfu2w="; - buildInputs = lib.optionals stdenv.isDarwin [ IOKit ]; + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ IOKit ]; # many tests are failing doCheck = false; @@ -24,6 +24,6 @@ rustPlatform.buildRustPackage rec { license = licenses.mit; maintainers = [ ]; mainProgram = "tab"; - broken = (stdenv.isDarwin && stdenv.isAarch64); # Added 2023-11-13 + broken = (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isAarch64); # Added 2023-11-13 }; } diff --git a/pkgs/tools/misc/tealdeer/default.nix b/pkgs/tools/misc/tealdeer/default.nix index 9ca82d8f1bec..c3fa408aabed 100644 --- a/pkgs/tools/misc/tealdeer/default.nix +++ b/pkgs/tools/misc/tealdeer/default.nix @@ -19,7 +19,7 @@ rustPlatform.buildRustPackage rec { cargoHash = "sha256-VeJsCWU7sJy88uvGGjpuGRzsAgBRvzOYU1FwpImpiLk="; - buildInputs = lib.optional stdenv.isDarwin Security; + buildInputs = lib.optional stdenv.hostPlatform.isDarwin Security; nativeBuildInputs = [ installShellFiles ]; diff --git a/pkgs/tools/misc/tere/default.nix b/pkgs/tools/misc/tere/default.nix index b362ff418375..905c197cc732 100644 --- a/pkgs/tools/misc/tere/default.nix +++ b/pkgs/tools/misc/tere/default.nix @@ -19,7 +19,7 @@ rustPlatform.buildRustPackage { ncurses ]; - checkFlags = lib.optionals stdenv.isDarwin [ + checkFlags = lib.optionals stdenv.hostPlatform.isDarwin [ # Unexplained fail # https://github.com/NixOS/nixpkgs/pull/298527#issuecomment-2053758845 "--skip=first_run_prompt_accept" diff --git a/pkgs/tools/misc/timidity/default.nix b/pkgs/tools/misc/timidity/default.nix index 26f84e383c48..ce6e0c7ae8f0 100644 --- a/pkgs/tools/misc/timidity/default.nix +++ b/pkgs/tools/misc/timidity/default.nix @@ -28,13 +28,13 @@ stdenv.mkDerivation rec { ]; nativeBuildInputs = [ pkg-config ] - ++ lib.optionals (stdenv.isDarwin && stdenv.isx86_64) [ memstreamHook ]; + ++ lib.optionals (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isx86_64) [ memstreamHook ]; buildInputs = [ libjack2 ncurses - ] ++ lib.optionals stdenv.isLinux [ + ] ++ lib.optionals stdenv.hostPlatform.isLinux [ alsa-lib - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ CoreAudio libobjc ]; @@ -43,12 +43,12 @@ stdenv.mkDerivation rec { "--enable-ncurses" "lib_cv_va_copy=yes" "lib_cv___va_copy=yes" - ] ++ lib.optionals stdenv.isLinux [ + ] ++ lib.optionals stdenv.hostPlatform.isLinux [ "--enable-audio=oss,alsa,jack" "--enable-alsaseq" "--with-default-output=alsa" "lib_cv_va_val_copy=yes" - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ "--enable-audio=darwin,jack" "lib_cv_va_val_copy=no" "timidity_cv_ccoption_rdynamic=yes" @@ -84,7 +84,7 @@ stdenv.mkDerivation rec { tar --strip-components=1 -xf $instruments -C $out/share/timidity/ ''; # This fixup step is unnecessary and fails on Darwin - dontRewriteSymlinks = stdenv.isDarwin; + dontRewriteSymlinks = stdenv.hostPlatform.isDarwin; meta = with lib; { homepage = "https://sourceforge.net/projects/timidity/"; diff --git a/pkgs/tools/misc/tmux-sessionizer/default.nix b/pkgs/tools/misc/tmux-sessionizer/default.nix index b6a3682ec757..d8749c4115c8 100644 --- a/pkgs/tools/misc/tmux-sessionizer/default.nix +++ b/pkgs/tools/misc/tmux-sessionizer/default.nix @@ -36,7 +36,7 @@ rustPlatform.buildRustPackage { OPENSSL_NO_VENDOR = 1; nativeBuildInputs = [ pkg-config ]; - buildInputs = [ openssl ] ++ lib.optionals stdenv.isDarwin [ Security ]; + buildInputs = [ openssl ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ Security ]; meta = with lib; { description = "Fastest way to manage projects as tmux sessions"; diff --git a/pkgs/tools/misc/tmux/default.nix b/pkgs/tools/misc/tmux/default.nix index af381a062259..d8b40913c9c8 100644 --- a/pkgs/tools/misc/tmux/default.nix +++ b/pkgs/tools/misc/tmux/default.nix @@ -10,7 +10,7 @@ , runCommand , withSystemd ? lib.meta.availableOn stdenv.hostPlatform systemd, systemd , withUtf8proc ? true, utf8proc # gets Unicode updates faster than glibc -, withUtempter ? stdenv.isLinux && !stdenv.hostPlatform.isMusl, libutempter +, withUtempter ? stdenv.hostPlatform.isLinux && !stdenv.hostPlatform.isMusl, libutempter , withSixel ? true }: @@ -88,13 +88,13 @@ stdenv.mkDerivation (finalAttrs: { postInstall = '' mkdir -p $out/share/bash-completion/completions cp -v ${bashCompletion}/completions/tmux $out/share/bash-completion/completions/tmux - '' + lib.optionalString stdenv.isDarwin '' + '' + lib.optionalString stdenv.hostPlatform.isDarwin '' mkdir $out/nix-support echo "${finalAttrs.passthru.terminfo}" >> $out/nix-support/propagated-user-env-packages ''; passthru = { - terminfo = runCommand "tmux-terminfo" { nativeBuildInputs = [ ncurses ]; } (if stdenv.isDarwin then '' + terminfo = runCommand "tmux-terminfo" { nativeBuildInputs = [ ncurses ]; } (if stdenv.hostPlatform.isDarwin then '' mkdir -p $out/share/terminfo/74 cp -v ${ncurses}/share/terminfo/74/tmux $out/share/terminfo/74 # macOS ships an old version (5.7) of ncurses which does not include tmux-256color so we need to provide it from our ncurses. diff --git a/pkgs/tools/misc/toastify/default.nix b/pkgs/tools/misc/toastify/default.nix index b244aec493ac..6fde17977ebe 100644 --- a/pkgs/tools/misc/toastify/default.nix +++ b/pkgs/tools/misc/toastify/default.nix @@ -13,11 +13,11 @@ rustPlatform.buildRustPackage rec { cargoHash = "sha256-Ps2pRLpPxw+OS1ungQtVQ8beoKpc8pjzQEndMNni08k="; - buildInputs = lib.optionals stdenv.isDarwin [ + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk_11_0.frameworks.Cocoa ]; - preBuild = lib.optionalString stdenv.isDarwin '' + preBuild = lib.optionalString stdenv.hostPlatform.isDarwin '' export HOME=$(mktemp -d) ''; diff --git a/pkgs/tools/misc/topgrade/default.nix b/pkgs/tools/misc/topgrade/default.nix index 38e1f0d95c1a..70402b22df7f 100644 --- a/pkgs/tools/misc/topgrade/default.nix +++ b/pkgs/tools/misc/topgrade/default.nix @@ -25,13 +25,13 @@ rustPlatform.buildRustPackage rec { installShellFiles ]; - buildInputs = lib.optionals stdenv.isDarwin [ + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ AppKit Cocoa Foundation ]; - env.NIX_CFLAGS_COMPILE = toString (lib.optionals stdenv.isDarwin [ + env.NIX_CFLAGS_COMPILE = toString (lib.optionals stdenv.hostPlatform.isDarwin [ "-framework" "AppKit" ]); diff --git a/pkgs/tools/misc/toybox/default.nix b/pkgs/tools/misc/toybox/default.nix index 4ef5279ef476..99167c87fa84 100644 --- a/pkgs/tools/misc/toybox/default.nix +++ b/pkgs/tools/misc/toybox/default.nix @@ -24,7 +24,7 @@ stdenv.mkDerivation rec { depsBuildBuild = optionals (stdenv.hostPlatform != stdenv.buildPlatform) [ buildPackages.stdenv.cc ]; buildInputs = [ libxcrypt - ] ++ optionals stdenv.isDarwin [ + ] ++ optionals stdenv.hostPlatform.isDarwin [ libiconv ] ++ optionals (enableStatic && stdenv.cc.libc ? static) [ stdenv.cc.libc @@ -40,10 +40,10 @@ stdenv.mkDerivation rec { make ${if enableMinimal then "allnoconfig" else - if stdenv.isFreeBSD then + if stdenv.hostPlatform.isFreeBSD then "freebsd_defconfig" else - if stdenv.isDarwin then + if stdenv.hostPlatform.isDarwin then "macos_defconfig" else "defconfig" diff --git a/pkgs/tools/misc/trackma/default.nix b/pkgs/tools/misc/trackma/default.nix index 6ecf2723f00b..4ae9306f28fb 100644 --- a/pkgs/tools/misc/trackma/default.nix +++ b/pkgs/tools/misc/trackma/default.nix @@ -45,7 +45,7 @@ python3.pkgs.buildPythonApplication rec { ++ lib.optionals withQT [ pyqt5 ] ++ lib.optionals withGTK [ pycairo pygobject3 ] ++ lib.optionals withCurses [ urwid ] - ++ lib.optionals stdenv.isLinux [ pydbus pyinotify ] + ++ lib.optionals stdenv.hostPlatform.isLinux [ pydbus pyinotify ] ++ lib.optionals (withGTK || withQT) [ pillow ]); dontWrapQtApps = true; diff --git a/pkgs/tools/misc/tty-clock/default.nix b/pkgs/tools/misc/tty-clock/default.nix index 0abb0c668be0..f5d70cd2071f 100644 --- a/pkgs/tools/misc/tty-clock/default.nix +++ b/pkgs/tools/misc/tty-clock/default.nix @@ -28,7 +28,7 @@ stdenv.mkDerivation rec { makeFlags = [ "PREFIX=$(out)" ]; meta = with lib; { - broken = stdenv.isDarwin; + broken = stdenv.hostPlatform.isDarwin; homepage = "https://github.com/xorg62/tty-clock"; license = licenses.bsd3; description = "Digital clock in ncurses"; diff --git a/pkgs/tools/misc/twm/default.nix b/pkgs/tools/misc/twm/default.nix index bb963d5d1d0e..3625ceef80a9 100644 --- a/pkgs/tools/misc/twm/default.nix +++ b/pkgs/tools/misc/twm/default.nix @@ -23,7 +23,7 @@ rustPlatform.buildRustPackage rec { cargoHash = "sha256-gJ5go9V8c97pQZICUD1ksLJhOyJXyVXAWssH3fhrRVQ="; nativeBuildInputs = [ pkg-config installShellFiles ]; - buildInputs = [ openssl ] ++ lib.optionals stdenv.isDarwin [ Security ]; + buildInputs = [ openssl ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ Security ]; postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) '' installShellCompletion --cmd twm \ diff --git a/pkgs/tools/misc/usbimager/default.nix b/pkgs/tools/misc/usbimager/default.nix index 2d339fabc3f7..11a9162af2f2 100644 --- a/pkgs/tools/misc/usbimager/default.nix +++ b/pkgs/tools/misc/usbimager/default.nix @@ -1,6 +1,6 @@ { lib, stdenv, fetchFromGitLab, pkg-config, wrapGAppsHook3 , withLibui ? true, gtk3 -, withUdisks ? stdenv.isLinux, udisks, glib +, withUdisks ? stdenv.hostPlatform.isLinux, udisks, glib , libX11 }: stdenv.mkDerivation rec { @@ -49,7 +49,7 @@ stdenv.mkDerivation rec { # feel free add them if you have a machine to test platforms = with platforms; linux; # never built on aarch64-linux since first introduction in nixpkgs - broken = stdenv.isLinux && stdenv.isAarch64; + broken = stdenv.hostPlatform.isLinux && stdenv.hostPlatform.isAarch64; mainProgram = "usbimager"; }; } diff --git a/pkgs/tools/misc/uutils-coreutils/default.nix b/pkgs/tools/misc/uutils-coreutils/default.nix index 033692364752..a71567b59038 100644 --- a/pkgs/tools/misc/uutils-coreutils/default.nix +++ b/pkgs/tools/misc/uutils-coreutils/default.nix @@ -29,7 +29,7 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ rustPlatform.cargoSetupHook sphinx ]; - buildInputs = lib.optionals stdenv.isDarwin [ Security libiconv ]; + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ Security libiconv ]; makeFlags = [ "CARGO=${cargo}/bin/cargo" diff --git a/pkgs/tools/misc/uwufetch/default.nix b/pkgs/tools/misc/uwufetch/default.nix index 4dba7dac8038..ce5e378b9ac7 100644 --- a/pkgs/tools/misc/uwufetch/default.nix +++ b/pkgs/tools/misc/uwufetch/default.nix @@ -19,7 +19,7 @@ stdenv.mkDerivation rec { # fix command_path for package manager (nix-store) substituteInPlace fetch.c \ --replace "/usr/bin" "/run/current-system/sw/bin" - '' + lib.optionalString stdenv.isDarwin '' + '' + lib.optionalString stdenv.hostPlatform.isDarwin '' substituteInPlace Makefile \ --replace "local/bin" "bin" \ --replace "local/lib" "lib" \ diff --git a/pkgs/tools/misc/uwuify/default.nix b/pkgs/tools/misc/uwuify/default.nix index 4a3411d05a38..a7380bc8b1f7 100644 --- a/pkgs/tools/misc/uwuify/default.nix +++ b/pkgs/tools/misc/uwuify/default.nix @@ -12,7 +12,7 @@ rustPlatform.buildRustPackage rec { }; cargoHash = "sha256-1BoB7K/dWy3AbogvHIDLrdPD7K54EISvn4RVU5RLTi4="; - buildInputs = lib.optionals stdenv.isDarwin [ libiconv ]; + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ libiconv ]; meta = with lib; { description = "Fast text uwuifier"; diff --git a/pkgs/tools/misc/vector/default.nix b/pkgs/tools/misc/vector/default.nix index 3b08a82308c6..e93603d044d1 100644 --- a/pkgs/tools/misc/vector/default.nix +++ b/pkgs/tools/misc/vector/default.nix @@ -88,8 +88,8 @@ rustPlatform.buildRustPackage { rdkafka zstd ] - ++ lib.optionals stdenv.isLinux [ rust-jemalloc-sys-unprefixed ] - ++ lib.optionals stdenv.isDarwin [ + ++ lib.optionals stdenv.hostPlatform.isLinux [ rust-jemalloc-sys-unprefixed ] + ++ lib.optionals stdenv.hostPlatform.isDarwin [ rust-jemalloc-sys Security libiconv diff --git a/pkgs/tools/misc/vimv-rs/default.nix b/pkgs/tools/misc/vimv-rs/default.nix index 2b419e5403c0..780af1846ff1 100644 --- a/pkgs/tools/misc/vimv-rs/default.nix +++ b/pkgs/tools/misc/vimv-rs/default.nix @@ -12,7 +12,7 @@ rustPlatform.buildRustPackage rec { cargoHash = "sha256-rYQxIttuGBGEkYkFtSBl8ce1I/Akm6FxeITJcaIeP6M="; - buildInputs = lib.optionals stdenv.isDarwin [ Foundation ]; + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ Foundation ]; meta = with lib; { description = "Command line utility for batch-renaming files"; diff --git a/pkgs/tools/misc/vrc-get/default.nix b/pkgs/tools/misc/vrc-get/default.nix index dac2f34dbaca..a458e6c30953 100644 --- a/pkgs/tools/misc/vrc-get/default.nix +++ b/pkgs/tools/misc/vrc-get/default.nix @@ -11,7 +11,7 @@ rustPlatform.buildRustPackage rec { nativeBuildInputs = [ installShellFiles pkg-config ]; - buildInputs = lib.optionals stdenv.isDarwin [ Security SystemConfiguration ]; + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ Security SystemConfiguration ]; cargoHash = "sha256-WFGY5osZIEYeHQchvuE3ddeqh2wzfZNV+SGqW08zYDI="; diff --git a/pkgs/tools/misc/wagyu/default.nix b/pkgs/tools/misc/wagyu/default.nix index 0eb71743f064..6200ee77d613 100644 --- a/pkgs/tools/misc/wagyu/default.nix +++ b/pkgs/tools/misc/wagyu/default.nix @@ -15,7 +15,7 @@ rustPlatform.buildRustPackage rec { cargoHash = "sha256-vseTtok0E0ddg9ALQ1ql3NPPxirfyMPHOSWsM2qu2jU="; - buildInputs = lib.optional stdenv.isDarwin Security; + buildInputs = lib.optional stdenv.hostPlatform.isDarwin Security; meta = with lib; { description = "Rust library for generating cryptocurrency wallets"; diff --git a/pkgs/tools/misc/watchexec/default.nix b/pkgs/tools/misc/watchexec/default.nix index cd7381243cc4..0d04a21219bc 100644 --- a/pkgs/tools/misc/watchexec/default.nix +++ b/pkgs/tools/misc/watchexec/default.nix @@ -15,9 +15,9 @@ rustPlatform.buildRustPackage rec { nativeBuildInputs = [ installShellFiles ]; - buildInputs = lib.optionals stdenv.isDarwin [ Cocoa AppKit ]; + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ Cocoa AppKit ]; - NIX_LDFLAGS = lib.optionalString stdenv.isDarwin "-framework AppKit"; + NIX_LDFLAGS = lib.optionalString stdenv.hostPlatform.isDarwin "-framework AppKit"; checkFlags = [ "--skip=help" "--skip=help_short" ]; diff --git a/pkgs/tools/misc/websocat/default.nix b/pkgs/tools/misc/websocat/default.nix index 786062cfffb9..fd8841b96bd0 100644 --- a/pkgs/tools/misc/websocat/default.nix +++ b/pkgs/tools/misc/websocat/default.nix @@ -16,7 +16,7 @@ rustPlatform.buildRustPackage rec { nativeBuildInputs = [ pkg-config makeWrapper ]; buildInputs = [ openssl ] - ++ lib.optionals stdenv.isDarwin [ libiconv Security ]; + ++ lib.optionals stdenv.hostPlatform.isDarwin [ libiconv Security ]; buildFeatures = [ "ssl" ]; diff --git a/pkgs/tools/misc/wv2/default.nix b/pkgs/tools/misc/wv2/default.nix index 3a7bd5d395a6..8a4ccaed896c 100644 --- a/pkgs/tools/misc/wv2/default.nix +++ b/pkgs/tools/misc/wv2/default.nix @@ -15,7 +15,7 @@ stdenv.mkDerivation rec { cmakeFlags = lib.optionals stdenv.cc.isClang [ (lib.cmakeFeature "CMAKE_CXX_STANDARD" "14") ]; # Linking gobject explicitly fixes missing symbols (such as missing `_g_object_unref`) on Darwin. - preConfigure = lib.optionalString stdenv.isDarwin '' + preConfigure = lib.optionalString stdenv.hostPlatform.isDarwin '' export NIX_LDFLAGS+=" $(pkg-config gobject-2.0 --libs)" ''; diff --git a/pkgs/tools/misc/xburst-tools/default.nix b/pkgs/tools/misc/xburst-tools/default.nix index 093e7152bbcf..a94f9681a05c 100644 --- a/pkgs/tools/misc/xburst-tools/default.nix +++ b/pkgs/tools/misc/xburst-tools/default.nix @@ -39,7 +39,7 @@ stdenv.mkDerivation { lib.optional (gccCross != null) gccCross; meta = { - broken = stdenv.isDarwin; + broken = stdenv.hostPlatform.isDarwin; description = "Qi tools to access the Ben Nanonote USB_BOOT mode"; license = lib.licenses.gpl3; homepage = "http://www.linux-mtd.infradead.org/"; diff --git a/pkgs/tools/misc/xxv/default.nix b/pkgs/tools/misc/xxv/default.nix index 3973f8d096ac..eaa27e34d9d3 100644 --- a/pkgs/tools/misc/xxv/default.nix +++ b/pkgs/tools/misc/xxv/default.nix @@ -20,7 +20,7 @@ rustPlatform.buildRustPackage rec { cargoHash = "sha256-S8IKBXREJ+0z4Qz9i3RH52btg1Mpk6GjKIJf4ivdt14="; buildInputs = lib.optionals useNcurses [ ncurses ] - ++ lib.optionals stdenv.isDarwin (with darwin.apple_sdk.frameworks; [ Security ]) + ++ lib.optionals stdenv.hostPlatform.isDarwin (with darwin.apple_sdk.frameworks; [ Security ]) ; # I'm picking pancurses for Windows simply because that's the example given in Cursive's diff --git a/pkgs/tools/misc/yubikey-manager/default.nix b/pkgs/tools/misc/yubikey-manager/default.nix index 6243a2e4668c..5523b6468969 100644 --- a/pkgs/tools/misc/yubikey-manager/default.nix +++ b/pkgs/tools/misc/yubikey-manager/default.nix @@ -20,7 +20,7 @@ python3Packages.buildPythonPackage rec { postPatch = '' substituteInPlace "ykman/pcsc/__init__.py" \ - --replace 'pkill' '${if stdenv.isLinux then procps else "/usr"}/bin/pkill' + --replace 'pkill' '${if stdenv.hostPlatform.isLinux then procps else "/usr"}/bin/pkill' ''; nativeBuildInputs = with python3Packages; [ diff --git a/pkgs/tools/misc/yubikey-personalization-gui/default.nix b/pkgs/tools/misc/yubikey-personalization-gui/default.nix index 347221ceedf8..6493c7244c3b 100644 --- a/pkgs/tools/misc/yubikey-personalization-gui/default.nix +++ b/pkgs/tools/misc/yubikey-personalization-gui/default.nix @@ -34,7 +34,7 @@ mkDerivation rec { ''; meta = with lib; { - broken = stdenv.isDarwin; + broken = stdenv.hostPlatform.isDarwin; homepage = "https://developers.yubico.com/yubikey-personalization-gui"; description = "QT based cross-platform utility designed to facilitate reconfiguration of the Yubikey"; license = licenses.bsd2; diff --git a/pkgs/tools/misc/zellij/default.nix b/pkgs/tools/misc/zellij/default.nix index 105d35349eb9..e069d0c8d87f 100644 --- a/pkgs/tools/misc/zellij/default.nix +++ b/pkgs/tools/misc/zellij/default.nix @@ -36,7 +36,7 @@ rustPlatform.buildRustPackage rec { buildInputs = [ openssl - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ libiconv DiskArbitration Foundation diff --git a/pkgs/tools/misc/zoxide/default.nix b/pkgs/tools/misc/zoxide/default.nix index 5b2d00f7538e..5c1ba44d156d 100644 --- a/pkgs/tools/misc/zoxide/default.nix +++ b/pkgs/tools/misc/zoxide/default.nix @@ -21,7 +21,7 @@ rustPlatform.buildRustPackage rec { nativeBuildInputs = [ installShellFiles ]; - buildInputs = lib.optionals stdenv.isDarwin [ libiconv ]; + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ libiconv ]; postPatch = lib.optionalString withFzf '' substituteInPlace src/util.rs \ diff --git a/pkgs/tools/networking/aircrack-ng/default.nix b/pkgs/tools/networking/aircrack-ng/default.nix index 6bfd3136dc98..b1ee70125739 100644 --- a/pkgs/tools/networking/aircrack-ng/default.nix +++ b/pkgs/tools/networking/aircrack-ng/default.nix @@ -34,7 +34,7 @@ , useGcrypt ? false , enableAirolib ? true , enableRegex ? true -, useAirpcap ? stdenv.isCygwin +, useAirpcap ? stdenv.hostPlatform.isCygwin }: let airpcap-sdk = fetchzip { @@ -57,7 +57,7 @@ stdenv.mkDerivation rec { hash = "sha256-niQDwiqi5GtBW5HIn0endnqPb/MqllcjsjXw4pTyFKY="; }; - postPatch = lib.optionalString stdenv.isLinux '' + postPatch = lib.optionalString stdenv.hostPlatform.isLinux '' substituteInPlace lib/osdep/linux.c --replace-warn /usr/local/bin ${lib.escapeShellArg (lib.makeBinPath [ wirelesstools ])} @@ -72,15 +72,15 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ pkg-config makeWrapper autoreconfHook ]; buildInputs = lib.singleton (if useGcrypt then libgcrypt else openssl) - ++ lib.optionals stdenv.isLinux [ libpcap zlib libnl iw ethtool pciutils ] - ++ lib.optional (stdenv.isCygwin && stdenv.isClang) libiconv + ++ lib.optionals stdenv.hostPlatform.isLinux [ libpcap zlib libnl iw ethtool pciutils ] + ++ lib.optional (stdenv.hostPlatform.isCygwin && stdenv.hostPlatform.isClang) libiconv ++ lib.optional enableAirolib sqlite ++ lib.optional enableRegex pcre2 ++ lib.optional useAirpcap airpcap-sdk; nativeCheckInputs = [ cmocka expect ]; - postFixup = lib.optionalString stdenv.isLinux '' + postFixup = lib.optionalString stdenv.hostPlatform.isLinux '' wrapProgram "$out/bin/airmon-ng" --prefix PATH : ${lib.escapeShellArg (lib.makeBinPath [ ethtool iw @@ -90,7 +90,7 @@ stdenv.mkDerivation rec { ''; installCheckTarget = "integration"; - nativeInstallCheckInputs = [ cmocka expect ] ++ lib.optionals stdenv.isLinux [ tcpdump hostapd wpa_supplicant screen ]; + nativeInstallCheckInputs = [ cmocka expect ] ++ lib.optionals stdenv.hostPlatform.isLinux [ tcpdump hostapd wpa_supplicant screen ]; meta = { description = "WiFi security auditing tools suite"; diff --git a/pkgs/tools/networking/anevicon/default.nix b/pkgs/tools/networking/anevicon/default.nix index 961127580500..c84f0e75d3d6 100644 --- a/pkgs/tools/networking/anevicon/default.nix +++ b/pkgs/tools/networking/anevicon/default.nix @@ -20,7 +20,7 @@ rustPlatform.buildRustPackage rec { cargoHash = "sha256-Id/vjne73w+bDVA8wT7fV1DMXeGtYbSAdwl07UfYJbw="; - buildInputs = lib.optionals stdenv.isDarwin [ libiconv Security ]; + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ libiconv Security ]; cargoPatches = [ # Add Cargo.lock file, https://github.com/rozgo/anevicon/pull/1 @@ -32,7 +32,7 @@ rustPlatform.buildRustPackage rec { ]; # Tries to send large UDP packets that Darwin rejects. - doCheck = !stdenv.isDarwin; + doCheck = !stdenv.hostPlatform.isDarwin; meta = with lib; { description = "UDP-based load generator"; diff --git a/pkgs/tools/networking/aria2/default.nix b/pkgs/tools/networking/aria2/default.nix index 97eb911baef1..f1864ed72dd2 100644 --- a/pkgs/tools/networking/aria2/default.nix +++ b/pkgs/tools/networking/aria2/default.nix @@ -19,7 +19,7 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ pkg-config autoreconfHook sphinx ]; buildInputs = [ gnutls c-ares libxml2 sqlite zlib libssh2 ] ++ - lib.optional stdenv.isDarwin Security; + lib.optional stdenv.hostPlatform.isDarwin Security; outputs = [ "bin" "dev" "out" "doc" "man" ]; diff --git a/pkgs/tools/networking/assh/default.nix b/pkgs/tools/networking/assh/default.nix index 9d13a323357b..43ed2dc16c8a 100644 --- a/pkgs/tools/networking/assh/default.nix +++ b/pkgs/tools/networking/assh/default.nix @@ -26,7 +26,7 @@ buildGoModule rec { nativeBuildInputs = [ makeWrapper ]; - nativeCheckInputs = lib.optionals stdenv.isDarwin [ ps ]; + nativeCheckInputs = lib.optionals stdenv.hostPlatform.isDarwin [ ps ]; postInstall = '' wrapProgram "$out/bin/assh" \ diff --git a/pkgs/tools/networking/atinout/default.nix b/pkgs/tools/networking/atinout/default.nix index 64d13a7b14ea..1155b2b876bb 100644 --- a/pkgs/tools/networking/atinout/default.nix +++ b/pkgs/tools/networking/atinout/default.nix @@ -5,7 +5,7 @@ stdenv.mkDerivation rec { version = "0.9.2-alpha"; env.NIX_CFLAGS_COMPILE = lib.optionalString (!stdenv.cc.isClang) "-Werror=implicit-fallthrough=0"; - LANG = if stdenv.isDarwin then "en_US.UTF-8" else "C.UTF-8"; + LANG = if stdenv.hostPlatform.isDarwin then "en_US.UTF-8" else "C.UTF-8"; nativeBuildInputs = [ ronn mount ]; src = fetchgit { diff --git a/pkgs/tools/networking/bandwhich/default.nix b/pkgs/tools/networking/bandwhich/default.nix index 550266b9da99..0c5a6d20a694 100644 --- a/pkgs/tools/networking/bandwhich/default.nix +++ b/pkgs/tools/networking/bandwhich/default.nix @@ -25,10 +25,10 @@ rustPlatform.buildRustPackage rec { nativeBuildInputs = [ installShellFiles ]; - buildInputs = lib.optional stdenv.isDarwin Security; + buildInputs = lib.optional stdenv.hostPlatform.isDarwin Security; # 10 passed; 47 failed https://hydra.nixos.org/build/148943783/nixlog/1 - doCheck = !stdenv.isDarwin; + doCheck = !stdenv.hostPlatform.isDarwin; postPatch = '' ln --force -s ${./Cargo.lock} Cargo.lock diff --git a/pkgs/tools/networking/bitmask-vpn/default.nix b/pkgs/tools/networking/bitmask-vpn/default.nix index 60988da176a2..264bddf5b0f9 100644 --- a/pkgs/tools/networking/bitmask-vpn/default.nix +++ b/pkgs/tools/networking/bitmask-vpn/default.nix @@ -84,7 +84,7 @@ buildGoModule rec { patchShebangs gui/build.sh wrapPythonProgramsIn branding/scripts - '' + lib.optionalString stdenv.isLinux '' + '' + lib.optionalString stdenv.hostPlatform.isLinux '' substituteInPlace pkg/helper/linux.go \ --replace /usr/sbin/openvpn ${openvpn}/bin/openvpn substituteInPlace pkg/vpn/launcher_linux.go \ @@ -103,7 +103,7 @@ buildGoModule rec { qttools which wrapQtAppsHook - ] ++ lib.optional (!stdenv.isLinux) qtinstaller; + ] ++ lib.optional (!stdenv.hostPlatform.isLinux) qtinstaller; buildInputs = [ qtbase @@ -112,7 +112,7 @@ buildGoModule rec { qtgraphicaleffects qtquickcontrols qtquickcontrols2 - ] ++ lib.optionals stdenv.isDarwin [ CoreFoundation Security ]; + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ CoreFoundation Security ]; # FIXME: building on Darwin currently fails # due to missing debug symbols for Qt, # this should be fixable once darwin.apple_sdk >= 10.13 @@ -142,7 +142,7 @@ buildGoModule rec { (cd branding/templates/debian && ${python3Packages.python}/bin/python3 generate.py) install -m 444 -D branding/templates/debian/app.desktop $out/share/applications/${pname}.desktop install -m 444 -D providers/${provider}/assets/icon.svg $out/share/icons/hicolor/scalable/apps/${pname}.svg - '' + lib.optionalString stdenv.isLinux '' + '' + lib.optionalString stdenv.hostPlatform.isLinux '' install -m 444 -D -t $out/share/polkit-1/actions ${bitmask-root}/share/polkit-1/actions/se.leap.bitmask.policy ''; diff --git a/pkgs/tools/networking/bore-cli/default.nix b/pkgs/tools/networking/bore-cli/default.nix index 30a0463ace08..d182fd22b5e1 100644 --- a/pkgs/tools/networking/bore-cli/default.nix +++ b/pkgs/tools/networking/bore-cli/default.nix @@ -18,7 +18,7 @@ rustPlatform.buildRustPackage rec { cargoHash = "sha256-PZDie/lBextHu8EV/butg2pJZFfizeOEdD21I3XFoHk="; - buildInputs = lib.optionals stdenv.isDarwin [ + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ Security ]; diff --git a/pkgs/tools/networking/bore/default.nix b/pkgs/tools/networking/bore/default.nix index 9af98878b854..4d67cb4c94d7 100644 --- a/pkgs/tools/networking/bore/default.nix +++ b/pkgs/tools/networking/bore/default.nix @@ -15,16 +15,16 @@ rustPlatform.buildRustPackage rec { cargoBuildFlags = [ "-p" pname ]; # error[E0793]: reference to packed field is unaligned - doCheck = !stdenv.isDarwin; + doCheck = !stdenv.hostPlatform.isDarwin; # FIXME can’t test --all-targets and --doc in a single invocation cargoTestFlags = [ "--all-targets" "--workspace" ]; checkFeatures = [ "std" ]; nativeBuildInputs = [ installShellFiles ] - ++ lib.optional stdenv.isDarwin rustPlatform.bindgenHook; + ++ lib.optional stdenv.hostPlatform.isDarwin rustPlatform.bindgenHook; - buildInputs = lib.optionals stdenv.isDarwin [ + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ Libsystem SystemConfiguration ]; @@ -46,6 +46,6 @@ rustPlatform.buildRustPackage rec { license = licenses.isc; maintainers = [ ]; mainProgram = "bore"; - broken = stdenv.isDarwin; # bindgen fails on: "in6_addr_union_(...)" is not a valid Ident + broken = stdenv.hostPlatform.isDarwin; # bindgen fails on: "in6_addr_union_(...)" is not a valid Ident }; } diff --git a/pkgs/tools/networking/boringtun/default.nix b/pkgs/tools/networking/boringtun/default.nix index e2a6a7a3b6e0..30bb243454f8 100644 --- a/pkgs/tools/networking/boringtun/default.nix +++ b/pkgs/tools/networking/boringtun/default.nix @@ -13,7 +13,7 @@ rustPlatform.buildRustPackage rec { cargoHash = "sha256-WFKlfuZGVU5KA57ZYjsIrIwE4B5TeaU5IKt9BNEnWyY="; - buildInputs = lib.optional stdenv.isDarwin darwin.apple_sdk.frameworks.Security; + buildInputs = lib.optional stdenv.hostPlatform.isDarwin darwin.apple_sdk.frameworks.Security; # Testing this project requires sudo, Docker and network access, etc. doCheck = false; diff --git a/pkgs/tools/networking/cfspeedtest/default.nix b/pkgs/tools/networking/cfspeedtest/default.nix index 61bdad229863..f89e8e677c53 100644 --- a/pkgs/tools/networking/cfspeedtest/default.nix +++ b/pkgs/tools/networking/cfspeedtest/default.nix @@ -21,7 +21,7 @@ rustPlatform.buildRustPackage rec { description = "Unofficial CLI for speed.cloudflare.com"; homepage = "https://github.com/code-inflation/cfspeedtest"; license = with licenses; [ mit ]; - broken = stdenv.isDarwin; + broken = stdenv.hostPlatform.isDarwin; maintainers = with maintainers; [ colemickens ]; mainProgram = "cfspeedtest"; }; diff --git a/pkgs/tools/networking/chrony/default.nix b/pkgs/tools/networking/chrony/default.nix index 4b8b8e8b9708..b18cc5642285 100644 --- a/pkgs/tools/networking/chrony/default.nix +++ b/pkgs/tools/networking/chrony/default.nix @@ -18,13 +18,13 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ pkg-config ]; buildInputs = [ gnutls libedit nspr nss readline texinfo ] - ++ lib.optionals stdenv.isLinux [ libcap libseccomp pps-tools ]; + ++ lib.optionals stdenv.hostPlatform.isLinux [ libcap libseccomp pps-tools ]; configureFlags = [ "--enable-ntp-signd" "--sbindir=$(out)/bin" "--chronyrundir=/run/chrony" - ] ++ lib.optional stdenv.isLinux "--enable-scfilter"; + ] ++ lib.optional stdenv.hostPlatform.isLinux "--enable-scfilter"; patches = [ # Cleanup the installation script diff --git a/pkgs/tools/networking/cjdns/default.nix b/pkgs/tools/networking/cjdns/default.nix index 85705a27231f..c60e853a7d21 100644 --- a/pkgs/tools/networking/cjdns/default.nix +++ b/pkgs/tools/networking/cjdns/default.nix @@ -45,7 +45,7 @@ rustPlatform.buildRustPackage rec { pkg-config ] ++ # for flock - lib.optional stdenv.isLinux util-linux; + lib.optional stdenv.hostPlatform.isLinux util-linux; buildInputs = [ libuv @@ -70,6 +70,6 @@ rustPlatform.buildRustPackage rec { license = licenses.gpl3Plus; maintainers = with maintainers; [ ehmry ]; platforms = platforms.linux; - broken = stdenv.isAarch64; + broken = stdenv.hostPlatform.isAarch64; }; } diff --git a/pkgs/tools/networking/cntlm/default.nix b/pkgs/tools/networking/cntlm/default.nix index b2a4193ff049..8750967107ef 100644 --- a/pkgs/tools/networking/cntlm/default.nix +++ b/pkgs/tools/networking/cntlm/default.nix @@ -11,7 +11,7 @@ stdenv.mkDerivation rec { buildInputs = [ which ]; - preConfigure = lib.optionalString stdenv.isDarwin '' + preConfigure = lib.optionalString stdenv.hostPlatform.isDarwin '' substituteInPlace configure --replace "xlc_r gcc" "xlc_r gcc $CC" substitute Makefile Makefile.$CC --replace "CC=gcc" "CC=$CC" ''; diff --git a/pkgs/tools/networking/cocom/default.nix b/pkgs/tools/networking/cocom/default.nix index 7281583b17c1..ad6ab959e6e2 100644 --- a/pkgs/tools/networking/cocom/default.nix +++ b/pkgs/tools/networking/cocom/default.nix @@ -18,7 +18,7 @@ rustPlatform.buildRustPackage rec { cargoHash = "sha256-y5/xOP5YzqsqBxG9c4r9ORyaEf5Ed6D10NFCaKQPchI="; - buildInputs = lib.optional stdenv.isDarwin Security; + buildInputs = lib.optional stdenv.hostPlatform.isDarwin Security; # Tests require network access doCheck = false; diff --git a/pkgs/tools/networking/croc/test-local-relay.nix b/pkgs/tools/networking/croc/test-local-relay.nix index 90d335885e7f..f0a66fcaba82 100644 --- a/pkgs/tools/networking/croc/test-local-relay.nix +++ b/pkgs/tools/networking/croc/test-local-relay.nix @@ -28,6 +28,6 @@ stdenv.mkDerivation { meta = { timeout = 300; - broken = stdenv.isDarwin; + broken = stdenv.hostPlatform.isDarwin; }; } diff --git a/pkgs/tools/networking/curl-impersonate/chrome/default.nix b/pkgs/tools/networking/curl-impersonate/chrome/default.nix index fd97c69b31c5..0ab3085749f3 100644 --- a/pkgs/tools/networking/curl-impersonate/chrome/default.nix +++ b/pkgs/tools/networking/curl-impersonate/chrome/default.nix @@ -51,7 +51,7 @@ stdenv.mkDerivation rec { ]; nativeBuildInputs = - lib.optionals stdenv.isDarwin [ + lib.optionals stdenv.hostPlatform.isDarwin [ # Must come first so that it shadows the 'libtool' command but leaves 'libtoolize' cctools ] @@ -77,7 +77,7 @@ stdenv.mkDerivation rec { configureFlags = [ "--with-ca-bundle=${ - if stdenv.isDarwin then "/etc/ssl/cert.pem" else "/etc/ssl/certs/ca-certificates.crt" + if stdenv.hostPlatform.isDarwin then "/etc/ssl/cert.pem" else "/etc/ssl/certs/ca-certificates.crt" }" "--with-ca-path=${cacert}/etc/ssl/certs" ]; diff --git a/pkgs/tools/networking/curl-impersonate/firefox/default.nix b/pkgs/tools/networking/curl-impersonate/firefox/default.nix index 157aedab489a..73b4458ec8db 100644 --- a/pkgs/tools/networking/curl-impersonate/firefox/default.nix +++ b/pkgs/tools/networking/curl-impersonate/firefox/default.nix @@ -62,7 +62,7 @@ stdenv.mkDerivation rec { ]; nativeBuildInputs = - lib.optionals stdenv.isDarwin [ + lib.optionals stdenv.hostPlatform.isDarwin [ # Must come first so that it shadows the 'libtool' command but leaves 'libtoolize' cctools ] @@ -87,7 +87,7 @@ stdenv.mkDerivation rec { configureFlags = [ "--with-ca-bundle=${ - if stdenv.isDarwin then "/etc/ssl/cert.pem" else "/etc/ssl/certs/ca-certificates.crt" + if stdenv.hostPlatform.isDarwin then "/etc/ssl/cert.pem" else "/etc/ssl/certs/ca-certificates.crt" }" "--with-ca-path=${cacert}/etc/ssl/certs" ]; diff --git a/pkgs/tools/networking/curl/default.nix b/pkgs/tools/networking/curl/default.nix index 033657371747..567ddcbf7d02 100644 --- a/pkgs/tools/networking/curl/default.nix +++ b/pkgs/tools/networking/curl/default.nix @@ -21,7 +21,7 @@ , opensslSupport ? zlibSupport, openssl , pslSupport ? false, libpsl , rtmpSupport ? false, rtmpdump -, scpSupport ? zlibSupport && !stdenv.isSunOS && !stdenv.isCygwin, libssh2 +, scpSupport ? zlibSupport && !stdenv.hostPlatform.isSunOS && !stdenv.hostPlatform.isCygwin, libssh2 , wolfsslSupport ? false, wolfssl , rustlsSupport ? false, rustls-ffi , zlibSupport ? true, zlib @@ -76,7 +76,7 @@ stdenv.mkDerivation (finalAttrs: { ''; outputs = [ "bin" "dev" "out" "man" "devdoc" ]; - separateDebugInfo = stdenv.isLinux; + separateDebugInfo = stdenv.hostPlatform.isLinux; enableParallelBuilding = true; @@ -105,7 +105,7 @@ stdenv.mkDerivation (finalAttrs: { lib.optional rustlsSupport rustls-ffi ++ lib.optional zlibSupport zlib ++ lib.optional zstdSupport zstd ++ - lib.optionals stdenv.isDarwin (with darwin.apple_sdk.frameworks; [ + lib.optionals stdenv.hostPlatform.isDarwin (with darwin.apple_sdk.frameworks; [ CoreFoundation CoreServices SystemConfiguration @@ -152,16 +152,16 @@ stdenv.mkDerivation (finalAttrs: { ++ lib.optionals stdenv.hostPlatform.isWindows [ "--disable-shared" "--enable-static" - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ # Disable default CA bundle, use NIX_SSL_CERT_FILE or fallback to nss-cacert from the default profile. # Without this curl might detect /etc/ssl/cert.pem at build time on macOS, causing curl to ignore NIX_SSL_CERT_FILE. "--without-ca-bundle" "--without-ca-path" ] ++ lib.optionals (!gnutlsSupport && !opensslSupport && !wolfsslSupport && !rustlsSupport) [ "--without-ssl" - ] ++ lib.optionals (rustlsSupport && !stdenv.isDarwin) [ + ] ++ lib.optionals (rustlsSupport && !stdenv.hostPlatform.isDarwin) [ "--with-ca-bundle=/etc/ssl/certs/ca-certificates.crt" - ] ++ lib.optionals (gnutlsSupport && !stdenv.isDarwin) [ + ] ++ lib.optionals (gnutlsSupport && !stdenv.hostPlatform.isDarwin) [ "--with-ca-path=/etc/ssl/certs" ]; @@ -174,7 +174,7 @@ stdenv.mkDerivation (finalAttrs: { doCheck = false; preCheck = '' patchShebangs tests/ - '' + lib.optionalString stdenv.isDarwin '' + '' + lib.optionalString stdenv.hostPlatform.isDarwin '' # bad interaction with sandbox if enabled? rm tests/data/test1453 rm tests/data/test1086 @@ -215,7 +215,7 @@ stdenv.mkDerivation (finalAttrs: { pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage; } // lib.optionalAttrs (stdenv.hostPlatform.system != "x86_64-darwin") { static = pkgsStatic.curl; - } // lib.optionalAttrs (!stdenv.isDarwin) { + } // lib.optionalAttrs (!stdenv.hostPlatform.isDarwin) { fetchpatch = tests.fetchpatch.simple.override { fetchpatch = (fetchpatch.override { fetchurl = useThisCurl fetchurl; }) // { version = 1; }; }; }; }; diff --git a/pkgs/tools/networking/davix/default.nix b/pkgs/tools/networking/davix/default.nix index d3ae2cd02c27..209b4e9d7a15 100644 --- a/pkgs/tools/networking/davix/default.nix +++ b/pkgs/tools/networking/davix/default.nix @@ -35,8 +35,8 @@ stdenv.mkDerivation rec { boost curl ] - ++ lib.optional stdenv.isDarwin Security - ++ lib.optional (!stdenv.isDarwin) libuuid + ++ lib.optional stdenv.hostPlatform.isDarwin Security + ++ lib.optional (!stdenv.hostPlatform.isDarwin) libuuid ++ lib.optional (enableThirdPartyCopy) gsoap; # using the url below since the github release page states diff --git a/pkgs/tools/networking/dcap/default.nix b/pkgs/tools/networking/dcap/default.nix index 4045748fc447..de3a484f5dee 100644 --- a/pkgs/tools/networking/dcap/default.nix +++ b/pkgs/tools/networking/dcap/default.nix @@ -34,7 +34,7 @@ stdenv.mkDerivation rec { outputs = [ "bin" "dev" "out" "man" "doc" ]; meta = with lib; { - broken = stdenv.isDarwin; + broken = stdenv.hostPlatform.isDarwin; description = "dCache access protocol client library"; homepage = "https://github.com/dCache/dcap"; changelog = "https://github.com/dCache/dcap/blob/master/ChangeLog"; diff --git a/pkgs/tools/networking/dd-agent/datadog-agent.nix b/pkgs/tools/networking/dd-agent/datadog-agent.nix index 0b1d157af5d3..1fc91bf1f05a 100644 --- a/pkgs/tools/networking/dd-agent/datadog-agent.nix +++ b/pkgs/tools/networking/dd-agent/datadog-agent.nix @@ -120,6 +120,6 @@ in buildGo121Module rec { license = licenses.bsd3; maintainers = with maintainers; [ thoughtpolice domenkozar ]; # never built on aarch64-darwin since first introduction in nixpkgs - broken = stdenv.isDarwin && stdenv.isAarch64; + broken = stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isAarch64; }; } diff --git a/pkgs/tools/networking/dhcpcd/default.nix b/pkgs/tools/networking/dhcpcd/default.nix index 6221034dc285..d07cc72bed7e 100644 --- a/pkgs/tools/networking/dhcpcd/default.nix +++ b/pkgs/tools/networking/dhcpcd/default.nix @@ -24,9 +24,9 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ pkg-config ]; buildInputs = [ runtimeShellPackage # So patchShebangs finds a bash suitable for the installed scripts - ] ++ lib.optionals stdenv.isLinux [ + ] ++ lib.optionals stdenv.hostPlatform.isLinux [ udev - ] ++ lib.optionals stdenv.isFreeBSD [ + ] ++ lib.optionals stdenv.hostPlatform.isFreeBSD [ freebsd.libcapsicum freebsd.libcasper ]; @@ -57,7 +57,7 @@ stdenv.mkDerivation rec { installFlags = [ "DBDIR=$(TMPDIR)/db" "SYSCONFDIR=${placeholder "out"}/etc" ]; # Check that the udev plugin got built. - postInstall = lib.optionalString (udev != null && stdenv.isLinux) "[ -e ${placeholder "out"}/lib/dhcpcd/dev/udev.so ]"; + postInstall = lib.optionalString (udev != null && stdenv.hostPlatform.isLinux) "[ -e ${placeholder "out"}/lib/dhcpcd/dev/udev.so ]"; passthru = { inherit enablePrivSep; diff --git a/pkgs/tools/networking/dnsmasq/default.nix b/pkgs/tools/networking/dnsmasq/default.nix index 5c6d90b00a98..99744769fff6 100644 --- a/pkgs/tools/networking/dnsmasq/default.nix +++ b/pkgs/tools/networking/dnsmasq/default.nix @@ -1,6 +1,6 @@ { lib, stdenv, fetchurl, pkg-config, nettle , libidn, libnetfilter_conntrack, nftables, buildPackages -, dbusSupport ? stdenv.isLinux +, dbusSupport ? stdenv.hostPlatform.isLinux , dbus , nixosTests }: @@ -11,7 +11,7 @@ let "-DHAVE_DNSSEC" ] ++ lib.optionals dbusSupport [ "-DHAVE_DBUS" - ] ++ lib.optionals stdenv.isLinux [ + ] ++ lib.optionals stdenv.hostPlatform.isLinux [ "-DHAVE_CONNTRACK" "-DHAVE_NFTSET" ]); @@ -43,7 +43,7 @@ stdenv.mkDerivation rec { hardeningEnable = [ "pie" ]; - postBuild = lib.optionalString stdenv.isLinux '' + postBuild = lib.optionalString stdenv.hostPlatform.isLinux '' make -C contrib/lease-tools ''; @@ -51,12 +51,12 @@ stdenv.mkDerivation rec { # module can create it in Nix-land? postInstall = '' install -Dm644 trust-anchors.conf $out/share/dnsmasq/trust-anchors.conf - '' + lib.optionalString stdenv.isDarwin '' + '' + lib.optionalString stdenv.hostPlatform.isDarwin '' install -Dm644 contrib/MacOSX-launchd/uk.org.thekelleys.dnsmasq.plist \ $out/Library/LaunchDaemons/uk.org.thekelleys.dnsmasq.plist substituteInPlace $out/Library/LaunchDaemons/uk.org.thekelleys.dnsmasq.plist \ --replace "/usr/local/sbin" "$out/bin" - '' + lib.optionalString stdenv.isLinux '' + '' + lib.optionalString stdenv.hostPlatform.isLinux '' install -Dm755 contrib/lease-tools/dhcp_lease_time $out/bin/dhcp_lease_time install -Dm755 contrib/lease-tools/dhcp_release $out/bin/dhcp_release install -Dm755 contrib/lease-tools/dhcp_release6 $out/bin/dhcp_release6 @@ -76,7 +76,7 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ pkg-config ]; buildInputs = [ nettle libidn ] ++ lib.optionals dbusSupport [ dbus ] - ++ lib.optionals stdenv.isLinux [ libnetfilter_conntrack nftables ]; + ++ lib.optionals stdenv.hostPlatform.isLinux [ libnetfilter_conntrack nftables ]; passthru.tests = { prometheus-exporter = nixosTests.prometheus-exporters.dnsmasq; diff --git a/pkgs/tools/networking/dnsmonster/default.nix b/pkgs/tools/networking/dnsmonster/default.nix index e4a5d097f04a..0b32a8c90869 100644 --- a/pkgs/tools/networking/dnsmonster/default.nix +++ b/pkgs/tools/networking/dnsmonster/default.nix @@ -34,7 +34,7 @@ buildGoModule rec { changelog = "https://github.com/mosajjal/dnsmonster/releases/tag/v${version}"; license = licenses.gpl2Only; maintainers = with maintainers; [ fab ]; - broken = stdenv.isDarwin; + broken = stdenv.hostPlatform.isDarwin; mainProgram = "dnsmonster"; }; } diff --git a/pkgs/tools/networking/dnstracer/default.nix b/pkgs/tools/networking/dnstracer/default.nix index 30017b2b7620..8d1134cff46f 100644 --- a/pkgs/tools/networking/dnstracer/default.nix +++ b/pkgs/tools/networking/dnstracer/default.nix @@ -20,9 +20,9 @@ stdenv.mkDerivation rec { install -Dm755 -t $man/share/man/man8 dnstracer.8 ''; - buildInputs = [] ++ lib.optionals stdenv.isDarwin [ libresolv ]; + buildInputs = [] ++ lib.optionals stdenv.hostPlatform.isDarwin [ libresolv ]; - NIX_LDFLAGS = lib.optionalString stdenv.isDarwin "-lresolv"; + NIX_LDFLAGS = lib.optionalString stdenv.hostPlatform.isDarwin "-lresolv"; meta = with lib; { description = "Determines where a given Domain Name Server (DNS) gets its information from, and follows the chain of DNS servers back to the servers which know the data"; diff --git a/pkgs/tools/networking/dogdns/default.nix b/pkgs/tools/networking/dogdns/default.nix index e368e10715e6..397e87f23a10 100644 --- a/pkgs/tools/networking/dogdns/default.nix +++ b/pkgs/tools/networking/dogdns/default.nix @@ -28,9 +28,9 @@ rustPlatform.buildRustPackage rec { ]; nativeBuildInputs = [ installShellFiles just pandoc ] - ++ lib.optionals stdenv.isLinux [ pkg-config ]; - buildInputs = lib.optionals stdenv.isLinux [ openssl ] - ++ lib.optionals stdenv.isDarwin [ Security ]; + ++ lib.optionals stdenv.hostPlatform.isLinux [ pkg-config ]; + buildInputs = lib.optionals stdenv.hostPlatform.isLinux [ openssl ] + ++ lib.optionals stdenv.hostPlatform.isDarwin [ Security ]; outputs = [ "out" "man" ]; diff --git a/pkgs/tools/networking/drill/default.nix b/pkgs/tools/networking/drill/default.nix index 005d24ac323f..3afaff496ad9 100644 --- a/pkgs/tools/networking/drill/default.nix +++ b/pkgs/tools/networking/drill/default.nix @@ -20,16 +20,16 @@ rustPlatform.buildRustPackage rec { cargoHash = "sha256-96eUCg0mzgUFLOKxpwRfzj1jH2Z+aDohBTztvRVWln0="; - nativeBuildInputs = lib.optionals stdenv.isLinux [ + nativeBuildInputs = lib.optionals stdenv.hostPlatform.isLinux [ pkg-config ]; OPENSSL_LIB_DIR = "${lib.getLib openssl}/lib"; OPENSSL_DIR="${lib.getDev openssl}"; - buildInputs = lib.optionals stdenv.isLinux [ + buildInputs = lib.optionals stdenv.hostPlatform.isLinux [ openssl - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ Security ]; diff --git a/pkgs/tools/networking/edgedb/default.nix b/pkgs/tools/networking/edgedb/default.nix index 58763cc39319..c5f360cd2505 100644 --- a/pkgs/tools/networking/edgedb/default.nix +++ b/pkgs/tools/networking/edgedb/default.nix @@ -52,7 +52,7 @@ rustPlatform.buildRustPackage rec { buildInputs = [ curl ] - ++ lib.optionals stdenv.isDarwin [ + ++ lib.optionals stdenv.hostPlatform.isDarwin [ CoreServices Security libiconv diff --git a/pkgs/tools/networking/fast-ssh/default.nix b/pkgs/tools/networking/fast-ssh/default.nix index 59f61d9af710..e0b8d8775c10 100644 --- a/pkgs/tools/networking/fast-ssh/default.nix +++ b/pkgs/tools/networking/fast-ssh/default.nix @@ -19,7 +19,7 @@ rustPlatform.buildRustPackage rec { cargoHash = "sha256-CJ3Xx5jaTD01Ai7YAY4vB7RB5lU1BIXq7530B6+KeX4="; - buildInputs = lib.optional stdenv.isDarwin Security; + buildInputs = lib.optional stdenv.hostPlatform.isDarwin Security; meta = with lib; { description = "TUI tool to use the SSH config for connections"; diff --git a/pkgs/tools/networking/fastd/default.nix b/pkgs/tools/networking/fastd/default.nix index 20f8adf71cf8..cafcf4bdaf50 100644 --- a/pkgs/tools/networking/fastd/default.nix +++ b/pkgs/tools/networking/fastd/default.nix @@ -37,7 +37,7 @@ stdenv.mkDerivation rec { libsodium libuecc openssl - ] ++ lib.optionals (stdenv.isLinux) [ + ] ++ lib.optionals (stdenv.hostPlatform.isLinux) [ libmnl ]; diff --git a/pkgs/tools/networking/findomain/default.nix b/pkgs/tools/networking/findomain/default.nix index e04699ff7458..7fed4c99daae 100644 --- a/pkgs/tools/networking/findomain/default.nix +++ b/pkgs/tools/networking/findomain/default.nix @@ -36,7 +36,7 @@ rustPlatform.buildRustPackage rec { buildInputs = [ openssl - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.SystemConfiguration ]; diff --git a/pkgs/tools/networking/ghostunnel/default.nix b/pkgs/tools/networking/ghostunnel/default.nix index 2d23839a3b71..ade3fe16e45a 100644 --- a/pkgs/tools/networking/ghostunnel/default.nix +++ b/pkgs/tools/networking/ghostunnel/default.nix @@ -33,7 +33,7 @@ buildGoModule rec { }; meta = with lib; { - broken = stdenv.isDarwin; + broken = stdenv.hostPlatform.isDarwin; description = "TLS proxy with mutual authentication support for securing non-TLS backend applications"; homepage = "https://github.com/ghostunnel/ghostunnel#readme"; changelog = "https://github.com/ghostunnel/ghostunnel/releases/tag/v${version}"; diff --git a/pkgs/tools/networking/godspeed/default.nix b/pkgs/tools/networking/godspeed/default.nix index 64441c1674dd..2d0e4e32dea2 100644 --- a/pkgs/tools/networking/godspeed/default.nix +++ b/pkgs/tools/networking/godspeed/default.nix @@ -27,7 +27,7 @@ buildGoModule rec { ''; meta = with lib; { - broken = stdenv.isDarwin; + broken = stdenv.hostPlatform.isDarwin; description = "Manager for reverse shells"; homepage = "https://github.com/redcode-labs/GodSpeed"; license = with licenses; [ mit ]; diff --git a/pkgs/tools/networking/gp-saml-gui/default.nix b/pkgs/tools/networking/gp-saml-gui/default.nix index 105d5f6c68ba..f28306880f62 100644 --- a/pkgs/tools/networking/gp-saml-gui/default.nix +++ b/pkgs/tools/networking/gp-saml-gui/default.nix @@ -21,7 +21,7 @@ buildPythonPackage rec { sha256 = "sha256-4MFHad1cuCWawy2hrqdXOgud0pXpYiV9J3Jwqyg4Udk="; }; - buildInputs = lib.optional stdenv.isLinux glib-networking; + buildInputs = lib.optional stdenv.hostPlatform.isLinux glib-networking; nativeBuildInputs = [ wrapGAppsHook3 gobject-introspection glib-networking ]; @@ -29,7 +29,7 @@ buildPythonPackage rec { requests pygobject3 openconnect - ] ++ lib.optional stdenv.isLinux webkitgtk; + ] ++ lib.optional stdenv.hostPlatform.isLinux webkitgtk; preFixup = '' gappsWrapperArgs+=( diff --git a/pkgs/tools/networking/gping/default.nix b/pkgs/tools/networking/gping/default.nix index fb8857afff72..5079ce509bb9 100644 --- a/pkgs/tools/networking/gping/default.nix +++ b/pkgs/tools/networking/gping/default.nix @@ -21,11 +21,11 @@ rustPlatform.buildRustPackage rec { cargoHash = "sha256-pQ95sS2dGVzZUOyuUpJPamW7RLiUTGu9KgpWLg4wn/w="; - buildInputs = lib.optionals stdenv.isDarwin [ libiconv Security ]; + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ libiconv Security ]; nativeBuildInputs = [ installShellFiles ]; - nativeCheckInputs = lib.optionals stdenv.isLinux [ iputils ]; + nativeCheckInputs = lib.optionals stdenv.hostPlatform.isLinux [ iputils ]; postInstall = '' installManPage gping.1 diff --git a/pkgs/tools/networking/grpc_cli/default.nix b/pkgs/tools/networking/grpc_cli/default.nix index 24e22436b20d..d7a01b92dc45 100644 --- a/pkgs/tools/networking/grpc_cli/default.nix +++ b/pkgs/tools/networking/grpc_cli/default.nix @@ -14,7 +14,7 @@ stdenv.mkDerivation rec { buildInputs = [ curl numactl ]; cmakeFlags = [ "-DgRPC_BUILD_TESTS=ON" ]; makeFlags = [ "grpc_cli" ]; - env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.isAarch64 "-Wno-error=format-security"; + env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.hostPlatform.isAarch64 "-Wno-error=format-security"; installPhase = '' runHook preInstall diff --git a/pkgs/tools/networking/haproxy/default.nix b/pkgs/tools/networking/haproxy/default.nix index f2dc5dfd6e02..90d5bc12cadb 100644 --- a/pkgs/tools/networking/haproxy/default.nix +++ b/pkgs/tools/networking/haproxy/default.nix @@ -42,9 +42,9 @@ in stdenv.mkDerivation (finalAttrs: { # TODO: make it work on bsd as well makeFlags = [ "PREFIX=${placeholder "out"}" - ("TARGET=" + (if stdenv.isSunOS then "solaris" - else if stdenv.isLinux then "linux-glibc" - else if stdenv.isDarwin then "osx" + ("TARGET=" + (if stdenv.hostPlatform.isSunOS then "solaris" + else if stdenv.hostPlatform.isLinux then "linux-glibc" + else if stdenv.hostPlatform.isDarwin then "osx" else "generic")) ]; @@ -66,7 +66,7 @@ in stdenv.mkDerivation (finalAttrs: { "LUA_LIB_NAME=lua" "LUA_LIB=${lua5_4}/lib" "LUA_INC=${lua5_4}/include" - ] ++ lib.optionals stdenv.isLinux [ + ] ++ lib.optionals stdenv.hostPlatform.isLinux [ "USE_SYSTEMD=yes" "USE_GETADDRINFO=1" ] ++ lib.optionals withPrometheusExporter [ diff --git a/pkgs/tools/networking/hping/default.nix b/pkgs/tools/networking/hping/default.nix index 528bf11e7d94..10bd63d48927 100644 --- a/pkgs/tools/networking/hping/default.nix +++ b/pkgs/tools/networking/hping/default.nix @@ -25,7 +25,7 @@ stdenv.mkDerivation rec { postPatch = '' substituteInPlace Makefile.in --replace "gcc" "$CC" substituteInPlace version.c --replace "RELEASE_DATE" "\"$version\"" - '' + lib.optionalString stdenv.isLinux '' + '' + lib.optionalString stdenv.hostPlatform.isLinux '' sed -i -e 's|#include |#include |' \ libpcap_stuff.c script.c '' + lib.optionalString (stdenv.buildPlatform != stdenv.hostPlatform) '' diff --git a/pkgs/tools/networking/httplz/default.nix b/pkgs/tools/networking/httplz/default.nix index e83570f62f04..cb0e51632784 100644 --- a/pkgs/tools/networking/httplz/default.nix +++ b/pkgs/tools/networking/httplz/default.nix @@ -29,7 +29,7 @@ rustPlatform.buildRustPackage rec { ronn ]; - buildInputs = [ openssl ] ++ lib.optionals stdenv.isDarwin [ + buildInputs = [ openssl ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.Security ]; diff --git a/pkgs/tools/networking/ifstat-legacy/default.nix b/pkgs/tools/networking/ifstat-legacy/default.nix index 25c7dbb60ec4..f37f33a23f4b 100644 --- a/pkgs/tools/networking/ifstat-legacy/default.nix +++ b/pkgs/tools/networking/ifstat-legacy/default.nix @@ -9,7 +9,7 @@ stdenv.mkDerivation rec { sha256 = "01zmv6vk5kh5xmd563xws8a1qnxjb6b6kv59yzz9r3rrghxhd6c5"; }; - buildInputs = lib.optional stdenv.isLinux net-snmp; + buildInputs = lib.optional stdenv.hostPlatform.isLinux net-snmp; nativeBuildInputs = [ autoreconfHook ]; diff --git a/pkgs/tools/networking/iftop/default.nix b/pkgs/tools/networking/iftop/default.nix index c40a8ee51238..fdda3245b8b1 100644 --- a/pkgs/tools/networking/iftop/default.nix +++ b/pkgs/tools/networking/iftop/default.nix @@ -11,7 +11,7 @@ stdenv.mkDerivation rec { # Explicitly link against libgcc_s, to work around the infamous # "libgcc_s.so.1 must be installed for pthread_cancel to work". - LDFLAGS = lib.optionalString stdenv.isLinux "-lgcc_s"; + LDFLAGS = lib.optionalString stdenv.hostPlatform.isLinux "-lgcc_s"; preConfigure = '' cp ${automake}/share/automake*/config.{sub,guess} config diff --git a/pkgs/tools/networking/ifwifi/default.nix b/pkgs/tools/networking/ifwifi/default.nix index e62266c2dc6b..645000dffc73 100644 --- a/pkgs/tools/networking/ifwifi/default.nix +++ b/pkgs/tools/networking/ifwifi/default.nix @@ -14,7 +14,7 @@ rustPlatform.buildRustPackage rec { cargoHash = "sha256-TL7ZsRbpRdYymJHuoCUCqe/U3Vacb9mtKFh85IOl+PA="; nativeBuildInputs = [ makeWrapper ]; - buildInputs = lib.optional stdenv.isDarwin Security; + buildInputs = lib.optional stdenv.hostPlatform.isDarwin Security; postInstall = '' wrapProgram "$out/bin/ifwifi" \ @@ -22,8 +22,8 @@ rustPlatform.buildRustPackage rec { # `ifwifi` runtime dep [ networkmanager ] # `wifiscanner` crate's runtime deps - ++ (lib.optional stdenv.isLinux iw) - # ++ (lib.optional stdenv.isDarwin airport) # airport isn't packaged + ++ (lib.optional stdenv.hostPlatform.isLinux iw) + # ++ (lib.optional stdenv.hostPlatform.isDarwin airport) # airport isn't packaged )}" ''; diff --git a/pkgs/tools/networking/inetutils/default.nix b/pkgs/tools/networking/inetutils/default.nix index 5bbe7e4f8d40..6aedb474c612 100644 --- a/pkgs/tools/networking/inetutils/default.nix +++ b/pkgs/tools/networking/inetutils/default.nix @@ -29,7 +29,7 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ help2man perl /* for `whois' */ ]; buildInputs = [ ncurses /* for `talk' */ libxcrypt ]; - env = lib.optionalAttrs stdenv.isDarwin { + env = lib.optionalAttrs stdenv.hostPlatform.isDarwin { # This is a temporary workaround for missing headers in the 10.12 SDK to avoid a mass rebuild. # A commit to revert this change will be included in the fix PR targeting staging. NIX_CFLAGS_COMPILE = "-Wno-error=implicit-function-declaration"; @@ -50,7 +50,7 @@ stdenv.mkDerivation rec { "--disable-rsh" "--disable-rlogin" "--disable-rexec" - ] ++ lib.optional stdenv.isDarwin "--disable-servers"; + ] ++ lib.optional stdenv.hostPlatform.isDarwin "--disable-servers"; doCheck = true; diff --git a/pkgs/tools/networking/innernet/default.nix b/pkgs/tools/networking/innernet/default.nix index 0e6480f58dbe..4627ef34367c 100644 --- a/pkgs/tools/networking/innernet/default.nix +++ b/pkgs/tools/networking/innernet/default.nix @@ -30,7 +30,7 @@ rustPlatform.buildRustPackage rec { buildInputs = [ sqlite - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ Security libiconv ]; @@ -40,7 +40,7 @@ rustPlatform.buildRustPackage rec { installManPage doc/innernet.8.gz installShellCompletion doc/innernet.completions.{bash,fish,zsh} installShellCompletion doc/innernet-server.completions.{bash,fish,zsh} - '' + (lib.optionalString stdenv.isLinux '' + '' + (lib.optionalString stdenv.hostPlatform.isLinux '' find . -regex '.*\.\(target\|service\)' | xargs install -Dt $out/lib/systemd/system find $out/lib/systemd/system -type f | xargs sed -i "s|/usr/bin/innernet|$out/bin/innernet|" ''); diff --git a/pkgs/tools/networking/iperf/3.nix b/pkgs/tools/networking/iperf/3.nix index 8952c4004fd3..a73184265f56 100644 --- a/pkgs/tools/networking/iperf/3.nix +++ b/pkgs/tools/networking/iperf/3.nix @@ -16,7 +16,7 @@ stdenv.mkDerivation rec { hash = "sha256-hEBMqEMbWV6GxHPY8j2LsQKBAAHxX+r2EO/9OzGHiKo="; }; - buildInputs = [ openssl ] ++ lib.optionals stdenv.isLinux [ lksctp-tools ]; + buildInputs = [ openssl ] ++ lib.optionals stdenv.hostPlatform.isLinux [ lksctp-tools ]; configureFlags = [ "--with-openssl=${openssl.dev}" ]; outputs = [ diff --git a/pkgs/tools/networking/isync/default.nix b/pkgs/tools/networking/isync/default.nix index a3e035c30030..280be724a8aa 100644 --- a/pkgs/tools/networking/isync/default.nix +++ b/pkgs/tools/networking/isync/default.nix @@ -22,7 +22,7 @@ stdenv.mkDerivation (finalAttrs: { nativeBuildInputs = [ pkg-config perl ] ++ lib.optionals withCyrusSaslXoauth2 [ makeWrapper ]; buildInputs = [ openssl db cyrus_sasl zlib ] - ++ lib.optionals stdenv.isDarwin [ Security ]; + ++ lib.optionals stdenv.hostPlatform.isDarwin [ Security ]; postInstall = lib.optionalString withCyrusSaslXoauth2 '' wrapProgram "$out/bin/mbsync" \ diff --git a/pkgs/tools/networking/jwhois/default.nix b/pkgs/tools/networking/jwhois/default.nix index b384043cc23e..50959152d710 100644 --- a/pkgs/tools/networking/jwhois/default.nix +++ b/pkgs/tools/networking/jwhois/default.nix @@ -36,7 +36,7 @@ stdenv.mkDerivation (finalAttrs: { # Work around error from on aarch64-darwin: # error: 'TARGET_OS_IPHONE' is not defined, evaluates to 0 [-Werror,-Wundef-prefix=TARGET_OS_] # TODO: this should probably be fixed at a lower level than this? - env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.isDarwin "-Wno-undef-prefix"; + env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.hostPlatform.isDarwin "-Wno-undef-prefix"; meta = { description = "Client for the WHOIS protocol allowing you to query the owner of a domain name"; diff --git a/pkgs/tools/networking/lftp/default.nix b/pkgs/tools/networking/lftp/default.nix index a3bf468f21e7..482347a5ab98 100644 --- a/pkgs/tools/networking/lftp/default.nix +++ b/pkgs/tools/networking/lftp/default.nix @@ -16,9 +16,9 @@ stdenv.mkDerivation rec { buildInputs = [ openssl readline zlib libidn2 gmp libiconv libunistring gettext ]; - hardeningDisable = lib.optional stdenv.isDarwin "format"; + hardeningDisable = lib.optional stdenv.hostPlatform.isDarwin "format"; - env = lib.optionalAttrs stdenv.isDarwin { + env = lib.optionalAttrs stdenv.hostPlatform.isDarwin { # Required to build with clang 16 or `configure` will fail to detect several standard functions. NIX_CFLAGS_COMPILE = "-Wno-error=implicit-function-declaration"; }; diff --git a/pkgs/tools/networking/libreswan/default.nix b/pkgs/tools/networking/libreswan/default.nix index 7dac682407bd..c56cea33abf5 100644 --- a/pkgs/tools/networking/libreswan/default.nix +++ b/pkgs/tools/networking/libreswan/default.nix @@ -70,7 +70,7 @@ stdenv.mkDerivation rec { libcap_ng libxcrypt curl nspr nss ldns # needed to patch shebangs python3 bash - ] ++ lib.optional stdenv.isLinux libselinux; + ] ++ lib.optional stdenv.hostPlatform.isLinux libselinux; prePatch = '' # Replace wget with curl to save a dependency diff --git a/pkgs/tools/networking/lychee/default.nix b/pkgs/tools/networking/lychee/default.nix index bc6f1d3a1f39..0ecd2a0033c9 100644 --- a/pkgs/tools/networking/lychee/default.nix +++ b/pkgs/tools/networking/lychee/default.nix @@ -26,7 +26,7 @@ rustPlatform.buildRustPackage rec { nativeBuildInputs = [ pkg-config ]; buildInputs = [ openssl ] - ++ lib.optionals stdenv.isDarwin [ Security SystemConfiguration ]; + ++ lib.optionals stdenv.hostPlatform.isDarwin [ Security SystemConfiguration ]; checkFlags = [ # Network errors for all of these tests diff --git a/pkgs/tools/networking/magic-wormhole-rs/default.nix b/pkgs/tools/networking/magic-wormhole-rs/default.nix index fc0ceebc714e..6cc7af7e1775 100644 --- a/pkgs/tools/networking/magic-wormhole-rs/default.nix +++ b/pkgs/tools/networking/magic-wormhole-rs/default.nix @@ -21,7 +21,7 @@ rustPlatform.buildRustPackage rec { cargoHash = "sha256-x6aEas3vmdI24nOys+Y+vuwY7k5cYRAj9oOH73zyV+A="; buildInputs = [ libxcb ] - ++ lib.optionals stdenv.isDarwin [ Security AppKit ]; + ++ lib.optionals stdenv.hostPlatform.isDarwin [ Security AppKit ]; nativeBuildInputs = [ installShellFiles ]; diff --git a/pkgs/tools/networking/mailutils/default.nix b/pkgs/tools/networking/mailutils/default.nix index 919b4dda863a..c9979a0fee5f 100644 --- a/pkgs/tools/networking/mailutils/default.nix +++ b/pkgs/tools/networking/mailutils/default.nix @@ -67,7 +67,7 @@ stdenv.mkDerivation rec { readline sasl libxcrypt - ] ++ lib.optionals stdenv.isLinux [ nettools ] + ] ++ lib.optionals stdenv.hostPlatform.isLinux [ nettools ] ++ lib.optionals pythonSupport [ python3 ] ++ lib.optionals guileSupport [ guile_2_2 ]; @@ -100,7 +100,7 @@ stdenv.mkDerivation rec { ++ lib.optional (!guileSupport) "--without-guile"; nativeCheckInputs = [ dejagnu mkpasswd ]; - doCheck = !stdenv.isDarwin; # ERROR: All 46 tests were run, 46 failed unexpectedly. + doCheck = !stdenv.hostPlatform.isDarwin; # ERROR: All 46 tests were run, 46 failed unexpectedly. doInstallCheck = false; # fails preCheck = '' diff --git a/pkgs/tools/networking/miniupnpc/default.nix b/pkgs/tools/networking/miniupnpc/default.nix index 6942e682a813..378bab745166 100644 --- a/pkgs/tools/networking/miniupnpc/default.nix +++ b/pkgs/tools/networking/miniupnpc/default.nix @@ -26,7 +26,7 @@ stdenv.mkDerivation rec { (lib.cmakeBool "UPNPC_BUILD_STATIC" stdenv.hostPlatform.isStatic) ]; - doCheck = !stdenv.isFreeBSD; + doCheck = !stdenv.hostPlatform.isFreeBSD; postInstall = '' mv $out/bin/upnpc-* $out/bin/upnpc diff --git a/pkgs/tools/networking/mole/default.nix b/pkgs/tools/networking/mole/default.nix index e5585be469fc..dca72a66b1f8 100644 --- a/pkgs/tools/networking/mole/default.nix +++ b/pkgs/tools/networking/mole/default.nix @@ -28,7 +28,7 @@ buildGoModule rec { homepage = "https://github.com/davrodpin/mole"; license = with licenses; [ mit ]; maintainers = with maintainers; [ fab ]; - broken = stdenv.isDarwin; # build fails with go > 1.17 + broken = stdenv.hostPlatform.isDarwin; # build fails with go > 1.17 mainProgram = "mole"; }; } diff --git a/pkgs/tools/networking/mosh/default.nix b/pkgs/tools/networking/mosh/default.nix index 908307a3b6a8..230122a2574b 100644 --- a/pkgs/tools/networking/mosh/default.nix +++ b/pkgs/tools/networking/mosh/default.nix @@ -1,6 +1,6 @@ { lib, stdenv, fetchFromGitHub, zlib, protobuf, ncurses, pkg-config , makeWrapper, perl, openssl, autoreconfHook, openssh, bash-completion, fetchpatch -, withUtempter ? stdenv.isLinux && !stdenv.hostPlatform.isMusl, libutempter }: +, withUtempter ? stdenv.hostPlatform.isLinux && !stdenv.hostPlatform.isMusl, libutempter }: stdenv.mkDerivation rec { pname = "mosh"; diff --git a/pkgs/tools/networking/mozwire/default.nix b/pkgs/tools/networking/mozwire/default.nix index 40c6d3ec7827..800ea3c48f14 100644 --- a/pkgs/tools/networking/mozwire/default.nix +++ b/pkgs/tools/networking/mozwire/default.nix @@ -17,7 +17,7 @@ rustPlatform.buildRustPackage rec { hash = "sha256-2i8C1XgfI3MXnwXZzY6n8tIcw45G9h3vZqRlFaVoLH0="; }; - buildInputs = lib.optionals stdenv.isDarwin [ + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ CoreServices Security ]; diff --git a/pkgs/tools/networking/mtr/default.nix b/pkgs/tools/networking/mtr/default.nix index d36dcef4f080..42b79f978fdf 100644 --- a/pkgs/tools/networking/mtr/default.nix +++ b/pkgs/tools/networking/mtr/default.nix @@ -44,7 +44,7 @@ stdenv.mkDerivation rec { buildInputs = [ ncurses jansson ] ++ lib.optional withGtk gtk3 - ++ lib.optional stdenv.isLinux libcap; + ++ lib.optional stdenv.hostPlatform.isLinux libcap; enableParallelBuilding = true; diff --git a/pkgs/tools/networking/narrowlink/default.nix b/pkgs/tools/networking/narrowlink/default.nix index 62d9bd369ee7..531b0e7f60c9 100644 --- a/pkgs/tools/networking/narrowlink/default.nix +++ b/pkgs/tools/networking/narrowlink/default.nix @@ -22,7 +22,7 @@ rustPlatform.buildRustPackage rec { rustPlatform.bindgenHook ]; - buildInputs = lib.optionals stdenv.isDarwin [ + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.IOKit darwin.apple_sdk.frameworks.Security ]; diff --git a/pkgs/tools/networking/nbd/default.nix b/pkgs/tools/networking/nbd/default.nix index 68bcc6265558..e2924665bd31 100644 --- a/pkgs/tools/networking/nbd/default.nix +++ b/pkgs/tools/networking/nbd/default.nix @@ -39,7 +39,7 @@ stdenv.mkDerivation rec { buildInputs = [ glib gnutls - ] ++ lib.optionals stdenv.isLinux [ + ] ++ lib.optionals stdenv.hostPlatform.isLinux [ libnl linuxHeaders ]; @@ -51,7 +51,7 @@ stdenv.mkDerivation rec { # ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.cc.isClang "-Wno-error=implicit-function-declaration"; - doCheck = !stdenv.isDarwin; + doCheck = !stdenv.hostPlatform.isDarwin; passthru.tests = { test = nixosTests.nbd; diff --git a/pkgs/tools/networking/ncftp/default.nix b/pkgs/tools/networking/ncftp/default.nix index c31e6333b684..883d2e48afe3 100644 --- a/pkgs/tools/networking/ncftp/default.nix +++ b/pkgs/tools/networking/ncftp/default.nix @@ -19,7 +19,7 @@ stdenv.mkDerivation rec { # gpshare.o:(.bss+0x0): first defined here env.NIX_CFLAGS_COMPILE = toString ([ "-fcommon" ] # these are required for the configure script to work with clang - ++ lib.optionals stdenv.isDarwin [ + ++ lib.optionals stdenv.hostPlatform.isDarwin [ "-Wno-implicit-int" "-Wno-implicit-function-declaration" ]); diff --git a/pkgs/tools/networking/ndjbdns/default.nix b/pkgs/tools/networking/ndjbdns/default.nix index e5a3837657b1..5619c5b5c37b 100644 --- a/pkgs/tools/networking/ndjbdns/default.nix +++ b/pkgs/tools/networking/ndjbdns/default.nix @@ -13,7 +13,7 @@ stdenv.mkDerivation { nativeBuildInputs = [ autoreconfHook pkg-config ]; buildInputs = [ ] - ++ lib.optional stdenv.isLinux systemd; + ++ lib.optional stdenv.hostPlatform.isLinux systemd; meta = with lib; { description = "Brand new release of the Djbdns"; diff --git a/pkgs/tools/networking/netbird/default.nix b/pkgs/tools/networking/netbird/default.nix index 18e16956724d..cffab15b4993 100644 --- a/pkgs/tools/networking/netbird/default.nix +++ b/pkgs/tools/networking/netbird/default.nix @@ -44,13 +44,13 @@ buildGoModule rec { nativeBuildInputs = [ installShellFiles ] ++ lib.optional ui pkg-config; - buildInputs = lib.optionals (stdenv.isLinux && ui) [ + buildInputs = lib.optionals (stdenv.hostPlatform.isLinux && ui) [ gtk3 libayatana-appindicator libX11 libXcursor libXxf86vm - ] ++ lib.optionals (stdenv.isDarwin && ui) [ + ] ++ lib.optionals (stdenv.hostPlatform.isDarwin && ui) [ Cocoa IOKit Kernel @@ -88,7 +88,7 @@ buildGoModule rec { --fish <($out/bin/${binary} completion fish) \ --zsh <($out/bin/${binary} completion zsh) '') - modules) + lib.optionalString (stdenv.isLinux && ui) '' + modules) + lib.optionalString (stdenv.hostPlatform.isLinux && ui) '' mkdir -p $out/share/pixmaps cp $src/client/ui/netbird-systemtray-connected.png $out/share/pixmaps/netbird.png diff --git a/pkgs/tools/networking/netcat-openbsd/default.nix b/pkgs/tools/networking/netcat-openbsd/default.nix index 3f561716ede6..ec82ec16915f 100644 --- a/pkgs/tools/networking/netcat-openbsd/default.nix +++ b/pkgs/tools/networking/netcat-openbsd/default.nix @@ -45,6 +45,6 @@ stdenv.mkDerivation rec { platforms = platforms.unix; mainProgram = "nc"; # never built on aarch64-darwin, x86_64-darwin since first introduction in nixpkgs - broken = stdenv.isDarwin; + broken = stdenv.hostPlatform.isDarwin; }; } diff --git a/pkgs/tools/networking/notemap/default.nix b/pkgs/tools/networking/notemap/default.nix index 726b24469ab5..0611665d6618 100644 --- a/pkgs/tools/networking/notemap/default.nix +++ b/pkgs/tools/networking/notemap/default.nix @@ -21,7 +21,7 @@ stdenv.mkDerivation rec { buildInputs = [ libressl - ] ++ lib.optionals (stdenv.isDarwin && stdenv.isx86_64) [ + ] ++ lib.optionals (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isx86_64) [ memstreamHook ]; diff --git a/pkgs/tools/networking/ntp/default.nix b/pkgs/tools/networking/ntp/default.nix index 1ba389e38c02..2321455b8bbb 100644 --- a/pkgs/tools/networking/ntp/default.nix +++ b/pkgs/tools/networking/ntp/default.nix @@ -16,10 +16,10 @@ stdenv.mkDerivation rec { "--with-openssl-incdir=${openssl.dev}/include" "--enable-ignore-dns-errors" "--with-yielding-select=yes" - ] ++ lib.optional stdenv.isLinux "--enable-linuxcaps"; + ] ++ lib.optional stdenv.hostPlatform.isLinux "--enable-linuxcaps"; buildInputs = [ openssl perl ] - ++ lib.optionals stdenv.isLinux [ pps-tools libcap ]; + ++ lib.optionals stdenv.hostPlatform.isLinux [ pps-tools libcap ]; hardeningEnable = [ "pie" ]; diff --git a/pkgs/tools/networking/ockam/default.nix b/pkgs/tools/networking/ockam/default.nix index a6d8affd4dc5..aa983c12a411 100644 --- a/pkgs/tools/networking/ockam/default.nix +++ b/pkgs/tools/networking/ockam/default.nix @@ -28,7 +28,7 @@ rustPlatform.buildRustPackage { cargoHash = "sha256-yOSCkOIprQoAGxPi1jsHPmQ9bVaudSNw13jL4jTNehY="; nativeBuildInputs = [ git pkg-config ]; buildInputs = [ openssl dbus ] - ++ lib.optionals stdenv.isDarwin [ AppKit Security ]; + ++ lib.optionals stdenv.hostPlatform.isDarwin [ AppKit Security ]; passthru.updateScript = nix-update-script { }; diff --git a/pkgs/tools/networking/oha/default.nix b/pkgs/tools/networking/oha/default.nix index 71bc43135455..efd8fe7534ac 100644 --- a/pkgs/tools/networking/oha/default.nix +++ b/pkgs/tools/networking/oha/default.nix @@ -20,13 +20,13 @@ rustPlatform.buildRustPackage rec { cargoHash = "sha256-ks7n/x3RhjQbITL2hxiFkjxpZ5tcYMUyyfR/T7Kq/uU="; - nativeBuildInputs = lib.optionals stdenv.isLinux [ + nativeBuildInputs = lib.optionals stdenv.hostPlatform.isLinux [ pkg-config ]; - buildInputs = lib.optionals stdenv.isLinux [ + buildInputs = lib.optionals stdenv.hostPlatform.isLinux [ openssl - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.Security ]; diff --git a/pkgs/tools/networking/onetun/default.nix b/pkgs/tools/networking/onetun/default.nix index 4bc18cee4662..61f2ce7f3f45 100644 --- a/pkgs/tools/networking/onetun/default.nix +++ b/pkgs/tools/networking/onetun/default.nix @@ -18,7 +18,7 @@ rustPlatform.buildRustPackage rec { cargoHash = "sha256-TRfr4riMzR/MbsV2RiQNlPoPLhHK5EScNBCeyyamfgE="; - buildInputs = lib.optionals stdenv.isDarwin [ + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ Security ]; diff --git a/pkgs/tools/networking/openconnect/common.nix b/pkgs/tools/networking/openconnect/common.nix index 0dccb0e92fff..82040f64a897 100644 --- a/pkgs/tools/networking/openconnect/common.nix +++ b/pkgs/tools/networking/openconnect/common.nix @@ -16,7 +16,7 @@ , pcsclite , vpnc-scripts , PCSC -, useDefaultExternalBrowser ? stdenv.isLinux && stdenv.buildPlatform == stdenv.hostPlatform # xdg-utils doesn't cross-compile +, useDefaultExternalBrowser ? stdenv.hostPlatform.isLinux && stdenv.buildPlatform == stdenv.hostPlatform # xdg-utils doesn't cross-compile , xdg-utils , autoreconfHook }: @@ -34,8 +34,8 @@ stdenv.mkDerivation { ]; buildInputs = [ gmp libxml2 stoken zlib (if useOpenSSL then openssl else gnutls) ] - ++ lib.optional stdenv.isDarwin PCSC - ++ lib.optionals stdenv.isLinux [ p11-kit pcsclite ] + ++ lib.optional stdenv.hostPlatform.isDarwin PCSC + ++ lib.optionals stdenv.hostPlatform.isLinux [ p11-kit pcsclite ] ++ lib.optional useDefaultExternalBrowser xdg-utils; nativeBuildInputs = [ pkg-config autoreconfHook ]; diff --git a/pkgs/tools/networking/openfortivpn/default.nix b/pkgs/tools/networking/openfortivpn/default.nix index 91ec26c96a61..5d416e01601f 100644 --- a/pkgs/tools/networking/openfortivpn/default.nix +++ b/pkgs/tools/networking/openfortivpn/default.nix @@ -7,7 +7,7 @@ , ppp , systemd , withSystemd ? lib.meta.availableOn stdenv.hostPlatform systemd -, withPpp ? stdenv.isLinux +, withPpp ? stdenv.hostPlatform.isLinux }: stdenv.mkDerivation rec { diff --git a/pkgs/tools/networking/openssh/common.nix b/pkgs/tools/networking/openssh/common.nix index 496ea270c81e..c1cf38dfa87e 100644 --- a/pkgs/tools/networking/openssh/common.nix +++ b/pkgs/tools/networking/openssh/common.nix @@ -98,7 +98,7 @@ stdenv.mkDerivation (finalAttrs: { ] ++ lib.optional (etcDir != null) "--sysconfdir=${etcDir}" ++ lib.optional withFIDO "--with-security-key-builtin=yes" ++ lib.optional withKerberos (assert krb5 != null; "--with-kerberos5=${lib.getDev krb5}") - ++ lib.optional stdenv.isDarwin "--disable-libutil" + ++ lib.optional stdenv.hostPlatform.isDarwin "--disable-libutil" ++ lib.optional (!linkOpenssl) "--without-openssl" ++ lib.optional withLdns "--with-ldns" ++ extraConfigureFlags; @@ -113,7 +113,7 @@ stdenv.mkDerivation (finalAttrs: { doCheck = false; enableParallelChecking = false; - nativeCheckInputs = [ openssl ] ++ lib.optional (!stdenv.isDarwin) hostname; + nativeCheckInputs = [ openssl ] ++ lib.optional (!stdenv.hostPlatform.isDarwin) hostname; preCheck = lib.optionalString (stdenv.hostPlatform == stdenv.buildPlatform) '' # construct a dummy HOME export HOME=$(realpath ../dummy-home) @@ -161,7 +161,7 @@ stdenv.mkDerivation (finalAttrs: { # integration tests hard to get working on darwin with its shaky # sandbox # t-exec tests fail on musl - checkTarget = lib.optional (!stdenv.isDarwin && !stdenv.hostPlatform.isMusl) "t-exec" + checkTarget = lib.optional (!stdenv.hostPlatform.isDarwin && !stdenv.hostPlatform.isMusl) "t-exec" # other tests are less demanding of the environment ++ [ "unit" "file-tests" "interop-tests" ]; diff --git a/pkgs/tools/networking/openvpn/default.nix b/pkgs/tools/networking/openvpn/default.nix index d4035df7ce7a..c7fa7a222f83 100644 --- a/pkgs/tools/networking/openvpn/default.nix +++ b/pkgs/tools/networking/openvpn/default.nix @@ -31,13 +31,13 @@ stdenv.mkDerivation (finalAttrs: { nativeBuildInputs = [ pkg-config ]; buildInputs = [ lz4 lzo openssl ] - ++ optionals stdenv.isLinux [ libcap_ng libnl pam ] + ++ optionals stdenv.hostPlatform.isLinux [ libcap_ng libnl pam ] ++ optional useSystemd systemd ++ optional pkcs11Support pkcs11helper; configureFlags = optional useSystemd "--enable-systemd" ++ optional pkcs11Support "--enable-pkcs11" - ++ optional stdenv.isDarwin "--disable-plugin-auth-pam"; + ++ optional stdenv.hostPlatform.isDarwin "--disable-plugin-auth-pam"; # We used to vendor the update-systemd-resolved script inside libexec, # but a separate package was made, that uses libexec/openvpn. Copy it diff --git a/pkgs/tools/networking/p2p/amule/default.nix b/pkgs/tools/networking/p2p/amule/default.nix index d5446fedb550..608ce21c9997 100644 --- a/pkgs/tools/networking/p2p/amule/default.nix +++ b/pkgs/tools/networking/p2p/amule/default.nix @@ -98,6 +98,6 @@ stdenv.mkDerivation rec { maintainers = [ ]; platforms = platforms.unix; # Undefined symbols for architecture arm64: "_FSFindFolder" - broken = stdenv.isDarwin; + broken = stdenv.hostPlatform.isDarwin; }; } diff --git a/pkgs/tools/networking/pdnsd/default.nix b/pkgs/tools/networking/pdnsd/default.nix index 26001c37e982..4a09295b79bf 100644 --- a/pkgs/tools/networking/pdnsd/default.nix +++ b/pkgs/tools/networking/pdnsd/default.nix @@ -11,7 +11,7 @@ stdenv.mkDerivation rec { patches = # fix build with linux headers >= 5.13 - lib.optional stdenv.isLinux + lib.optional stdenv.hostPlatform.isLinux (fetchpatch { name = "fix-build-linux-headers-gte-5.13.patch"; url = "https://gitweb.gentoo.org/repo/gentoo.git/plain/net-dns/pdnsd/files/pdnsd-1.2.9a-linux-5.13_build_fix.patch?id=7ce35657f269c3b7016e8940ad36e59cf06e12a4"; diff --git a/pkgs/tools/networking/phantomsocks/default.nix b/pkgs/tools/networking/phantomsocks/default.nix index bb8aad8740df..1a720efb9381 100644 --- a/pkgs/tools/networking/phantomsocks/default.nix +++ b/pkgs/tools/networking/phantomsocks/default.nix @@ -4,8 +4,8 @@ , stdenv , libpcap # Cann't be build with both pcap and rawsocket tags -, withPcap ? (!stdenv.isLinux && !withRawsocket) -, withRawsocket ? (stdenv.isLinux && !withPcap) +, withPcap ? (!stdenv.hostPlatform.isLinux && !withRawsocket) +, withRawsocket ? (stdenv.hostPlatform.isLinux && !withPcap) }: buildGoModule rec { diff --git a/pkgs/tools/networking/phodav/default.nix b/pkgs/tools/networking/phodav/default.nix index f4bb16493901..ac84016c4abc 100644 --- a/pkgs/tools/networking/phodav/default.nix +++ b/pkgs/tools/networking/phodav/default.nix @@ -38,7 +38,7 @@ stdenv.mkDerivation rec { "-Dudevrulesdir=${placeholder "out"}/lib/udev/rules.d" ]; - NIX_LDFLAGS = lib.optionalString stdenv.isDarwin "-lintl"; + NIX_LDFLAGS = lib.optionalString stdenv.hostPlatform.isDarwin "-lintl"; passthru = { updateScript = gnome.updateScript { diff --git a/pkgs/tools/networking/pritunl-client/default.nix b/pkgs/tools/networking/pritunl-client/default.nix index 697cc08ec4f6..535919563158 100644 --- a/pkgs/tools/networking/pritunl-client/default.nix +++ b/pkgs/tools/networking/pritunl-client/default.nix @@ -48,7 +48,7 @@ postPatch = '' sed -Ei service/profile/scripts.go \ -e 's|#!\s*(/usr)?/bin/(env )?bash\b|#! ${runtimeShell}|g' - '' + lib.optionalString stdenv.isLinux '' + '' + lib.optionalString stdenv.hostPlatform.isLinux '' sed -Ei service/profile/scripts.go \ -e 's|(/usr)?/s?bin/busctl\b|busctl|g' \ -e 's|(/usr)?/s?bin/resolvectl\b|resolvectl|g' \ @@ -57,7 +57,7 @@ postInstall = '' mv $out/bin/service $out/bin/pritunl-client-service - '' + lib.optionalString stdenv.isLinux '' + '' + lib.optionalString stdenv.hostPlatform.isLinux '' mkdir -p $out/lib/systemd/system/ cp $src/resources_linux/pritunl-client.service $out/lib/systemd/system/ substituteInPlace $out/lib/systemd/system/pritunl-client.service \ @@ -70,7 +70,7 @@ which gnused gnugrep - ] ++ lib.optionals stdenv.isLinux [ + ] ++ lib.optionals stdenv.hostPlatform.isLinux [ openresolv systemd iproute2 @@ -83,7 +83,7 @@ --prefix PATH : ${lib.makeBinPath hookScriptsDeps} \ --add-flags "--setenv PATH \$PATH" ''; - in lib.optionalString stdenv.isLinux '' + in lib.optionalString stdenv.hostPlatform.isLinux '' wrapProgram $out/bin/pritunl-client-service \ --prefix PATH : "${lib.makeBinPath ([ openvpn-wrapped ])}" ''; @@ -113,7 +113,7 @@ in stdenv.mkDerivation { makeWrapper ${electron}/bin/electron $out/bin/pritunl-client-electron \ --add-flags $out/lib/pritunl_client_electron - '' + lib.optionalString stdenv.isLinux '' + '' + lib.optionalString stdenv.hostPlatform.isLinux '' mkdir -p $out/lib/systemd/system/ ln -s ${service}/lib/systemd/system/pritunl-client.service $out/lib/systemd/system/ diff --git a/pkgs/tools/networking/quicktun/default.nix b/pkgs/tools/networking/quicktun/default.nix index 2c28e3665698..2dcb9b21b623 100644 --- a/pkgs/tools/networking/quicktun/default.nix +++ b/pkgs/tools/networking/quicktun/default.nix @@ -36,7 +36,7 @@ stdenv.mkDerivation { passthru.tests.quicktun = nixosTests.quicktun; meta = with lib; { - broken = stdenv.isDarwin; + broken = stdenv.hostPlatform.isDarwin; description = "Very simple, yet secure VPN software"; homepage = "http://wiki.ucis.nl/QuickTun"; maintainers = with maintainers; [ h7x4 ]; diff --git a/pkgs/tools/networking/restish/default.nix b/pkgs/tools/networking/restish/default.nix index f8a1cfd466ea..a1fd639b72c1 100644 --- a/pkgs/tools/networking/restish/default.nix +++ b/pkgs/tools/networking/restish/default.nix @@ -21,10 +21,10 @@ buildGoModule rec { vendorHash = "sha256-qeArar0WnMACUnKBlC+PcFeJPzofwbK440A4M/rQ04U="; - buildInputs = lib.optionals stdenv.isDarwin [ + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.Cocoa darwin.apple_sdk.frameworks.Kernel - ] ++ lib.optionals stdenv.isLinux [ + ] ++ lib.optionals stdenv.hostPlatform.isLinux [ xorg.libX11 xorg.libXcursor xorg.libXi diff --git a/pkgs/tools/networking/rewrk/default.nix b/pkgs/tools/networking/rewrk/default.nix index a76d66611773..c4f4755f4b5b 100644 --- a/pkgs/tools/networking/rewrk/default.nix +++ b/pkgs/tools/networking/rewrk/default.nix @@ -22,7 +22,7 @@ rustPlatform.buildRustPackage rec { ln -s ${./Cargo.lock} Cargo.lock ''; - buildInputs = lib.optionals stdenv.isDarwin [ + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.Security ]; diff --git a/pkgs/tools/networking/rustcat/default.nix b/pkgs/tools/networking/rustcat/default.nix index 9848dbdd17b1..dba12bf58ac4 100644 --- a/pkgs/tools/networking/rustcat/default.nix +++ b/pkgs/tools/networking/rustcat/default.nix @@ -18,7 +18,7 @@ rustPlatform.buildRustPackage rec { cargoHash = "sha256-wqoU9UfXDmf7KIHgFif5rZfZY8Zu0SsaMVfwTtXLzHg="; - buildInputs = lib.optional stdenv.isDarwin Security; + buildInputs = lib.optional stdenv.hostPlatform.isDarwin Security; meta = with lib; { description = "Port listener and reverse shell"; diff --git a/pkgs/tools/networking/s3rs/default.nix b/pkgs/tools/networking/s3rs/default.nix index ec4725e9f2d0..ad343c00ca60 100644 --- a/pkgs/tools/networking/s3rs/default.nix +++ b/pkgs/tools/networking/s3rs/default.nix @@ -15,7 +15,7 @@ rustPlatform.buildRustPackage rec { nativeBuildInputs = [ python3 perl pkg-config ]; buildInputs = [ openssl ] - ++ lib.optionals stdenv.isDarwin [ Security ]; + ++ lib.optionals stdenv.hostPlatform.isDarwin [ Security ]; meta = with lib; { description = "S3 cli client with multi configs with diffent provider"; diff --git a/pkgs/tools/networking/shadowsocks-rust/default.nix b/pkgs/tools/networking/shadowsocks-rust/default.nix index 01b42fc57b97..18c7ca632d0b 100644 --- a/pkgs/tools/networking/shadowsocks-rust/default.nix +++ b/pkgs/tools/networking/shadowsocks-rust/default.nix @@ -13,10 +13,10 @@ rustPlatform.buildRustPackage rec { cargoHash = "sha256-2uYLrYFuzvaOZxw2hN4DcrEbwW5rnXxqKoI2q6yZaGU="; - nativeBuildInputs = lib.optionals stdenv.isLinux [ pkg-config ]; + nativeBuildInputs = lib.optionals stdenv.hostPlatform.isLinux [ pkg-config ]; - buildInputs = lib.optionals stdenv.isLinux [ openssl ] - ++ lib.optionals stdenv.isDarwin [ Security CoreServices ]; + buildInputs = lib.optionals stdenv.hostPlatform.isLinux [ openssl ] + ++ lib.optionals stdenv.hostPlatform.isDarwin [ Security CoreServices ]; buildFeatures = [ "trust-dns" diff --git a/pkgs/tools/networking/siege/default.nix b/pkgs/tools/networking/siege/default.nix index 6a1ce2f4a028..b26b21146175 100644 --- a/pkgs/tools/networking/siege/default.nix +++ b/pkgs/tools/networking/siege/default.nix @@ -14,7 +14,7 @@ stdenv.mkDerivation rec { hash = "sha256-MJ1Ym/yBm28V0uXoWRs8DG9pNiT1Bg7qwGek2ad1fek="; }; - NIX_LDFLAGS = lib.optionalString stdenv.isLinux [ + NIX_LDFLAGS = lib.optionalString stdenv.hostPlatform.isLinux [ "-lgcc_s" ]; diff --git a/pkgs/tools/networking/slowlorust/default.nix b/pkgs/tools/networking/slowlorust/default.nix index c48257130b2d..d5e924d10272 100644 --- a/pkgs/tools/networking/slowlorust/default.nix +++ b/pkgs/tools/networking/slowlorust/default.nix @@ -18,7 +18,7 @@ rustPlatform.buildRustPackage rec { cargoHash = "sha256-Wu1mm+yJw2SddddxC5NfnMWLr+dplnRxH3AJ1/mTAKM="; - buildInputs = lib.optionals stdenv.isDarwin [ + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ Security ]; diff --git a/pkgs/tools/networking/sockperf/default.nix b/pkgs/tools/networking/sockperf/default.nix index ed071322f2f8..6181138a7b6d 100644 --- a/pkgs/tools/networking/sockperf/default.nix +++ b/pkgs/tools/networking/sockperf/default.nix @@ -22,7 +22,7 @@ stdenv.mkDerivation rec { doCheck = true; meta = with lib; { - broken = stdenv.isDarwin; + broken = stdenv.hostPlatform.isDarwin; description = "Network Benchmarking Utility"; homepage = "https://github.com/Mellanox/sockperf"; license = licenses.bsd3; diff --git a/pkgs/tools/networking/speedtest-rs/default.nix b/pkgs/tools/networking/speedtest-rs/default.nix index b70aaa95aa5b..322d735e645a 100644 --- a/pkgs/tools/networking/speedtest-rs/default.nix +++ b/pkgs/tools/networking/speedtest-rs/default.nix @@ -22,7 +22,7 @@ rustPlatform.buildRustPackage rec { }; buildInputs = [ openssl ] ++ - lib.optionals stdenv.isDarwin [ + lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.Security darwin.apple_sdk.frameworks.SystemConfiguration ]; @@ -32,7 +32,7 @@ rustPlatform.buildRustPackage rec { cargoHash = "sha256-0YPCBzidE1+LgIYk457eSoerLvQuuZs9cTd7uUt1Lr8="; # Fail for unclear reasons (only on darwin) - checkFlags = lib.optionals stdenv.isDarwin [ + checkFlags = lib.optionals stdenv.hostPlatform.isDarwin [ "--skip=speedtest::tests::test_get_configuration" "--skip=speedtest::tests::test_get_server_list_with_config" ]; diff --git a/pkgs/tools/networking/srelay/default.nix b/pkgs/tools/networking/srelay/default.nix index a8d6a33ac3d1..d54d4d79017a 100644 --- a/pkgs/tools/networking/srelay/default.nix +++ b/pkgs/tools/networking/srelay/default.nix @@ -21,7 +21,7 @@ stdenv.mkDerivation rec { platforms = lib.platforms.unix; license = lib.licenses.bsd3; # never built on aarch64-linux since first introduction in nixpkgs - broken = stdenv.isLinux && stdenv.isAarch64; + broken = stdenv.hostPlatform.isLinux && stdenv.hostPlatform.isAarch64; mainProgram = "srelay"; }; } diff --git a/pkgs/tools/networking/strongswan/default.nix b/pkgs/tools/networking/strongswan/default.nix index 8aaebd710e10..9972af91f1f9 100644 --- a/pkgs/tools/networking/strongswan/default.nix +++ b/pkgs/tools/networking/strongswan/default.nix @@ -31,8 +31,8 @@ stdenv.mkDerivation rec { buildInputs = [ curl gmp python3 ldns unbound openssl pcsclite ] ++ lib.optionals enableTNC [ trousers sqlite libxml2 ] - ++ lib.optionals stdenv.isLinux [ systemd.dev pam iptables ] - ++ lib.optionals stdenv.isDarwin (with darwin.apple_sdk.frameworks; [ SystemConfiguration ]) + ++ lib.optionals stdenv.hostPlatform.isLinux [ systemd.dev pam iptables ] + ++ lib.optionals stdenv.hostPlatform.isDarwin (with darwin.apple_sdk.frameworks; [ SystemConfiguration ]) ++ lib.optionals enableNetworkManager [ networkmanager glib ]; patches = [ @@ -41,7 +41,7 @@ stdenv.mkDerivation rec { ./updown-path.patch ]; - postPatch = lib.optionalString stdenv.isLinux '' + postPatch = lib.optionalString stdenv.hostPlatform.isLinux '' # glibc-2.26 reorganized internal includes sed '1i#include ' -i src/libstrongswan/utils/utils/memory.h @@ -60,14 +60,14 @@ stdenv.mkDerivation rec { "--enable-pkcs11" "--enable-eap-sim-pcsc" "--enable-dnscert" "--enable-unbound" "--enable-chapoly" "--enable-curl" ] - ++ lib.optionals stdenv.isLinux [ + ++ lib.optionals stdenv.hostPlatform.isLinux [ "--enable-farp" "--enable-dhcp" "--enable-systemd" "--with-systemdsystemunitdir=${placeholder "out"}/etc/systemd/system" "--enable-xauth-pam" "--enable-forecast" "--enable-connmark" "--enable-af-alg" ] - ++ lib.optionals stdenv.isx86_64 [ "--enable-aesni" "--enable-rdrand" ] + ++ lib.optionals stdenv.hostPlatform.isx86_64 [ "--enable-aesni" "--enable-rdrand" ] ++ lib.optional (stdenv.hostPlatform.system == "i686-linux") "--enable-padlock" ++ lib.optionals enableTNC [ "--disable-gmp" "--disable-aes" "--disable-md5" "--disable-sha1" "--disable-sha2" "--disable-fips-prf" @@ -82,7 +82,7 @@ stdenv.mkDerivation rec { "--enable-nm" "--with-nm-ca-dir=/etc/ssl/certs" ] # Taken from: https://wiki.strongswan.org/projects/strongswan/wiki/MacOSX - ++ lib.optionals stdenv.isDarwin [ + ++ lib.optionals stdenv.hostPlatform.isDarwin [ "--disable-systemd" "--disable-xauth-pam" "--disable-kernel-netlink" diff --git a/pkgs/tools/networking/suckit/default.nix b/pkgs/tools/networking/suckit/default.nix index c62ad29e0113..07c91a9081c2 100644 --- a/pkgs/tools/networking/suckit/default.nix +++ b/pkgs/tools/networking/suckit/default.nix @@ -22,7 +22,7 @@ rustPlatform.buildRustPackage rec { nativeBuildInputs = [ pkg-config ]; - buildInputs = [ openssl ] ++ lib.optional stdenv.isDarwin Security; + buildInputs = [ openssl ] ++ lib.optional stdenv.hostPlatform.isDarwin Security; # requires internet access checkFlags = [ diff --git a/pkgs/tools/networking/termscp/default.nix b/pkgs/tools/networking/termscp/default.nix index fdff493abd90..1d5fbf4c341c 100644 --- a/pkgs/tools/networking/termscp/default.nix +++ b/pkgs/tools/networking/termscp/default.nix @@ -33,7 +33,7 @@ rustPlatform.buildRustPackage rec { dbus openssl samba - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ AppKit Cocoa Foundation @@ -43,7 +43,7 @@ rustPlatform.buildRustPackage rec { # Needed to get openssl-sys to use pkg-config. OPENSSL_NO_VENDOR = 1; - env.NIX_CFLAGS_COMPILE = toString (lib.optionals stdenv.isDarwin [ + env.NIX_CFLAGS_COMPILE = toString (lib.optionals stdenv.hostPlatform.isDarwin [ "-framework" "AppKit" ]); diff --git a/pkgs/tools/networking/tgt/default.nix b/pkgs/tools/networking/tgt/default.nix index a26daf42649d..647bc18e27b2 100644 --- a/pkgs/tools/networking/tgt/default.nix +++ b/pkgs/tools/networking/tgt/default.nix @@ -27,7 +27,7 @@ stdenv.mkDerivation rec { "-Wno-error=maybe-uninitialized" ]; - hardeningDisable = lib.optionals stdenv.isAarch64 [ + hardeningDisable = lib.optionals stdenv.hostPlatform.isAarch64 [ # error: 'read' writing 1 byte into a region of size 0 overflows the destination "fortify3" ]; diff --git a/pkgs/tools/networking/toxvpn/default.nix b/pkgs/tools/networking/toxvpn/default.nix index 555960da3980..dc6ae0daa16e 100644 --- a/pkgs/tools/networking/toxvpn/default.nix +++ b/pkgs/tools/networking/toxvpn/default.nix @@ -22,11 +22,11 @@ stdenv.mkDerivation { }; buildInputs = [ libtoxcore nlohmann_json libsodium zeromq ] - ++ lib.optionals stdenv.isLinux [ libcap systemd ]; + ++ lib.optionals stdenv.hostPlatform.isLinux [ libcap systemd ]; nativeBuildInputs = [ cmake ]; - cmakeFlags = lib.optionals stdenv.isLinux [ "-DSYSTEMD=1" ]; + cmakeFlags = lib.optionals stdenv.hostPlatform.isLinux [ "-DSYSTEMD=1" ]; postInstall = "$out/bin/toxvpn -h"; diff --git a/pkgs/tools/networking/transmission-rss/default.nix b/pkgs/tools/networking/transmission-rss/default.nix index 3d6d80ef474e..859b8acb5b10 100644 --- a/pkgs/tools/networking/transmission-rss/default.nix +++ b/pkgs/tools/networking/transmission-rss/default.nix @@ -17,7 +17,7 @@ rustPlatform.buildRustPackage rec { nativeBuildInputs = [pkg-config]; buildInputs = [openssl] - ++ lib.optionals stdenv.isDarwin (with darwin.apple_sdk.frameworks; [ + ++ lib.optionals stdenv.hostPlatform.isDarwin (with darwin.apple_sdk.frameworks; [ Security SystemConfiguration ]); diff --git a/pkgs/tools/networking/trurl/default.nix b/pkgs/tools/networking/trurl/default.nix index a8dc34374a9e..1e4bd4404f9c 100644 --- a/pkgs/tools/networking/trurl/default.nix +++ b/pkgs/tools/networking/trurl/default.nix @@ -12,7 +12,7 @@ stdenv.mkDerivation rec { }; outputs = [ "out" "dev" "man" ]; - separateDebugInfo = stdenv.isLinux; + separateDebugInfo = stdenv.hostPlatform.isLinux; enableParallelBuilding = true; diff --git a/pkgs/tools/networking/tuic/default.nix b/pkgs/tools/networking/tuic/default.nix index fc1270e01ae8..a2a0bfc2f0ff 100644 --- a/pkgs/tools/networking/tuic/default.nix +++ b/pkgs/tools/networking/tuic/default.nix @@ -16,7 +16,7 @@ rustPlatform.buildRustPackage rec{ hash = "sha256-VoNr91vDqBlt9asT/dwCeYk13UNiDexNNiKwD5DSn8k="; }; - buildInputs = lib.optionals stdenv.isDarwin (with darwin.apple_sdk.frameworks; [ + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin (with darwin.apple_sdk.frameworks; [ Security ]); diff --git a/pkgs/tools/networking/tunnelto/default.nix b/pkgs/tools/networking/tunnelto/default.nix index 450556808394..7f3129705950 100644 --- a/pkgs/tools/networking/tunnelto/default.nix +++ b/pkgs/tools/networking/tunnelto/default.nix @@ -25,10 +25,10 @@ rustPlatform.buildRustPackage rec { }; }; - nativeBuildInputs = lib.optionals stdenv.isLinux [ pkg-config ]; + nativeBuildInputs = lib.optionals stdenv.hostPlatform.isLinux [ pkg-config ]; buildInputs = [ ] - ++ lib.optionals stdenv.isLinux [ openssl ] - ++ lib.optionals stdenv.isDarwin [ Security ]; + ++ lib.optionals stdenv.hostPlatform.isLinux [ openssl ] + ++ lib.optionals stdenv.hostPlatform.isDarwin [ Security ]; meta = with lib; { description = "Expose your local web server to the internet with a public URL"; diff --git a/pkgs/tools/networking/tuntox/default.nix b/pkgs/tools/networking/tuntox/default.nix index e59a615e2627..07fa3e316092 100644 --- a/pkgs/tools/networking/tuntox/default.nix +++ b/pkgs/tools/networking/tuntox/default.nix @@ -45,10 +45,10 @@ stdenv.mkDerivation rec { postPatch = '' substituteInPlace gitversion.h --replace '7d45afdf7d00a95a8c3687175e2b1669fa1f7745' '365d2e5cbc0e3655fb64c204db0515f5f4cdf5a4' - '' + lib.optionalString stdenv.isLinux '' + '' + lib.optionalString stdenv.hostPlatform.isLinux '' substituteInPlace Makefile --replace ' -static ' ' ' substituteInPlace Makefile --replace 'CC=gcc' ' ' - '' + lib.optionalString stdenv.isDarwin '' + '' + lib.optionalString stdenv.hostPlatform.isDarwin '' substituteInPlace Makefile.mac --replace '.git/HEAD .git/index' ' ' substituteInPlace Makefile.mac --replace '/usr/local/lib/libtoxcore.a' '${libtoxcore}/lib/libtoxcore.a' substituteInPlace Makefile.mac --replace '/usr/local/lib/libsodium.a' '${libsodium}/lib/libsodium.dylib' @@ -56,9 +56,9 @@ stdenv.mkDerivation rec { ''; buildPhase = '' - '' + lib.optionalString stdenv.isLinux '' + '' + lib.optionalString stdenv.hostPlatform.isLinux '' make - '' + lib.optionalString stdenv.isDarwin '' + '' + lib.optionalString stdenv.hostPlatform.isDarwin '' make -f Makefile.mac tuntox ''; diff --git a/pkgs/tools/networking/uwimap/default.nix b/pkgs/tools/networking/uwimap/default.nix index a39f0d4660fb..a359e7677ac2 100644 --- a/pkgs/tools/networking/uwimap/default.nix +++ b/pkgs/tools/networking/uwimap/default.nix @@ -12,17 +12,17 @@ stdenv.mkDerivation rec { makeFlags = [ "CC=${stdenv.cc.targetPrefix}cc" "RANLIB=${stdenv.cc.targetPrefix}ranlib" - (if stdenv.isDarwin + (if stdenv.hostPlatform.isDarwin then "osx" else "lnp") # Linux with PAM modules; - ] ++ lib.optional stdenv.isx86_64 "EXTRACFLAGS=-fPIC"; # -fPIC is required to compile php with imap on x86_64 systems + ] ++ lib.optional stdenv.hostPlatform.isx86_64 "EXTRACFLAGS=-fPIC"; # -fPIC is required to compile php with imap on x86_64 systems hardeningDisable = [ "format" ]; buildInputs = [ openssl - (if stdenv.isDarwin then libkrb5 else pam) # Matches the make target. + (if stdenv.hostPlatform.isDarwin then libkrb5 else pam) # Matches the make target. ]; patches = [ @@ -45,7 +45,7 @@ stdenv.mkDerivation rec { makeFlagsArray+=("ARRC=${stdenv.cc.targetPrefix}ar rc") ''; - env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.isDarwin + env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.hostPlatform.isDarwin "-I${openssl.dev}/include/openssl"; installPhase = '' diff --git a/pkgs/tools/networking/veilid/default.nix b/pkgs/tools/networking/veilid/default.nix index c41f4b414af0..e06a03b8edce 100644 --- a/pkgs/tools/networking/veilid/default.nix +++ b/pkgs/tools/networking/veilid/default.nix @@ -39,7 +39,7 @@ rustPlatform.buildRustPackage rec { protobuf ]; - buildInputs = lib.optionals stdenv.isDarwin [ AppKit Security ]; + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ AppKit Security ]; cargoBuildFlags = [ "--workspace" diff --git a/pkgs/tools/networking/vpn-slice/default.nix b/pkgs/tools/networking/vpn-slice/default.nix index ce8b04c35fc7..6ca66d44e61d 100644 --- a/pkgs/tools/networking/vpn-slice/default.nix +++ b/pkgs/tools/networking/vpn-slice/default.nix @@ -20,10 +20,10 @@ buildPythonApplication rec { sha256 = "sha256-T6VULLNRLWO4OcAsuTmhty6H4EhinyxQSg0dfv2DUJs="; }; - postPatch = lib.optionalString stdenv.isDarwin '' + postPatch = lib.optionalString stdenv.hostPlatform.isDarwin '' substituteInPlace vpn_slice/mac.py \ --replace "'/sbin/route'" "'${unixtools.route}/bin/route'" - '' + lib.optionalString stdenv.isLinux '' + '' + lib.optionalString stdenv.hostPlatform.isLinux '' substituteInPlace vpn_slice/linux.py \ --replace "'/sbin/ip'" "'${iproute2}/bin/ip'" \ --replace "'/sbin/iptables'" "'${iptables}/bin/iptables'" diff --git a/pkgs/tools/networking/vpnc-scripts/default.nix b/pkgs/tools/networking/vpnc-scripts/default.nix index e0319ed4bf14..9a757c73cf55 100644 --- a/pkgs/tools/networking/vpnc-scripts/default.nix +++ b/pkgs/tools/networking/vpnc-scripts/default.nix @@ -31,13 +31,13 @@ stdenv.mkDerivation { preFixup = '' substituteInPlace $out/bin/vpnc-script \ --replace "which" "type -P" - '' + lib.optionalString stdenv.isLinux '' + '' + lib.optionalString stdenv.hostPlatform.isLinux '' substituteInPlace $out/bin/vpnc-script \ --replace "/sbin/resolvconf" "${openresolv}/bin/resolvconf" \ --replace "/usr/bin/resolvectl" "${systemd}/bin/resolvectl" '' + '' wrapProgram $out/bin/vpnc-script \ - --prefix PATH : "${lib.makeBinPath ([ nettools gawk coreutils gnugrep ] ++ lib.optionals stdenv.isLinux [ openresolv iproute2 ])}" + --prefix PATH : "${lib.makeBinPath ([ nettools gawk coreutils gnugrep ] ++ lib.optionals stdenv.hostPlatform.isLinux [ openresolv iproute2 ])}" ''; meta = with lib; { diff --git a/pkgs/tools/networking/wakeonlan/default.nix b/pkgs/tools/networking/wakeonlan/default.nix index 4a9f0936f940..f3f222d5ad64 100644 --- a/pkgs/tools/networking/wakeonlan/default.nix +++ b/pkgs/tools/networking/wakeonlan/default.nix @@ -13,7 +13,7 @@ perlPackages.buildPerlPackage rec { outputs = [ "out" ]; - nativeBuildInputs = [ installShellFiles ] ++ lib.optional stdenv.isDarwin shortenPerlShebang; + nativeBuildInputs = [ installShellFiles ] ++ lib.optional stdenv.hostPlatform.isDarwin shortenPerlShebang; nativeCheckInputs = [ perlPackages.TestPerlCritic perlPackages.TestPod perlPackages.TestPodCoverage ]; # Linting and formatting checks are of no interest for us. @@ -24,7 +24,7 @@ perlPackages.buildPerlPackage rec { installPhase = '' install -Dt $out/bin wakeonlan installManPage blib/man1/wakeonlan.1 - '' + lib.optionalString stdenv.isDarwin '' + '' + lib.optionalString stdenv.hostPlatform.isDarwin '' shortenPerlShebang $out/bin/wakeonlan ''; diff --git a/pkgs/tools/networking/wg-netmanager/default.nix b/pkgs/tools/networking/wg-netmanager/default.nix index b4a34ba22a48..a2c16fae073b 100644 --- a/pkgs/tools/networking/wg-netmanager/default.nix +++ b/pkgs/tools/networking/wg-netmanager/default.nix @@ -13,7 +13,7 @@ rustPlatform.buildRustPackage rec { cargoHash = "sha256-cOxkWMFPVmi+/BQWIvExzX5LDyC7C8kaTf5dGwfXj+s="; - buildInputs = lib.optional stdenv.isDarwin Security; + buildInputs = lib.optional stdenv.hostPlatform.isDarwin Security; # Test 01 tries to create a wireguard interface, which requires sudo. doCheck = true; diff --git a/pkgs/tools/networking/wget/default.nix b/pkgs/tools/networking/wget/default.nix index f2681f2a39fa..0bfdf8affc7b 100644 --- a/pkgs/tools/networking/wget/default.nix +++ b/pkgs/tools/networking/wget/default.nix @@ -31,11 +31,11 @@ stdenv.mkDerivation rec { buildInputs = [ libidn2 zlib pcre libuuid ] ++ lib.optional withOpenssl openssl ++ lib.optional withLibpsl libpsl - ++ lib.optionals stdenv.isDarwin [ darwin.apple_sdk.frameworks.CoreServices perlPackages.perl ]; + ++ lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.CoreServices perlPackages.perl ]; configureFlags = [ (lib.withFeatureAs withOpenssl "ssl" "openssl") - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ # https://lists.gnu.org/archive/html/bug-wget/2021-01/msg00076.html "--without-included-regex" ]; @@ -50,7 +50,7 @@ stdenv.mkDerivation rec { do sed -i "$i" -e's/localhost/127.0.0.1/g' done - '' + lib.optionalString stdenv.isDarwin '' + '' + lib.optionalString stdenv.hostPlatform.isDarwin '' # depending on the underlying filesystem, some tests # creating exotic file names fail for f in tests/Test-ftp-iri.px \ @@ -67,7 +67,7 @@ stdenv.mkDerivation rec { checkInputs = [ perlPackages.HTTPDaemon python3 - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ perlPackages.IOSocketSSL ]; diff --git a/pkgs/tools/networking/wget2/default.nix b/pkgs/tools/networking/wget2/default.nix index 85512aec06b9..7445b425f034 100644 --- a/pkgs/tools/networking/wget2/default.nix +++ b/pkgs/tools/networking/wget2/default.nix @@ -68,7 +68,7 @@ stdenv.mkDerivation rec { zstd ] ++ lib.optionals sslSupport [ openssl - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.CoreServices ]; diff --git a/pkgs/tools/networking/wireguard-tools/default.nix b/pkgs/tools/networking/wireguard-tools/default.nix index ebac01f063cd..855f620b4406 100644 --- a/pkgs/tools/networking/wireguard-tools/default.nix +++ b/pkgs/tools/networking/wireguard-tools/default.nix @@ -39,7 +39,7 @@ stdenv.mkDerivation rec { postFixup = '' substituteInPlace $out/lib/systemd/system/wg-quick@.service \ --replace /usr/bin $out/bin - '' + lib.optionalString stdenv.isLinux '' + '' + lib.optionalString stdenv.hostPlatform.isLinux '' for f in $out/bin/*; do # Which firewall and resolvconf implementations to use should be determined by the # environment, we provide the "default" ones as fallback. @@ -47,7 +47,7 @@ stdenv.mkDerivation rec { --prefix PATH : ${lib.makeBinPath [ procps iproute2 ]} \ --suffix PATH : ${lib.makeBinPath [ iptables openresolv ]} done - '' + lib.optionalString stdenv.isDarwin '' + '' + lib.optionalString stdenv.hostPlatform.isDarwin '' for f in $out/bin/*; do wrapProgram $f \ --prefix PATH : ${lib.makeBinPath [ wireguard-go ]} diff --git a/pkgs/tools/networking/wireguard-vanity-address/default.nix b/pkgs/tools/networking/wireguard-vanity-address/default.nix index cc7ebc557faf..969e9187db5b 100644 --- a/pkgs/tools/networking/wireguard-vanity-address/default.nix +++ b/pkgs/tools/networking/wireguard-vanity-address/default.nix @@ -11,7 +11,7 @@ rustPlatform.buildRustPackage rec { sha256 = "sha256-SjzcVIQ9HwhP6Y/uCwXGSdZgrYcUQ9kE/Bow8pyOKNo="; }; - buildInputs = lib.optionals stdenv.isDarwin [ Security ]; + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ Security ]; cargoHash = "sha256-0bkyopkssqH0vfaWkFC3dV2o7Q3EuDEOM8JvRB9ekLU="; diff --git a/pkgs/tools/networking/wrk2/default.nix b/pkgs/tools/networking/wrk2/default.nix index 6d2988705129..9bc8401efa66 100644 --- a/pkgs/tools/networking/wrk2/default.nix +++ b/pkgs/tools/networking/wrk2/default.nix @@ -39,7 +39,7 @@ stdenv.mkDerivation rec { platforms = lib.platforms.linux; maintainers = with lib.maintainers; [ thoughtpolice ]; # never built on aarch64-linux since first introduction in nixpkgs - broken = stdenv.isLinux && stdenv.isAarch64; + broken = stdenv.hostPlatform.isLinux && stdenv.hostPlatform.isAarch64; mainProgram = "wrk2"; }; } diff --git a/pkgs/tools/networking/xh/default.nix b/pkgs/tools/networking/xh/default.nix index 5df8e7903b2b..2ab8be19c44f 100644 --- a/pkgs/tools/networking/xh/default.nix +++ b/pkgs/tools/networking/xh/default.nix @@ -27,7 +27,7 @@ rustPlatform.buildRustPackage rec { nativeBuildInputs = [ installShellFiles pkg-config ]; buildInputs = lib.optionals withNativeTls - (if stdenv.isDarwin then [ darwin.apple_sdk.frameworks.SystemConfiguration ] else [ openssl ]); + (if stdenv.hostPlatform.isDarwin then [ darwin.apple_sdk.frameworks.SystemConfiguration ] else [ openssl ]); # Get openssl-sys to use pkg-config OPENSSL_NO_VENDOR = 1; diff --git a/pkgs/tools/networking/xrootd/default.nix b/pkgs/tools/networking/xrootd/default.nix index 1ceb6380aaa1..60da8d7e6e21 100644 --- a/pkgs/tools/networking/xrootd/default.nix +++ b/pkgs/tools/networking/xrootd/default.nix @@ -78,11 +78,11 @@ stdenv.mkDerivation (finalAttrs: { scitokens-cpp zlib ] - ++ lib.optionals (!stdenv.isDarwin) [ + ++ lib.optionals (!stdenv.hostPlatform.isDarwin) [ # https://github.com/xrootd/xrootd/blob/5b5a1f6957def2816b77ec773c7e1bfb3f1cfc5b/cmake/XRootDFindLibs.cmake#L58 fuse ] - ++ lib.optionals stdenv.isLinux [ + ++ lib.optionals stdenv.hostPlatform.isLinux [ systemd voms ] @@ -95,7 +95,7 @@ stdenv.mkDerivation (finalAttrs: { patchShebangs genversion.sh substituteInPlace cmake/XRootDConfig.cmake.in \ --replace-fail "@PACKAGE_CMAKE_INSTALL_" "@CMAKE_INSTALL_FULL_" - '' + lib.optionalString stdenv.isDarwin '' + '' + lib.optionalString stdenv.hostPlatform.isDarwin '' sed -i cmake/XRootDOSDefs.cmake -e '/set( MacOSX TRUE )/ainclude( GNUInstallDirs )' ''; @@ -117,7 +117,7 @@ stdenv.mkDerivation (finalAttrs: { + '' moveToOutput "bin/xrootd-config" "$dev" moveToOutput "bin/.xrootd-config-wrapped" "$dev" - '' + lib.optionalString stdenv.isLinux '' + '' + lib.optionalString stdenv.hostPlatform.isLinux '' mkdir -p "$out/lib/systemd/system" install -m 644 -t "$out/lib/systemd/system" ../packaging/common/*.service ../packaging/common/*.socket ''; @@ -127,12 +127,12 @@ stdenv.mkDerivation (finalAttrs: { ] ++ lib.optionals enableTestRunner [ "-DFORCE_ENABLED=TRUE" "-DENABLE_DAVIX=TRUE" - "-DENABLE_FUSE=${if (!stdenv.isDarwin) then "TRUE" else "FALSE"}" # not supported + "-DENABLE_FUSE=${if (!stdenv.hostPlatform.isDarwin) then "TRUE" else "FALSE"}" # not supported "-DENABLE_MACAROONS=OFF" "-DENABLE_PYTHON=FALSE" # built separately "-DENABLE_SCITOKENS=TRUE" "-DENABLE_TESTS=TRUE" - "-DENABLE_VOMS=${if stdenv.isLinux then "TRUE" else "FALSE"}" + "-DENABLE_VOMS=${if stdenv.hostPlatform.isLinux then "TRUE" else "FALSE"}" ]; postFixup = lib.optionalString (externalEtc != null) '' diff --git a/pkgs/tools/nix/fh/default.nix b/pkgs/tools/nix/fh/default.nix index 7e99d3aa068a..bc02bac41d58 100644 --- a/pkgs/tools/nix/fh/default.nix +++ b/pkgs/tools/nix/fh/default.nix @@ -29,13 +29,13 @@ rustPlatform.buildRustPackage rec { checkInputs = [ cacert ]; - buildInputs = lib.optionals stdenv.isDarwin [ + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.Security darwin.apple_sdk.frameworks.SystemConfiguration gcc.cc.lib ]; - env = lib.optionalAttrs stdenv.isDarwin { + env = lib.optionalAttrs stdenv.hostPlatform.isDarwin { NIX_CFLAGS_COMPILE = "-I${lib.getDev libcxx}/include/c++/v1"; }; diff --git a/pkgs/tools/nix/gridlock/default.nix b/pkgs/tools/nix/gridlock/default.nix index e49750eba5ca..ddfa9ee9831f 100644 --- a/pkgs/tools/nix/gridlock/default.nix +++ b/pkgs/tools/nix/gridlock/default.nix @@ -28,7 +28,7 @@ rustPlatform.buildRustPackage { buildInputs = [ openssl - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.Security ]; diff --git a/pkgs/tools/nix/info/default.nix b/pkgs/tools/nix/info/default.nix index 73c336afe045..7b29f9c43c9a 100644 --- a/pkgs/tools/nix/info/default.nix +++ b/pkgs/tools/nix/info/default.nix @@ -9,8 +9,8 @@ stdenv.mkDerivation { path = lib.makeBinPath ([ coreutils findutils gnugrep - ] ++ (lib.optionals stdenv.isDarwin [ darwin.DarwinTools ])); - is_darwin = if stdenv.isDarwin then "yes" else "no"; + ] ++ (lib.optionals stdenv.hostPlatform.isDarwin [ darwin.DarwinTools ])); + is_darwin = if stdenv.hostPlatform.isDarwin then "yes" else "no"; sandboxtest = ./sandbox.nix; relaxedsandboxtest = ./relaxedsandbox.nix; diff --git a/pkgs/tools/nix/nix-init/default.nix b/pkgs/tools/nix/nix-init/default.nix index 2784ac2518f1..9be2431d5958 100644 --- a/pkgs/tools/nix/nix-init/default.nix +++ b/pkgs/tools/nix/nix-init/default.nix @@ -52,9 +52,9 @@ rustPlatform.buildRustPackage rec { openssl zlib zstd - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.Security - ] ++ lib.optionals (stdenv.isDarwin && stdenv.isx86_64) [ + ] ++ lib.optionals (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isx86_64) [ darwin.apple_sdk.frameworks.CoreFoundation ]; diff --git a/pkgs/tools/nix/nixci/default.nix b/pkgs/tools/nix/nixci/default.nix index 30e23c4f63ec..5075705a2c88 100644 --- a/pkgs/tools/nix/nixci/default.nix +++ b/pkgs/tools/nix/nixci/default.nix @@ -25,9 +25,9 @@ rustPlatform.buildRustPackage rec { nativeBuildInputs = [ pkg-config installShellFiles nix ]; - buildInputs = lib.optionals stdenv.isLinux [ + buildInputs = lib.optionals stdenv.hostPlatform.isLinux [ openssl - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ IOKit Security SystemConfiguration diff --git a/pkgs/tools/nix/nixdoc/default.nix b/pkgs/tools/nix/nixdoc/default.nix index b0b7bc82e0d8..70b49237f161 100644 --- a/pkgs/tools/nix/nixdoc/default.nix +++ b/pkgs/tools/nix/nixdoc/default.nix @@ -13,7 +13,7 @@ rustPlatform.buildRustPackage rec { cargoHash = "sha256-5KV2VDsPmSgrdZIqCuQ5gjgCVs/Ki6uG6GTwjmtKLlQ="; - buildInputs = lib.optionals stdenv.isDarwin [ darwin.Security ]; + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ darwin.Security ]; meta = with lib; { description = "Generate documentation for Nix functions"; diff --git a/pkgs/tools/nix/npins/default.nix b/pkgs/tools/nix/npins/default.nix index 7ea75baab100..37f48f547062 100644 --- a/pkgs/tools/nix/npins/default.nix +++ b/pkgs/tools/nix/npins/default.nix @@ -21,7 +21,7 @@ in rustPlatform.buildRustPackage rec { cargoHash = "sha256-YwMypBl+P1ygf4zUbkZlq4zPrOzf+lPOz2FLg2/xI3k="; - buildInputs = lib.optional stdenv.isDarwin (with darwin.apple_sdk.frameworks; [ Security SystemConfiguration ]); + buildInputs = lib.optional stdenv.hostPlatform.isDarwin (with darwin.apple_sdk.frameworks; [ Security SystemConfiguration ]); nativeBuildInputs = [ makeWrapper ]; # (Almost) all tests require internet diff --git a/pkgs/tools/nix/statix/default.nix b/pkgs/tools/nix/statix/default.nix index 9cc48659d419..079459f2a2d0 100644 --- a/pkgs/tools/nix/statix/default.nix +++ b/pkgs/tools/nix/statix/default.nix @@ -19,7 +19,7 @@ rustPlatform.buildRustPackage rec { buildFeatures = lib.optional withJson "json"; # tests are failing on darwin - doCheck = !stdenv.isDarwin; + doCheck = !stdenv.hostPlatform.isDarwin; meta = with lib; { description = "Lints and suggestions for the nix programming language"; diff --git a/pkgs/tools/package-management/akku/overrides.nix b/pkgs/tools/package-management/akku/overrides.nix index 8617a3bdb5fc..ecc11d945377 100644 --- a/pkgs/tools/package-management/akku/overrides.nix +++ b/pkgs/tools/package-management/akku/overrides.nix @@ -11,8 +11,8 @@ let # debugging showLibs = pkg: old: { preCheck = "echo $CHEZSCHEMELIBDIRS"; }; runTests = pkg: old: { doCheck = true; }; - brokenOnAarch64 = _: lib.addMetaAttrs { broken = stdenv.isAarch64; }; - brokenOnx86_64Darwin = lib.addMetaAttrs { broken = stdenv.isDarwin && stdenv.isx86_64; }; + brokenOnAarch64 = _: lib.addMetaAttrs { broken = stdenv.hostPlatform.isAarch64; }; + brokenOnx86_64Darwin = lib.addMetaAttrs { broken = stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isx86_64; }; in { chez-srfi = joinOverrides [ diff --git a/pkgs/tools/package-management/disnix/dysnomia/default.nix b/pkgs/tools/package-management/disnix/dysnomia/default.nix index 48d1b7965112..92b880d1428f 100644 --- a/pkgs/tools/package-management/disnix/dysnomia/default.nix +++ b/pkgs/tools/package-management/disnix/dysnomia/default.nix @@ -61,12 +61,12 @@ stdenv.mkDerivation rec { (if enableNginxWebApplication then "--with-nginx" else "--without-nginx") (if enableXinetdService then "--with-xinetd" else "--without-xinetd") (if enableS6RCService then "--with-s6-rc" else "--without-s6-rc") - (if stdenv.isDarwin then "--with-launchd" else "--without-launchd") + (if stdenv.hostPlatform.isDarwin then "--with-launchd" else "--without-launchd") "--with-job-template=${jobTemplate}" ] ++ lib.optional enableLegacy "--enable-legacy"; buildInputs = [ getopt netcat ] - ++ lib.optional stdenv.isLinux systemd + ++ lib.optional stdenv.hostPlatform.isLinux systemd ++ lib.optional enableEjabberdDump ejabberd ++ lib.optional enableMySQLDatabase mariadb.out ++ lib.optional enablePostgreSQLDatabase postgresql diff --git a/pkgs/tools/package-management/dpkg/default.nix b/pkgs/tools/package-management/dpkg/default.nix index db095e59c489..6b9c1f3c2edb 100644 --- a/pkgs/tools/package-management/dpkg/default.nix +++ b/pkgs/tools/package-management/dpkg/default.nix @@ -13,7 +13,7 @@ , autoreconfHook , pkg-config , diffutils -, glibc ? !stdenv.isDarwin +, glibc ? !stdenv.hostPlatform.isDarwin , darwin }: @@ -33,7 +33,7 @@ stdenv.mkDerivation rec { "--with-admindir=/var/lib/dpkg" "PERL_LIBDIR=$(out)/${perl.libPrefix}" "TAR=${gnutar}/bin/tar" - ] ++ lib.optional stdenv.isDarwin "--disable-linker-optimisations"; + ] ++ lib.optional stdenv.hostPlatform.isDarwin "--disable-linker-optimisations"; enableParallelBuilding = true; @@ -67,13 +67,13 @@ stdenv.mkDerivation rec { --replace '"rm"' \"${coreutils}/bin/rm\" \ --replace '"cat"' \"${coreutils}/bin/cat\" \ --replace '"diff"' \"${diffutils}/bin/diff\" - '' + lib.optionalString (!stdenv.isDarwin) '' + '' + lib.optionalString (!stdenv.hostPlatform.isDarwin) '' substituteInPlace src/main/help.c \ --replace '"ldconfig"' \"${glibc.bin}/bin/ldconfig\" ''; buildInputs = [ perl zlib bzip2 xz zstd libmd ] - ++ lib.optionals stdenv.isDarwin [ darwin.apple_sdk.frameworks.CoreServices ]; + ++ lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.CoreServices ]; nativeBuildInputs = [ makeWrapper perl autoreconfHook pkg-config ]; postInstall = diff --git a/pkgs/tools/package-management/lix/common.nix b/pkgs/tools/package-management/lix/common.nix index fce59cff1173..dd1580bc4336 100644 --- a/pkgs/tools/package-management/lix/common.nix +++ b/pkgs/tools/package-management/lix/common.nix @@ -65,7 +65,7 @@ assert (hash == null) -> (src != null); enableDocumentation ? stdenv.hostPlatform == stdenv.buildPlatform, enableStatic ? stdenv.hostPlatform.isStatic, - withAWS ? !enableStatic && (stdenv.isLinux || stdenv.isDarwin), + withAWS ? !enableStatic && (stdenv.hostPlatform.isLinux || stdenv.hostPlatform.isDarwin), aws-sdk-cpp, # RISC-V support in progress https://github.com/seccomp/libseccomp/pull/50 withLibseccomp ? lib.meta.availableOn stdenv.hostPlatform libseccomp, @@ -124,7 +124,7 @@ stdenv.mkDerivation { mdbook-linkcheck doxygen ] - ++ lib.optionals stdenv.isLinux [ util-linuxMinimal ]; + ++ lib.optionals stdenv.hostPlatform.isLinux [ util-linuxMinimal ]; buildInputs = [ @@ -145,8 +145,8 @@ stdenv.mkDerivation { lix-doc ] ++ lib.optionals (!isLegacyParser) [ pegtl ] - ++ lib.optionals stdenv.isDarwin [ Security ] - ++ lib.optionals (stdenv.isx86_64) [ libcpuid ] + ++ lib.optionals stdenv.hostPlatform.isDarwin [ Security ] + ++ lib.optionals (stdenv.hostPlatform.isx86_64) [ libcpuid ] ++ lib.optionals withLibseccomp [ libseccomp ] ++ lib.optionals withAWS [ aws-sdk-cpp ]; @@ -166,7 +166,7 @@ stdenv.mkDerivation { mkdir -p $out/lib cp -pd ${boost}/lib/{libboost_context*,libboost_thread*,libboost_system*} $out/lib rm -f $out/lib/*.a - ${lib.optionalString stdenv.isLinux '' + ${lib.optionalString stdenv.hostPlatform.isLinux '' chmod u+w $out/lib/*.so.* patchelf --set-rpath $out/lib:${stdenv.cc.cc.lib}/lib $out/lib/libboost_thread.so.* ''} @@ -194,14 +194,14 @@ stdenv.mkDerivation { (lib.mesonBool "enable-tests" true) (lib.mesonBool "enable-docs" enableDocumentation) (lib.mesonEnable "internal-api-docs" enableDocumentation) - (lib.mesonBool "enable-embedded-sandbox-shell" (stdenv.isLinux && stdenv.hostPlatform.isStatic)) + (lib.mesonBool "enable-embedded-sandbox-shell" (stdenv.hostPlatform.isLinux && stdenv.hostPlatform.isStatic)) (lib.mesonEnable "seccomp-sandboxing" withLibseccomp) (lib.mesonOption "store-dir" storeDir) (lib.mesonOption "state-dir" stateDir) (lib.mesonOption "sysconfdir" confDir) ] - ++ lib.optionals stdenv.isLinux [ + ++ lib.optionals stdenv.hostPlatform.isLinux [ (lib.mesonOption "sandbox-shell" "${busybox-sandbox-shell}/bin/busybox") ]; @@ -219,7 +219,7 @@ stdenv.mkDerivation { mkdir -p $out/nix-support echo "file binary-dist $out/bin/nix" >> $out/nix-support/hydra-build-products '' - + lib.optionalString stdenv.isDarwin '' + + lib.optionalString stdenv.hostPlatform.isDarwin '' for lib in liblixutil.dylib liblixexpr.dylib; do install_name_tool \ -change "${lib.getLib boost}/lib/libboost_context.dylib" \ @@ -272,8 +272,8 @@ stdenv.mkDerivation { # fortify breaks the build with lto and musl for some reason ++ lib.optional stdenv.hostPlatform.isMusl "fortify"; - # hardeningEnable = lib.optionals (!stdenv.isDarwin) [ "pie" ]; - separateDebugInfo = stdenv.isLinux && !enableStatic; + # hardeningEnable = lib.optionals (!stdenv.hostPlatform.isDarwin) [ "pie" ]; + separateDebugInfo = stdenv.hostPlatform.isLinux && !enableStatic; enableParallelBuilding = true; # Used by (1) test which has dynamic port assignment. diff --git a/pkgs/tools/package-management/mynewt-newt/default.nix b/pkgs/tools/package-management/mynewt-newt/default.nix index 789a48655436..7f5fda624695 100644 --- a/pkgs/tools/package-management/mynewt-newt/default.nix +++ b/pkgs/tools/package-management/mynewt-newt/default.nix @@ -21,7 +21,7 @@ buildGoModule rec { # CGO_ENABLED=0 required for mac - "error: 'TARGET_OS_MAC' is not defined, evaluates to 0" # https://github.com/shirou/gopsutil/issues/976 - CGO_ENABLED = if stdenv.isLinux then 1 else 0; + CGO_ENABLED = if stdenv.hostPlatform.isLinux then 1 else 0; meta = with lib; { homepage = "https://mynewt.apache.org/"; diff --git a/pkgs/tools/package-management/nix-doc/default.nix b/pkgs/tools/package-management/nix-doc/default.nix index f7b3777f7f23..f594b0648bfa 100644 --- a/pkgs/tools/package-management/nix-doc/default.nix +++ b/pkgs/tools/package-management/nix-doc/default.nix @@ -38,7 +38,7 @@ rustPlatform.buildRustPackage rec { # Due to a Rust bug, setting -C relro-level to anything including "off" on # macOS will cause link errors - env = lib.optionalAttrs (withPlugin && stdenv.isLinux) { + env = lib.optionalAttrs (withPlugin && stdenv.hostPlatform.isLinux) { RUSTFLAGS = "-C relro-level=partial"; }; diff --git a/pkgs/tools/package-management/nix-du/default.nix b/pkgs/tools/package-management/nix-du/default.nix index 8b2463ccce4c..69289b8955b7 100644 --- a/pkgs/tools/package-management/nix-du/default.nix +++ b/pkgs/tools/package-management/nix-du/default.nix @@ -30,7 +30,7 @@ rustPlatform.buildRustPackage rec { boost nix nlohmann_json - ] ++ lib.optionals stdenv.isDarwin [ Security ]; + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ Security ]; nativeBuildInputs = [ pkg-config rustPlatform.bindgenHook ]; diff --git a/pkgs/tools/package-management/nix-index/default.nix b/pkgs/tools/package-management/nix-index/default.nix index b4b8b0832094..433ad82d4d2f 100644 --- a/pkgs/tools/package-management/nix-index/default.nix +++ b/pkgs/tools/package-management/nix-index/default.nix @@ -17,7 +17,7 @@ rustPlatform.buildRustPackage rec { nativeBuildInputs = [ pkg-config ]; buildInputs = [ openssl curl sqlite ] - ++ lib.optional stdenv.isDarwin Security; + ++ lib.optional stdenv.hostPlatform.isDarwin Security; postInstall = '' substituteInPlace command-not-found.sh \ diff --git a/pkgs/tools/package-management/nix-template/default.nix b/pkgs/tools/package-management/nix-template/default.nix index 91c1f9b26807..1d0c6f42f517 100644 --- a/pkgs/tools/package-management/nix-template/default.nix +++ b/pkgs/tools/package-management/nix-template/default.nix @@ -28,7 +28,7 @@ rustPlatform.buildRustPackage rec { ]; buildInputs = [ openssl ] - ++ lib.optional stdenv.isDarwin Security; + ++ lib.optional stdenv.hostPlatform.isDarwin Security; # needed for nix-prefetch-url postInstall = '' diff --git a/pkgs/tools/package-management/nix/common.nix b/pkgs/tools/package-management/nix/common.nix index a6f9f3c5b594..c26cb410399d 100644 --- a/pkgs/tools/package-management/nix/common.nix +++ b/pkgs/tools/package-management/nix/common.nix @@ -76,7 +76,7 @@ in , xz , enableDocumentation ? stdenv.buildPlatform.canExecute stdenv.hostPlatform , enableStatic ? stdenv.hostPlatform.isStatic -, withAWS ? !enableStatic && (stdenv.isLinux || stdenv.isDarwin), aws-sdk-cpp +, withAWS ? !enableStatic && (stdenv.hostPlatform.isLinux || stdenv.hostPlatform.isDarwin), aws-sdk-cpp , withLibseccomp ? lib.meta.availableOn stdenv.hostPlatform libseccomp, libseccomp , confDir @@ -101,7 +101,7 @@ self = stdenv.mkDerivation { [ "out" "dev" ] ++ lib.optionals enableDocumentation [ "man" "doc" ]; - hardeningEnable = lib.optionals (!stdenv.isDarwin) [ "pie" ]; + hardeningEnable = lib.optionals (!stdenv.hostPlatform.isDarwin) [ "pie" ]; hardeningDisable = [ "shadowstack" @@ -126,7 +126,7 @@ self = stdenv.mkDerivation { mdbook ] ++ lib.optionals (atLeast213 && enableDocumentation) [ mdbook-linkcheck - ] ++ lib.optionals stdenv.isLinux [ + ] ++ lib.optionals stdenv.hostPlatform.isLinux [ util-linuxMinimal ]; @@ -147,9 +147,9 @@ self = stdenv.mkDerivation { libgit2 ] ++ lib.optionals (atLeast224 || lib.versionAtLeast version "pre20240626") [ toml11 - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ Security - ] ++ lib.optionals (stdenv.isx86_64) [ + ] ++ lib.optionals (stdenv.hostPlatform.isx86_64) [ libcpuid ] ++ lib.optionals atLeast214 [ rapidcheck @@ -177,7 +177,7 @@ self = stdenv.mkDerivation { mkdir -p $out/lib cp -pd ${boost}/lib/{libboost_context*,libboost_thread*,libboost_system*} $out/lib rm -f $out/lib/*.a - ${lib.optionalString stdenv.isLinux '' + ${lib.optionalString stdenv.hostPlatform.isLinux '' chmod u+w $out/lib/*.so.* patchelf --set-rpath $out/lib:${stdenv.cc.cc.lib}/lib $out/lib/libboost_thread.so.* ''} @@ -206,9 +206,9 @@ self = stdenv.mkDerivation { "--enable-gc" ] ++ lib.optionals (!enableDocumentation) [ "--disable-doc-gen" - ] ++ lib.optionals stdenv.isLinux [ + ] ++ lib.optionals stdenv.hostPlatform.isLinux [ "--with-sandbox-shell=${busybox-sandbox-shell}/bin/busybox" - ] ++ lib.optionals (atLeast210 && stdenv.isLinux && stdenv.hostPlatform.isStatic) [ + ] ++ lib.optionals (atLeast210 && stdenv.hostPlatform.isLinux && stdenv.hostPlatform.isStatic) [ "--enable-embedded-sandbox-shell" ] ++ lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform && stdenv.hostPlatform ? nix && stdenv.hostPlatform.nix ? system) [ "--with-system=${stdenv.hostPlatform.nix.system}" @@ -234,16 +234,16 @@ self = stdenv.mkDerivation { installCheckTarget = if atLeast210 then "installcheck" else null; # socket path becomes too long otherwise - preInstallCheck = lib.optionalString stdenv.isDarwin '' + preInstallCheck = lib.optionalString stdenv.hostPlatform.isDarwin '' export TMPDIR=$NIX_BUILD_TOP '' # Prevent crashes in libcurl due to invoking Objective-C `+initialize` methods after `fork`. # See http://sealiesoftware.com/blog/archive/2017/6/5/Objective-C_and_fork_in_macOS_1013.html. - + lib.optionalString stdenv.isDarwin '' + + lib.optionalString stdenv.hostPlatform.isDarwin '' export OBJC_DISABLE_INITIALIZE_FORK_SAFETY=YES '' # See https://github.com/NixOS/nix/issues/5687 - + lib.optionalString (atLeast25 && stdenv.isDarwin) '' + + lib.optionalString (atLeast25 && stdenv.hostPlatform.isDarwin) '' echo "exit 99" > tests/gc-non-blocking.sh '' # TODO: investigate why this broken + lib.optionalString (atLeast25 && stdenv.hostPlatform.system == "aarch64-linux") '' @@ -253,7 +253,7 @@ self = stdenv.mkDerivation { export MANPATH=$man/share/man:$MANPATH ''; - separateDebugInfo = stdenv.isLinux && (atLeast24 -> !enableStatic); + separateDebugInfo = stdenv.hostPlatform.isLinux && (atLeast24 -> !enableStatic); enableParallelBuilding = true; @@ -283,7 +283,7 @@ self = stdenv.mkDerivation { inherit lib pkgs; nix = self; }; - } // lib.optionalAttrs stdenv.isLinux { + } // lib.optionalAttrs stdenv.hostPlatform.isLinux { nixStatic = pkgsStatic.nixVersions.${self_attribute_name}; # Basic smoke tests that needs to pass when upgrading nix. diff --git a/pkgs/tools/package-management/nix/default.nix b/pkgs/tools/package-management/nix/default.nix index ab059abf912f..2ea39c85eb85 100644 --- a/pkgs/tools/package-management/nix/default.nix +++ b/pkgs/tools/package-management/nix/default.nix @@ -68,7 +68,7 @@ let rm aws-cpp-sdk-core-tests/aws/auth/AWSAuthSignerTest.cpp # TestRandomURLMultiThreaded fails rm aws-cpp-sdk-core-tests/http/HttpClientTest.cpp - '' + lib.optionalString aws-sdk-cpp.stdenv.isi686 '' + '' + lib.optionalString aws-sdk-cpp.stdenv.hostPlatform.isi686 '' # EPSILON is exceeded rm aws-cpp-sdk-core-tests/aws/client/AdaptiveRetryStrategyTest.cpp ''; @@ -214,7 +214,7 @@ in lib.makeExtensible (self: ({ version = "2.24.7"; hash = "sha256-NAyc5MR/T70umcSeMv7y3AVt00ZkmDXGm7LfYKTONfE="; self_attribute_name = "nix_2_24"; - }).override (lib.optionalAttrs (stdenv.isDarwin && stdenv.isx86_64) { + }).override (lib.optionalAttrs (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isx86_64) { # Fix the following error with the default x86_64-darwin SDK: # # error: aligned allocation function of type 'void *(std::size_t, std::align_val_t)' is only available on macOS 10.13 or newer @@ -235,7 +235,7 @@ in lib.makeExtensible (self: ({ hash = "sha256-Hp7dkx7zfB9a4l5QusXUob0b1T2qdZ23LFo5dcp3xrU="; }; self_attribute_name = "git"; - }).override (lib.optionalAttrs (stdenv.isDarwin && stdenv.isx86_64) { + }).override (lib.optionalAttrs (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isx86_64) { # Fix the following error with the default x86_64-darwin SDK: # # error: aligned allocation function of type 'void *(std::size_t, std::align_val_t)' is only available on macOS 10.13 or newer diff --git a/pkgs/tools/package-management/nix/nix-perl.nix b/pkgs/tools/package-management/nix/nix-perl.nix index 4c93fcef564a..50e342e96cad 100644 --- a/pkgs/tools/package-management/nix/nix-perl.nix +++ b/pkgs/tools/package-management/nix/nix-perl.nix @@ -47,7 +47,7 @@ in stdenv.mkDerivation (finalAttrs: { nix perl xz - ] ++ lib.optional (stdenv.isDarwin) Security; + ] ++ lib.optional (stdenv.hostPlatform.isDarwin) Security; # Not cross-safe since Nix checks for curl/perl via # NEED_PROG/find_program, but both seem to be needed at runtime @@ -65,7 +65,7 @@ in stdenv.mkDerivation (finalAttrs: { ]); # `perlPackages.Test2Harness` is marked broken for Darwin - doCheck = !stdenv.isDarwin; + doCheck = !stdenv.hostPlatform.isDarwin; nativeCheckInputs = [ perl.pkgs.Test2Harness diff --git a/pkgs/tools/package-management/pkg/default.nix b/pkgs/tools/package-management/pkg/default.nix index 92a2270e2d75..76890f4bd515 100644 --- a/pkgs/tools/package-management/pkg/default.nix +++ b/pkgs/tools/package-management/pkg/default.nix @@ -18,7 +18,7 @@ stdenv.mkDerivation (finalAttrs: { nativeBuildInputs = [ m4 pkg-config tcl ]; buildInputs = [ bzip2 elfutils libarchive openssl xz zlib ] - ++ lib.optional stdenv.isLinux libbsd; + ++ lib.optional stdenv.hostPlatform.isLinux libbsd; enableParallelBuilding = true; diff --git a/pkgs/tools/package-management/poetry/unwrapped.nix b/pkgs/tools/package-management/poetry/unwrapped.nix index 71f1653dbdee..4a520f201883 100644 --- a/pkgs/tools/package-management/poetry/unwrapped.nix +++ b/pkgs/tools/package-management/poetry/unwrapped.nix @@ -81,7 +81,7 @@ buildPythonPackage rec { tomlkit trove-classifiers virtualenv - ] ++ lib.optionals (stdenv.isDarwin) [ + ] ++ lib.optionals (stdenv.hostPlatform.isDarwin) [ xattr ] ++ lib.optionals (pythonOlder "3.11") [ tomli @@ -102,18 +102,18 @@ buildPythonPackage rec { httpretty pytest-mock pytest-xdist - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ darwin.ps ]; preCheck = ('' export HOME=$TMPDIR - '' + lib.optionalString (stdenv.isDarwin && stdenv.isAarch64) '' + '' + lib.optionalString (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isAarch64) '' # https://github.com/python/cpython/issues/74570#issuecomment-1093748531 export no_proxy='*'; ''); - postCheck = lib.optionalString (stdenv.isDarwin && stdenv.isAarch64) '' + postCheck = lib.optionalString (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isAarch64) '' unset no_proxy ''; diff --git a/pkgs/tools/package-management/rpm/default.nix b/pkgs/tools/package-management/rpm/default.nix index ac9c498a9c89..ae4352ca0109 100644 --- a/pkgs/tools/package-management/rpm/default.nix +++ b/pkgs/tools/package-management/rpm/default.nix @@ -40,7 +40,7 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ autoreconfHook pkg-config pandoc ]; buildInputs = [ cpio zlib zstd bzip2 file libarchive libgcrypt nspr nss db xz python lua sqlite ] ++ lib.optional stdenv.cc.isClang llvmPackages.openmp - ++ lib.optional stdenv.isLinux libcap; + ++ lib.optional stdenv.hostPlatform.isLinux libcap; # rpm/rpmlib.h includes popt.h, and then the pkg-config file mentions these as linkage requirements propagatedBuildInputs = [ popt nss db bzip2 libarchive libbfd ] @@ -57,7 +57,7 @@ stdenv.mkDerivation rec { "--enable-zstd" "--localstatedir=/var" "--sharedstatedir=/com" - ] ++ lib.optional stdenv.isLinux "--with-cap"; + ] ++ lib.optional stdenv.hostPlatform.isLinux "--with-cap"; postPatch = '' substituteInPlace Makefile.am --replace '@$(MKDIR_P) $(DESTDIR)$(localstatedir)/tmp' "" diff --git a/pkgs/tools/security/acsccid/default.nix b/pkgs/tools/security/acsccid/default.nix index 74a0c39cb2d7..8bf7ae948000 100644 --- a/pkgs/tools/security/acsccid/default.nix +++ b/pkgs/tools/security/acsccid/default.nix @@ -37,7 +37,7 @@ stdenv.mkDerivation rec { buildInputs = [ pcsclite libusb1 - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ libiconv ]; diff --git a/pkgs/tools/security/adreaper/default.nix b/pkgs/tools/security/adreaper/default.nix index 873760250618..4e7c554e9164 100644 --- a/pkgs/tools/security/adreaper/default.nix +++ b/pkgs/tools/security/adreaper/default.nix @@ -17,7 +17,7 @@ buildGoModule rec { vendorHash = "sha256-lU39kj/uz0l7Rodsu6+UMv2o579eu1KUbutUNZni7bM="; - postInstall = lib.optionalString (!stdenv.isDarwin) '' + postInstall = lib.optionalString (!stdenv.hostPlatform.isDarwin) '' mv $out/bin/ADReaper $out/bin/$pname ''; diff --git a/pkgs/tools/security/age-plugin-ledger/default.nix b/pkgs/tools/security/age-plugin-ledger/default.nix index 516edc55db39..c20429968f4e 100644 --- a/pkgs/tools/security/age-plugin-ledger/default.nix +++ b/pkgs/tools/security/age-plugin-ledger/default.nix @@ -29,7 +29,7 @@ rustPlatform.buildRustPackage rec { buildInputs = [ libusb1 openssl - ] ++ lib.optional stdenv.isDarwin AppKit; + ] ++ lib.optional stdenv.hostPlatform.isDarwin AppKit; nativeCheckInputs = [ rage diff --git a/pkgs/tools/security/age-plugin-yubikey/default.nix b/pkgs/tools/security/age-plugin-yubikey/default.nix index e69d4dc789fb..9022442f62a8 100644 --- a/pkgs/tools/security/age-plugin-yubikey/default.nix +++ b/pkgs/tools/security/age-plugin-yubikey/default.nix @@ -30,8 +30,8 @@ rustPlatform.buildRustPackage rec { buildInputs = [ openssl ] - ++ lib.optional stdenv.isLinux pcsclite - ++ lib.optionals stdenv.isDarwin [ + ++ lib.optional stdenv.hostPlatform.isLinux pcsclite + ++ lib.optionals stdenv.hostPlatform.isDarwin [ IOKit Foundation PCSC diff --git a/pkgs/tools/security/amber/default.nix b/pkgs/tools/security/amber/default.nix index 5cb96596564c..a02c0a7236cf 100644 --- a/pkgs/tools/security/amber/default.nix +++ b/pkgs/tools/security/amber/default.nix @@ -14,7 +14,7 @@ rustPlatform.buildRustPackage rec { cargoHash = "sha256-Joy+SO1zR78Eh5eK2bxyT0l3hCuLX/J3u/UvN+++6vg="; - buildInputs = lib.optionals stdenv.isDarwin [ Security ]; + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ Security ]; meta = with lib; { description = "Manage secret values in-repo via public key cryptography"; diff --git a/pkgs/tools/security/arti/default.nix b/pkgs/tools/security/arti/default.nix index 21d8ee4ae154..1e93dae95961 100644 --- a/pkgs/tools/security/arti/default.nix +++ b/pkgs/tools/security/arti/default.nix @@ -23,11 +23,11 @@ rustPlatform.buildRustPackage rec { cargoHash = "sha256-I45SaawWAK7iTZDFhJT4YVO439D/3NmWLp3FtFmhLC0="; - nativeBuildInputs = lib.optionals stdenv.isLinux [ pkg-config ]; + nativeBuildInputs = lib.optionals stdenv.hostPlatform.isLinux [ pkg-config ]; buildInputs = [ sqlite ] - ++ lib.optionals stdenv.isLinux [ openssl ] - ++ lib.optionals stdenv.isDarwin [ CoreServices ]; + ++ lib.optionals stdenv.hostPlatform.isLinux [ openssl ] + ++ lib.optionals stdenv.hostPlatform.isDarwin [ CoreServices ]; cargoBuildFlags = [ "--package" "arti" ]; diff --git a/pkgs/tools/security/authoscope/default.nix b/pkgs/tools/security/authoscope/default.nix index b44f8bec2f7f..e30a00ff5be1 100644 --- a/pkgs/tools/security/authoscope/default.nix +++ b/pkgs/tools/security/authoscope/default.nix @@ -32,7 +32,7 @@ rustPlatform.buildRustPackage rec { libcap zlib openssl - ] ++ lib.optional stdenv.isDarwin Security; + ] ++ lib.optional stdenv.hostPlatform.isDarwin Security; postInstall = '' installManPage docs/${pname}.1 diff --git a/pkgs/tools/security/bettercap/default.nix b/pkgs/tools/security/bettercap/default.nix index db1104447951..5594bc106beb 100644 --- a/pkgs/tools/security/bettercap/default.nix +++ b/pkgs/tools/security/bettercap/default.nix @@ -25,7 +25,7 @@ buildGoModule rec { nativeBuildInputs = [ pkg-config ]; buildInputs = [ libpcap libusb1 ] - ++ lib.optionals stdenv.isLinux [ libnfnetlink libnetfilter_queue ]; + ++ lib.optionals stdenv.hostPlatform.isLinux [ libnfnetlink libnetfilter_queue ]; meta = with lib; { description = "Man in the middle tool"; diff --git a/pkgs/tools/security/boofuzz/default.nix b/pkgs/tools/security/boofuzz/default.nix index 5c2418cad665..b254b9d3d191 100644 --- a/pkgs/tools/security/boofuzz/default.nix +++ b/pkgs/tools/security/boofuzz/default.nix @@ -46,7 +46,7 @@ python3.pkgs.buildPythonApplication rec { "TestNoResponseFailure" "TestProcessMonitor" "TestSocketConnection" - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ "test_time_repeater" ]; diff --git a/pkgs/tools/security/browserpass/default.nix b/pkgs/tools/security/browserpass/default.nix index 463501a05eb0..4c58039e899a 100644 --- a/pkgs/tools/security/browserpass/default.nix +++ b/pkgs/tools/security/browserpass/default.nix @@ -20,7 +20,7 @@ buildGoModule rec { sha256 = "sha256-UZzOPRRiCUIG7uSSp9AEPMDN/+4cgyK47RhrI8oUx8U="; }; - nativeBuildInputs = [ makeWrapper ] ++ lib.optionals stdenv.isLinux [ autoPatchelfHook ]; + nativeBuildInputs = [ makeWrapper ] ++ lib.optionals stdenv.hostPlatform.isLinux [ autoPatchelfHook ]; vendorHash = "sha256-CjuH4ANP2bJDeA+o+1j+obbtk5/NVLet/OFS3Rms4r0="; diff --git a/pkgs/tools/security/bws/default.nix b/pkgs/tools/security/bws/default.nix index 4621bb1da5d0..0482ee954583 100644 --- a/pkgs/tools/security/bws/default.nix +++ b/pkgs/tools/security/bws/default.nix @@ -32,17 +32,17 @@ rustPlatform.buildRustPackage rec { nativeBuildInputs = [ installShellFiles pkg-config - ] ++ lib.optionals stdenv.isLinux [ + ] ++ lib.optionals stdenv.hostPlatform.isLinux [ perl ]; buildInputs = [ oniguruma - ] ++ lib.optionals stdenv.isLinux [ + ] ++ lib.optionals stdenv.hostPlatform.isLinux [ openssl ] - ++ lib.optionals stdenv.isDarwin [ + ++ lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.SystemConfiguration ]; diff --git a/pkgs/tools/security/cdk-go/default.nix b/pkgs/tools/security/cdk-go/default.nix index 93c0c1aa4964..0282bf20f79b 100644 --- a/pkgs/tools/security/cdk-go/default.nix +++ b/pkgs/tools/security/cdk-go/default.nix @@ -27,6 +27,6 @@ buildGoModule rec { license = with licenses; [ gpl2Only ]; maintainers = with maintainers; [ fab ]; mainProgram = "cdk"; - broken = stdenv.isDarwin; # needs to update gopsutil to at least v3.21.3 to include https://github.com/shirou/gopsutil/pull/1042 + broken = stdenv.hostPlatform.isDarwin; # needs to update gopsutil to at least v3.21.3 to include https://github.com/shirou/gopsutil/pull/1042 }; } diff --git a/pkgs/tools/security/cdxgen/default.nix b/pkgs/tools/security/cdxgen/default.nix index 3a6c14ea5f1c..6ea34ed4a834 100644 --- a/pkgs/tools/security/cdxgen/default.nix +++ b/pkgs/tools/security/cdxgen/default.nix @@ -27,7 +27,7 @@ stdenv.mkDerivation (finalAttrs: { node-gyp # required for sqlite3 bindings pnpm_9.configHook python3 # required for sqlite3 bindings - ] ++ lib.optional stdenv.isDarwin [ xcbuild ]; + ] ++ lib.optional stdenv.hostPlatform.isDarwin [ xcbuild ]; pnpmDeps = pnpm_9.fetchDeps { inherit (finalAttrs) pname version src; diff --git a/pkgs/tools/security/certdump/default.nix b/pkgs/tools/security/certdump/default.nix index 8615fda62b49..409650ac938b 100644 --- a/pkgs/tools/security/certdump/default.nix +++ b/pkgs/tools/security/certdump/default.nix @@ -41,6 +41,6 @@ buildDotnetModule rec { license = licenses.asl20; maintainers = [ maintainers.baloo ]; # net5 has no osx-arm64 target available - broken = stdenv.isDarwin && stdenv.isAarch64; + broken = stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isAarch64; }; } diff --git a/pkgs/tools/security/certinfo/default.nix b/pkgs/tools/security/certinfo/default.nix index f40b2a1eff01..3d48985d78a5 100644 --- a/pkgs/tools/security/certinfo/default.nix +++ b/pkgs/tools/security/certinfo/default.nix @@ -12,11 +12,11 @@ buildGoModule rec { }; # clipboard functionality not working on Darwin - doCheck = !(stdenv.isDarwin && stdenv.isAarch64); + doCheck = !(stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isAarch64); buildInputs = [ ] - ++ lib.optionals stdenv.isLinux [ libX11 ] - ++ lib.optionals stdenv.isDarwin [ darwin.apple_sdk.frameworks.Cocoa ]; + ++ lib.optionals stdenv.hostPlatform.isLinux [ libX11 ] + ++ lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.Cocoa ]; vendorHash = null; diff --git a/pkgs/tools/security/chainsaw/default.nix b/pkgs/tools/security/chainsaw/default.nix index b529956a9655..78eabff9d465 100644 --- a/pkgs/tools/security/chainsaw/default.nix +++ b/pkgs/tools/security/chainsaw/default.nix @@ -19,7 +19,7 @@ rustPlatform.buildRustPackage rec { cargoHash = "sha256-1w3DYP69aOphoqbsZIF9aX56Lftg2niKClmImLTa5DE="; - buildInputs = lib.optionals stdenv.isDarwin [ darwin.apple_sdk.frameworks.CoreFoundation ]; + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.CoreFoundation ]; ldflags = [ "-w" diff --git a/pkgs/tools/security/cherrybomb/default.nix b/pkgs/tools/security/cherrybomb/default.nix index 139ac5aea1ad..38783319e7c7 100644 --- a/pkgs/tools/security/cherrybomb/default.nix +++ b/pkgs/tools/security/cherrybomb/default.nix @@ -16,7 +16,7 @@ rustPlatform.buildRustPackage rec { cargoHash = "sha256-pj4+rG8XbrxVuNgnTVUTPmgrPBRSnoBnqFhOO/JGGWI="; - buildInputs = lib.optionals stdenv.isDarwin [ + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.Security ]; diff --git a/pkgs/tools/security/chipsec/default.nix b/pkgs/tools/security/chipsec/default.nix index 304b10ca8abb..73c1ade5bd63 100644 --- a/pkgs/tools/security/chipsec/default.nix +++ b/pkgs/tools/security/chipsec/default.nix @@ -12,7 +12,7 @@ python3.pkgs.buildPythonApplication rec { pname = "chipsec"; version = "1.10.6"; - disabled = !stdenv.isLinux; + disabled = !stdenv.hostPlatform.isLinux; src = fetchFromGitHub { owner = "chipsec"; diff --git a/pkgs/tools/security/clamav/default.nix b/pkgs/tools/security/clamav/default.nix index b44ccd5394a6..87471065098a 100644 --- a/pkgs/tools/security/clamav/default.nix +++ b/pkgs/tools/security/clamav/default.nix @@ -23,8 +23,8 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ cmake pkg-config rustc rust-bindgen rustfmt cargo python3 ]; buildInputs = [ zlib bzip2 libxml2 openssl ncurses curl libiconv libmilter pcre2 libmspack json_c check - ] ++ lib.optional stdenv.isLinux systemd - ++ lib.optional stdenv.isDarwin Foundation; + ] ++ lib.optional stdenv.hostPlatform.isLinux systemd + ++ lib.optional stdenv.hostPlatform.isDarwin Foundation; cmakeFlags = [ "-DSYSTEMD_UNIT_DIR=${placeholder "out"}/lib/systemd" diff --git a/pkgs/tools/security/cosign/default.nix b/pkgs/tools/security/cosign/default.nix index 24092e58423e..7d416cbdb6f8 100644 --- a/pkgs/tools/security/cosign/default.nix +++ b/pkgs/tools/security/cosign/default.nix @@ -23,8 +23,8 @@ buildGoModule rec { }; buildInputs = - lib.optional (stdenv.isLinux && pivKeySupport) (lib.getDev pcsclite) - ++ lib.optionals (stdenv.isDarwin && pivKeySupport) [ PCSC ]; + lib.optional (stdenv.hostPlatform.isLinux && pivKeySupport) (lib.getDev pcsclite) + ++ lib.optionals (stdenv.hostPlatform.isDarwin && pivKeySupport) [ PCSC ]; nativeBuildInputs = [ pkg-config installShellFiles ]; diff --git a/pkgs/tools/security/echidna/default.nix b/pkgs/tools/security/echidna/default.nix index a8e812219ba5..f3bfb9fbffee 100644 --- a/pkgs/tools/security/echidna/default.nix +++ b/pkgs/tools/security/echidna/default.nix @@ -110,7 +110,7 @@ mkDerivation ( mainProgram = "echidna-test"; } - // lib.optionalAttrs (stdenv.isDarwin && stdenv.isAarch64) { + // lib.optionalAttrs (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isAarch64) { # https://github.com/NixOS/nixpkgs/pull/304352 postInstall = with haskellPackages; '' diff --git a/pkgs/tools/security/feroxbuster/default.nix b/pkgs/tools/security/feroxbuster/default.nix index f4e361332e96..64975a04c9f4 100644 --- a/pkgs/tools/security/feroxbuster/default.nix +++ b/pkgs/tools/security/feroxbuster/default.nix @@ -34,7 +34,7 @@ rustPlatform.buildRustPackage rec { buildInputs = [ openssl - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ Security SystemConfiguration ]; diff --git a/pkgs/tools/security/firefox_decrypt/default.nix b/pkgs/tools/security/firefox_decrypt/default.nix index 2799a990975a..52dc4a9bd71f 100644 --- a/pkgs/tools/security/firefox_decrypt/default.nix +++ b/pkgs/tools/security/firefox_decrypt/default.nix @@ -29,7 +29,7 @@ buildPythonApplication rec { makeWrapperArgs = [ "--prefix" - (if stdenv.isDarwin then "DYLD_LIBRARY_PATH" else "LD_LIBRARY_PATH") + (if stdenv.hostPlatform.isDarwin then "DYLD_LIBRARY_PATH" else "LD_LIBRARY_PATH") ":" (lib.makeLibraryPath [ nss ]) ]; diff --git a/pkgs/tools/security/freeze/default.nix b/pkgs/tools/security/freeze/default.nix index 28ef21657009..e828ed79bf4c 100644 --- a/pkgs/tools/security/freeze/default.nix +++ b/pkgs/tools/security/freeze/default.nix @@ -22,7 +22,7 @@ buildGoModule rec { "-w" ]; - postInstall = lib.optionalString (!stdenv.isDarwin) '' + postInstall = lib.optionalString (!stdenv.hostPlatform.isDarwin) '' mv $out/bin/Freeze $out/bin/freeze ''; diff --git a/pkgs/tools/security/genpass/default.nix b/pkgs/tools/security/genpass/default.nix index 0c326c2dac66..f1e9a197680b 100644 --- a/pkgs/tools/security/genpass/default.nix +++ b/pkgs/tools/security/genpass/default.nix @@ -17,7 +17,7 @@ rustPlatform.buildRustPackage rec { cargoHash = "sha256-ls3tzZ+gtZQlObmbtwJDq6N/f5nY+Ps7RL5R/fR5Vgg="; - buildInputs = lib.optionals stdenv.isDarwin [ CoreFoundation libiconv Security ]; + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ CoreFoundation libiconv Security ]; meta = with lib; { description = "Simple yet robust commandline random password generator"; diff --git a/pkgs/tools/security/gfshare/default.nix b/pkgs/tools/security/gfshare/default.nix index e0da2fdaf35b..caf04cee0d5c 100644 --- a/pkgs/tools/security/gfshare/default.nix +++ b/pkgs/tools/security/gfshare/default.nix @@ -24,6 +24,6 @@ stdenv.mkDerivation rec { license = licenses.mit; platforms = platforms.all; maintainers = [ maintainers.rraval ]; - broken = stdenv.isDarwin; # never built on Hydra https://hydra.nixos.org/job/nixpkgs/trunk/gfshare.x86_64-darwin + broken = stdenv.hostPlatform.isDarwin; # never built on Hydra https://hydra.nixos.org/job/nixpkgs/trunk/gfshare.x86_64-darwin }; } diff --git a/pkgs/tools/security/ghidra/build.nix b/pkgs/tools/security/ghidra/build.nix index 994cee822a16..b898147d9a21 100644 --- a/pkgs/tools/security/ghidra/build.nix +++ b/pkgs/tools/security/ghidra/build.nix @@ -112,7 +112,7 @@ stdenv.mkDerivation (finalAttrs: { python3 python3Packages.pip ] - ++ lib.optionals stdenv.isDarwin [ + ++ lib.optionals stdenv.hostPlatform.isDarwin [ xcbuild desktopToDarwinBundle ]; @@ -196,6 +196,6 @@ stdenv.mkDerivation (finalAttrs: { roblabla vringar ]; - broken = stdenv.isDarwin && stdenv.isx86_64; + broken = stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isx86_64; }; }) diff --git a/pkgs/tools/security/ghidra/default.nix b/pkgs/tools/security/ghidra/default.nix index 55f224da511b..8f39076b4eec 100644 --- a/pkgs/tools/security/ghidra/default.nix +++ b/pkgs/tools/security/ghidra/default.nix @@ -39,7 +39,7 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ makeWrapper icoutils - ] ++ lib.optionals stdenv.isLinux [ autoPatchelfHook ]; + ] ++ lib.optionals stdenv.hostPlatform.isLinux [ autoPatchelfHook ]; buildInputs = [ stdenv.cc.cc.lib diff --git a/pkgs/tools/security/gitjacker/default.nix b/pkgs/tools/security/gitjacker/default.nix index 5303e169e8dd..83e8b91f8b28 100644 --- a/pkgs/tools/security/gitjacker/default.nix +++ b/pkgs/tools/security/gitjacker/default.nix @@ -22,7 +22,7 @@ buildGoModule rec { nativeCheckInputs = [ git ]; - doCheck = !stdenv.isDarwin; + doCheck = !stdenv.hostPlatform.isDarwin; preCheck = '' export PATH=$TMPDIR/usr/bin:$PATH diff --git a/pkgs/tools/security/gnupg/22.nix b/pkgs/tools/security/gnupg/22.nix index 5181f78e8a2e..e0fdf3361f9b 100644 --- a/pkgs/tools/security/gnupg/22.nix +++ b/pkgs/tools/security/gnupg/22.nix @@ -4,7 +4,7 @@ , adns, bzip2, gnutls, libusb1, openldap, readline, sqlite, zlib , enableMinimal ? false , withPcsc ? !enableMinimal, pcsclite -, guiSupport ? stdenv.isDarwin, pinentry +, guiSupport ? stdenv.hostPlatform.isDarwin, pinentry , nixosTests }: @@ -39,7 +39,7 @@ stdenv.mkDerivation rec { # Fix broken SOURCE_DATE_EPOCH usage - remove on the next upstream update sed -i 's/$SOURCE_DATE_EPOCH/''${SOURCE_DATE_EPOCH}/' doc/Makefile.am sed -i 's/$SOURCE_DATE_EPOCH/''${SOURCE_DATE_EPOCH}/' doc/Makefile.in - '' + lib.optionalString (stdenv.isLinux && withPcsc) '' + '' + lib.optionalString (stdenv.hostPlatform.isLinux && withPcsc) '' sed -i 's,"libpcsclite\.so[^"]*","${lib.getLib pcsclite}/lib/libpcsclite.so",g' scd/scdaemon.c ''; @@ -51,7 +51,7 @@ stdenv.mkDerivation rec { "GPGRT_CONFIG=${lib.getDev libgpg-error}/bin/gpgrt-config" ] ++ lib.optional guiSupport "--with-pinentry-pgm=${pinentry}/${pinentry.binaryPath or "bin/pinentry"}" - ++ lib.optional stdenv.isDarwin "--disable-ccid-driver"; + ++ lib.optional stdenv.hostPlatform.isDarwin "--disable-ccid-driver"; postInstall = if enableMinimal then '' diff --git a/pkgs/tools/security/gnupg/24.nix b/pkgs/tools/security/gnupg/24.nix index ef1b2e1db518..8c709e9b739a 100644 --- a/pkgs/tools/security/gnupg/24.nix +++ b/pkgs/tools/security/gnupg/24.nix @@ -4,8 +4,8 @@ , adns, bzip2, gnutls, libusb1, openldap, readline, sqlite, zlib , enableMinimal ? false , withPcsc ? !enableMinimal, pcsclite -, guiSupport ? stdenv.isDarwin, pinentry -, withTpm2Tss ? !stdenv.isDarwin && !enableMinimal, tpm2-tss +, guiSupport ? stdenv.hostPlatform.isDarwin, pinentry +, withTpm2Tss ? !stdenv.hostPlatform.isDarwin && !enableMinimal, tpm2-tss , nixosTests }: @@ -40,7 +40,7 @@ stdenv.mkDerivation rec { postPatch = '' sed -i 's,\(hkps\|https\)://keyserver.ubuntu.com,hkps://keys.openpgp.org,g' configure configure.ac doc/dirmngr.texi doc/gnupg.info-1 - '' + lib.optionalString (stdenv.isLinux && withPcsc) '' + '' + lib.optionalString (stdenv.hostPlatform.isLinux && withPcsc) '' sed -i 's,"libpcsclite\.so[^"]*","${lib.getLib pcsclite}/lib/libpcsclite.so",g' scd/scdaemon.c ''; @@ -54,7 +54,7 @@ stdenv.mkDerivation rec { ] ++ lib.optional guiSupport "--with-pinentry-pgm=${pinentry}/${pinentry.binaryPath or "bin/pinentry"}" ++ lib.optional withTpm2Tss "--with-tss=intel" - ++ lib.optional stdenv.isDarwin "--disable-ccid-driver"; + ++ lib.optional stdenv.hostPlatform.isDarwin "--disable-ccid-driver"; postInstall = if enableMinimal then '' diff --git a/pkgs/tools/security/go365/default.nix b/pkgs/tools/security/go365/default.nix index 381df6d74629..12fad051584d 100644 --- a/pkgs/tools/security/go365/default.nix +++ b/pkgs/tools/security/go365/default.nix @@ -17,7 +17,7 @@ buildGoModule rec { vendorHash = "sha256-Io+69kIW4DV2EkA73pjaTcTRbDSYBf61R7F+141Jojs="; - postInstall = lib.optionalString (!stdenv.isDarwin) '' + postInstall = lib.optionalString (!stdenv.hostPlatform.isDarwin) '' mv $out/bin/Go365 $out/bin/$pname ''; diff --git a/pkgs/tools/security/gopass/default.nix b/pkgs/tools/security/gopass/default.nix index fc16820d1c97..68b794214f6e 100644 --- a/pkgs/tools/security/gopass/default.nix +++ b/pkgs/tools/security/gopass/default.nix @@ -35,7 +35,7 @@ buildGoModule rec { git gnupg xclip - ] ++ lib.optional stdenv.isLinux wl-clipboard + ] ++ lib.optional stdenv.hostPlatform.isLinux wl-clipboard ); postInstall = '' diff --git a/pkgs/tools/security/gpg-tui/default.nix b/pkgs/tools/security/gpg-tui/default.nix index ba07ffb9e67f..5c4dd4620eaf 100644 --- a/pkgs/tools/security/gpg-tui/default.nix +++ b/pkgs/tools/security/gpg-tui/default.nix @@ -40,7 +40,7 @@ rustPlatform.buildRustPackage rec { ] ++ lib.optionals x11Support [ libxcb libxkbcommon - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ AppKit Foundation libiconv diff --git a/pkgs/tools/security/ibm-sw-tpm2/default.nix b/pkgs/tools/security/ibm-sw-tpm2/default.nix index 76123a7c893f..7792165d2587 100644 --- a/pkgs/tools/security/ibm-sw-tpm2/default.nix +++ b/pkgs/tools/security/ibm-sw-tpm2/default.nix @@ -6,7 +6,7 @@ }: let makefile = - if stdenv.isDarwin + if stdenv.hostPlatform.isDarwin then "makefile.mac" else "makefile"; in diff --git a/pkgs/tools/security/jwt-cli/default.nix b/pkgs/tools/security/jwt-cli/default.nix index 2dc57e8c0713..988864cbf7dc 100644 --- a/pkgs/tools/security/jwt-cli/default.nix +++ b/pkgs/tools/security/jwt-cli/default.nix @@ -15,7 +15,7 @@ rustPlatform.buildRustPackage rec { nativeBuildInputs = [ installShellFiles ]; - buildInputs = lib.optional stdenv.isDarwin Security; + buildInputs = lib.optional stdenv.hostPlatform.isDarwin Security; postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) '' installShellCompletion --cmd jwt \ diff --git a/pkgs/tools/security/kbs2/default.nix b/pkgs/tools/security/kbs2/default.nix index ae16b3f00c9a..04c6923af041 100644 --- a/pkgs/tools/security/kbs2/default.nix +++ b/pkgs/tools/security/kbs2/default.nix @@ -23,18 +23,18 @@ rustPlatform.buildRustPackage rec { cargoHash = "sha256-LcnvCWGVdBxhDgQDoGHXRppGeEpfjOv/F0dZMN2bOF8="; nativeBuildInputs = [ installShellFiles ] - ++ lib.optionals stdenv.isLinux [ python3 ]; + ++ lib.optionals stdenv.hostPlatform.isLinux [ python3 ]; buildInputs = [ ] - ++ lib.optionals stdenv.isLinux [ libxcb ] - ++ lib.optionals stdenv.isDarwin [ SystemConfiguration AppKit ]; + ++ lib.optionals stdenv.hostPlatform.isLinux [ libxcb ] + ++ lib.optionals stdenv.hostPlatform.isDarwin [ SystemConfiguration AppKit ]; preCheck = '' export HOME=$TMPDIR ''; checkFlags = [ "--skip=kbs2::config::tests::test_find_config_dir" ] - ++ lib.optionals stdenv.isDarwin [ "--skip=test_ragelib_rewrap_keyfile" ]; + ++ lib.optionals stdenv.hostPlatform.isDarwin [ "--skip=test_ragelib_rewrap_keyfile" ]; postInstall = '' mkdir -p $out/share/kbs2 diff --git a/pkgs/tools/security/keepwn/default.nix b/pkgs/tools/security/keepwn/default.nix index 9c878f37fd0c..8306cbe441ea 100644 --- a/pkgs/tools/security/keepwn/default.nix +++ b/pkgs/tools/security/keepwn/default.nix @@ -29,7 +29,7 @@ python3.pkgs.buildPythonApplication rec { termcolor ]; - postInstall = lib.optionalString (!stdenv.isDarwin) '' + postInstall = lib.optionalString (!stdenv.hostPlatform.isDarwin) '' mv $out/bin/KeePwn $out/bin/$pname ''; diff --git a/pkgs/tools/security/kepler/default.nix b/pkgs/tools/security/kepler/default.nix index e4d2fc914cf9..35e601dac163 100644 --- a/pkgs/tools/security/kepler/default.nix +++ b/pkgs/tools/security/kepler/default.nix @@ -30,7 +30,7 @@ rustPlatform.buildRustPackage rec { openssl postgresql zstd - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.Security ]; diff --git a/pkgs/tools/security/keybase/default.nix b/pkgs/tools/security/keybase/default.nix index d8457c487253..103066261a19 100644 --- a/pkgs/tools/security/keybase/default.nix +++ b/pkgs/tools/security/keybase/default.nix @@ -28,7 +28,7 @@ buildGoModule rec { }) ]; - buildInputs = lib.optionals stdenv.isDarwin [ AppKit AVFoundation AudioToolbox ImageIO CoreMedia Foundation CoreGraphics MediaToolbox ]; + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ AppKit AVFoundation AudioToolbox ImageIO CoreMedia Foundation CoreGraphics MediaToolbox ]; tags = [ "production" ]; ldflags = [ "-s" "-w" ]; diff --git a/pkgs/tools/security/keyscope/default.nix b/pkgs/tools/security/keyscope/default.nix index ae5bd80e2964..b2bd09d1f44a 100644 --- a/pkgs/tools/security/keyscope/default.nix +++ b/pkgs/tools/security/keyscope/default.nix @@ -25,7 +25,7 @@ rustPlatform.buildRustPackage rec { nativeBuildInputs = [ pkg-config ]; - buildInputs = [ openssl ] ++ lib.optionals stdenv.isDarwin [ + buildInputs = [ openssl ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ DiskArbitration Foundation IOKit diff --git a/pkgs/tools/security/kpcli/default.nix b/pkgs/tools/security/kpcli/default.nix index 5a3b0a75862f..f7e636f8facc 100644 --- a/pkgs/tools/security/kpcli/default.nix +++ b/pkgs/tools/security/kpcli/default.nix @@ -22,7 +22,7 @@ stdenv.mkDerivation rec { makeWrapper $out/share/kpcli.pl $out/bin/kpcli --set PERL5LIB \ "${with perlPackages; makePerlPath ([ CaptureTiny Clipboard Clone CryptRijndael SortNaturally TermReadKey TermShellUI FileKeePass TermReadLineGnu XMLParser - ] ++ lib.optional stdenv.isDarwin MacPasteboard)}" + ] ++ lib.optional stdenv.hostPlatform.isDarwin MacPasteboard)}" ''; diff --git a/pkgs/tools/security/kubeclarity/default.nix b/pkgs/tools/security/kubeclarity/default.nix index 585b4d35cd69..25a6582695e7 100644 --- a/pkgs/tools/security/kubeclarity/default.nix +++ b/pkgs/tools/security/kubeclarity/default.nix @@ -26,7 +26,7 @@ buildGoModule rec { pkg-config ]; - buildInputs = lib.optionals stdenv.isLinux [ + buildInputs = lib.optionals stdenv.hostPlatform.isLinux [ btrfs-progs lvm2 ]; diff --git a/pkgs/tools/security/lethe/default.nix b/pkgs/tools/security/lethe/default.nix index ff9b297d5361..21875006f4fc 100644 --- a/pkgs/tools/security/lethe/default.nix +++ b/pkgs/tools/security/lethe/default.nix @@ -18,7 +18,7 @@ rustPlatform.buildRustPackage rec { cargoHash = "sha256-SFNNpbHZdDJvH95f+VWyVKnQp3OJwQmCOqHtLAhhkOk="; - buildInputs = lib.optional stdenv.isDarwin Security; + buildInputs = lib.optional stdenv.hostPlatform.isDarwin Security; meta = with lib; { description = "Tool to wipe drives in a secure way"; diff --git a/pkgs/tools/security/libacr38u/default.nix b/pkgs/tools/security/libacr38u/default.nix index 5211f42b96ef..45db3985d555 100644 --- a/pkgs/tools/security/libacr38u/default.nix +++ b/pkgs/tools/security/libacr38u/default.nix @@ -13,7 +13,7 @@ stdenv.mkDerivation { nativeBuildInputs = [ autoreconfHook pkg-config ]; buildInputs = [ pcsclite libusb-compat-0_1 ] - ++ lib.optional stdenv.isDarwin IOKit; + ++ lib.optional stdenv.hostPlatform.isDarwin IOKit; preBuild = '' makeFlagsArray=(usbdropdir="$out/pcsc/drivers"); diff --git a/pkgs/tools/security/maigret/default.nix b/pkgs/tools/security/maigret/default.nix index cdbf6df4dd0f..0936e0d98062 100644 --- a/pkgs/tools/security/maigret/default.nix +++ b/pkgs/tools/security/maigret/default.nix @@ -92,7 +92,7 @@ python3.pkgs.buildPythonApplication rec { "test_pdf_report" "test_self_check_db_negative_enabled" "test_self_check_db_positive_enable" - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ # AsyncioProgressbarExecutor is slower on darwin than it should be, # Upstream issue: https://github.com/soxoj/maigret/issues/679 "test_asyncio_progressbar_executor" diff --git a/pkgs/tools/security/masscan/default.nix b/pkgs/tools/security/masscan/default.nix index a6aa990c1d82..9606fe0f1156 100644 --- a/pkgs/tools/security/masscan/default.nix +++ b/pkgs/tools/security/masscan/default.nix @@ -27,7 +27,7 @@ stdenv.mkDerivation rec { }) ]; - postPatch = lib.optionalString stdenv.isDarwin '' + postPatch = lib.optionalString stdenv.hostPlatform.isDarwin '' # Fix broken install command substituteInPlace Makefile --replace "-pm755" "-pDm755" ''; diff --git a/pkgs/tools/security/mkp224o/default.nix b/pkgs/tools/security/mkp224o/default.nix index 53b0e38a0dca..318284a4318f 100644 --- a/pkgs/tools/security/mkp224o/default.nix +++ b/pkgs/tools/security/mkp224o/default.nix @@ -20,7 +20,7 @@ stdenv.mkDerivation rec { { suffix = "donna"; configureFlags = ["--enable-donna"]; } ] ++ lib.optionals stdenv.hostPlatform.isx86 [ { suffix = "donna-sse2"; configureFlags = ["--enable-donna-sse2"]; } - ] ++ lib.optionals (!stdenv.isDarwin && stdenv.isx86_64) [ + ] ++ lib.optionals (!stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isx86_64) [ { suffix = "amd64-51-30k"; configureFlags = ["--enable-amd64-51-30k"]; } { suffix = "amd64-64-24k"; configureFlags = ["--enable-amd64-64-24k"]; } ]; diff --git a/pkgs/tools/security/monsoon/default.nix b/pkgs/tools/security/monsoon/default.nix index e17081487db2..78bf95ac6c8b 100644 --- a/pkgs/tools/security/monsoon/default.nix +++ b/pkgs/tools/security/monsoon/default.nix @@ -18,7 +18,7 @@ buildGoModule rec { vendorHash = "sha256-gdoOBW5MD94RiKINVtTDvBQRZaJ9tlgu0eh7MxuMezg="; # Tests fails on darwin - doCheck = !stdenv.isDarwin; + doCheck = !stdenv.hostPlatform.isDarwin; meta = with lib; { description = "Fast HTTP enumerator"; diff --git a/pkgs/tools/security/mpw/default.nix b/pkgs/tools/security/mpw/default.nix index 4ee765bdbdd1..5900c72bcff3 100644 --- a/pkgs/tools/security/mpw/default.nix +++ b/pkgs/tools/security/mpw/default.nix @@ -45,7 +45,7 @@ in stdenv.mkDerivation rec { # Some tests are expected to fail on ARM64 # See: https://gitlab.com/spectre.app/cli/-/issues/27#note_962950844 (mpw is a predecessor to spectre-cli and this issue is relevant to mpw as well) - doCheck = !(stdenv.isLinux && stdenv.isAarch64); + doCheck = !(stdenv.hostPlatform.isLinux && stdenv.hostPlatform.isAarch64); checkPhase = '' runHook preCheck diff --git a/pkgs/tools/security/nbtscanner/default.nix b/pkgs/tools/security/nbtscanner/default.nix index b70f554f33fd..ec6d9a1d661b 100644 --- a/pkgs/tools/security/nbtscanner/default.nix +++ b/pkgs/tools/security/nbtscanner/default.nix @@ -22,7 +22,7 @@ rustPlatform.buildRustPackage rec { ./Cargo.lock.patch ]; - buildInputs = lib.optional stdenv.isDarwin Security; + buildInputs = lib.optional stdenv.hostPlatform.isDarwin Security; meta = with lib; { description = "NetBIOS scanner written in Rust"; diff --git a/pkgs/tools/security/netexec/default.nix b/pkgs/tools/security/netexec/default.nix index 33447f98516e..06163309b11b 100644 --- a/pkgs/tools/security/netexec/default.nix +++ b/pkgs/tools/security/netexec/default.nix @@ -101,6 +101,6 @@ python.pkgs.buildPythonApplication rec { # FIXME: failing fixupPhase: # $ Rewriting #!/nix/store/-python3-3.11.7/bin/python3.11 to #!/nix/store/-python3-3.11.7 # $ /nix/store/-wrap-python-hook/nix-support/setup-hook: line 65: 47758 Killed: 9 sed -i "$f" -e "1 s^#!/nix/store/-python3-3.11.7^#!/nix/store/-python3-3.11.7^" - broken = stdenv.isDarwin; + broken = stdenv.hostPlatform.isDarwin; }; } diff --git a/pkgs/tools/security/nitrokey-app2/default.nix b/pkgs/tools/security/nitrokey-app2/default.nix index c675bcc9824f..28d9c74e5dc2 100644 --- a/pkgs/tools/security/nitrokey-app2/default.nix +++ b/pkgs/tools/security/nitrokey-app2/default.nix @@ -26,7 +26,7 @@ python3.pkgs.buildPythonApplication rec { wrapQtAppsHook ]; - buildInputs = [ qtbase ] ++ lib.optionals stdenv.isLinux [ + buildInputs = [ qtbase ] ++ lib.optionals stdenv.hostPlatform.isLinux [ qtwayland ]; diff --git a/pkgs/tools/security/oath-toolkit/default.nix b/pkgs/tools/security/oath-toolkit/default.nix index 1e5b418c3f46..aa4255860469 100644 --- a/pkgs/tools/security/oath-toolkit/default.nix +++ b/pkgs/tools/security/oath-toolkit/default.nix @@ -3,7 +3,7 @@ let # TODO: Switch to OpenPAM once https://gitlab.com/oath-toolkit/oath-toolkit/-/issues/26 is addressed upstream securityDependency = - if stdenv.isDarwin then xmlsec + if stdenv.hostPlatform.isDarwin then xmlsec else pam; in stdenv.mkDerivation rec { @@ -17,7 +17,7 @@ in stdenv.mkDerivation rec { buildInputs = [ securityDependency ]; - configureFlags = lib.optionals stdenv.isDarwin [ "--disable-pam" ]; + configureFlags = lib.optionals stdenv.hostPlatform.isDarwin [ "--disable-pam" ]; passthru.updateScript = nix-update-script { }; diff --git a/pkgs/tools/security/onioncircuits/default.nix b/pkgs/tools/security/onioncircuits/default.nix index 048631e2b774..8693d35dfa99 100644 --- a/pkgs/tools/security/onioncircuits/default.nix +++ b/pkgs/tools/security/onioncircuits/default.nix @@ -48,7 +48,7 @@ python3.pkgs.buildPythonApplication rec { ''; meta = with lib; { - broken = stdenv.isDarwin; + broken = stdenv.hostPlatform.isDarwin; homepage = "https://tails.boum.org"; description = "GTK application to display Tor circuits and streams"; mainProgram = "onioncircuits"; diff --git a/pkgs/tools/security/onlykey/onlykey.nix b/pkgs/tools/security/onlykey/onlykey.nix index b154efb74712..b10d8718b7be 100644 --- a/pkgs/tools/security/onlykey/onlykey.nix +++ b/pkgs/tools/security/onlykey/onlykey.nix @@ -8,7 +8,7 @@ let nodeEnv = import ../../../development/node-packages/node-env.nix { inherit (pkgs) stdenv lib python2 runCommand writeTextFile writeShellScript; inherit pkgs nodejs; - libtool = if pkgs.stdenv.isDarwin then pkgs.cctools or pkgs.darwin.cctools else null; + libtool = if pkgs.stdenv.hostPlatform.isDarwin then pkgs.cctools or pkgs.darwin.cctools else null; }; in import ./node-packages.nix { diff --git a/pkgs/tools/security/opensc/default.nix b/pkgs/tools/security/opensc/default.nix index b767261b4e0a..412053af2b4b 100644 --- a/pkgs/tools/security/opensc/default.nix +++ b/pkgs/tools/security/opensc/default.nix @@ -2,7 +2,7 @@ , libiconv, pcsclite, libassuan, libXt , docbook_xsl, libxslt, docbook_xml_dtd_412 , Carbon, PCSC, buildPackages -, withApplePCSC ? stdenv.isDarwin +, withApplePCSC ? stdenv.hostPlatform.isDarwin }: stdenv.mkDerivation rec { @@ -21,7 +21,7 @@ stdenv.mkDerivation rec { zlib readline openssl libassuan libXt libxslt libiconv docbook_xml_dtd_412 ] - ++ lib.optional stdenv.isDarwin Carbon + ++ lib.optional stdenv.hostPlatform.isDarwin Carbon ++ (if withApplePCSC then [ PCSC ] else [ pcsclite ]); env.NIX_CFLAGS_COMPILE = "-Wno-error"; diff --git a/pkgs/tools/security/pass/default.nix b/pkgs/tools/security/pass/default.nix index 748ec2ccf3bf..fb8ef894bb18 100644 --- a/pkgs/tools/security/pass/default.nix +++ b/pkgs/tools/security/pass/default.nix @@ -3,7 +3,7 @@ , which, openssh, procps, qrencode, makeWrapper, pass , xclip ? null, xdotool ? null, dmenu ? null -, x11Support ? !stdenv.isDarwin , dmenuSupport ? (x11Support || waylandSupport) +, x11Support ? !stdenv.hostPlatform.isDarwin , dmenuSupport ? (x11Support || waylandSupport) , waylandSupport ? false, wl-clipboard ? null , ydotool ? null, dmenu-wayland ? null @@ -66,7 +66,7 @@ stdenv.mkDerivation rec { patches = [ ./set-correct-program-name-for-sleep.patch ./extension-dir.patch - ] ++ lib.optional stdenv.isDarwin ./no-darwin-getopt.patch; + ] ++ lib.optional stdenv.hostPlatform.isDarwin ./no-darwin-getopt.patch; nativeBuildInputs = [ makeWrapper ]; @@ -89,7 +89,7 @@ stdenv.mkDerivation rec { openssh procps qrencode - ] ++ lib.optional stdenv.isDarwin openssl + ] ++ lib.optional stdenv.hostPlatform.isDarwin openssl ++ lib.optional x11Support xclip ++ lib.optional waylandSupport wl-clipboard ++ lib.optionals (waylandSupport && dmenuSupport) [ ydotool dmenu-wayland ] @@ -124,7 +124,7 @@ stdenv.mkDerivation rec { -e 's@^GPGS=.*''$@GPG=${gnupg}/bin/gpg2@' \ -e '/which gpg/ d' \ tests/setup.sh - '' + lib.optionalString stdenv.isDarwin '' + '' + lib.optionalString stdenv.hostPlatform.isDarwin '' # 'pass edit' uses hdid, which is not available from the sandbox. rm -f tests/t0200-edit-tests.sh rm -f tests/t0010-generate-tests.sh diff --git a/pkgs/tools/security/pass/extensions/audit/default.nix b/pkgs/tools/security/pass/extensions/audit/default.nix index d3f196a20563..4aa96fe40909 100644 --- a/pkgs/tools/security/pass/extensions/audit/default.nix +++ b/pkgs/tools/security/pass/extensions/audit/default.nix @@ -44,7 +44,7 @@ python3.pkgs.buildPythonApplication rec { ]; # Tests freeze on darwin with: pass-audit-1.1 (checkPhase): EOFError - doCheck = !stdenv.isDarwin; + doCheck = !stdenv.hostPlatform.isDarwin; nativeCheckInputs = [ python3.pkgs.green pass diff --git a/pkgs/tools/security/pcsc-tools/default.nix b/pkgs/tools/security/pcsc-tools/default.nix index c696fad309a3..39efa566553d 100644 --- a/pkgs/tools/security/pcsc-tools/default.nix +++ b/pkgs/tools/security/pcsc-tools/default.nix @@ -8,7 +8,7 @@ , pkg-config , wrapGAppsHook3 , systemdSupport ? lib.meta.availableOn stdenv.hostPlatform systemd, systemd -, dbusSupport ? stdenv.isLinux, dbus +, dbusSupport ? stdenv.hostPlatform.isLinux, dbus , pcsclite , PCSC , wget @@ -42,7 +42,7 @@ stdenv.mkDerivation (finalAttrs: { dbus ] ++ [ perlPackages.perl pcsclite - ] ++ lib.optional stdenv.isDarwin PCSC + ] ++ lib.optional stdenv.hostPlatform.isDarwin PCSC ++ lib.optional systemdSupport systemd; nativeBuildInputs = [ diff --git a/pkgs/tools/security/pcsclite/default.nix b/pkgs/tools/security/pcsclite/default.nix index eedec6b239fd..955611a465c1 100644 --- a/pkgs/tools/security/pcsclite/default.nix +++ b/pkgs/tools/security/pcsclite/default.nix @@ -12,7 +12,7 @@ , polkit , systemdLibs , udev -, dbusSupport ? stdenv.isLinux +, dbusSupport ? stdenv.hostPlatform.isLinux , systemdSupport ? lib.meta.availableOn stdenv.hostPlatform systemdLibs , udevSupport ? dbusSupport , libusb1 @@ -96,7 +96,7 @@ stdenv.mkDerivation (finalAttrs: { buildInputs = [ python3 ] ++ lib.optionals systemdSupport [ systemdLibs ] ++ lib.optionals (!systemdSupport && udevSupport) [ udev ] - ++ lib.optionals stdenv.isDarwin [ Foundation IOKit ] + ++ lib.optionals stdenv.hostPlatform.isDarwin [ Foundation IOKit ] ++ lib.optionals dbusSupport [ dbus ] ++ lib.optionals polkitSupport [ polkit ] ++ lib.optionals (!udevSupport) [ libusb1 ]; diff --git a/pkgs/tools/security/quill/default.nix b/pkgs/tools/security/quill/default.nix index 71ffc7af5c15..3aa2e6525b62 100644 --- a/pkgs/tools/security/quill/default.nix +++ b/pkgs/tools/security/quill/default.nix @@ -41,7 +41,7 @@ rustPlatform.buildRustPackage rec { nativeBuildInputs = [ pkg-config protobuf ]; buildInputs = [ openssl ] - ++ lib.optionals stdenv.isDarwin [ Security libiconv ]; + ++ lib.optionals stdenv.hostPlatform.isDarwin [ Security libiconv ]; meta = with lib; { homepage = "https://github.com/dfinity/quill"; diff --git a/pkgs/tools/security/rblake2sum/default.nix b/pkgs/tools/security/rblake2sum/default.nix index 9052ffb68a96..92b4f574749a 100644 --- a/pkgs/tools/security/rblake2sum/default.nix +++ b/pkgs/tools/security/rblake2sum/default.nix @@ -17,7 +17,7 @@ rustPlatform.buildRustPackage { cargoHash = "sha256-egwL3z7uB4AcRwPT0uPrenyh4FSxhbZKMdkPhRztMbs="; - buildInputs = lib.optionals stdenv.isDarwin [ Security ]; + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ Security ]; meta = with lib; { description = "Recursive blake2 digest (hash) of a file-system path"; diff --git a/pkgs/tools/security/rblake3sum/default.nix b/pkgs/tools/security/rblake3sum/default.nix index 62f290cdf320..af04b2014403 100644 --- a/pkgs/tools/security/rblake3sum/default.nix +++ b/pkgs/tools/security/rblake3sum/default.nix @@ -17,7 +17,7 @@ rustPlatform.buildRustPackage { cargoHash = "sha256-SE/Zg/UEV/vhB/VDcn8Y70OUIoxbJBh6H2QgFMkWPc4="; - buildInputs = lib.optionals stdenv.isDarwin [ Security ]; + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ Security ]; meta = with lib; { description = "Recursive blake3 digest (hash) of a file-system path"; diff --git a/pkgs/tools/security/rbw/default.nix b/pkgs/tools/security/rbw/default.nix index c04ed415fb9e..597b4c0adad1 100644 --- a/pkgs/tools/security/rbw/default.nix +++ b/pkgs/tools/security/rbw/default.nix @@ -36,15 +36,15 @@ rustPlatform.buildRustPackage rec { nativeBuildInputs = [ installShellFiles - ] ++ lib.optionals stdenv.isLinux [ pkg-config ]; + ] ++ lib.optionals stdenv.hostPlatform.isLinux [ pkg-config ]; buildInputs = [ bash ] # for git-credential-rbw - ++ lib.optionals stdenv.isDarwin [ + ++ lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk_11_0.frameworks.Security darwin.apple_sdk_11_0.frameworks.AppKit ]; - preConfigure = lib.optionalString stdenv.isLinux '' + preConfigure = lib.optionalString stdenv.hostPlatform.isLinux '' export OPENSSL_INCLUDE_DIR="${openssl.dev}/include" export OPENSSL_LIB_DIR="${lib.getLib openssl}/lib" ''; diff --git a/pkgs/tools/security/ripasso/cursive.nix b/pkgs/tools/security/ripasso/cursive.nix index b7cc5d969d08..fe216b91ff91 100644 --- a/pkgs/tools/security/ripasso/cursive.nix +++ b/pkgs/tools/security/ripasso/cursive.nix @@ -49,7 +49,7 @@ rustPlatform.buildRustPackage rec { gpgme xorg.libxcb nettle - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ AppKit Security ]; diff --git a/pkgs/tools/security/rucredstash/default.nix b/pkgs/tools/security/rucredstash/default.nix index 972695ad565e..43166eb0bf8e 100644 --- a/pkgs/tools/security/rucredstash/default.nix +++ b/pkgs/tools/security/rucredstash/default.nix @@ -13,7 +13,7 @@ rustPlatform.buildRustPackage rec { cargoHash = "sha256-TYobVjjzrK3gprZcYyY98EvdASkq4urB+WiLlbJbwmk="; - buildInputs = lib.optional stdenv.isDarwin Security; + buildInputs = lib.optional stdenv.hostPlatform.isDarwin Security; # Disable tests since it requires network access and relies on the # presence of certain AWS infrastructure diff --git a/pkgs/tools/security/rustscan/default.nix b/pkgs/tools/security/rustscan/default.nix index fc3ab5b2e013..6af9b974ac09 100644 --- a/pkgs/tools/security/rustscan/default.nix +++ b/pkgs/tools/security/rustscan/default.nix @@ -28,7 +28,7 @@ rustPlatform.buildRustPackage rec { patchShebangs fixtures/.rustscan_scripts/* ''; - buildInputs = lib.optional stdenv.isDarwin Security; + buildInputs = lib.optional stdenv.hostPlatform.isDarwin Security; nativeCheckInputs = [ perl diff --git a/pkgs/tools/security/saml2aws/default.nix b/pkgs/tools/security/saml2aws/default.nix index 14e408275e34..1afba85be34e 100644 --- a/pkgs/tools/security/saml2aws/default.nix +++ b/pkgs/tools/security/saml2aws/default.nix @@ -21,7 +21,7 @@ buildGoModule rec { vendorHash = "sha256-gtl8T8wXnpLgDZc6qSgFKpA+XbcLNHf20ieBkyNdE+s="; nativeBuildInputs = [ installShellFiles ]; - buildInputs = lib.optionals stdenv.isDarwin [ AppKit ]; + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ AppKit ]; subPackages = [ "." diff --git a/pkgs/tools/security/schleuder/default.nix b/pkgs/tools/security/schleuder/default.nix index cce88366a372..8429cb0ea0d0 100644 --- a/pkgs/tools/security/schleuder/default.nix +++ b/pkgs/tools/security/schleuder/default.nix @@ -24,7 +24,7 @@ bundlerApp { }; meta = with lib; { - broken = stdenv.isDarwin; + broken = stdenv.hostPlatform.isDarwin; description = "Schleuder is an encrypting mailing list manager with remailing-capabilities"; longDescription = '' Schleuder is a group's email-gateway: subscribers can exchange diff --git a/pkgs/tools/security/scrypt/default.nix b/pkgs/tools/security/scrypt/default.nix index d1deaa0ec41d..d199ee37725e 100644 --- a/pkgs/tools/security/scrypt/default.nix +++ b/pkgs/tools/security/scrypt/default.nix @@ -33,7 +33,7 @@ stdenv.mkDerivation rec { doCheck = true; checkTarget = "test"; - nativeCheckInputs = lib.optionals stdenv.isLinux [ util-linux ]; + nativeCheckInputs = lib.optionals stdenv.hostPlatform.isLinux [ util-linux ]; meta = with lib; { description = "Encryption utility"; diff --git a/pkgs/tools/security/sequoia-chameleon-gnupg/default.nix b/pkgs/tools/security/sequoia-chameleon-gnupg/default.nix index 96d15250e163..81091848a93c 100644 --- a/pkgs/tools/security/sequoia-chameleon-gnupg/default.nix +++ b/pkgs/tools/security/sequoia-chameleon-gnupg/default.nix @@ -31,7 +31,7 @@ rustPlatform.buildRustPackage rec { nettle openssl sqlite - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.Security darwin.apple_sdk.frameworks.SystemConfiguration ]; diff --git a/pkgs/tools/security/sheesy-cli/default.nix b/pkgs/tools/security/sheesy-cli/default.nix index 9df5da79e8a6..a2dda4493852 100644 --- a/pkgs/tools/security/sheesy-cli/default.nix +++ b/pkgs/tools/security/sheesy-cli/default.nix @@ -16,7 +16,7 @@ rustPlatform.buildRustPackage rec { nativeBuildInputs = [ libgpg-error gpgme gettext installShellFiles ]; - buildInputs = [ openssl ] ++ lib.optionals stdenv.isDarwin [ Security ]; + buildInputs = [ openssl ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ Security ]; buildFeatures = [ "vault" "extract" "completions" "substitute" "process" ]; diff --git a/pkgs/tools/security/snowcrash/default.nix b/pkgs/tools/security/snowcrash/default.nix index 69d310afb9f9..b787b0da59b7 100644 --- a/pkgs/tools/security/snowcrash/default.nix +++ b/pkgs/tools/security/snowcrash/default.nix @@ -19,7 +19,7 @@ buildGoModule rec { subPackages = [ "." ]; - postFixup = lib.optionals (!stdenv.isDarwin) '' + postFixup = lib.optionals (!stdenv.hostPlatform.isDarwin) '' mv $out/bin/SNOWCRASH $out/bin/${pname} ''; diff --git a/pkgs/tools/security/softhsm/default.nix b/pkgs/tools/security/softhsm/default.nix index e4c428b90b9a..d755e131d8f0 100644 --- a/pkgs/tools/security/softhsm/default.nix +++ b/pkgs/tools/security/softhsm/default.nix @@ -19,7 +19,7 @@ stdenv.mkDerivation rec { ]; propagatedBuildInputs = - lib.optionals stdenv.isDarwin [ libobjc Security ]; + lib.optionals stdenv.hostPlatform.isDarwin [ libobjc Security ]; buildInputs = [ botan2 sqlite ]; diff --git a/pkgs/tools/security/solo2-cli/default.nix b/pkgs/tools/security/solo2-cli/default.nix index a241e8780101..387bf00e37bf 100644 --- a/pkgs/tools/security/solo2-cli/default.nix +++ b/pkgs/tools/security/solo2-cli/default.nix @@ -28,8 +28,8 @@ rustPlatform.buildRustPackage rec { nativeBuildInputs = [ installShellFiles pkg-config ]; buildInputs = [ ] - ++ lib.optionals stdenv.isLinux [ pcsclite udev ] - ++ lib.optionals stdenv.isDarwin [ PCSC IOKit CoreFoundation AppKit ]; + ++ lib.optionals stdenv.hostPlatform.isLinux [ pcsclite udev ] + ++ lib.optionals stdenv.hostPlatform.isDarwin [ PCSC IOKit CoreFoundation AppKit ]; postInstall = '' install -D 70-solo2.rules $out/lib/udev/rules.d/70-solo2.rules diff --git a/pkgs/tools/security/spectre-cli/default.nix b/pkgs/tools/security/spectre-cli/default.nix index 923046cdad4a..ba63b823e739 100644 --- a/pkgs/tools/security/spectre-cli/default.nix +++ b/pkgs/tools/security/spectre-cli/default.nix @@ -46,7 +46,7 @@ stdenv.mkDerivation rec { # Some tests are expected to fail on ARM64 # See: https://gitlab.com/spectre.app/cli/-/issues/27#note_962950844 - doCheck = !(stdenv.isLinux && stdenv.isAarch64); + doCheck = !(stdenv.hostPlatform.isLinux && stdenv.hostPlatform.isAarch64); checkPhase = '' mv ../spectre-cli-tests ../spectre_tests.xml ./ diff --git a/pkgs/tools/security/ssdeep/default.nix b/pkgs/tools/security/ssdeep/default.nix index 68b8afdf6712..b3ec01ebdbbf 100644 --- a/pkgs/tools/security/ssdeep/default.nix +++ b/pkgs/tools/security/ssdeep/default.nix @@ -14,7 +14,7 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ autoreconfHook ]; # remove forbidden references to $TMPDIR - preFixup = lib.optionalString stdenv.isLinux '' + preFixup = lib.optionalString stdenv.hostPlatform.isLinux '' patchelf --shrink-rpath --allowed-rpath-prefixes "$NIX_STORE" "$out"/bin/* ''; diff --git a/pkgs/tools/security/ssh-mitm/default.nix b/pkgs/tools/security/ssh-mitm/default.nix index 6694a9edaae2..4c59595ec936 100644 --- a/pkgs/tools/security/ssh-mitm/default.nix +++ b/pkgs/tools/security/ssh-mitm/default.nix @@ -63,7 +63,7 @@ buildPythonApplication rec { setuptools sshpubkeys wrapt - ] ++ lib.optionals stdenv.isDarwin [ setuptools ]; + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ setuptools ]; # fix for darwin users nativeBuildInputs = [ installShellFiles ]; diff --git a/pkgs/tools/security/sshuttle/default.nix b/pkgs/tools/security/sshuttle/default.nix index 2090c4d396bd..e52453e8006d 100644 --- a/pkgs/tools/security/sshuttle/default.nix +++ b/pkgs/tools/security/sshuttle/default.nix @@ -42,7 +42,7 @@ python3Packages.buildPythonApplication rec { installManPage docs/_build/man/* wrapProgram $out/bin/sshuttle \ - --prefix PATH : "${lib.makeBinPath ([ coreutils openssh procps ] ++ lib.optionals stdenv.isLinux [ iptables nettools ])}" \ + --prefix PATH : "${lib.makeBinPath ([ coreutils openssh procps ] ++ lib.optionals stdenv.hostPlatform.isLinux [ iptables nettools ])}" \ ''; meta = with lib; { diff --git a/pkgs/tools/security/step-ca/default.nix b/pkgs/tools/security/step-ca/default.nix index 549cfa6a5224..f37c05f93fbb 100644 --- a/pkgs/tools/security/step-ca/default.nix +++ b/pkgs/tools/security/step-ca/default.nix @@ -32,8 +32,8 @@ buildGoModule rec { nativeBuildInputs = lib.optionals hsmSupport [ pkg-config ]; buildInputs = - lib.optionals (hsmSupport && stdenv.isLinux) [ pcsclite ] - ++ lib.optionals (hsmSupport && stdenv.isDarwin) [ PCSC ]; + lib.optionals (hsmSupport && stdenv.hostPlatform.isLinux) [ pcsclite ] + ++ lib.optionals (hsmSupport && stdenv.hostPlatform.isDarwin) [ PCSC ]; postPatch = '' substituteInPlace systemd/step-ca.service --replace "/bin/kill" "${coreutils}/bin/kill" diff --git a/pkgs/tools/security/step-kms-plugin/default.nix b/pkgs/tools/security/step-kms-plugin/default.nix index 3eaf3a9c9cb4..ba35b7c11087 100644 --- a/pkgs/tools/security/step-kms-plugin/default.nix +++ b/pkgs/tools/security/step-kms-plugin/default.nix @@ -48,6 +48,6 @@ buildGoModule rec { maintainers = with maintainers; [ qbit ]; mainProgram = "step-kms-plugin"; # can't find pcsclite header files - broken = stdenv.isDarwin; + broken = stdenv.hostPlatform.isDarwin; }; } diff --git a/pkgs/tools/security/swtpm/default.nix b/pkgs/tools/security/swtpm/default.nix index b39c43a8e1b6..6b1bdb4c03ab 100644 --- a/pkgs/tools/security/swtpm/default.nix +++ b/pkgs/tools/security/swtpm/default.nix @@ -41,14 +41,14 @@ stdenv.mkDerivation (finalAttrs: { openssl libtasn1 glib json-glib gnutls - ] ++ lib.optionals stdenv.isLinux [ + ] ++ lib.optionals stdenv.hostPlatform.isLinux [ fuse libseccomp ]; configureFlags = [ "--localstatedir=/var" - ] ++ lib.optionals stdenv.isLinux [ + ] ++ lib.optionals stdenv.hostPlatform.isLinux [ "--with-cuse" ]; diff --git a/pkgs/tools/security/tcpcrypt/default.nix b/pkgs/tools/security/tcpcrypt/default.nix index 8b00431b6cbe..1d34fdd4e710 100644 --- a/pkgs/tools/security/tcpcrypt/default.nix +++ b/pkgs/tools/security/tcpcrypt/default.nix @@ -19,12 +19,12 @@ stdenv.mkDerivation rec { outputs = [ "bin" "dev" "out" ]; nativeBuildInputs = [ autoreconfHook ]; buildInputs = [ openssl libpcap ] - ++ lib.optionals stdenv.isLinux [ libcap libnfnetlink libnetfilter_conntrack libnetfilter_queue ]; + ++ lib.optionals stdenv.hostPlatform.isLinux [ libcap libnfnetlink libnetfilter_conntrack libnetfilter_queue ]; enableParallelBuilding = true; meta = with lib; { - broken = stdenv.isDarwin; + broken = stdenv.hostPlatform.isDarwin; homepage = "http://tcpcrypt.org/"; description = "Fast TCP encryption"; platforms = platforms.all; diff --git a/pkgs/tools/security/thc-hydra/default.nix b/pkgs/tools/security/thc-hydra/default.nix index aa0e9fd8fb43..412691d2b940 100644 --- a/pkgs/tools/security/thc-hydra/default.nix +++ b/pkgs/tools/security/thc-hydra/default.nix @@ -23,7 +23,7 @@ stdenv.mkDerivation rec { --replace-fail "-lcurses" "-lncurses" ''; - env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.isDarwin "-Wno-undef-prefix"; + env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.hostPlatform.isDarwin "-Wno-undef-prefix"; nativeBuildInputs = lib.optionals withGUI [ pkg-config makeWrapper ]; diff --git a/pkgs/tools/security/tor/default.nix b/pkgs/tools/security/tor/default.nix index 30eb8360fe39..164526a8e133 100644 --- a/pkgs/tools/security/tor/default.nix +++ b/pkgs/tools/security/tor/default.nix @@ -41,7 +41,7 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ pkg-config ]; buildInputs = [ libevent openssl zlib xz zstd scrypt ] ++ - lib.optionals stdenv.isLinux [ libseccomp systemd libcap ]; + lib.optionals stdenv.hostPlatform.isLinux [ libseccomp systemd libcap ]; patches = [ ./disable-monotonic-timer-tests.patch ]; @@ -55,7 +55,7 @@ stdenv.mkDerivation rec { lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) [ "--disable-tool-name-check" ] ++ # sandbox is broken on aarch64-linux https://gitlab.torproject.org/tpo/core/tor/-/issues/40599 - lib.optionals (stdenv.isLinux && stdenv.isAarch64) [ "--disable-seccomp" ] + lib.optionals (stdenv.hostPlatform.isLinux && stdenv.hostPlatform.isAarch64) [ "--disable-seccomp" ] ; NIX_CFLAGS_LINK = lib.optionalString stdenv.cc.isGNU "-lgcc_s"; @@ -72,7 +72,7 @@ stdenv.mkDerivation rec { # disable tests on linux aarch32 # https://gitlab.torproject.org/tpo/core/tor/-/issues/40912 - doCheck = !(stdenv.isLinux && stdenv.isAarch32); + doCheck = !(stdenv.hostPlatform.isLinux && stdenv.hostPlatform.isAarch32); postInstall = '' mkdir -p $geoip/share/tor diff --git a/pkgs/tools/security/tor/torsocks.nix b/pkgs/tools/security/tor/torsocks.nix index 0ad36688bd6b..8b09bfc3bf9b 100644 --- a/pkgs/tools/security/tor/torsocks.nix +++ b/pkgs/tools/security/tor/torsocks.nix @@ -40,7 +40,7 @@ stdenv.mkDerivation rec { sed -i \ -e 's,\(local app_path\)=`which $1`,\1=`type -P $1`,' \ src/bin/torsocks.in - '' + lib.optionalString stdenv.isLinux '' + '' + lib.optionalString stdenv.hostPlatform.isLinux '' sed -i \ -e 's,\(local getcap\)=.*,\1=${libcap}/bin/getcap,' \ src/bin/torsocks.in diff --git a/pkgs/tools/security/vault/default.nix b/pkgs/tools/security/vault/default.nix index 32ad1196edca..007edb9c6abe 100644 --- a/pkgs/tools/security/vault/default.nix +++ b/pkgs/tools/security/vault/default.nix @@ -35,7 +35,7 @@ buildGoModule rec { postInstall = '' echo "complete -C $out/bin/vault vault" > vault.bash installShellCompletion vault.bash - '' + lib.optionalString stdenv.isLinux '' + '' + lib.optionalString stdenv.hostPlatform.isLinux '' wrapProgram $out/bin/vault \ --prefix PATH ${lib.makeBinPath [ gawk glibc ]} ''; diff --git a/pkgs/tools/security/vault/vault-bin.nix b/pkgs/tools/security/vault/vault-bin.nix index 7a829e1ad271..9cfdc187eaee 100644 --- a/pkgs/tools/security/vault/vault-bin.nix +++ b/pkgs/tools/security/vault/vault-bin.nix @@ -31,7 +31,7 @@ stdenv.mkDerivation rec { dontConfigure = true; dontBuild = true; - dontStrip = stdenv.isDarwin; + dontStrip = stdenv.hostPlatform.isDarwin; installPhase = '' runHook preInstall diff --git a/pkgs/tools/security/vaultwarden/default.nix b/pkgs/tools/security/vaultwarden/default.nix index 137f9e6c9564..f28bc52fdbc7 100644 --- a/pkgs/tools/security/vaultwarden/default.nix +++ b/pkgs/tools/security/vaultwarden/default.nix @@ -25,7 +25,7 @@ rustPlatform.buildRustPackage rec { nativeBuildInputs = [ pkg-config ]; buildInputs = [ openssl ] - ++ lib.optionals stdenv.isDarwin [ libiconv Security CoreServices SystemConfiguration ] + ++ lib.optionals stdenv.hostPlatform.isDarwin [ libiconv Security CoreServices SystemConfiguration ] ++ lib.optional (dbBackend == "mysql") libmysqlclient ++ lib.optional (dbBackend == "postgresql") postgresql; diff --git a/pkgs/tools/security/yubihsm-shell/default.nix b/pkgs/tools/security/yubihsm-shell/default.nix index 8567798ea82c..90af2f22068a 100644 --- a/pkgs/tools/security/yubihsm-shell/default.nix +++ b/pkgs/tools/security/yubihsm-shell/default.nix @@ -47,18 +47,18 @@ stdenv.mkDerivation rec { libedit curl openssl - ] ++ lib.optionals stdenv.isLinux [ + ] ++ lib.optionals stdenv.hostPlatform.isLinux [ pcsclite.dev - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.PCSC libiconv ]; - preBuild = lib.optionalString stdenv.isLinux '' + preBuild = lib.optionalString stdenv.hostPlatform.isLinux '' NIX_CFLAGS_COMPILE="$(pkg-config --cflags libpcsclite) $NIX_CFLAGS_COMPILE" ''; - cmakeFlags = lib.optionals stdenv.isDarwin [ + cmakeFlags = lib.optionals stdenv.hostPlatform.isDarwin [ "-DDISABLE_LTO=ON" ]; diff --git a/pkgs/tools/security/yubikey-agent/default.nix b/pkgs/tools/security/yubikey-agent/default.nix index f43e83e575e7..f2e290ade6db 100644 --- a/pkgs/tools/security/yubikey-agent/default.nix +++ b/pkgs/tools/security/yubikey-agent/default.nix @@ -12,12 +12,12 @@ buildGoModule rec { }; buildInputs = - lib.optional stdenv.isLinux (lib.getDev pcsclite) - ++ lib.optional stdenv.isDarwin (darwin.apple_sdk.frameworks.PCSC); + lib.optional stdenv.hostPlatform.isLinux (lib.getDev pcsclite) + ++ lib.optional stdenv.hostPlatform.isDarwin (darwin.apple_sdk.frameworks.PCSC); - nativeBuildInputs = lib.optionals stdenv.isLinux [ pkg-config ]; + nativeBuildInputs = lib.optionals stdenv.hostPlatform.isLinux [ pkg-config ]; - postPatch = lib.optionalString stdenv.isLinux '' + postPatch = lib.optionalString stdenv.hostPlatform.isLinux '' substituteInPlace main.go --replace 'notify-send' ${libnotify}/bin/notify-send ''; @@ -29,7 +29,7 @@ buildGoModule rec { ldflags = [ "-s" "-w" "-X main.Version=${version}" ]; - postInstall = lib.optionalString stdenv.isLinux '' + postInstall = lib.optionalString stdenv.hostPlatform.isLinux '' mkdir -p $out/lib/systemd/user substitute contrib/systemd/user/yubikey-agent.service $out/lib/systemd/user/yubikey-agent.service \ --replace 'ExecStart=yubikey-agent' "ExecStart=$out/bin/yubikey-agent" diff --git a/pkgs/tools/security/zmap/default.nix b/pkgs/tools/security/zmap/default.nix index 1749c9ef6d7f..b7a9986434eb 100644 --- a/pkgs/tools/security/zmap/default.nix +++ b/pkgs/tools/security/zmap/default.nix @@ -26,6 +26,6 @@ stdenv.mkDerivation rec { description = "Fast single packet network scanner designed for Internet-wide network surveys"; maintainers = with maintainers; [ ma27 ]; platforms = platforms.unix; - broken = stdenv.isDarwin; + broken = stdenv.hostPlatform.isDarwin; }; } diff --git a/pkgs/tools/system/bfs/default.nix b/pkgs/tools/system/bfs/default.nix index 464c5f67ed57..e950cd957ea1 100644 --- a/pkgs/tools/system/bfs/default.nix +++ b/pkgs/tools/system/bfs/default.nix @@ -11,7 +11,7 @@ stdenv.mkDerivation rec { hash = "sha256-WIJyCpnlD6/c7PG+ZPmUT8qfPelRY9Od1Dk9Ro1y1yY="; }; - buildInputs = [ oniguruma ] ++ lib.optionals stdenv.isLinux [ libcap acl liburing ]; + buildInputs = [ oniguruma ] ++ lib.optionals stdenv.hostPlatform.isLinux [ libcap acl liburing ]; configureFlags = [ "--enable-release" ]; makeFlags = [ "PREFIX=$(out)" ]; diff --git a/pkgs/tools/system/btop/default.nix b/pkgs/tools/system/btop/default.nix index 66745ccf86a8..0f67b4111aa6 100644 --- a/pkgs/tools/system/btop/default.nix +++ b/pkgs/tools/system/btop/default.nix @@ -30,7 +30,7 @@ stdenv.mkDerivation rec { autoAddDriverRunpath ]; - buildInputs = lib.optionals stdenv.isDarwin [ + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk_11_0.frameworks.CoreFoundation darwin.apple_sdk_11_0.frameworks.IOKit ]; diff --git a/pkgs/tools/system/clinfo/default.nix b/pkgs/tools/system/clinfo/default.nix index 50e72498bf64..465bba682b0e 100644 --- a/pkgs/tools/system/clinfo/default.nix +++ b/pkgs/tools/system/clinfo/default.nix @@ -11,10 +11,10 @@ stdenv.mkDerivation rec { sha256 = "sha256-1jZP4SnLIHh3vQJLBp+j/eQ1c8XBGFR2hjYxflhpWAU="; }; - buildInputs = lib.optionals (!stdenv.isDarwin) [ + buildInputs = lib.optionals (!stdenv.hostPlatform.isDarwin) [ ocl-icd opencl-headers - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ OpenCL ]; diff --git a/pkgs/tools/system/collectd/default.nix b/pkgs/tools/system/collectd/default.nix index bbcc9f704bc4..b75cdb19de16 100644 --- a/pkgs/tools/system/collectd/default.nix +++ b/pkgs/tools/system/collectd/default.nix @@ -34,7 +34,7 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ pkg-config autoreconfHook ]; buildInputs = [ libtool - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.ApplicationServices ] ++ plugins.buildInputs; diff --git a/pkgs/tools/system/collectd/plugins.nix b/pkgs/tools/system/collectd/plugins.nix index 9ca18b06203d..7202ec795e8b 100644 --- a/pkgs/tools/system/collectd/plugins.nix +++ b/pkgs/tools/system/collectd/plugins.nix @@ -51,10 +51,10 @@ let plugins = { amqp.buildInputs = [ yajl - ] ++ lib.optionals stdenv.isLinux [ rabbitmq-c ]; + ] ++ lib.optionals stdenv.hostPlatform.isLinux [ rabbitmq-c ]; apache.buildInputs = [ curl ]; ascent.buildInputs = [ curl libxml2 ]; - battery.buildInputs = lib.optionals stdenv.isDarwin [ + battery.buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ IOKit ]; bind.buildInputs = [ curl libxml2 ]; @@ -63,30 +63,30 @@ let curl_json.buildInputs = [ curl yajl ]; curl_xml.buildInputs = [ curl libxml2 ]; dbi.buildInputs = [ libdbi ]; - disk.buildInputs = lib.optionals stdenv.isLinux [ + disk.buildInputs = lib.optionals stdenv.hostPlatform.isLinux [ udev - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ IOKit ]; dns.buildInputs = [ libpcap ]; ipmi.buildInputs = [ openipmi ]; iptables.buildInputs = [ libpcap - ] ++ lib.optionals stdenv.isLinux [ + ] ++ lib.optionals stdenv.hostPlatform.isLinux [ iptables libmnl ]; java.buildInputs = [ jdk libgcrypt libxml2 ]; log_logstash.buildInputs = [ yajl ]; lua.buildInputs = [ lua ]; memcachec.buildInputs = [ libmemcached cyrus_sasl ]; - modbus.buildInputs = lib.optionals stdenv.isLinux [ libmodbus ]; + modbus.buildInputs = lib.optionals stdenv.hostPlatform.isLinux [ libmodbus ]; mqtt.buildInputs = [ mosquitto ]; mysql.buildInputs = lib.optionals (libmysqlclient != null) [ libmysqlclient ]; netlink.buildInputs = [ libpcap - ] ++ lib.optionals stdenv.isLinux [ + ] ++ lib.optionals stdenv.hostPlatform.isLinux [ libmnl ]; network.buildInputs = [ libgcrypt ]; @@ -104,15 +104,15 @@ let redis.buildInputs = [ hiredis ]; rrdcached.buildInputs = [ rrdtool libxml2 ]; rrdtool.buildInputs = [ rrdtool libxml2 ]; - sensors.buildInputs = lib.optionals stdenv.isLinux [ lm_sensors ]; - sigrok.buildInputs = lib.optionals stdenv.isLinux [ libsigrok udev ]; - smart.buildInputs = lib.optionals stdenv.isLinux [ libatasmart udev ]; - snmp.buildInputs = lib.optionals stdenv.isLinux [ net-snmp ]; - snmp_agent.buildInputs = lib.optionals stdenv.isLinux [ net-snmp ]; + sensors.buildInputs = lib.optionals stdenv.hostPlatform.isLinux [ lm_sensors ]; + sigrok.buildInputs = lib.optionals stdenv.hostPlatform.isLinux [ libsigrok udev ]; + smart.buildInputs = lib.optionals stdenv.hostPlatform.isLinux [ libatasmart udev ]; + snmp.buildInputs = lib.optionals stdenv.hostPlatform.isLinux [ net-snmp ]; + snmp_agent.buildInputs = lib.optionals stdenv.hostPlatform.isLinux [ net-snmp ]; varnish.buildInputs = [ curl varnish ]; virt.buildInputs = [ libvirt libxml2 yajl - ] ++ lib.optionals stdenv.isLinux [ lvm2 udev ]; + ] ++ lib.optionals stdenv.hostPlatform.isLinux [ lvm2 udev ]; write_http.buildInputs = [ curl yajl ]; write_kafka.buildInputs = [ yajl rdkafka ]; write_log.buildInputs = [ yajl ]; diff --git a/pkgs/tools/system/fakeroot/default.nix b/pkgs/tools/system/fakeroot/default.nix index c386536e1f17..518d54898d9b 100644 --- a/pkgs/tools/system/fakeroot/default.nix +++ b/pkgs/tools/system/fakeroot/default.nix @@ -24,7 +24,7 @@ stdenv.mkDerivation (finalAttrs: { hash = "sha256-j1qSMPNCtAxClqYqWkRNQmtxkitYi7g/9KtQ5XqcX3w="; }; - patches = lib.optionals stdenv.isLinux [ + patches = lib.optionals stdenv.hostPlatform.isLinux [ ./einval.patch # patches needed for musl libc, borrowed from alpine packaging. @@ -48,7 +48,7 @@ stdenv.mkDerivation (finalAttrs: { ]; nativeBuildInputs = [ autoreconfHook po4a ]; - buildInputs = lib.optional (!stdenv.isDarwin) libcap; + buildInputs = lib.optional (!stdenv.hostPlatform.isDarwin) libcap; postUnpack = '' sed -i \ diff --git a/pkgs/tools/system/fio/default.nix b/pkgs/tools/system/fio/default.nix index d73d8dda7a77..11c1c1d945de 100644 --- a/pkgs/tools/system/fio/default.nix +++ b/pkgs/tools/system/fio/default.nix @@ -14,7 +14,7 @@ stdenv.mkDerivation rec { }; buildInputs = [ python3 zlib ] - ++ lib.optional (!stdenv.isDarwin) libaio; + ++ lib.optional (!stdenv.hostPlatform.isDarwin) libaio; # ./configure does not support autoconf-style --build=/--host=. # We use $CC instead. diff --git a/pkgs/tools/system/foremost/default.nix b/pkgs/tools/system/foremost/default.nix index a1a09826c537..bdf846e029d3 100644 --- a/pkgs/tools/system/foremost/default.nix +++ b/pkgs/tools/system/foremost/default.nix @@ -16,7 +16,7 @@ stdenv.mkDerivation rec { # ld: api.o:(.bss+0xbdba0): multiple definition of `wildcard'; main.o:(.bss+0xbd760): first defined here env.NIX_CFLAGS_COMPILE = "-fcommon"; - makeFlags = [ "PREFIX=$(out)" ] ++ lib.optionals stdenv.isDarwin [ "mac" ]; + makeFlags = [ "PREFIX=$(out)" ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ "mac" ]; enableParallelBuilding = true; diff --git a/pkgs/tools/system/gdu/default.nix b/pkgs/tools/system/gdu/default.nix index dfb1179a0897..4ba04921484f 100644 --- a/pkgs/tools/system/gdu/default.nix +++ b/pkgs/tools/system/gdu/default.nix @@ -38,7 +38,7 @@ buildGoModule rec { installManPage gdu.1 ''; - doCheck = !stdenv.isDarwin; + doCheck = !stdenv.hostPlatform.isDarwin; checkFlags = [ # https://github.com/dundee/gdu/issues/371 diff --git a/pkgs/tools/system/gotop/default.nix b/pkgs/tools/system/gotop/default.nix index 5305b127a1c5..b2279e0f13d2 100644 --- a/pkgs/tools/system/gotop/default.nix +++ b/pkgs/tools/system/gotop/default.nix @@ -32,7 +32,7 @@ buildGoModule rec { nativeBuildInputs = [ installShellFiles ]; - buildInputs = lib.optionals stdenv.isDarwin [ IOKit ]; + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ IOKit ]; preCheck = '' export HOME=$(mktemp -d) diff --git a/pkgs/tools/system/gptfdisk/default.nix b/pkgs/tools/system/gptfdisk/default.nix index 2718be70c71f..798d1b223e5c 100644 --- a/pkgs/tools/system/gptfdisk/default.nix +++ b/pkgs/tools/system/gptfdisk/default.nix @@ -13,7 +13,7 @@ stdenv.mkDerivation rec { postPatch = '' patchShebangs gdisk_test.sh - '' + lib.optionalString stdenv.isDarwin '' + '' + lib.optionalString stdenv.hostPlatform.isDarwin '' substituteInPlace Makefile.mac --replace \ "-mmacosx-version-min=10.4" "-mmacosx-version-min=10.6" substituteInPlace Makefile.mac --replace \ @@ -28,7 +28,7 @@ stdenv.mkDerivation rec { "/usr/local/Cellar/ncurses/6.2/lib/libncurses.dylib" "${ncurses.out}/lib/libncurses.dylib" ''; - buildPhase = lib.optionalString stdenv.isDarwin "make -f Makefile.mac"; + buildPhase = lib.optionalString stdenv.hostPlatform.isDarwin "make -f Makefile.mac"; buildInputs = [ libuuid popt icu ncurses ]; installPhase = '' diff --git a/pkgs/tools/system/gptman/default.nix b/pkgs/tools/system/gptman/default.nix index cd9fd4361563..484ab05a85f2 100644 --- a/pkgs/tools/system/gptman/default.nix +++ b/pkgs/tools/system/gptman/default.nix @@ -13,7 +13,7 @@ rustPlatform.buildRustPackage rec { cargoHash = "sha256-P+qez0oVsHBiaBYban2o8MRvF8ElLf5zb+p+tYunWWA="; - buildInputs = lib.optional stdenv.isDarwin libiconv; + buildInputs = lib.optional stdenv.hostPlatform.isDarwin libiconv; buildFeatures = [ "cli" ]; diff --git a/pkgs/tools/system/htop/default.nix b/pkgs/tools/system/htop/default.nix index 55e9b5e9365c..c0a689c4c621 100644 --- a/pkgs/tools/system/htop/default.nix +++ b/pkgs/tools/system/htop/default.nix @@ -3,11 +3,11 @@ , IOKit , libcap , libnl -, sensorsSupport ? stdenv.isLinux, lm_sensors +, sensorsSupport ? stdenv.hostPlatform.isLinux, lm_sensors , systemdSupport ? lib.meta.availableOn stdenv.hostPlatform systemd, systemd }: -assert systemdSupport -> stdenv.isLinux; +assert systemdSupport -> stdenv.hostPlatform.isLinux; stdenv.mkDerivation rec { pname = "htop"; @@ -21,18 +21,18 @@ stdenv.mkDerivation rec { }; nativeBuildInputs = [ autoreconfHook ] - ++ lib.optional stdenv.isLinux pkg-config + ++ lib.optional stdenv.hostPlatform.isLinux pkg-config ; buildInputs = [ ncurses ] - ++ lib.optional stdenv.isDarwin IOKit - ++ lib.optionals stdenv.isLinux [ libcap libnl ] + ++ lib.optional stdenv.hostPlatform.isDarwin IOKit + ++ lib.optionals stdenv.hostPlatform.isLinux [ libcap libnl ] ++ lib.optional sensorsSupport lm_sensors ++ lib.optional systemdSupport systemd ; configureFlags = [ "--enable-unicode" "--sysconfdir=/etc" ] - ++ lib.optionals stdenv.isLinux [ + ++ lib.optionals stdenv.hostPlatform.isLinux [ "--enable-affinity" "--enable-capabilities" "--enable-delayacct" diff --git a/pkgs/tools/system/java-service-wrapper/default.nix b/pkgs/tools/system/java-service-wrapper/default.nix index 3bbcd917fb6b..bd0dba9a024f 100644 --- a/pkgs/tools/system/java-service-wrapper/default.nix +++ b/pkgs/tools/system/java-service-wrapper/default.nix @@ -34,7 +34,7 @@ stdenv.mkDerivation rec { export JAVA_TOOL_OPTIONS=-Djava.home=$JAVA_HOME export CLASSPATH=${jdk}/lib/openjdk/lib/tools.jar - ant -f build.xml -Dbits=${if stdenv.isi686 then "32" else "64"} + ant -f build.xml -Dbits=${if stdenv.hostPlatform.isi686 then "32" else "64"} runHook postBuild ''; diff --git a/pkgs/tools/system/kanata/default.nix b/pkgs/tools/system/kanata/default.nix index 682158af76ca..b55d5227b0d1 100644 --- a/pkgs/tools/system/kanata/default.nix +++ b/pkgs/tools/system/kanata/default.nix @@ -43,7 +43,7 @@ rustPlatform.buildRustPackage rec { ''; }; - buildInputs = lib.optionals stdenv.isDarwin [ darwin.apple_sdk.frameworks.IOKit ]; + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.IOKit ]; buildFeatures = lib.optional withCmd "cmd"; @@ -62,6 +62,6 @@ rustPlatform.buildRustPackage rec { maintainers = with maintainers; [ bmanuel linj ]; platforms = platforms.unix; mainProgram = "kanata"; - broken = stdenv.isDarwin; + broken = stdenv.hostPlatform.isDarwin; }; } diff --git a/pkgs/tools/system/netdata/default.nix b/pkgs/tools/system/netdata/default.nix index c7c7554914c7..b8746229d81e 100644 --- a/pkgs/tools/system/netdata/default.nix +++ b/pkgs/tools/system/netdata/default.nix @@ -42,15 +42,15 @@ withDBengine ? true, withDebug ? false, withEbpf ? false, - withIpmi ? (stdenv.isLinux), - withNetfilter ? (stdenv.isLinux), - withNetworkViewer ? (stdenv.isLinux), + withIpmi ? (stdenv.hostPlatform.isLinux), + withNetfilter ? (stdenv.hostPlatform.isLinux), + withNetworkViewer ? (stdenv.hostPlatform.isLinux), withSsl ? true, - withSystemdJournal ? (stdenv.isLinux), + withSystemdJournal ? (stdenv.hostPlatform.isLinux), zlib, }: let - stdenv' = if stdenv.isDarwin then overrideSDK stdenv "11.0" else stdenv; + stdenv' = if stdenv.hostPlatform.isDarwin then overrideSDK stdenv "11.0" else stdenv; in stdenv'.mkDerivation (finalAttrs: { version = "1.47.1"; @@ -96,7 +96,7 @@ stdenv'.mkDerivation (finalAttrs: { zlib libyaml ] - ++ lib.optionals stdenv.isDarwin ( + ++ lib.optionals stdenv.hostPlatform.isDarwin ( with darwin.apple_sdk.frameworks; [ CoreFoundation @@ -104,7 +104,7 @@ stdenv'.mkDerivation (finalAttrs: { libossp_uuid ] ) - ++ lib.optionals (stdenv.isLinux) [ + ++ lib.optionals (stdenv.hostPlatform.isLinux) [ libcap libuuid lm_sensors @@ -153,7 +153,7 @@ stdenv'.mkDerivation (finalAttrs: { # Relocate one folder above. mv $out/usr/* $out/ '' - + lib.optionalString (stdenv.isLinux) '' + + lib.optionalString (stdenv.hostPlatform.isLinux) '' # rename this plugin so netdata will look for setuid wrapper mv $out/libexec/netdata/plugins.d/apps.plugin \ $out/libexec/netdata/plugins.d/apps.plugin.org diff --git a/pkgs/tools/system/nsc/default.nix b/pkgs/tools/system/nsc/default.nix index f9aeba937a5f..88dafe7f4f3e 100644 --- a/pkgs/tools/system/nsc/default.nix +++ b/pkgs/tools/system/nsc/default.nix @@ -50,7 +50,7 @@ buildGoModule rec { # Then the `-` are removed from the path unintentionally and the test fails. # This should be fixed upstream to avoid mangling the path when # removing the table decorations from the command output. - doCheck = !stdenv.isDarwin; + doCheck = !stdenv.hostPlatform.isDarwin; meta = { description = "Tool for creating NATS account and user access configurations"; diff --git a/pkgs/tools/system/plan9port/default.nix b/pkgs/tools/system/plan9port/default.nix index 56e191232452..6d1e778da376 100644 --- a/pkgs/tools/system/plan9port/default.nix +++ b/pkgs/tools/system/plan9port/default.nix @@ -35,7 +35,7 @@ stdenv.mkDerivation rec { ''; nativeBuildInputs = [ ed ]; - buildInputs = [ perl which ] ++ (if !stdenv.isDarwin then [ + buildInputs = [ perl which ] ++ (if !stdenv.hostPlatform.isDarwin then [ fontconfig freetype # fontsrv uses these libX11 libXext libXt xorgproto ] else [ @@ -49,7 +49,7 @@ stdenv.mkDerivation rec { CC9='$(command -v $CC)' CFLAGS='$NIX_CFLAGS_COMPILE' LDFLAGS='$(for f in $NIX_LDFLAGS; do echo "-Wl,$f"; done | xargs echo)' - ${lib.optionalString (!stdenv.isDarwin) "X11='${libXt.dev}/include'"} + ${lib.optionalString (!stdenv.hostPlatform.isDarwin) "X11='${libXt.dev}/include'"} EOF # make '9' available in the path so there's some way to find out $PLAN9 diff --git a/pkgs/tools/system/rowhammer-test/default.nix b/pkgs/tools/system/rowhammer-test/default.nix index c19f7a54f0dd..0287a3d3a5fb 100644 --- a/pkgs/tools/system/rowhammer-test/default.nix +++ b/pkgs/tools/system/rowhammer-test/default.nix @@ -11,7 +11,7 @@ stdenv.mkDerivation { sha256 = "1fbfcnm5gjish47wdvikcsgzlb5vnlfqlzzm6mwiw2j5qkq0914i"; }; - env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.isi686 "-Wno-error=format"; + env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.hostPlatform.isi686 "-Wno-error=format"; buildPhase = "sh -e make.sh"; diff --git a/pkgs/tools/system/runit/default.nix b/pkgs/tools/system/runit/default.nix index 2553c07cd6b5..10333d0f6035 100644 --- a/pkgs/tools/system/runit/default.nix +++ b/pkgs/tools/system/runit/default.nix @@ -24,7 +24,7 @@ stdenv.mkDerivation rec { doCheck = true; buildInputs = lib.optionals static [ stdenv.cc.libc stdenv.cc.libc.static ] ++ - lib.optional stdenv.isDarwin darwin.apple_sdk.libs.utmp; + lib.optional stdenv.hostPlatform.isDarwin darwin.apple_sdk.libs.utmp; postPatch = '' sed -i "s,\(#define RUNIT\) .*,\1 \"$out/bin/runit\"," src/runit.h @@ -40,7 +40,7 @@ stdenv.mkDerivation rec { # Both of these are originally hard-coded to gcc echo ${stdenv.cc.targetPrefix}cc > conf-cc - echo ${stdenv.cc.targetPrefix}cc ${lib.optionalString stdenv.isDarwin "-Xlinker -x "}> conf-ld + echo ${stdenv.cc.targetPrefix}cc ${lib.optionalString stdenv.hostPlatform.isDarwin "-Xlinker -x "}> conf-ld ''; installPhase = '' diff --git a/pkgs/tools/system/s-tui/default.nix b/pkgs/tools/system/s-tui/default.nix index 15bedadccef0..c153b3033f86 100644 --- a/pkgs/tools/system/s-tui/default.nix +++ b/pkgs/tools/system/s-tui/default.nix @@ -31,7 +31,7 @@ python3Packages.buildPythonPackage rec { description = "Stress-Terminal UI monitoring tool"; license = licenses.gpl2Plus; maintainers = [ ]; - broken = stdenv.isDarwin; # https://github.com/amanusk/s-tui/issues/49 + broken = stdenv.hostPlatform.isDarwin; # https://github.com/amanusk/s-tui/issues/49 mainProgram = "s-tui"; }; } diff --git a/pkgs/tools/system/smartmontools/default.nix b/pkgs/tools/system/smartmontools/default.nix index 50765fa2e170..b8c594dde470 100644 --- a/pkgs/tools/system/smartmontools/default.nix +++ b/pkgs/tools/system/smartmontools/default.nix @@ -54,8 +54,8 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ autoreconfHook ]; buildInputs = - lib.optionals stdenv.isLinux [ systemdLibs ] - ++ lib.optionals stdenv.isDarwin [ + lib.optionals stdenv.hostPlatform.isLinux [ systemdLibs ] + ++ lib.optionals stdenv.hostPlatform.isDarwin [ IOKit ApplicationServices ]; diff --git a/pkgs/tools/system/stress-ng/default.nix b/pkgs/tools/system/stress-ng/default.nix index ebd209d2c8fd..c189606cd007 100644 --- a/pkgs/tools/system/stress-ng/default.nix +++ b/pkgs/tools/system/stress-ng/default.nix @@ -37,7 +37,7 @@ stdenv.mkDerivation rec { # install phase without checking the dependencies. This will prevent # triggering the rebuild. Why this only happens on i686 remains a # mystery, though. :-( - enableParallelBuilding = (!stdenv.isi686); + enableParallelBuilding = (!stdenv.hostPlatform.isi686); meta = with lib; { description = "Stress test a computer system"; diff --git a/pkgs/tools/system/testdisk/default.nix b/pkgs/tools/system/testdisk/default.nix index e4d24802a54f..8761576d19b0 100644 --- a/pkgs/tools/system/testdisk/default.nix +++ b/pkgs/tools/system/testdisk/default.nix @@ -7,8 +7,8 @@ , libjpeg , zlib , libewf -, enableNtfs ? !stdenv.isDarwin, ntfs3g ? null -, enableExtFs ? !stdenv.isDarwin, e2fsprogs ? null +, enableNtfs ? !stdenv.hostPlatform.isDarwin, ntfs3g ? null +, enableExtFs ? !stdenv.hostPlatform.isDarwin, e2fsprogs ? null , enableQt ? false, qtbase ? null, qttools ? null, qwt ? null }: diff --git a/pkgs/tools/system/tree/default.nix b/pkgs/tools/system/tree/default.nix index 069723b7bdb3..fbd0f08d110a 100644 --- a/pkgs/tools/system/tree/default.nix +++ b/pkgs/tools/system/tree/default.nix @@ -4,14 +4,14 @@ let # These settings are found in the Makefile, but there seems to be no # way to select one or the other setting other than editing the file # manually, so we have to duplicate the know how here. - systemFlags = lib.optionalString stdenv.isDarwin '' + systemFlags = lib.optionalString stdenv.hostPlatform.isDarwin '' CFLAGS="-O2 -Wall -fomit-frame-pointer -no-cpp-precomp" LDFLAGS= - '' + lib.optionalString stdenv.isCygwin '' + '' + lib.optionalString stdenv.hostPlatform.isCygwin '' CFLAGS="-O2 -Wall -fomit-frame-pointer" LDFLAGS=-s TREE_DEST=tree.exe - '' + lib.optionalString (stdenv.isFreeBSD || stdenv.isOpenBSD) '' + '' + lib.optionalString (stdenv.hostPlatform.isFreeBSD || stdenv.hostPlatform.isOpenBSD) '' CFLAGS="-O2 -Wall -fomit-frame-pointer" LDFLAGS=-s ''; # use linux flags by default diff --git a/pkgs/tools/system/zenith/default.nix b/pkgs/tools/system/zenith/default.nix index 4af272ccb49d..ffb530600bd3 100644 --- a/pkgs/tools/system/zenith/default.nix +++ b/pkgs/tools/system/zenith/default.nix @@ -7,7 +7,7 @@ , makeWrapper }: -assert nvidiaSupport -> stdenv.isLinux; +assert nvidiaSupport -> stdenv.hostPlatform.isLinux; rustPlatform.buildRustPackage rec { pname = "zenith"; @@ -34,7 +34,7 @@ rustPlatform.buildRustPackage rec { }; nativeBuildInputs = [ rustPlatform.bindgenHook ] ++ lib.optional nvidiaSupport makeWrapper; - buildInputs = lib.optionals stdenv.isDarwin [ IOKit ]; + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ IOKit ]; buildFeatures = lib.optional nvidiaSupport "nvidia"; diff --git a/pkgs/tools/text/amber/default.nix b/pkgs/tools/text/amber/default.nix index 0b81281fad1a..ce8243770b04 100644 --- a/pkgs/tools/text/amber/default.nix +++ b/pkgs/tools/text/amber/default.nix @@ -15,7 +15,7 @@ rustPlatform.buildRustPackage rec { cargoHash = "sha256-nBSgP30Izskq9RbhVIyqWzZgG5ZWHVdiukldw+Q0rco="; - buildInputs = lib.optionals stdenv.isDarwin [ libiconv Security ]; + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ libiconv Security ]; meta = with lib; { description = "Code search-and-replace tool"; diff --git a/pkgs/tools/text/autocorrect/default.nix b/pkgs/tools/text/autocorrect/default.nix index 3546b79e0a52..c752c9cf11c1 100644 --- a/pkgs/tools/text/autocorrect/default.nix +++ b/pkgs/tools/text/autocorrect/default.nix @@ -19,7 +19,7 @@ rustPlatform.buildRustPackage rec { cp ${./Cargo.lock} Cargo.lock ''; - buildInputs = lib.optionals stdenv.isDarwin [ Security SystemConfiguration ]; + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ Security SystemConfiguration ]; cargoBuildFlags = [ "-p" "autocorrect-cli" ]; cargoTestFlags = [ "-p" "autocorrect-cli" ]; diff --git a/pkgs/tools/text/chars/default.nix b/pkgs/tools/text/chars/default.nix index 509953e8059b..ca2ad027c2cf 100644 --- a/pkgs/tools/text/chars/default.nix +++ b/pkgs/tools/text/chars/default.nix @@ -17,7 +17,7 @@ rustPlatform.buildRustPackage rec { cargoHash = "sha256-wqyExG4haco6jg1zpbouz3xMR7sjiVIAC16PnDU2tc8="; - buildInputs = lib.optionals stdenv.isDarwin [ Security ]; + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ Security ]; meta = with lib; { description = "Commandline tool to display information about unicode characters"; diff --git a/pkgs/tools/text/clima/default.nix b/pkgs/tools/text/clima/default.nix index 65483e115269..f7e6ee15d7f8 100644 --- a/pkgs/tools/text/clima/default.nix +++ b/pkgs/tools/text/clima/default.nix @@ -18,7 +18,7 @@ rustPlatform.buildRustPackage rec { cargoHash = "sha256-jKY+Ta6lqMBUlqSViKk3W0CiO8oU+ucmleKDYRA54HQ="; - buildInputs = lib.optionals stdenv.isDarwin [ + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.Security ]; diff --git a/pkgs/tools/text/cmigemo/default.nix b/pkgs/tools/text/cmigemo/default.nix index 20cee369e73f..b7b08a762736 100644 --- a/pkgs/tools/text/cmigemo/default.nix +++ b/pkgs/tools/text/cmigemo/default.nix @@ -24,9 +24,9 @@ stdenv.mkDerivation { makeFlags = [ "INSTALL=install" ]; - buildFlags = [ (if stdenv.isDarwin then "osx-all" else "gcc-all") ]; + buildFlags = [ (if stdenv.hostPlatform.isDarwin then "osx-all" else "gcc-all") ]; - installTargets = [ (if stdenv.isDarwin then "osx-install" else "gcc-install") ]; + installTargets = [ (if stdenv.hostPlatform.isDarwin then "osx-install" else "gcc-install") ]; meta = with lib; { description = "Tool that supports Japanese incremental search with Romaji"; diff --git a/pkgs/tools/text/coloursum/default.nix b/pkgs/tools/text/coloursum/default.nix index 78f583e3f73d..8e84a1de14bc 100644 --- a/pkgs/tools/text/coloursum/default.nix +++ b/pkgs/tools/text/coloursum/default.nix @@ -13,7 +13,7 @@ rustPlatform.buildRustPackage rec { cargoHash = "sha256-dhcTpff4h37MHNbLoYUZiolSclSGcFrMJ3kKLCZAVAw="; - buildInputs = lib.optional stdenv.isDarwin Security; + buildInputs = lib.optional stdenv.hostPlatform.isDarwin Security; meta = with lib; { description = "Colourise your checksum output"; diff --git a/pkgs/tools/text/dcs/default.nix b/pkgs/tools/text/dcs/default.nix index 0f438e4ff571..458a76cf5913 100644 --- a/pkgs/tools/text/dcs/default.nix +++ b/pkgs/tools/text/dcs/default.nix @@ -41,7 +41,7 @@ buildGoModule { homepage = "https://github.com/Debian/dcs"; license = licenses.bsd3; maintainers = [ ]; - broken = stdenv.isAarch64 - || stdenv.isDarwin; # never built on Hydra https://hydra.nixos.org/job/nixpkgs/staging-next/dcs.x86_64-darwin + broken = stdenv.hostPlatform.isAarch64 + || stdenv.hostPlatform.isDarwin; # never built on Hydra https://hydra.nixos.org/job/nixpkgs/staging-next/dcs.x86_64-darwin }; } diff --git a/pkgs/tools/text/diffr/default.nix b/pkgs/tools/text/diffr/default.nix index 9abc2fac5150..fbdf221d1206 100644 --- a/pkgs/tools/text/diffr/default.nix +++ b/pkgs/tools/text/diffr/default.nix @@ -13,7 +13,7 @@ rustPlatform.buildRustPackage rec { cargoHash = "sha256-RmQu55OnKfeuDGcJrfjhMKnxDatdowkvh3Kh4N8I8Sg="; - buildInputs = (lib.optional stdenv.isDarwin Security); + buildInputs = (lib.optional stdenv.hostPlatform.isDarwin Security); preCheck = '' export DIFFR_TESTS_BINARY_PATH=$releaseDir/diffr diff --git a/pkgs/tools/text/discount/default.nix b/pkgs/tools/text/discount/default.nix index e71b5941ea93..d2219955d3dc 100644 --- a/pkgs/tools/text/discount/default.nix +++ b/pkgs/tools/text/discount/default.nix @@ -25,7 +25,7 @@ stdenv.mkDerivation rec { doCheck = true; - postFixup = lib.optionalString stdenv.isDarwin '' + postFixup = lib.optionalString stdenv.hostPlatform.isDarwin '' install_name_tool -id "$out/lib/libmarkdown.dylib" "$out/lib/libmarkdown.dylib" for exe in $out/bin/*; do install_name_tool -change libmarkdown.dylib "$out/lib/libmarkdown.dylib" "$exe" diff --git a/pkgs/tools/text/fastmod/default.nix b/pkgs/tools/text/fastmod/default.nix index e7b2f3b107c9..f8cc3055e905 100644 --- a/pkgs/tools/text/fastmod/default.nix +++ b/pkgs/tools/text/fastmod/default.nix @@ -18,7 +18,7 @@ rustPlatform.buildRustPackage rec { cargoHash = "sha256-sFrABp4oYhel+GONFsTbunq+4We2DicvF9A3FT/ZArc="; - buildInputs = lib.optionals stdenv.isDarwin [ libiconv Security ]; + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ libiconv Security ]; meta = with lib; { description = "Utility that makes sweeping changes to large, shared code bases"; diff --git a/pkgs/tools/text/fst/default.nix b/pkgs/tools/text/fst/default.nix index 1f1b2950e160..c43a781cf6e1 100644 --- a/pkgs/tools/text/fst/default.nix +++ b/pkgs/tools/text/fst/default.nix @@ -17,7 +17,7 @@ rustPlatform.buildRustPackage rec { cargoHash = "sha256-yTbEaw+BbjVks3j7/b75kGoUjVftLaVYvYIdI/bbfdk="; - buildInputs = lib.optionals stdenv.isDarwin [ libiconv ]; + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ libiconv ]; doInstallCheck = true; installCheckPhase = '' diff --git a/pkgs/tools/text/gawk/default.nix b/pkgs/tools/text/gawk/default.nix index 941e102cb3b0..103f9e16eb66 100644 --- a/pkgs/tools/text/gawk/default.nix +++ b/pkgs/tools/text/gawk/default.nix @@ -7,16 +7,16 @@ , autoreconfHook # no-pma fix /* Test suite broke on: - stdenv.isCygwin # XXX: `test-dup2' segfaults on Cygwin 6.1 - || stdenv.isDarwin # XXX: `locale' segfaults - || stdenv.isSunOS # XXX: `_backsmalls1' fails, locale stuff? - || stdenv.isFreeBSD + stdenv.hostPlatform.isCygwin # XXX: `test-dup2' segfaults on Cygwin 6.1 + || stdenv.hostPlatform.isDarwin # XXX: `locale' segfaults + || stdenv.hostPlatform.isSunOS # XXX: `_backsmalls1' fails, locale stuff? + || stdenv.hostPlatform.isFreeBSD */ -, doCheck ? (interactive && stdenv.isLinux), glibcLocales ? null +, doCheck ? (interactive && stdenv.hostPlatform.isLinux), glibcLocales ? null , locale ? null }: -assert (doCheck && stdenv.isLinux) -> glibcLocales != null; +assert (doCheck && stdenv.hostPlatform.isLinux) -> glibcLocales != null; stdenv.mkDerivation rec { pname = "gawk" + lib.optionalString interactive "-interactive"; @@ -44,7 +44,7 @@ stdenv.mkDerivation rec { autoreconfHook ] ++ lib.optionals interactive [ removeReferencesTo - ] ++ lib.optionals (doCheck && stdenv.isLinux) [ + ] ++ lib.optionals (doCheck && stdenv.hostPlatform.isLinux) [ glibcLocales ]; @@ -53,7 +53,7 @@ stdenv.mkDerivation rec { readline ] ++ lib.optionals withSigsegv [ libsigsegv - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ locale ]; diff --git a/pkgs/tools/text/gawk/gawkextlib.nix b/pkgs/tools/text/gawk/gawkextlib.nix index 86bf2beaa91d..eaf7799a4860 100644 --- a/pkgs/tools/text/gawk/gawkextlib.nix +++ b/pkgs/tools/text/gawk/gawkextlib.nix @@ -109,14 +109,14 @@ let #! No such device # mdb_env_open(env, /dev/null) #! Operation not supported by device - doCheck = !stdenv.isDarwin; + doCheck = !stdenv.hostPlatform.isDarwin; }; mbs = buildExtension { inherit gawkextlib; name = "mbs"; extraBuildInputs = [ glibcLocales ]; #! "spät": length: 5, mbs_length: 6, wcswidth: 4 - doCheck = !stdenv.isDarwin; + doCheck = !stdenv.hostPlatform.isDarwin; }; mpfr = buildExtension { inherit gawkextlib; diff --git a/pkgs/tools/text/glogg/default.nix b/pkgs/tools/text/glogg/default.nix index 7a6562aab143..04aac6b0b871 100644 --- a/pkgs/tools/text/glogg/default.nix +++ b/pkgs/tools/text/glogg/default.nix @@ -11,7 +11,7 @@ mkDerivation rec { sha256 = "0hf1c2m8n88frmxmyn0ndr8129p7iky49nq565sw1asaydm5z6pb"; }; - postPatch = lib.optionalString stdenv.isDarwin '' + postPatch = lib.optionalString stdenv.hostPlatform.isDarwin '' substituteInPlace glogg.pro \ --replace "boost_program_options-mt" "boost_program_options" ''; @@ -21,7 +21,7 @@ mkDerivation rec { qmakeFlags = [ "VERSION=${version}" ]; - postInstall = lib.optionalString stdenv.isDarwin '' + postInstall = lib.optionalString stdenv.hostPlatform.isDarwin '' mkdir -p $out/Applications mv $out/bin/glogg.app $out/Applications/glogg.app rm -fr $out/{bin,share} diff --git a/pkgs/tools/text/gnugrep/default.nix b/pkgs/tools/text/gnugrep/default.nix index 40bd33758b54..bbb876703f2b 100644 --- a/pkgs/tools/text/gnugrep/default.nix +++ b/pkgs/tools/text/gnugrep/default.nix @@ -32,7 +32,7 @@ stdenv.mkDerivation { # cygwin: FAIL: multibyte-white-space # freebsd: FAIL mb-non-UTF8-performance # x86_64-darwin: fails 'stack-overflow' tests on Rosetta 2 emulator - doCheck = !stdenv.isCygwin && !stdenv.isFreeBSD && !(stdenv.isDarwin && stdenv.hostPlatform.isx86_64) && !stdenv.buildPlatform.isRiscV64; + doCheck = !stdenv.hostPlatform.isCygwin && !stdenv.hostPlatform.isFreeBSD && !(stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isx86_64) && !stdenv.buildPlatform.isRiscV64; # On macOS, force use of mkdir -p, since Grep's fallback # (./install-sh) is broken. diff --git a/pkgs/tools/text/highlight/default.nix b/pkgs/tools/text/highlight/default.nix index a2f91efc9494..868de0fb679e 100644 --- a/pkgs/tools/text/highlight/default.nix +++ b/pkgs/tools/text/highlight/default.nix @@ -15,7 +15,7 @@ let enableParallelBuilding = true; nativeBuildInputs = [ pkg-config swig perl ] - ++ lib.optional stdenv.isDarwin gcc; + ++ lib.optional stdenv.hostPlatform.isDarwin gcc; buildInputs = [ getopt lua boost libxcrypt ]; @@ -35,15 +35,15 @@ let # This has to happen _before_ the main build because it does a # `make clean' for some reason. - preBuild = lib.optionalString (!stdenv.isDarwin) '' + preBuild = lib.optionalString (!stdenv.hostPlatform.isDarwin) '' make -C extras/swig $makeFlags perl ''; - postCheck = lib.optionalString (!stdenv.isDarwin) '' + postCheck = lib.optionalString (!stdenv.hostPlatform.isDarwin) '' perl -Iextras/swig extras/swig/testmod.pl ''; - preInstall = lib.optionalString (!stdenv.isDarwin) '' + preInstall = lib.optionalString (!stdenv.hostPlatform.isDarwin) '' mkdir -p $out/${perl.libPrefix} install -m644 extras/swig/highlight.{so,pm} $out/${perl.libPrefix} make -C extras/swig clean # Clean up intermediate files. @@ -59,5 +59,5 @@ let }; in - if stdenv.isDarwin then self + if stdenv.hostPlatform.isDarwin then self else perl.pkgs.toPerlModule self diff --git a/pkgs/tools/text/html2text/default.nix b/pkgs/tools/text/html2text/default.nix index 247ee8e814df..afa4bb114037 100644 --- a/pkgs/tools/text/html2text/default.nix +++ b/pkgs/tools/text/html2text/default.nix @@ -13,7 +13,7 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ autoreconfHook ]; - buildInputs = lib.optional stdenv.isDarwin libiconv; + buildInputs = lib.optional stdenv.hostPlatform.isDarwin libiconv; meta = { description = "Convert HTML to plain text"; diff --git a/pkgs/tools/text/hyx/default.nix b/pkgs/tools/text/hyx/default.nix index 3cbcac20966a..e41f9bbfceb2 100644 --- a/pkgs/tools/text/hyx/default.nix +++ b/pkgs/tools/text/hyx/default.nix @@ -9,7 +9,7 @@ stdenv.mkDerivation rec { sha256 = "sha256-dufx3zsabeet7Rp0d60MIuNqisIQd6UgE7WDZYNHl3E="; }; - postPatch = lib.optionalString stdenv.isDarwin '' + postPatch = lib.optionalString stdenv.hostPlatform.isDarwin '' substituteInPlace Makefile \ --replace "-Wl,-z,relro,-z,now -fpic -pie" "" ''; diff --git a/pkgs/tools/text/igrep/default.nix b/pkgs/tools/text/igrep/default.nix index e2751197c717..a4c4a134c4b6 100644 --- a/pkgs/tools/text/igrep/default.nix +++ b/pkgs/tools/text/igrep/default.nix @@ -20,7 +20,7 @@ rustPlatform.buildRustPackage rec { cargoHash = "sha256-raSz/+u7P04qHmvdfYoWKOKtNtaFlgmT8Nw0ImhCMkU="; - buildInputs = lib.optionals stdenv.isDarwin [ Security ]; + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ Security ]; passthru.tests = { version = testers.testVersion { package = igrep; command = "ig --version"; }; diff --git a/pkgs/tools/text/ispell/default.nix b/pkgs/tools/text/ispell/default.nix index 3dea94d0912b..844f35612ff4 100644 --- a/pkgs/tools/text/ispell/default.nix +++ b/pkgs/tools/text/ispell/default.nix @@ -13,7 +13,7 @@ stdenv.mkDerivation rec { postPatch = '' cat >> local.h < configure.local ''; @@ -85,13 +85,13 @@ stdenv.mkDerivation rec { in # Check that soVersion is up to date even if we are not on darwin - lib.optionalString (enableShared && !stdenv.isDarwin) '' + lib.optionalString (enableShared && !stdenv.hostPlatform.isDarwin) '' test -f $lib/lib/liblowdown.so.${soVersion} || \ die "postInstall: expected $lib/lib/liblowdown.so.${soVersion} is missing" '' # Fix lib extension so that fixDarwinDylibNames detects it, see # . - + lib.optionalString (enableShared && stdenv.isDarwin) '' + + lib.optionalString (enableShared && stdenv.hostPlatform.isDarwin) '' darwinDylib="$lib/lib/liblowdown.${soVersion}.dylib" mv "$lib/lib/liblowdown.so.${soVersion}" "$darwinDylib" diff --git a/pkgs/tools/typesetting/sile/default.nix b/pkgs/tools/typesetting/sile/default.nix index b6a77b55f685..49dbc74422e7 100644 --- a/pkgs/tools/typesetting/sile/default.nix +++ b/pkgs/tools/typesetting/sile/default.nix @@ -70,13 +70,13 @@ stdenv.mkDerivation (finalAttrs: { fontconfig libiconv ] - ++ lib.optional stdenv.isDarwin darwin.apple_sdk.frameworks.AppKit + ++ lib.optional stdenv.hostPlatform.isDarwin darwin.apple_sdk.frameworks.AppKit ; passthru = { # So it will be easier to inspect this environment, in comparison to others inherit luaEnv; # Copied from Makefile.am - tests.test = lib.optionalAttrs (!(stdenv.isDarwin && stdenv.isAarch64)) ( + tests.test = lib.optionalAttrs (!(stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isAarch64)) ( runCommand "sile-test" { nativeBuildInputs = [ poppler_utils sile ]; @@ -90,11 +90,11 @@ stdenv.mkDerivation (finalAttrs: { postPatch = '' patchShebangs build-aux/*.sh - '' + lib.optionalString stdenv.isDarwin '' + '' + lib.optionalString stdenv.hostPlatform.isDarwin '' sed -i -e 's|@import AppKit;|#import |' src/macfonts.m ''; - NIX_LDFLAGS = lib.optionalString stdenv.isDarwin "-framework AppKit"; + NIX_LDFLAGS = lib.optionalString stdenv.hostPlatform.isDarwin "-framework AppKit"; FONTCONFIG_FILE = makeFontsConf { fontDirectories = [ @@ -110,7 +110,7 @@ stdenv.mkDerivation (finalAttrs: { ''; # remove forbidden references to $TMPDIR - preFixup = lib.optionalString stdenv.isLinux '' + preFixup = lib.optionalString stdenv.hostPlatform.isLinux '' for f in "$out"/bin/*; do if isELF "$f"; then patchelf --shrink-rpath --allowed-rpath-prefixes "$NIX_STORE" "$f" diff --git a/pkgs/tools/typesetting/tectonic/default.nix b/pkgs/tools/typesetting/tectonic/default.nix index 0cc8b18de92a..815cc01f8be6 100644 --- a/pkgs/tools/typesetting/tectonic/default.nix +++ b/pkgs/tools/typesetting/tectonic/default.nix @@ -45,12 +45,12 @@ rustPlatform.buildRustPackage rec { buildFeatures = [ "external-harfbuzz" ]; buildInputs = [ icu fontconfig harfbuzz openssl ] - ++ lib.optionals stdenv.isDarwin (with darwin.apple_sdk.frameworks; [ ApplicationServices Cocoa Foundation ]); + ++ lib.optionals stdenv.hostPlatform.isDarwin (with darwin.apple_sdk.frameworks; [ ApplicationServices Cocoa Foundation ]); postInstall = '' # Makes it possible to automatically use the V2 CLI API ln -s $out/bin/tectonic $out/bin/nextonic - '' + lib.optionalString stdenv.isLinux '' + '' + lib.optionalString stdenv.hostPlatform.isLinux '' substituteInPlace dist/appimage/tectonic.desktop \ --replace Exec=tectonic Exec=$out/bin/tectonic install -D dist/appimage/tectonic.desktop -t $out/share/applications/ diff --git a/pkgs/tools/typesetting/ted/default.nix b/pkgs/tools/typesetting/ted/default.nix index 4cff637d7706..a6c46c6c7df5 100644 --- a/pkgs/tools/typesetting/ted/default.nix +++ b/pkgs/tools/typesetting/ted/default.nix @@ -78,7 +78,7 @@ stdenv.mkDerivation rec { homepage = "https://nllgg.nl/Ted/"; license = licenses.gpl2Only; platforms = platforms.all; - broken = stdenv.isDarwin; + broken = stdenv.hostPlatform.isDarwin; maintainers = with maintainers; [ obadz ]; }; } diff --git a/pkgs/tools/typesetting/tex/blahtexml/default.nix b/pkgs/tools/typesetting/tex/blahtexml/default.nix index 9d88ac3b0be6..8f4b1980d313 100644 --- a/pkgs/tools/typesetting/tex/blahtexml/default.nix +++ b/pkgs/tools/typesetting/tex/blahtexml/default.nix @@ -24,11 +24,11 @@ stdenv.mkDerivation rec { outputs = [ "out" "doc" ]; nativeBuildInputs = [ texliveFull ]; # scheme-full needed for ucs package - buildInputs = [ xercesc ] ++ lib.optionals stdenv.isDarwin [ libiconv ]; + buildInputs = [ xercesc ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ libiconv ]; buildFlags = [ "doc" ] ++ - (if stdenv.isDarwin + (if stdenv.hostPlatform.isDarwin then [ "blahtex-mac" "blahtexml-mac" ] else [ "blahtex-linux" "blahtexml-linux" ]); diff --git a/pkgs/tools/typesetting/tex/tetex/default.nix b/pkgs/tools/typesetting/tex/tetex/default.nix index 6000a13ec621..02471c863184 100644 --- a/pkgs/tools/typesetting/tex/tetex/default.nix +++ b/pkgs/tools/typesetting/tex/tetex/default.nix @@ -19,11 +19,11 @@ stdenv.mkDerivation rec { hardeningDisable = [ "format" ]; # fixes "error: conflicting types for 'calloc'", etc. - preBuild = lib.optionalString stdenv.isDarwin '' + preBuild = lib.optionalString stdenv.hostPlatform.isDarwin '' sed -i 57d texk/kpathsea/c-std.h ''; - preConfigure = if stdenv.isCygwin then '' + preConfigure = if stdenv.hostPlatform.isCygwin then '' find ./ -name "config.guess" -exec rm {} \; -exec ln -s ${automake}/share/automake-*/config.guess {} \; '' else null; @@ -41,7 +41,7 @@ stdenv.mkDerivation rec { "--without-oxdvik" "--without-texinfo" "--without-texi2html" "--with-system-zlib" "--with-system-pnglib" "--with-system-ncurses" ] # couldn't get gsftopk working on darwin - ++ lib.optional stdenv.isDarwin "--without-gsftopk"; + ++ lib.optional stdenv.hostPlatform.isDarwin "--without-gsftopk"; postUnpack = '' mkdir -p $out/share/texmf diff --git a/pkgs/tools/typesetting/tex/texpresso/default.nix b/pkgs/tools/typesetting/tex/texpresso/default.nix index 8653782da71c..73c111bd22b0 100644 --- a/pkgs/tools/typesetting/tex/texpresso/default.nix +++ b/pkgs/tools/typesetting/tex/texpresso/default.nix @@ -47,7 +47,7 @@ stdenv.mkDerivation rec { buildFlags = [ "texpresso" ]; - env.NIX_CFLAGS_COMPILE = toString (lib.optionals stdenv.isDarwin [ + env.NIX_CFLAGS_COMPILE = toString (lib.optionals stdenv.hostPlatform.isDarwin [ "-Wno-error=implicit-function-declaration" ]); diff --git a/pkgs/tools/video/atomicparsley/default.nix b/pkgs/tools/video/atomicparsley/default.nix index 3433bde6e11a..24c11d8695d6 100644 --- a/pkgs/tools/video/atomicparsley/default.nix +++ b/pkgs/tools/video/atomicparsley/default.nix @@ -14,7 +14,7 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ cmake ]; buildInputs = [ zlib ] - ++ lib.optionals stdenv.isDarwin [ Cocoa ]; + ++ lib.optionals stdenv.hostPlatform.isDarwin [ Cocoa ]; installPhase = '' runHook preInstall diff --git a/pkgs/tools/video/bento4/default.nix b/pkgs/tools/video/bento4/default.nix index 12764ad92778..5059cfa0c838 100644 --- a/pkgs/tools/video/bento4/default.nix +++ b/pkgs/tools/video/bento4/default.nix @@ -20,7 +20,7 @@ stdenv.mkDerivation rec { cmakeFlags = [ "-DBUILD_SHARED_LIBS=ON" - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ "-DCMAKE_OSX_ARCHITECTURES=" ]; @@ -33,7 +33,7 @@ stdenv.mkDerivation rec { ''; # Patch binaries to use our dylib - postInstall = lib.optionalString stdenv.isDarwin '' + postInstall = lib.optionalString stdenv.hostPlatform.isDarwin '' find $out/bin -maxdepth 1 -executable -type f -exec install_name_tool -change @rpath/libap4.dylib $out/lib/libap4.dylib {} \; ''; diff --git a/pkgs/tools/video/rtmpdump/default.nix b/pkgs/tools/video/rtmpdump/default.nix index acb59fd21bdb..8c5942d85210 100644 --- a/pkgs/tools/video/rtmpdump/default.nix +++ b/pkgs/tools/video/rtmpdump/default.nix @@ -37,7 +37,7 @@ stdenv.mkDerivation { ] ++ lib.optional gnutlsSupport "CRYPTO=GNUTLS" ++ lib.optional opensslSupport "CRYPTO=OPENSSL" - ++ lib.optional stdenv.isDarwin "SYS=darwin" + ++ lib.optional stdenv.hostPlatform.isDarwin "SYS=darwin" ++ lib.optional stdenv.cc.isClang "CC=clang"; propagatedBuildInputs = [ zlib ] diff --git a/pkgs/tools/video/swfmill/default.nix b/pkgs/tools/video/swfmill/default.nix index 9e8fea8b53a6..e7e28c09a2d8 100644 --- a/pkgs/tools/video/swfmill/default.nix +++ b/pkgs/tools/video/swfmill/default.nix @@ -15,7 +15,7 @@ stdenv.mkDerivation rec { buildInputs = [ libxslt freetype libpng libxml2 ]; # fatal error: 'libxml/xpath.h' file not found - env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.isDarwin "-I${libxml2.dev}/include/libxml2"; + env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.hostPlatform.isDarwin "-I${libxml2.dev}/include/libxml2"; meta = { description = "Xml2swf and swf2xml processor with import functionalities"; diff --git a/pkgs/tools/video/tsduck/default.nix b/pkgs/tools/video/tsduck/default.nix index 2e91b2dc8575..0da53e2e96ea 100644 --- a/pkgs/tools/video/tsduck/default.nix +++ b/pkgs/tools/video/tsduck/default.nix @@ -88,6 +88,6 @@ stdenv.mkDerivation rec { maintainers = with maintainers; [ siriobalmelli ]; platforms = platforms.all; # never built on aarch64-darwin, x86_64-darwin since first introduction in nixpkgs - broken = stdenv.isDarwin; + broken = stdenv.hostPlatform.isDarwin; }; } diff --git a/pkgs/tools/video/yaydl/default.nix b/pkgs/tools/video/yaydl/default.nix index e54d37b15707..83463e22c481 100644 --- a/pkgs/tools/video/yaydl/default.nix +++ b/pkgs/tools/video/yaydl/default.nix @@ -28,7 +28,7 @@ rustPlatform.buildRustPackage rec { ]; buildInputs = [ openssl ] - ++ lib.optional stdenv.isDarwin Security; + ++ lib.optional stdenv.hostPlatform.isDarwin Security; postInstall = '' wrapProgram $out/bin/yaydl \ diff --git a/pkgs/tools/virtualization/distrobuilder/default.nix b/pkgs/tools/virtualization/distrobuilder/default.nix index 455e6f108c88..b2927b7c5000 100644 --- a/pkgs/tools/virtualization/distrobuilder/default.nix +++ b/pkgs/tools/virtualization/distrobuilder/default.nix @@ -23,7 +23,7 @@ let gnupg gnutar squashfsTools - ] ++ lib.optionals stdenv.isx86_64 [ + ] ++ lib.optionals stdenv.hostPlatform.isx86_64 [ # repack-windows deps cdrkit hivex diff --git a/pkgs/tools/virtualization/ovftool/default.nix b/pkgs/tools/virtualization/ovftool/default.nix index 46e1614385bf..6df3491c085d 100644 --- a/pkgs/tools/virtualization/ovftool/default.nix +++ b/pkgs/tools/virtualization/ovftool/default.nix @@ -65,15 +65,15 @@ stdenv.mkDerivation { libxcrypt-legacy xercesc zlib - ] ++ lib.optionals stdenv.isLinux [ + ] ++ lib.optionals stdenv.hostPlatform.isLinux [ glibc - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ darwin.Libsystem libxml2 ]; nativeBuildInputs = [ unzip makeWrapper ] - ++ lib.optionals stdenv.isLinux [ autoPatchelfHook ]; + ++ lib.optionals stdenv.hostPlatform.isLinux [ autoPatchelfHook ]; postUnpack = '' # The linux package wraps ovftool.bin with ovftool. Wrapping @@ -103,7 +103,7 @@ stdenv.mkDerivation { # Darwin dylibs are under `lib` in the zip. install -m 755 -d "$out/lib" install -m 644 -t "$out/lib" \ - '' + lib.optionalString stdenv.isLinux '' + '' + lib.optionalString stdenv.hostPlatform.isLinux '' libcrypto.so.1.0.2 \ libcurl.so.4 \ libgoogleurl.so.59 \ @@ -112,7 +112,7 @@ stdenv.mkDerivation { libvim-types.so \ libvmacore.so \ libvmomi.so - '' + lib.optionalString stdenv.isDarwin '' + '' + lib.optionalString stdenv.hostPlatform.isDarwin '' lib/libcrypto.1.0.2.dylib \ lib/libcurl.4.dylib \ lib/libgoogleurl.59.0.30.45.2.dylib \ @@ -151,17 +151,17 @@ stdenv.mkDerivation { # Install final executable install -m 755 -d "$out/bin" makeWrapper "$out/libexec/ovftool" "$out/bin/ovftool" \ - '' + lib.optionalString stdenv.isLinux '' + '' + lib.optionalString stdenv.hostPlatform.isLinux '' --prefix LD_LIBRARY_PATH : "$out/lib" - '' + lib.optionalString stdenv.isDarwin '' + '' + lib.optionalString stdenv.hostPlatform.isDarwin '' --prefix DYLD_LIBRARY_PATH : "$out/lib" '' + '' runHook postInstall ''; - preFixup = lib.optionalString stdenv.isLinux '' + preFixup = lib.optionalString stdenv.hostPlatform.isLinux '' addAutoPatchelfSearchPath "$out/lib" - '' + lib.optionalString stdenv.isDarwin '' + '' + lib.optionalString stdenv.hostPlatform.isDarwin '' change_args=() # Change relative @loader_path dylibs to absolute paths. @@ -208,7 +208,7 @@ stdenv.mkDerivation { ''; # These paths are need for install check tests - propagatedSandboxProfile = lib.optionalString stdenv.isDarwin '' + propagatedSandboxProfile = lib.optionalString stdenv.hostPlatform.isDarwin '' (allow file-read* (subpath "/usr/share/locale")) (allow file-read* (subpath "/var/db/timezone")) (allow file-read* (subpath "/System/Library/TextEncodings")) @@ -216,7 +216,7 @@ stdenv.mkDerivation { doInstallCheck = true; - postInstallCheck = lib.optionalString stdenv.isDarwin '' + postInstallCheck = lib.optionalString stdenv.hostPlatform.isDarwin '' export HOME=$TMPDIR # Construct a dummy /etc/passwd file - ovftool attempts to determine the # user's "real" home using this diff --git a/pkgs/tools/wayland/wob/default.nix b/pkgs/tools/wayland/wob/default.nix index d57755244a10..e670c5fce4de 100644 --- a/pkgs/tools/wayland/wob/default.nix +++ b/pkgs/tools/wayland/wob/default.nix @@ -30,9 +30,9 @@ stdenv.mkDerivation rec { ]; nativeBuildInputs = [ meson ninja pkg-config scdoc wayland-scanner ]; buildInputs = [ cmocka inih wayland wayland-protocols ] - ++ lib.optional stdenv.isLinux libseccomp; + ++ lib.optional stdenv.hostPlatform.isLinux libseccomp; - mesonFlags = lib.optional stdenv.isLinux "-Dseccomp=enabled"; + mesonFlags = lib.optional stdenv.hostPlatform.isLinux "-Dseccomp=enabled"; meta = with lib; { inherit (src.meta) homepage; diff --git a/pkgs/top-level/aliases.nix b/pkgs/top-level/aliases.nix index e50af1a6a24a..3df3d70f44c7 100644 --- a/pkgs/top-level/aliases.nix +++ b/pkgs/top-level/aliases.nix @@ -494,7 +494,7 @@ mapAliases { francis = kdePackages.francis; # added 2024-07-13 fritzprofiles = throw "fritzprofiles was removed from nixpkgs, because it was removed as dependency of home-assistant for which it was pacakged."; # added 2024-01-05 frostwire = throw "frostwire was removed, as it was broken due to reproducibility issues, use `frostwire-bin` package instead."; # added 2024-05-17 - fuse2fs = if stdenv.isLinux then e2fsprogs.fuse2fs else null; # Added 2022-03-27 preserve, reason: convenience, arch has a package named fuse2fs too. + fuse2fs = if stdenv.hostPlatform.isLinux then e2fsprogs.fuse2fs else null; # Added 2022-03-27 preserve, reason: convenience, arch has a package named fuse2fs too. futuresql = libsForQt5.futuresql; # added 2023-11-11 fx_cast_bridge = fx-cast-bridge; # added 2023-07-26 diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 09d644f76c64..7afe4acb5f0c 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -737,7 +737,7 @@ with pkgs; sea-orm-cli = callPackage ../development/tools/sea-orm-cli { }; vcpkg-tool = callPackage ../by-name/vc/vcpkg-tool/package.nix { - stdenv = if stdenv.isDarwin then overrideSDK stdenv "11.0" else stdenv; + stdenv = if stdenv.hostPlatform.isDarwin then overrideSDK stdenv "11.0" else stdenv; fmt = fmt_10; }; @@ -1118,7 +1118,7 @@ with pkgs; # So turn gssSupport off there, and on Windows. # On other platforms, keep the previous value. gssSupport = - if stdenv.isDarwin || stdenv.hostPlatform.isWindows + if stdenv.hostPlatform.isDarwin || stdenv.hostPlatform.isWindows then false else old.gssSupport or true; # `? true` is the default libkrb5 = buildPackages.krb5.override { @@ -2094,7 +2094,7 @@ with pkgs; guiSupport = true; sendEmailSupport = true; withSsh = true; - withLibsecret = !stdenv.isDarwin; + withLibsecret = !stdenv.hostPlatform.isDarwin; }; # Git with SVN support, but without GUI. @@ -2144,7 +2144,7 @@ with pkgs; delta = darwin.apple_sdk_11_0.callPackage ../applications/version-management/delta { }; debase = callPackage ../by-name/de/debase/package.nix { - stdenv = if stdenv.isDarwin then darwin.apple_sdk_11_0.stdenv else stdenv; + stdenv = if stdenv.hostPlatform.isDarwin then darwin.apple_sdk_11_0.stdenv else stdenv; }; diff-so-fancy = callPackage ../applications/version-management/diff-so-fancy { }; @@ -2313,7 +2313,7 @@ with pkgs; git-radar = callPackage ../applications/version-management/git-radar { }; git-recent = callPackage ../applications/version-management/git-recent { - util-linux = if stdenv.isLinux then util-linuxMinimal else util-linux; + util-linux = if stdenv.hostPlatform.isLinux then util-linuxMinimal else util-linux; }; git-relevant-history = callPackage ../applications/version-management/git-relevant-history { }; @@ -2547,7 +2547,7 @@ with pkgs; dosbox = callPackage ../applications/emulators/dosbox { inherit (darwin.apple_sdk.frameworks ) OpenGL; - SDL = if stdenv.isDarwin then SDL else SDL_compat; + SDL = if stdenv.hostPlatform.isDarwin then SDL else SDL_compat; }; dosbox-x = darwin.apple_sdk_11_0.callPackage ../applications/emulators/dosbox-x { @@ -2705,7 +2705,7 @@ with pkgs; ### APPLICATIONS/EMULATORS/DOLPHIN-EMU dolphin-emu = qt6Packages.callPackage ../applications/emulators/dolphin-emu { - stdenv = if stdenv.isDarwin then overrideSDK stdenv "11.0" else stdenv; + stdenv = if stdenv.hostPlatform.isDarwin then overrideSDK stdenv "11.0" else stdenv; inherit (darwin.apple_sdk_11_0.frameworks) CoreBluetooth ForceFeedback IOBluetooth IOKit OpenGL VideoToolbox; inherit (darwin) moltenvk; }; @@ -2843,7 +2843,7 @@ with pkgs; contour = qt6.callPackage ../applications/terminal-emulators/contour { inherit (darwin.apple_sdk_11_0.libs) utmp; inherit (darwin) sigtool; - stdenv = if stdenv.isDarwin then darwin.apple_sdk_11_0.stdenv else stdenv; + stdenv = if stdenv.hostPlatform.isDarwin then darwin.apple_sdk_11_0.stdenv else stdenv; catch2 = catch2_3; fmt = fmt_9; }; @@ -2863,7 +2863,7 @@ with pkgs; iterm2 = callPackage ../applications/terminal-emulators/iterm2 { }; kitty = darwin.apple_sdk_11_0.callPackage ../applications/terminal-emulators/kitty { - harfbuzz = harfbuzz.override { withCoreText = stdenv.isDarwin; }; + harfbuzz = harfbuzz.override { withCoreText = stdenv.hostPlatform.isDarwin; }; inherit (darwin.apple_sdk_11_0) Libsystem; inherit (darwin.apple_sdk_11_0.frameworks) Cocoa @@ -5348,7 +5348,7 @@ with pkgs; joystickwake = callPackage ../tools/games/joystickwake { }; juce = callPackage ../development/misc/juce { - stdenv = if stdenv.isDarwin then overrideSDK stdenv "11.0" else stdenv; + stdenv = if stdenv.hostPlatform.isDarwin then overrideSDK stdenv "11.0" else stdenv; }; jumppad = callPackage ../tools/virtualization/jumppad { }; @@ -6279,7 +6279,7 @@ with pkgs; cdrkit = callPackage ../tools/cd-dvd/cdrkit { }; cdrtools = callPackage ../tools/cd-dvd/cdrtools { - stdenv = if stdenv.isDarwin then llvmPackages_14.stdenv else stdenv; + stdenv = if stdenv.hostPlatform.isDarwin then llvmPackages_14.stdenv else stdenv; inherit (darwin.apple_sdk.frameworks) Carbon IOKit; }; @@ -6681,7 +6681,7 @@ with pkgs; ckb-next = libsForQt5.callPackage ../tools/misc/ckb-next { }; clamav = callPackage ../tools/security/clamav { - stdenv = if stdenv.isDarwin then overrideSDK stdenv "11.0" else stdenv; + stdenv = if stdenv.hostPlatform.isDarwin then overrideSDK stdenv "11.0" else stdenv; inherit (darwin.apple_sdk_11_0.frameworks) Foundation; }; @@ -7039,7 +7039,7 @@ with pkgs; dmd = callPackage ../by-name/dm/dmd/package.nix ({ inherit (darwin.apple_sdk.frameworks) Foundation; - } // lib.optionalAttrs stdenv.isLinux { + } // lib.optionalAttrs stdenv.hostPlatform.isLinux { # https://github.com/NixOS/nixpkgs/pull/206907#issuecomment-1527034123 stdenv = gcc11Stdenv; }); @@ -8062,12 +8062,12 @@ with pkgs; gnupg1 = gnupg1compat; # use config.packageOverrides if you prefer original gnupg1 gnupg22 = callPackage ../tools/security/gnupg/22.nix { - pinentry = if stdenv.isDarwin then pinentry_mac else pinentry-gtk2; + pinentry = if stdenv.hostPlatform.isDarwin then pinentry_mac else pinentry-gtk2; libgcrypt = libgcrypt_1_8; }; gnupg24 = callPackage ../tools/security/gnupg/24.nix { - pinentry = if stdenv.isDarwin then pinentry_mac else pinentry-gtk2; + pinentry = if stdenv.hostPlatform.isDarwin then pinentry_mac else pinentry-gtk2; }; gnupg = gnupg24; @@ -8460,7 +8460,7 @@ with pkgs; haste-server = callPackage ../servers/haste-server { }; hal-hardware-analyzer = libsForQt5.callPackage ../applications/science/electronics/hal-hardware-analyzer { - stdenv = if stdenv.isDarwin then darwin.apple_sdk_11_0.stdenv else stdenv; + stdenv = if stdenv.hostPlatform.isDarwin then darwin.apple_sdk_11_0.stdenv else stdenv; }; half = callPackage ../development/libraries/half { }; @@ -8952,7 +8952,7 @@ with pkgs; go-jira = callPackage ../applications/misc/go-jira { }; jogl = callPackage ../by-name/jo/jogl/package.nix { - stdenv = if stdenv.isDarwin && stdenv.isx86_64 then overrideSDK stdenv "11.0" else stdenv; + stdenv = if stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isx86_64 then overrideSDK stdenv "11.0" else stdenv; }; john = callPackage ../tools/security/john { }; @@ -9240,7 +9240,7 @@ with pkgs; libcryptui = callPackage ../development/libraries/libcryptui { autoreconfHook = buildPackages.autoreconfHook269; - gtk3 = if stdenv.isDarwin then gtk3-x11 else gtk3; + gtk3 = if stdenv.hostPlatform.isDarwin then gtk3-x11 else gtk3; }; libshumate = callPackage ../development/libraries/libshumate { }; @@ -9552,7 +9552,7 @@ with pkgs; protobuf = protobuf_21; }; netdataCloud = netdata.override { - withCloud = !stdenv.isDarwin; + withCloud = !stdenv.hostPlatform.isDarwin; withCloudUi = true; }; @@ -10013,7 +10013,7 @@ with pkgs; bubblemail = callPackage ../applications/networking/mailreaders/bubblemail { }; mailpit = callPackage ../servers/mail/mailpit { - libtool = if stdenv.isDarwin then cctools else libtool; + libtool = if stdenv.hostPlatform.isDarwin then cctools else libtool; }; mailsend = callPackage ../tools/networking/mailsend { }; @@ -11049,7 +11049,7 @@ with pkgs; page = callPackage ../tools/misc/page { }; pageedit = libsForQt5.callPackage ../applications/office/PageEdit { - stdenv = if stdenv.isDarwin then darwin.apple_sdk_11_0.stdenv else stdenv; + stdenv = if stdenv.hostPlatform.isDarwin then darwin.apple_sdk_11_0.stdenv else stdenv; }; pagefind = libsForQt5.callPackage ../applications/misc/pagefind { }; @@ -11328,7 +11328,7 @@ with pkgs; }; platformioPackages = dontRecurseIntoAttrs (callPackage ../development/embedded/platformio { }); - platformio = if stdenv.isLinux then platformioPackages.platformio-chrootenv else platformioPackages.platformio-core; + platformio = if stdenv.hostPlatform.isLinux then platformioPackages.platformio-chrootenv else platformioPackages.platformio-core; platformio-core = platformioPackages.platformio-core; platinum-searcher = callPackage ../tools/text/platinum-searcher { }; @@ -11505,7 +11505,7 @@ with pkgs; proxmark3 = libsForQt5.callPackage ../tools/security/proxmark3/default.nix { inherit (darwin.apple_sdk_11_0.frameworks) Foundation AppKit; - stdenv = if stdenv.isDarwin then darwin.apple_sdk_11_0.stdenv else stdenv; + stdenv = if stdenv.hostPlatform.isDarwin then darwin.apple_sdk_11_0.stdenv else stdenv; }; proxychains = callPackage ../tools/networking/proxychains { }; @@ -11710,7 +11710,7 @@ with pkgs; qovery-cli = callPackage ../tools/admin/qovery-cli { }; qownnotes = qt6Packages.callPackage ../applications/office/qownnotes { - stdenv = if stdenv.isDarwin then darwin.apple_sdk_11_0.stdenv else stdenv; + stdenv = if stdenv.hostPlatform.isDarwin then darwin.apple_sdk_11_0.stdenv else stdenv; }; qpdf = callPackage ../development/libraries/qpdf { }; @@ -11741,7 +11741,7 @@ with pkgs; raider = callPackage ../applications/misc/raider { }; - quota = if stdenv.isLinux then linuxquota else unixtools.quota; + quota = if stdenv.hostPlatform.isLinux then linuxquota else unixtools.quota; qvge = libsForQt5.callPackage ../applications/graphics/qvge { }; @@ -12455,7 +12455,7 @@ with pkgs; snapcast = darwin.apple_sdk_11_0.callPackage ../applications/audio/snapcast { inherit (darwin.apple_sdk_11_0.frameworks) IOKit AudioToolbox; - pulseaudioSupport = config.pulseaudio or stdenv.isLinux; + pulseaudioSupport = config.pulseaudio or stdenv.hostPlatform.isLinux; }; snapdragon-profiler = callPackage ../tools/graphics/snapdragon-profiler { }; @@ -12469,7 +12469,7 @@ with pkgs; snort = callPackage ../applications/networking/ids/snort { }; soapui = callPackage ../applications/networking/soapui { - jdk = if stdenv.isDarwin + jdk = if stdenv.hostPlatform.isDarwin then (jdk11.override { enableJavaFX = true; }) else jdk11; }; @@ -12911,7 +12911,7 @@ with pkgs; tewisay = callPackage ../tools/misc/tewisay { }; texmacs = libsForQt5.callPackage ../applications/editors/texmacs { - stdenv = if stdenv.isDarwin then darwin.apple_sdk_11_0.stdenv else stdenv; + stdenv = if stdenv.hostPlatform.isDarwin then darwin.apple_sdk_11_0.stdenv else stdenv; extraFonts = true; }; @@ -13602,7 +13602,7 @@ with pkgs; wasm-tools = callPackage ../tools/misc/wasm-tools { }; wasmedge = callPackage ../development/tools/wasmedge { - stdenv = if stdenv.isDarwin then overrideSDK stdenv "11.0" else llvmPackages.stdenv; + stdenv = if stdenv.hostPlatform.isDarwin then overrideSDK stdenv "11.0" else llvmPackages.stdenv; inherit (darwin.apple_sdk_11_0.frameworks) Foundation; }; @@ -14569,7 +14569,7 @@ with pkgs; #Use this instead of stdenv to build with clang clangStdenv = if stdenv.cc.isClang then stdenv else lowPrio llvmPackages.stdenv; clang-sierraHack-stdenv = overrideCC stdenv buildPackages.clang-sierraHack; - libcxxStdenv = if stdenv.isDarwin then stdenv else lowPrio llvmPackages.libcxxStdenv; + libcxxStdenv = if stdenv.hostPlatform.isDarwin then stdenv else lowPrio llvmPackages.libcxxStdenv; clean = callPackage ../development/compilers/clean { }; @@ -14658,7 +14658,7 @@ with pkgs; apache-flex-sdk = callPackage ../development/compilers/apache-flex-sdk { }; fasm = pkgsi686Linux.callPackage ../development/compilers/fasm { - inherit (stdenv) isx86_64; + inherit (stdenv.hostPlatform) isx86_64; }; fasm-bin = callPackage ../development/compilers/fasm/bin.nix { }; @@ -14811,7 +14811,7 @@ with pkgs; reproducibleBuild = true; profiledCompiler = false; - isl = if !stdenv.isDarwin then isl_0_20 else null; + isl = if !stdenv.hostPlatform.isDarwin then isl_0_20 else null; withoutTargetLibc = true; langCC = false; @@ -15725,7 +15725,7 @@ with pkgs; }; cargo-codspeed = callPackage ../development/tools/rust/cargo-codspeed { rustPlatform = makeRustPlatform { - stdenv = if stdenv.isDarwin then overrideSDK stdenv "11.0" else stdenv; + stdenv = if stdenv.hostPlatform.isDarwin then overrideSDK stdenv "11.0" else stdenv; inherit rustc cargo; }; }; @@ -17202,7 +17202,7 @@ with pkgs; inherit (darwin.apple_sdk_11_0.frameworks) CoreFoundation CoreServices Foundation; buildJdk = jdk11_headless; runJdk = jdk11_headless; - stdenv = if stdenv.isDarwin then darwin.apple_sdk_11_0.stdenv + stdenv = if stdenv.hostPlatform.isDarwin then darwin.apple_sdk_11_0.stdenv else if stdenv.cc.isClang then llvmPackages.stdenv else if stdenv.cc.isGNU then gcc12Stdenv else stdenv; @@ -17214,7 +17214,7 @@ with pkgs; inherit (darwin.apple_sdk_11_0.frameworks) CoreFoundation CoreServices Foundation IOKit; buildJdk = jdk17_headless; runJdk = jdk17_headless; - stdenv = if stdenv.isDarwin then darwin.apple_sdk_11_0.stdenv + stdenv = if stdenv.hostPlatform.isDarwin then darwin.apple_sdk_11_0.stdenv else if stdenv.cc.isClang then llvmPackages.stdenv else stdenv; bazel_self = bazel_7; @@ -17663,7 +17663,7 @@ with pkgs; wrapCC (distcc.links extraConfig)) { }; distccStdenv = lowPrio (overrideCC stdenv buildPackages.distccWrapper); - distccMasquerade = if stdenv.isDarwin + distccMasquerade = if stdenv.hostPlatform.isDarwin then null else callPackage ../development/tools/misc/distcc/masq.nix { gccRaw = gcc.cc; @@ -18221,7 +18221,7 @@ with pkgs; modd = callPackage ../development/tools/modd { }; mold = callPackage ../by-name/mo/mold/package.nix { - stdenv = if stdenv.isDarwin then overrideSDK stdenv "11.0" else stdenv; + stdenv = if stdenv.hostPlatform.isDarwin then overrideSDK stdenv "11.0" else stdenv; tbb = tbb_2021_11; }; @@ -18722,7 +18722,7 @@ with pkgs; c2ffi = callPackage ../development/tools/misc/c2ffi { }; c0 = callPackage ../development/compilers/c0 { - stdenv = if stdenv.isDarwin then gccStdenv else stdenv; + stdenv = if stdenv.hostPlatform.isDarwin then gccStdenv else stdenv; }; c3c = callPackage ../development/compilers/c3c { }; @@ -18981,25 +18981,25 @@ with pkgs; abseil-cpp_202103 = callPackage ../development/libraries/abseil-cpp/202103.nix { # If abseil-cpp doesn’t have a deployment target of 10.13+, arrow-cpp crashes in libgrpc.dylib. - stdenv = if stdenv.isDarwin && stdenv.isx86_64 + stdenv = if stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isx86_64 then overrideSDK stdenv { darwinMinVersion = "10.13"; } else stdenv; }; abseil-cpp_202301 = callPackage ../development/libraries/abseil-cpp/202301.nix { # If abseil-cpp doesn’t have a deployment target of 10.13+, arrow-cpp crashes in libgrpc.dylib. - stdenv = if stdenv.isDarwin && stdenv.isx86_64 + stdenv = if stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isx86_64 then overrideSDK stdenv { darwinMinVersion = "10.13"; } else stdenv; }; abseil-cpp_202401 = callPackage ../development/libraries/abseil-cpp/202401.nix { # If abseil-cpp doesn’t have a deployment target of 10.13+, arrow-cpp crashes in libgrpc.dylib. - stdenv = if stdenv.isDarwin && stdenv.isx86_64 + stdenv = if stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isx86_64 then overrideSDK stdenv { darwinMinVersion = "10.13"; } else stdenv; }; abseil-cpp_202407 = callPackage ../development/libraries/abseil-cpp/202407.nix { # If abseil-cpp doesn’t have a deployment target of 10.13+, arrow-cpp crashes in libgrpc.dylib. - stdenv = if stdenv.isDarwin && stdenv.isx86_64 + stdenv = if stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isx86_64 then overrideSDK stdenv { darwinMinVersion = "10.13"; } else stdenv; }; @@ -19448,7 +19448,7 @@ with pkgs; ustream-ssl-mbedtls = callPackage ../development/libraries/ustream-ssl { ssl_implementation = mbedtls_2; - stdenv = if stdenv.isDarwin then overrideSDK stdenv "11.0" else stdenv; + stdenv = if stdenv.hostPlatform.isDarwin then overrideSDK stdenv "11.0" else stdenv; }; uri = callPackage ../development/libraries/uri { }; @@ -19581,7 +19581,7 @@ with pkgs; eccodes = callPackage ../development/libraries/eccodes { pythonPackages = python3Packages; - stdenv = if stdenv.isDarwin then gccStdenv else stdenv; + stdenv = if stdenv.hostPlatform.isDarwin then gccStdenv else stdenv; }; eclib = callPackage ../development/libraries/eclib { }; @@ -19930,7 +19930,7 @@ with pkgs; ghcid = haskellPackages.ghcid.bin; gr-framework = callPackage ../by-name/gr/gr-framework/package.nix { - stdenv = if stdenv.isDarwin then darwin.apple_sdk_11_0.stdenv else stdenv; + stdenv = if stdenv.hostPlatform.isDarwin then darwin.apple_sdk_11_0.stdenv else stdenv; }; graphia = qt6Packages.callPackage ../applications/science/misc/graphia { }; @@ -20143,7 +20143,7 @@ with pkgs; grilo-plugins = callPackage ../development/libraries/grilo-plugins { }; grpc = darwin.apple_sdk_11_0.callPackage ../development/libraries/grpc { - stdenv = if stdenv.isDarwin && stdenv.isx86_64 + stdenv = if stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isx86_64 then overrideSDK darwin.apple_sdk_11_0.stdenv { darwinMinVersion = "10.13"; } else stdenv; }; @@ -20251,7 +20251,7 @@ with pkgs; }; pango = callPackage ../development/libraries/pango { - harfbuzz = harfbuzz.override { withCoreText = stdenv.isDarwin; }; + harfbuzz = harfbuzz.override { withCoreText = stdenv.hostPlatform.isDarwin; }; }; pangolin = callPackage ../development/libraries/pangolin { @@ -20380,7 +20380,7 @@ with pkgs; }; harfbuzzFull = harfbuzz.override { - withCoreText = stdenv.isDarwin; + withCoreText = stdenv.hostPlatform.isDarwin; withGraphite2 = true; withIcu = true; }; @@ -20489,7 +20489,7 @@ with pkgs; ilmbase = callPackage ../development/libraries/ilmbase { }; imgui = callPackage ../development/libraries/imgui { - stdenv = if stdenv.isDarwin then overrideSDK stdenv "11.0" else stdenv; + stdenv = if stdenv.hostPlatform.isDarwin then overrideSDK stdenv "11.0" else stdenv; }; imtui = callPackage ../development/libraries/imtui { }; @@ -20504,8 +20504,8 @@ with pkgs; imlib2Full = imlib2.override { # Compilation error on Darwin with librsvg. For more information see: # https://github.com/NixOS/nixpkgs/pull/166452#issuecomment-1090725613 - svgSupport = !stdenv.isDarwin; - heifSupport = !stdenv.isDarwin; + svgSupport = !stdenv.hostPlatform.isDarwin; + heifSupport = !stdenv.hostPlatform.isDarwin; webpSupport = true; jxlSupport = true; psSupport = true; @@ -20549,7 +20549,7 @@ with pkgs; ip2location-c = callPackage ../development/libraries/ip2location-c { }; - irrlicht = if !stdenv.isDarwin then + irrlicht = if !stdenv.hostPlatform.isDarwin then callPackage ../development/libraries/irrlicht { } else callPackage ../development/libraries/irrlicht/mac.nix { inherit (darwin.apple_sdk.frameworks) Cocoa OpenGL IOKit; @@ -20644,7 +20644,7 @@ with pkgs; libjodycode = callPackage ../development/libraries/libjodycode { # missing aligned_alloc() - stdenv = if stdenv.isDarwin then darwin.apple_sdk_11_0.stdenv else stdenv; + stdenv = if stdenv.hostPlatform.isDarwin then darwin.apple_sdk_11_0.stdenv else stdenv; }; libb64 = callPackage ../development/libraries/libb64 { }; @@ -20661,7 +20661,7 @@ with pkgs; }; keybinder3 = callPackage ../development/libraries/keybinder3 { - gtk3 = if stdenv.isDarwin then gtk3-x11 else gtk3; + gtk3 = if stdenv.hostPlatform.isDarwin then gtk3-x11 else gtk3; automake = automake111x; }; @@ -21205,7 +21205,7 @@ with pkgs; libfabric = callPackage ../development/libraries/libfabric { }; libfive = libsForQt5.callPackage ../development/libraries/libfive { - stdenv = if stdenv.isDarwin then overrideSDK stdenv "11.0" else stdenv; + stdenv = if stdenv.hostPlatform.isDarwin then overrideSDK stdenv "11.0" else stdenv; python = python3; }; @@ -21926,7 +21926,7 @@ with pkgs; }; libunwind = - if stdenv.isDarwin then darwin.libunwind + if stdenv.hostPlatform.isDarwin then darwin.libunwind else if stdenv.hostPlatform.system == "riscv32-linux" then llvmPackages.libunwind else callPackage ../development/libraries/libunwind { }; @@ -22275,7 +22275,7 @@ with pkgs; else freeglut; - mesa = if stdenv.isDarwin + mesa = if stdenv.hostPlatform.isDarwin then darwin.apple_sdk_11_0.callPackage ../development/libraries/mesa/darwin.nix { inherit (darwin.apple_sdk_11_0.libs) Xplugin; } @@ -22322,7 +22322,7 @@ with pkgs; minizip-ng = callPackage ../development/libraries/minizip-ng { }; mkvtoolnix = qt6Packages.callPackage ../applications/video/mkvtoolnix { - stdenv = if stdenv.isDarwin then darwin.apple_sdk_11_0.stdenv else stdenv; + stdenv = if stdenv.hostPlatform.isDarwin then darwin.apple_sdk_11_0.stdenv else stdenv; }; mkvtoolnix-cli = mkvtoolnix.override { @@ -22724,7 +22724,7 @@ with pkgs; pcg_c = callPackage ../development/libraries/pcg-c { }; pcl = libsForQt5.callPackage ../development/libraries/pcl { - stdenv = if stdenv.isDarwin then darwin.apple_sdk_11_0.stdenv else stdenv; + stdenv = if stdenv.hostPlatform.isDarwin then darwin.apple_sdk_11_0.stdenv else stdenv; inherit (darwin.apple_sdk_11_0.frameworks) Cocoa AGL OpenGL; }; @@ -22911,7 +22911,7 @@ with pkgs; darwin; inherit (__splicedPackages.gst_all_1) gstreamer gst-plugins-base; inherit config; - stdenv = if stdenv.isDarwin then overrideSDK stdenv "11.0" else stdenv; + stdenv = if stdenv.hostPlatform.isDarwin then overrideSDK stdenv "11.0" else stdenv; }); libsForQt5 = (recurseIntoAttrs (import ./qt5-packages.nix { @@ -22928,7 +22928,7 @@ with pkgs; qt6Packages = recurseIntoAttrs (import ./qt6-packages.nix { inherit lib __splicedPackages makeScopeWithSplicing' generateSplicesForMkScope pkgsHostTarget kdePackages; - stdenv = if stdenv.isDarwin then darwin.apple_sdk_11_0.stdenv else stdenv; + stdenv = if stdenv.hostPlatform.isDarwin then darwin.apple_sdk_11_0.stdenv else stdenv; }); quark-engine = callPackage ../tools/security/quark-engine { }; @@ -23633,7 +23633,7 @@ with pkgs; ucommon = callPackage ../development/libraries/ucommon { }; v8 = callPackage ../development/libraries/v8 { - stdenv = if stdenv.isDarwin then overrideSDK stdenv "11.0" else stdenv; + stdenv = if stdenv.hostPlatform.isDarwin then overrideSDK stdenv "11.0" else stdenv; }; intel-vaapi-driver = callPackage ../development/libraries/intel-vaapi-driver { }; @@ -24458,7 +24458,7 @@ with pkgs; directx-shader-compiler = callPackage ../tools/graphics/directx-shader-compiler { # https://github.com/NixOS/nixpkgs/issues/216294 - stdenv = if stdenv.cc.isGNU && stdenv.isi686 then gcc11Stdenv else stdenv; + stdenv = if stdenv.cc.isGNU && stdenv.hostPlatform.isi686 then gcc11Stdenv else stdenv; }; dkimproxy = callPackage ../servers/mail/dkimproxy { }; @@ -25051,7 +25051,7 @@ with pkgs; sasl = cyrus_sasl; boost = boost178.override { enableShared = false; }; inherit (darwin.apple_sdk.frameworks) CoreFoundation Security; - stdenv = if stdenv.isDarwin then + stdenv = if stdenv.hostPlatform.isDarwin then darwin.apple_sdk_11_0.stdenv.override (old: { hostPlatform = old.hostPlatform // { darwinMinVersion = "10.14"; }; buildPlatform = old.buildPlatform // { darwinMinVersion = "10.14"; }; @@ -25159,7 +25159,7 @@ with pkgs; httpSupport = true; tpmSupport = true; tlsSupport = true; - msVarsTemplate = stdenv.isx86_64 || stdenv.isAarch64; + msVarsTemplate = stdenv.hostPlatform.isx86_64 || stdenv.hostPlatform.isAarch64; }; ops = callPackage ../applications/virtualization/ops { }; @@ -25426,7 +25426,7 @@ with pkgs; check-wmiplus = callPackage ../servers/monitoring/plugins/wmiplus { }; shishi = callPackage ../servers/shishi { - pam = if stdenv.isLinux then pam else null; + pam = if stdenv.hostPlatform.isLinux then pam else null; # see also openssl, which has/had this same trick }; @@ -25580,8 +25580,8 @@ with pkgs; inherit (darwin.apple_sdk.frameworks) ApplicationServices Carbon Cocoa; inherit (darwin.apple_sdk.libs) Xplugin; inherit (buildPackages.darwin) bootstrap_cmds; - udev = if stdenv.isLinux then udev else null; - libdrm = if stdenv.isLinux then libdrm else null; + udev = if stdenv.hostPlatform.isLinux then udev else null; + libdrm = if stdenv.hostPlatform.isLinux then libdrm else null; }; generatedPackages = lib.callPackageWith __splicedPackages ../servers/x11/xorg/default.nix { }; @@ -25853,7 +25853,7 @@ with pkgs; libossp_uuid = callPackage ../development/libraries/libossp-uuid { }; - libuuid = if stdenv.isLinux + libuuid = if stdenv.hostPlatform.isLinux then util-linuxMinimal else null; @@ -25899,7 +25899,7 @@ with pkgs; util-linux = util-linuxMinimal; }); fuse = fuse2; - fuse2 = lowPrio (if stdenv.isDarwin then macfuse-stubs else fusePackages.fuse_2); + fuse2 = lowPrio (if stdenv.hostPlatform.isDarwin then macfuse-stubs else fusePackages.fuse_2); fuse3 = fusePackages.fuse_3; fuse-common = hiPrio fusePackages.fuse_3.common; @@ -26341,7 +26341,7 @@ with pkgs; inherit (darwin.apple_sdk_11_0.frameworks) IOKit CoreFoundation Foundation; }); - nettools = if stdenv.isLinux + nettools = if stdenv.hostPlatform.isLinux then callPackage ../os-specific/linux/net-tools { } else unixtools.nettools; @@ -26505,7 +26505,7 @@ with pkgs; pagemon = callPackage ../os-specific/linux/pagemon { }; - pam = if stdenv.isLinux then linux-pam else openpam; + pam = if stdenv.hostPlatform.isLinux then linux-pam else openpam; # pam_bioapi ( see http://www.thinkwiki.org/wiki/How_to_enable_the_fingerprint_reader ) @@ -26579,7 +26579,7 @@ with pkgs; pps-tools = callPackage ../os-specific/linux/pps-tools { }; - procps = if stdenv.isLinux + procps = if stdenv.hostPlatform.isLinux then callPackage ../os-specific/linux/procps-ng { } else unixtools.procps; @@ -26669,7 +26669,7 @@ with pkgs; sdparm = callPackage ../os-specific/linux/sdparm { }; sdrangel = libsForQt5.callPackage ../applications/radio/sdrangel { - stdenv = if stdenv.isDarwin then overrideSDK stdenv "11.0" else stdenv; + stdenv = if stdenv.hostPlatform.isDarwin then overrideSDK stdenv "11.0" else stdenv; }; setools = callPackage ../os-specific/linux/setools { }; @@ -28228,7 +28228,7 @@ with pkgs; dcw-gmt = callPackage ../applications/gis/gmt/dcw.nix { }; grass = callPackage ../applications/gis/grass { - stdenv = if stdenv.isDarwin then overrideSDK stdenv "11.0" else stdenv; + stdenv = if stdenv.hostPlatform.isDarwin then overrideSDK stdenv "11.0" else stdenv; }; qgis-ltr = callPackage ../applications/gis/qgis/ltr.nix { }; @@ -28966,7 +28966,7 @@ with pkgs; darktable = callPackage ../by-name/da/darktable/package.nix { lua = lua5_4; pugixml = pugixml.override { shared = true; }; - stdenv = if stdenv.isDarwin && stdenv.isx86_64 then overrideSDK llvmPackages_18.stdenv { darwinMinVersion = "10.14"; darwinSdkVersion = "11.0"; } else stdenv; + stdenv = if stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isx86_64 then overrideSDK llvmPackages_18.stdenv { darwinMinVersion = "10.14"; darwinSdkVersion = "11.0"; } else stdenv; }; das_watchdog = callPackage ../tools/system/das_watchdog { }; @@ -29327,7 +29327,7 @@ with pkgs; keepassxc = libsForQt5.callPackage ../applications/misc/keepassxc { inherit (darwin.apple_sdk_11_0.frameworks) LocalAuthentication; - stdenv = if stdenv.isDarwin then darwin.apple_sdk_11_0.stdenv else stdenv; + stdenv = if stdenv.hostPlatform.isDarwin then darwin.apple_sdk_11_0.stdenv else stdenv; }; keepass-diff = callPackage ../applications/misc/keepass-diff { }; @@ -29540,7 +29540,7 @@ with pkgs; inherit (darwin.apple_sdk.frameworks) CoreAudio; python = python311; volk = volk_2; - } // lib.optionalAttrs stdenv.isLinux { + } // lib.optionalAttrs stdenv.hostPlatform.isLinux { stdenv = pkgs.stdenvAdapters.useLibsFrom stdenv pkgs.gcc12Stdenv; }); }; @@ -29658,7 +29658,7 @@ with pkgs; wireshark = qt6Packages.callPackage ../applications/networking/sniffers/wireshark { inherit (darwin.apple_sdk_11_0.frameworks) ApplicationServices SystemConfiguration; - libpcap = libpcap.override { withBluez = stdenv.isLinux; }; + libpcap = libpcap.override { withBluez = stdenv.hostPlatform.isLinux; }; }; wireshark-qt = wireshark; @@ -29667,7 +29667,7 @@ with pkgs; tshark = wireshark-cli; wireshark-cli = wireshark.override { withQt = false; - libpcap = libpcap.override { withBluez = stdenv.isLinux; }; + libpcap = libpcap.override { withBluez = stdenv.hostPlatform.isLinux; }; }; sngrep = callPackage ../applications/networking/sniffers/sngrep { }; @@ -29837,7 +29837,7 @@ with pkgs; inherit (gst_all_1) gstreamer gst-plugins-base gst-plugins-good; }; freerdp3 = callPackage ../applications/networking/remote/freerdp/3.nix { - stdenv = if stdenv.isDarwin then overrideSDK stdenv "11.0" else stdenv; + stdenv = if stdenv.hostPlatform.isDarwin then overrideSDK stdenv "11.0" else stdenv; inherit (darwin.apple_sdk.frameworks) AudioToolbox AVFoundation Carbon Cocoa CoreMedia; }; }) @@ -29925,9 +29925,9 @@ with pkgs; lemonade = callPackage ../applications/misc/lemonade { }; librespot = callPackage ../applications/audio/librespot { - withALSA = stdenv.isLinux; - withPulseAudio = config.pulseaudio or stdenv.isLinux; - withPortAudio = stdenv.isDarwin; + withALSA = stdenv.hostPlatform.isLinux; + withPulseAudio = config.pulseaudio or stdenv.hostPlatform.isLinux; + withPortAudio = stdenv.hostPlatform.isDarwin; }; limesctl = callPackage ../applications/misc/limesctl { }; @@ -30359,7 +30359,7 @@ with pkgs; waylevel = callPackage ../tools/misc/waylevel { }; i3 = callPackage ../applications/window-managers/i3 { - xcb-util-cursor = if stdenv.isDarwin then xcb-util-cursor-HEAD else xcb-util-cursor; + xcb-util-cursor = if stdenv.hostPlatform.isDarwin then xcb-util-cursor-HEAD else xcb-util-cursor; }; i3-auto-layout = callPackage ../applications/window-managers/i3/auto-layout.nix { }; @@ -30763,7 +30763,7 @@ with pkgs; kondo = callPackage ../applications/misc/kondo { }; kotatogram-desktop = kdePackages.callPackage ../applications/networking/instant-messengers/telegram/kotatogram-desktop { - stdenv = if stdenv.isDarwin + stdenv = if stdenv.hostPlatform.isDarwin then overrideSDK stdenv "11.0" else stdenv; }; @@ -30949,7 +30949,7 @@ with pkgs; ladspa-sdk = callPackage ../applications/audio/ladspa-sdk { }; ladybird = callPackage ../applications/networking/browsers/ladybird { - stdenv = if stdenv.isDarwin then overrideSDK stdenv "11.0" else stdenv; + stdenv = if stdenv.hostPlatform.isDarwin then overrideSDK stdenv "11.0" else stdenv; inherit (darwin.apple_sdk_11_0.frameworks) AppKit Cocoa Foundation OpenGL; }; @@ -31535,7 +31535,7 @@ with pkgs; } // (config.mplayer or {})); mpv-unwrapped = darwin.apple_sdk_11_0.callPackage ../applications/video/mpv { - stdenv = if stdenv.isDarwin then swiftPackages.stdenv else stdenv; + stdenv = if stdenv.hostPlatform.isDarwin then swiftPackages.stdenv else stdenv; inherit lua; }; @@ -31879,10 +31879,10 @@ with pkgs; ncspot = callPackage ../applications/audio/ncspot { inherit (darwin.apple_sdk.frameworks) Cocoa; - withALSA = stdenv.isLinux; - withPulseAudio = config.pulseaudio or stdenv.isLinux; - withPortAudio = stdenv.isDarwin; - withMPRIS = stdenv.isLinux; + withALSA = stdenv.hostPlatform.isLinux; + withPulseAudio = config.pulseaudio or stdenv.hostPlatform.isLinux; + withPortAudio = stdenv.hostPlatform.isDarwin; + withMPRIS = stdenv.hostPlatform.isLinux; }; ncview = callPackage ../tools/X11/ncview { } ; @@ -32189,7 +32189,7 @@ with pkgs; phantomsocks = callPackage ../tools/networking/phantomsocks { }; photoqt = callPackage ../by-name/ph/photoqt/package.nix { - stdenv = if stdenv.isDarwin then overrideSDK stdenv "11.0" else stdenv; + stdenv = if stdenv.hostPlatform.isDarwin then overrideSDK stdenv "11.0" else stdenv; }; photoflare = libsForQt5.callPackage ../applications/graphics/photoflare { }; @@ -32453,7 +32453,7 @@ with pkgs; quantomatic = callPackage ../applications/science/physics/quantomatic { }; quassel = libsForQt5.callPackage ../applications/networking/irc/quassel { - stdenv = if stdenv.isDarwin then darwin.apple_sdk_11_0.stdenv else stdenv; + stdenv = if stdenv.hostPlatform.isDarwin then darwin.apple_sdk_11_0.stdenv else stdenv; }; quasselClient = quassel.override { @@ -32603,7 +32603,7 @@ with pkgs; ries = callPackage ../applications/science/math/ries { }; - ripcord = if stdenv.isLinux then + ripcord = if stdenv.hostPlatform.isLinux then qt5.callPackage ../applications/networking/instant-messengers/ripcord { } else callPackage ../applications/networking/instant-messengers/ripcord/darwin.nix { }; @@ -32910,7 +32910,7 @@ with pkgs; # Build with clang even on Linux, because GCC uses absolutely obscene amounts of memory # on this particular code base (OOM with 32GB memory and --cores 16 on GCC, succeeds # with --cores 32 on clang). - stdenv = if stdenv.isDarwin then overrideSDK llvmPackages.stdenv "11.0" else llvmPackages.stdenv; + stdenv = if stdenv.hostPlatform.isDarwin then overrideSDK llvmPackages.stdenv "11.0" else llvmPackages.stdenv; }; super-slicer = darwin.apple_sdk_11_0.callPackage ../applications/misc/prusa-slicer/super-slicer.nix { }; @@ -33095,7 +33095,7 @@ with pkgs; }; synergy = libsForQt5.callPackage ../applications/misc/synergy { - stdenv = if stdenv.isDarwin then darwin.apple_sdk_11_0.stdenv else stdenv; + stdenv = if stdenv.hostPlatform.isDarwin then darwin.apple_sdk_11_0.stdenv else stdenv; inherit (darwin.apple_sdk_11_0.frameworks) ApplicationServices Carbon Cocoa CoreServices ScreenSaver UserNotifications; }; @@ -33160,7 +33160,7 @@ with pkgs; taskopen = callPackage ../applications/misc/taskopen { }; telegram-desktop = qt6Packages.callPackage ../applications/networking/instant-messengers/telegram/telegram-desktop { - stdenv = if stdenv.isDarwin + stdenv = if stdenv.hostPlatform.isDarwin then overrideSDK stdenv "11.0" else stdenv; }; @@ -33477,7 +33477,7 @@ with pkgs; ueberzug = with python3Packages; toPythonApplication ueberzug; ueberzugpp = callPackage ../by-name/ue/ueberzugpp/package.nix { - stdenv = if stdenv.isDarwin then overrideSDK stdenv "11.0" else stdenv; + stdenv = if stdenv.hostPlatform.isDarwin then overrideSDK stdenv "11.0" else stdenv; }; uefi-run = callPackage ../tools/virtualization/uefi-run { }; @@ -33887,7 +33887,7 @@ with pkgs; }; chatterino2 = callPackage ../applications/networking/instant-messengers/chatterino2 { - stdenv = if stdenv.isDarwin then darwin.apple_sdk_11_0.stdenv else stdenv; + stdenv = if stdenv.hostPlatform.isDarwin then darwin.apple_sdk_11_0.stdenv else stdenv; }; weston = callPackage ../applications/window-managers/weston { }; @@ -34109,7 +34109,7 @@ with pkgs; }; xpdf = libsForQt5.callPackage ../applications/misc/xpdf { - stdenv = if stdenv.isDarwin then darwin.apple_sdk_11_0.stdenv else stdenv; + stdenv = if stdenv.hostPlatform.isDarwin then darwin.apple_sdk_11_0.stdenv else stdenv; }; xplugd = callPackage ../tools/X11/xplugd { }; @@ -34361,7 +34361,7 @@ with pkgs; balanceofsatoshis = callPackage ../tools/misc/balanceofsatoshis { }; bitcoin = libsForQt5.callPackage ../applications/blockchains/bitcoin { - stdenv = if stdenv.isDarwin then darwin.apple_sdk_11_0.stdenv else stdenv; + stdenv = if stdenv.hostPlatform.isDarwin then darwin.apple_sdk_11_0.stdenv else stdenv; withGui = true; inherit (darwin) autoSignDarwinBinariesHook; }; @@ -34672,7 +34672,7 @@ with pkgs; keeperrl = callPackage ../games/keeperrl { }; shipwright = callPackage ../games/shipwright { - stdenv = if stdenv.isDarwin then overrideSDK stdenv "11.0" else stdenv; + stdenv = if stdenv.hostPlatform.isDarwin then overrideSDK stdenv "11.0" else stdenv; }; wipeout-rewrite = callPackage ../games/wipeout-rewrite { @@ -34874,7 +34874,7 @@ with pkgs; bsdgames = callPackage ../games/bsdgames { }; bugdom = callPackage ../games/bugdom { - stdenv = if stdenv.isDarwin then overrideSDK stdenv "11.0" else stdenv; + stdenv = if stdenv.hostPlatform.isDarwin then overrideSDK stdenv "11.0" else stdenv; inherit (darwin.apple_sdk_11_0.frameworks) IOKit Foundation OpenGL; }; @@ -35326,7 +35326,7 @@ with pkgs; mudlet = libsForQt5.callPackage ../games/mudlet { lua = lua5_1; - stdenv = if stdenv.isDarwin then darwin.apple_sdk_11_0.stdenv else stdenv; + stdenv = if stdenv.hostPlatform.isDarwin then darwin.apple_sdk_11_0.stdenv else stdenv; inherit (darwin.apple_sdk_11_0.frameworks) AppKit; }; @@ -36539,7 +36539,7 @@ with pkgs; or-tools = callPackage ../development/libraries/science/math/or-tools { inherit (darwin) DarwinTools; - stdenv = if stdenv.isDarwin then overrideSDK stdenv "11.0" else stdenv; + stdenv = if stdenv.hostPlatform.isDarwin then overrideSDK stdenv "11.0" else stdenv; python = python3; protobuf = protobuf_23; # or-tools builds with -std=c++20, so abseil-cpp must @@ -38121,7 +38121,7 @@ with pkgs; pwntools = with python3Packages; toPythonApplication pwntools; putty = callPackage ../applications/networking/remote/putty { - gtk3 = if stdenv.isDarwin then gtk3-x11 else gtk3; + gtk3 = if stdenv.hostPlatform.isDarwin then gtk3-x11 else gtk3; }; qMasterPassword = qt6Packages.callPackage ../applications/misc/qMasterPassword { }; @@ -38572,7 +38572,7 @@ with pkgs; winePackagesFor = wineBuild: lib.makeExtensible (self: with self; { callPackage = newScope self; stdenv = - if pkgs.stdenv.isDarwin then + if pkgs.stdenv.hostPlatform.isDarwin then # Match upstream, which builds with the latest SDK and a 10.7 deployment target. overrideSDK pkgs.stdenv { darwinMinVersion = "10.7"; diff --git a/pkgs/top-level/emscripten-packages.nix b/pkgs/top-level/emscripten-packages.nix index f4d2fd06a90c..af4f2fa7f1cd 100644 --- a/pkgs/top-level/emscripten-packages.nix +++ b/pkgs/top-level/emscripten-packages.nix @@ -67,8 +67,8 @@ rec { set -x emcc -O2 -s EMULATE_FUNCTION_POINTER_CASTS=1 xmllint.o \ ./.libs/'' - + pkgs.lib.optionalString pkgs.stdenv.isDarwin "libxml2.dylib " - + pkgs.lib.optionalString (!pkgs.stdenv.isDarwin) "libxml2.a " + + pkgs.lib.optionalString pkgs.stdenv.hostPlatform.isDarwin "libxml2.dylib " + + pkgs.lib.optionalString (!pkgs.stdenv.hostPlatform.isDarwin) "libxml2.a " + '' `pkg-config zlib --cflags` `pkg-config zlib --libs` -o ./xmllint.test.js \ --embed-file ./test/xmlid/id_err1.xml @@ -175,7 +175,7 @@ rec { echo "================= /testing zlib using node =================" ''; - postPatch = pkgs.lib.optionalString pkgs.stdenv.isDarwin '' + postPatch = pkgs.lib.optionalString pkgs.stdenv.hostPlatform.isDarwin '' substituteInPlace configure \ --replace '/usr/bin/libtool' 'ar' \ --replace 'AR="libtool"' 'AR="ar"' \ diff --git a/pkgs/top-level/java-packages.nix b/pkgs/top-level/java-packages.nix index 82022f25613b..5b72824f1d7f 100644 --- a/pkgs/top-level/java-packages.nix +++ b/pkgs/top-level/java-packages.nix @@ -13,7 +13,7 @@ in { compiler = let mkOpenjdk = path-linux: path-darwin: args: - if stdenv.isLinux + if stdenv.hostPlatform.isLinux then mkOpenjdkLinuxOnly path-linux args else let openjdk = callPackage path-darwin {}; @@ -21,7 +21,7 @@ in { mkOpenjdkLinuxOnly = path-linux: args: let openjdk = callPackage path-linux (args); - in assert stdenv.isLinux; openjdk // { + in assert stdenv.hostPlatform.isLinux; openjdk // { headless = openjdk.override { headless = true; }; }; @@ -71,13 +71,13 @@ in { }; temurin-bin = recurseIntoAttrs (callPackage ( - if stdenv.isLinux + if stdenv.hostPlatform.isLinux then ../development/compilers/temurin-bin/jdk-linux.nix else ../development/compilers/temurin-bin/jdk-darwin.nix ) {}); semeru-bin = recurseIntoAttrs (callPackage ( - if stdenv.isLinux + if stdenv.hostPlatform.isLinux then ../development/compilers/semeru-bin/jdk-linux.nix else ../development/compilers/semeru-bin/jdk-darwin.nix ) {}); diff --git a/pkgs/top-level/lua-packages.nix b/pkgs/top-level/lua-packages.nix index 3eafa2fa782f..6f62f2dee8ec 100644 --- a/pkgs/top-level/lua-packages.nix +++ b/pkgs/top-level/lua-packages.nix @@ -76,8 +76,8 @@ rec { # The makefile tries to link to `-llua` LUA_LIBS = "-llua"; - buildInputs = lib.optionals stdenv.isLinux [linux-pam] - ++ lib.optionals stdenv.isDarwin [openpam]; + buildInputs = lib.optionals stdenv.hostPlatform.isLinux [linux-pam] + ++ lib.optionals stdenv.hostPlatform.isDarwin [openpam]; installPhase = '' runHook preInstall @@ -163,7 +163,7 @@ rec { ''; meta = with lib; { - broken = stdenv.isDarwin; + broken = stdenv.hostPlatform.isDarwin; description = "Lightweight UNIX I/O and POSIX binding for Lua"; homepage = "https://www.gitano.org.uk/luxio/"; license = licenses.mit; diff --git a/pkgs/top-level/perl-packages.nix b/pkgs/top-level/perl-packages.nix index 3baab5aeb196..56bfd093fdd4 100644 --- a/pkgs/top-level/perl-packages.nix +++ b/pkgs/top-level/perl-packages.nix @@ -100,9 +100,9 @@ with self; { outputs = [ "out" "man" ]; - nativeBuildInputs = lib.optional stdenv.isDarwin shortenPerlShebang; + nativeBuildInputs = lib.optional stdenv.hostPlatform.isDarwin shortenPerlShebang; propagatedBuildInputs = [ FileNext ]; - postInstall = lib.optionalString stdenv.isDarwin '' + postInstall = lib.optionalString stdenv.hostPlatform.isDarwin '' shortenPerlShebang $out/bin/ack ''; @@ -341,7 +341,7 @@ with self; { meta = { description = "Gumbo parser library"; license = with lib.licenses; [ artistic1 gpl1Plus ]; - broken = stdenv.isDarwin; # never built on Hydra https://hydra.nixos.org/job/nixpkgs/staging-next/perl534Packages.AlienLibGumbo.x86_64-darwin + broken = stdenv.hostPlatform.isDarwin; # never built on Hydra https://hydra.nixos.org/job/nixpkgs/staging-next/perl534Packages.AlienLibGumbo.x86_64-darwin }; }; @@ -680,7 +680,7 @@ with self; { # Fails because /etc/protocols is not available in sandbox and make # getprotobyname('tcp') in ApacheTest fail. - doCheck = !stdenv.isLinux; + doCheck = !stdenv.hostPlatform.isLinux; meta = { description = "Perl Authentication and Authorization via cookies"; @@ -868,8 +868,8 @@ with self; { }; buildInputs = [ ModuleBuildTiny ]; propagatedBuildInputs = [ CPAN02PackagesSearch CPANCommonIndex CPANDistnameInfo ClassTiny CommandRunner ExtUtilsInstall ExtUtilsInstallPaths FileCopyRecursive Filepushd HTTPTinyish MenloLegacy Modulecpmfile ModuleCPANfile ParsePMFile ParallelPipes locallib ]; - nativeBuildInputs = lib.optional stdenv.isDarwin shortenPerlShebang; - postInstall = lib.optionalString stdenv.isDarwin '' + nativeBuildInputs = lib.optional stdenv.hostPlatform.isDarwin shortenPerlShebang; + postInstall = lib.optionalString stdenv.hostPlatform.isDarwin '' shortenPerlShebang $out/bin/cpm ''; meta = { @@ -905,8 +905,8 @@ with self; { }; buildInputs = [ ObjectPad ]; propagatedBuildInputs = [ AppPackager FileLoadLines FileHomeDir IOString ImageInfo PDFAPI2 StringInterpolateNamed TextLayout ] - ++ lib.optionals (!stdenv.isDarwin) [ Wx ]; - nativeBuildInputs = lib.optional stdenv.isDarwin shortenPerlShebang; + ++ lib.optionals (!stdenv.hostPlatform.isDarwin) [ Wx ]; + nativeBuildInputs = lib.optional stdenv.hostPlatform.isDarwin shortenPerlShebang; # Delete tests that fail when version env var is set, see # https://github.com/ChordPro/chordpro/issues/293 @@ -914,7 +914,7 @@ with self; { rm t/320_subst.t t/321_subst.t t/322_subst.t ''; - postInstall = lib.optionalString stdenv.isDarwin '' + postInstall = lib.optionalString stdenv.hostPlatform.isDarwin '' shortenPerlShebang $out/bin/chordpro rm $out/bin/wxchordpro # Wx not supported on darwin ''; @@ -1334,7 +1334,7 @@ with self; { url = "mirror://cpan/authors/id/Z/ZE/ZEFRAM/Authen-DecHpwd-2.007.tar.gz"; hash = "sha256-9DqTuwK0H3Mn2S+eljtpUF9nNQpS6PUHlvmK/E+z8Xc="; }; - perlPreHook = lib.optionalString stdenv.isi686 "export LD=$CC"; # fix undefined reference to `__stack_chk_fail_local' + perlPreHook = lib.optionalString stdenv.hostPlatform.isi686 "export LD=$CC"; # fix undefined reference to `__stack_chk_fail_local' propagatedBuildInputs = [ DataInteger DigestCRC ScalarString ]; meta = { description = "DEC VMS password hashing"; @@ -1647,7 +1647,7 @@ with self; { ''; buildInputs =[ ExtUtilsMakeMaker ]; propagatedBuildInputs = [ pkgs.zbar PerlMagick ]; - perlPreHook = lib.optionalString stdenv.isDarwin "export LD=$CC"; + perlPreHook = lib.optionalString stdenv.hostPlatform.isDarwin "export LD=$CC"; meta = { description = "Perl interface to the ZBar Barcode Reader"; homepage = "https://metacpan.org/pod/Barcode::ZBar"; @@ -2490,7 +2490,7 @@ with self; { }; propagatedBuildInputs = [ perlldap CatalystPluginAuthentication ClassAccessor ]; buildInputs = [ TestMockObject TestException NetLDAPServerTest ]; - doCheck = !stdenv.isDarwin; # t/02-realms_api.t and t/50.auth.case.sensitivity.t + doCheck = !stdenv.hostPlatform.isDarwin; # t/02-realms_api.t and t/50.auth.case.sensitivity.t meta = { description = "Authenticate Users against LDAP Directories"; license = with lib.licenses; [ artistic1 gpl1Plus ]; @@ -3968,7 +3968,7 @@ with self; { # Mac OS error -4960 (coreFoundationUnknownErr): The unknown error at lib/Clipboard/MacPasteboard.pm line 3. # Mac-Pasteboard-0.009.readme: 'NOTE that Mac OS X appears to restrict pasteboard access to processes that are logged in interactively. # Ssh sessions and cron jobs can not create the requisite pasteboard handles, giving coreFoundationUnknownErr (-4960)' - doCheck = !stdenv.isDarwin; + doCheck = !stdenv.hostPlatform.isDarwin; meta = { description = "Copy and paste with any OS"; homepage = "https://metacpan.org/release/Clipboard"; @@ -4197,7 +4197,7 @@ with self; { EOF ''; - doCheck = !stdenv.isDarwin; + doCheck = !stdenv.hostPlatform.isDarwin; meta = { description = "Low-Level Interface to zlib or zlib-ng compression library"; @@ -4762,9 +4762,9 @@ with self; { url = "mirror://cpan/authors/id/R/RJ/RJBS/CPAN-Mini-1.111017.tar.gz"; hash = "sha256-8gQpO+JqyEGsyHBEoYjbD1kegIgTFseiiK7A7s4wYVU="; }; - nativeBuildInputs = lib.optional stdenv.isDarwin shortenPerlShebang; + nativeBuildInputs = lib.optional stdenv.hostPlatform.isDarwin shortenPerlShebang; propagatedBuildInputs = [ FileHomeDir LWPProtocolHttps ]; - postInstall = lib.optionalString stdenv.isDarwin '' + postInstall = lib.optionalString stdenv.hostPlatform.isDarwin '' shortenPerlShebang $out/bin/minicpan ''; @@ -5100,7 +5100,7 @@ with self; { hash = "sha256-PMcSbVhBEHI3qb4txcf7wWfPPEtM40Z4qESLhQdXAUw="; }; propagatedBuildInputs = [ ClassMix ]; - perlPreHook = lib.optionalString (stdenv.isi686 || stdenv.isDarwin) "export LD=$CC"; + perlPreHook = lib.optionalString (stdenv.hostPlatform.isi686 || stdenv.hostPlatform.isDarwin) "export LD=$CC"; meta = { description = "Eksblowfish block cipher"; license = with lib.licenses; [ artistic1 gpl1Plus ]; @@ -5129,9 +5129,9 @@ with self; { url = "mirror://cpan/authors/id/B/BA/BARTB/Crypt-HSXKPasswd-v3.6.tar.gz"; hash = "sha256-lZ3MX58BG/ALha0i31ZrerK/XqHTYrDeD7WuKfvEWLM="; }; - nativeBuildInputs = lib.optional stdenv.isDarwin shortenPerlShebang; + nativeBuildInputs = lib.optional stdenv.hostPlatform.isDarwin shortenPerlShebang; propagatedBuildInputs = [ Clone DateTime FileHomeDir FileShare FileShareDir GetoptLong JSON ListMoreUtils MathRound Readonly TextUnidecode TypeTiny ]; - postInstall = lib.optionalString stdenv.isDarwin '' + postInstall = lib.optionalString stdenv.hostPlatform.isDarwin '' shortenPerlShebang $out/bin/hsxkpasswd ''; @@ -5356,7 +5356,7 @@ with self; { hash = "sha256-k+vfqu/P6atoPwEhyF8kR12Bl/C87EYBghnkERQ03eM="; }; propagatedBuildInputs = [ DigestSHA1 ]; - perlPreHook = lib.optionalString (stdenv.isi686 || stdenv.isDarwin) "export LD=$CC"; + perlPreHook = lib.optionalString (stdenv.hostPlatform.isi686 || stdenv.hostPlatform.isDarwin) "export LD=$CC"; meta = { description = "Emulate MySQL PASSWORD() function"; license = with lib.licenses; [ artistic1 gpl1Plus ]; @@ -5478,8 +5478,8 @@ with self; { buildInputs = [ TestException ]; propagatedBuildInputs = [ AltCryptRSABigInt CryptCAST5_PP CryptDES_EDE3 CryptDSA CryptIDEA CryptRIPEMD160 CryptRijndael CryptTwofish FileHomeDir LWP ]; - nativeBuildInputs = lib.optional stdenv.isDarwin shortenPerlShebang; - postInstall = lib.optionalString stdenv.isDarwin '' + nativeBuildInputs = lib.optional stdenv.hostPlatform.isDarwin shortenPerlShebang; + postInstall = lib.optionalString stdenv.hostPlatform.isDarwin '' shortenPerlShebang $out/bin/pgplet ''; doCheck = false; /* test fails with 'No random source available!' */ @@ -5703,7 +5703,7 @@ with self; { url = "mirror://cpan/authors/id/G/GT/GTERMARS/CSS-Minifier-XS-0.13.tar.gz"; hash = "sha256-xBnjCM3IKvHCXWuNB7L/JjR6Yit6Y+wghWq+jbQFH4I="; }; - perlPreHook = lib.optionalString (stdenv.isi686 || stdenv.isDarwin) "export LD=$CC"; + perlPreHook = lib.optionalString (stdenv.hostPlatform.isi686 || stdenv.hostPlatform.isDarwin) "export LD=$CC"; buildInputs = [ TestDiagINC ]; meta = { description = "XS based CSS minifier"; @@ -6058,7 +6058,7 @@ with self; { homepage = "https://github.com/msgpack/msgpack-perl"; license = with lib.licenses; [ artistic1 gpl1Plus ]; maintainers = [ maintainers.sgo ]; - broken = stdenv.isDarwin; # never built on Hydra https://hydra.nixos.org/job/nixpkgs/staging-next/perl534Packages.DataMessagePack.x86_64-darwin + broken = stdenv.hostPlatform.isDarwin; # never built on Hydra https://hydra.nixos.org/job/nixpkgs/staging-next/perl534Packages.DataMessagePack.x86_64-darwin }; }; @@ -6332,12 +6332,12 @@ with self; { hash = "sha256-tVypHHafgTN8xrCrIMMmg4eOWyZj8cwljFEamZpd/dM="; }; buildInputs = [ HashUtilFieldHashCompat ModuleBuildXSUtil ScopeGuard TestException ]; - perlPreHook = lib.optionalString stdenv.isi686 "export LD=$CC"; # fix undefined reference to `__stack_chk_fail_local' + perlPreHook = lib.optionalString stdenv.hostPlatform.isi686 "export LD=$CC"; # fix undefined reference to `__stack_chk_fail_local' meta = { description = "Selection of utilities for data and data types"; homepage = "https://github.com/gfx/Perl-Data-Util"; license = with lib.licenses; [ artistic1 gpl1Plus ]; - broken = stdenv.isDarwin; # never built on Hydra https://hydra.nixos.org/job/nixpkgs/staging-next/perl534Packages.DataUtil.x86_64-darwin + broken = stdenv.hostPlatform.isDarwin; # never built on Hydra https://hydra.nixos.org/job/nixpkgs/staging-next/perl534Packages.DataUtil.x86_64-darwin }; }; @@ -6488,7 +6488,7 @@ with self; { patchPhase = '' sed -i "s#/bin/date#${pkgs.coreutils}/bin/date#" lib/Date/Manip/TZ.pm ''; - doCheck = !stdenv.isi686; # build freezes during tests on i686 + doCheck = !stdenv.hostPlatform.isi686; # build freezes during tests on i686 buildInputs = [ TestInter ]; meta = { description = "Date manipulation routines"; @@ -7222,7 +7222,7 @@ with self; { buildInputs = [ pkgs.oracle-instantclient TestNoWarnings ]; propagatedBuildInputs = [ DBI ]; - postBuild = lib.optionalString stdenv.isDarwin '' + postBuild = lib.optionalString stdenv.hostPlatform.isDarwin '' install_name_tool -add_rpath "${pkgs.oracle-instantclient.lib}/lib" blib/arch/auto/DBD/Oracle/Oracle.bundle ''; meta = { @@ -7275,7 +7275,7 @@ with self; { meta = { description = "DBI driver for Sybase datasources"; license = with lib.licenses; [ artistic1 gpl1Only ]; - broken = stdenv.isDarwin; # never built on Hydra https://hydra.nixos.org/job/nixpkgs/staging-next/perl534Packages.DBDsybase.x86_64-darwin + broken = stdenv.hostPlatform.isDarwin; # never built on Hydra https://hydra.nixos.org/job/nixpkgs/staging-next/perl534Packages.DBDsybase.x86_64-darwin }; }; @@ -7637,7 +7637,7 @@ with self; { hash = "sha256-z/jSTllF45RN6/ITmVprFVuR5YE0aRVrE9Ws819qXZ8="; }; propagatedBuildInputs = [ HashStoredIterator JSONXS PadWalker ]; - perlPreHook = lib.optionalString stdenv.isDarwin "export LD=$CC"; + perlPreHook = lib.optionalString stdenv.hostPlatform.isDarwin "export LD=$CC"; meta = { description = "Perl side of the Perl debugger for IntelliJ IDEA and other JetBrains IDEs"; license = with lib.licenses; [ mit ]; @@ -7735,8 +7735,8 @@ with self; { }; propagatedBuildInputs = [ FileWhich JSONMaybeXS ]; buildInputs = [ CaptureTiny TestDifferences ]; - nativeBuildInputs = lib.optional stdenv.isDarwin shortenPerlShebang; - postInstall = lib.optionalString stdenv.isDarwin '' + nativeBuildInputs = lib.optional stdenv.hostPlatform.isDarwin shortenPerlShebang; + postInstall = lib.optionalString stdenv.hostPlatform.isDarwin '' shortenPerlShebang $out/bin/* ''; meta = { @@ -8050,8 +8050,8 @@ with self; { }; buildInputs = [ CPANMetaCheck TestDeep TestFailWarnings TestFatal TestFileShareDir ]; propagatedBuildInputs = [ AppCmd CPANUploader ConfigMVPReaderINI DateTime FileCopyRecursive FileFindRule FileShareDirInstall Filepushd LogDispatchouli MooseXLazyRequire MooseXSetOnce MooseXTypesPerl PathTiny PerlPrereqScanner SoftwareLicense TermEncoding TermUI YAMLTiny ]; - nativeBuildInputs = lib.optional stdenv.isDarwin shortenPerlShebang; - postInstall = lib.optionalString stdenv.isDarwin '' + nativeBuildInputs = lib.optional stdenv.hostPlatform.isDarwin shortenPerlShebang; + postInstall = lib.optionalString stdenv.hostPlatform.isDarwin '' shortenPerlShebang $out/bin/dzil ''; doCheck = false; @@ -8630,11 +8630,11 @@ with self; { }; buildInputs = [ CaptureTiny ]; propagatedBuildInputs = [ EmailAbstract EmailAddressXS EmailSimple ModuleRuntime Moo MooXTypesMooseLike SubExporter Throwable TryTiny ]; - nativeBuildInputs = lib.optional stdenv.isDarwin shortenPerlShebang; + nativeBuildInputs = lib.optional stdenv.hostPlatform.isDarwin shortenPerlShebang; postPatch = '' patchShebangs --build util ''; - preCheck = lib.optionalString stdenv.isDarwin '' + preCheck = lib.optionalString stdenv.hostPlatform.isDarwin '' shortenPerlShebang util/sendmail ''; meta = { @@ -8813,7 +8813,7 @@ with self; { url = "mirror://cpan/authors/id/G/GA/GAAS/Encode-Locale-1.05.tar.gz"; hash = "sha256-F2+gJ3H1QqTvsdvCpMko6PQ5G/QHhHO9YEDY8RrbDsE="; }; - preCheck = if stdenv.isCygwin then '' + preCheck = if stdenv.hostPlatform.isCygwin then '' sed -i"" -e "s@plan tests => 13@plan tests => 10@" t/env.t sed -i"" -e "s@ok(env(\"\\\x@#ok(env(\"\\\x@" t/env.t sed -i"" -e "s@ok(\$ENV{\"\\\x@#ok(\$ENV{\"\\\x@" t/env.t @@ -9180,7 +9180,7 @@ with self; { url = "mirror://cpan/authors/id/E/ET/ETJ/ExtUtils-CppGuess-0.26.tar.gz"; hash = "sha256-yLNiuGAXKkB2rO4AQ49SuGRk8sUAcCz891J4Ef+aaD4="; }; - doCheck = !stdenv.isDarwin; + doCheck = !stdenv.hostPlatform.isDarwin; nativeBuildInputs = [ pkgs.ld-is-cc-hook ]; propagatedBuildInputs = [ CaptureTiny ]; buildInputs = [ ModuleBuild ]; @@ -9915,7 +9915,7 @@ with self; { }; propagatedBuildInputs = [ FileWhich ]; preCheck = "export HOME=$TMPDIR"; - doCheck = !stdenv.isDarwin; + doCheck = !stdenv.hostPlatform.isDarwin; meta = { description = "Find your home and other directories on any platform"; homepage = "https://metacpan.org/release/File-HomeDir"; @@ -9945,7 +9945,7 @@ with self; { hash = "sha256-oC+/KFQGqKTZOZKE8DLy1VxWl1FUwuFnS9EJg3uAluw="; }; buildInputs = [ ExtUtilsCChecker ]; - perlPreHook = lib.optionalString (stdenv.isi686 || stdenv.isDarwin) "export LD=$CC"; # fix undefined reference to `__stack_chk_fail_local' + perlPreHook = lib.optionalString (stdenv.hostPlatform.isi686 || stdenv.hostPlatform.isDarwin) "export LD=$CC"; # fix undefined reference to `__stack_chk_fail_local' meta = { description = "Modify attributes of symlinks without dereferencing them"; license = with lib.licenses; [ artistic1 gpl1Plus ]; @@ -9969,7 +9969,7 @@ with self; { description = "Determine MIME types of data or files using libmagic"; homepage = "https://metacpan.org/release/File::LibMagic"; license = with lib.licenses; [ artistic1 gpl1Plus ]; - broken = stdenv.isDarwin; # never built on Hydra https://hydra.nixos.org/job/nixpkgs/staging-next/perl534Packages.FileLibMagic.x86_64-darwin + broken = stdenv.hostPlatform.isDarwin; # never built on Hydra https://hydra.nixos.org/job/nixpkgs/staging-next/perl534Packages.FileLibMagic.x86_64-darwin }; }; @@ -10584,7 +10584,7 @@ with self; { }; buildInputs = [ Test2Suite ]; propagatedBuildInputs = [ Future XSParseKeyword XSParseSublike ]; - perlPreHook = lib.optionalString stdenv.isDarwin "export LD=$CC"; + perlPreHook = lib.optionalString stdenv.hostPlatform.isDarwin "export LD=$CC"; meta = { description = "Deferred subroutine syntax for futures"; license = with lib.licenses; [ artistic1 gpl1Plus ]; @@ -10816,8 +10816,8 @@ with self; { url = "mirror://cpan/authors/id/T/TO/TORBIAK/App-Git-Autofixup-0.004001.tar.gz"; hash = "sha256-WroBPI3hOZD1iRoOKjnJcHTQcnvjZTIMLGrxnTbF3aw="; }; - nativeBuildInputs = lib.optional stdenv.isDarwin shortenPerlShebang; - postInstall = lib.optionalString stdenv.isDarwin '' + nativeBuildInputs = lib.optional stdenv.hostPlatform.isDarwin shortenPerlShebang; + postInstall = lib.optionalString stdenv.hostPlatform.isDarwin '' shortenPerlShebang $out/bin/git-autofixup ''; meta = { @@ -10909,7 +10909,7 @@ with self; { postCheck = '' rm -r $out/lib ''; - doCheck = !stdenv.isDarwin; + doCheck = !stdenv.hostPlatform.isDarwin; meta = { description = "Dynamically create Perl language bindings"; homepage = "https://gtk2-perl.sourceforge.net"; @@ -11201,7 +11201,7 @@ with self; { ]; buildInputs = [ pkgs.gtk2 ]; # https://rt.cpan.org/Public/Bug/Display.html?id=130742 - # doCheck = !stdenv.isDarwin; + # doCheck = !stdenv.hostPlatform.isDarwin; doCheck = false; propagatedBuildInputs = [ Pango ]; meta = { @@ -11222,7 +11222,7 @@ with self; { meta = { description = "(DEPRECATED) Perl interface to the EggTrayIcon library"; license = with lib.licenses; [ gpl2Plus ]; - broken = stdenv.isDarwin; # never built on Hydra https://hydra.nixos.org/job/nixpkgs/staging-next/perl534Packages.Gtk2TrayIcon.x86_64-darwin + broken = stdenv.hostPlatform.isDarwin; # never built on Hydra https://hydra.nixos.org/job/nixpkgs/staging-next/perl534Packages.Gtk2TrayIcon.x86_64-darwin }; }; @@ -11273,7 +11273,7 @@ with self; { meta = { description = "(DEPRECATED) Use single instance applications"; license = with lib.licenses; [ artistic1 gpl1Plus ]; - broken = stdenv.isDarwin; # never built on Hydra https://hydra.nixos.org/job/nixpkgs/staging-next/perl534Packages.Gtk2Unique.x86_64-darwin + broken = stdenv.hostPlatform.isDarwin; # never built on Hydra https://hydra.nixos.org/job/nixpkgs/staging-next/perl534Packages.Gtk2Unique.x86_64-darwin }; }; @@ -11285,7 +11285,7 @@ with self; { hash = "sha256-cNxL8qp0mBx54V/SmNmY4FqS66SBHxrVyfH03jdzesw="; }; propagatedBuildInputs = [ pkgs.gtk3 CairoGObject GlibObjectIntrospection ]; - preCheck = lib.optionalString stdenv.isDarwin '' + preCheck = lib.optionalString stdenv.hostPlatform.isDarwin '' # Currently failing on macOS rm t/overrides.t rm t/signals.t @@ -11372,14 +11372,14 @@ with self; { }; buildInputs = [ BotTrainingMegaHAL BotTrainingStarCraft DataSection FileSlurp PodSection TestException TestExpect TestOutput TestScript TestScriptRun ]; propagatedBuildInputs = [ ClassLoad DBDSQLite DataDump DirSelf FileCountLines GetoptLongDescriptive IOInteractive IPCSystemSimple ListMoreUtils Moose MooseXGetopt MooseXStrictConstructor MooseXTypes RegexpCommon TermSk namespaceclean ]; - nativeBuildInputs = lib.optional stdenv.isDarwin shortenPerlShebang; + nativeBuildInputs = lib.optional stdenv.hostPlatform.isDarwin shortenPerlShebang; patches = [ ../development/perl-modules/Hailo-fix-test-gld.patch ]; postPatch = '' patchShebangs bin ''; - postInstall = lib.optionalString stdenv.isDarwin '' + postInstall = lib.optionalString stdenv.hostPlatform.isDarwin '' shortenPerlShebang $out/bin/hailo ''; meta = { @@ -11518,12 +11518,12 @@ with self; { url = "mirror://cpan/authors/id/Z/ZE/ZEFRAM/Hash-SharedMem-0.005.tar.gz"; hash = "sha256-Mkd2gIYC973EStqpN4lTZUVAKakm+mEfMhyb9rlAu14="; }; - env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.isAarch64 "-mno-outline-atomics"; + env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.hostPlatform.isAarch64 "-mno-outline-atomics"; buildInputs = [ ScalarString ]; meta = { description = "Efficient shared mutable hash"; license = with lib.licenses; [ artistic1 gpl1Plus ]; - broken = stdenv.isDarwin; # never built on Hydra https://hydra.nixos.org/job/nixpkgs/staging-next/perl534Packages.HashSharedMem.x86_64-darwin + broken = stdenv.hostPlatform.isDarwin; # never built on Hydra https://hydra.nixos.org/job/nixpkgs/staging-next/perl534Packages.HashSharedMem.x86_64-darwin }; }; @@ -11535,7 +11535,7 @@ with self; { hash = "sha256-ucvE3NgjPo0dfxSB3beaSl+dtxgMs+8CtLy+4F5l6gw="; }; buildInputs = [ Test2Suite ]; - perlPreHook = lib.optionalString stdenv.isDarwin "export LD=$CC"; + perlPreHook = lib.optionalString stdenv.hostPlatform.isDarwin "export LD=$CC"; meta = { description = "Functions for accessing a hashes internal iterator"; license = with lib.licenses; [ artistic1 gpl1Plus ]; @@ -11619,12 +11619,12 @@ with self; { hash = "sha256-Wl7viWUA0epsJKkIXs++mkOr7mjPxmwD+InSostoml0="; }; buildInputs = [ ModuleBuildPluggablePPPort TestRequires ]; - perlPreHook = lib.optionalString stdenv.isi686 "export LD=$CC"; # fix undefined reference to `__stack_chk_fail_local' + perlPreHook = lib.optionalString stdenv.hostPlatform.isi686 "export LD=$CC"; # fix undefined reference to `__stack_chk_fail_local' meta = { description = "Extremely fast HTML escaping"; homepage = "https://github.com/tokuhirom/HTML-Escape"; license = with lib.licenses; [ artistic1 gpl1Plus ]; - broken = stdenv.isDarwin; # never built on Hydra https://hydra.nixos.org/job/nixpkgs/staging-next/perl534Packages.HTMLEscape.x86_64-darwin + broken = stdenv.hostPlatform.isDarwin; # never built on Hydra https://hydra.nixos.org/job/nixpkgs/staging-next/perl534Packages.HTMLEscape.x86_64-darwin }; }; @@ -12216,8 +12216,8 @@ with self; { description = "XS extension for processing HTTP headers"; license = with lib.licenses; [ artistic1 gpl1Plus ]; broken = - stdenv.isi686 # loadable library and perl binaries are mismatched (got handshake key 0x7d40080, needed 0x7dc0080) - || stdenv.isDarwin; # never built on Hydra https://hydra.nixos.org/job/nixpkgs/staging-next/perl534Packages.HTTPHeaderParserXS.x86_64-darwin + stdenv.hostPlatform.isi686 # loadable library and perl binaries are mismatched (got handshake key 0x7d40080, needed 0x7dc0080) + || stdenv.hostPlatform.isDarwin; # never built on Hydra https://hydra.nixos.org/job/nixpkgs/staging-next/perl534Packages.HTTPHeaderParserXS.x86_64-darwin }; }; @@ -12468,7 +12468,7 @@ with self; { description = "Perl interface to libpng"; license = with lib.licenses; [ artistic1 gpl1Plus ]; mainProgram = "pnginspect"; - broken = stdenv.isDarwin; # never built on Hydra https://hydra.nixos.org/job/nixpkgs/staging-next/perl534Packages.ImagePNGLibpng.x86_64-darwin + broken = stdenv.hostPlatform.isDarwin; # never built on Hydra https://hydra.nixos.org/job/nixpkgs/staging-next/perl534Packages.ImagePNGLibpng.x86_64-darwin }; }; @@ -12652,8 +12652,8 @@ with self; { }; buildInputs = [ CanaryStability ]; propagatedBuildInputs = [ commonsense ]; - nativeBuildInputs = lib.optional stdenv.isDarwin shortenPerlShebang; - postInstall = lib.optionalString stdenv.isDarwin '' + nativeBuildInputs = lib.optional stdenv.hostPlatform.isDarwin shortenPerlShebang; + postInstall = lib.optionalString stdenv.hostPlatform.isDarwin '' shortenPerlShebang $out/bin/treescan ''; meta = { @@ -12745,7 +12745,7 @@ with self; { }; propagatedBuildInputs = [ CompressRawBzip2 CompressRawZlib ]; # Same as CompressRawZlib - doCheck = false && !stdenv.isDarwin; + doCheck = false && !stdenv.hostPlatform.isDarwin; meta = { description = "IO Interface to compressed data files/buffers"; homepage = "https://github.com/pmqs/IO-Compress"; @@ -12804,7 +12804,7 @@ with self; { url = "mirror://cpan/authors/id/L/LD/LDS/IO-Interface-1.09.tar.gz"; hash = "sha256-5j6BxS6x4OYOwtmD9VUtJJPhFxeZJclnV/I8S9n6cTo="; }; - nativeBuildInputs = lib.optionals stdenv.isDarwin [ pkgs.ld-is-cc-hook ]; + nativeBuildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ pkgs.ld-is-cc-hook ]; meta = { description = "Access and modify network interface card configuration"; license = with lib.licenses; [ artistic1 gpl1Plus ]; @@ -13067,7 +13067,7 @@ with self; { hash = "sha256-pfGoMCC8W13WwbVw9Ix1RuCo9/rBCgaHQLA5Ja2eFOg="; }; patches = [ ../development/perl-modules/IO-Tty-fix-makefile.patch ]; - doCheck = !stdenv.isDarwin; # openpty fails in the sandbox + doCheck = !stdenv.hostPlatform.isDarwin; # openpty fails in the sandbox meta = { description = "Low-level allocate a pseudo-Tty, import constants"; license = with lib.licenses; [ artistic1 gpl1Plus ]; @@ -13274,7 +13274,7 @@ with self; { available to the Perl program as if they had been written in Perl. ''; license = with lib.licenses; [ artistic2 ]; - broken = stdenv.isDarwin; # never built on Hydra https://hydra.nixos.org/job/nixpkgs/staging-next/perl534Packages.InlineJava.x86_64-darwin + broken = stdenv.hostPlatform.isDarwin; # never built on Hydra https://hydra.nixos.org/job/nixpkgs/staging-next/perl534Packages.InlineJava.x86_64-darwin }; }; @@ -13299,7 +13299,7 @@ with self; { hash = "sha256-XZsDT1jwtv9bZGR708WpzgWypw7e4zn7wxc67nR8wFA="; }; buildInputs = [ TestDiagINC ]; - perlPreHook = lib.optionalString (stdenv.isi686 || stdenv.isDarwin) "export LD=$CC"; + perlPreHook = lib.optionalString (stdenv.hostPlatform.isi686 || stdenv.hostPlatform.isDarwin) "export LD=$CC"; meta = { description = "XS based JavaScript minifier"; homepage = "https://metacpan.org/release/JavaScript-Minifier-XS"; @@ -13534,12 +13534,12 @@ with self; { }; outputs = [ "out" "tex" ]; propagatedBuildInputs = [ ArchiveZip DBFile FileWhich IOString ImageMagick ImageSize JSONXS LWP ParseRecDescent PodParser TextUnidecode XMLLibXSLT ]; - nativeBuildInputs = [ pkgs.makeWrapper ] ++ lib.optional stdenv.isDarwin shortenPerlShebang; + nativeBuildInputs = [ pkgs.makeWrapper ] ++ lib.optional stdenv.hostPlatform.isDarwin shortenPerlShebang; makeMakerFlags = [ "TEXMF=\${tex}" "NOMKTEXLSR" ]; # shebangs need to be patched before executables are copied to $out preBuild = '' patchShebangs bin/ - '' + lib.optionalString stdenv.isDarwin '' + '' + lib.optionalString stdenv.hostPlatform.isDarwin '' for file in bin/*; do shortenPerlShebang "$file" done @@ -14002,7 +14002,7 @@ with self; { }; buildInputs = [ TestException ]; propagatedBuildInputs = [ SubExporter ]; - perlPreHook = lib.optionalString stdenv.isi686 "export LD=$CC"; # fix undefined reference to `__stack_chk_fail_local' + perlPreHook = lib.optionalString stdenv.hostPlatform.isi686 "export LD=$CC"; # fix undefined reference to `__stack_chk_fail_local' meta = { description = "Linux specific special filehandles"; license = with lib.licenses; [ artistic1 gpl1Plus ]; @@ -14662,7 +14662,7 @@ with self; { postPatch = lib.optionalString (stdenv.buildPlatform != stdenv.hostPlatform) '' substituteInPlace Makefile.PL --replace 'if has_module' 'if 0; #' ''; - doCheck = !stdenv.isDarwin; + doCheck = !stdenv.hostPlatform.isDarwin; nativeCheckInputs = [ HTTPDaemon TestFatal TestNeeds TestRequiresInternet ]; meta = { description = "World-Wide Web library for Perl"; @@ -15333,7 +15333,7 @@ with self; { description = "Manipulate 128 bits integers in Perl"; homepage = "https://metacpan.org/release/Math-Int128"; license = with lib.licenses; [ artistic1 gpl1Plus ]; - broken = stdenv.is32bit; # compiler doesn't support a 128-bit integer type + broken = stdenv.hostPlatform.is32bit; # compiler doesn't support a 128-bit integer type }; }; @@ -15570,7 +15570,7 @@ with self; { description = "Fast XS implementation of MaxMind DB reader"; homepage = "https://metacpan.org/release/MaxMind-DB-Reader-XS"; license = with lib.licenses; [ artistic2 ]; - broken = stdenv.isDarwin; # never built on Hydra https://hydra.nixos.org/job/nixpkgs/staging-next/perl534Packages.MaxMindDBReaderXS.x86_64-darwin + broken = stdenv.hostPlatform.isDarwin; # never built on Hydra https://hydra.nixos.org/job/nixpkgs/staging-next/perl534Packages.MaxMindDBReaderXS.x86_64-darwin }; }; @@ -15588,7 +15588,7 @@ with self; { description = "Create MaxMind DB database files"; homepage = "https://metacpan.org/release/MaxMind-DB-Writer"; license = with lib.licenses; [ artistic1 gpl1Plus ]; - broken = stdenv.isDarwin; # never built on Hydra https://hydra.nixos.org/job/nixpkgs/staging-next/perl534Packages.MaxMindDBWriter.x86_64-darwin + broken = stdenv.hostPlatform.isDarwin; # never built on Hydra https://hydra.nixos.org/job/nixpkgs/staging-next/perl534Packages.MaxMindDBWriter.x86_64-darwin }; }; @@ -16954,7 +16954,7 @@ with self; { }; buildInputs = [ ModuleInstall ]; propagatedBuildInputs = [ AlgorithmLCSS CHI DataSerializer DevelStackTrace Mojolicious Readonly StringTruncate ]; - doCheck = !stdenv.isDarwin; + doCheck = !stdenv.hostPlatform.isDarwin; meta = { description = "Caching, Non-blocking I/O HTTP, Local file and WebSocket user agent"; homepage = "https://github.com/nicomen/mojo-useragent-cached"; @@ -18114,8 +18114,8 @@ with self; { }; buildInputs = [ ModuleBuildXSUtil TestException TestFatal TestLeakTrace TestOutput TestRequires TryTiny ]; perlPreHook = "export LD=$CC"; - env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.isi686 "-fno-stack-protector"; - hardeningDisable = lib.optional stdenv.isi686 "stackprotector"; + env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.hostPlatform.isi686 "-fno-stack-protector"; + hardeningDisable = lib.optional stdenv.hostPlatform.isi686 "stackprotector"; meta = { description = "Moose minus the antlers"; license = with lib.licenses; [ artistic1 gpl1Plus ]; @@ -18458,7 +18458,7 @@ with self; { }; buildInputs = [ HTTPCookies Test2Suite TestMetricsAny ]; propagatedBuildInputs = [ Future HTTPMessage IOAsync MetricsAny StructDumb URI ]; - preCheck = lib.optionalString stdenv.isDarwin '' + preCheck = lib.optionalString stdenv.hostPlatform.isDarwin '' # network tests fail on Darwin/sandbox, so disable these rm -f t/20local-connect.t t/22local-connect-pipeline.t t/23local-connect-redir.t rm -f t/90rt75615.t t/90rt75616.t t/90rt93232.t @@ -18511,7 +18511,7 @@ with self; { hash = "sha256-DayDQtPHii/syr1GZxRd1a3U+4zRjRVtKXoead/hFgA="; }; propagatedBuildInputs = [ IOAsync ProtocolWebSocket URI ]; - preCheck = lib.optionalString stdenv.isDarwin '' + preCheck = lib.optionalString stdenv.hostPlatform.isDarwin '' # network tests fail on Darwin/sandbox, so disable these rm -f t/02server.t t/03cross.t ''; @@ -18724,7 +18724,7 @@ with self; { meta = { description = "OOP Interface to FreeDB Server(s)"; license = with lib.licenses; [ artistic1 ]; - broken = stdenv.isDarwin; # never built on Hydra https://hydra.nixos.org/job/nixpkgs/staging-next/perl534Packages.NetFreeDB.x86_64-darwin + broken = stdenv.hostPlatform.isDarwin; # never built on Hydra https://hydra.nixos.org/job/nixpkgs/staging-next/perl534Packages.NetFreeDB.x86_64-darwin }; }; @@ -19503,7 +19503,7 @@ with self; { hash = "sha256-z4jSquGKKHHX1/MPi6bU7lv5U+IP3KileME8dB0W0a0="; }; buildInputs = [ Test2Suite TestFatal TestRefcount ]; - perlPreHook = lib.optionalString stdenv.isDarwin "export LD=$CC"; + perlPreHook = lib.optionalString stdenv.hostPlatform.isDarwin "export LD=$CC"; propagatedBuildInputs = [ XSParseKeyword XSParseSublike ]; meta = { description = "Simple syntax for lexical field-based objects"; @@ -19690,7 +19690,7 @@ with self; { # https://github.com/NixOS/nixpkgs/pull/104889#issuecomment-737144513 preCheck = '' rm t/35_log.t - '' + lib.optionalString stdenv.isDarwin '' + '' + lib.optionalString stdenv.hostPlatform.isDarwin '' rm t/30_connect.t rm t/45_class.t ''; @@ -19862,7 +19862,7 @@ with self; { url = "mirror://cpan/authors/id/Z/ZE/ZEFRAM/Params-Classify-0.015.tar.gz"; hash = "sha256-OY7BXNiZ/Ni+89ueoXSL9jHxX2wyviA+R1tn31EKWRQ="; }; - perlPreHook = lib.optionalString stdenv.isi686 "export LD=$CC"; # fix undefined reference to `__stack_chk_fail_local' + perlPreHook = lib.optionalString stdenv.hostPlatform.isi686 "export LD=$CC"; # fix undefined reference to `__stack_chk_fail_local' meta = { description = "Argument type classification"; license = with lib.licenses; [ artistic1 gpl1Plus ]; @@ -20379,9 +20379,9 @@ with self; { hash = "sha256-5c2V3j5DvOcHdRdidLqkBfMm/IdA3wBUu4FpdcyNNJs="; }; buildInputs = [ TestDeep ]; - nativeBuildInputs = lib.optional stdenv.isDarwin shortenPerlShebang; + nativeBuildInputs = lib.optional stdenv.hostPlatform.isDarwin shortenPerlShebang; propagatedBuildInputs = [ BKeywords ConfigTiny ExceptionClass FileWhich ListSomeUtils ModulePluggable PPI PPIxQuoteLike PPIxRegexp PPIxUtilities PPIxUtils PerlTidy PodSpell Readonly StringFormat ]; - postInstall = lib.optionalString stdenv.isDarwin '' + postInstall = lib.optionalString stdenv.hostPlatform.isDarwin '' shortenPerlShebang $out/bin/perlcritic ''; meta = { @@ -20885,8 +20885,8 @@ with self; { hash = "sha256-RVW1J5nBZBXDy/5eMB6gLKDrvDQhTH/lLx19ykUwLik="; }; propagatedBuildInputs = [ Future FutureQueue IOAsync PPI PPR PathTiny PerlCritic PerlTidy PodMarkdown URI ]; - nativeBuildInputs = lib.optional stdenv.isDarwin shortenPerlShebang; - postInstall = lib.optionalString stdenv.isDarwin '' + nativeBuildInputs = lib.optional stdenv.hostPlatform.isDarwin shortenPerlShebang; + postInstall = lib.optionalString stdenv.hostPlatform.isDarwin '' shortenPerlShebang $out/bin/pls ''; meta = { @@ -21815,8 +21815,8 @@ with self; { url = "mirror://cpan/authors/id/S/SY/SYP/App-rainbarf-1.4.tar.gz"; hash = "sha256-TxOa01+q8t4GI9wLsd2J+lpDHlSL/sh97hlM8OJcyX0="; }; - nativeBuildInputs = lib.optional stdenv.isDarwin shortenPerlShebang; - postInstall = lib.optionalString stdenv.isDarwin '' + nativeBuildInputs = lib.optional stdenv.hostPlatform.isDarwin shortenPerlShebang; + postInstall = lib.optionalString stdenv.hostPlatform.isDarwin '' shortenPerlShebang $out/bin/rainbarf ''; meta = { @@ -22890,8 +22890,8 @@ with self; { patchShebangs script ''; - nativeBuildInputs = lib.optional stdenv.isDarwin shortenPerlShebang; - postInstall = lib.optionalString stdenv.isDarwin '' + nativeBuildInputs = lib.optional stdenv.hostPlatform.isDarwin shortenPerlShebang; + postInstall = lib.optionalString stdenv.hostPlatform.isDarwin '' for file in $out/bin/*; do shortenPerlShebang $file done @@ -22941,7 +22941,7 @@ with self; { }; buildInputs = [ LWP TestSharedFork TestTCP ]; propagatedBuildInputs = [ ParallelPrefork Plack ServerStarter ]; - doCheck = !stdenv.isDarwin; + doCheck = !stdenv.hostPlatform.isDarwin; meta = { description = "Simple, high-performance PSGI/Plack HTTP server"; license = with lib.licenses; [ artistic1 gpl1Plus ]; @@ -22956,9 +22956,9 @@ with self; { hash = "sha256-b/q5FfMj9gCJ4+v4Urm5cH1pFyZt+K/XNw+sBL/f7k4="; }; buildInputs = [ LWP ModuleBuildTiny TestRequires TestTCP ]; - nativeBuildInputs = lib.optional stdenv.isDarwin shortenPerlShebang; + nativeBuildInputs = lib.optional stdenv.hostPlatform.isDarwin shortenPerlShebang; propagatedBuildInputs = [ DataDump HTTPParserXS NetServer Plack NetServerSSPrefork IOSocketINET6 ]; - postInstall = lib.optionalString stdenv.isDarwin '' + postInstall = lib.optionalString stdenv.hostPlatform.isDarwin '' shortenPerlShebang $out/bin/starman ''; @@ -23318,7 +23318,7 @@ with self; { url = "mirror://cpan/authors/id/R/RO/ROSCH/String-ShellQuote-1.04.tar.gz"; hash = "sha256-5gY2UDjOINZG0lXIBe/90y+GR18Y1DynVFWwDk2G3TU="; }; - doCheck = !stdenv.isDarwin; + doCheck = !stdenv.hostPlatform.isDarwin; meta = { description = "Quote strings for passing through the shell"; license = with lib.licenses; [ artistic1 gpl1Plus ]; @@ -23626,7 +23626,7 @@ with self; { hash = "sha256-oSfa52RcGpVwzZopcMbcST1SL/BzGKNKOeQJCY9pESU="; }; propagatedBuildInputs = [ LexicalSealRequireHints ]; - perlPreHook = lib.optionalString stdenv.isDarwin "export LD=$CC"; + perlPreHook = lib.optionalString stdenv.hostPlatform.isDarwin "export LD=$CC"; meta = { description = "Detect undeclared subroutines in compilation"; license = with lib.licenses; [ artistic1 gpl1Plus ]; @@ -23668,7 +23668,7 @@ with self; { url = "mirror://cpan/authors/id/T/TO/TODDR/Safe-Hole-0.14.tar.gz"; hash = "sha256-9PVui70GxP5K4G2xIYbeyt+6wep3XqGMbAKJSB0V7AU="; }; - perlPreHook = lib.optionalString stdenv.isDarwin "export LD=$CC"; + perlPreHook = lib.optionalString stdenv.hostPlatform.isDarwin "export LD=$CC"; meta = { description = "Lib/Safe/Hole.pm"; homepage = "https://github.com/toddr/Safe-Hole"; @@ -23788,7 +23788,7 @@ with self; { }; buildInputs = [ Test2Suite ]; propagatedBuildInputs = [ XSParseKeyword ]; - perlPreHook = lib.optionalString (stdenv.isi686 || stdenv.isDarwin) "export LD=$CC"; + perlPreHook = lib.optionalString (stdenv.hostPlatform.isi686 || stdenv.hostPlatform.isDarwin) "export LD=$CC"; meta = { description = "Try/catch/finally syntax for perl"; license = with lib.licenses; [ artistic1 gpl1Plus ]; @@ -23843,8 +23843,8 @@ with self; { hash = "sha256-nCypGyi6bZDEXqdb7wlGGzk9cFzmYkWGP1slBpXDfHw="; }) ]; - buildInputs = lib.optional stdenv.isDarwin pkgs.darwin.apple_sdk.frameworks.Carbon; - doCheck = !stdenv.isAarch64; + buildInputs = lib.optional stdenv.hostPlatform.isDarwin pkgs.darwin.apple_sdk.frameworks.Carbon; + doCheck = !stdenv.hostPlatform.isAarch64; meta = { description = "Perl extension for getting CPU information. Currently only number of CPU's supported"; license = with lib.licenses; [ artistic1 gpl1Plus ]; @@ -23887,7 +23887,7 @@ with self; { url = "mirror://cpan/authors/id/L/LB/LBAXTER/Sys-SigAction-0.23.tar.gz"; hash = "sha256-xO9sk0VTQDH8u+Ktw0f8cZTUevyUXnpE+sfpVjCV01M="; }; - doCheck = !stdenv.isAarch64; # it hangs on Aarch64 + doCheck = !stdenv.hostPlatform.isAarch64; # it hangs on Aarch64 meta = { description = "Perl extension for Consistent Signal Handling"; license = with lib.licenses; [ artistic1 gpl1Plus ]; @@ -23933,12 +23933,12 @@ with self; { }; nativeBuildInputs = [ pkgs.pkg-config ]; buildInputs = [ pkgs.libvirt CPANChanges TestPod TestPodCoverage XMLXPath ]; - perlPreHook = lib.optionalString stdenv.isi686 "export LD=$CC"; # fix undefined reference to `__stack_chk_fail_local' + perlPreHook = lib.optionalString stdenv.hostPlatform.isi686 "export LD=$CC"; # fix undefined reference to `__stack_chk_fail_local' meta = { description = "Libvirt Perl API"; homepage = "https://libvirt.org"; license = with lib.licenses; [ gpl2Plus artistic1 ]; - broken = stdenv.isDarwin; # never built on Hydra https://hydra.nixos.org/job/nixpkgs/staging-next/perl534Packages.SysVirt.x86_64-darwin + broken = stdenv.hostPlatform.isDarwin; # never built on Hydra https://hydra.nixos.org/job/nixpkgs/staging-next/perl534Packages.SysVirt.x86_64-darwin }; }; @@ -23949,7 +23949,7 @@ with self; { url = "mirror://cpan/authors/id/D/DW/DWHEELER/TAP-Parser-SourceHandler-pgTAP-3.36.tar.gz"; hash = "sha256-B75RUy4GPqxu2OWBUFRw7ryB1VBkQa8tzzK8Dr7pjGc="; }; - doCheck = !stdenv.isDarwin; + doCheck = !stdenv.hostPlatform.isDarwin; meta = { description = "Stream TAP from pgTAP test scripts"; homepage = "https://search.cpan.org/dist/Tap-Parser-Sourcehandler-pgTAP"; @@ -24044,9 +24044,9 @@ with self; { pkgs.tcl pkgs.tix pkgs.tk - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.CoreServices ]; - makeMakerFlags = lib.optionals stdenv.isLinux + makeMakerFlags = lib.optionals stdenv.hostPlatform.isLinux [ "--tclsh=${pkgs.tcl}/bin/tclsh" "--nousestubs" ]; meta = { description = "Tcl extension module for Perl"; @@ -24074,7 +24074,7 @@ with self; { mkdir -p $out/lib/perl5/site_perl mv $out/lib/perl5/Tcl $out/lib/perl5/site_perl/ mv $out/lib/perl5/auto $out/lib/perl5/site_perl/ - '' + lib.optionalString stdenv.isDarwin '' + '' + lib.optionalString stdenv.hostPlatform.isDarwin '' mv $out/lib/perl5/darwin-thread-multi-2level $out/lib/perl5/site_perl/ ''; meta = { @@ -24190,7 +24190,7 @@ with self; { url = "mirror://cpan/authors/id/A/AB/ABW/Template-Toolkit-3.101.tar.gz"; hash = "sha256-0qMt1sIeSzfGqT34CHyp6IDPrmE6Pl766jB7C9yu21g="; }; - doCheck = !stdenv.isDarwin; + doCheck = !stdenv.hostPlatform.isDarwin; propagatedBuildInputs = [ AppConfig ]; buildInputs = [ CGI TestLeakTrace ]; meta = { @@ -24524,7 +24524,7 @@ with self; { description = "New and improved test harness with better Test2 integration"; license = with lib.licenses; [ artistic1 gpl1Plus ]; mainProgram = "yath"; - broken = stdenv.isDarwin; # never built on Hydra https://hydra.nixos.org/job/nixpkgs/staging-next/perl534Packages.Test2Harness.x86_64-darwin + broken = stdenv.hostPlatform.isDarwin; # never built on Hydra https://hydra.nixos.org/job/nixpkgs/staging-next/perl534Packages.Test2Harness.x86_64-darwin }; }; @@ -25330,7 +25330,7 @@ with self; { meta = { description = "Assert that code does not cause growth in memory usage"; license = with lib.licenses; [ artistic1 gpl1Plus ]; - broken = stdenv.isDarwin; # never built on Hydra https://hydra.nixos.org/job/nixpkgs/staging-next/perl534Packages.TestMemoryGrowth.x86_64-darwin + broken = stdenv.hostPlatform.isDarwin; # never built on Hydra https://hydra.nixos.org/job/nixpkgs/staging-next/perl534Packages.TestMemoryGrowth.x86_64-darwin }; }; @@ -25824,7 +25824,7 @@ with self; { }; buildInputs = [ TestRun TestTrap ]; propagatedBuildInputs = [ MooseXGetopt UNIVERSALrequire YAMLLibYAML ]; - doCheck = !stdenv.isDarwin; + doCheck = !stdenv.hostPlatform.isDarwin; meta = { description = "Analyze tests from the command line using Test::Run"; homepage = "http://web-cpan.berlios.de/modules/Test-Run"; @@ -26381,7 +26381,7 @@ with self; { # libbtparse.so: cannot open shared object file patches = [ ../development/perl-modules/TextBibTeX-use-lib.patch ]; perlPreHook = "export LD=$CC"; - perlPostHook = lib.optionalString stdenv.isDarwin '' + perlPostHook = lib.optionalString stdenv.hostPlatform.isDarwin '' oldPath="$(pwd)/btparse/src/libbtparse.dylib" newPath="$out/lib/libbtparse.dylib" @@ -26573,7 +26573,7 @@ with self; { meta = { description = "Perl interface to iconv() codeset conversion function"; license = with lib.licenses; [ artistic1 gpl1Plus ]; # taken from el6 - broken = stdenv.isDarwin; # never built on Hydra https://hydra.nixos.org/job/nixpkgs/staging-next/perl534Packages.TextIconv.x86_64-darwin + broken = stdenv.hostPlatform.isDarwin; # never built on Hydra https://hydra.nixos.org/job/nixpkgs/staging-next/perl534Packages.TextIconv.x86_64-darwin }; }; @@ -26689,7 +26689,7 @@ with self; { hash = "sha256-U6cw/29IgrmavYVW8mqRH1gvZ1tZ8OFnJe0ey8CE7lA="; }; buildInputs = [ Filepushd ]; - perlPreHook = lib.optionalString stdenv.isDarwin "export LD=$CC"; + perlPreHook = lib.optionalString stdenv.hostPlatform.isDarwin "export LD=$CC"; meta = { description = "Hoedown for Perl5"; homepage = "https://github.com/tokuhirom/Text-Markdown-Hoedown"; @@ -27037,7 +27037,7 @@ with self; { meta = { description = "Remove accents from a string"; license = with lib.licenses; [ gpl2Only ]; - broken = stdenv.isDarwin; # never built on Hydra https://hydra.nixos.org/job/nixpkgs/staging-next/perl534Packages.TextUnaccent.x86_64-darwin + broken = stdenv.hostPlatform.isDarwin; # never built on Hydra https://hydra.nixos.org/job/nixpkgs/staging-next/perl534Packages.TextUnaccent.x86_64-darwin }; }; @@ -27132,7 +27132,7 @@ with self; { url = "mirror://cpan/authors/id/K/KU/KUBOTA/Text-WrapI18N-0.06.tar.gz"; hash = "sha256-S9KaF/DCx5LRLBAFs8J28qsPrjnACFmuF0HXlBhGpIg="; }; - buildInputs = lib.optionals (!stdenv.isDarwin) [ pkgs.glibcLocales ]; + buildInputs = lib.optionals (!stdenv.hostPlatform.isDarwin) [ pkgs.glibcLocales ]; propagatedBuildInputs = [ TextCharWidth ]; preConfigure = '' substituteInPlace WrapI18N.pm --replace '/usr/bin/locale' '${pkgs.unixtools.locale}/bin/locale' @@ -27710,7 +27710,7 @@ with self; { url = "mirror://cpan/authors/id/A/AR/ARODLAND/Unicode-CaseFold-1.01.tar.gz"; hash = "sha256-QYohKAj50Li7MwrJBQltLdNkl2dT1McVNNq5g2pjGU0="; }; - perlPreHook = lib.optionalString stdenv.isi686 "export LD=$CC"; # fix undefined reference to `__stack_chk_fail_local' + perlPreHook = lib.optionalString stdenv.hostPlatform.isi686 "export LD=$CC"; # fix undefined reference to `__stack_chk_fail_local' meta = { description = "Unicode case-folding for case-insensitive lookups"; homepage = "https://metacpan.org/release/Unicode-CaseFold"; @@ -27988,7 +27988,7 @@ with self; { url = "mirror://cpan/authors/id/C/CV/CVLIBRARY/UUID4-Tiny-0.003.tar.gz"; hash = "sha256-4S9sgrg1dcORd3O0HA+1HPeDx8bPcuDJkWks4u8Hg2I="; }; - postPatch = lib.optionalString (stdenv.isAarch64) '' + postPatch = lib.optionalString (stdenv.hostPlatform.isAarch64) '' # https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/include/uapi/asm-generic/unistd.h # printf SYS_getrandom | gcc -include sys/syscall.h -E - substituteInPlace lib/UUID4/Tiny.pm \ @@ -28188,7 +28188,7 @@ with self; { meta = { description = "Use WWW::Mechanize with CGI applications"; license = with lib.licenses; [ artistic1 gpl1Plus ]; - broken = stdenv.isDarwin; # never built on Hydra https://hydra.nixos.org/job/nixpkgs/staging-next/perl534Packages.WWWMechanizeCGI.x86_64-darwin + broken = stdenv.hostPlatform.isDarwin; # never built on Hydra https://hydra.nixos.org/job/nixpkgs/staging-next/perl534Packages.WWWMechanizeCGI.x86_64-darwin }; }; @@ -28449,9 +28449,9 @@ with self; { url = "mirror://cpan/authors/id/S/SI/SIXTEASE/XML-Entities-1.0002.tar.gz"; hash = "sha256-wyqk8wlXPXZIqy5Bb2K2sgZS8q2c/T7sgv1REB/nMQ0="; }; - nativeBuildInputs = lib.optional stdenv.isDarwin shortenPerlShebang; + nativeBuildInputs = lib.optional stdenv.hostPlatform.isDarwin shortenPerlShebang; propagatedBuildInputs = [ LWP ]; - postInstall = lib.optionalString stdenv.isDarwin '' + postInstall = lib.optionalString stdenv.hostPlatform.isDarwin '' shortenPerlShebang $out/bin/download-entities.pl ''; meta = { @@ -28524,12 +28524,12 @@ with self; { url = "mirror://cpan/authors/id/G/GR/GRANTM/XML-Filter-Sort-1.01.tar.gz"; hash = "sha256-UQWF85pJFszV+o1UXpYXnJHq9vx8l6QBp1aOhBFi+l8="; }; - nativeBuildInputs = lib.optional stdenv.isDarwin shortenPerlShebang; + nativeBuildInputs = lib.optional stdenv.hostPlatform.isDarwin shortenPerlShebang; propagatedBuildInputs = [ XMLSAX XMLSAXWriter ]; - postInstall = lib.optionalString stdenv.isDarwin '' + postInstall = lib.optionalString stdenv.hostPlatform.isDarwin '' shortenPerlShebang $out/bin/xmlsort ''; meta = { @@ -28581,7 +28581,7 @@ with self; { }; SKIP_SAX_INSTALL = 1; buildInputs = [ AlienBuild AlienLibxml2 ] - ++ lib.optionals stdenv.isDarwin (with pkgs; [ libiconv zlib ]); + ++ lib.optionals stdenv.hostPlatform.isDarwin (with pkgs; [ libiconv zlib ]); patches = [ # https://github.com/shlomif/perl-XML-LibXML/pull/87 ../development/perl-modules/XML-LibXML-fix-tests-libxml-2.13.0.patch @@ -28659,7 +28659,7 @@ with self; { patches = [ ../development/perl-modules/xml-parser-0001-HACK-Assumes-Expat-paths-are-good.patch ]; postPatch = lib.optionalString (stdenv.buildPlatform != stdenv.hostPlatform) '' substituteInPlace Expat/Makefile.PL --replace 'use English;' '#' - '' + lib.optionalString stdenv.isCygwin '' + '' + lib.optionalString stdenv.hostPlatform.isCygwin '' sed -i"" -e "s@my \$compiler = File::Spec->catfile(\$path, \$cc\[0\]) \. \$Config{_exe};@my \$compiler = File::Spec->catfile(\$path, \$cc\[0\]) \. (\$^O eq 'cygwin' ? \"\" : \$Config{_exe});@" inc/Devel/CheckLib.pm ''; makeMakerFlags = [ "EXPATLIBPATH=${pkgs.expat.out}/lib" "EXPATINCPATH=${pkgs.expat.dev}/include" ]; @@ -28959,7 +28959,7 @@ with self; { hash = "sha256-JQDEeGnPXKjGHdI8Z7rav2a48e+14nkgdlfBzmk+IR4="; }; buildInputs = [ ExtUtilsCChecker Test2Suite ]; - perlPreHook = lib.optionalString (stdenv.isi686 || stdenv.isDarwin) "export LD=$CC"; + perlPreHook = lib.optionalString (stdenv.hostPlatform.isi686 || stdenv.hostPlatform.isDarwin) "export LD=$CC"; meta = { description = "XS functions to assist in parsing keyword syntax"; license = with lib.licenses; [ artistic1 gpl1Plus ]; @@ -28975,7 +28975,7 @@ with self; { hash = "sha256-Wn0myqMroqQQUZwMJLHYCznvMgdRN224vbef2u/pms0="; }; buildInputs = [ Test2Suite ]; - perlPreHook = lib.optionalString stdenv.isDarwin "export LD=$CC"; + perlPreHook = lib.optionalString stdenv.hostPlatform.isDarwin "export LD=$CC"; meta = { description = "XS functions to assist in parsing sub-like syntax"; license = with lib.licenses; [ artistic1 gpl1Plus ]; @@ -29037,7 +29037,7 @@ with self; { url = "mirror://cpan/authors/id/T/TO/TODDR/YAML-Syck-1.34.tar.gz"; hash = "sha256-zJFWzK69p5jr/i8xthnoBld/hg7RcEJi8X/608bjQVk="; }; - perlPreHook = lib.optionalString stdenv.isDarwin "export LD=$CC"; + perlPreHook = lib.optionalString stdenv.hostPlatform.isDarwin "export LD=$CC"; meta = { description = "Fast, lightweight YAML loader and dumper"; homepage = "https://github.com/toddr/YAML-Syck"; diff --git a/pkgs/top-level/php-packages.nix b/pkgs/top-level/php-packages.nix index 7cef004a8745..8710dd6d977d 100644 --- a/pkgs/top-level/php-packages.nix +++ b/pkgs/top-level/php-packages.nix @@ -253,7 +253,7 @@ in { datadog_trace = callPackage ../development/php-packages/datadog_trace { buildPecl = buildPecl.override { - stdenv = if stdenv.isDarwin then overrideSDK stdenv "11.0" else stdenv; + stdenv = if stdenv.hostPlatform.isDarwin then overrideSDK stdenv "11.0" else stdenv; }; inherit (pkgs) darwin; }; @@ -463,7 +463,7 @@ in { name = "iconv"; buildInputs = [ libiconv ]; configureFlags = [ "--with-iconv" ]; - doCheck = stdenv.isLinux; + doCheck = stdenv.hostPlatform.isLinux; } { name = "imap"; @@ -484,7 +484,7 @@ in { "LDAP_DIR=${openldap.dev}" "LDAP_INCDIR=${openldap.dev}/include" "LDAP_LIBDIR=${openldap.out}/lib" - ] ++ lib.optionals stdenv.isLinux [ + ] ++ lib.optionals stdenv.hostPlatform.isLinux [ "--with-ldap-sasl=${cyrus_sasl.dev}" ]; doCheck = false; @@ -528,11 +528,11 @@ in { name = "opcache"; buildInputs = [ pcre2 ] ++ lib.optional - (!stdenv.isDarwin && lib.meta.availableOn stdenv.hostPlatform valgrind) + (!stdenv.hostPlatform.isDarwin && lib.meta.availableOn stdenv.hostPlatform valgrind) valgrind.dev; configureFlags = lib.optional php.ztsSupport "--disable-opcache-jit"; zendExtension = true; - postPatch = lib.optionalString stdenv.isDarwin '' + postPatch = lib.optionalString stdenv.hostPlatform.isDarwin '' # Tests are flaky on darwin rm ext/opcache/tests/blacklist.phpt rm ext/opcache/tests/bug66338.phpt @@ -567,7 +567,7 @@ in { internalDeps = [ php.extensions.pdo ]; configureFlags = [ "--with-pdo-dblib=${freetds}" ]; # Doesn't seem to work on darwin. - enable = (!stdenv.isDarwin); + enable = (!stdenv.hostPlatform.isDarwin); doCheck = false; } { @@ -671,7 +671,7 @@ in { buildInputs = [ net-snmp openssl ]; configureFlags = [ "--with-snmp" ]; # net-snmp doesn't build on darwin. - enable = (!stdenv.isDarwin); + enable = (!stdenv.hostPlatform.isDarwin); doCheck = false; } { @@ -680,7 +680,7 @@ in { configureFlags = [ "--enable-soap" ]; - doCheck = stdenv.isDarwin; # TODO: a couple tests still fail on *-linux + doCheck = stdenv.hostPlatform.isDarwin; # TODO: a couple tests still fail on *-linux internalDeps = [ php.extensions.session ]; patches = lib.optionals (lib.versions.majorMinor php.version == "8.1") [ # Fix tests with libxml2 2.12 @@ -731,7 +731,7 @@ in { # The `sqlite3_bind_bug68849.phpt` test is currently broken for i686 Linux systems since sqlite 3.43, cf.: # - https://github.com/php/php-src/issues/12076 # - https://www.sqlite.org/forum/forumpost/abbb95376ec6cd5f - patches = lib.optionals (stdenv.isi686 && stdenv.isLinux) [ + patches = lib.optionals (stdenv.hostPlatform.isi686 && stdenv.hostPlatform.isLinux) [ ../development/interpreters/php/skip-sqlite3_bind_bug68849.phpt.patch ]; } diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 386d2d8be17f..696a16f844ee 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -7644,7 +7644,7 @@ self: super: with self; { matlink-gpapi = callPackage ../development/python-modules/matlink-gpapi { }; matplotlib = callPackage ../development/python-modules/matplotlib { - stdenv = if stdenv.isDarwin then pkgs.clangStdenv else pkgs.stdenv; + stdenv = if stdenv.hostPlatform.isDarwin then pkgs.clangStdenv else pkgs.stdenv; inherit (pkgs.darwin.apple_sdk.frameworks) Cocoa; ghostscript = pkgs.ghostscript_headless; }; @@ -10687,7 +10687,7 @@ self: super: with self; { psd-tools = callPackage ../development/python-modules/psd-tools { }; psutil = callPackage ../development/python-modules/psutil { - stdenv = if pkgs.stdenv.isDarwin then pkgs.overrideSDK pkgs.stdenv "11.0" else pkgs.stdenv; + stdenv = if pkgs.stdenv.hostPlatform.isDarwin then pkgs.overrideSDK pkgs.stdenv "11.0" else pkgs.stdenv; inherit (pkgs.darwin.apple_sdk.frameworks) CoreFoundation IOKit; }; diff --git a/pkgs/top-level/qt5-packages.nix b/pkgs/top-level/qt5-packages.nix index b0091a16f3da..e491c443657f 100644 --- a/pkgs/top-level/qt5-packages.nix +++ b/pkgs/top-level/qt5-packages.nix @@ -154,7 +154,7 @@ in (noExtraAttrs (kdeFrameworks // plasmaMobileGear // plasma5 // plasma5.thirdP liblastfm = callPackage ../development/libraries/liblastfm { }; libopenshot = callPackage ../development/libraries/libopenshot { - stdenv = if pkgs.stdenv.isDarwin then pkgs.overrideSDK pkgs.stdenv "11.0" else pkgs.stdenv; + stdenv = if pkgs.stdenv.hostPlatform.isDarwin then pkgs.overrideSDK pkgs.stdenv "11.0" else pkgs.stdenv; python3 = pkgs.python311; }; @@ -205,7 +205,7 @@ in (noExtraAttrs (kdeFrameworks // plasmaMobileGear // plasma5 // plasma5.thirdP pulseaudio-qt = callPackage ../development/libraries/pulseaudio-qt { }; qca = callPackage ../development/libraries/qca { - stdenv = if pkgs.stdenv.isDarwin then pkgs.overrideSDK pkgs.stdenv "11.0" else pkgs.stdenv; + stdenv = if pkgs.stdenv.hostPlatform.isDarwin then pkgs.overrideSDK pkgs.stdenv "11.0" else pkgs.stdenv; inherit (libsForQt5) qtbase; }; qca-qt5 = self.qca; @@ -237,7 +237,7 @@ in (noExtraAttrs (kdeFrameworks // plasmaMobileGear // plasma5 // plasma5.thirdP qtinstaller = callPackage ../development/libraries/qtinstaller { }; qtkeychain = callPackage ../development/libraries/qtkeychain { - stdenv = if pkgs.stdenv.isDarwin then pkgs.overrideSDK pkgs.stdenv "11.0" else pkgs.stdenv; + stdenv = if pkgs.stdenv.hostPlatform.isDarwin then pkgs.overrideSDK pkgs.stdenv "11.0" else pkgs.stdenv; inherit (pkgs.darwin.apple_sdk.frameworks) CoreFoundation Security; }; diff --git a/pkgs/top-level/stage.nix b/pkgs/top-level/stage.nix index 6ad193c8926d..265ab242d86d 100644 --- a/pkgs/top-level/stage.nix +++ b/pkgs/top-level/stage.nix @@ -312,7 +312,7 @@ let crossSystem = { isStatic = true; parsed = - if stdenv.isLinux + if stdenv.hostPlatform.isLinux then makeMuslParsedPlatform stdenv.hostPlatform.parsed else stdenv.hostPlatform.parsed; gcc = lib.optionalAttrs (stdenv.hostPlatform.system == "powerpc64-linux") { abi = "elfv2"; } // diff --git a/pkgs/top-level/wine-packages.nix b/pkgs/top-level/wine-packages.nix index 18596f21014e..c31ae27c6fcf 100644 --- a/pkgs/top-level/wine-packages.nix +++ b/pkgs/top-level/wine-packages.nix @@ -9,35 +9,35 @@ rec { base = minimal.override { gettextSupport = true; - fontconfigSupport = stdenv.isLinux; - alsaSupport = stdenv.isLinux; + fontconfigSupport = stdenv.hostPlatform.isLinux; + alsaSupport = stdenv.hostPlatform.isLinux; openglSupport = true; vulkanSupport = true; tlsSupport = true; cupsSupport = true; - dbusSupport = stdenv.isLinux; - cairoSupport = stdenv.isLinux; + dbusSupport = stdenv.hostPlatform.isLinux; + cairoSupport = stdenv.hostPlatform.isLinux; cursesSupport = true; - saneSupport = stdenv.isLinux; - pulseaudioSupport = config.pulseaudio or stdenv.isLinux; - udevSupport = stdenv.isLinux; - xineramaSupport = stdenv.isLinux; + saneSupport = stdenv.hostPlatform.isLinux; + pulseaudioSupport = config.pulseaudio or stdenv.hostPlatform.isLinux; + udevSupport = stdenv.hostPlatform.isLinux; + xineramaSupport = stdenv.hostPlatform.isLinux; sdlSupport = true; mingwSupport = true; usbSupport = true; - waylandSupport = stdenv.isLinux; - x11Support = stdenv.isLinux; + waylandSupport = stdenv.hostPlatform.isLinux; + x11Support = stdenv.hostPlatform.isLinux; }; full = base.override { - gtkSupport = stdenv.isLinux; + gtkSupport = stdenv.hostPlatform.isLinux; gstreamerSupport = true; openclSupport = true; odbcSupport = true; - netapiSupport = stdenv.isLinux; - vaSupport = stdenv.isLinux; + netapiSupport = stdenv.hostPlatform.isLinux; + vaSupport = stdenv.hostPlatform.isLinux; pcapSupport = true; - v4lSupport = stdenv.isLinux; + v4lSupport = stdenv.hostPlatform.isLinux; gphoto2Support = true; krb5Support = true; embedInstallers = true;