lol
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

nginx-doc-unstable: init at 2022-05-05

Build documentation of nginx (which is maintained separately from webserver
itself) and make it available both as "nginx-doc" attribute and as "doc" output
of "nginx" derivation.

+45 -41
+40
pkgs/data/documentation/nginx-doc/default.nix
··· 1 + { lib, stdenv, libxml2, libxslt, fetchhg }: 2 + 3 + # Upstream maintains documentation (sources of https://nginx.org) in separate 4 + # mercurial repository, which do not correspond to particular git commit, but at 5 + # least has "introduced in version X.Y" comments. 6 + # 7 + # In other words, documentation does not necessary matches capabilities of 8 + # $out/bin/nginx, but we have no better options. 9 + stdenv.mkDerivation { 10 + pname = "nginx-doc-unstable"; 11 + version = "2022-05-05"; 12 + src = fetchhg { 13 + url = "https://hg.nginx.org/nginx.org"; 14 + rev = "a3aee2697d4e"; 15 + sha256 = "029n4mnmjw94h01qalmjgf1c2h3h7wm798xv5knk3padxiy4m28b"; 16 + }; 17 + patches = [ ./exclude-google-analytics.patch ]; 18 + nativeBuildInputs = [ libxslt libxml2 ]; 19 + 20 + # Generated documentation is not local-friendly, since it assumes that link to directory 21 + # is the same as link to index.html in that directory, which is not how browsers behave 22 + # with local filesystem. 23 + # 24 + # TODO: patch all relative links that do not end with .html. 25 + 26 + # /en subdirectory must exist, relative links expect it. 27 + installPhase = '' 28 + mkdir -p $out/share/doc/nginx 29 + mv libxslt/en $out/share/doc/nginx 30 + ''; 31 + 32 + meta = with lib; { 33 + description = "A reverse proxy and lightweight webserver (documentation)"; 34 + homepage = "https://nginx.org/"; 35 + license = licenses.bsd2; 36 + platforms = platforms.all; 37 + priority = 6; 38 + maintainers = with maintainers; [ kaction ]; 39 + }; 40 + }
+3 -41
pkgs/servers/http/nginx/generic.nix
··· 1 - { lib, stdenv, fetchurl, fetchpatch, openssl, zlib, pcre, libxml2, libxslt 2 - , fetchhg 1 + outer@{ lib, stdenv, fetchurl, fetchpatch, openssl, zlib, pcre, libxml2, libxslt 2 + , nginx-doc 3 3 4 4 , nixosTests 5 5 , substituteAll, gd, geoip, perl ··· 17 17 , nginxVersion ? version 18 18 , src ? null # defaults to upstream nginx ${version} 19 19 , sha256 ? null # when not specifying src 20 - 21 - # Upstream maintains documentation (sources of https://nginx.org) in separate 22 - # mercurial repository, which do not correspond to particular git commit, but at 23 - # least has "introduced in version X.Y" comments. 24 - # 25 - # In other words, documentation does not necessary matches capabilities of 26 - # $out/bin/nginx, but we have no better options. 27 - , srcDoc ? fetchhg { 28 - url = "https://hg.nginx.org/nginx.org"; 29 - sha256 = "029n4mnmjw94h01qalmjgf1c2h3h7wm798xv5knk3padxiy4m28b"; 30 - rev = "a3aee2697d4e"; 31 - } 32 - , extraPatchesDoc ? [ ./nginx-doc.patch ] 33 20 , configureFlags ? [] 34 21 , buildInputs ? [] 35 22 , extraPatches ? [] ··· 51 38 in 52 39 if supports nginxVersion then mod.${attrPath} or [] 53 40 else throw "Module at ${toString mod.src} does not support nginx version ${nginxVersion}!"); 54 - 55 - # Output of this derivation is copied into $doc of resulting nginx to save on 56 - # building time, since we have multiple nginx versions, but only one version 57 - # of documentation. 58 - # 59 - # As such, this derivation never appears in user profile, so its name and 60 - # compliance to conventions is not important. 61 - documentation = stdenv.mkDerivation { 62 - name = "nginx-doc"; 63 - src = srcDoc; 64 - patches = extraPatchesDoc; 65 - nativeBuildInputs = [ libxslt libxml2 ]; 66 - 67 - # Generated documentation is not local-friendly, since it assumes that link to directory 68 - # is the same as link to index.html in that directory, which is not how browsers behave 69 - # with local filesystem. 70 - # 71 - # TODO: patch all relative links that do not end with .html. 72 - 73 - # /en subdirectory must exist, relative links expect it. 74 - installPhase = '' 75 - mkdir -p $out/share/doc/nginx 76 - mv libxslt/en $out/share/doc/nginx 77 - ''; 78 - }; 79 41 80 42 in 81 43 ··· 193 155 194 156 preInstall = '' 195 157 mkdir -p $doc 196 - cp -r ${documentation}/* $doc 158 + cp -r ${nginx-doc}/* $doc 197 159 ''; 198 160 199 161 postInstall = if postInstall != null then postInstall else ''
pkgs/servers/http/nginx/nginx-doc.patch pkgs/data/documentation/nginx-doc/exclude-google-analytics.patch
+2
pkgs/top-level/all-packages.nix
··· 21984 21984 21985 21985 nginx = nginxStable; 21986 21986 21987 + nginx-doc = callPackage ../data/documentation/nginx-doc { }; 21988 + 21987 21989 nginxQuic = callPackage ../servers/http/nginx/quic.nix { 21988 21990 zlib = zlib-ng.override { withZlibCompat = true; }; 21989 21991 withPerl = false;