Skip to content

Commit

Permalink
treewide: replace stdenv.is in non nix files
Browse files Browse the repository at this point in the history
Continuing e0464e4
  • Loading branch information
Artturin committed Sep 27, 2024
1 parent 1174fd6 commit 40799fc
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 11 deletions.
4 changes: 2 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -637,15 +637,15 @@ Names of files and directories should be in lowercase, with dashes between words
```nix
{
buildInputs = lib.optional stdenv.isDarwin iconv;
buildInputs = lib.optional stdenv.hostPlatform.isDarwin iconv;
}
```
instead of
```nix
{
buildInputs = if stdenv.isDarwin then [ iconv ] else null;
buildInputs = if stdenv.hostPlatform.isDarwin then [ iconv ] else null;
}
```
Expand Down
4 changes: 2 additions & 2 deletions doc/languages-frameworks/beam.section.md
Original file line number Diff line number Diff line change
Expand Up @@ -349,8 +349,8 @@ let
nodePackages.prettier
];
inputs = basePackages ++ lib.optionals stdenv.isLinux [ inotify-tools ]
++ lib.optionals stdenv.isDarwin
inputs = basePackages ++ lib.optionals stdenv.hostPlatform.isLinux [ inotify-tools ]
++ lib.optionals stdenv.hostPlatform.isDarwin
(with darwin.apple_sdk.frameworks; [ CoreFoundation CoreServices ]);
# define shell startup command
Expand Down
2 changes: 1 addition & 1 deletion doc/languages-frameworks/emscripten.section.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ One advantage is that when `pkgs.zlib` is updated, it will automatically update
echo "================= /testing zlib using node ================="
'';
postPatch = pkgs.lib.optionalString pkgs.stdenv.isDarwin ''
postPatch = pkgs.lib.optionalString pkgs.stdenv.hostPlatform.isDarwin ''
substituteInPlace configure \
--replace-fail '/usr/bin/libtool' 'ar' \
--replace-fail 'AR="libtool"' 'AR="ar"' \
Expand Down
4 changes: 2 additions & 2 deletions doc/languages-frameworks/perl.section.md
Original file line number Diff line number Diff line change
Expand Up @@ -125,8 +125,8 @@ On Darwin, if a script has too many `-Idir` flags in its first line (its “sheb
hash = "sha256-vOhB/FwQMC8PPvdnjDvxRpU6jAZcC6GMQfc0AH4uwKg=";
};
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/exiftool
'';
};
Expand Down
2 changes: 1 addition & 1 deletion doc/languages-frameworks/python.section.md
Original file line number Diff line number Diff line change
Expand Up @@ -1306,7 +1306,7 @@ for example:
] ++ lib.optionals (pythonAtLeast "3.8") [
# broken due to python3.8 async changes
"async"
] ++ lib.optionals stdenv.isDarwin [
] ++ lib.optionals stdenv.hostPlatform.isDarwin [
# can fail when building with other packages
"socket"
];
Expand Down
2 changes: 1 addition & 1 deletion doc/stdenv/platform-notes.chapter.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Some common issues when packaging software for Darwin:
stdenv.mkDerivation {
name = "libfoo-1.2.3";
# ...
makeFlags = lib.optional stdenv.isDarwin "LDFLAGS=-Wl,-install_name,$(out)/lib/libfoo.dylib";
makeFlags = lib.optional stdenv.hostPlatform.isDarwin "LDFLAGS=-Wl,-install_name,$(out)/lib/libfoo.dylib";
}
```

Expand Down
4 changes: 2 additions & 2 deletions pkgs/applications/networking/browsers/brave/update.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,15 @@ cat > $SCRIPT_DIR/default.nix << EOF
callPackage ./make-brave.nix (removeAttrs args [ "callPackage" ])
(
if stdenv.isAarch64 then
if stdenv.hostPlatform.isAarch64 then
rec {
pname = "brave";
version = "${latestVersionAarch64}";
url = "https://github.com/brave/brave-browser/releases/download/v\${version}/brave-browser_\${version}_arm64.deb";
hash = "${hashAarch64}";
platform = "aarch64-linux";
}
else if stdenv.isx86_64 then
else if stdenv.hostPlatform.isx86_64 then
rec {
pname = "brave";
version = "${latestVersionAmd64}";
Expand Down

0 comments on commit 40799fc

Please sign in to comment.