mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-22 23:13:19 +00:00
Merge pull request #146443 from Madouura/dev/ares
This commit is contained in:
commit
da9fd1b1bb
84
pkgs/misc/emulators/ares/default.nix
Normal file
84
pkgs/misc/emulators/ares/default.nix
Normal file
@ -0,0 +1,84 @@
|
||||
{ lib
|
||||
, stdenv
|
||||
, fetchFromGitHub
|
||||
, pkg-config
|
||||
, alsa-lib
|
||||
, gtksourceview3
|
||||
, libXv
|
||||
, openal
|
||||
, libpulseaudio
|
||||
, libao
|
||||
, udev
|
||||
, SDL2
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "ares";
|
||||
version = "126";
|
||||
|
||||
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";
|
||||
};
|
||||
|
||||
patches = [
|
||||
./fix-ruby.patch
|
||||
];
|
||||
|
||||
enableParallelBuilding = true;
|
||||
dontConfigure = true;
|
||||
|
||||
nativeBuildInputs = [
|
||||
pkg-config
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
alsa-lib
|
||||
gtksourceview3
|
||||
libXv
|
||||
openal
|
||||
libpulseaudio
|
||||
libao
|
||||
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
|
||||
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
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;
|
||||
};
|
||||
}
|
27
pkgs/misc/emulators/ares/fix-ruby.patch
Normal file
27
pkgs/misc/emulators/ares/fix-ruby.patch
Normal file
@ -0,0 +1,27 @@
|
||||
diff --git a/ruby/GNUmakefile b/ruby/GNUmakefile
|
||||
index e85a51701..7fca89e0f 100644
|
||||
--- a/ruby/GNUmakefile
|
||||
+++ b/ruby/GNUmakefile
|
||||
@@ -8,19 +8,9 @@ ifeq ($(ruby),)
|
||||
ruby += audio.openal
|
||||
ruby += input.quartz #input.carbon
|
||||
else ifeq ($(platform),linux)
|
||||
- pkg_check1 = $(if $(shell test -e /usr/lib/lib$1.so && echo 1),$2)
|
||||
- pkg_check2 = $(if $(shell test -e /usr/lib/$(shell uname -m)-linux-gnu/lib$1.so && echo 1),$2)
|
||||
- pkg_check = $(call pkg_check1,$1,$2) $(call pkg_check2,$1,$2)
|
||||
- ruby += video.glx video.glx2 video.xshm
|
||||
- ruby += $(call pkg_check,Xv,video.xvideo)
|
||||
- ruby += audio.oss audio.alsa
|
||||
- ruby += $(call pkg_check,openal,audio.openal)
|
||||
- ruby += $(call pkg_check,pulse,audio.pulseaudio)
|
||||
- ruby += $(call pkg_check,pulse-simple,audio.pulseaudiosimple)
|
||||
- ruby += $(call pkg_check,ao,audio.ao)
|
||||
- ruby += input.xlib
|
||||
- ruby += $(call pkg_check,udev,input.udev)
|
||||
- ruby += $(call pkg_check,SDL2,input.sdl)
|
||||
+ ruby += video.glx video.glx2 video.xshm video.xvideo
|
||||
+ ruby += audio.oss audio.alsa audio.openal audio.pulseaudio audio.pulseaudiosimple audio.ao
|
||||
+ ruby += input.xlib input.udev input.sdl
|
||||
else ifeq ($(platform),bsd)
|
||||
pkg_check = $(if $(shell test -e /usr/local/lib/lib$1.so && echo 1),$2)
|
||||
ruby += video.glx video.glx2 video.xshm
|
@ -32223,6 +32223,8 @@ with pkgs;
|
||||
|
||||
antimicrox = libsForQt5.callPackage ../tools/misc/antimicrox { };
|
||||
|
||||
ares = callPackage ../misc/emulators/ares { };
|
||||
|
||||
atari800 = callPackage ../misc/emulators/atari800 { };
|
||||
|
||||
ataripp = callPackage ../misc/emulators/atari++ { };
|
||||
|
Loading…
Reference in New Issue
Block a user