diff --git a/doc/release-notes/rl-2605.section.md b/doc/release-notes/rl-2605.section.md index 7f9f5fb9858f..d7f2eeb58473 100644 --- a/doc/release-notes/rl-2605.section.md +++ b/doc/release-notes/rl-2605.section.md @@ -121,6 +121,8 @@ - `vicinae` has been updated to v0.20. This includes, among several other breaking changes, a complete overhaul of the configuration system. For update instructions, see the [upstream configuration documentation](https://docs.vicinae.com/config#migration-from-v0-16-x-to-v0-17-x). +- 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/nixos/tests/man.nix b/nixos/tests/man.nix index 14ed255f116d..69881acac0f7 100644 --- a/nixos/tests/man.nix +++ b/nixos/tests/man.nix @@ -88,6 +88,8 @@ in ${machine}.succeed("man 3 libunwind > /dev/null") # NixOS configuration man page is installed ${machine}.succeed("man configuration.nix > /dev/null") + # Linux `man-pages` work + ${machine}.succeed("man 5 proc_vmstat > /dev/null") with subtest("Test generateCaches via man -k in ${machine}"): expected = [ @@ -97,6 +99,7 @@ in ("user", "userdel", 8), ("mem", "free", 3), ("mem", "free", 1), + ("statistics", "proc_vmstat", 5), ] for (keyword, page, section) in expected: diff --git a/pkgs/by-name/ma/man-pages/package.nix b/pkgs/by-name/ma/man-pages/package.nix index 6aa04f9e6baa..b8427e1ac992 100644 --- a/pkgs/by-name/ma/man-pages/package.nix +++ b/pkgs/by-name/ma/man-pages/package.nix @@ -6,15 +6,25 @@ gawk, man, pcre2, + nixosTests, }: stdenv.mkDerivation (finalAttrs: { pname = "man-pages"; - version = "6.16"; + 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-jiR6vXXNgICc/ghpbIG4xwaQWDsEV0lISyQvtDYx16M="; + hash = "sha256-0Y8hpgKwl3ilqQlr8b6EQbdzPpmBUEdKzPcD0WX06/Q="; }; nativeInstallCheckInputs = [ @@ -31,6 +41,8 @@ stdenv.mkDerivation (finalAttrs: { "-R" "VERSION=${finalAttrs.version}" "prefix=${placeholder "out"}" + "bindir=${placeholder "out"}/bin" + "mandir=${placeholder "man"}/share/man" ]; preConfigure = '' @@ -46,24 +58,34 @@ stdenv.mkDerivation (finalAttrs: { installCheckPhase = '' runHook preInstallCheck - # Check for a few well‐known man pages + # 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 ''; - passthru.updateScript = directoryListingUpdater { - url = "https://www.kernel.org/pub/linux/docs/man-pages/"; + passthru = { + tests = { inherit (nixosTests) man; }; + updateScript = directoryListingUpdater { + url = "https://www.kernel.org/pub/linux/docs/man-pages/"; + }; }; 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 }; })