Commit Graph

5 Commits

Author SHA1 Message Date
Sridhar Ratnakumar
b0491e20be
Add dev flake (#179)
* Add dev flake

* Build dev flake in Jenkins

* dev: Use treefmt-nix (for CI check)

* treefmt-nix: point to PR
2023-07-03 16:56:27 -04:00
Sridhar Ratnakumar
996f5c2cdc
Modular overrides (#162)
**Completely new way to override Haskell packages**: removed `overrides` and `source-overrides`. Use `packages` to specify your source overrides; use `settings` to override individual packages in modular fashion (like NixOS modules). Additional changes include:
  - Add `package.<name>.cabal.executables` referring to the executables in a package. This is auto-detected by parsing the Cabal file.
  - Add `packages.<name>.local.*` to determine of a package is a local package or not.
  - Add `projectFlakeName` option (useful in debug logging prefix)
  - `flake.haskellFlakeProjectModules`: Dropped all defaults, except the `output` module, which now exports `packages` and `settings`. Added a `defaults.projectModules.output` option that allows the user to override this module, or directly access the generated module.
  - Add `project.config.defaults.settings.default` defining sensible defaults for local packages.
  - Add `project.config.defaults.enable` to turn off all default settings en masse.

Also, disable docs test due to https://github.com/hercules-ci/flake.parts-website/issues/332
2023-05-30 13:55:26 -04:00
Sridhar Ratnakumar
47437fbb88
Add automated test (#60)
- Add `./test` that aims to use all features of haskell-flake
- Add `./test/test.sh` that verifies that the devshell of `./test` is as one would expect
- Add `./runtest.sh` at project root to run the full test
- Run the same ^ in Github Actions

I'm *not* entirely happy with this approach; in particular, `test.sh` seems pretty hacky. But it works. Not sure if it will scale.
2023-02-01 14:52:39 -05:00
Sridhar Ratnakumar
5336f47e22 git: ignore .vscode 2023-01-31 17:44:57 -05:00
Sridhar Ratnakumar
b259287b75 Add code from haskell-template 2022-05-30 09:10:25 -04:00