Commit Graph

37 Commits

Author SHA1 Message Date
Sridhar Ratnakumar
5cc916fd24
changelog: fix formatting 2024-01-10 11:29:21 -05:00
Shivaraj B H
f28104504a
[settings/all]: add extraLibraries option (#210) 2023-12-13 13:43:03 -05:00
Sridhar Ratnakumar
c8622c8a25 Prep for release 2023-08-22 18:01:29 -04:00
Yuan Wang
f16e7ac05b
replace types.string with types.str (#189) 2023-08-11 10:19:04 -04:00
Shivaraj B H
658dfcf5b0
Add benchmark and hoogle devShell options (#175) 2023-06-26 12:21:46 -04: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
Dixon Sean Low Yan Feng
c5e908e1c9
fix: don't rely on string context for package source (#170)
* fix: don't rely on string context for package source

Before this commit, the type of a package source (haskell-source-type)
depended on string contexts in its `check` function. However, string
contexts do not work well to represent a path to a package source. For
instance, "hello ./subdirectory" would have a string context, but is
obviously not a valid path.

Furthermore, a `nix` bug (https://github.com/NixOS/nix/issues/8428)
related to string contexts triggers an issue where setting the project
root causes a type error with haskell-source-type (https://github.com/srid/haskell-flake/issues/169).

This commit replaces haskell-source-type with `with type; either path str`
and instances of `isPathUnderNixStore` with `lib.types.path.check` to
avoid using string contexts.

* Update CHANGELOG.md

---------

Co-authored-by: Sridhar Ratnakumar <3998+srid@users.noreply.github.com>
2023-06-15 12:56:16 -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
74210fa80a
Prep 0.3.0 2023-05-22 14:36:44 -04:00
Sridhar Ratnakumar
98dfcc619b Enable specifying the default devShell.tools 2023-04-28 16:24:54 -04:00
Sridhar Ratnakumar
11ab35533a
exe: Use getBin instead of justStaticExecutables (#151) 2023-04-27 12:57:56 -04:00
Sridhar Ratnakumar
1ca25ec71f Log the default 'packages' value 2023-04-27 11:52:52 -04:00
Sridhar Ratnakumar
6e3f2fba3f Add a 'debug' option to log drv hashes at all stages 2023-04-26 21:38:16 -04:00
Sridhar Ratnakumar
81ca2f4051
Remove automatic hpack conversion (#148) 2023-04-26 15:01:02 -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
8fb3bbe77c
Change autoWire to be an enum type (#143) 2023-04-12 18:22:28 -04:00
Sridhar Ratnakumar
c74e7c5967
Add outputs.checks (#138) 2023-04-08 10:17:39 -04:00
Sridhar Ratnakumar
2fde5d0cab
Add autoWire option, to control flake outputs (#134)
* Add autoWire option, to control flake outputs

* add changelog
2023-03-30 16:53:07 -04:00
Sridhar Ratnakumar
26852ade57 Prep for 0.2.0 2023-03-13 18:03:29 -04:00
Robert Hensing
cd5e16917d Add trivial source filter to avoid rebuilds 2023-03-12 22:19:36 -04:00
Sridhar Ratnakumar
56d8d9787a
Autodetect "packages" based on cabal.project (and package.yaml) (#110) 2023-03-10 09:41:21 -05:00
Sridhar Ratnakumar
f5e043161d Add to changelog 2023-03-09 18:33:23 -05:00
Sridhar Ratnakumar
7997b6fc5d
Add a default for haskellFlakeProjectModules (#106) 2023-03-06 17:37:35 -05:00
Sridhar Ratnakumar
9e2f7f159a
Revamp 'outputs' (#102) 2023-03-02 14:15:39 -05:00
Sridhar Ratnakumar
3c35953126
Make source-overrides support Hackage inputs (#100) 2023-03-01 09:48:48 -05:00
Sridhar Ratnakumar
67d2e0c753
Add devShell.mkShellArgs (#92) 2023-02-23 16:44:05 -05:00
Sridhar Ratnakumar
a28156e5d9
Simplify .cabal files detection (#91)
* Simplify .cabal files detection

This, incidentally, allows a mix of top-level and sub-cabal files, but
that is okay.

* Re-format error message
2023-02-23 12:16:27 -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
Shivaraj B H
3a515400fd
Expose two templates: default and example (#69)
Co-authored-by: Sridhar Ratnakumar <srid@srid.ca>
2023-02-09 21:16:59 -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
026acf572f
Rename haskellPackages -> basePackages (#77)
* Rename haskellPackages -> basePackages

* Typo
2023-02-09 20:05:44 -05:00
Robert Hensing
1e355a1e36
Expose finalPackages (#68)
* Expose finalPackages

* Check docs in tests

* Add docs.sh script

* Turn haskell-project.nix into a module

* flake-module.nix: Refactor, move to create single perSystem module

Co-authored-by: Sridhar Ratnakumar <srid@srid.ca>
2023-02-08 17:15:49 -05:00
Sridhar Ratnakumar
f7266e7b4e Remove hlsCheck 2023-02-06 17:42:00 -05:00
Sridhar Ratnakumar
5190f7e526
Refactor: move impl to inner config (#63)
Also 
- expose flake outputs in `config.haskellProjects.foo.outputs`.
- split the module so the main implementation lives in separate file (easier to modify in future PRs)
2023-02-06 15:18:05 -05:00
Sridhar Ratnakumar
014aa621ec
Add devShell submodule; allow disabling dev environment (#61) 2023-02-05 14:06:19 -05:00
Sridhar Ratnakumar
c2cafce9d5 add changelog 2023-02-01 19:15:42 -05:00