diff --git a/flake.nix b/flake.nix index e4e4016f6..96e572f40 100644 --- a/flake.nix +++ b/flake.nix @@ -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; diff --git a/tests/package.nix b/tests/package.nix new file mode 100644 index 000000000..244a167f0 --- /dev/null +++ b/tests/package.nix @@ -0,0 +1,8 @@ +{ + flake, + python3, + writeShellScriptBin, +}: +writeShellScriptBin "tests" '' + exec ${python3}/bin/python3 ${flake}/tests/tests.py "$@" +''