From 266f40a5ccf5ce7ab6b211c42cb237c1be2493b2 Mon Sep 17 00:00:00 2001 From: Sergei Trofimovich Date: Wed, 1 May 2024 22:04:05 +0100 Subject: [PATCH] man-pages: restore `$out/bin` to fix `nix-shell -p man-pages` `man 5 manpath` says that `PATH` is a default variable used to populate manpages search path. Without the change the following session does not work: $ nix-shell -p man-pages $$ man x25 No manual entry for x25 Reported in https://github.com/NixOS/nixpkgs/pull/300797#issuecomment-2088956037 --- pkgs/data/documentation/man-pages/default.nix | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/pkgs/data/documentation/man-pages/default.nix b/pkgs/data/documentation/man-pages/default.nix index deb6a4005f666..3bb5c3b1d18c5 100644 --- a/pkgs/data/documentation/man-pages/default.nix +++ b/pkgs/data/documentation/man-pages/default.nix @@ -21,6 +21,14 @@ stdenv.mkDerivation rec { enableParallelInstalling = true; + postInstall = '' + # The manpath executable looks up manpages from PATH. And this package won't + # appear in PATH unless it has a /bin folder. Without the change + # 'nix-shell -p man-pages' does not pull in the search paths. + # See 'man 5 manpath' for the lookup order. + mkdir -p $out/bin + ''; + meta = with lib; { description = "Linux development manual pages"; homepage = "https://www.kernel.org/doc/man-pages/";