summary refs log tree commit diff
path: root/pkgs/development
diff options
context:
space:
mode:
authorAndres Löh <mail@andres-loeh.de>2010-10-12 07:26:45 +0000
committerAndres Löh <mail@andres-loeh.de>2010-10-12 07:26:45 +0000
commitc4c983464a369ca31f6f8316b9b6e59c6e18e0dc (patch)
tree5373d1cbc76aba24363f7d7912626d47c7a161fa /pkgs/development
parentff00c3854124dc0a2927466e5fe66ec1d4353038 (diff)
downloadnixlib-c4c983464a369ca31f6f8316b9b6e59c6e18e0dc.tar
nixlib-c4c983464a369ca31f6f8316b9b6e59c6e18e0dc.tar.gz
nixlib-c4c983464a369ca31f6f8316b9b6e59c6e18e0dc.tar.bz2
nixlib-c4c983464a369ca31f6f8316b9b6e59c6e18e0dc.tar.lz
nixlib-c4c983464a369ca31f6f8316b9b6e59c6e18e0dc.tar.xz
nixlib-c4c983464a369ca31f6f8316b9b6e59c6e18e0dc.tar.zst
nixlib-c4c983464a369ca31f6f8316b9b6e59c6e18e0dc.zip
Moved creation of symlink to postFixup phase.
This, together with a check if the symlink is necessary,
should prevent the occurrence of dangling symlinks.

svn path=/nixpkgs/trunk/; revision=24232
Diffstat (limited to 'pkgs/development')
-rw-r--r--pkgs/development/libraries/haskell/cabal/cabal.nix9
1 files changed, 6 insertions, 3 deletions
diff --git a/pkgs/development/libraries/haskell/cabal/cabal.nix b/pkgs/development/libraries/haskell/cabal/cabal.nix
index 87e2563bc7b4..d46b2580918f 100644
--- a/pkgs/development/libraries/haskell/cabal/cabal.nix
+++ b/pkgs/development/libraries/haskell/cabal/cabal.nix
@@ -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;