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

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 #!/usr/bin/env bash
PATH=$PATH:@MAME_BIN_DIR@
PACKAGE_DIR="@DIR@/share/mame/assets/mu50" PACKAGE_DIR="@DIR@/share/mame/assets/mu50"
WORKDIR="$XDG_DATA_HOME/lmxg-mu50" WORKDIR="$XDG_DATA_HOME/lmxg-mu50"
MAME_BIN=`which mame` MAME_BIN=mame
MIDI_PORT="Midi Through Port-0" MIDI_PORT="Midi Through Port-0"
mkdir -p $WORKDIR && cd $WORKDIR mkdir -p $WORKDIR && cd $WORKDIR

View File

@ -4,7 +4,6 @@
# dependencies # dependencies
mame, mame,
which,
p7zip, p7zip,
... ...
}: }:
@ -28,7 +27,6 @@ stdenv.mkDerivation rec {
buildInputs = [ buildInputs = [
mame mame
which
]; ];
phases = [ phases = [
@ -45,13 +43,13 @@ stdenv.mkDerivation rec {
installPhase = '' installPhase = ''
mkdir -p $out/bin 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} chmod +x $out/bin/${pname}
mkdir -p $out/share/applications mkdir -p $out/share/applications
cat ${desktop} | sed "s|@EXEC@|$out/bin/${pname}|" > $out/share/applications/${pname}.desktop cat ${desktop} | sed "s|@EXEC@|$out/bin/${pname}|" > $out/share/applications/${pname}.desktop
mkdir -p $out/share/pixmaps mkdir -p $out/share/pixmaps
cp ${icon} $out/share/pixmaps/${pname}.png cp ${icon} $out/share/pixmaps/${pname}.png
mkdir -p $out/share/mame/assets/mu50 mkdir -p $out/share/mame/assets/mu50
cp -r /build/mu50 $out/share/mame/assets/ cp -r /build/mu50 $out/share/mame/assets/