From af3e378c851e9bb0b742e29cb0291a1095b0c991 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Francis=20Gagn=C3=A9?= Date: Sat, 22 Jun 2024 21:58:37 -0400 Subject: [PATCH 1/4] slade: Remove the wxGTK patch This patch fails to apply on top of wxWidgets 3.2.5. SLADE 3.2.5 already contains a fix for the breaking change that was introduced in wxWidgets 3.2.4, so the patch is no longer necessary. --- pkgs/top-level/all-packages.nix | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 11df5e664fc9..e47759830715 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -16518,16 +16518,7 @@ with pkgs; enyo-launcher = libsForQt5.callPackage ../games/doom-ports/enyo-launcher { }; slade = callPackage ../games/doom-ports/slade { - wxGTK = (wxGTK32.overrideAttrs { - patches = [ - (fetchpatch { # required to run slade 3.2.4 on wxGTK 3.2.4, see PR #266945 - url = "https://github.com/wxWidgets/wxWidgets/commit/425d9455e8307c1267a79d47d77e3dafeb4d86de.patch"; - excludes = [ "docs/changes.txt" ]; - revert = true; - hash = "sha256-6LOYLDLtVCHxNdHAWv3zhlCsljIpi//RJb9XVLGD5hM="; - }) - ]; - }).override { + wxGTK = wxGTK32.override { withWebKit = true; }; }; From 8d96cec26104d9ec7421589706e641ca428f8c55 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Francis=20Gagn=C3=A9?= Date: Sun, 23 Jun 2024 00:19:09 -0400 Subject: [PATCH 2/4] wxGTK32: Enable wxWebRequest SLADE 3.2.6 uses wxWebRequest. Golly also uses it, and used to enable it through an override. This commit enables it by default to reduce the number of variants of wxGTK32 that need to be built. --- pkgs/development/libraries/wxwidgets/wxGTK32.nix | 6 ++++++ pkgs/top-level/all-packages.nix | 9 +-------- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/pkgs/development/libraries/wxwidgets/wxGTK32.nix b/pkgs/development/libraries/wxwidgets/wxGTK32.nix index 33351e28a7d8..84263f4c2f4e 100644 --- a/pkgs/development/libraries/wxwidgets/wxGTK32.nix +++ b/pkgs/development/libraries/wxwidgets/wxGTK32.nix @@ -1,5 +1,6 @@ { lib , stdenv +, curl , expat , fetchFromGitHub , gst_all_1 @@ -70,6 +71,7 @@ stdenv.mkDerivation rec { zlib pcre2 ] ++ lib.optionals stdenv.hostPlatform.isLinux [ + curl gtk3 libSM libXinerama @@ -102,6 +104,7 @@ stdenv.mkDerivation rec { "--with-nanosvg" "--disable-rpath" "--enable-repro-build" + "--enable-webrequest" (if compat28 then "--enable-compat28" else "--disable-compat28") (if compat30 then "--enable-compat30" else "--disable-compat30") ] ++ lib.optional unicode "--enable-unicode" @@ -109,6 +112,9 @@ stdenv.mkDerivation rec { ++ lib.optionals stdenv.hostPlatform.isDarwin [ "--with-osx_cocoa" "--with-libiconv" + "--with-urlsession" # for wxWebRequest + ] ++ lib.optionals (!stdenv.hostPlatform.isDarwin) [ + "--with-libcurl" # for wxWebRequest ] ++ lib.optionals withWebKit [ "--enable-webview" "--enable-webviewwebkit" diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index e47759830715..450c314d2115 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -17847,14 +17847,7 @@ with pkgs; gplates = libsForQt5.callPackage ../applications/science/misc/gplates { }; golly = callPackage ../applications/science/misc/golly { - wxGTK = wxGTK32.overrideAttrs (x: { - configureFlags = x.configureFlags ++ [ - "--enable-webrequest" - ]; - buildInputs = x.buildInputs ++ [ - curl - ]; - }); + wxGTK = wxGTK32; }; megam = callPackage ../applications/science/misc/megam { From ceceb20f1f8a099549dd69b35229a1dfbfd38152 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Francis=20Gagn=C3=A9?= Date: Sun, 23 Jun 2024 00:32:07 -0400 Subject: [PATCH 3/4] slade: 3.2.5 -> 3.2.6 --- pkgs/games/doom-ports/slade/default.nix | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/pkgs/games/doom-ports/slade/default.nix b/pkgs/games/doom-ports/slade/default.nix index bae685ccac47..a388922e168a 100644 --- a/pkgs/games/doom-ports/slade/default.nix +++ b/pkgs/games/doom-ports/slade/default.nix @@ -20,20 +20,15 @@ stdenv.mkDerivation rec { pname = "slade"; - version = "3.2.5"; + version = "3.2.6"; src = fetchFromGitHub { owner = "sirjuddington"; repo = "SLADE"; rev = version; - sha256 = "sha256-FBpf1YApwVpWSpUfa2LOrkS1Ef34sKCIZ6ic+Pczs14="; + hash = "sha256-pcWmv1fnH18X/S8ljfHxaL1PjApo5jyM8W+WYn+/7zI="; }; - postPatch = '' - substituteInPlace dist/CMakeLists.txt \ - --replace "PK3_OUTPUT" "PK3_DESTINATION" - ''; - nativeBuildInputs = [ cmake pkg-config @@ -57,7 +52,6 @@ stdenv.mkDerivation rec { cmakeFlags = [ "-DwxWidgets_LIBRARIES=${wxGTK}/lib" - "-DBUILD_PK3=ON" ]; env.NIX_CFLAGS_COMPILE = "-Wno-narrowing"; @@ -71,7 +65,7 @@ stdenv.mkDerivation rec { meta = with lib; { description = "Doom editor"; homepage = "http://slade.mancubus.net/"; - license = licenses.gpl2Plus; + license = licenses.gpl2Only; # https://github.com/sirjuddington/SLADE/issues/1754 platforms = platforms.linux; maintainers = with maintainers; [ abbradar ]; }; From c7dd09e34294f6a7479c116ff1b12b9ec6fbaaec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Francis=20Gagn=C3=A9?= Date: Sun, 23 Jun 2024 00:39:40 -0400 Subject: [PATCH 4/4] sladeUnstable: 3.2.4-unstable-2023-09-30 -> 3.2.6-unstable-2024-11-26 Additionally: - Remove obsolete postPatch. - Add wrapGAppsHook3 to nativeBuildInputs. This is taken from the slade package. This fixes the application crashing with "No GSettings schemas are installed on the system" when using File > Open or File > Open Directory. --- pkgs/games/doom-ports/slade/git.nix | 22 +++++++++++++--------- pkgs/top-level/all-packages.nix | 11 +---------- 2 files changed, 14 insertions(+), 19 deletions(-) diff --git a/pkgs/games/doom-ports/slade/git.nix b/pkgs/games/doom-ports/slade/git.nix index db85d405f8c5..c5abf8a04bb2 100644 --- a/pkgs/games/doom-ports/slade/git.nix +++ b/pkgs/games/doom-ports/slade/git.nix @@ -15,29 +15,27 @@ , glew , lua , mpg123 +, wrapGAppsHook3 , unstableGitUpdater }: -stdenv.mkDerivation rec { +stdenv.mkDerivation { pname = "slade"; - version = "3.2.4-unstable-2023-09-30"; + version = "3.2.6-unstable-2024-11-26"; src = fetchFromGitHub { owner = "sirjuddington"; repo = "SLADE"; - rev = "d05af4bd3a9a655dfe17d02760bab3542cc0b909"; - sha256 = "sha256-lzTSE0WH+4fOad9E/pL3LDc4L151W0hFEmD0zsS0gpQ="; + rev = "f8ca52edf98e649c6455f6cc32f7aa361e41babe"; + hash = "sha256-h43kYVLDxr1Z3vKJ+IZaDmvkerUdGJFLzJrPj0b2VUI="; }; - postPatch = lib.optionalString (!stdenv.hostPlatform.isx86) '' - sed -i '/-msse/d' src/CMakeLists.txt - ''; - nativeBuildInputs = [ cmake pkg-config which zip + wrapGAppsHook3 ]; buildInputs = [ @@ -59,6 +57,12 @@ stdenv.mkDerivation rec { env.NIX_CFLAGS_COMPILE = "-Wno-narrowing"; + preFixup = '' + gappsWrapperArgs+=( + --prefix GDK_BACKEND : x11 + ) + ''; + passthru.updateScript = unstableGitUpdater { url = "https://github.com/sirjuddington/SLADE.git"; }; @@ -66,7 +70,7 @@ stdenv.mkDerivation rec { meta = with lib; { description = "Doom editor"; homepage = "http://slade.mancubus.net/"; - license = licenses.gpl2Plus; + license = licenses.gpl2Only; # https://github.com/sirjuddington/SLADE/issues/1754 platforms = platforms.linux; maintainers = with maintainers; [ ertes ]; }; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 450c314d2115..1e9988a4fd57 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -16524,16 +16524,7 @@ with pkgs; }; sladeUnstable = callPackage ../games/doom-ports/slade/git.nix { - wxGTK = (wxGTK32.overrideAttrs { - patches = [ - (fetchpatch { # required to run sladeUnstable unstable-2023-09-30 on wxGTK 3.2.4, see PR #266945 - url = "https://github.com/wxWidgets/wxWidgets/commit/425d9455e8307c1267a79d47d77e3dafeb4d86de.patch"; - excludes = [ "docs/changes.txt" ]; - revert = true; - hash = "sha256-6LOYLDLtVCHxNdHAWv3zhlCsljIpi//RJb9XVLGD5hM="; - }) - ]; - }).override { + wxGTK = wxGTK32.override { withWebKit = true; }; };