Skip to content

Commit 725e627

Browse files
committed
Fix using lld in shell-for
Before we didn't actually include lld in the environment. Let's add that to the nativeBuildInputs if the compiler is using lld.
1 parent cd9ddc0 commit 725e627

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

builder/default.nix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ let
8080
# Same as haskellPackages.shellFor in nixpkgs.
8181
shellFor = haskellLib.weakCallPackage pkgs ./shell-for.nix {
8282
inherit hsPkgs ghcForComponent makeConfigFiles hoogleLocal haskellLib pkgsBuildBuild evalPackages compiler ghc;
83-
inherit (buildPackages) glibcLocales;
83+
inherit (buildPackages) glibcLocales llvmPackages;
8484
};
8585

8686
# Same as haskellPackages.ghcWithPackages and ghcWithHoogle in nixpkgs.

builder/shell-for.nix

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
{ lib, stdenv, mkShell, glibcLocales, ghcForComponent, makeConfigFiles, hsPkgs, hoogleLocal, haskellLib, pkgsBuildBuild, evalPackages, compiler, haskell-nix, ghc }:
1+
{ lib, stdenv, mkShell, glibcLocales, ghcForComponent, makeConfigFiles, hsPkgs, hoogleLocal, haskellLib, pkgsBuildBuild, evalPackages, compiler, haskell-nix, ghc, llvmPackages }:
22

33
{ # `packages` function selects packages that will be worked on in the shell itself.
44
# These packages will not be built by `shellFor`, but their
@@ -175,6 +175,7 @@ in
175175
++ nativeBuildInputs
176176
++ mkDrvArgs.nativeBuildInputs or []
177177
++ lib.attrValues (pkgsBuildBuild.haskell-nix.tools' evalPackages compiler.nix-name tools)
178+
++ lib.optional (ghcEnv.baseGhc.useLdLld or false) llvmPackages.bintools
178179
# If this shell is a cross compilation shell include
179180
# wrapper script for running cabal build with appropriate args.
180181
# Includes `--with-compiler` in case the `cabal.project` file has `with-compiler:` in it.

0 commit comments

Comments
 (0)