From 7439aad737c00915ecc09703ba65721d0513f563 Mon Sep 17 00:00:00 2001 From: Peter Hoeg Date: Mon, 15 Jun 2020 11:01:25 +0800 Subject: [PATCH] wxGTK3: make gtk2 and gtk3 specific variants --- .../libraries/wxwidgets/3.0/default.nix | 14 +++++++------ .../libraries/wxwidgets/3.1/default.nix | 12 ++++++----- pkgs/top-level/all-packages.nix | 21 +++++++++++++++++-- 3 files changed, 34 insertions(+), 13 deletions(-) diff --git a/pkgs/development/libraries/wxwidgets/3.0/default.nix b/pkgs/development/libraries/wxwidgets/3.0/default.nix index 8de7f99fe5fd..da29eacdc0e9 100644 --- a/pkgs/development/libraries/wxwidgets/3.0/default.nix +++ b/pkgs/development/libraries/wxwidgets/3.0/default.nix @@ -1,8 +1,9 @@ { stdenv, fetchFromGitHub, fetchurl, pkgconfig -, gtk2, gtk3, libXinerama, libSM, libXxf86vm -, xorgproto, gstreamer, gst-plugins-base, GConf, setfile +, libXinerama, libSM, libXxf86vm +, gtk2, GConf ? null, gtk3 +, xorgproto, gstreamer, gst-plugins-base, setfile , libGLSupported ? stdenv.lib.elem stdenv.hostPlatform.system stdenv.lib.platforms.mesaPlatforms -, withMesa ? stdenv.lib.elem stdenv.hostPlatform.system stdenv.lib.platforms.mesaPlatforms +, withMesa ? libGLSupported , libGLU ? null, libGL ? null , compat24 ? false, compat26 ? true, unicode ? true , withGtk2 ? true @@ -28,9 +29,10 @@ stdenv.mkDerivation rec { sha256 = "19mqglghjjqjgz4rbybn3qdgn2cz9xc511nq1pvvli9wx2k8syl1"; }; - buildInputs = - [ (if withGtk2 then gtk2 else gtk3) libXinerama libSM libXxf86vm xorgproto gstreamer - gst-plugins-base GConf ] + buildInputs = [ + libXinerama libSM libXxf86vm xorgproto gstreamer gst-plugins-base + ] ++ optionals withGtk2 [ gtk2 GConf ] + ++ optional (!withGtk2) gtk3 ++ optional withMesa libGLU ++ optional withWebKit webkitgtk ++ optionals stdenv.isDarwin [ setfile Carbon Cocoa Kernel QTKit ]; diff --git a/pkgs/development/libraries/wxwidgets/3.1/default.nix b/pkgs/development/libraries/wxwidgets/3.1/default.nix index 99f86974cdb4..790968a88f76 100644 --- a/pkgs/development/libraries/wxwidgets/3.1/default.nix +++ b/pkgs/development/libraries/wxwidgets/3.1/default.nix @@ -1,6 +1,7 @@ { stdenv, fetchFromGitHub, fetchurl, pkgconfig -, gtk2, gtk3, libXinerama, libSM, libXxf86vm -, xorgproto, gstreamer, gst-plugins-base, GConf, setfile +, libXinerama, libSM, libXxf86vm +, gtk2, GConf ? null, gtk3 +, xorgproto, gstreamer, gst-plugins-base, setfile , libGLSupported ? stdenv.lib.elem stdenv.hostPlatform.system stdenv.lib.platforms.mesaPlatforms , withMesa ? libGLSupported, libGLU ? null, libGL ? null , compat28 ? false, compat30 ? true, unicode ? true @@ -27,9 +28,10 @@ stdenv.mkDerivation rec { sha256 = "0gfdhb7xq5vzasm7s1di39nchv42zsp0dmn4v6knzb7mgsb107wb"; }; - buildInputs = - [ (if withGtk2 then gtk2 else gtk3) libXinerama libSM libXxf86vm xorgproto gstreamer - gst-plugins-base GConf ] + buildInputs = [ + libXinerama libSM libXxf86vm xorgproto gstreamer gst-plugins-base + ] ++ optionals withGtk2 [ gtk2 GConf ] + ++ optional (!withGtk2) gtk3 ++ optional withMesa libGLU ++ optional withWebKit webkitgtk ++ optionals stdenv.isDarwin [ setfile Carbon Cocoa Kernel QTKit ]; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 934575e01ecf..7e98b1f9c18d 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -15139,6 +15139,9 @@ in wxGTK = wxGTK28; + wxGTK30 = wxGTK30-gtk2; + wxGTK31 = wxGTK31-gtk2; + wxGTK28 = callPackage ../development/libraries/wxwidgets/2.8 { inherit (gnome2) GConf; }; @@ -15149,18 +15152,32 @@ in inherit (darwin.apple_sdk.frameworks) AGL Carbon Cocoa Kernel QuickTime; }; - wxGTK30 = callPackage ../development/libraries/wxwidgets/3.0 { + wxGTK30-gtk2 = callPackage ../development/libraries/wxwidgets/3.0 { + withGtk2 = true; inherit (gnome2) GConf; inherit (darwin.stubs) setfile; inherit (darwin.apple_sdk.frameworks) AGL Carbon Cocoa Kernel QTKit; }; - wxGTK31 = callPackage ../development/libraries/wxwidgets/3.1 { + wxGTK30-gtk3 = callPackage ../development/libraries/wxwidgets/3.0 { + withGtk2 = false; + inherit (darwin.stubs) setfile; + inherit (darwin.apple_sdk.frameworks) AGL Carbon Cocoa Kernel QTKit; + }; + + wxGTK31-gtk2 = callPackage ../development/libraries/wxwidgets/3.1 { + withGtk2 = true; inherit (gnome2) GConf; inherit (darwin.stubs) setfile; inherit (darwin.apple_sdk.frameworks) AGL Carbon Cocoa Kernel QTKit; }; + wxGTK31-gtk3 = callPackage ../development/libraries/wxwidgets/3.1 { + withGtk2 = false; + inherit (darwin.stubs) setfile; + inherit (darwin.apple_sdk.frameworks) AGL Carbon Cocoa Kernel QTKit; + }; + wxmac = callPackage ../development/libraries/wxwidgets/3.0/mac.nix { inherit (darwin.apple_sdk.frameworks) AGL Cocoa Kernel; inherit (darwin.stubs) setfile rez derez;