retronix/pkgs/overlay.nix

33 lines
992 B
Nix
Raw Normal View History

2023-12-30 18:38:14 +01:00
final: prev: {
joy2keyd = final.python3.pkgs.callPackage ./joy2keyd {};
retropieSetup = final.callPackage ./retropie-setup.nix {};
joy2key = final.callPackage ./joy2key.nix {};
runcommand = final.callPackage ./runcommand.nix {};
2024-01-06 19:35:33 +01:00
emulationstationPatched = final.emulationstation.overrideAttrs (_: previous: {
patches = [ ./emulationstation.patch ];
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}
'';
}