about summary refs log tree commit diff
path: root/pkgs
diff options
context:
space:
mode:
authorKonrad Borowski <konrad@borowski.pw>2023-03-25 11:35:49 +0100
committerKonrad Borowski <konrad@borowski.pw>2023-03-25 11:35:49 +0100
commit989c5aa9eaabc7c06ccb1461116facd5ad013618 (patch)
treee1ba38fc55e69fc1aa2266fd1da0d1a47680ca98 /pkgs
parentb944d5859e55fb8dd17a48db07c1fb53d69ea872 (diff)
snes9x: 1.61 -> 1.62
Diffstat (limited to 'pkgs')
-rw-r--r--pkgs/applications/emulators/snes9x/default.nix35
1 files changed, 21 insertions, 14 deletions
diff --git a/pkgs/applications/emulators/snes9x/default.nix b/pkgs/applications/emulators/snes9x/default.nix
index 779e4dab3b3d0..b8ba518350a71 100644
--- a/pkgs/applications/emulators/snes9x/default.nix
+++ b/pkgs/applications/emulators/snes9x/default.nix
@@ -1,23 +1,28 @@
 { lib
 , stdenv
 , alsa-lib
-, autoreconfHook
+, cmake
 , fetchFromGitHub
 , fetchpatch
 , gtkmm3
 , libepoxy
 , libpng
+, libselinux
 , libX11
-, libXv
+, libXdmcp
 , libXext
 , libXinerama
-, meson
+, libXrandr
+, libXv
 , minizip
 , ninja
+, pcre2
 , pkg-config
 , portaudio
 , pulseaudio
+, python3
 , SDL2
+, util-linuxMinimal
 , wrapGAppsHook
 , zlib
 , withGtk ? false
@@ -29,40 +34,37 @@ stdenv.mkDerivation rec {
       "snes9x-gtk"
     else
       "snes9x";
-  version = "1.61";
+  version = "1.62";
 
   src = fetchFromGitHub {
     owner = "snes9xgit";
     repo = "snes9x";
     rev = version;
     fetchSubmodules = true;
-    sha256 = "1kay7aj30x0vn8rkylspdycydrzsc0aidjbs0dd238hr5hid723b";
+    hash = "sha256-RcxFNmUbJp0rUugWOqQa3Sy/Hh18ZPOeDTxC0JY5GJQ=";
   };
 
   patches = [
     # Fix cross-compilation, otherwise it fails to detect host compiler features
     # Doesn't affect non CC builds
     (fetchpatch {
-      url = "https://mirror.its.dal.ca/gentoo-portage/games-emulation/snes9x/files/snes9x-1.53-cross-compile.patch";
-      sha256 = "sha256-ZCmnprimz8PtDIXkB1dYD0oura9icW81yKvJ4coKaDg=";
+      url = "https://github.com/snes9xgit/snes9x/commit/f39ab408f4151c16d44e45470cc0736ffb2803f8.patch";
+      hash = "sha256-GMlHBsADEF+rycmEVgpWy220hZwld5D2e8fsYA7HblM=";
     })
   ];
 
   nativeBuildInputs = [
     pkg-config
-  ]
-  ++ lib.optionals (!withGtk) [
-    autoreconfHook
+    python3
   ]
   ++ lib.optionals withGtk [
-    meson
+    cmake
     ninja
     wrapGAppsHook
   ];
 
   buildInputs = [
     libX11
-    libXext
     libXv
     minizip
     zlib
@@ -74,13 +76,19 @@ stdenv.mkDerivation rec {
   ]
   ++ lib.optionals (!withGtk) [
     libpng
+    libXext
     libXinerama
   ]
   ++ lib.optionals withGtk [
     gtkmm3
     libepoxy
+    libselinux
+    libXdmcp
+    libXrandr
+    pcre2
     portaudio
     SDL2
+    util-linuxMinimal # provides libmount
   ];
 
   configureFlags =
@@ -98,8 +106,7 @@ stdenv.mkDerivation rec {
     runHook postInstall
   '';
 
-  preAutoreconf = lib.optionalString (!withGtk) "cd unix";
-  preConfigure = lib.optionalString withGtk "cd gtk";
+  preConfigure = if withGtk then "cd gtk" else "cd unix";
 
   enableParallelBuilding = true;