Author: andres
Date: Tue Oct 12 07:26:45 2010
New Revision: 24232
URL: https://svn.nixos.org/websvn/nix/?rev=24232&sc=1

Log:
Moved creation of symlink to postFixup phase.

This, together with a check if the symlink is necessary,
should prevent the occurrence of dangling symlinks.

Modified:
   nixpkgs/trunk/pkgs/development/libraries/haskell/cabal/cabal.nix

Modified: nixpkgs/trunk/pkgs/development/libraries/haskell/cabal/cabal.nix
==============================================================================
--- nixpkgs/trunk/pkgs/development/libraries/haskell/cabal/cabal.nix    Tue Oct 
12 07:02:25 2010        (r24231)
+++ nixpkgs/trunk/pkgs/development/libraries/haskell/cabal/cabal.nix    Tue Oct 
12 07:26:45 2010        (r24232)
@@ -102,12 +102,15 @@
                 GHC_PACKAGE_PATH=$installedPkgConf ghc-pkg --global register 
$pkgConf --force
               fi
 
-              ensureDir $out/nix-support
-              ln -s $out/nix-support/propagated-build-native-inputs 
$out/nix-support/propagated-user-env-packages
-
               eval "$postInstall"
             '';
 
+            postFixup = ''
+              if test -f $out/nix-support/propagated-build-native-inputs; then
+                ln -s $out/nix-support/propagated-build-native-inputs 
$out/nix-support/propagated-user-env-packages
+              fi
+            '';
+
             # We inherit stdenv and ghc so that they can be used
             # in Cabal derivations.
             inherit stdenv ghc;
_______________________________________________
nix-commits mailing list
[email protected]
http://mail.cs.uu.nl/mailman/listinfo/nix-commits

Reply via email to