summary refs log tree commit diff
path: root/pkgs/test/haskell/documentationTarball/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/test/haskell/documentationTarball/default.nix')
-rw-r--r--pkgs/test/haskell/documentationTarball/default.nix21
1 files changed, 21 insertions, 0 deletions
diff --git a/pkgs/test/haskell/documentationTarball/default.nix b/pkgs/test/haskell/documentationTarball/default.nix
new file mode 100644
index 00000000000..e3214fb49fe
--- /dev/null
+++ b/pkgs/test/haskell/documentationTarball/default.nix
@@ -0,0 +1,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"
+''