From 03d4c06baeb7984a3b3fb323ea5abc00865e324e Mon Sep 17 00:00:00 2001 From: SenseT Date: Tue, 4 Mar 2025 11:56:15 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E4=BE=9D=E8=B5=96=E8=B7=AF?= =?UTF-8?q?=E5=BE=84=EF=BC=8C=E5=85=8D=E5=BE=97=E6=97=A0=E6=B3=95=E5=90=AF?= =?UTF-8?q?=E5=8A=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lmxg-mu50 | 3 ++- package.nix | 6 ++---- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/lmxg-mu50 b/lmxg-mu50 index 4e0a28d..e96d223 100644 --- a/lmxg-mu50 +++ b/lmxg-mu50 @@ -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 diff --git a/package.nix b/package.nix index 81dd328..be611d6 100644 --- a/package.nix +++ b/package.nix @@ -4,7 +4,6 @@ # dependencies mame, - which, p7zip, ... }: @@ -28,7 +27,6 @@ stdenv.mkDerivation rec { buildInputs = [ mame - which ]; phases = [ @@ -45,13 +43,13 @@ 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 mkdir -p $out/share/pixmaps cp ${icon} $out/share/pixmaps/${pname}.png - + mkdir -p $out/share/mame/assets/mu50 cp -r /build/mu50 $out/share/mame/assets/