Skip to content

Commit 0668fdb

Browse files
K900rycee
authored andcommitted
treewide: stdenv.is* -> stdenv.hostPlatform.is*
Nixpkgs officialy deprecated the former.
1 parent e13ba5e commit 0668fdb

86 files changed

Lines changed: 158 additions & 110 deletions

File tree

Some content is hidden

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

modules/lib/darwin.nix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ let
6363
intervalsString = lib.concatStringsSep ", " intervals;
6464

6565
assertInterval = option: interval: pkgs: {
66-
assertion = pkgs.stdenv.isDarwin -> lib.elem interval intervals;
66+
assertion = pkgs.stdenv.hostPlatform.isDarwin -> lib.elem interval intervals;
6767
message = "On Darwin, ${option} must be one of: ${intervalsString}.";
6868
};
6969

modules/misc/mozilla-messaging-hosts.nix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
}:
77

88
let
9-
inherit (pkgs.stdenv) isDarwin;
9+
inherit (pkgs.stdenv.hostPlatform) isDarwin;
1010

1111
cfg = config.mozilla;
1212

modules/misc/nixpkgs.nix

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,10 @@ in
143143
# `_pkgs`, see https://github.com/nix-community/home-manager/pull/993
144144
pkgs = lib.mkOverride lib.modules.defaultOverridePriority _pkgs;
145145
pkgs_i686 =
146-
if _pkgs.stdenv.isLinux && _pkgs.stdenv.hostPlatform.isx86 then _pkgs.pkgsi686Linux else { };
146+
if _pkgs.stdenv.hostPlatform.isLinux && _pkgs.stdenv.hostPlatform.isx86 then
147+
_pkgs.pkgsi686Linux
148+
else
149+
{ };
147150
};
148151
};
149152
}

modules/programs/aerc/default.nix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ let
5252
) config.accounts.email.accounts;
5353

5454
configDir =
55-
if (pkgs.stdenv.isDarwin && !config.xdg.enable) then
55+
if (pkgs.stdenv.hostPlatform.isDarwin && !config.xdg.enable) then
5656
"Library/Preferences/aerc"
5757
else
5858
"${config.xdg.configHome}/aerc";

modules/programs/bacon.nix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ let
1111
settingsFormat = pkgs.formats.toml { };
1212

1313
configDir =
14-
if pkgs.stdenv.isDarwin then
14+
if pkgs.stdenv.hostPlatform.isDarwin then
1515
"Library/Application Support/org.dystroy.bacon"
1616
else
1717
"${config.xdg.configHome}/bacon";

modules/programs/browserpass.nix

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,9 @@ in
3535
home.file = lib.mergeAttrsList (
3636
lib.concatMap (
3737
x:
38-
with pkgs.stdenv;
38+
let
39+
inherit (pkgs.stdenv.hostPlatform) isDarwin;
40+
in
3941
if x == "brave" then
4042
let
4143
dir =

modules/programs/chromium.nix

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,7 @@ let
227227
if builtins.hasAttr packageName supportedBrowsers then packageName else browser;
228228

229229
isProprietaryChrome = lib.hasPrefix "google-chrome" effectiveBrowser;
230-
supportsUserExtensions = !isProprietaryChrome || pkgs.stdenv.isDarwin;
230+
supportsUserExtensions = !isProprietaryChrome || pkgs.stdenv.hostPlatform.isDarwin;
231231

232232
darwinDirs = {
233233
chromium = "Chromium";
@@ -245,7 +245,7 @@ let
245245
};
246246

247247
configDir =
248-
if pkgs.stdenv.isDarwin then
248+
if pkgs.stdenv.hostPlatform.isDarwin then
249249
"Library/Application Support/" + (darwinDirs."${effectiveBrowser}" or effectiveBrowser)
250250
else
251251
"${config.xdg.configHome}/" + (linuxDirs."${effectiveBrowser}" or effectiveBrowser);
@@ -274,7 +274,7 @@ let
274274
};
275275

276276
plasmaSupportEnabled =
277-
pkgs.stdenv.isLinux && lib.elem browser plasmaSupportedBrowsers && cfg.plasmaSupport;
277+
pkgs.stdenv.hostPlatform.isLinux && lib.elem browser plasmaSupportedBrowsers && cfg.plasmaSupport;
278278

279279
nativeMessagingHosts = lib.unique (
280280
cfg.nativeMessagingHosts ++ lib.optional plasmaSupportEnabled cfg.plasmaBrowserIntegrationPackage
@@ -294,14 +294,14 @@ let
294294
message = "Cannot set `commandLineArgs` when `package` is null for ${browser}.";
295295
}
296296
{
297-
assertion = !(isProprietaryChrome && pkgs.stdenv.isLinux && cfg.extensions != [ ]);
297+
assertion = !(isProprietaryChrome && pkgs.stdenv.hostPlatform.isLinux && cfg.extensions != [ ]);
298298
message = "Cannot set `extensions` for `${effectiveBrowser}` on Linux. Google Chrome only loads external extensions from system-managed directories, which Home Manager does not manage.";
299299
}
300300
{
301301
assertion =
302302
!(
303303
isProprietaryChrome
304-
&& pkgs.stdenv.isDarwin
304+
&& pkgs.stdenv.hostPlatform.isDarwin
305305
&& !builtins.all (
306306
ext: ext.crxPath == null && ext.version == null && ext.updateUrl == chromeWebStoreUpdateUrl
307307
) cfg.extensions

modules/programs/cudatext.nix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ in
131131
config =
132132
let
133133
settingsPath =
134-
if pkgs.stdenv.isDarwin then
134+
if pkgs.stdenv.hostPlatform.isDarwin then
135135
"Library/Application Support/CudaText/settings"
136136
else
137137
"${lib.removePrefix config.home.homeDirectory config.xdg.configHome}/cudatext/settings";

modules/programs/iamb.nix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ let
88
cfg = config.programs.iamb;
99
tomlFormat = pkgs.formats.toml { };
1010
configDir =
11-
if pkgs.stdenv.isDarwin && !config.xdg.enable then
11+
if pkgs.stdenv.hostPlatform.isDarwin && !config.xdg.enable then
1212
"Library/Application Support"
1313
else
1414
config.xdg.configHome;

modules/programs/jujutsu.nix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ let
1313

1414
# jj v0.29+ deprecated support for "~/Library/Application Support" on Darwin.
1515
configDir =
16-
if pkgs.stdenv.isDarwin && !(lib.versionAtLeast packageVersion "0.29.0") then
16+
if pkgs.stdenv.hostPlatform.isDarwin && !(lib.versionAtLeast packageVersion "0.29.0") then
1717
"Library/Application Support"
1818
else
1919
config.xdg.configHome;

0 commit comments

Comments
 (0)