Skip to content
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

haskellPackages: Don't ignore old overrides #62742

Merged
merged 1 commit into from Aug 1, 2019

Conversation

infinisil
Copy link
Member

This prevented pkgs.haskell.packages.${compiler} overlays from propagating
to pkgs.haskellPackages

E.g. if you use this overlay:

self: super: {
  haskell = super.haskell // {
    packages = super.haskell.packages // {
      ghc865 = super.haskell.packages.ghc865.override (old: {
        overrides = super.lib.composeExtensions (old.overrides or (hself: hsuper: {})) (hself: hsuper: {
          foobarbaz = "foobarbaz";
        });
      });
    };
  };
}

You now have access to foobarbaz through pkgs.haskellPackages.foobarbaz in addition to pkgs.haskell.packages.ghc865.foobarbaz.

Pinging @peti @r-ryantm @basvandijk @domenkozar

overrides = haskell.packageOverrides;
});
haskellPackages = dontRecurseIntoAttrs (haskell.packages.ghc865.override (old: {
overrides = lib.composeExtensions (old.overrides or (self: super: {})) haskell.packageOverrides;
Copy link
Member

Choose a reason for hiding this comment

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

Is haskell.packageOverrides even necessary here? ghc865 should pick it up from:

https://github.com/NixOS/nixpkgs/blob/master/pkgs/top-level/haskell-packages.nix#L24

Copy link
Member Author

Choose a reason for hiding this comment

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

Not really sure, there might be some .extend/.override/packageOverrides whatever magic we're not seeing here, or maybe not. Unless somebody has a reason to keep this, I'll just remove this.

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah actually you're right, this is handled already, I'll remove the ugliness here

@matthewbauer matthewbauer requested a review from peti June 5, 2019 22:34
This prevented haskell.packages.${compiler} overlays from propagating
to haskellPackages.
@infinisil
Copy link
Member Author

I verified with this that packageOverrides still works:

(import ./. {
  overlays = [(self: super: {
    haskell = super.haskell // {
      packageOverrides = hself: hsuper: {
        flobberglab = "Hello";
      };
    };
  })];
}).haskellPackages.flobberglab

I'll go ahead and merge this

@infinisil infinisil merged commit 386f516 into NixOS:master Aug 1, 2019
@infinisil infinisil deleted the haskellPackages-overrides branch August 1, 2019 15:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants