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
|
@ -106,12 +106,18 @@
|
||||||
packages = forAllSystems (system:
|
packages = forAllSystems (system:
|
||||||
let
|
let
|
||||||
pkgs = nixpkgs.legacyPackages.${system};
|
pkgs = nixpkgs.legacyPackages.${system};
|
||||||
|
lib = pkgs.lib;
|
||||||
releaseInfo = nixpkgs.lib.importJSON ./release.json;
|
releaseInfo = nixpkgs.lib.importJSON ./release.json;
|
||||||
docs = import ./docs {
|
docs = import ./docs {
|
||||||
inherit pkgs;
|
inherit pkgs;
|
||||||
inherit (releaseInfo) release isReleaseBranch;
|
inherit (releaseInfo) release isReleaseBranch;
|
||||||
};
|
};
|
||||||
hmPkg = pkgs.callPackage ./home-manager { path = toString ./.; };
|
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 {
|
in {
|
||||||
default = hmPkg;
|
default = hmPkg;
|
||||||
home-manager = hmPkg;
|
home-manager = hmPkg;
|
||||||
|
@ -119,7 +125,7 @@
|
||||||
docs-html = docs.manual.html;
|
docs-html = docs.manual.html;
|
||||||
docs-json = docs.options.json;
|
docs-json = docs.options.json;
|
||||||
docs-manpages = docs.manPages;
|
docs-manpages = docs.manPages;
|
||||||
});
|
} // testPackages);
|
||||||
|
|
||||||
defaultPackage = forAllSystems (system: self.packages.${system}.default);
|
defaultPackage = forAllSystems (system: self.packages.${system}.default);
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in a new issue