Skip to content

Commit

Permalink
Add a multi-repl-enabled cabal to shell
Browse files Browse the repository at this point in the history
We can remove this once a cabal with multi-repl-support has been released.
  • Loading branch information
amesgen committed Jul 18, 2023
1 parent 4a834d2 commit 9a25db1
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 0 deletions.
1 change: 1 addition & 0 deletions nix/shell.nix
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ in
hsPkgs.shellFor {
nativeBuildInputs = [
pkgs.cabal
pkgs.cabal-multi-repl
pkgs.fd
pkgs.nixpkgs-fmt
pkgs.stylish-haskell
Expand Down
21 changes: 21 additions & 0 deletions nix/tools.nix
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,27 @@ in

cabal = tool "cabal" "latest" { };

cabal-multi-repl = (final.haskell-nix.cabalProject {
# cabal master commit containing https://github.com/haskell/cabal/pull/8726
src = final.fetchFromGitHub {
owner = "haskell";
repo = "cabal";
rev = "249374d16b328736a01a4c7e84fa42fbad7422e7";
hash = "sha256-2nSTlPMHEXtv3XsDVBCR8EdeYmSQYztQno+NQIJbf1c=";
};
inherit (final.hsPkgs.args) compiler-nix-name;
cabalProject = ''
packages: Cabal-syntax Cabal cabal-install-solver cabal-install
'';
configureArgs = "--disable-benchmarks --disable-tests";
modules = [{
packages.cabal-install.components.exes.cabal.postInstall = ''
mv $out/bin/cabal $out/bin/cabal-multi-repl
wrapProgram $out/bin/cabal-multi-repl --add-flags --enable-multi-repl
'';
}];
}).cabal-install.components.exes.cabal;

stylish-haskell = tool "stylish-haskell" "0.14.4.0" { };

cabal-fmt = tool "cabal-fmt" "0.1.6" { };
Expand Down

0 comments on commit 9a25db1

Please sign in to comment.