File tree Expand file tree Collapse file tree 4 files changed +23
-10
lines changed Expand file tree Collapse file tree 4 files changed +23
-10
lines changed Original file line number Diff line number Diff line change 6161 with :
6262 primary-key : nix-devshell-${{ hashFiles('**/*.nix', '**/flake.lock') }}
6363 - name : drop into the devshell and run cabal
64- # for some reason this doesn't work without update
65- # even though it doesn't actually download anything
64+ # we're using v1 command due to a lonstanding cabal-nix bug
65+ #
66+ # explainer: https://gist.github.com/ScottFreeCode/ef9f254e2dd91544bba4a068852fc81f
67+ #
68+ # bugs:
69+ # https://github.com/haskell/cabal/issues/8434
70+ # https://github.com/NixOS/nixpkgs/issues/130556
71+ # https://github.com/NixOS/nixpkgs/issues/176887
72+ #
73+ # finally, v1-build doesn't work without update for some reason
74+ # even though the update doesn't actually download anything
6675 run : nix develop -Lv -c bash -c "cabal update; cabal v1-build"
Original file line number Diff line number Diff line change 1212 makeWrapper ,
1313 writeText ,
1414 ghcWithPackages ,
15- diffutils ,
1615} :
1716
1817let
5352 {
5453 inherit pname version ;
5554 nativeBuildInputs = [
56- diffutils
5755 makeWrapper
5856 ] ;
5957 passthru = {
Original file line number Diff line number Diff line change 1010 src = ../. ;
1111 extraCabal2nixOptions = options ; # "--jailbreak"
1212 } ;
13- # Disable tests in nix build - the testsuite requires the agda2hs binary
14- # to be in PATH, which is a circular dependency. Tests should be run
15- # via `cabal test` in a development environment instead.
16- hpkg = pkgs . haskell . lib . dontCheck ( pkgs . haskellPackages . callPackage ( hsrc "" ) { } ) ;
13+ hpkg = ( pkgs . haskellPackages . callPackage ( hsrc "" ) { } ) . overrideAttrs (
14+ finAttr : preAttr : {
15+ # make executables executable and add ./dist/build to PATH
16+ # cabal2nix doesn't pick up agda2hs from build-tool-depends of the test suite
17+ # my (@liesnikov) guess is that since the intermediate binary
18+ # is not a separate derivation it's hard to form a fixpoint on a derivation level
19+ preCheck = ''
20+ find dist/build -exec chmod u+X {} +
21+ export PATH=$(pwd)/dist/build/:$PATH
22+ '' ;
23+ }
24+ ) ;
1725 expr = import ./agda2hs.nix ;
1826 agda2hs = pkgs . lib . makeScope pkgs . newScope (
1927 self :
Original file line number Diff line number Diff line change @@ -24,7 +24,5 @@ pkgs.haskellPackages.shellFor {
2424 pkgs . nixfmt-rfc-style
2525 cabal2nix
2626 pkgs . haskellPackages . fix-whitespace
27- # The testsuite uses diff, so ensure `diff` is available in the shell/tests
28- pkgs . diffutils
2927 ] ;
3028}
You can’t perform that action at this time.
0 commit comments