diff --git a/.github/workflows/basic-eval.yml b/.github/workflows/basic-eval.yml index 5a8f20eb711d..b3a85c297925 100644 --- a/.github/workflows/basic-eval.yml +++ b/.github/workflows/basic-eval.yml @@ -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" ]' diff --git a/flake.nix b/flake.nix index 950eb2b5c4d1..9873c1c94971 100644 --- a/flake.nix +++ b/flake.nix @@ -80,8 +80,17 @@ 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.hostPlatform.isLinux && !self.legacyPackages.${system}.targetPlatform.isPower64) { + } // lib.optionalAttrs + ( + self.legacyPackages.${system}.stdenv.hostPlatform.isLinux + # Exclude power64 due to "libressl is not available on the requested hostPlatform" with hostPlatform being power64 + && !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.` @@ -111,10 +120,20 @@ }).nixos.manual; }; - devShells = forAllSystems (system: { - /** A shell to get tooling for Nixpkgs development. See nixpkgs/shell.nix. */ - default = import ./shell.nix { inherit 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; }; + }); /** A nested structure of [packages](https://nix.dev/manual/nix/latest/glossary#package-attribute-set) and other values.