3
0
Fork 0
forked from mirrors/nixpkgs

wxGTK31: drop gtk2 support

This commit is contained in:
Weijia Wang 2022-10-27 15:30:15 +02:00
parent 948fd41c77
commit 30d66019b4
12 changed files with 38 additions and 47 deletions

View file

@ -2,7 +2,8 @@
, lib , lib
, fetchFromSourcehut , fetchFromSourcehut
, cmake , cmake
, wxGTK , wxGTK31
, gtk3
, pkg-config , pkg-config
, python3 , python3
, gettext , gettext
@ -123,8 +124,8 @@ stdenv.mkDerivation rec {
sratom sratom
suil suil
twolame twolame
wxGTK wxGTK31
wxGTK.gtk gtk3
] ++ lib.optionals stdenv.isLinux [ ] ++ lib.optionals stdenv.isLinux [
at-spi2-core at-spi2-core
dbus dbus

View file

@ -1,4 +1,4 @@
{ lib, stdenv, fetchurl, fetchpatch, pkg-config, file, zip, wxGTK31-gtk3, gtk3 { lib, stdenv, fetchurl, fetchpatch, pkg-config, file, zip, wxGTK31, gtk3
, contribPlugins ? false, hunspell, gamin, boost, wrapGAppsHook , contribPlugins ? false, hunspell, gamin, boost, wrapGAppsHook
}: }:
@ -15,7 +15,7 @@ stdenv.mkDerivation rec {
}; };
nativeBuildInputs = [ pkg-config file zip wrapGAppsHook ]; nativeBuildInputs = [ pkg-config file zip wrapGAppsHook ];
buildInputs = [ wxGTK31-gtk3 gtk3 ] buildInputs = [ wxGTK31 gtk3 ]
++ optionals contribPlugins [ hunspell gamin boost ]; ++ optionals contribPlugins [ hunspell gamin boost ];
enableParallelBuilding = true; enableParallelBuilding = true;
patches = [ patches = [

View file

@ -7,7 +7,7 @@
, pkg-config , pkg-config
# not native # not native
, gdal , gdal
, wxGTK31-gtk3 , wxGTK31
, proj , proj
, dxflib , dxflib
, curl , curl
@ -56,7 +56,7 @@ mkDerivation rec {
libsvm libsvm
hdf5 hdf5
gdal gdal
wxGTK31-gtk3 wxGTK31
proj proj
libharu libharu
opencv opencv

View file

@ -28,13 +28,13 @@
, qhull , qhull
, systemd , systemd
, tbb , tbb
, wxGTK31-gtk3 , wxGTK31
, xorg , xorg
, fetchpatch , fetchpatch
, wxGTK31-gtk3-override ? null , wxGTK31-override ? null
}: }:
let let
wxGTK31-gtk3-prusa = wxGTK31-gtk3.overrideAttrs (old: rec { wxGTK31-prusa = wxGTK31.overrideAttrs (old: rec {
pname = "wxwidgets-prusa3d-patched"; pname = "wxwidgets-prusa3d-patched";
version = "3.1.4"; version = "3.1.4";
src = fetchFromGitHub { src = fetchFromGitHub {
@ -45,7 +45,7 @@ let
fetchSubmodules = true; fetchSubmodules = true;
}; };
}); });
wxGTK31-gtk3-override' = if wxGTK31-gtk3-override == null then wxGTK31-gtk3-prusa else wxGTK31-gtk3-override; wxGTK31-override' = if wxGTK31-override == null then wxGTK31-prusa else wxGTK31-override;
in in
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
pname = "prusa-slicer"; pname = "prusa-slicer";
@ -80,7 +80,7 @@ stdenv.mkDerivation rec {
pcre pcre
systemd systemd
tbb tbb
wxGTK31-gtk3-override' wxGTK31-override'
xorg.libX11 xorg.libX11
] ++ checkInputs; ] ++ checkInputs;

View file

@ -1,4 +1,4 @@
{ lib, fetchFromGitHub, fetchpatch, makeDesktopItem, prusa-slicer, wxGTK31-gtk3 }: { lib, fetchFromGitHub, fetchpatch, makeDesktopItem, prusa-slicer, wxGTK31 }:
let let
appname = "SuperSlicer"; appname = "SuperSlicer";
pname = "super-slicer"; pname = "super-slicer";
@ -71,7 +71,7 @@ let
passthru = allVersions; passthru = allVersions;
}; };
prusa-slicer' = prusa-slicer.override { wxGTK31-gtk3-override = wxGTK31-gtk3; }; prusa-slicer' = prusa-slicer.override { wxGTK31-override = wxGTK31; };
allVersions = builtins.mapAttrs (_name: version: (prusa-slicer'.overrideAttrs (override version))) versions; allVersions = builtins.mapAttrs (_name: version: (prusa-slicer'.overrideAttrs (override version))) versions;
in in
allVersions.stable allVersions.stable

View file

@ -5,6 +5,7 @@
, libGL , libGL
, zlib , zlib
, wxGTK , wxGTK
, gtk3
, libX11 , libX11
, gettext , gettext
, glew , glew
@ -143,7 +144,7 @@ stdenv.mkDerivation rec {
zlib zlib
libX11 libX11
wxGTK wxGTK
wxGTK.gtk gtk3
pcre pcre
libXdmcp libXdmcp
gettext gettext

View file

@ -2,7 +2,8 @@
, fetchFromGitLab , fetchFromGitLab
, gnome , gnome
, dconf , dconf
, wxGTK31-gtk3 , wxGTK31
, gtk3
, makeWrapper , makeWrapper
, gsettings-desktop-schemas , gsettings-desktop-schemas
, hicolor-icon-theme , hicolor-icon-theme
@ -103,7 +104,7 @@ let
if srcOverridep "libVersion" then srcs.libVersion if srcOverridep "libVersion" then srcs.libVersion
else versionsImport.${baseName}.libVersion.version; else versionsImport.${baseName}.libVersion.version;
wxGTK = wxGTK31-gtk3; wxGTK = wxGTK31;
python = python3; python = python3;
wxPython = python.pkgs.wxPython_4_1; wxPython = python.pkgs.wxPython_4_1;
@ -143,7 +144,7 @@ stdenv.mkDerivation rec {
"--prefix XDG_DATA_DIRS : ${base}/share" "--prefix XDG_DATA_DIRS : ${base}/share"
"--prefix XDG_DATA_DIRS : ${hicolor-icon-theme}/share" "--prefix XDG_DATA_DIRS : ${hicolor-icon-theme}/share"
"--prefix XDG_DATA_DIRS : ${gnome.adwaita-icon-theme}/share" "--prefix XDG_DATA_DIRS : ${gnome.adwaita-icon-theme}/share"
"--prefix XDG_DATA_DIRS : ${wxGTK.gtk}/share/gsettings-schemas/${wxGTK.gtk.name}" "--prefix XDG_DATA_DIRS : ${gtk3}/share/gsettings-schemas/${gtk3.name}"
"--prefix XDG_DATA_DIRS : ${gsettings-desktop-schemas}/share/gsettings-schemas/${gsettings-desktop-schemas.name}" "--prefix XDG_DATA_DIRS : ${gsettings-desktop-schemas}/share/gsettings-schemas/${gsettings-desktop-schemas.name}"
# wrapGAppsHook did these two as well, no idea if it matters... # wrapGAppsHook did these two as well, no idea if it matters...
"--prefix XDG_DATA_DIRS : ${cups}/share" "--prefix XDG_DATA_DIRS : ${cups}/share"

View file

@ -4,7 +4,6 @@
, fetchurl , fetchurl
, gnome2 , gnome2
, gst_all_1 , gst_all_1
, gtk2
, gtk3 , gtk3
, libGL , libGL
, libGLU , libGLU
@ -18,7 +17,6 @@
, compat30 ? true , compat30 ? true
, unicode ? true , unicode ? true
, withEGL ? true , withEGL ? true
, withGtk2 ? (!stdenv.isDarwin)
, withMesa ? lib.elem stdenv.hostPlatform.system lib.platforms.mesaPlatforms , withMesa ? lib.elem stdenv.hostPlatform.system lib.platforms.mesaPlatforms
, withWebKit ? stdenv.isDarwin , withWebKit ? stdenv.isDarwin
, webkitgtk , webkitgtk
@ -33,11 +31,6 @@
, WebKit , WebKit
}: }:
assert withGtk2 -> (!withWebKit);
let
gtk = if withGtk2 then gtk2 else gtk3;
in
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
pname = "wxwidgets"; pname = "wxwidgets";
version = "3.1.5"; version = "3.1.5";
@ -60,18 +53,14 @@ stdenv.mkDerivation rec {
buildInputs = [ buildInputs = [
gst_all_1.gst-plugins-base gst_all_1.gst-plugins-base
gst_all_1.gstreamer gst_all_1.gstreamer
] ] ++ lib.optionals (!stdenv.isDarwin) [
++ lib.optionals (!stdenv.isDarwin) [ gtk3
gtk
libSM libSM
libXinerama libXinerama
libXtst libXtst
libXxf86vm libXxf86vm
xorgproto xorgproto
] ]
++ lib.optionals withGtk2 [
gnome2.GConf
]
++ lib.optional withMesa libGLU ++ lib.optional withMesa libGLU
++ lib.optional (withWebKit && !stdenv.isDarwin) webkitgtk ++ lib.optional (withWebKit && !stdenv.isDarwin) webkitgtk
++ lib.optional (withWebKit && stdenv.isDarwin) WebKit ++ lib.optional (withWebKit && stdenv.isDarwin) WebKit
@ -102,8 +91,7 @@ stdenv.mkDerivation rec {
++ lib.optionals stdenv.isDarwin [ ++ lib.optionals stdenv.isDarwin [
"--with-osx_cocoa" "--with-osx_cocoa"
"--with-libiconv" "--with-libiconv"
] ] ++ lib.optionals withWebKit [
++ lib.optionals withWebKit [
"--enable-webview" "--enable-webview"
"--enable-webviewwebkit" "--enable-webviewwebkit"
]; ];
@ -133,6 +121,10 @@ stdenv.mkDerivation rec {
enableParallelBuilding = true; enableParallelBuilding = true;
passthru = {
inherit compat28 compat30 unicode;
};
meta = with lib; { meta = with lib; {
homepage = "https://www.wxwidgets.org/"; homepage = "https://www.wxwidgets.org/";
description = "A Cross-Platform C++ GUI Library"; description = "A Cross-Platform C++ GUI Library";
@ -150,9 +142,4 @@ stdenv.mkDerivation rec {
maintainers = with maintainers; [ tfmoraes ]; maintainers = with maintainers; [ tfmoraes ];
platforms = platforms.unix; platforms = platforms.unix;
}; };
passthru = {
inherit gtk;
inherit compat28 compat30 unicode;
};
} }

View file

@ -13,6 +13,7 @@
, ncurses , ncurses
, pango , pango
, wxGTK , wxGTK
, gtk3
, AGL , AGL
, AudioToolbox , AudioToolbox
, AVFoundation , AVFoundation
@ -70,7 +71,7 @@ buildPythonPackage rec {
nativeBuildInputs = [ nativeBuildInputs = [
which which
doxygen doxygen
wxGTK.gtk gtk3
pkg-config pkg-config
setuptools setuptools
] ++ lib.optionals stdenv.isLinux [ ] ++ lib.optionals stdenv.isLinux [
@ -78,7 +79,7 @@ buildPythonPackage rec {
]; ];
buildInputs = [ buildInputs = [
wxGTK.gtk gtk3
ncurses ncurses
] ++ lib.optionals stdenv.isLinux [ ] ++ lib.optionals stdenv.isLinux [
libXinerama libXinerama
@ -120,7 +121,7 @@ buildPythonPackage rec {
preConfigure = lib.optionalString (!stdenv.isDarwin) '' preConfigure = lib.optionalString (!stdenv.isDarwin) ''
substituteInPlace wx/lib/wxcairo/wx_pycairo.py \ substituteInPlace wx/lib/wxcairo/wx_pycairo.py \
--replace '_dlls = dict()' '_dlls = {k: ctypes.CDLL(v) for k, v in [ --replace '_dlls = dict()' '_dlls = {k: ctypes.CDLL(v) for k, v in [
("gdk", "${wxGTK.gtk}/lib/libgtk-x11-3.0.so"), ("gdk", "${gtk3}/lib/libgtk-x11-3.0.so"),
("pangocairo", "${pango.out}/lib/libpangocairo-1.0.so"), ("pangocairo", "${pango.out}/lib/libpangocairo-1.0.so"),
("cairoLib = None", "cairoLib = ctypes.CDLL('${cairo}/lib/libcairo.so')"), ("cairoLib = None", "cairoLib = ctypes.CDLL('${cairo}/lib/libcairo.so')"),
("appsvc", None) ("appsvc", None)

View file

@ -1550,6 +1550,8 @@ mapAliases ({
wormhole-rs = magic-wormhole-rs; # Added 2022-05-30. preserve, reason: Arch package name, main binary name wormhole-rs = magic-wormhole-rs; # Added 2022-05-30. preserve, reason: Arch package name, main binary name
wmii_hg = wmii; wmii_hg = wmii;
ws = throw "ws has been dropped due to the lack of maintenance from upstream since 2018"; # Added 2022-06-03 ws = throw "ws has been dropped due to the lack of maintenance from upstream since 2018"; # Added 2022-06-03
wxGTK31-gtk2 = throw "'wxGTK31-gtk2' has been removed from nixpkgs as it depends on deprecated GTK2"; # Added 2022-10-27
wxGTK31-gtk3 = throw "'wxGTK31-gtk3' has been renamed to/replaced by 'wxGTK31'"; # Added 2022-10-27
wxmupen64plus = throw "wxmupen64plus was removed because the upstream disappeared"; # Added 2022-01-31 wxmupen64plus = throw "wxmupen64plus was removed because the upstream disappeared"; # Added 2022-01-31
wxcam = throw "'wxcam' has seen no updates in ten years, crashes (SIGABRT) on startup and depends on deprecated wxGTK28/GNOME2/GTK2, use 'gnome.cheese'"; # Added 2022-06-15 wxcam = throw "'wxcam' has seen no updates in ten years, crashes (SIGABRT) on startup and depends on deprecated wxGTK28/GNOME2/GTK2, use 'gnome.cheese'"; # Added 2022-06-15

View file

@ -22769,8 +22769,6 @@ with pkgs;
inherit (darwin.stubs) setfile; inherit (darwin.stubs) setfile;
inherit (darwin.apple_sdk.frameworks) AGL Carbon Cocoa Kernel QTKit AVFoundation AVKit WebKit; inherit (darwin.apple_sdk.frameworks) AGL Carbon Cocoa Kernel QTKit AVFoundation AVKit WebKit;
}; };
wxGTK31-gtk2 = wxGTK31.override { withGtk2 = true; };
wxGTK31-gtk3 = wxGTK31.override { withGtk2 = false; };
wxGTK32 = callPackage ../development/libraries/wxwidgets/wxGTK32.nix { wxGTK32 = callPackage ../development/libraries/wxwidgets/wxGTK32.nix {
inherit (darwin.stubs) setfile; inherit (darwin.stubs) setfile;
@ -31766,14 +31764,14 @@ with pkgs;
prusa-slicer = callPackage ../applications/misc/prusa-slicer { }; prusa-slicer = callPackage ../applications/misc/prusa-slicer { };
super-slicer = callPackage ../applications/misc/prusa-slicer/super-slicer.nix { super-slicer = callPackage ../applications/misc/prusa-slicer/super-slicer.nix {
wxGTK31-gtk3 = wxGTK31-gtk3.override { wxGTK31 = wxGTK31.override {
# https://github.com/supermerill/SuperSlicer/issues/1093 # https://github.com/supermerill/SuperSlicer/issues/1093
withEGL = false; withEGL = false;
}; };
}; };
super-slicer-latest = (callPackage ../applications/misc/prusa-slicer/super-slicer.nix { super-slicer-latest = (callPackage ../applications/misc/prusa-slicer/super-slicer.nix {
wxGTK31-gtk3 = wxGTK31-gtk3.override { wxGTK31 = wxGTK31.override {
# https://github.com/supermerill/SuperSlicer/issues/1093 # https://github.com/supermerill/SuperSlicer/issues/1093
withEGL = false; withEGL = false;
}; };
@ -32057,7 +32055,7 @@ with pkgs;
temporal-cli = callPackage ../applications/networking/cluster/temporal-cli { }; temporal-cli = callPackage ../applications/networking/cluster/temporal-cli { };
tenacity = callPackage ../applications/audio/tenacity { wxGTK = wxGTK31-gtk3; }; tenacity = callPackage ../applications/audio/tenacity { };
tendermint = callPackage ../tools/networking/tendermint { }; tendermint = callPackage ../tools/networking/tendermint { };

View file

@ -11907,7 +11907,7 @@ self: super: with self; {
wxPython_4_1 = callPackage ../development/python-modules/wxPython/4.1.nix { wxPython_4_1 = callPackage ../development/python-modules/wxPython/4.1.nix {
inherit (pkgs.darwin.apple_sdk.frameworks) AGL AudioToolbox AVFoundation AVKit Carbon Cocoa CoreMedia CoreFoundation IOKit Kernel OpenGL Security WebKit; inherit (pkgs.darwin.apple_sdk.frameworks) AGL AudioToolbox AVFoundation AVKit Carbon Cocoa CoreMedia CoreFoundation IOKit Kernel OpenGL Security WebKit;
wxGTK = pkgs.wxGTK31-gtk3.override { wxGTK = pkgs.wxGTK31.override {
withWebKit = true; withWebKit = true;
}; };
}; };