mirror of
https://github.com/srid/haskell-flake.git
synced 2024-09-11 14:05:58 +03:00
docs: Update buildFromSdist default
Also add a warning about potential issues. The function hasn't been updated upstream since 2018 - https://github.com/NixOS/nixpkgs/pull/48699
This commit is contained in:
parent
01fb3da1c6
commit
56452c3b56
@ -4,7 +4,7 @@ order: -9
|
||||
|
||||
# Package Settings
|
||||
|
||||
Settings for individual Haskell packages can be specified in the `settings` attribute of a `haskellProjects` module.
|
||||
Settings for individual Haskell packages can be specified in the `settings` attribute of a `haskellProjects` module.
|
||||
|
||||
```nix
|
||||
haskellProjects.default = {
|
||||
@ -35,9 +35,10 @@ haskellProjects.default = {
|
||||
};
|
||||
```
|
||||
|
||||
>[!info] Note
|
||||
> [!info] Note
|
||||
>
|
||||
> ### [nixpkgs] functions
|
||||
>
|
||||
>
|
||||
> - The `pkgs.haskell.lib` module provides various utility functions that you can use to override Haskell packages. The canonical place to find documentation on these is [the source](https://github.com/NixOS/nixpkgs/blob/master/pkgs/development/haskell-modules/lib/compose.nix). haskell-flake provides a `settings` submodule for convenience. For eg., the `dontCheck` function translates to `settings.<name>.check`; the full list of options can be seen [here](https://github.com/srid/haskell-flake/blob/master/nix/modules/project/settings/all.nix).
|
||||
|
||||
## Sharing package settings {#share}
|
||||
@ -46,7 +47,7 @@ haskellProjects.default = {
|
||||
|
||||
## Custom settings {#custom}
|
||||
|
||||
You can provide custom settings for use in multiple packages (even across multiple repos). For example, see [this Emanote change](https://github.com/srid/emanote/commit/5b24bd04f94e03afe66ee01da723e4a05d854953) which demonstrates how to add a *new* setting option (`removeReferencesTo`).
|
||||
You can provide custom settings for use in multiple packages (even across multiple repos). For example, see [this Emanote change](https://github.com/srid/emanote/commit/5b24bd04f94e03afe66ee01da723e4a05d854953) which demonstrates how to add a _new_ setting option (`removeReferencesTo`).
|
||||
|
||||
## Extra settings {#extra}
|
||||
|
||||
@ -57,12 +58,15 @@ haskell-flake provides the following settings on top of those provided by [nixpk
|
||||
Remove references to other packages from this Haskell package. This is useful to eliminate unnecessary data dependencies from your Haskell executable so as to reduce its closure size.
|
||||
|
||||
> [!info] For more, see
|
||||
>
|
||||
> - https://github.com/NixOS/nixpkgs/pull/204675
|
||||
> - https://srid.ca/remove-references-to
|
||||
|
||||
### `buildFromSdist`
|
||||
|
||||
Newer versions of [nixpkgs] provide `buildFromSdist` to build your package from the `cabal sdist` tarball. While this is disabled by default ([see here](https://github.com/srid/haskell-flake/pull/253)), you can enable it by setting `settings.<name>.buildFromSdist` to `true`.
|
||||
|
||||
Newer versions of [nixpkgs] provide `buildFromSdist` to build your package from the `cabal sdist` tarball. This is enabled by default, to help with checking release-worthiness of your packages.
|
||||
|
||||
[nixpkgs]: https://nixos.asia/en/nixpkgs
|
||||
> [!warning] Issues with `buildFromSdist`
|
||||
> If you encounter issues with `buildFromSdist` you can disable it by setting `settings.<name>.buildFromSdist` to `true`.
|
||||
|
||||
[nixpkgs]: https://nixos.asia/en/nixpkgs
|
||||
|
Loading…
Reference in New Issue
Block a user