mirror of
https://github.com/nix-community/home-manager.git
synced 2026-01-11 17:39:37 +08:00
tests: move package to its own file
Extract the `tests` package from `flake.nix` into its own file `tests/package.nix`. This a) de-couples it from the flake (to a degree) and b) allows more neatly using the callPackage pattern.
This commit is contained in:
committed by
Austin Horstman
parent
4ac96eb21c
commit
5fb2203af7
@@ -80,9 +80,7 @@
|
||||
./modules/misc/news/create-news-entry.sh
|
||||
'';
|
||||
|
||||
tests = pkgs.writeShellScriptBin "tests" ''
|
||||
exec ${pkgs.python3}/bin/python3 ${self}/tests/tests.py "$@"
|
||||
'';
|
||||
tests = pkgs.callPackage ./tests/package.nix { flake = self; };
|
||||
|
||||
docs-html = docs.manual.html;
|
||||
docs-htmlOpenTool = docs.manual.htmlOpenTool;
|
||||
|
||||
8
tests/package.nix
Normal file
8
tests/package.nix
Normal file
@@ -0,0 +1,8 @@
|
||||
{
|
||||
flake,
|
||||
python3,
|
||||
writeShellScriptBin,
|
||||
}:
|
||||
writeShellScriptBin "tests" ''
|
||||
exec ${python3}/bin/python3 ${flake}/tests/tests.py "$@"
|
||||
''
|
||||
Reference in New Issue
Block a user