Unverified Commit e1a03d0f authored by Tristan Ross's avatar Tristan Ross Committed by GitHub
Browse files

flake.nix: fix `nix flake check --all-systems --no-build` (#349076)

parents 838156a8 705fdd9c
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -26,5 +26,6 @@ jobs:
        # This cache is for the nixpkgs repo checks and should not be trusted or used elsewhere.
        name: nixpkgs-ci
        signingKey: '${{ secrets.CACHIX_SIGNING_KEY }}'
    - run: nix --experimental-features 'nix-command flakes' flake check --all-systems --no-build
    # explicit list of supportedSystems is needed until aarch64-darwin becomes part of the trunk jobset
    - run: nix-build pkgs/top-level/release.nix -A release-checks --arg supportedSystems '[ "aarch64-darwin" "aarch64-linux" "x86_64-linux" "x86_64-darwin"  ]'
+25 −6
Original line number Diff line number Diff line
@@ -80,8 +80,17 @@

      checks = forAllSystems (system: {
        tarball = jobs.${system}.tarball;
      } // lib.optionalAttrs
        (
          self.legacyPackages.${system}.stdenv.hostPlatform.isLinux
          # Exclude power64 due to "libressl is not available on the requested hostPlatform" with hostPlatform being power64
      } // lib.optionalAttrs (self.legacyPackages.${system}.stdenv.hostPlatform.isLinux && !self.legacyPackages.${system}.targetPlatform.isPower64) {
          && !self.legacyPackages.${system}.targetPlatform.isPower64
          # Exclude armv6l-linux due to "cannot bootstrap GHC on this platform ('armv6l-linux' with libc 'defaultLibc')"
          && system != "armv6l-linux"
          # Exclude riscv64-linux due to "cannot bootstrap GHC on this platform ('riscv64-linux' with libc 'defaultLibc')"
          && system != "riscv64-linux"
        )
      {
        # 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>`
@@ -111,7 +120,17 @@
        }).nixos.manual;
      };

      devShells = forAllSystems (system: {
      devShells = forAllSystems (system:
        { } // lib.optionalAttrs
          (
            # Exclude armv6l-linux because "Package ‘ghc-9.6.6’ in .../pkgs/development/compilers/ghc/common-hadrian.nix:579 is not available on the requested hostPlatform"
            system != "armv6l-linux"
            # Exclude riscv64-linux because "Package ‘ghc-9.6.6’ in .../pkgs/development/compilers/ghc/common-hadrian.nix:579 is not available on the requested hostPlatform"
            && system != "riscv64-linux"
            # Exclude FreeBSD because "Package ‘ghc-9.6.6’ in .../pkgs/development/compilers/ghc/common-hadrian.nix:579 is not available on the requested hostPlatform"
            && !self.legacyPackages.${system}.stdenv.hostPlatform.isFreeBSD
          )
        {
          /** A shell to get tooling for Nixpkgs development. See nixpkgs/shell.nix. */
          default = import ./shell.nix { inherit system; };
        });