pkgs/build-support/writers: allow passing ghc arguments in writeHaskell
This commit is contained in:
parent
6ee4ca6d1f
commit
b20ec4f719
1 changed files with 3 additions and 2 deletions
|
@ -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"
|
||||
'';
|
||||
|
|
Loading…
Reference in a new issue