summary refs log tree commit diff
path: root/pkgs/development/haskell-modules/configuration-ghcjs.nix
diff options
context:
space:
mode:
authorLeon Isenberg <ljli@users.noreply.github.com>2017-03-25 05:23:01 +0100
committerPeter Simons <simons@cryp.to>2017-03-29 20:30:28 +0200
commit2553ceb9820761e3c22c50db74513d5a0e1ba6d1 (patch)
tree1c21d00b4a469dbf040ea34ba761d7df994d1450 /pkgs/development/haskell-modules/configuration-ghcjs.nix
parent80a52e22b3b017610f0d710f6fa257b0b601ebc5 (diff)
downloadnixpkgs-2553ceb9820761e3c22c50db74513d5a0e1ba6d1.tar
nixpkgs-2553ceb9820761e3c22c50db74513d5a0e1ba6d1.tar.gz
nixpkgs-2553ceb9820761e3c22c50db74513d5a0e1ba6d1.tar.bz2
nixpkgs-2553ceb9820761e3c22c50db74513d5a0e1ba6d1.tar.lz
nixpkgs-2553ceb9820761e3c22c50db74513d5a0e1ba6d1.tar.xz
nixpkgs-2553ceb9820761e3c22c50db74513d5a0e1ba6d1.tar.zst
nixpkgs-2553ceb9820761e3c22c50db74513d5a0e1ba6d1.zip
haskell: use GHCJS to build Setup.hs for GHCJS packages
Closes https://github.com/NixOS/nixpkgs/pull/23614.
Diffstat (limited to 'pkgs/development/haskell-modules/configuration-ghcjs.nix')
-rw-r--r--pkgs/development/haskell-modules/configuration-ghcjs.nix8
1 files changed, 8 insertions, 0 deletions
diff --git a/pkgs/development/haskell-modules/configuration-ghcjs.nix b/pkgs/development/haskell-modules/configuration-ghcjs.nix
index 4ed6d8a957f..d6d7277cc9d 100644
--- a/pkgs/development/haskell-modules/configuration-ghcjs.nix
+++ b/pkgs/development/haskell-modules/configuration-ghcjs.nix
@@ -53,6 +53,14 @@ self: super:
   terminfo = self.terminfo_0_4_0_2;
   xhtml = self.xhtml_3000_2_1;
 
+  # Cabal isn't part of the stage1 packages which form the default package-db
+  # that GHCJS provides.
+  # Almost all packages require Cabal to build their Setup.hs,
+  # but usually they don't declare it explicitly as they don't need to for normal GHC.
+  # To account for that we add Cabal by default.
+  mkDerivation = args:
+    if args.pname == "Cabal" then super.mkDerivation args else super.mkDerivation (args //
+      { setupHaskellDepends = (args.setupHaskellDepends or []) ++ [ self.Cabal ]; });
 
 ## OTHER PACKAGES