From b20ec4f719ed8e61781427762598b77ab3b9e70b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dominik=20Xaver=20H=C3=B6rl?= Date: Mon, 7 Sep 2020 19:36:58 +0200 Subject: [PATCH] pkgs/build-support/writers: allow passing ghc arguments in writeHaskell --- pkgs/build-support/writers/default.nix | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pkgs/build-support/writers/default.nix b/pkgs/build-support/writers/default.nix index 4673b4e6cd8..495a56b4197 100644 --- a/pkgs/build-support/writers/default.nix +++ b/pkgs/build-support/writers/default.nix @@ -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" '';