Merge pull request #284252 from atorres1985-contrib/emulationstation

emulationstation: refactor

authored by Weijia Wang and committed by GitHub 6e601c77 b42f7df8

+81 -35
-33
pkgs/applications/emulators/emulationstation/default.nix
··· 1 - { lib, stdenv, fetchFromGitHub, pkg-config, cmake, curl, boost, eigen 2 - , freeimage, freetype, libGLU, libGL, rapidjson, SDL2, alsa-lib 3 - , vlc }: 4 - 5 - stdenv.mkDerivation { 6 - pname = "emulationstation"; 7 - version = "2.11.2"; 8 - 9 - src = fetchFromGitHub { 10 - fetchSubmodules = true; 11 - owner = "RetroPie"; 12 - repo = "EmulationStation"; 13 - rev = "cda7de687924c4c1ab83d6b0ceb88aa734fe6cfe"; 14 - hash = "sha256-J5h/578FVe4DXJx/AvpRnCIUpqBeFtmvFhUDYH5SErQ="; 15 - }; 16 - 17 - nativeBuildInputs = [ pkg-config cmake ]; 18 - buildInputs = [ alsa-lib boost curl eigen freeimage freetype libGLU libGL rapidjson SDL2 vlc ]; 19 - 20 - installPhase = '' 21 - install -D ../emulationstation $out/bin/emulationstation 22 - cp -r ../resources/ $out/bin/resources/ 23 - ''; 24 - 25 - meta = { 26 - description = "A flexible emulator front-end supporting keyboardless navigation and custom system themes"; 27 - homepage = "https://emulationstation.org"; 28 - maintainers = [ lib.maintainers.edwtjo ]; 29 - license = lib.licenses.mit; 30 - platforms = lib.platforms.linux; 31 - mainProgram = "emulationstation"; 32 - }; 33 - }
+81
pkgs/by-name/em/emulationstation/package.nix
··· 1 + { lib 2 + , SDL2 3 + , alsa-lib 4 + , boost 5 + , cmake 6 + , curl 7 + , fetchFromGitHub 8 + , freeimage 9 + , freetype 10 + , libGL 11 + , libGLU 12 + , libvlc 13 + , pkg-config 14 + , rapidjson 15 + , stdenv 16 + }: 17 + 18 + stdenv.mkDerivation (finalAttrs: { 19 + pname = "emulationstation"; 20 + version = "2.11.2"; 21 + 22 + src = fetchFromGitHub { 23 + owner = "RetroPie"; 24 + repo = "EmulationStation"; 25 + rev = "v${finalAttrs.version}"; 26 + fetchSubmodules = true; 27 + hash = "sha256-J5h/578FVe4DXJx/AvpRnCIUpqBeFtmvFhUDYH5SErQ="; 28 + }; 29 + 30 + nativeBuildInputs = [ 31 + SDL2 32 + cmake 33 + pkg-config 34 + ]; 35 + 36 + buildInputs = [ 37 + SDL2 38 + alsa-lib 39 + boost 40 + curl 41 + freeimage 42 + freetype 43 + libGL 44 + libGLU 45 + libvlc 46 + rapidjson 47 + ]; 48 + 49 + strictDeps = true; 50 + 51 + cmakeFlags = [ 52 + (lib.cmakeBool "GL" true) 53 + ]; 54 + 55 + installPhase = '' 56 + runHook preInstall 57 + 58 + install -Dm755 ../emulationstation $out/bin/emulationstation 59 + mkdir -p $out/share/emulationstation/ 60 + cp -r ../resources $out/share/emulationstation/ 61 + 62 + runHook preInstall 63 + ''; 64 + 65 + # es-core/src/resources/ResourceManager.cpp: resources are searched at the 66 + # same place of binaries. 67 + postFixup = '' 68 + pushd $out 69 + ln -s $out/share/emulationstation/resources $out/bin/ 70 + popd 71 + ''; 72 + 73 + meta = { 74 + homepage = "https://github.com/RetroPie/EmulationStation"; 75 + description = "A flexible emulator front-end supporting keyboardless navigation and custom system themes (forked by RetroPie)"; 76 + license = with lib.licenses; [ mit ]; 77 + mainProgram = "emulationstation"; 78 + maintainers = with lib.maintainers; [ AndersonTorres edwtjo ]; 79 + platforms = lib.platforms.linux; 80 + }; 81 + })
-2
pkgs/top-level/all-packages.nix
··· 2684 2684 2685 2685 emu2 = callPackage ../applications/emulators/emu2 { }; 2686 2686 2687 - emulationstation = callPackage ../applications/emulators/emulationstation { }; 2688 - 2689 2687 fceux = libsForQt5.callPackage ../applications/emulators/fceux { }; 2690 2688 2691 2689 firebird-emu = libsForQt5.callPackage ../applications/emulators/firebird-emu { };