summary refs log tree commit diff
path: root/pkgs/development
diff options
context:
space:
mode:
authorPeter Simons <simons@cryp.to>2010-01-05 15:17:17 +0000
committerPeter Simons <simons@cryp.to>2010-01-05 15:17:17 +0000
commit1dfec1c4679fa34f86955ce39d75516a541ef739 (patch)
treea8465cb79dcb2d1bfaed3707e9079e163826e7cc /pkgs/development
parent35358995073fc016a44a32d4f1211d80eaeea4aa (diff)
downloadnixlib-1dfec1c4679fa34f86955ce39d75516a541ef739.tar
nixlib-1dfec1c4679fa34f86955ce39d75516a541ef739.tar.gz
nixlib-1dfec1c4679fa34f86955ce39d75516a541ef739.tar.bz2
nixlib-1dfec1c4679fa34f86955ce39d75516a541ef739.tar.lz
nixlib-1dfec1c4679fa34f86955ce39d75516a541ef739.tar.xz
nixlib-1dfec1c4679fa34f86955ce39d75516a541ef739.tar.zst
nixlib-1dfec1c4679fa34f86955ce39d75516a541ef739.zip
pkgs/development/libraries/haskell/cabal/cabal.nix: build haddock documentation for Haskell libraries
svn path=/nixpkgs/trunk/; revision=19237
Diffstat (limited to 'pkgs/development')
-rw-r--r--pkgs/development/libraries/haskell/cabal/cabal.nix25
1 files changed, 14 insertions, 11 deletions
diff --git a/pkgs/development/libraries/haskell/cabal/cabal.nix b/pkgs/development/libraries/haskell/cabal/cabal.nix
index 5c83e90dc447..931991a700e4 100644
--- a/pkgs/development/libraries/haskell/cabal/cabal.nix
+++ b/pkgs/development/libraries/haskell/cabal/cabal.nix
@@ -9,15 +9,15 @@ attrs :
 
             # pname should be defined by the client to be the package basename
             # version should be defined by the client to be the package version
- 
+
             # fname is the internal full name of the package
             fname = "${self.pname}-${self.version}";
 
-	    # name is the external full name of the package; usually we prefix
-	    # all packages with haskell- to avoid name clashes for libraries;
-	    # if that is not desired (for applications), name can be set to
-	    # fname.
-            name = "haskell-${self.pname}-ghc${attrs.ghc.ghc.version}-${self.version}"; 
+            # name is the external full name of the package; usually we prefix
+            # all packages with haskell- to avoid name clashes for libraries;
+            # if that is not desired (for applications), name can be set to
+            # fname.
+            name = "haskell-${self.pname}-ghc${attrs.ghc.ghc.version}-${self.version}";
 
             # the default download location for Cabal packages is Hackage,
             # you still have to specify the checksum
@@ -66,12 +66,15 @@ attrs :
 
               ./Setup build
 
+              export GHC_PACKAGE_PATH=$(ghc-packages)
+              ./Setup haddock
+
               eval "$postBuild"
             '';
 
-	    # installs via Cabal; creates a registration file for nix-support
-	    # so that the package can be used in other Haskell-builds; also
-	    # adds all propagated build inputs to the user environment packages
+            # installs via Cabal; creates a registration file for nix-support
+            # so that the package can be used in other Haskell-builds; also
+            # adds all propagated build inputs to the user environment packages
             installPhase = ''
               eval "$preInstall"
 
@@ -91,9 +94,9 @@ attrs :
 
               ensureDir $out/nix-support
               ln -s $out/nix-support/propagated-build-inputs $out/nix-support/propagated-user-env-packages
-              
+
               eval "$postInstall"
             '';
           };
     in  attrs.stdenv.mkDerivation ((rec { f = dtransform f // transform f; }).f);
-} 
+}