summary refs log tree commit diff
path: root/pkgs/development/haskell-modules
diff options
context:
space:
mode:
authorPeter Simons <simons@cryp.to>2017-01-16 10:56:17 +0100
committerGitHub <noreply@github.com>2017-01-16 10:56:17 +0100
commitad412ba63af9b83a3007558bcbc24fd180d9cb62 (patch)
treef9247c5c534ffba50feba514e9da97461c4b7ae1 /pkgs/development/haskell-modules
parent94568ed762d09fbfef60702ec662c61fe3105090 (diff)
parent0ef29213b59305bb9da8675aee5f54ddc496fccc (diff)
downloadnixlib-ad412ba63af9b83a3007558bcbc24fd180d9cb62.tar
nixlib-ad412ba63af9b83a3007558bcbc24fd180d9cb62.tar.gz
nixlib-ad412ba63af9b83a3007558bcbc24fd180d9cb62.tar.bz2
nixlib-ad412ba63af9b83a3007558bcbc24fd180d9cb62.tar.lz
nixlib-ad412ba63af9b83a3007558bcbc24fd180d9cb62.tar.xz
nixlib-ad412ba63af9b83a3007558bcbc24fd180d9cb62.tar.zst
nixlib-ad412ba63af9b83a3007558bcbc24fd180d9cb62.zip
Merge pull request #21900 from Profpatsch/servant-docs
haskell: add servant sphinx docs to build
Diffstat (limited to 'pkgs/development/haskell-modules')
-rw-r--r--pkgs/development/haskell-modules/configuration-common.nix25
1 files changed, 25 insertions, 0 deletions
diff --git a/pkgs/development/haskell-modules/configuration-common.nix b/pkgs/development/haskell-modules/configuration-common.nix
index 882c81225e23..8a4dfa60151a 100644
--- a/pkgs/development/haskell-modules/configuration-common.nix
+++ b/pkgs/development/haskell-modules/configuration-common.nix
@@ -1082,6 +1082,31 @@ self: super: {
     servant = self.servant_0_9_1_1;
   });
 
+  # build servant docs from the repository
+  servant =
+    let
+      ver = super.servant.version;
+      docs = pkgs.stdenv.mkDerivation {
+        name = "servant-sphinx-documentation-${ver}";
+        src = "${pkgs.fetchFromGitHub {
+          owner = "haskell-servant";
+          repo = "servant";
+          rev = "v${ver}";
+          sha256 = "0fynv77m7rk79pdp535c2a2bd44csgr32zb4wqavbalr7grpxg4q";
+        }}/doc";
+        buildInputs = with pkgs.pythonPackages; [ sphinx recommonmark sphinx_rtd_theme ];
+        makeFlags = "html";
+        installPhase = ''
+          mv _build/html $out
+        '';
+      };
+    in overrideCabal super.servant (old: {
+      postInstall = old.postInstall or "" + ''
+        ln -s ${docs} $out/share/doc/servant
+      '';
+    });
+
+
   # https://github.com/plow-technologies/servant-auth/issues/20
   servant-auth = dontCheck super.servant-auth;