From a4c61396ed53bb640b8b557d80b3b283264ccd1a Mon Sep 17 00:00:00 2001 From: tv Date: Sun, 6 Aug 2017 21:33:10 +0200 Subject: [PATCH] override all Haskell packages --- krebs/5pkgs/haskell/default.nix | 23 ++++++++++++++--------- 1 file 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 ; - +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; }; }