Skip to content

Commit 0d622cf

Browse files
liesnikovjespercockx
authored andcommitted
switch to v1-build on the nix ci
alex and happy aren't available for cabal v2-build in shellFor due to haskell/cabal#8434 NixOS/nixpkgs#130556 NixOS/nixpkgs#176887 for some reason still needs `cabal update`, but doesn't download anything from there
1 parent 4b75622 commit 0d622cf

File tree

2 files changed

+17
-3
lines changed

2 files changed

+17
-3
lines changed

.github/workflows/nix-ci.yml

+2-1
Original file line numberDiff line numberDiff line change
@@ -43,4 +43,5 @@ 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+
# for some reason this doesn't work without update, even though it doesn't download anything
47+
- run: nix develop -Lv -c bash -c "cabal update; cabal v1-build"

nix/shell.nix

+15-2
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 work,
9+
# which will be done 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+
# related to haskell
819
cabal-install
9-
cabal2nix
1020
haskell-language-server
21+
# general goodies
1122
pkgs.agda
23+
pkgs.nixfmt-rfc-style
24+
cabal2nix
1225
];
1326
}

0 commit comments

Comments
 (0)