depot/third_party/nixpkgs/pkgs/test/haskell/documentationTarball/default.nix
Default email ce641f4048 Project import generated by Copybara.
GitOrigin-RevId: bc5d68306b40b8522ffb69ba6cff91898c2fbbff
2021-12-06 17:07:01 +01:00

21 lines
484 B
Nix

{ pkgs, haskellPackages }:
let
drv = haskellPackages.vector;
docs = pkgs.haskell.lib.compose.documentationTarball drv;
in pkgs.runCommand "test haskell.lib.compose.documentationTarball" {
meta = {
inherit (docs.meta) platforms;
};
} ''
tar xvzf "${docs}/${drv.name}-docs.tar.gz"
# Check for Haddock html
find "${drv.name}-docs" | grep -q "Data-Vector.html"
# Check for source html
find "${drv.name}-docs" | grep -q "src/Data.Vector.html"
touch "$out"
''