haskell.nix/test
Hamish Mackenzie 2576a948b5
Improve support for external Hackage repositories (#1370)
* Improve support for external Hackage repositories

This change builds #535. `repository` blocks in `cabal.project` parsed and `cabal` is used to automatically downloaded them.  Then `hackage-to-nix` is used to produce the nix required.

To make it work with restricted eval (on hydra for instance) we need to include a sha256 like this:

```
repository ghcjs-overlay
  url: https://input-output-hk.github.io/hackage-overlay-ghcjs
  secure: True
  root-keys:
  key-threshold: 0
  --sha256: sha256-EPlLYPmIGtxeahlOspRzwJv+60N5mqrNC2BY4jZKceE=
```

To find the correct `sha256` put in an invalid one and attempt a build.
2022-02-18 00:42:11 +13:00
..
buildable Add GHC 9.0.1 (#1032) 2021-03-28 21:03:20 +13:00
builder-haddock Add ghc 9.2.1 and update internal cabal to 3.6.2 (#1286) 2021-11-13 12:43:04 +13:00
c-ffi fix ghcjs (#1311) 2022-01-09 03:11:37 +13:00
cabal-22 Add GHC 9.0.2 (#1338) 2022-01-09 03:10:05 +13:00
cabal-doctests niv update nixpkgs-unstable and add ghc 8.10.5 (#1121) 2021-06-15 19:50:45 +12:00
cabal-hpack Use pkgs.lib instead of stdenv.lib (#1031) 2021-02-11 01:07:16 +13:00
cabal-simple Add GHC 9.0.2 (#1338) 2022-01-09 03:10:05 +13:00
cabal-simple-debug Skip dwarf version of ghc 9.2.1 on hydra (#1333) 2022-01-05 03:12:21 +13:00
cabal-simple-prof Rename executable-profiling flag as suggested by Cabal (#1136) 2021-12-27 15:28:59 +08:00
cabal-source-repo Add ghc 9.2.1 and update internal cabal to 3.6.2 (#1286) 2021-11-13 12:43:04 +13:00
cabal-source-repo-comments Add ghc 9.2.1 and update internal cabal to 3.6.2 (#1286) 2021-11-13 12:43:04 +13:00
cabal-sublib Add ghc 9.2.1 and update internal cabal to 3.6.2 (#1286) 2021-11-13 12:43:04 +13:00
call-cabal-project-to-nix Add ghc 9.2.1 and update internal cabal to 3.6.2 (#1286) 2021-11-13 12:43:04 +13:00
call-stack-to-nix Update nixpkgs unstable. (#1196) 2021-08-18 00:44:03 +12:00
coverage Update nixpkgs unstable. (#1196) 2021-08-18 00:44:03 +12:00
coverage-golden niv update nixpkgs-unstable and add ghc 8.10.5 (#1121) 2021-06-15 19:50:45 +12:00
coverage-no-libs Update nixpkgs unstable. (#1196) 2021-08-18 00:44:03 +12:00
exe-only Use pkgs.lib instead of stdenv.lib (#1031) 2021-02-11 01:07:16 +13:00
extra-hackage Improve support for external Hackage repositories (#1370) 2022-02-18 00:42:11 +13:00
fully-static Flakify all inputs (#1180) 2021-08-06 15:54:39 +12:00
ghc-options Add ghc 9.2.1 and update internal cabal to 3.6.2 (#1286) 2021-11-13 12:43:04 +13:00
ghcjs-overlay Improve support for external Hackage repositories (#1370) 2022-02-18 00:42:11 +13:00
githash Add GHC 9.0.2 (#1338) 2022-01-09 03:10:05 +13:00
haskell-language-server Add GHC 9.0.2 (#1338) 2022-01-09 03:10:05 +13:00
index-state Add GHC 9.0.2 (#1338) 2022-01-09 03:10:05 +13:00
project-flags Add ghc 9.2.1 and update internal cabal to 3.6.2 (#1286) 2021-11-13 12:43:04 +13:00
setup-deps Add GHC 9.0.2 (#1338) 2022-01-09 03:10:05 +13:00
sha256map Improve support for external Hackage repositories (#1370) 2022-02-18 00:42:11 +13:00
shell-for Add GHC 8.10.7 (#1220) 2021-09-01 22:43:31 +12:00
shell-for-setup-deps Add GHC 9.0.2 (#1338) 2022-01-09 03:10:05 +13:00
snapshots Update nixpkgs unstable. (#1196) 2021-08-18 00:44:03 +12:00
stack-local-resolver Update nixpkgs unstable. (#1196) 2021-08-18 00:44:03 +12:00
stack-local-resolver-subdir Update nixpkgs unstable. (#1196) 2021-08-18 00:44:03 +12:00
stack-remote-resolver Update nixpkgs unstable. (#1196) 2021-08-18 00:44:03 +12:00
stack-simple use Cabal 3.6.2.0 (#1328) 2022-01-04 17:53:33 +13:00
stack-source-repo Update nixpkgs unstable. (#1196) 2021-08-18 00:44:03 +12:00
sublib-docs Add ghc 9.2.1 and update internal cabal to 3.6.2 (#1286) 2021-11-13 12:43:04 +13:00
with-packages Fix libnuma dependency in rts.conf (#1342) 2022-02-15 23:49:45 +13:00
default.nix Improve support for external Hackage repositories (#1370) 2022-02-18 00:42:11 +13:00
README.md Add cross-compiled musl libc builds of tests (#157) 2019-07-02 18:25:40 +10:00
regen.nix Spelling, typo and whitespace fixes (#833) 2020-08-31 11:08:25 +12:00
tests.sh Update nixpkgs unstable. (#1196) 2021-08-18 00:44:03 +12:00
unit.nix Improve support for external Hackage repositories (#1370) 2022-02-18 00:42:11 +13:00
util.nix tests: Add more tests for "all" component merging 2019-02-07 09:39:12 +08:00

Haskell infrastructure test cases

To build the test cases, run from the test directory:

nix-build --no-out-link default.nix

To run all tests (includes impure tests), use the script:

./tests.sh

Generated code

If you change the test Cabal files or need to regenerate the code with nix-tools, then see regen.nix. Run it like this:

$(nix-build --no-out-link regen.nix)