Unverified Commit 492e9179 authored by Emily's avatar Emily Committed by GitHub
Browse files

treewide: replace `stdenv.is` with `stdenv.hostPlatform.is` (#341407)

parents b883a06a 63fa53d9
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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.<libname>`
+1 −1
Original line number Diff line number Diff line
@@ -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"
+1 −1
Original line number Diff line number Diff line
@@ -13,5 +13,5 @@ mkShell {
      clippy
      rustfmt
    ]
    ++ lib.optional stdenv.isDarwin pkgs.libiconv;
    ++ lib.optional stdenv.hostPlatform.isDarwin pkgs.libiconv;
}
+1 −1
Original line number Diff line number Diff line
@@ -52,7 +52,7 @@ let
        ${lib.optionalString (pkgs.stdenv.hostPlatform == pkgs.stdenv.buildPlatform) ''
        <!-- Pre-generated font caches -->
        <cachedir>${cache}</cachedir>
        ${lib.optionalString (pkgs.stdenv.isx86_64 && cfg.cache32Bit) ''
        ${lib.optionalString (pkgs.stdenv.hostPlatform.isx86_64 && cfg.cache32Bit) ''
          <cachedir>${cache32}</cachedir>
        ''}
        ''}
+2 −2
Original line number Diff line number Diff line
@@ -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 [
Loading