Skip to content

Commit e138313

Browse files
authored
treewide: stdenv.is -> stdenv.hostPlatform.is (#356363)
* treewide: stdenv.is -> stdenv.hostPlatform.is * treewide: nixfmt due to ci error
1 parent 0fdc918 commit e138313

File tree

90 files changed

+203
-194
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

90 files changed

+203
-194
lines changed

nixos/lib/qemu-common.nix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ rec {
5757
throwUnsupportedGuestSystem = guestMap:
5858
throw "Unsupported guest system ${guestSystem} for host ${hostSystem}, supported: ${lib.concatStringsSep ", " (lib.attrNames guestMap)}";
5959
in
60-
if hostStdenv.isLinux then
60+
if hostStdenv.hostPlatform.isLinux then
6161
linuxHostGuestMatrix.${guestSystem} or "${qemuPkg}/bin/qemu-kvm"
6262
else
6363
let

pkgs/applications/radio/sdrangel/default.nix

Lines changed: 44 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -69,48 +69,50 @@ stdenv.mkDerivation (finalAttrs: {
6969
wrapQtAppsHook
7070
];
7171

72-
buildInputs = [
73-
airspy
74-
airspyhf
75-
aptdec
76-
boost
77-
cm256cc
78-
codec2
79-
dab_lib
80-
dsdcc
81-
faad2
82-
ffmpeg
83-
fftwFloat
84-
flac
85-
glew
86-
hackrf
87-
hidapi
88-
libbladeRF
89-
libiio
90-
libopus
91-
libpulseaudio
92-
libusb1
93-
limesuite
94-
mbelib
95-
opencv4
96-
qt5compat
97-
qtcharts
98-
qtdeclarative
99-
qtlocation
100-
qtmultimedia
101-
qtscxml
102-
qtserialport
103-
qtspeech
104-
qttools
105-
qtwebsockets
106-
qtwebengine
107-
rtl-sdr
108-
serialdv
109-
sgp4
110-
soapysdr-with-plugins
111-
uhd
112-
zlib
113-
] ++ lib.optionals stdenv.isLinux [ qtwayland ] ++ lib.optionals withSDRplay [ sdrplay ];
72+
buildInputs =
73+
[
74+
airspy
75+
airspyhf
76+
aptdec
77+
boost
78+
cm256cc
79+
codec2
80+
dab_lib
81+
dsdcc
82+
faad2
83+
ffmpeg
84+
fftwFloat
85+
flac
86+
glew
87+
hackrf
88+
hidapi
89+
libbladeRF
90+
libiio
91+
libopus
92+
libpulseaudio
93+
libusb1
94+
limesuite
95+
mbelib
96+
opencv4
97+
qt5compat
98+
qtcharts
99+
qtdeclarative
100+
qtlocation
101+
qtmultimedia
102+
qtscxml
103+
qtserialport
104+
qtspeech
105+
qttools
106+
qtwebsockets
107+
qtwebengine
108+
rtl-sdr
109+
serialdv
110+
sgp4
111+
soapysdr-with-plugins
112+
uhd
113+
zlib
114+
]
115+
++ lib.optionals stdenv.hostPlatform.isLinux [ qtwayland ] ++ lib.optionals withSDRplay [ sdrplay ];
114116

115117
cmakeFlags = [
116118
"-DAPT_DIR=${aptdec}"

pkgs/applications/science/misc/root/default.nix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,7 @@ stdenv.mkDerivation rec {
230230

231231
# workaround for
232232
# https://github.com/root-project/root/issues/14778
233-
env.NIX_LDFLAGS = lib.optionalString (!stdenv.isDarwin) "--version-script,${writeText "version.map" "ROOT { global: *; };"}";
233+
env.NIX_LDFLAGS = lib.optionalString (!stdenv.hostPlatform.isDarwin) "--version-script,${writeText "version.map" "ROOT { global: *; };"}";
234234

235235
# To use the debug information on the fly (without installation)
236236
# add the outPath of root.debug into NIX_DEBUG_INFO_DIRS (in PATH-like format)

pkgs/build-support/rust/build-rust-package/default.nix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ assert useSysroot -> !(args.doCheck or true);
104104

105105
stdenv.mkDerivation ((removeAttrs args [ "depsExtraArgs" "cargoUpdateHook" "cargoLock" ]) // lib.optionalAttrs useSysroot {
106106
RUSTFLAGS = "--sysroot ${sysroot} " + (args.RUSTFLAGS or "");
107-
} // lib.optionalAttrs (stdenv.isDarwin && buildType == "debug") {
107+
} // lib.optionalAttrs (stdenv.hostPlatform.isDarwin && buildType == "debug") {
108108
RUSTFLAGS =
109109
"-C split-debuginfo=packed "
110110
+ lib.optionalString useSysroot "--sysroot ${sysroot} "

pkgs/by-name/al/almo/package.nix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ stdenv.mkDerivation {
2727
makeFlags = [ "all" ];
2828

2929
# remove darwin-only linker flag on linux
30-
postPatch = lib.optionalString (!stdenv.isDarwin) ''
30+
postPatch = lib.optionalString (!stdenv.hostPlatform.isDarwin) ''
3131
substituteInPlace scripts/pybind.sh \
3232
--replace-fail " -undefined dynamic_lookup" ""
3333
'';

pkgs/by-name/ar/arti/package.nix

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@ rustPlatform.buildRustPackage rec {
2828

2929
buildInputs =
3030
[ sqlite ]
31-
++ lib.optionals stdenv.isLinux [ openssl ]
32-
++ lib.optionals stdenv.isDarwin (
31+
++ lib.optionals stdenv.hostPlatform.isLinux [ openssl ]
32+
++ lib.optionals stdenv.hostPlatform.isDarwin (
3333
with darwin.apple_sdk.frameworks;
3434
[
3535
CoreServices

pkgs/by-name/ba/backrest/package.nix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ buildGoModule {
5151
[
5252
"TestServeIndex" # Fails with handler returned wrong content encoding
5353
]
54-
++ lib.optionals stdenv.isDarwin [
54+
++ lib.optionals stdenv.hostPlatform.isDarwin [
5555
"TestBackup" # relies on ionice
5656
];
5757
in

pkgs/by-name/bi/binsider/package.nix

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@ rustPlatform.buildRustPackage rec {
1818

1919
cargoHash = "sha256-EGqoHMkBPIhKV/PozArQ62bH/Gqc92S6ZabTjmIbQeE=";
2020

21-
buildNoDefaultFeatures = !stdenv.isLinux;
21+
buildNoDefaultFeatures = !stdenv.hostPlatform.isLinux;
2222

23-
buildInputs = lib.optionals stdenv.isDarwin (
23+
buildInputs = lib.optionals stdenv.hostPlatform.isDarwin (
2424
with darwin.apple_sdk.frameworks;
2525
[
2626
AppKit

pkgs/by-name/bi/bitwarden-desktop/package.nix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ in buildNpmPackage rec {
167167
168168
mkdir $out
169169
170-
pushd apps/desktop/dist/linux-${lib.optionalString stdenv.isAarch64 "arm64-"}unpacked
170+
pushd apps/desktop/dist/linux-${lib.optionalString stdenv.hostPlatform.isAarch64 "arm64-"}unpacked
171171
mkdir -p $out/opt/Bitwarden
172172
cp -r locales resources{,.pak} $out/opt/Bitwarden
173173
popd

pkgs/by-name/ca/cargo-tauri/test-app.nix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ stdenv.mkDerivation (finalAttrs: {
5050

5151
buildInputs =
5252
[ openssl ]
53-
++ lib.optionals stdenv.isLinux [
53+
++ lib.optionals stdenv.hostPlatform.isLinux [
5454
glib-networking
5555
libayatana-appindicator
5656
webkitgtk_4_1

0 commit comments

Comments
 (0)