fix missing emulator + add assert not to reproduce the mistake

This commit is contained in:
sinavir 2024-01-18 18:56:35 +01:00
parent 1f6091836a
commit e51fd1f639
2 changed files with 4 additions and 2 deletions

View file

@ -5,7 +5,7 @@ mkRetroarchRom {
inherit settings; inherit settings;
emulator = ""; emulator = "fbneo";
filename = "atetris.zip"; filename = "atetris.zip";
meta = { meta = {

View file

@ -13,7 +13,9 @@ let
inherit settings; inherit settings;
}; };
in in
mkRom ({ mkRom (
assert lib.assertMsg (lib.stringLength emulator > 0) "Rom ${name} need an emulator name";
{
runtimeInputs = [ retroarch ]; runtimeInputs = [ retroarch ];
# To do add a check for the emulator # To do add a check for the emulator
command = "retroarch -L ${emulator} ${builtins.placeholder "out"}/usr/share/${filename}"; command = "retroarch -L ${emulator} ${builtins.placeholder "out"}/usr/share/${filename}";