Merge pull request #2755 from jwiegley/yesod-bin
Wrap yesod-bin so that yesod devel works with Nix
This commit is contained in:
commit
71ef4852a4
@ -23,6 +23,18 @@ cabal.mkDerivation (self: {
|
|||||||
systemFileio systemFilepath tar text time transformers unixCompat
|
systemFileio systemFilepath tar text time transformers unixCompat
|
||||||
unorderedContainers wai waiExtra warp yaml zlib
|
unorderedContainers wai waiExtra warp yaml zlib
|
||||||
];
|
];
|
||||||
|
|
||||||
|
postInstall = ''
|
||||||
|
mv $out/bin/yesod $out/bin/.yesod-wrapped
|
||||||
|
cat - > $out/bin/yesod <<EOF
|
||||||
|
#! ${self.stdenv.shell}
|
||||||
|
export HSENV=1
|
||||||
|
export PACKAGE_DB_FOR_GHC='$( ${self.ghc.GHCGetPackages} ${self.ghc.version} | tr " " "\n" | tail -n +2 | paste -d " " - - | sed 's/.*/-g "&"/' | tr "\n" " ")'
|
||||||
|
eval exec $out/bin/.yesod-wrapped "\$@"
|
||||||
|
EOF
|
||||||
|
chmod +x $out/bin/yesod
|
||||||
|
'';
|
||||||
|
|
||||||
meta = {
|
meta = {
|
||||||
homepage = "http://www.yesodweb.com/";
|
homepage = "http://www.yesodweb.com/";
|
||||||
description = "The yesod helper executable";
|
description = "The yesod helper executable";
|
||||||
|
Loading…
Reference in New Issue
Block a user