Commit Graph

3 Commits

Author SHA1 Message Date
Hamish Mackenzie a070082964 Improve flake code (#1743)
* Add hydraJobs.devShell and flatten hydraJobs

Also moves the `rawFlake` code into a `haskellLib.mkFlake` function

* Unflatten hydraJobs and add ciJobs

It turns out it is nice to use system first in the hierarchy for cicero.  Also both hydra and cicero are ok with a deep hierarchy of attributes.

* Refactoring

* Add mkFlakeCiJobs

* Avoid `:` in ciJobs and hydraJobs

* Use cabal names again in ciJobs

* More updates

Turns off code coverage by default.
Rename flattenChecks to mkFlakeChecks.
Adds flake packages to ciJobs and hydraJobs.

* Expand comment
2022-10-11 23:52:50 +13:00
Hamish Mackenzie 4c8bbbd3ed Add flake.variants (#1661)
* Add flake.variants

This allows flakes to easily include variations of the
project by with different project arguments.
Anything you can pass to `project.addModule` can be used.
For instance to include variants using ghc 9.2.4:

```
flake.variants.ghc924.compiler-nix-name = pkgs.lib.mkForce "ghc924";
```
Then use it with:

```
nix build .#ghc924:hello:exe:hello
```

This change also:

* Exposes add `combineFlakes` and `rawFlake` for more control over how flakes are combined.

* Includes package coverageReports to the `hydraJobs` of the flakes.

* Tries to make the materialisation concurrency test more reliable
2022-09-16 22:21:54 +12:00
Hamish Mackenzie 05c0555400 Add flake support to hix (#1572)
This adds support for using nix flakes commands with hix.  This is done by creating a hidden `.hix-flake` directory and passing the source in using `--override-input`.

It also includes a `hix init` command to add a `flake.nix` and `nix/hix.nix` configuration file.
2022-08-05 10:17:16 +12:00