haskell-ghc-mod: revert "wrap the newly added ghc-modi executable"

This reverts commit eba689ad05. ghc-modi
stopped working for me after this change.

https://github.com/NixOS/nixpkgs/pull/2490
This commit is contained in:
Peter Simons 2014-05-04 14:05:05 +02:00
parent 80d39a273e
commit 9e5f7ada34

View file

@ -26,16 +26,14 @@ cabal.mkDerivation (self: {
cd ..
ensureDir "$out/share/emacs"
mv $pname-$version emacs/site-lisp
for prog in ghc-mod ghc-modi; do
mv $out/bin/$prog $out/bin/.$prog-wrapped
cat - > $out/bin/$prog <<EOF
mv $out/bin/ghc-mod $out/bin/.ghc-mod-wrapped
cat - > $out/bin/ghc-mod <<EOF
#! ${self.stdenv.shell}
COMMAND=\$1
shift
eval exec $out/bin/.$prog-wrapped \$COMMAND \$( ${self.ghc.GHCGetPackages} ${self.ghc.version} | tr " " "\n" | tail -n +2 | paste -d " " - - | sed 's/.*/-g "&"/' | tr "\n" " ") "\$@"
eval exec $out/bin/.ghc-mod-wrapped \$COMMAND \$( ${self.ghc.GHCGetPackages} ${self.ghc.version} | tr " " "\n" | tail -n +2 | paste -d " " - - | sed 's/.*/-g "&"/' | tr "\n" " ") "\$@"
EOF
chmod +x $out/bin/$prog
done
chmod +x $out/bin/ghc-mod
'';
meta = {
homepage = "http://www.mew.org/~kazu/proj/ghc-mod/";