mirror of
https://github.com/nix-community/home-manager
synced 2024-12-24 02:39:48 +01:00
flake: add packages for tests
With this it is possible to build a specific test by running $ nix build -L .#test-{test name} For example $ nix build -L .#test-files-text
This commit is contained in:
parent
7a88cdedbd
commit
be97e96dab
1 changed files with 7 additions and 1 deletions
|
@ -106,12 +106,18 @@
|
|||
packages = forAllSystems (system:
|
||||
let
|
||||
pkgs = nixpkgs.legacyPackages.${system};
|
||||
lib = pkgs.lib;
|
||||
releaseInfo = nixpkgs.lib.importJSON ./release.json;
|
||||
docs = import ./docs {
|
||||
inherit pkgs;
|
||||
inherit (releaseInfo) release isReleaseBranch;
|
||||
};
|
||||
hmPkg = pkgs.callPackage ./home-manager { path = toString ./.; };
|
||||
|
||||
testPackages = let
|
||||
tests = import ./tests { inherit pkgs; };
|
||||
renameTestPkg = n: lib.nameValuePair "test-${n}";
|
||||
in lib.mapAttrs' renameTestPkg tests.build;
|
||||
in {
|
||||
default = hmPkg;
|
||||
home-manager = hmPkg;
|
||||
|
@ -119,7 +125,7 @@
|
|||
docs-html = docs.manual.html;
|
||||
docs-json = docs.options.json;
|
||||
docs-manpages = docs.manPages;
|
||||
});
|
||||
} // testPackages);
|
||||
|
||||
defaultPackage = forAllSystems (system: self.packages.${system}.default);
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue