1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-17 19:21:04 +00:00

flake.nix: make pure

(cherry picked from commit 8233812d54)
This commit is contained in:
Tristan Ross 2024-06-06 21:18:15 -07:00 committed by github-actions[bot]
parent b8f3f7984c
commit 7c3f8a38d9

View file

@ -5,14 +5,15 @@
outputs = { self }:
let
jobs = import ./pkgs/top-level/release.nix {
nixpkgs = self;
};
libVersionInfoOverlay = import ./lib/flake-version-info.nix self;
lib = (import ./lib).extend libVersionInfoOverlay;
forAllSystems = lib.genAttrs lib.systems.flakeExposed;
jobs = forAllSystems (system: import ./pkgs/top-level/release.nix {
nixpkgs = self;
inherit system;
});
in
{
lib = lib.extend (final: prev: {
@ -44,11 +45,12 @@
});
checks.x86_64-linux = {
tarball = jobs.tarball;
tarball = jobs.x86_64-linux.tarball;
# 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;
lib = self.lib.extend (final: prev: {
ifThisFunctionIsMissingTheTestFails = final.id;
});
@ -67,7 +69,7 @@
};
htmlDocs = {
nixpkgsManual = jobs.manual;
nixpkgsManual = jobs.x86_64-linux.manual;
nixosManual = (import ./nixos/release-small.nix {
nixpkgs = self;
}).nixos.manual.x86_64-linux;