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

gstqt5
Dominik Xaver Hörl 2020-09-07 19:36:58 +02:00
parent 6ee4ca6d1f
commit b20ec4f719
1 changed files with 3 additions and 2 deletions

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"
'';