Wrap ghc-modi to find GHC packages
This commit is contained in:
parent
048ec25757
commit
a0aadd7577
@ -26,6 +26,7 @@ cabal.mkDerivation (self: {
|
|||||||
cd ..
|
cd ..
|
||||||
ensureDir "$out/share/emacs"
|
ensureDir "$out/share/emacs"
|
||||||
mv $pname-$version emacs/site-lisp
|
mv $pname-$version emacs/site-lisp
|
||||||
|
|
||||||
mv $out/bin/ghc-mod $out/bin/.ghc-mod-wrapped
|
mv $out/bin/ghc-mod $out/bin/.ghc-mod-wrapped
|
||||||
cat - > $out/bin/ghc-mod <<EOF
|
cat - > $out/bin/ghc-mod <<EOF
|
||||||
#! ${self.stdenv.shell}
|
#! ${self.stdenv.shell}
|
||||||
@ -34,6 +35,15 @@ cabal.mkDerivation (self: {
|
|||||||
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" " ") "\$@"
|
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
|
EOF
|
||||||
chmod +x $out/bin/ghc-mod
|
chmod +x $out/bin/ghc-mod
|
||||||
|
|
||||||
|
mv $out/bin/ghc-modi $out/bin/.ghc-modi-wrapped
|
||||||
|
cat - > $out/bin/ghc-modi <<EOF
|
||||||
|
#! ${self.stdenv.shell}
|
||||||
|
COMMAND=\$1
|
||||||
|
shift
|
||||||
|
eval exec $out/bin/.ghc-modi-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/ghc-modi
|
||||||
'';
|
'';
|
||||||
meta = {
|
meta = {
|
||||||
homepage = "http://www.mew.org/~kazu/proj/ghc-mod/";
|
homepage = "http://www.mew.org/~kazu/proj/ghc-mod/";
|
||||||
|
Loading…
x
Reference in New Issue
Block a user