From c36d585e14b84f3f046a45b5a36949aa33393f1f Mon Sep 17 00:00:00 2001 From: Madoura Date: Mon, 9 May 2022 12:05:23 -0500 Subject: [PATCH] ares: 126 -> 127 --- .../emulators/bsnes/ares/default.nix | 67 ++++++++----------- .../bsnes/ares/dont-rebuild-on-install.patch | 22 ++++++ 2 files changed, 50 insertions(+), 39 deletions(-) create mode 100644 pkgs/applications/emulators/bsnes/ares/dont-rebuild-on-install.patch diff --git a/pkgs/applications/emulators/bsnes/ares/default.nix b/pkgs/applications/emulators/bsnes/ares/default.nix index 33a7858455d..c1597fe2c6e 100644 --- a/pkgs/applications/emulators/bsnes/ares/default.nix +++ b/pkgs/applications/emulators/bsnes/ares/default.nix @@ -2,83 +2,72 @@ , stdenv , fetchFromGitHub , pkg-config +, SDL2 , alsa-lib +, gtk3 , gtksourceview3 +, libGL +, libGLU +, libX11 , libXv -, openal -, libpulseaudio , libao +, libpulseaudio +, openal , udev -, SDL2 }: stdenv.mkDerivation rec { pname = "ares"; - version = "126"; + version = "127"; src = fetchFromGitHub { owner = "ares-emulator"; repo = "ares"; rev = "v${version}"; - sha256 = "1rj4vmz8lvpmfc6wni7222kagnw9f6jda9rcb6qky2kpizlp2d24"; - }; - - parallel-rdp = fetchFromGitHub { - owner = "Themaister"; - repo = "parallel-rdp-standalone"; - rev = "0dcebe11ee79288441e40e145c8f340d81f52316"; - sha256 = "1avp4wyfkhk5yfjqx5w3jbqghn2mq5la7k9248kjmnp9n9lip6w9"; + sha256 = "0rhq39w41j9yr1fkyfmf4n6fjxnq1cglj98rp4wys12kwqv7smvx"; }; patches = [ + ./dont-rebuild-on-install.patch ./fix-ruby.patch ]; - enableParallelBuilding = true; - dontConfigure = true; - nativeBuildInputs = [ pkg-config ]; buildInputs = [ + SDL2 alsa-lib + gtk3 gtksourceview3 + libGL + libGLU + libX11 libXv - openal - libpulseaudio libao + libpulseaudio + openal udev - SDL2 ]; - buildPhase = '' - runHook preBuild - - rm -rf ares/n64/vulkan/parallel-rdp - ln -sf ${parallel-rdp} ares/n64/vulkan/parallel-rdp - make -C desktop-ui -j $NIX_BUILD_CORES openmp=true vulkan=true local=false hiro=gtk3 - - runHook postBuild - ''; - - installPhase = '' - runHook preInstall - - mkdir -p $out/{bin,share/{applications,ares,pixmaps}} - cp desktop-ui/out/ares $out/bin - cp desktop-ui/resource/ares.desktop $out/share/applications - cp desktop-ui/resource/{ares{.ico,.png},font.png} $out/share/pixmaps - cp -r ares/{Shaders,System} $out/share/ares + enableParallelBuilding = true; - runHook postInstall - ''; + makeFlags = [ + "-C desktop-ui" + "local=false" + "openmp=true" + "hiro=gtk3" + "prefix=$(out)" + ]; meta = with lib; { homepage = "https://ares.dev"; description = "Open-source multi-system emulator with a focus on accuracy and preservation"; license = licenses.isc; maintainers = with maintainers; [ Madouura ]; - platforms = platforms.all; + platforms = platforms.linux; }; } +# TODO: select between Qt, GTK2 and GTK3 +# TODO: support Darwin diff --git a/pkgs/applications/emulators/bsnes/ares/dont-rebuild-on-install.patch b/pkgs/applications/emulators/bsnes/ares/dont-rebuild-on-install.patch new file mode 100644 index 00000000000..7b6bbfc21bd --- /dev/null +++ b/pkgs/applications/emulators/bsnes/ares/dont-rebuild-on-install.patch @@ -0,0 +1,22 @@ +From 65cc7647110edd768e7baa7991143014316e655a Mon Sep 17 00:00:00 2001 +From: Madoura <93990818+Madouura@users.noreply.github.com> +Date: Mon, 9 May 2022 10:17:06 -0500 +Subject: [PATCH] Update GNUmakefile + +--- + desktop-ui/GNUmakefile | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/desktop-ui/GNUmakefile b/desktop-ui/GNUmakefile +index 8e27b11d3..0bee561fb 100644 +--- a/desktop-ui/GNUmakefile ++++ b/desktop-ui/GNUmakefile +@@ -106,7 +106,7 @@ endif + $(call rdelete,$(object.path)) + $(call rdelete,$(output.path)) + +-install: all ++install: + ifeq ($(platform),windows) + $(call mkdir,$(prefix)/$(name)/) + else ifeq ($(shell id -un),root)