Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 18 additions & 1 deletion dynamic.nix
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,24 @@ pkgs.mkShell {
)
++ attrValues haskell-tools
++ optionals withGHCTooling (
with pkgs; [ python3 automake autoconf alex happy git libffi.dev ]
# `pkgs.alex` and `pkgs.happy` from nixpkgs are built with a different
# GHC than the shell's `compiler` (currently ghc-9.10.3 in nixpkgs
# haskellPackages), and their library outputs anchor that foreign GHC
# in the closure (~2.15 GB on Darwin). Use haskell.nix's `tool` builder
# — same pattern as cross-js.nix and cross-windows.nix — to build them
# with the shell's `compiler-nix-name`, so library outputs reference
# the GHC that's already in the closure rather than dragging in a
# second one. `gitMinimal` swaps out heavyweight git (saves ~150 MB
# of perl-modules + git-doc that aren't used inside the shell).
with pkgs; [
python3
automake
autoconf
(tool "alex")
(tool "happy")
gitMinimal
libffi.dev
]
)
;

Expand Down
7 changes: 5 additions & 2 deletions tool-map.nix
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,11 @@ compiler-nix-name: tool: {
cabalProject = __readFile (src + "/cabal.project");
configureArgs = "--disable-benchmarks --disable-tests";
};
happy = { version = "1.20.1.1"; inherit cabalProjectLocal; };
alex = { version = "3.2.7.3"; inherit cabalProjectLocal; };
# happy/alex don't need head.hackage (they're standard mainline packages and
# build cleanly from regular hackage). Dropping `inherit cabalProjectLocal`
# also avoids depending on the head.hackage SHA pin going stale.
happy = { version = "2.1.7"; };
alex = { version = "3.5.4.0"; };
cabal = rec {
src = self.inputs.cabal;
# We use the cabal.boostrap.project file, as we don't
Expand Down
Loading