From 8cca9b16342885a32a2fa8be4d9412b2e94749bb Mon Sep 17 00:00:00 2001 From: sternenseemann <0rpkxez4ksa01gb3typccl0i@systemli.org> Date: Fri, 7 May 2021 19:25:35 +0200 Subject: [PATCH] haskell.packages: refactor set setup using composeManyExtensions --- pkgs/development/haskell-modules/default.nix | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/pkgs/development/haskell-modules/default.nix b/pkgs/development/haskell-modules/default.nix index a4f0399cf3c6..61c797488662 100644 --- a/pkgs/development/haskell-modules/default.nix +++ b/pkgs/development/haskell-modules/default.nix @@ -19,17 +19,16 @@ let inherit stdenv haskellLib ghc buildHaskellPackages extensible-self all-cabal-hashes; }; - commonConfiguration = configurationCommon { inherit pkgs haskellLib; }; - nixConfiguration = configurationNix { inherit pkgs haskellLib; }; + extensions = lib.composeManyExtensions [ + nonHackagePackages + (configurationNix { inherit pkgs haskellLib; }) + (configurationCommon { inherit pkgs haskellLib; }) + compilerConfig + packageSetConfig + overrides + ]; - extensible-self = makeExtensible - (extends overrides - (extends packageSetConfig - (extends compilerConfig - (extends commonConfiguration - (extends nixConfiguration - (extends nonHackagePackages - haskellPackages)))))); + extensible-self = makeExtensible (extends extensions haskellPackages); in