From c814bbda40c688a205050937ade1deb67887efee Mon Sep 17 00:00:00 2001 From: Sergei Trofimovich Date: Mon, 2 Oct 2023 21:31:50 +0100 Subject: [PATCH] nginx: add missing nginx.8 manpage Without the change "man nginx" does not render any synopsis. Closes: https://github.com/NixOS/nixpkgs/issues/258658 --- pkgs/servers/http/nginx/generic.nix | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/pkgs/servers/http/nginx/generic.nix b/pkgs/servers/http/nginx/generic.nix index 3db19396bee9..1f175c03d8a8 100644 --- a/pkgs/servers/http/nginx/generic.nix +++ b/pkgs/servers/http/nginx/generic.nix @@ -2,7 +2,7 @@ outer@{ lib, stdenv, fetchurl, fetchpatch, openssl, zlib, pcre, libxml2, libxslt , nginx-doc , nixosTests -, substituteAll, removeReferencesTo, gd, geoip, perl +, installShellFiles, substituteAll, removeReferencesTo, gd, geoip, perl , withDebug ? false , withKTLS ? false , withStream ? true @@ -51,15 +51,17 @@ assert lib.assertMsg (lib.unique moduleNames == moduleNames) stdenv.mkDerivation { inherit pname version nginxVersion; - outputs = ["out" "doc"]; + outputs = [ "out" "doc" ]; src = if src != null then src else fetchurl { url = "https://nginx.org/download/nginx-${version}.tar.gz"; inherit hash; }; - nativeBuildInputs = [ removeReferencesTo ] - ++ nativeBuildInputs; + nativeBuildInputs = [ + installShellFiles + removeReferencesTo + ] ++ nativeBuildInputs; buildInputs = [ openssl zlib pcre libxml2 libxslt gd geoip perl ] ++ buildInputs @@ -166,6 +168,12 @@ stdenv.mkDerivation { preInstall = '' mkdir -p $doc cp -r ${nginx-doc}/* $doc + + # TODO: make it unconditional when `openresty` and `nginx` are not + # sharing this code. + if [[ -e man/nginx.8 ]]; then + installManPage man/nginx.8 + fi ''; disallowedReferences = map (m: m.src) modules;