File tree Expand file tree Collapse file tree 2 files changed +33
-10
lines changed
Expand file tree Collapse file tree 2 files changed +33
-10
lines changed Original file line number Diff line number Diff line change 2121 pkgs = prev ;
2222 } ;
2323
24+ # Some type checker plugins have tests that invoke GHC which requires the package
25+ # themselves to be available.
26+ ghc-typelits-plugins-preCheck-script = pkgName : ''
27+ unset GHC_ENVIRONMENT
28+ wrapper="'' ${TMPDIR:-/tmp}/ghc-for-tests"
29+ cat > "$wrapper" <<'EOF'
30+ #!/bin/sh
31+ exec ghc -package-db "$PWD/dist/package.conf.inplace" -package ${ pkgName } "$@"
32+ EOF
33+ chmod +x "$wrapper"
34+ export HC="$wrapper"
35+ '' ;
36+
2437 # An overlay with the packages we pull in as inputs to this flake.
2538 #
2639 # This is mostly intended for packages developed by QBayLogic which are
3447 { } ;
3548
3649 ghc-typelits-extra =
37- hprev . callCabal2nix
38- "ghc-typelits-extra"
39- "${ ghc-typelits-extra } "
40- { } ;
50+ prev . haskell . lib . overrideCabal
51+ ( hprev . callCabal2nix
52+ "ghc-typelits-extra"
53+ "${ ghc-typelits-extra } "
54+ { }
55+ )
56+ ( drv : {
57+ preCheck = ghc-typelits-plugins-preCheck-script "ghc-typelits-extra" ;
58+ } ) ;
4159
4260 ghc-typelits-knownnat =
4361 hprev . callCabal2nix
4664 { } ;
4765
4866 ghc-typelits-natnormalise =
49- hprev . callCabal2nix
50- "ghc-typelits-natnormalise"
51- "${ ghc-typelits-natnormalise } "
52- { } ;
67+ prev . haskell . lib . overrideCabal
68+ ( hprev . callCabal2nix
69+ "ghc-typelits-natnormalise"
70+ "${ ghc-typelits-natnormalise } "
71+ { }
72+ )
73+ ( drv : {
74+ preCheck = ghc-typelits-plugins-preCheck-script "ghc-typelits-natnormalise" ;
75+ } ) ;
5376 } ;
5477
5578 # An overlay with the packages in this repository.
You can’t perform that action at this time.
0 commit comments