From 8b458f246f191462851649634a136f1dcb4710d6 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Thu, 9 Oct 2008 16:08:48 +0000 Subject: [PATCH] * Fixed ghc-pkg in ghcboot on Darwin (it doesn't like the -framework flag). This is needed to get haddockboot to build. svn path=/nixpkgs/trunk/; revision=13031 --- pkgs/development/compilers/ghc/boot.nix | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/pkgs/development/compilers/ghc/boot.nix b/pkgs/development/compilers/ghc/boot.nix index 254a9fb855a0..dde5f76284d3 100644 --- a/pkgs/development/compilers/ghc/boot.nix +++ b/pkgs/development/compilers/ghc/boot.nix @@ -47,11 +47,13 @@ stdenv.mkDerivation { ln -s ${readline}/lib/libreadline.dylib $out/frameworks/GNUreadline.framework/GNUreadline ln -s ${readline}/lib/libreadline.dylib $out/frameworks/GNUreadline.framework/Versions/A/GNUreadline - mv $out/bin $out/bin-orig - mkdir $out/bin - for i in $(cd $out/bin-orig && ls); do + mkdir $out/bin-orig + for i in $(cd $out/bin && ls *); do + mv $out/bin/$i $out/bin-orig/$i echo \"#! $SHELL -e\" >> $out/bin/$i - echo \"DYLD_FRAMEWORK_PATH=$out/frameworks exec $out/bin-orig/$i -framework-path $out/frameworks \\\"\\$@\\\"\" >> $out/bin/$i + extraFlag= + if test $i != ghc-pkg; then extraFlag=\"-framework-path $out/frameworks\"; fi + echo \"DYLD_FRAMEWORK_PATH=$out/frameworks exec $out/bin-orig/$i $extraFlag \\\"\\$@\\\"\" >> $out/bin/$i chmod +x $out/bin/$i done