diff options
author | tv <tv@krebsco.de> | 2017-08-06 21:33:10 +0200 |
---|---|---|
committer | tv <tv@krebsco.de> | 2017-08-07 22:05:48 +0200 |
commit | a4c61396ed53bb640b8b557d80b3b283264ccd1a (patch) | |
tree | 453cf4fc957fa81119eec4bb62a69f04bc4d7c48 /krebs/5pkgs/haskell/default.nix | |
parent | 87c7d8dcf933c2de783098dfe9b6f1b383062daf (diff) |
override all Haskell packages
Diffstat (limited to 'krebs/5pkgs/haskell/default.nix')
-rw-r--r-- | krebs/5pkgs/haskell/default.nix | 23 |
1 files changed, 14 insertions, 9 deletions
diff --git a/krebs/5pkgs/haskell/default.nix b/krebs/5pkgs/haskell/default.nix index 1120356a7..64c5f9257 100644 --- a/krebs/5pkgs/haskell/default.nix +++ b/krebs/5pkgs/haskell/default.nix @@ -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; }; } |