diff options
author | Philip Taron <philip.taron@gmail.com> | 2024-07-26 11:28:06 -0700 |
---|---|---|
committer | Philip Taron <philip.taron@gmail.com> | 2024-07-26 13:44:04 -0700 |
commit | 8bb7777aee22d012e05a44206202b73939e1dfac (patch) | |
tree | 878bef6db6aab5da166fe96a2cc22b11d1e5e4ac | |
parent | 2266280af7c3fd3d3248dbff4ac463efb6c435d8 (diff) |
doc: extract manpage-urls test into its own package
-rw-r--r-- | doc/default.nix | 22 | ||||
-rw-r--r-- | doc/tests/manpage-urls.nix | 31 |
2 files changed, 32 insertions, 21 deletions
diff --git a/doc/default.nix b/doc/default.nix index 6cbec54f7967..10c338e73b9f 100644 --- a/doc/default.nix +++ b/doc/default.nix @@ -93,26 +93,6 @@ in pkgs.stdenv.mkDerivation { passthru = { inherit pythonInterpreterTable; - tests.manpage-urls = with pkgs; testers.invalidateFetcherByDrvHash - ({ name ? "manual_check-manpage-urls" - , script - , urlsFile - }: runCommand name { - nativeBuildInputs = [ - cacert - (python3.withPackages (p: with p; [ - aiohttp - rich - structlog - ])) - ]; - outputHash = "sha256-47DEQpj8HBSa+/TImW+5JCeuQeRkm5NMpJWZG3hSuFU="; # Empty output - } '' - python3 ${script} ${urlsFile} - touch $out - '') { - script = ./tests/manpage-urls.py; - urlsFile = ./manpage-urls.json; - }; + tests.manpage-urls = callPackage ./tests/manpage-urls.nix { }; }; } diff --git a/doc/tests/manpage-urls.nix b/doc/tests/manpage-urls.nix new file mode 100644 index 000000000000..084fabdd0f3d --- /dev/null +++ b/doc/tests/manpage-urls.nix @@ -0,0 +1,31 @@ +{ + lib, + runCommand, + invalidateFetcherByDrvHash, + cacert, + python3, +}: + +invalidateFetcherByDrvHash ( + { + name ? "manual_check-manpage-urls", + script ? ./manpage-urls.py, + urlsFile ? ../manpage-urls.json, + }: + runCommand name + { + nativeBuildInputs = [ + cacert + (python3.withPackages (p: [ + p.aiohttp + p.rich + p.structlog + ])) + ]; + outputHash = "sha256-47DEQpj8HBSa+/TImW+5JCeuQeRkm5NMpJWZG3hSuFU="; # Empty output + } + '' + python3 ${script} ${urlsFile} + touch $out + '' +) { } |