nixpkgs/pkgs/test/haskell/documentationTarball/default.nix
sternenseemann 3e19234f34 tests.haskell: set meta.platforms
This allows packagePlatforms to pick up on the overall supported
platforms and schedule builds on Hydra for more than the evaluation
platform (usually x86_64-linux).
2021-07-13 15:37:22 +02:00

22 lines
468 B
Nix

{ pkgs, haskellPackages }:
let
drv = haskellPackages.vector;
docs = pkgs.haskell.lib.documentationTarball drv;
in pkgs.runCommand "test haskell.lib.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"
''