diff --git a/nixos/doc/manual/from_md/release-notes/rl-2211.section.xml b/nixos/doc/manual/from_md/release-notes/rl-2211.section.xml
index 9c5db2f8a586..25b3a686c0d9 100644
--- a/nixos/doc/manual/from_md/release-notes/rl-2211.section.xml
+++ b/nixos/doc/manual/from_md/release-notes/rl-2211.section.xml
@@ -1354,10 +1354,20 @@ signald -d /var/lib/signald/db \
- boot.kernel.sysctl is defined as a freeformType and adds a
- custom merge option for net.core.rmem_max
- (taking the highest value defined to avoid conflicts between 2
- services trying to set that value)
+ boot.kernel.sysctl is defined as a
+ freeformType and adds a custom merge option for
+ net.core.rmem_max
(taking the highest value
+ defined to avoid conflicts between 2 services trying to set
+ that value).
+
+
+
+
+ The mame package does not ship with its
+ tools anymore in the default output. They were moved to a
+ separate tools output instead. For
+ convenience, mame-tools package was added
+ for those who want to use it.
diff --git a/nixos/doc/manual/release-notes/rl-2211.section.md b/nixos/doc/manual/release-notes/rl-2211.section.md
index 6da610157282..583480bec020 100644
--- a/nixos/doc/manual/release-notes/rl-2211.section.md
+++ b/nixos/doc/manual/release-notes/rl-2211.section.md
@@ -406,6 +406,8 @@ Available as [services.patroni](options.html#opt-services.patroni.enable).
- The `nodePackages` package set now defaults to the LTS release in the `nodejs` package again, instead of being pinned to `nodejs-14_x`. Several updates to node2nix have been made for compatibility with newer Node.js and npm versions and a new `postRebuild` hook has been added for packages to perform extra build steps before the npm install step prunes dev dependencies.
-- boot.kernel.sysctl is defined as a freeformType and adds a custom merge option for "net.core.rmem_max" (taking the highest value defined to avoid conflicts between 2 services trying to set that value)
+- `boot.kernel.sysctl` is defined as a freeformType and adds a custom merge option for "net.core.rmem_max" (taking the highest value defined to avoid conflicts between 2 services trying to set that value).
+
+- The `mame` package does not ship with its tools anymore in the default output. They were moved to a separate `tools` output instead. For convenience, `mame-tools` package was added for those who want to use it.
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" ''
diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix
index 9c940bfd431e..0d69ac96bc7e 100644
--- a/pkgs/top-level/all-packages.nix
+++ b/pkgs/top-level/all-packages.nix
@@ -1603,6 +1603,8 @@ with pkgs;
inherit (darwin.apple_sdk.frameworks) CoreAudioKit ForceFeedback;
};
+ mame-tools = (lib.getOutput "tools" mame);
+
mednafen = callPackage ../applications/emulators/mednafen {
inherit (darwin) libiconv;
};