Merge pull request #2755 from jwiegley/yesod-bin

Wrap yesod-bin so that yesod devel works with Nix
This commit is contained in:
John Wiegley 2014-05-27 12:50:16 -05:00
commit 71ef4852a4

View file

@ -23,6 +23,18 @@ cabal.mkDerivation (self: {
systemFileio systemFilepath tar text time transformers unixCompat
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 = {
homepage = "http://www.yesodweb.com/";
description = "The yesod helper executable";