pkgs/development/libraries/haskell/cabal/cabal.nix: build haddock documentation for Haskell libraries

svn path=/nixpkgs/trunk/; revision=19237
This commit is contained in:
Peter Simons 2010-01-05 15:17:17 +00:00
parent 3535899507
commit 1dfec1c467

View File

@ -9,15 +9,15 @@ attrs :
# pname should be defined by the client to be the package basename # pname should be defined by the client to be the package basename
# version should be defined by the client to be the package version # version should be defined by the client to be the package version
# fname is the internal full name of the package # fname is the internal full name of the package
fname = "${self.pname}-${self.version}"; fname = "${self.pname}-${self.version}";
# name is the external full name of the package; usually we prefix # name is the external full name of the package; usually we prefix
# all packages with haskell- to avoid name clashes for libraries; # all packages with haskell- to avoid name clashes for libraries;
# if that is not desired (for applications), name can be set to # if that is not desired (for applications), name can be set to
# fname. # fname.
name = "haskell-${self.pname}-ghc${attrs.ghc.ghc.version}-${self.version}"; name = "haskell-${self.pname}-ghc${attrs.ghc.ghc.version}-${self.version}";
# the default download location for Cabal packages is Hackage, # the default download location for Cabal packages is Hackage,
# you still have to specify the checksum # you still have to specify the checksum
@ -66,12 +66,15 @@ attrs :
./Setup build ./Setup build
export GHC_PACKAGE_PATH=$(ghc-packages)
./Setup haddock
eval "$postBuild" eval "$postBuild"
''; '';
# installs via Cabal; creates a registration file for nix-support # installs via Cabal; creates a registration file for nix-support
# so that the package can be used in other Haskell-builds; also # so that the package can be used in other Haskell-builds; also
# adds all propagated build inputs to the user environment packages # adds all propagated build inputs to the user environment packages
installPhase = '' installPhase = ''
eval "$preInstall" eval "$preInstall"
@ -91,9 +94,9 @@ attrs :
ensureDir $out/nix-support ensureDir $out/nix-support
ln -s $out/nix-support/propagated-build-inputs $out/nix-support/propagated-user-env-packages ln -s $out/nix-support/propagated-build-inputs $out/nix-support/propagated-user-env-packages
eval "$postInstall" eval "$postInstall"
''; '';
}; };
in attrs.stdenv.mkDerivation ((rec { f = dtransform f // transform f; }).f); in attrs.stdenv.mkDerivation ((rec { f = dtransform f // transform f; }).f);
} }