Skip to content

Commit

Permalink
Merge #330
Browse files Browse the repository at this point in the history
330: Fix: Haskell overlay r=blaggacao a=GTrunSec

using `lib.composeExtensions` for packageOverrides is more idiomatic.
Fixes: #325 (review)
such as 
```
 python3 = pkgs.python3.override (old: {
   5 │ │ packageOverrides =
   4 │ │ │ pkgs.lib.composeExtensions
   3 │ │ │ │ (old.packageOverrides or (_: _: { }))
   2 │ │ │ │ packageOverrides;
   1 │ });
```

Co-authored-by: GTrunSec <[email protected]>
  • Loading branch information
bors[bot] and GTrunSec authored Jun 25, 2021
2 parents e3b7c07 + f1117f2 commit 741e8fd
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 12 deletions.
1 change: 0 additions & 1 deletion flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@
nur.overlay
agenix.overlay
nvfetcher.overlay
(final: prev: { nvfetcher-bin = nvfetcher.defaultPackage.${final.system}; })
./pkgs/default.nix
];
};
Expand Down
22 changes: 11 additions & 11 deletions overlays/overrides.nix
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,15 @@ channels: final: prev: {
starship;


haskellPackages = prev.haskellPackages.override {
overrides = hfinal: hprev:
let version = prev.lib.replaceChars [ "." ] [ "" ] prev.ghc.version;
in
{
# same for haskell packages, matching ghc versions
inherit (channels.latest.haskell.packages."ghc${version}")
haskell-language-server;
};
};

haskellPackages = prev.haskellPackages.override
(old: {
overrides = prev.lib.composeExtensions (old.overrides or (_: _: { })) (hfinal: hprev:
let version = prev.lib.replaceChars [ "." ] [ "" ] prev.ghc.version;
in
{
# same for haskell packages, matching ghc versions
inherit (channels.latest.haskell.packages."ghc${version}")
haskell-language-server;
});
});
}

0 comments on commit 741e8fd

Please sign in to comment.