diff options
author | Tristan Ross <tristan.ross@midstall.com> | 2024-06-06 21:20:49 -0700 |
---|---|---|
committer | Tristan Ross <tristan.ross@midstall.com> | 2024-06-06 21:20:49 -0700 |
commit | 9ebed2c8ea6d93b9279b835a20b604c58394f1de (patch) | |
tree | ef225d12891f269ed4e127db043db68d25e84cc1 /flake.nix | |
parent | 8233812d546ab7eb23e830d7c516f067893cad88 (diff) |
flake.nix: make checks friendly for non-x86_64-linux systems
Diffstat (limited to 'flake.nix')
-rw-r--r-- | flake.nix | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/flake.nix b/flake.nix index 90d249647896..8df05dc91263 100644 --- a/flake.nix +++ b/flake.nix @@ -44,13 +44,14 @@ ); }); - checks.x86_64-linux = { - tarball = jobs.x86_64-linux.tarball; + checks = forAllSystems (system: { + tarball = jobs.${system}.tarball; + } // lib.optionalAttrs (self.legacyPackages.${system}.stdenv.isLinux) { # 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>` nixosSystemAcceptsLib = (self.lib.nixosSystem { - pkgs = self.legacyPackages.x86_64-linux; + pkgs = self.legacyPackages.${system}; lib = self.lib.extend (final: prev: { ifThisFunctionIsMissingTheTestFails = final.id; }); @@ -66,13 +67,13 @@ }) ]; }).config.system.build.toplevel; - }; + }); htmlDocs = { - nixpkgsManual = jobs.x86_64-linux.manual; + nixpkgsManual = builtins.mapAttrs (_: jobSet: jobSet.manual) jobs; nixosManual = (import ./nixos/release-small.nix { nixpkgs = self; - }).nixos.manual.x86_64-linux; + }).nixos.manual; }; # The "legacy" in `legacyPackages` doesn't imply that the packages exposed |