summary refs log tree commit diff
path: root/pkgs/test/haskell/documentationTarball/default.nix
blob: e3214fb49fededbe551f8a9b1549c1b3e013dad6 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
{ 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"
''