Commit Graph

55 Commits

Author SHA1 Message Date
Sridhar Ratnakumar
090cb574e7
chore: Tag release 2024-06-24 13:16:27 -04:00
Sridhar Ratnakumar
a85328353a fix: buildFromSdist default for haskell-flake managed packages only 2024-04-22 03:58:10 -04:00
Shivaraj B H
53e434d194
feat: Add granular settings defaults (#275) 2024-04-20 03:44:10 -04:00
Sridhar Ratnakumar
d9dbdd466a
buildFromSdist: enable only for local packages (#298) 2024-04-03 03:30:17 -04:00
Sridhar Ratnakumar
b1db0d5312 fix: make brokenVersions actually work
resolves #297
2024-04-03 17:09:10 +11:00
Sridhar Ratnakumar
cac0cff083 fix: make removeConfigureFlags actually work
resolves #296
2024-04-03 17:05:41 +11:00
Sridhar Ratnakumar
4aab279d0c changelog: edit 2024-03-29 12:10:33 -04:00
Sridhar Ratnakumar
f12f4bbc93 changelog: group 2024-03-29 12:09:04 -04:00
Sridhar Ratnakumar
51bcbc2719
Reintroduce buildFromSdist (enable it by default) (#286) 2024-03-29 12:05:12 -04:00
Sridhar Ratnakumar
5dcb739e9c
Add otherOverlays option (#277) 2024-03-27 15:39:41 -04:00
Robert Hensing
73707ab1b8 attrsOf -> lazyAttrsOf
This means we don't support `mkIf` in the exact places where the
type was `attrsOf`. Almost always, `mkIf` can be replaced by
`optionalAttrs`.

The benefit is that the code becomes much lazier, improving performance
and
- Fixes https://github.com/srid/haskell-flake/issues/270
2024-03-12 16:49:52 -04:00
Sridhar Ratnakumar
3a8c1b58cf
Make buildFromSdist configurable; turn it off by default (#253) 2024-02-29 14:00:14 -05:00
Shivaraj B H
5113f700d6
settings: add removeReferencesTo (#225)
This setting helps remove unnecessary dependencies to your haskell package that
bloats up the final closure size

Source: 5623bb3814/nix/removeReferencesTo.nix (L9)


---------

Co-authored-by: Sridhar Ratnakumar <3998+srid@users.noreply.github.com>
Co-authored-by: Sridhar Ratnakumar <srid@srid.ca>
2024-02-13 09:49:51 -05:00
Sridhar Ratnakumar
f9d17c3aa6
Make devShell.tools a lazyAttrsOf (#223) 2024-02-06 12:56:03 -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
dd0d3b9d51
Switch to buildFromSdist (#221) 2024-02-05 10:56:41 -05:00
Sridhar Ratnakumar
8a526aaf98
Use builtins.traceVerbose for logging (#216) 2024-01-12 08:58:05 -05:00
Sridhar Ratnakumar
c9c28dc5c2
changelog: mention parent PR 2024-01-11 05:23:52 -05:00
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