Skip to content

Commit a42a5ea

Browse files
committed
switch to v1-build on the ci
alex and happy aren't available for cabal v2-build in shellFor due to haskell/cabal#8434 NixOS/nixpkgs#130556 NixOS/nixpkgs#176887
1 parent 3b03b8d commit a42a5ea

File tree

2 files changed

+16
-3
lines changed

2 files changed

+16
-3
lines changed

.github/workflows/nix-ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,4 +43,4 @@ jobs:
4343
- uses: actions/checkout@v3
4444
- uses: cachix/install-nix-action@v22
4545
- uses: DeterminateSystems/magic-nix-cache-action@v2
46-
- run: nix develop -Lv -c bash -c "cabal build"
46+
- run: nix develop -Lv -c bash -c "cabal v1-build"

nix/shell.nix

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,24 @@
33
agda2hs-hs ? (import ./lib.nix { inherit pkgs; }).agda2hs-hs,
44
}:
55
pkgs.haskellPackages.shellFor {
6+
# This doesn't result in a shell where you can use cabal (v2-)build,
7+
# due to build-tool-depends in Agda's .cabal file so for now only v1-build works
8+
# Making cabal re-install alex and happy from Hackage can also work,
9+
# which will be done automatically if the user runs `cabal update` and `cabal build`.
10+
# relevant issues listed in:
11+
# https://gist.github.com/ScottFreeCode/ef9f254e2dd91544bba4a068852fc81f
12+
# main ones are:
13+
# https://github.com/haskell/cabal/issues/8434
14+
# https://github.com/NixOS/nixpkgs/issues/130556
15+
# https://github.com/NixOS/nixpkgs/issues/176887
616
packages = p: [ agda2hs-hs ];
7-
buildInputs = with pkgs.haskellPackages; [
17+
nativeBuildInputs = with pkgs.haskellPackages; [
18+
# necessary for development
819
cabal-install
9-
cabal2nix
1020
haskell-language-server
21+
# quality of life
1122
pkgs.agda
23+
pkgs.nixfmt-rfc-style
24+
cabal2nix
1225
];
1326
}

0 commit comments

Comments
 (0)