From 5de8b8530cb436118db192d90824bc6efdfda18a Mon Sep 17 00:00:00 2001 From: tv Date: Tue, 13 Sep 2022 21:22:15 +0200 Subject: haskell overrides: admit old overrides --- krebs/5pkgs/haskell/default.nix | 10 ++++++---- tv/5pkgs/haskell/default.nix | 12 ++++++++---- 2 files changed, 14 insertions(+), 8 deletions(-) diff --git a/krebs/5pkgs/haskell/default.nix b/krebs/5pkgs/haskell/default.nix index 98cbcb3b9..7e9ee7521 100644 --- a/krebs/5pkgs/haskell/default.nix +++ b/krebs/5pkgs/haskell/default.nix @@ -8,11 +8,13 @@ in haskell = super.haskell // { packages = mapAttrs (name: value: if hasAttr "override" value - then value.override { inherit overrides; } + then value.override (old: { + overrides = composeExtensions (old.overrides or (_: _: {})) overrides; + }) else value ) super.haskell.packages; }; - haskellPackages = super.haskellPackages.override { - inherit overrides; - }; + haskellPackages = super.haskellPackages.override (old: { + overrides = composeExtensions (old.overrides or (_: _: {})) overrides; + }); } diff --git a/tv/5pkgs/haskell/default.nix b/tv/5pkgs/haskell/default.nix index fcede2f9c..33fd2506a 100644 --- a/tv/5pkgs/haskell/default.nix +++ b/tv/5pkgs/haskell/default.nix @@ -10,11 +10,15 @@ in haskell = super.haskell // { packages = mapAttrs (name: value: if hasAttr "override" value - then value.override { inherit overrides; } + then value.override (old: { + overrides = + composeExtensions (old.overrides or (_: _: { })) overrides; + }) else value ) super.haskell.packages; }; - haskellPackages = super.haskellPackages.override { - inherit overrides; - }; + haskellPackages = super.haskellPackages.override (old: { + overrides = + composeExtensions (old.overrides or (_: _: { })) overrides; + }); } -- cgit v1.2.3