Merge pull request #3017 from ttuegel/wrap-haskell
Wrap Haskell tools to find GHC packages
This commit is contained in:
commit
5b6f3fc7f5
@ -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/";
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
{ cabal, alex, Cabal, filepath, ghcPaths, happy, xhtml }:
|
{ cabal, alex, Cabal, filepath, ghcPaths, happy, xhtml, makeWrapper }:
|
||||||
|
|
||||||
cabal.mkDerivation (self: {
|
cabal.mkDerivation (self: {
|
||||||
pname = "haddock";
|
pname = "haddock";
|
||||||
@ -6,10 +6,15 @@ cabal.mkDerivation (self: {
|
|||||||
sha256 = "045lmmna5nwj07si81vxms5xkkmqvjsiif20nny5mvlabshxn1yi";
|
sha256 = "045lmmna5nwj07si81vxms5xkkmqvjsiif20nny5mvlabshxn1yi";
|
||||||
isLibrary = true;
|
isLibrary = true;
|
||||||
isExecutable = true;
|
isExecutable = true;
|
||||||
buildDepends = [ Cabal filepath ghcPaths xhtml ];
|
buildDepends = [ Cabal filepath ghcPaths xhtml makeWrapper ];
|
||||||
testDepends = [ Cabal filepath ];
|
testDepends = [ Cabal filepath ];
|
||||||
buildTools = [ alex happy ];
|
buildTools = [ alex happy ];
|
||||||
doCheck = false;
|
doCheck = false;
|
||||||
|
|
||||||
|
postInstall = ''
|
||||||
|
wrapProgram $out/bin/haddock --add-flags "\$(${self.ghc.GHCGetPackages} ${self.ghc.version} \"\$(dirname \$0)\" \"--optghc=-package-conf --optghc=\")"
|
||||||
|
'';
|
||||||
|
|
||||||
meta = {
|
meta = {
|
||||||
homepage = "http://www.haskell.org/haddock/";
|
homepage = "http://www.haskell.org/haddock/";
|
||||||
description = "A documentation-generation tool for Haskell libraries";
|
description = "A documentation-generation tool for Haskell libraries";
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
{ cabal, alex, Cabal, filepath, ghcPaths, happy, xhtml }:
|
{ cabal, alex, Cabal, filepath, ghcPaths, happy, xhtml, makeWrapper }:
|
||||||
|
|
||||||
cabal.mkDerivation (self: {
|
cabal.mkDerivation (self: {
|
||||||
pname = "haddock";
|
pname = "haddock";
|
||||||
@ -6,10 +6,15 @@ cabal.mkDerivation (self: {
|
|||||||
sha256 = "0a29n6y9lmk5w78f6j8s7pg0m0k3wm7bx5r2lhk7bnzkr5f7rkcd";
|
sha256 = "0a29n6y9lmk5w78f6j8s7pg0m0k3wm7bx5r2lhk7bnzkr5f7rkcd";
|
||||||
isLibrary = true;
|
isLibrary = true;
|
||||||
isExecutable = true;
|
isExecutable = true;
|
||||||
buildDepends = [ Cabal filepath ghcPaths xhtml ];
|
buildDepends = [ Cabal filepath ghcPaths xhtml makeWrapper ];
|
||||||
testDepends = [ Cabal filepath ];
|
testDepends = [ Cabal filepath ];
|
||||||
buildTools = [ alex happy ];
|
buildTools = [ alex happy ];
|
||||||
doCheck = false;
|
doCheck = false;
|
||||||
|
|
||||||
|
postInstall = ''
|
||||||
|
wrapProgram $out/bin/haddock --add-flags "\$(${self.ghc.GHCGetPackages} ${self.ghc.version} \"\$(dirname \$0)\" \"--optghc=-package-conf --optghc=\")"
|
||||||
|
'';
|
||||||
|
|
||||||
meta = {
|
meta = {
|
||||||
homepage = "http://www.haskell.org/haddock/";
|
homepage = "http://www.haskell.org/haddock/";
|
||||||
description = "A documentation-generation tool for Haskell libraries";
|
description = "A documentation-generation tool for Haskell libraries";
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
{ cabal, alex, Cabal, deepseq, filepath, ghcPaths, happy, xhtml }:
|
{ cabal, alex, Cabal, deepseq, filepath, ghcPaths, happy, xhtml, makeWrapper }:
|
||||||
|
|
||||||
cabal.mkDerivation (self: {
|
cabal.mkDerivation (self: {
|
||||||
pname = "haddock";
|
pname = "haddock";
|
||||||
@ -6,10 +6,15 @@ cabal.mkDerivation (self: {
|
|||||||
sha256 = "0kpk3bmlyd7cb6s39ix8s0ak65xhrln9mg481y3h24lf5syy5ky9";
|
sha256 = "0kpk3bmlyd7cb6s39ix8s0ak65xhrln9mg481y3h24lf5syy5ky9";
|
||||||
isLibrary = true;
|
isLibrary = true;
|
||||||
isExecutable = true;
|
isExecutable = true;
|
||||||
buildDepends = [ Cabal deepseq filepath ghcPaths xhtml ];
|
buildDepends = [ Cabal deepseq filepath ghcPaths xhtml makeWrapper ];
|
||||||
testDepends = [ Cabal deepseq filepath ];
|
testDepends = [ Cabal deepseq filepath ];
|
||||||
buildTools = [ alex happy ];
|
buildTools = [ alex happy ];
|
||||||
doCheck = false;
|
doCheck = false;
|
||||||
|
|
||||||
|
postInstall = ''
|
||||||
|
wrapProgram $out/bin/haddock --add-flags "\$(${self.ghc.GHCGetPackages} ${self.ghc.version} \"\$(dirname \$0)\" \"--optghc=-package-conf --optghc=\")"
|
||||||
|
'';
|
||||||
|
|
||||||
meta = {
|
meta = {
|
||||||
homepage = "http://www.haskell.org/haddock/";
|
homepage = "http://www.haskell.org/haddock/";
|
||||||
description = "A documentation-generation tool for Haskell libraries";
|
description = "A documentation-generation tool for Haskell libraries";
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
{ cabal, alex, Cabal, deepseq, filepath, ghcPaths, happy, xhtml }:
|
{ cabal, alex, Cabal, deepseq, filepath, ghcPaths, happy, xhtml, makeWrapper }:
|
||||||
|
|
||||||
cabal.mkDerivation (self: {
|
cabal.mkDerivation (self: {
|
||||||
pname = "haddock";
|
pname = "haddock";
|
||||||
@ -6,10 +6,15 @@ cabal.mkDerivation (self: {
|
|||||||
sha256 = "1qwj13ks3fzar14s587svv1pdiwk80m7x5pzn74v3jrqkn0xbrr5";
|
sha256 = "1qwj13ks3fzar14s587svv1pdiwk80m7x5pzn74v3jrqkn0xbrr5";
|
||||||
isLibrary = true;
|
isLibrary = true;
|
||||||
isExecutable = true;
|
isExecutable = true;
|
||||||
buildDepends = [ Cabal deepseq filepath ghcPaths xhtml ];
|
buildDepends = [ Cabal deepseq filepath ghcPaths xhtml makeWrapper ];
|
||||||
testDepends = [ Cabal deepseq filepath ];
|
testDepends = [ Cabal deepseq filepath ];
|
||||||
buildTools = [ alex happy ];
|
buildTools = [ alex happy ];
|
||||||
doCheck = false;
|
doCheck = false;
|
||||||
|
|
||||||
|
postInstall = ''
|
||||||
|
wrapProgram $out/bin/haddock --add-flags "\$(${self.ghc.GHCGetPackages} ${self.ghc.version} \"\$(dirname \$0)\" \"--optghc=-package-conf --optghc=\")"
|
||||||
|
'';
|
||||||
|
|
||||||
meta = {
|
meta = {
|
||||||
homepage = "http://www.haskell.org/haddock/";
|
homepage = "http://www.haskell.org/haddock/";
|
||||||
description = "A documentation-generation tool for Haskell libraries";
|
description = "A documentation-generation tool for Haskell libraries";
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
{ cabal, Cabal, deepseq, filepath, ghcPaths, hspec, QuickCheck
|
{ cabal, Cabal, deepseq, filepath, ghcPaths, hspec, QuickCheck
|
||||||
, xhtml
|
, xhtml, makeWrapper
|
||||||
}:
|
}:
|
||||||
|
|
||||||
cabal.mkDerivation (self: {
|
cabal.mkDerivation (self: {
|
||||||
@ -8,9 +8,14 @@ cabal.mkDerivation (self: {
|
|||||||
sha256 = "0h96jj6y093h4gcqpiq0nyv7h5wjg8ji7z1im9ydivmsv0627prk";
|
sha256 = "0h96jj6y093h4gcqpiq0nyv7h5wjg8ji7z1im9ydivmsv0627prk";
|
||||||
isLibrary = true;
|
isLibrary = true;
|
||||||
isExecutable = true;
|
isExecutable = true;
|
||||||
buildDepends = [ Cabal deepseq filepath ghcPaths xhtml ];
|
buildDepends = [ Cabal deepseq filepath ghcPaths xhtml makeWrapper ];
|
||||||
testDepends = [ Cabal deepseq filepath hspec QuickCheck ];
|
testDepends = [ Cabal deepseq filepath hspec QuickCheck ];
|
||||||
doCheck = false;
|
doCheck = false;
|
||||||
|
|
||||||
|
postInstall = ''
|
||||||
|
wrapProgram $out/bin/haddock --add-flags "\$(${self.ghc.GHCGetPackages} ${self.ghc.version} \"\$(dirname \$0)\" \"--optghc=-package-conf --optghc=\")"
|
||||||
|
'';
|
||||||
|
|
||||||
meta = {
|
meta = {
|
||||||
homepage = "http://www.haskell.org/haddock/";
|
homepage = "http://www.haskell.org/haddock/";
|
||||||
description = "A documentation-generation tool for Haskell libraries";
|
description = "A documentation-generation tool for Haskell libraries";
|
||||||
|
Loading…
x
Reference in New Issue
Block a user