From 6ab5992b6f7fd627d73bb1b9064a259346c7ca39 Mon Sep 17 00:00:00 2001 From: Gliczy <129636582+Gliczy@users.noreply.github.com> Date: Tue, 23 Jan 2024 15:00:03 +0100 Subject: [PATCH 1/3] slade: 3.2.4 -> 3.2.5 Remove the old `postPatch` for non-x86 systems as upstream implemented a check. Add fix for PK3 destination. --- pkgs/games/doom-ports/slade/default.nix | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/pkgs/games/doom-ports/slade/default.nix b/pkgs/games/doom-ports/slade/default.nix index 9e9fc837e820..f55a778cbe3b 100644 --- a/pkgs/games/doom-ports/slade/default.nix +++ b/pkgs/games/doom-ports/slade/default.nix @@ -19,17 +19,18 @@ stdenv.mkDerivation rec { pname = "slade"; - version = "3.2.4"; + version = "3.2.5"; src = fetchFromGitHub { owner = "sirjuddington"; repo = "SLADE"; rev = version; - sha256 = "sha256-CN01w+sXXRqvQqu1whePAb+phVx+VM8tL2NusfnCyF8="; + sha256 = "sha256-FBpf1YApwVpWSpUfa2LOrkS1Ef34sKCIZ6ic+Pczs14="; }; - postPatch = lib.optionalString (!stdenv.hostPlatform.isx86) '' - sed -i '/-msse/d' src/CMakeLists.txt + postPatch = '' + substituteInPlace dist/CMakeLists.txt \ + --replace "PK3_OUTPUT" "PK3_DESTINATION" ''; nativeBuildInputs = [ @@ -54,6 +55,7 @@ stdenv.mkDerivation rec { cmakeFlags = [ "-DwxWidgets_LIBRARIES=${wxGTK}/lib" + "-DBUILD_PK3=ON" ]; env.NIX_CFLAGS_COMPILE = "-Wno-narrowing"; From ec1754f86b482f94671992852731b8eee34e5b6c Mon Sep 17 00:00:00 2001 From: Gliczy <129636582+Gliczy@users.noreply.github.com> Date: Tue, 23 Jan 2024 15:06:38 +0100 Subject: [PATCH 2/3] slade: fix GLib-GIO-ERROR Prevent crash when opening a file or directory. --- pkgs/games/doom-ports/slade/default.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkgs/games/doom-ports/slade/default.nix b/pkgs/games/doom-ports/slade/default.nix index f55a778cbe3b..42a8c2485174 100644 --- a/pkgs/games/doom-ports/slade/default.nix +++ b/pkgs/games/doom-ports/slade/default.nix @@ -15,6 +15,7 @@ , glew , lua , mpg123 +, wrapGAppsHook }: stdenv.mkDerivation rec { @@ -38,6 +39,7 @@ stdenv.mkDerivation rec { pkg-config which zip + wrapGAppsHook ]; buildInputs = [ From 17783e08cd76e68051dbf4f838f93df4ebb590ff Mon Sep 17 00:00:00 2001 From: Gliczy <129636582+Gliczy@users.noreply.github.com> Date: Tue, 23 Jan 2024 15:18:26 +0100 Subject: [PATCH 3/3] slade: set GDK_BACKEND to x11 Slade has major issues when running in native Wayland: - The 3D view in the map editor is "spinning", making it unusable. - The UI will freeze when trying to preview or edit an asset. - Some crashes --- pkgs/games/doom-ports/slade/default.nix | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pkgs/games/doom-ports/slade/default.nix b/pkgs/games/doom-ports/slade/default.nix index 42a8c2485174..9ab3d1f458d5 100644 --- a/pkgs/games/doom-ports/slade/default.nix +++ b/pkgs/games/doom-ports/slade/default.nix @@ -62,6 +62,12 @@ stdenv.mkDerivation rec { env.NIX_CFLAGS_COMPILE = "-Wno-narrowing"; + preFixup = '' + gappsWrapperArgs+=( + --prefix GDK_BACKEND : x11 + ) + ''; + meta = with lib; { description = "Doom editor"; homepage = "http://slade.mancubus.net/";