Unverified Commit 5f99f468 authored by Michael Daniels's avatar Michael Daniels Committed by GitHub
Browse files

man-pages: 6.16 -> 6.17, split outputs, add passthru test (#490910)

parents 4a039c0c ece35c6a
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -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.
+3 −0
Original line number Diff line number Diff line
@@ -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:
+28 −6
Original line number Diff line number Diff line
@@ -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 wellknown 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 {
  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
  };
})