Commit Graph

40 Commits

Author SHA1 Message Date
Shivaraj B H
53e434d194
feat: Add granular settings defaults (#275) 2024-04-20 03:44:10 -04:00
Sridhar Ratnakumar
5dcb739e9c
Add otherOverlays option (#277) 2024-03-27 15:39:41 -04:00
Sridhar Ratnakumar
00d1850d10 test: add README 2024-03-13 17:53:37 -04:00
Sridhar Ratnakumar
f58b3d6793 test/simple: add a readme file 2024-03-13 17:06:47 -04:00
Sridhar Ratnakumar
307961a201 refactor: expose haskellProjectTests in flake module
Because we want to use it in multiple tests.
2024-03-01 11:24:18 -05:00
Sridhar Ratnakumar
11b457aefc
test: Port with-subdir as flake check (#258) 2024-02-29 17:32:26 -05:00
Sridhar Ratnakumar
098bf00212
tests: Derive nixpkgs/flake-parts rev fromexample/flake.lock (#254)
* create example/flake.lock

* nixci: read overrides from example lock

* common.sh: use example lock pins
2024-02-29 14:33:00 -05:00
Sridhar Ratnakumar
c614e2c44f
test: Reproduce #238 (#251)
* switch back to old haskell-multi-nix

* jailbreak
2024-02-29 13:59:09 -05:00
Sridhar Ratnakumar
89ce88babb
test: Update nixpkgs (#248) 2024-02-29 08:14:26 -05:00
Sridhar Ratnakumar
7e97ec1dc8
test/{simple, project-module}: convert to flake checks (#243) 2024-02-24 08:43:41 -05:00
Sridhar Ratnakumar
b3f2e0bb04 test: Add a flake check to run tests
This currently works only on macOS. On Linux, the check fails due to
missing network access.
2024-02-23 15:30:17 -05:00
Sridhar Ratnakumar
eba0200b6e
Allow tests on aarch64-linux, etc. (#234) 2024-02-21 12:06:50 -05:00
Shivaraj B H
56c5550e18
fix(cabal.project parser): parse the packages ending with eof (#222) 2024-02-06 03:08:48 -05:00
Sridhar Ratnakumar
8a526aaf98
Use builtins.traceVerbose for logging (#216) 2024-01-12 08:58:05 -05:00
Berk Özkütük
57cd506878
Fix settings.<name>.cabalFlags implementation (#178)
* Fix cabalFlags implementation

* Improve impl; add test

* update changelog

---------

Co-authored-by: Sridhar Ratnakumar <srid@srid.ca>
2023-06-23 15:09:40 -04:00
Sridhar Ratnakumar
c96e4bdb9e test/simple: Test haddock instead 2023-06-07 13:55:00 -04:00
Sridhar Ratnakumar
99b9dda0df Run nixpkgs-fmt 2023-05-31 10:39:12 -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
3fc703af0c
Test cabal2nix re-eval behaviour (#150) 2023-04-26 21:37:09 -04:00
Sridhar Ratnakumar
81ca2f4051
Remove automatic hpack conversion (#148) 2023-04-26 15:01:02 -04:00
Sridhar Ratnakumar
d9ce6a32f0 Fix statix warnings 2023-04-19 15:13:08 -04:00
Shivaraj B H
4e8e79b9b4
Expose cabal executables as flake apps (#137)
Also,

Add a corresponding `outputs.apps` option, while the `outputs.localPackages` option is renamed to `outputs.packages` (it now contains package metadata, including packages and its executables).
2023-04-19 15:00:22 -04:00
Sridhar Ratnakumar
c8cdbba538 Add readme for test/ 2023-03-14 14:10:19 -04:00
Sridhar Ratnakumar
4a6d06a767 Add test for project module defaults 2023-03-14 14:10:15 -04:00
Sridhar Ratnakumar
6256c9f4c0 Remove unused file 2023-03-14 14:01:29 -04:00
Sridhar Ratnakumar
c26dc57a41 Factor out --override-input in one place 2023-03-14 13:57:58 -04:00
Sridhar Ratnakumar
70359f1652 Add test for hpack support 2023-03-14 13:51:59 -04:00
Sridhar Ratnakumar
b47c95681b
test: Install Nix as a CI step (#125) 2023-03-14 11:48:08 -04:00
Sridhar Ratnakumar
e16a1f8e2a Move template test from ci.yaml to test.sh 2023-03-13 21:40:45 -04:00
Sridhar Ratnakumar
632d3dc7a4
Refactor tests: decouple them to their own subdir (#122) 2023-03-13 21:23:13 -04:00
Robert Hensing
3997077929 Reproduce source filtering problem 2023-03-13 01:38:44 +01:00
Robert Hensing
9c54b5fcd7 Move test -> test/simple 2023-03-13 01:37:55 +01:00
Robert Hensing
5c268a4349 Add devShell.extraLibraries option
> Extra Haskell libraries available in the shell's environment.
2023-03-09 23:37:46 +01:00
Sridhar Ratnakumar
67d2e0c753
Add devShell.mkShellArgs (#92) 2023-02-23 16:44:05 -05:00
Sridhar Ratnakumar
5d1f6d9a76
Add haskellFlakeProjectModules option (#79) 2023-02-11 14:49:40 -05:00
Sridhar Ratnakumar
4585d422cd
Make overrides an overlay type rather than a functionTo (#67) 2023-02-10 15:07:06 -05:00
ACreed
7019678d8c
Have packages option auto-detect single-package projects (#75)
Co-authored-by: Ag <aravindmallapureddy@juspay.in>
Co-authored-by: Sridhar Ratnakumar <srid@srid.ca>
2023-02-09 20:49:45 -05:00
Sridhar Ratnakumar
f7266e7b4e Remove hlsCheck 2023-02-06 17:42:00 -05:00
Sridhar Ratnakumar
014aa621ec
Add devShell submodule; allow disabling dev environment (#61) 2023-02-05 14:06:19 -05: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