Skip to content

Commit fdf45ef

Browse files
committed
When using Nix, depend on gcc.
Fixes builds using the FFI, with no additional dependency footprint.
1 parent ac8e40c commit fdf45ef

2 files changed

Lines changed: 4 additions & 1 deletion

File tree

ChangeLog.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,9 @@ Other enhancements:
9393
[#3360](https://github.com/commercialhaskell/stack/issues/3360)
9494
* Better descriptions are now available for `stack upgrade --help`. See:
9595
[#3070](https://github.com/commercialhaskell/stack/issues/3070)
96+
* When using Nix, nix-shell now depends always on gcc to prevent build errors
97+
when using the FFI. As ghc depends on gcc anyway, this doesn't increase the
98+
dependency footprint.
9699

97100
Bug fixes:
98101

src/Stack/Nix.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ runShellAndExit mprojectRoot getCompilerVersion getCmdArgs = do
7373
inContainer <- getInContainer
7474
ghc <- either throwIO return $ nixCompiler compilerVersion
7575
let pkgsInConfig = nixPackages (configNix config)
76-
pkgs = pkgsInConfig ++ [ghc, "git"]
76+
pkgs = pkgsInConfig ++ [ghc, "git", "gcc"]
7777
pkgsStr = "[" <> T.intercalate " " pkgs <> "]"
7878
pureShell = nixPureShell (configNix config)
7979
addGCRoots = nixAddGCRoots (configNix config)

0 commit comments

Comments
 (0)