retronix/pkgs/overlay.nix
2024-01-15 15:13:59 +01:00

41 lines
1.2 KiB
Nix

final: prev: {
retropieSetup = final.callPackage ./retropie-setup.nix {};
joy2keyd = final.python3.pkgs.callPackage ./joy2keyd {};
joy2key = final.callPackage ./joy2key.nix {};
runcommand = final.callPackage ./runcommand.nix {};
emulationstationPatched = final.emulationstation.overrideAttrs (_: previous: {
patches = [ ./emulationstation.patch ];
});
symlinkJoinSubdir =
args_@{ name
, paths
, subdir ? ""
, preferLocalBuild ? true
, allowSubstitutes ? false
, postBuild ? ""
, ...
}:
let
args = removeAttrs args_ [ "name" "postBuild" ]
// {
inherit preferLocalBuild allowSubstitutes;
passAsFile = [ "paths" ];
}; # pass the defaults
in final.runCommand name args
''
mkdir -p $out/${subdir}
for i in $(cat $pathsPath); do
${final.xorg.lndir}/bin/lndir -silent $i $out/${subdir}
done
${postBuild}
'';
roms = final.callPackage ./roms {};
wrapRetroarch' = { retroarch, cores ? [ ], settings ? { } }:
final.callPackage ./wrap-retroarch.nix { inherit retroarch cores settings; };
}