Author: roconnor
Date: Wed Nov 17 00:18:39 2010
New Revision: 24716
URL: https://svn.nixos.org/websvn/nix/?rev=24716&sc=1

Log:
Adding wrapper to get users packages

Haddock calls directly into ghclib by passing our carefully crafted ghc-wrapper.
This means that haddock needs to be wrapped itself, which this patch does.

Modified:
   nixpkgs/trunk/pkgs/development/tools/documentation/haddock/haddock-2.7.2.nix

Modified: 
nixpkgs/trunk/pkgs/development/tools/documentation/haddock/haddock-2.7.2.nix
==============================================================================
--- 
nixpkgs/trunk/pkgs/development/tools/documentation/haddock/haddock-2.7.2.nix    
    Tue Nov 16 23:19:08 2010        (r24715)
+++ 
nixpkgs/trunk/pkgs/development/tools/documentation/haddock/haddock-2.7.2.nix    
    Wed Nov 17 00:18:39 2010        (r24716)
@@ -1,12 +1,17 @@
-{cabal, ghcPaths, alex, happy}:
+{cabal, ghcPaths, alex, happy, makeWrapper}:
 
 cabal.mkDerivation (self : {
   pname = "haddock";
   version = "2.7.2"; # Haskell Platform 2010.1.0.0 and 2010.2.0.0
   name = self.fname;
   sha256 = "4eaaaf62785f0ba3d37ba356cfac4679faef91c0902d8cdbf42837cbe5daab82";
-  extraBuildInputs = [alex happy];
+  extraBuildInputs = [alex happy makeWrapper];
   propagatedBuildInputs = [ghcPaths];
+
+  postInstall = ''
+   wrapProgram $out/bin/haddock --add-flags "\$(${self.ghc.GHCGetPackages} 
${self.ghc.ghcVersion} \"\$(dirname \$0)\" \"--optghc=-package-conf 
--optghc=\")"
+  '';
+
   meta = {
     description = "a tool for automatically generating documentation from 
annotated Haskell source code";
   };
_______________________________________________
nix-commits mailing list
[email protected]
http://mail.cs.uu.nl/mailman/listinfo/nix-commits

Reply via email to