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

32 lines
589 B
Nix

{
config,
pkgs,
realPkgs,
...
}:
let
mkLibretroCore =
name:
config.lib.test.mkStubPackage {
buildScript = ''
mkdir -p $out/lib/retroarch/cores
touch $out/lib/retroarch/cores/${name}_libretro.so
'';
extraAttrs.libretroCore = "/lib/retroarch/cores";
};
in
{
test.stubs = {
libretro = {
extraAttrs = {
mgba = mkLibretroCore "mgba";
snes9x2010 = mkLibretroCore "snes9x2010";
};
};
retroarch-bare = {
extraAttrs = {
inherit (realPkgs.retroarch-bare) wrapper;
};
};
};
}