retronix/pkgs/overlay.nix

42 lines
1.2 KiB
Nix
Raw Normal View History

2023-12-30 18:38:14 +01:00
final: prev: {
retropieSetup = final.callPackage ./retropie-setup.nix {};
2024-01-06 22:42:36 +01:00
joy2keyd = final.python3.pkgs.callPackage ./joy2keyd {};
2023-12-30 18:38:14 +01:00
joy2key = final.callPackage ./joy2key.nix {};
2024-01-06 22:42:36 +01:00
2023-12-30 18:38:14 +01:00
runcommand = final.callPackage ./runcommand.nix {};
2024-01-06 22:42:36 +01:00
2024-01-06 19:35:33 +01:00
emulationstationPatched = final.emulationstation.overrideAttrs (_: previous: {
patches = [ ./emulationstation.patch ];
2023-12-30 18:38:14 +01:00
});
2024-01-06 22:42:36 +01:00
2023-12-30 18:38:14 +01:00
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
''
2024-01-06 19:35:33 +01:00
mkdir -p $out/${subdir}
2023-12-30 18:38:14 +01:00
for i in $(cat $pathsPath); do
${final.xorg.lndir}/bin/lndir -silent $i $out/${subdir}
done
${postBuild}
'';
2024-01-06 22:42:36 +01:00
roms = final.callPackage ./roms {};
wrapRetroarch' = { retroarch, cores ? [ ], settings ? { } }:
final.callPackage ./wrap-retroarch.nix { inherit retroarch cores settings; };
2023-12-30 18:38:14 +01:00
}