Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)

Merge pull request #324444 from atorres1985-contrib/emulationstation

emulationstation: refactor

authored by Thiago Kenji Okada and committed by GitHub 9d21d8ae 51e48f19

+74 -32
+39 -32
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 ··· 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 ··· 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 ··· 70 popd 71 ''; 72 73 meta = { 74 homepage = "https://github.com/RetroPie/EmulationStation"; 75 description = "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 - })
··· 1 + { 2 + lib, 3 + SDL2, 4 + alsa-lib, 5 + boost, 6 + callPackage, 7 + cmake, 8 + curl, 9 + freeimage, 10 + freetype, 11 + libGL, 12 + libGLU, 13 + libvlc, 14 + pkg-config, 15 + rapidjson, 16 + stdenv, 17 }: 18 19 + let 20 + sources = callPackage ./sources.nix { }; 21 + in 22 + stdenv.mkDerivation { 23 + inherit (sources.emulationstation) pname version src; 24 25 + postUnpack = '' 26 + pushd $sourceRoot/external/pugixml 27 + cp --verbose --archive ${sources.pugixml.src}/* . 28 + chmod --recursive 744 . 29 + popd 30 + ''; 31 32 nativeBuildInputs = [ 33 SDL2 ··· 47 libvlc 48 rapidjson 49 ]; 50 + 51 + cmakeFlags = [ (lib.cmakeBool "GL" true) ]; 52 53 strictDeps = true; 54 55 installPhase = '' 56 runHook preInstall 57 ··· 59 mkdir -p $out/share/emulationstation/ 60 cp -r ../resources $out/share/emulationstation/ 61 62 + runHook postInstall 63 ''; 64 65 # es-core/src/resources/ResourceManager.cpp: resources are searched at the ··· 70 popd 71 ''; 72 73 + passthru = { 74 + inherit sources; 75 + }; 76 + 77 meta = { 78 homepage = "https://github.com/RetroPie/EmulationStation"; 79 description = "Flexible emulator front-end supporting keyboardless navigation and custom system themes (forked by RetroPie)"; 80 license = with lib.licenses; [ mit ]; 81 mainProgram = "emulationstation"; 82 + maintainers = with lib.maintainers; [ 83 + AndersonTorres 84 + edwtjo 85 + ]; 86 platforms = lib.platforms.linux; 87 }; 88 + }
+35
pkgs/by-name/em/emulationstation/sources.nix
···
··· 1 + { fetchFromGitHub }: 2 + 3 + { 4 + emulationstation = 5 + let 6 + self = { 7 + pname = "emulationstation"; 8 + version = "2.11.2"; 9 + 10 + src = fetchFromGitHub { 11 + owner = "RetroPie"; 12 + repo = "EmulationStation"; 13 + rev = "v${self.version}"; 14 + hash = "sha256-f2gRkp+3Pp2qnvg2RBzaHPpzhAnwx0+5x1Pe3kD90xE="; 15 + }; 16 + }; 17 + in 18 + self; 19 + 20 + pugixml = 21 + let 22 + self = { 23 + pname = "pugixml"; 24 + version = "1.8.1"; 25 + 26 + src = fetchFromGitHub { 27 + owner = "zeux"; 28 + repo = "pugixml"; 29 + rev = "v${self.version}"; 30 + hash = "sha256-LbjTN1hnIbqI79C+gCdwuDG0+B/5yXf7hg0Q+cDFIf4="; 31 + }; 32 + }; 33 + in 34 + self; 35 + }