diff options
Diffstat (limited to 'Omni/Bild/Builder.nix')
| -rw-r--r-- | Omni/Bild/Builder.nix | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/Omni/Bild/Builder.nix b/Omni/Bild/Builder.nix index fa732be..6610a27 100644 --- a/Omni/Bild/Builder.nix +++ b/Omni/Bild/Builder.nix @@ -116,7 +116,7 @@ with bild; let }; haskell = - if target.hsGraph == null + if (target.hsGraph or null) == null then # Monolithic build (fallback for TH/cycles) stdenv.mkDerivation rec { @@ -228,14 +228,15 @@ with bild; let dontConfigure = true; buildPhase = let pkgFlags = lib.strings.concatMapStringsSep " " (p: "-package ${p}") target.langdeps; - hiDirs = lib.attrsets.mapAttrsToList (_modName: drv: "${drv}/hidir") modules; - iFlags = lib.strings.concatMapStringsSep " " (d: "-i ${d}") hiDirs; + copyHiFiles = lib.strings.concatMapStringsSep "\n" (drv: "cp -rL ${drv}/hidir/. . 2>/dev/null || true") (lib.attrsets.attrValues modules); in '' set -eux echo "Starting custom link phase with ${builtins.toString (builtins.length objectPaths)} object files" + ${copyHiFiles} + chmod -R +w . || true ${ghcPkg}/bin/ghc --make \ ${target.quapath} \ - -i. ${iFlags} \ + -i. \ ${pkgFlags} \ -threaded \ -o ${name} \ |
