mirror of
https://github.com/SebastianWendel/nixpkgs.git
synced 2024-09-20 12:29:02 +02:00
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`.
This commit is contained in:
parent
23a592a830
commit
b89efbd9a4
|
@ -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" ''
|
||||
|
|
|
@ -1597,6 +1597,8 @@ with pkgs;
|
|||
inherit (darwin.apple_sdk.frameworks) CoreAudioKit ForceFeedback;
|
||||
};
|
||||
|
||||
mame-tools = (lib.getOutput "tools" mame);
|
||||
|
||||
mednafen = callPackage ../applications/emulators/mednafen {
|
||||
inherit (darwin) libiconv;
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue