summary refs log tree commit diff
path: root/pkgs/development/libraries/webkitgtk
diff options
context:
space:
mode:
author宋文武 <iyzsong@gmail.com>2014-03-27 16:11:56 +0800
committer宋文武 <iyzsong@gmail.com>2014-03-27 17:16:15 +0800
commit2cf7678fc0ef50afc2abf2657f29ef21bfb4f6a1 (patch)
treef8ebe80beda9ea58efdbc19ea40d4e457e56c1de /pkgs/development/libraries/webkitgtk
parent699b18e95a1b3eac4756533a4786daf10d38f426 (diff)
downloadnixpkgs-2cf7678fc0ef50afc2abf2657f29ef21bfb4f6a1.tar
nixpkgs-2cf7678fc0ef50afc2abf2657f29ef21bfb4f6a1.tar.gz
nixpkgs-2cf7678fc0ef50afc2abf2657f29ef21bfb4f6a1.tar.bz2
nixpkgs-2cf7678fc0ef50afc2abf2657f29ef21bfb4f6a1.tar.lz
nixpkgs-2cf7678fc0ef50afc2abf2657f29ef21bfb4f6a1.tar.xz
nixpkgs-2cf7678fc0ef50afc2abf2657f29ef21bfb4f6a1.tar.zst
nixpkgs-2cf7678fc0ef50afc2abf2657f29ef21bfb4f6a1.zip
webkitgtk: add gtk2 version
Diffstat (limited to 'pkgs/development/libraries/webkitgtk')
-rw-r--r--pkgs/development/libraries/webkitgtk/default.nix14
1 files changed, 11 insertions, 3 deletions
diff --git a/pkgs/development/libraries/webkitgtk/default.nix b/pkgs/development/libraries/webkitgtk/default.nix
index cad5185b0d7..b742be27f74 100644
--- a/pkgs/development/libraries/webkitgtk/default.nix
+++ b/pkgs/development/libraries/webkitgtk/default.nix
@@ -3,6 +3,8 @@
 , gtk2, gtk3, wayland, libwebp, enchant
 , libxml2, libsoup, libsecret, libxslt, harfbuzz
 , gst-plugins-base
+, withGtk2 ? false
+, enableIntrospection ? true
 }:
 
 stdenv.mkDerivation rec {
@@ -31,9 +33,12 @@ stdenv.mkDerivation rec {
     done
   '';
 
-  configureFlags = [
+  configureFlags = with stdenv.lib; [
     "--disable-geolocation"
-    "--enable-introspection"
+    (optionalString enableIntrospection "--enable-introspection")
+  ] ++ stdenv.lib.optional withGtk2 [
+    "--with-gtk=2.0"
+    "--disable-webkit2"
   ];
 
   dontAddDisableDepTrack = true;
@@ -49,7 +54,10 @@ stdenv.mkDerivation rec {
     gst-plugins-base
   ];
 
-  propagatedBuildInputs = [ gtk3 libsoup ];
+  propagatedBuildInputs = [
+    libsoup
+    (if withGtk2 then gtk2 else gtk3)
+  ];
 
   #enableParallelBuilding = true; # build problems on Hydra
 }