summaryrefslogtreecommitdiffstats
path: root/pkgs/applications/emulators/mame
diff options
context:
space:
mode:
authorThiago Kenji Okada <thiagokokada@gmail.com>2022-11-08 23:46:02 +0000
committerThiago Kenji Okada <thiagokokada@gmail.com>2022-11-10 09:47:54 +0000
commitb89efbd9a45aaa6563225ba2de8a93ce9663f337 (patch)
tree0c6051fa1ea7679a3dab1aeb75dd802f429efbeb /pkgs/applications/emulators/mame
parent23a592a830b7e47eafc6d4c33345cf90dc88e174 (diff)
mame-tools: init at 0.249
This commit adds a new `tools` output to `mame` and move all non-emulator binaries to it. This is because some of those binaries (e.g.: chdman) are useful outside of the MAME, and the MAME binary is really big. So if you only want to use some of the MAME tools, this will reduce the download size needed for it. The `tools` output is declared as `mame-tools` inside `all-packages.nix`, for easier discovery. This is similar to how other distros packages MAME, e.g.: on Arch Linux we have `mame` and `mame-tools`.
Diffstat (limited to 'pkgs/applications/emulators/mame')
-rw-r--r--pkgs/applications/emulators/mame/default.nix24
1 files changed, 19 insertions, 5 deletions
diff --git a/pkgs/applications/emulators/mame/default.nix b/pkgs/applications/emulators/mame/default.nix
index aaa4077015ee..cd5d718c8a4e 100644
--- a/pkgs/applications/emulators/mame/default.nix
+++ b/pkgs/applications/emulators/mame/default.nix
@@ -53,6 +53,8 @@ stdenv.mkDerivation rec {
sha256 = "sha256-im6y/E0pQxruX2kNXZLE3fHq+zXfsstnOoC1QvH4fd4=";
};
+ outputs = [ "out" "tools" ];
+
makeFlags = [
"CC=${stdenv.cc.targetPrefix}cc"
"CXX=${stdenv.cc.targetPrefix}c++"
@@ -138,21 +140,33 @@ stdenv.mkDerivation rec {
runHook preInstall
make -f dist.mak PTR64=${lib.optionalString stdenv.is64bit "1"}
+
+ # mame
mkdir -p ${dest}
mv build/release/*/Release/mame/* ${dest}
- mkdir -p $out/bin
- find ${dest} -maxdepth 1 -executable -type f -exec mv -t $out/bin {} \;
- install -Dm755 src/osd/sdl/taputil.sh $out/bin/taputil.sh
-
- installManPage ${dest}/docs/man/*.1 ${dest}/docs/man/*.6
+ find ${dest} -maxdepth 1 -executable -type f -delete;
+ install -Dm755 mame -t $out/bin
install -Dm644 ${icon} $out/share/icons/hicolor/scalable/apps/mame.svg
+ installManPage ${dest}/docs/man/*.1 ${dest}/docs/man/*.6
mv artwork plugins samples ${dest}
+ # mame-tools
+ for _i in castool chdman floptool imgtool jedutil ldresample ldverify nltool nlwav pngcmp regrep romcmp \
+ split srcclean testkeys unidasm; do
+ install -Dm755 $_i -t $tools/bin
+ done
+ mv $tools/bin/{,mame-}split
+
runHook postInstall
'';
+ postFixup = ''
+ mkdir -p $tools/share/man
+ mv {$out,$tools}/share/man/man1
+ '';
+
enableParallelBuilding = true;
passthru.updateScript = writeScript "mame-update-script" ''