2024-01-11 02:00:21 +01:00
|
|
|
{ mkRom , lib, symlinkJoin, libretro, stdenv, retroarchBare, retroarchFull, wrapRetroarch' }:
|
2024-01-06 22:42:36 +01:00
|
|
|
{ name
|
|
|
|
, src
|
|
|
|
, emulator
|
|
|
|
, filename
|
2024-01-11 02:00:21 +01:00
|
|
|
, settings
|
2024-01-06 22:42:36 +01:00
|
|
|
, meta
|
|
|
|
}:
|
|
|
|
let
|
2024-01-11 02:00:21 +01:00
|
|
|
retroarch = wrapRetroarch' {
|
|
|
|
retroarch = retroarchBare;
|
|
|
|
cores = retroarchFull.cores;
|
|
|
|
inherit settings;
|
|
|
|
};
|
2024-01-06 22:42:36 +01:00
|
|
|
in
|
2024-01-18 18:56:35 +01:00
|
|
|
mkRom (
|
|
|
|
assert lib.assertMsg (lib.stringLength emulator > 0) "Rom ${name} need an emulator name";
|
|
|
|
{
|
2024-01-06 22:42:36 +01:00
|
|
|
runtimeInputs = [ retroarch ];
|
|
|
|
# To do add a check for the emulator
|
|
|
|
command = "retroarch -L ${emulator} ${builtins.placeholder "out"}/usr/share/${filename}";
|
|
|
|
inherit meta src name;
|
|
|
|
})
|