pkgs/build-support/writers: allow passing ghc arguments in writeHaskell

This commit is contained in:
Dominik Xaver Hörl 2020-09-07 19:36:58 +02:00
parent 6ee4ca6d1f
commit b20ec4f719

View file

@ -164,12 +164,13 @@ rec {
# '';
writeHaskell = name: {
libraries ? [],
ghc ? pkgs.ghc
ghc ? pkgs.ghc,
ghcArgs ? []
}:
makeBinWriter {
compileScript = ''
cp $contentPath tmp.hs
${ghc.withPackages (_: libraries )}/bin/ghc tmp.hs
${ghc.withPackages (_: libraries )}/bin/ghc ${lib.escapeShellArgs ghcArgs} tmp.hs
mv tmp $out
${pkgs.binutils-unwrapped}/bin/strip --strip-unneeded "$out"
'';