From 6d5751bfa564a365add8a3d7d7d070541a9e33fc Mon Sep 17 00:00:00 2001 From: Kirill Elagin Date: Fri, 27 Apr 2018 20:14:15 +0300 Subject: haskell: Add setup depends for Cabal --- pkgs/development/haskell-modules/configuration-common.nix | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'pkgs/development/haskell-modules/configuration-common.nix') diff --git a/pkgs/development/haskell-modules/configuration-common.nix b/pkgs/development/haskell-modules/configuration-common.nix index a9db4a8ce72c..c420c19d0758 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 +) -- cgit 1.4.1