override all Haskell packages

This commit is contained in:
tv 2017-08-06 21:33:10 +02:00
parent 87c7d8dcf9
commit a4c61396ed

View File

@ -1,15 +1,20 @@
with import <stockholm/lib>;
let
overrides = self: super:
listToAttrs
(map
(name: nameValuePair (removeSuffix ".nix" name)
(self.callPackage (./. + "/${name}") {}))
(filter
(name: name != "default.nix" && !hasPrefix "." name)
(attrNames (readDir ./.))));
in
self: super:
{
haskell.packages = mapAttrs (_: pkgs: pkgs.override {
inherit overrides;
}) super.haskell.packages;
haskellPackages = super.haskellPackages.override {
overrides = self: super:
listToAttrs
(map
(name: nameValuePair (removeSuffix ".nix" name)
(self.callPackage (./. + "/${name}") {}))
(filter
(name: name != "default.nix" && !hasPrefix "." name)
(attrNames (readDir ./.))));
inherit overrides;
};
}