Filippos Tsimas 2024-12-04 16:12:30 +02:00
parent c702d50a63
commit a95c46c801
2 changed files with 27 additions and 41 deletions

View File

@ -1,18 +1,12 @@
--- a/resources/systems/unix/es_find_rules.xml 2023-11-22 15:18:15.912747163 -0500 --- a/resources/systems/linux/es_find_rules.xml 2024-09-13 16:19:36.000000000 +0300
+++ b/resources/systems/unix/es_find_rules.xml 2023-11-22 15:20:38.628250448 -0500 +++ b/resources/systems/linux/es_find_rules.xml 2024-11-26 23:08:49.204498848 +0200
@@ -45,6 +45,8 @@ @@ -41,6 +41,9 @@
<entry>/usr/local/lib/libretro</entry> <entry>/usr/lib64/libretro</entry>
<!-- NetBSD repository --> <!-- Manjaro repository -->
<entry>/usr/pkg/lib/libretro</entry> <entry>/usr/lib/libretro</entry>
+ <!-- NixOS / Nixpkgs --> + <!-- NixOS and Nixpkgs repository -->
+ <entry>/run/current-system/sw/lib/retroarch/cores</entry> + <entry>/run/current-system/sw/lib/retroarch/cores</entry>
+ <entry>~/.nix-profile/lib/retroarch/cores</entry>
</rule> </rule>
</core> </core>
<emulator name="3DSEN-WINDOWS"> <emulator name="3DSEN-WINDOWS">
@@ -1079,4 +1081,4 @@
<entry>~/bin/ZEsarUX/zesarux</entry>
</rule>
</emulator>
-</ruleList>
\ No newline at end of file
+</ruleList>

View File

@ -1,30 +1,40 @@
{ {
lib, lib,
stdenv, stdenv,
cmake,
fetchzip, fetchzip,
fetchpatch,
cmake,
pkg-config, pkg-config,
alsa-lib, alsa-lib,
curl, curl,
ffmpeg, ffmpeg,
freeimage, freeimage,
freetype, freetype,
harfbuzz,
icu,
libgit2, libgit2,
poppler, poppler,
pugixml, pugixml,
SDL2 SDL2,
}: }:
stdenv.mkDerivation (finalAttrs: { stdenv.mkDerivation (finalAttrs: {
pname = "emulationstation-de"; pname = "emulationstation-de";
version = "3.0.2"; version = "3.1.0";
src = fetchzip { src = fetchzip {
url = "https://gitlab.com/es-de/emulationstation-de/-/archive/v${finalAttrs.version}/emulationstation-de-v${finalAttrs.version}.tar.gz"; url = "https://gitlab.com/es-de/emulationstation-de/-/archive/v${finalAttrs.version}/emulationstation-de-v${finalAttrs.version}.tar.gz";
hash = "sha256:RGlXFybbXYx66Hpjp2N3ovK4T5VyS4w0DWRGNvbwugs="; hash = "sha256-v9nOY9T5VOVLBUKoDXqwYa1iYvW42iGA+3kpPUOmHkg=";
}; };
patches = [ ./001-add-nixpkgs-retroarch-cores.patch ]; patches = [
(fetchpatch {
name = "fix-buffer-overflow-detection-with-gcc-fortification";
url = "https://gitlab.com/es-de/emulationstation-de/-/commit/41fd33fdc3dacef507b987ed316aec2b0d684317.patch";
sha256 = "sha256-LHJ11mtBn8hRU97+Lz9ugPTTGUAxrPz7yvyxqNOAYKY=";
})
./001-add-nixpkgs-retroarch-cores.patch
];
nativeBuildInputs = [ nativeBuildInputs = [
cmake cmake
@ -37,36 +47,18 @@ stdenv.mkDerivation (finalAttrs: {
ffmpeg ffmpeg
freeimage freeimage
freetype freetype
harfbuzz
icu
libgit2 libgit2
poppler poppler
pugixml pugixml
SDL2 SDL2
]; ];
installPhase = '' cmakeFlags = [ (lib.cmakeBool "APPLICATION_UPDATER" false) ];
# Binary
install -D ../es-de $out/bin/es-de
# Resources
mkdir -p $out/share/es-de/
cp -r ../resources/ $out/share/es-de/resources/
# Desktop file
mkdir -p $out/share/applications
cp ../es-app/assets/org.es_de.frontend.desktop $out/share/applications/
# Icon
mkdir -p $out/share/icons/hicolor/scalable/apps
cp ../es-app/assets/org.es_de.frontend.svg $out/share/icons/hicolor/scalable/apps/
'';
postInstall = ''
substituteInPlace $out/share/applications/org.es_de.frontend.desktop \
--replace "Exec=es-de" "Exec=$out/bin/es-de"
'';
meta = { meta = {
description = "EmulationStation Desktop Edition is a frontend for browsing and launching games from your multi-platform game collection"; description = "ES-DE (EmulationStation Desktop Edition) is a frontend for browsing and launching games from your multi-platform collection";
homepage = "https://es-de.org"; homepage = "https://es-de.org";
maintainers = with lib.maintainers; [ ivarmedi ]; maintainers = with lib.maintainers; [ ivarmedi ];
license = lib.licenses.mit; license = lib.licenses.mit;