mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-10-02 21:10:08 +00:00
flake.nix: make checks friendly for non-x86_64-linux systems
(cherry picked from commit 9ebed2c8ea)
Without the slightly backwards incompatible changes,
see https://github.com/NixOS/nixpkgs/pull/317772#discussion_r1632475729
This commit is contained in:
committed by
Silvan Mosberger
parent
7c3f8a38d9
commit
b4c4caeb7d
@@ -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,7 +67,7 @@
|
||||
})
|
||||
];
|
||||
}).config.system.build.toplevel;
|
||||
};
|
||||
});
|
||||
|
||||
htmlDocs = {
|
||||
nixpkgsManual = jobs.x86_64-linux.manual;
|
||||
|
||||
Reference in New Issue
Block a user