Merge pull request #97380 from xaverdh/write-haskell-ghc-args

pkgs/build-support/writers: allow passing ghc arguments in writeHaskell
This commit is contained in:
Lassulus 2020-09-08 16:26:05 +02:00 committed by GitHub
commit a1e9d94aa3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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