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
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>
* 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>
**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