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/