doc: extract manpage-urls test into its own package
This commit is contained in:
parent
2266280af7
commit
8bb7777aee
@ -93,26 +93,6 @@ in pkgs.stdenv.mkDerivation {
|
|||||||
|
|
||||||
passthru = {
|
passthru = {
|
||||||
inherit pythonInterpreterTable;
|
inherit pythonInterpreterTable;
|
||||||
tests.manpage-urls = with pkgs; testers.invalidateFetcherByDrvHash
|
tests.manpage-urls = callPackage ./tests/manpage-urls.nix { };
|
||||||
({ 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;
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
31
doc/tests/manpage-urls.nix
Normal file
31
doc/tests/manpage-urls.nix
Normal file
@ -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
|
||||||
|
''
|
||||||
|
) { }
|
Loading…
x
Reference in New Issue
Block a user