diff options
author | Weijia Wang <9713184+wegank@users.noreply.github.com> | 2024-02-05 12:15:04 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-02-05 12:15:04 +0100 |
commit | 6e601c77e719a4855a65026fc19d5ce61a22ff26 (patch) | |
tree | 39db06cd85f535c596595b36f71681b19548fecc | |
parent | b42f7df89d8d0daa47f79a14a2791b7a1fee7c12 (diff) | |
parent | af039eb7c612e55cb7ed3141c3ae20587aafcf0f (diff) | |
download | nixlib-6e601c77e719a4855a65026fc19d5ce61a22ff26.tar nixlib-6e601c77e719a4855a65026fc19d5ce61a22ff26.tar.gz nixlib-6e601c77e719a4855a65026fc19d5ce61a22ff26.tar.bz2 nixlib-6e601c77e719a4855a65026fc19d5ce61a22ff26.tar.lz nixlib-6e601c77e719a4855a65026fc19d5ce61a22ff26.tar.xz nixlib-6e601c77e719a4855a65026fc19d5ce61a22ff26.tar.zst nixlib-6e601c77e719a4855a65026fc19d5ce61a22ff26.zip |
Merge pull request #284252 from atorres1985-contrib/emulationstation
emulationstation: refactor
-rw-r--r-- | pkgs/applications/emulators/emulationstation/default.nix | 33 | ||||
-rw-r--r-- | pkgs/by-name/em/emulationstation/package.nix | 81 | ||||
-rw-r--r-- | pkgs/top-level/all-packages.nix | 2 |
3 files changed, 81 insertions, 35 deletions
diff --git a/pkgs/applications/emulators/emulationstation/default.nix b/pkgs/applications/emulators/emulationstation/default.nix deleted file mode 100644 index f0434ecdedf4..000000000000 --- a/pkgs/applications/emulators/emulationstation/default.nix +++ /dev/null @@ -1,33 +0,0 @@ -{ lib, stdenv, fetchFromGitHub, pkg-config, cmake, curl, boost, eigen -, freeimage, freetype, libGLU, libGL, rapidjson, SDL2, alsa-lib -, vlc }: - -stdenv.mkDerivation { - pname = "emulationstation"; - version = "2.11.2"; - - src = fetchFromGitHub { - fetchSubmodules = true; - owner = "RetroPie"; - repo = "EmulationStation"; - rev = "cda7de687924c4c1ab83d6b0ceb88aa734fe6cfe"; - hash = "sha256-J5h/578FVe4DXJx/AvpRnCIUpqBeFtmvFhUDYH5SErQ="; - }; - - nativeBuildInputs = [ pkg-config cmake ]; - buildInputs = [ alsa-lib boost curl eigen freeimage freetype libGLU libGL rapidjson SDL2 vlc ]; - - installPhase = '' - install -D ../emulationstation $out/bin/emulationstation - cp -r ../resources/ $out/bin/resources/ - ''; - - meta = { - description = "A flexible emulator front-end supporting keyboardless navigation and custom system themes"; - homepage = "https://emulationstation.org"; - maintainers = [ lib.maintainers.edwtjo ]; - license = lib.licenses.mit; - platforms = lib.platforms.linux; - mainProgram = "emulationstation"; - }; -} diff --git a/pkgs/by-name/em/emulationstation/package.nix b/pkgs/by-name/em/emulationstation/package.nix new file mode 100644 index 000000000000..7358aa5ed99c --- /dev/null +++ b/pkgs/by-name/em/emulationstation/package.nix @@ -0,0 +1,81 @@ +{ lib +, SDL2 +, alsa-lib +, boost +, cmake +, curl +, fetchFromGitHub +, freeimage +, freetype +, libGL +, libGLU +, libvlc +, pkg-config +, rapidjson +, stdenv +}: + +stdenv.mkDerivation (finalAttrs: { + pname = "emulationstation"; + version = "2.11.2"; + + src = fetchFromGitHub { + owner = "RetroPie"; + repo = "EmulationStation"; + rev = "v${finalAttrs.version}"; + fetchSubmodules = true; + hash = "sha256-J5h/578FVe4DXJx/AvpRnCIUpqBeFtmvFhUDYH5SErQ="; + }; + + nativeBuildInputs = [ + SDL2 + cmake + pkg-config + ]; + + buildInputs = [ + SDL2 + alsa-lib + boost + curl + freeimage + freetype + libGL + libGLU + libvlc + rapidjson + ]; + + strictDeps = true; + + cmakeFlags = [ + (lib.cmakeBool "GL" true) + ]; + + installPhase = '' + runHook preInstall + + install -Dm755 ../emulationstation $out/bin/emulationstation + mkdir -p $out/share/emulationstation/ + cp -r ../resources $out/share/emulationstation/ + + runHook preInstall + ''; + + # es-core/src/resources/ResourceManager.cpp: resources are searched at the + # same place of binaries. + postFixup = '' + pushd $out + ln -s $out/share/emulationstation/resources $out/bin/ + popd + ''; + + meta = { + homepage = "https://github.com/RetroPie/EmulationStation"; + description = "A flexible emulator front-end supporting keyboardless navigation and custom system themes (forked by RetroPie)"; + license = with lib.licenses; [ mit ]; + mainProgram = "emulationstation"; + maintainers = with lib.maintainers; [ AndersonTorres edwtjo ]; + platforms = lib.platforms.linux; + }; +}) diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index b329f985318b..b763cdb8362c 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -2684,8 +2684,6 @@ with pkgs; emu2 = callPackage ../applications/emulators/emu2 { }; - emulationstation = callPackage ../applications/emulators/emulationstation { }; - fceux = libsForQt5.callPackage ../applications/emulators/fceux { }; firebird-emu = libsForQt5.callPackage ../applications/emulators/firebird-emu { }; |