Skip to content

Allow order independent overlays #2043

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 1, 2023
Merged

Allow order independent overlays #2043

merged 1 commit into from
Sep 1, 2023

Conversation

hamishmack
Copy link
Collaborator

Currently the haskell.nix overlays ignore any defaultModules and extraPkgconfigMappings set in prev. This means it is not possible to have an overly include these in an way that will work both before and after the haskell.nix overlays.

With this change an overlay can be written like this:

final: prev: {
  haskell-nix = prev.haskell-nix or {} // {
    extraPkgconfigMappings = prev.haskell-nix.extraPkgconfigMappings or {} // {
    ...

It can then be included before or after the haskell.nix overlays.

See #1954

Currently the haskell.nix overlays ignore any `defaultModules` and `extraPkgconfigMappings` set in `prev`.  This means it is not possible to have an overly include these in an way that will work both before and after the haskell.nix overlays.

With this change an overlay can be written like this:

```
final: prev: {
  haskell-nix = prev.haskell-nix or {} // {
    extraPkgconfigMappings = prev.haskell-nix.extraPkgconfigMappings or {} // {
    ...
```

It can then be included before or after the haskell.nix overlays.
@hamishmack hamishmack requested a review from angerman September 1, 2023 03:39
@hamishmack hamishmack self-assigned this Sep 1, 2023
Copy link
Member

@andreabedini andreabedini left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@hamishmack hamishmack merged commit 77f7f58 into master Sep 1, 2023
hamishmack added a commit to input-output-hk/iohk-nix that referenced this pull request Sep 1, 2023
Take advantage of input-output-hk/haskell.nix#2043 to allow the haskell-nix-crypto overlay to come before or after the haskell.nix overlays.
Copy link
Collaborator

@angerman angerman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm.

hamishmack added a commit to input-output-hk/iohk-nix that referenced this pull request Sep 1, 2023
Take advantage of
input-output-hk/haskell.nix#2043 to allow the
haskell-nix-crypto overlay to come before or after the haskell.nix
overlays.
@angerman angerman deleted the hkm/overlay-order branch September 1, 2023 08:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants