From 4ff2469f57bf77e89091791160b45dbf080a91bd Mon Sep 17 00:00:00 2001 From: Robert Vollmert Date: Tue, 7 Jun 2022 10:23:39 +0200 Subject: [PATCH] nix: don't write to /nix/store from hsie build (fixes #2304) This is a kind of hacky fix to the kind of hacky hsie derivation. --- nix/hsie/default.nix | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/nix/hsie/default.nix b/nix/hsie/default.nix index cb627dcae..f0809c99a 100644 --- a/nix/hsie/default.nix +++ b/nix/hsie/default.nix @@ -16,7 +16,12 @@ let ghc = ghcWithPackages modules; hsie = runCommand "haskellimports" { inherit name src; } - "${ghc}/bin/ghc -O -Werror -Wall -package ghc $src -o $out"; + '' + cd $TMP + cp $src $TMP/Main.hs + ${ghc}/bin/ghc -O -Werror -Wall -package ghc Main.hs -o Main + cp Main $out + ''; bin = runCommand name { inherit hsie name; } ''