emulationstation: detach sources acquisition

This commit is contained in:
Anderson Torres 2024-07-03 21:48:22 -03:00
parent b657d8d7c8
commit 34b52aa8da
2 changed files with 49 additions and 29 deletions

View File

@ -1,31 +1,26 @@
{ lib
, SDL2
, alsa-lib
, boost
, cmake
, curl
, fetchFromGitHub
, freeimage
, freetype
, libGL
, libGLU
, libvlc
, pkg-config
, rapidjson
, stdenv
{
lib,
SDL2,
alsa-lib,
boost,
callPackage,
cmake,
curl,
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=";
};
let
sources = callPackage ./sources.nix { };
in
stdenv.mkDerivation {
inherit (sources.emulationstation) pname version src;
nativeBuildInputs = [
SDL2
@ -46,12 +41,12 @@ stdenv.mkDerivation (finalAttrs: {
rapidjson
];
strictDeps = true;
cmakeFlags = [
(lib.cmakeBool "GL" true)
];
strictDeps = true;
installPhase = ''
runHook preInstall
@ -70,6 +65,10 @@ stdenv.mkDerivation (finalAttrs: {
popd
'';
passthru = {
inherit sources;
};
meta = {
homepage = "https://github.com/RetroPie/EmulationStation";
description = "Flexible emulator front-end supporting keyboardless navigation and custom system themes (forked by RetroPie)";
@ -78,4 +77,4 @@ stdenv.mkDerivation (finalAttrs: {
maintainers = with lib.maintainers; [ AndersonTorres edwtjo ];
platforms = lib.platforms.linux;
};
})
}

View File

@ -0,0 +1,21 @@
{
fetchFromGitHub,
}:
{
emulationstation = let
self = {
pname = "emulationstation";
version = "2.11.2";
src = fetchFromGitHub {
owner = "RetroPie";
repo = "EmulationStation";
rev = "v${self.version}";
fetchSubmodules = true;
hash = "sha256-J5h/578FVe4DXJx/AvpRnCIUpqBeFtmvFhUDYH5SErQ=";
};
};
in
self;
}