Add support for webkit builds to haskellPackages.ghcjsDom

This commit is contained in:
Ryan Trinkle 2014-08-29 22:08:18 -04:00
parent 0c32671b45
commit ceabc66ce2

View File

@ -1,15 +1,19 @@
{ cabal, fetchgit, ghcjsBase, mtl }: { cabal, fetchgit, ghc, mtl
, buildType ? if (builtins.parseDrvName ghc.ghc.name).name == "ghcjs" then "jsffi" else "webkit"
, ghcjsBase ? null # jsffi dependencies
, glib ? null, transformers ? null, gtk ? null, webkit ? null # webkit dependencies
}:
cabal.mkDerivation (self: { cabal.mkDerivation (self: {
pname = "ghcjs-dom"; pname = "ghcjs-dom";
version = "0.1.0.0"; version = "0.1.0.0";
src = fetchgit { src = fetchgit {
url = git://github.com/ghcjs/ghcjs-dom.git; url = https://github.com/ghcjs/ghcjs-dom;
rev = "81805e75ccd41501774b90c04efd9e00d52e9798"; rev = "81805e75ccd41501774b90c04efd9e00d52e9798";
sha256 = "3aa56fb81974533661aa056ed080edab29bef8ab26dae61999de4452f95949f6"; sha256 = "3aa56fb81974533661aa056ed080edab29bef8ab26dae61999de4452f95949f6";
}; };
buildDepends = [ mtl ] ++ (if buildType == "jsffi" then [ ghcjsBase ] else if buildType == "webkit" then [ glib transformers gtk webkit ] else throw "unrecognized buildType");
buildDepends = [ ghcjsBase mtl ]; configureFlags = if buildType == "jsffi" then [ ] else if buildType == "webkit" then [ "-f-ghcjs" "-fwebkit" "-f-gtk3" ] else throw "unrecognized buildType";
meta = { meta = {
description = "DOM library that supports both GHCJS and WebKitGTK"; description = "DOM library that supports both GHCJS and WebKitGTK";
license = self.stdenv.lib.licenses.mit; license = self.stdenv.lib.licenses.mit;