330: Fix: Haskell overlay r=blaggacao a=GTrunSec

using `lib.composeExtensions` for packageOverrides is more idiomatic.
Fixes: https://github.com/divnix/devos/pull/325#pullrequestreview-687772802
such as 
```
 python3 = pkgs.python3.override (old: {
   5 │ │ packageOverrides =
   4 │ │ │ pkgs.lib.composeExtensions
   3 │ │ │ │ (old.packageOverrides or (_: _: { }))
   2 │ │ │ │ packageOverrides;
   1 │ });
```

Co-authored-by: GTrunSec <gtrunsec@hardenedlinux.org>
This commit is contained in:
bors[bot] 2021-06-25 12:54:51 +00:00 committed by GitHub
commit 741e8fdc47
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 11 additions and 12 deletions

View File

@ -52,7 +52,6 @@
nur.overlay
agenix.overlay
nvfetcher.overlay
(final: prev: { nvfetcher-bin = nvfetcher.defaultPackage.${final.system}; })
./pkgs/default.nix
];
};

View File

@ -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;
});
});
}