about summary refs log tree commit diff
path: root/nixpkgs/pkgs/test/haskell/documentationTarball/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/test/haskell/documentationTarball/default.nix')
-rw-r--r--nixpkgs/pkgs/test/haskell/documentationTarball/default.nix17
1 files changed, 17 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/test/haskell/documentationTarball/default.nix b/nixpkgs/pkgs/test/haskell/documentationTarball/default.nix
new file mode 100644
index 000000000000..aec3dc41f268
--- /dev/null
+++ b/nixpkgs/pkgs/test/haskell/documentationTarball/default.nix
@@ -0,0 +1,17 @@
+{ pkgs, haskellPackages }:
+
+let
+  drv = haskellPackages.vector;
+  docs = pkgs.haskell.lib.documentationTarball drv;
+
+in pkgs.runCommand "test haskell.lib.documentationTarball" { } ''
+  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"
+''