retronix/pkgs/runcommand.nix

53 lines
1.2 KiB
Nix
Raw Normal View History

2023-12-30 18:38:14 +01:00
{ lib
, stdenv
, writeText
, feh
, joy2key
, xrandr
, mesa
, retropieSetup
}:
stdenv.mkDerivation {
name = "runcommand";
src = retropieSetup;
patches = [
./runcommand.patch
];
dontBuild = true;
installPhase = ''
mkdir -p $out/bin
mkdir -p $out/lib
cp scriptmodules/supplementary/runcommand/runcommand.sh $out/bin
cp scriptmodules/inifuncs.sh $out/lib
export inifunc="$out/lib/inifuncs.sh"
substituteInPlace $out/bin/runcommand.sh --replace '$CONFIGDIR/all/runcommand-menu' '@runcommandUserMenu@'
substituteAllInPlace $out/bin/runcommand.sh
wrapProgram $out/bin/runcommand.sh --prefix PATH : ${lib.makeBinPath [ feh ]}
'';
joy2key = "${joy2key}/bin/joy2key";
modetest = "${mesa}/bin/modetest";
xrandr = "${xrandr}/bin/xrandr";
runcommandCfg = writeText "runcommand.cfg" "";
videomodesCfg = writeText "videomodes.cfg" "";
emulatorsCfg = writeText "emulators.cfg" "";
backendsCfg = writeText "backends.cfg" "";
retronetplayCfg = writeText "retronetplay.cfg" "";
sysCfgDir = null;
runcommandUserMenu = null;
libretroCores = null;
imagesDir = "/dev/null";
runcommandLaunchDialogRc = writeText "dialogrc.cfg" "";
userscripts = "/dev/null";
}