mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-16 14:54:29 +01:00
haskellPackages.ghcWithPackages: throw on old override interface
Adding a fake override function via passthru will at least give users of the old override interface a more helpful error message. Additionally we also document the changes in the changelog.
This commit is contained in:
parent
fae4895e11
commit
8c27f7a2bd
3 changed files with 34 additions and 0 deletions
|
@ -240,6 +240,19 @@
|
|||
<literal>haskellPackages.callPackage</literal>).
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
<literal>pkgs.ghc.withPackages</literal> as well as
|
||||
<literal>haskellPackages.ghcWithPackages</literal> etc. now
|
||||
needs be overridden directly, as opposed to overriding the
|
||||
result of calling it. Additionally, the
|
||||
<literal>withLLVM</literal> parameter has been renamed to
|
||||
<literal>useLLVM</literal>. So instead of
|
||||
<literal>(ghc.withPackages (p: [])).override { withLLVM = true; }</literal>,
|
||||
one needs to use
|
||||
<literal>(ghc.withPackages.override { useLLVM = true; }) (p: [])</literal>.
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
<literal>pkgs.emacsPackages.orgPackages</literal> is removed
|
||||
|
|
|
@ -81,6 +81,12 @@ In addition to numerous new and upgraded packages, this release has the followin
|
|||
instead to ensure cross compilation keeps working (or switch to
|
||||
`haskellPackages.callPackage`).
|
||||
|
||||
- `pkgs.ghc.withPackages` as well as `haskellPackages.ghcWithPackages` etc.
|
||||
now needs be overridden directly, as opposed to overriding the result of
|
||||
calling it. Additionally, the `withLLVM` parameter has been renamed to
|
||||
`useLLVM`. So instead of `(ghc.withPackages (p: [])).override { withLLVM = true; }`,
|
||||
one needs to use `(ghc.withPackages.override { useLLVM = true; }) (p: [])`.
|
||||
|
||||
- `pkgs.emacsPackages.orgPackages` is removed because org elpa is deprecated.
|
||||
The packages in the top level of `pkgs.emacsPackages`, such as org and
|
||||
org-contrib, refer to the ones in `pkgs.emacsPackages.elpaPackages` and
|
||||
|
|
|
@ -164,5 +164,20 @@ symlinkJoin {
|
|||
passthru = {
|
||||
preferLocalBuild = true;
|
||||
inherit (ghc) version meta;
|
||||
|
||||
# Inform users about backwards incompatibilities with <= 21.05
|
||||
override = _: throw ''
|
||||
The ghc.withPackages wrapper itself can now be overridden, but no longer
|
||||
the result of calling it (as before). Consequently overrides need to be
|
||||
adjusted: Instead of
|
||||
|
||||
(ghc.withPackages (p: [ p.my-package ])).override { withLLLVM = true; }
|
||||
|
||||
use
|
||||
|
||||
(ghc.withPackages.override { useLLVM = true; }) (p: [ p.my-package ])
|
||||
|
||||
Also note that withLLVM has been renamed to useLLVM for consistency with
|
||||
the GHC Nix expressions.'';
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue