mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-06-10 03:23:29 +03:00
flake.nix: make checks friendly for non-x86_64-linux systems
This commit is contained in:
parent
8233812d54
commit
9ebed2c8ea
1 changed files with 7 additions and 6 deletions
13
flake.nix
13
flake.nix
|
@ -44,13 +44,14 @@
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
checks.x86_64-linux = {
|
checks = forAllSystems (system: {
|
||||||
tarball = jobs.x86_64-linux.tarball;
|
tarball = jobs.${system}.tarball;
|
||||||
|
} // lib.optionalAttrs (self.legacyPackages.${system}.stdenv.isLinux) {
|
||||||
# Test that ensures that the nixosSystem function can accept a lib argument
|
# 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
|
# 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>`
|
# alternatives include: `import` a file, or put a custom library in an option or in `_module.args.<libname>`
|
||||||
nixosSystemAcceptsLib = (self.lib.nixosSystem {
|
nixosSystemAcceptsLib = (self.lib.nixosSystem {
|
||||||
pkgs = self.legacyPackages.x86_64-linux;
|
pkgs = self.legacyPackages.${system};
|
||||||
lib = self.lib.extend (final: prev: {
|
lib = self.lib.extend (final: prev: {
|
||||||
ifThisFunctionIsMissingTheTestFails = final.id;
|
ifThisFunctionIsMissingTheTestFails = final.id;
|
||||||
});
|
});
|
||||||
|
@ -66,13 +67,13 @@
|
||||||
})
|
})
|
||||||
];
|
];
|
||||||
}).config.system.build.toplevel;
|
}).config.system.build.toplevel;
|
||||||
};
|
});
|
||||||
|
|
||||||
htmlDocs = {
|
htmlDocs = {
|
||||||
nixpkgsManual = jobs.x86_64-linux.manual;
|
nixpkgsManual = builtins.mapAttrs (_: jobSet: jobSet.manual) jobs;
|
||||||
nixosManual = (import ./nixos/release-small.nix {
|
nixosManual = (import ./nixos/release-small.nix {
|
||||||
nixpkgs = self;
|
nixpkgs = self;
|
||||||
}).nixos.manual.x86_64-linux;
|
}).nixos.manual;
|
||||||
};
|
};
|
||||||
|
|
||||||
# The "legacy" in `legacyPackages` doesn't imply that the packages exposed
|
# The "legacy" in `legacyPackages` doesn't imply that the packages exposed
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue