From 6d5751bfa564a365add8a3d7d7d070541a9e33fc Mon Sep 17 00:00:00 2001 From: Kirill Elagin Date: Fri, 27 Apr 2018 20:14:15 +0300 Subject: [PATCH] haskell: Add setup depends for Cabal --- .../haskell-modules/configuration-common.nix | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/pkgs/development/haskell-modules/configuration-common.nix b/pkgs/development/haskell-modules/configuration-common.nix index a9db4a8ce72..c420c19d075 100644 --- a/pkgs/development/haskell-modules/configuration-common.nix +++ b/pkgs/development/haskell-modules/configuration-common.nix @@ -1068,3 +1068,14 @@ self: super: { in { inherit amazonka amazonka-core amazonka-test; }) + +// + +# The actual Cabal library gets built while building its `Setup.hs`. +(let + inherit (pkgs.lib) filterAttrs flip mapAttrs hasPrefix; + cabals = filterAttrs (n: v: hasPrefix "Cabal_" n) super; + fixCabal = n: v: addSetupDepends v [ self.mtl self.parsec ]; +in + mapAttrs fixCabal cabals +)