From bde046e15938b6162ee47c14a4e3045676827ac4 Mon Sep 17 00:00:00 2001 From: Michael Daniels Date: Sun, 15 Feb 2026 17:13:13 -0500 Subject: [PATCH] man-pages: split outputs --- doc/release-notes/rl-2605.section.md | 2 ++ pkgs/by-name/ma/man-pages/package.nix | 20 +++++++++++++++++++- 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/doc/release-notes/rl-2605.section.md b/doc/release-notes/rl-2605.section.md index 45a5fccfafd4..6e139ca3604e 100644 --- a/doc/release-notes/rl-2605.section.md +++ b/doc/release-notes/rl-2605.section.md @@ -106,6 +106,8 @@ - `vicinae` has been updated to v0.17. Version 0.17 contains a complete overhaul of the configuration system. For update instructions, see the [release notes for v0.17.0](https://github.com/vicinaehq/vicinae/releases/tag/v0.17.0) and the [upstream configuration documentation](https://docs.vicinae.com/config). +- The `man-pages` package's outputs have been split. The manual pages are installed into the `man` output, which is installed by default. Binaries (including `diffman-git`, `mansect`, `pdfman`, and `sortman`) are installed into the `out` output, which is not installed by default. + - All Log4Shell vulnerability scanners were removed, as they were all unmaintained upstream and are no longer relevant given that the vulnerability has been fixed upstream for several years. - Plugins for the JetBrains IDEs have been removed from Nixpkgs. diff --git a/pkgs/by-name/ma/man-pages/package.nix b/pkgs/by-name/ma/man-pages/package.nix index a27a8d3b9539..251b5002bd13 100644 --- a/pkgs/by-name/ma/man-pages/package.nix +++ b/pkgs/by-name/ma/man-pages/package.nix @@ -12,6 +12,15 @@ stdenv.mkDerivation (finalAttrs: { pname = "man-pages"; version = "6.17"; + # `man` is first: most people installing `man-pages` want man pages. + # The binaries could be split to a seperate package (as upstream suggests), + # but storing in a seperate not-installed-by-default output is easier, + # and has a similar effect. + outputs = [ + "man" + "out" + ]; + src = fetchurl { url = "mirror://kernel/linux/docs/man-pages/man-pages-${finalAttrs.version}.tar.xz"; hash = "sha256-0Y8hpgKwl3ilqQlr8b6EQbdzPpmBUEdKzPcD0WX06/Q="; @@ -31,6 +40,8 @@ stdenv.mkDerivation (finalAttrs: { "-R" "VERSION=${finalAttrs.version}" "prefix=${placeholder "out"}" + "bindir=${placeholder "out"}/bin" + "mandir=${placeholder "man"}/share/man" ]; preConfigure = '' @@ -48,7 +59,7 @@ stdenv.mkDerivation (finalAttrs: { # Check for a few well-known man pages for page in ldd write printf null hosts random ld.so; do - man -M "$out/share/man" -P cat "$page" >/dev/null + man -M "$man/share/man" -P cat "$page" >/dev/null done runHook postInstallCheck @@ -60,10 +71,17 @@ stdenv.mkDerivation (finalAttrs: { meta = { description = "Linux development manual pages"; + longDescription = '' + This package provides the manual pages in its "man" output, + and various utility programs in its "out" output. + + Only the "man" output is installed by default. + ''; homepage = "https://www.kernel.org/doc/man-pages/"; license = lib.licenses.gpl2Plus; maintainers = with lib.maintainers; [ mdaniels5757 ]; platforms = lib.platforms.unix; + outputsToInstall = [ "man" ]; priority = 30; # if a package comes with its own man page, prefer it }; })