增加依赖路径,免得无法启动

This commit is contained in:
SenseT 2025-03-04 11:56:15 +08:00
parent 33ea399607
commit 03d4c06bae
2 changed files with 4 additions and 5 deletions

View File

@ -1,8 +1,9 @@
#!/usr/bin/env bash
PATH=$PATH:@MAME_BIN_DIR@
PACKAGE_DIR="@DIR@/share/mame/assets/mu50"
WORKDIR="$XDG_DATA_HOME/lmxg-mu50"
MAME_BIN=`which mame`
MAME_BIN=mame
MIDI_PORT="Midi Through Port-0"
mkdir -p $WORKDIR && cd $WORKDIR

View File

@ -4,7 +4,6 @@
# dependencies
mame,
which,
p7zip,
...
}:
@ -28,7 +27,6 @@ stdenv.mkDerivation rec {
buildInputs = [
mame
which
];
phases = [
@ -45,7 +43,7 @@ stdenv.mkDerivation rec {
installPhase = ''
mkdir -p $out/bin
cat ${bin} | sed "s|@DIR@|$out|" > $out/bin/${pname}
cat ${bin} | sed "s|@DIR@|$out|" | sed "s|@MAME_BIN_DIR@|${mame}/bin|" > $out/bin/${pname}
chmod +x $out/bin/${pname}
mkdir -p $out/share/applications
cat ${desktop} | sed "s|@EXEC@|$out/bin/${pname}|" > $out/share/applications/${pname}.desktop