1
0
Fork 0
mirror of https://github.com/nix-community/home-manager.git synced 2025-12-02 15:11:03 +01:00
home-manager/tests/modules/programs/retroarch/cores.nix
jtrrll be4a9233dd retroarch: add module
add a module for configuring retroarch through home-manager
2025-11-09 10:12:54 -06:00

34 lines
917 B
Nix

{ config, pkgs, ... }:
{
imports = [ ./stubs.nix ];
programs.retroarch = {
enable = true;
cores = {
mgba.enable = true;
snes9x = {
enable = true;
package = pkgs.libretro.snes9x2010;
};
custom = {
enable = true;
package = config.lib.test.mkStubPackage {
buildScript = ''
mkdir -p $out/lib/retroarch/cores
touch $out/lib/retroarch/cores/custom_libretro.so
'';
extraAttrs.libretroCore = "/lib/retroarch/cores";
};
};
};
};
nmt.script = ''
assertFileExists home-path/bin/retroarch
assertFileRegex home-path/bin/retroarch 'L.*lib/retroarch/cores'
assertFileExists home-path/lib/retroarch/cores/mgba_libretro.so
assertFileExists home-path/lib/retroarch/cores/snes9x2010_libretro.so
assertFileExists home-path/lib/retroarch/cores/custom_libretro.so
'';
}