about summary refs log tree commit diff
path: root/pkgs/applications/emulators/bsnes
diff options
context:
space:
mode:
authorAnderson Torres <torres.anderson.85@protonmail.com>2023-07-08 17:14:34 -0300
committerAnderson Torres <torres.anderson.85@protonmail.com>2023-07-11 21:06:22 -0300
commit8dc06ce8e9c092b3ceeec9865afac68ae54e54cb (patch)
treeb85a0f9823fd0c9536f6df87068d9012a2ea2b80 /pkgs/applications/emulators/bsnes
parenta6a17138c16d172b6e4e78393b54f3cf77c156fe (diff)
ares: 131 -> 132
Diffstat (limited to 'pkgs/applications/emulators/bsnes')
-rw-r--r--pkgs/applications/emulators/bsnes/ares/001-dont-rebuild-on-install.patch (renamed from pkgs/applications/emulators/bsnes/ares/000-dont-rebuild-on-install.patch)0
-rw-r--r--pkgs/applications/emulators/bsnes/ares/002-fix-ruby.diff (renamed from pkgs/applications/emulators/bsnes/ares/001-fix-ruby.patch)0
-rw-r--r--pkgs/applications/emulators/bsnes/ares/003-darwin-specific.patch (renamed from pkgs/applications/emulators/bsnes/ares/002-sips-to-png2icns.patch)53
-rw-r--r--pkgs/applications/emulators/bsnes/ares/003-fix-darwin-install.patch23
-rw-r--r--pkgs/applications/emulators/bsnes/ares/default.nix37
5 files changed, 47 insertions, 66 deletions
diff --git a/pkgs/applications/emulators/bsnes/ares/000-dont-rebuild-on-install.patch b/pkgs/applications/emulators/bsnes/ares/001-dont-rebuild-on-install.patch
index 7b6bbfc21bdc2..7b6bbfc21bdc2 100644
--- a/pkgs/applications/emulators/bsnes/ares/000-dont-rebuild-on-install.patch
+++ b/pkgs/applications/emulators/bsnes/ares/001-dont-rebuild-on-install.patch
diff --git a/pkgs/applications/emulators/bsnes/ares/001-fix-ruby.patch b/pkgs/applications/emulators/bsnes/ares/002-fix-ruby.diff
index 86f548389259c..86f548389259c 100644
--- a/pkgs/applications/emulators/bsnes/ares/001-fix-ruby.patch
+++ b/pkgs/applications/emulators/bsnes/ares/002-fix-ruby.diff
diff --git a/pkgs/applications/emulators/bsnes/ares/002-sips-to-png2icns.patch b/pkgs/applications/emulators/bsnes/ares/003-darwin-specific.patch
index 4c2259d63a335..a1cd47f9c34da 100644
--- a/pkgs/applications/emulators/bsnes/ares/002-sips-to-png2icns.patch
+++ b/pkgs/applications/emulators/bsnes/ares/003-darwin-specific.patch
@@ -1,39 +1,48 @@
-diff --git a/desktop-ui/GNUmakefile b/desktop-ui/GNUmakefile
-index 4515610d3..916c8fcd8 100644
---- a/desktop-ui/GNUmakefile
-+++ b/desktop-ui/GNUmakefile
-@@ -91,7 +91,7 @@ endif
+diff -Naur source-old/desktop-ui/GNUmakefile source-new/desktop-ui/GNUmakefile
+--- source-old/desktop-ui/GNUmakefile	1969-12-31 21:00:01.000000000 -0300
++++ source-new/desktop-ui/GNUmakefile	2023-07-08 12:20:08.206582916 -0300
+@@ -91,8 +91,7 @@
  	cp resource/$(name).plist $(output.path)/$(name).app/Contents/Info.plist
  	cp -R $(ares.path)/Shaders $(output.path)/$(name).app/Contents/Resources/
  	cp -R $(mia.path)/Database $(output.path)/$(name).app/Contents/Resources/	
 -	sips -s format icns resource/$(name).png --out $(output.path)/$(name).app/Contents/Resources/$(name).icns
+-	codesign --force --deep --options runtime --entitlements resource/$(name).selfsigned.entitlements --sign - $(output.path)/$(name).app
 +	png2icns $(output.path)/$(name).app/Contents/Resources/$(name).icns resource/$(name).png
- 	codesign --force --deep --options runtime --entitlements resource/$(name).selfsigned.entitlements --sign - $(output.path)/$(name).app
  else ifeq ($(platform),windows)
  	$(call mkdir,$(output.path)/Shaders/)
-diff --git a/genius/GNUmakefile b/genius/GNUmakefile
-index 5287309a8..8d80f9306 100644
---- a/genius/GNUmakefile
-+++ b/genius/GNUmakefile
-@@ -24,7 +24,7 @@ ifeq ($(platform),macos)
+ 	$(call mkdir,$(output.path)/Database/)
+@@ -115,8 +114,8 @@
+ else ifeq ($(shell id -un),root)
+ 	$(error "make install should not be run as root")
+ else ifeq ($(platform),macos)
+-	mkdir -p ~/Library/Application\ Support/$(name)/
+-	cp -R $(output.path)/$(name).app /Applications/$(name).app
++	mkdir -p $(prefix)/Applications/
++	cp -R $(output.path)/$(name).app $(prefix)/Applications/$(name).app
+ else ifneq ($(filter $(platform),linux bsd),)
+ 	mkdir -p $(prefix)/bin/
+ 	mkdir -p $(prefix)/share/applications/
+diff -Naur source-old/mia/GNUmakefile source-new/mia/GNUmakefile
+--- source-old/mia/GNUmakefile	1969-12-31 21:00:01.000000000 -0300
++++ source-new/mia/GNUmakefile	2023-07-08 12:16:55.991517276 -0300
+@@ -39,7 +39,7 @@
  	mkdir -p $(output.path)/$(name).app/Contents/Resources/
  	mv $(output.path)/$(name) $(output.path)/$(name).app/Contents/MacOS/$(name)
- 	cp data/$(name).plist $(output.path)/$(name).app/Contents/Info.plist
--	sips -s format icns data/$(name).png --$(output.path) $(output.path)/$(name).app/Contents/Resources/$(name).icns
-+	png2icns $(output.path)/$(name).app/Contents/Resources/$(name).icns data/$(name).png
+ 	cp resource/$(name).plist $(output.path)/$(name).app/Contents/Info.plist
+-	sips -s format icns resource/$(name).png --out $(output.path)/$(name).app/Contents/Resources/$(name).icns
++	png2icns $(output.path)/$(name).app/Contents/Resources/$(name).icns resource/$(name).png
  endif
  
  verbose: hiro.verbose nall.verbose all;
-diff --git a/mia/GNUmakefile b/mia/GNUmakefile
-index b6930b6df..7a51b5028 100644
---- a/mia/GNUmakefile
-+++ b/mia/GNUmakefile
-@@ -32,7 +32,7 @@ ifeq ($(platform),macos)
+diff -Naur source-old/tools/genius/GNUmakefile source-new/tools/genius/GNUmakefile
+--- source-old/tools/genius/GNUmakefile	1969-12-31 21:00:01.000000000 -0300
++++ source-new/tools/genius/GNUmakefile	2023-07-08 12:16:16.273503940 -0300
+@@ -26,7 +26,7 @@
  	mkdir -p $(output.path)/$(name).app/Contents/Resources/
  	mv $(output.path)/$(name) $(output.path)/$(name).app/Contents/MacOS/$(name)
- 	cp resource/$(name).plist $(output.path)/$(name).app/Contents/Info.plist
--	sips -s format icns resource/$(name).png --out $(output.path)/$(name).app/Contents/Resources/$(name).icns
-+	png2icns $(output.path)/$(name).app/Contents/Resources/$(name).icns resource/$(name).png
+ 	cp data/$(name).plist $(output.path)/$(name).app/Contents/Info.plist
+-	sips -s format icns data/$(name).png --$(output.path) $(output.path)/$(name).app/Contents/Resources/$(name).icns
++	png2icns $(output.path)/$(name).app/Contents/Resources/$(name).icns data/$(name).png
  endif
  
  verbose: hiro.verbose nall.verbose all;
diff --git a/pkgs/applications/emulators/bsnes/ares/003-fix-darwin-install.patch b/pkgs/applications/emulators/bsnes/ares/003-fix-darwin-install.patch
deleted file mode 100644
index 5b216ac267e20..0000000000000
--- a/pkgs/applications/emulators/bsnes/ares/003-fix-darwin-install.patch
+++ /dev/null
@@ -1,23 +0,0 @@
-diff --git a/desktop-ui/GNUmakefile b/desktop-ui/GNUmakefile
-index 916c8fcd8..b767c1335 100644
---- a/desktop-ui/GNUmakefile
-+++ b/desktop-ui/GNUmakefile
-@@ -92,7 +92,6 @@ endif
- 	cp -R $(ares.path)/Shaders $(output.path)/$(name).app/Contents/Resources/
- 	cp -R $(mia.path)/Database $(output.path)/$(name).app/Contents/Resources/	
- 	png2icns $(output.path)/$(name).app/Contents/Resources/$(name).icns resource/$(name).png
--	codesign --force --deep --options runtime --entitlements resource/$(name).selfsigned.entitlements --sign - $(output.path)/$(name).app
- else ifeq ($(platform),windows)
- 	$(call mkdir,$(output.path)/Shaders/)
- 	$(call mkdir,$(output.path)/Database/)
-@@ -115,8 +114,8 @@ ifeq ($(platform),windows)
- else ifeq ($(shell id -un),root)
- 	$(error "make install should not be run as root")
- else ifeq ($(platform),macos)
--	mkdir -p ~/Library/Application\ Support/$(name)/
--	cp -R $(output.path)/$(name).app /Applications/$(name).app
-+	mkdir -p $(prefix)/Applications/
-+	cp -R $(output.path)/$(name).app $(prefix)/Applications/$(name).app
- else ifneq ($(filter $(platform),linux bsd),)
- 	mkdir -p $(prefix)/bin/
- 	mkdir -p $(prefix)/share/applications/
diff --git a/pkgs/applications/emulators/bsnes/ares/default.nix b/pkgs/applications/emulators/bsnes/ares/default.nix
index 9914e6e691c3d..bd2311283c9eb 100644
--- a/pkgs/applications/emulators/bsnes/ares/default.nix
+++ b/pkgs/applications/emulators/bsnes/ares/default.nix
@@ -1,10 +1,6 @@
 { lib
 , stdenv
 , fetchFromGitHub
-, pkg-config
-, which
-, wrapGAppsHook
-, libicns
 , SDL2
 , alsa-lib
 , gtk3
@@ -14,31 +10,31 @@
 , libX11
 , libXv
 , libao
+, libicns
 , libpulseaudio
 , openal
+, pkg-config
 , udev
+, which
+, wrapGAppsHook
 , darwin
 }:
 
-let
-  inherit (darwin.apple_sdk_11_0.frameworks) Cocoa OpenAL;
-in
 stdenv.mkDerivation (finalAttrs: {
   pname = "ares";
-  version = "131";
+  version = "132";
 
   src = fetchFromGitHub {
     owner = "ares-emulator";
     repo = "ares";
     rev = "v${finalAttrs.version}";
-    hash = "sha256-gex53bh/175/i0cMimcPO26C6cxqQGPo4sp2bxh1sAw=";
+    hash = "sha256-0D7bOv934k1cuP6qNxo0uLp5tSEstI8wm0FEwu6TuUw=";
   };
 
   patches = [
-    ./000-dont-rebuild-on-install.patch
-    ./001-fix-ruby.patch
-    ./002-sips-to-png2icns.patch
-    ./003-fix-darwin-install.patch
+    ./001-dont-rebuild-on-install.patch
+    ./002-fix-ruby.diff
+    ./003-darwin-specific.patch
   ];
 
   nativeBuildInputs = [
@@ -64,8 +60,8 @@ stdenv.mkDerivation (finalAttrs: {
     openal
     udev
   ] ++ lib.optionals stdenv.isDarwin [
-    Cocoa
-    OpenAL
+    darwin.apple_sdk_11_0.frameworks.Cocoa
+    darwin.apple_sdk_11_0.frameworks.OpenAL
   ];
 
   enableParallelBuilding = true;
@@ -80,17 +76,16 @@ stdenv.mkDerivation (finalAttrs: {
     "local=false"
     "openmp=true"
     "prefix=$(out)"
-    "-C desktop-ui"
   ];
 
   env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.isDarwin "-mmacosx-version-min=10.14";
 
-  meta = with lib; {
+  meta = {
     homepage = "https://ares-emu.net";
     description = "Open-source multi-system emulator with a focus on accuracy and preservation";
-    license = licenses.isc;
-    maintainers = with maintainers; [ Madouura AndersonTorres ];
-    platforms = platforms.unix;
+    license = lib.licenses.isc;
+    maintainers = with lib.maintainers; [ Madouura AndersonTorres ];
+    platforms = lib.platforms.unix;
   };
 })
-# TODO: select between Qt, GTK2 and GTK3
+# TODO: select between Qt and GTK3