mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-02 03:43:06 +00:00
e0c43a96d2
* testers.lycheeLinkCheck: init Co-authored-by: Valentin Gagarin <valentin.gagarin@tweag.io>
13 lines
459 B
Nix
13 lines
459 B
Nix
{ runCommand, testers }:
|
|
let
|
|
sitePkg = runCommand "site" { } ''
|
|
dist=$out/dist
|
|
mkdir -p $dist
|
|
echo "<html><body><a href=\"https://example.com/foo.html\">foo</a><a href=\"https://nixos.org/this-is-ignored.html\">bar</a></body></html>" > $dist/index.html
|
|
echo "<html><body><a href=\".\">index</a></body></html>" > $dist/foo.html
|
|
'';
|
|
in testers.lycheeLinkCheck rec {
|
|
site = sitePkg + "/dist";
|
|
remap = { "https://example.com" = site; };
|
|
}
|