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.
···11+{ lib, stdenv, libxml2, libxslt, fetchhg }:
22+33+# Upstream maintains documentation (sources of https://nginx.org) in separate
44+# mercurial repository, which do not correspond to particular git commit, but at
55+# least has "introduced in version X.Y" comments.
66+#
77+# In other words, documentation does not necessary matches capabilities of
88+# $out/bin/nginx, but we have no better options.
99+stdenv.mkDerivation {
1010+ pname = "nginx-doc-unstable";
1111+ version = "2022-05-05";
1212+ src = fetchhg {
1313+ url = "https://hg.nginx.org/nginx.org";
1414+ rev = "a3aee2697d4e";
1515+ sha256 = "029n4mnmjw94h01qalmjgf1c2h3h7wm798xv5knk3padxiy4m28b";
1616+ };
1717+ patches = [ ./exclude-google-analytics.patch ];
1818+ nativeBuildInputs = [ libxslt libxml2 ];
1919+2020+ # Generated documentation is not local-friendly, since it assumes that link to directory
2121+ # is the same as link to index.html in that directory, which is not how browsers behave
2222+ # with local filesystem.
2323+ #
2424+ # TODO: patch all relative links that do not end with .html.
2525+2626+ # /en subdirectory must exist, relative links expect it.
2727+ installPhase = ''
2828+ mkdir -p $out/share/doc/nginx
2929+ mv libxslt/en $out/share/doc/nginx
3030+ '';
3131+3232+ meta = with lib; {
3333+ description = "A reverse proxy and lightweight webserver (documentation)";
3434+ homepage = "https://nginx.org/";
3535+ license = licenses.bsd2;
3636+ platforms = platforms.all;
3737+ priority = 6;
3838+ maintainers = with maintainers; [ kaction ];
3939+ };
4040+}
+3-41
pkgs/servers/http/nginx/generic.nix
···11-{ lib, stdenv, fetchurl, fetchpatch, openssl, zlib, pcre, libxml2, libxslt
22-, fetchhg
11+outer@{ lib, stdenv, fetchurl, fetchpatch, openssl, zlib, pcre, libxml2, libxslt
22+, nginx-doc
3344, nixosTests
55, substituteAll, gd, geoip, perl
···1717, nginxVersion ? version
1818, src ? null # defaults to upstream nginx ${version}
1919, sha256 ? null # when not specifying src
2020-2121-# Upstream maintains documentation (sources of https://nginx.org) in separate
2222-# mercurial repository, which do not correspond to particular git commit, but at
2323-# least has "introduced in version X.Y" comments.
2424-#
2525-# In other words, documentation does not necessary matches capabilities of
2626-# $out/bin/nginx, but we have no better options.
2727-, srcDoc ? fetchhg {
2828- url = "https://hg.nginx.org/nginx.org";
2929- sha256 = "029n4mnmjw94h01qalmjgf1c2h3h7wm798xv5knk3padxiy4m28b";
3030- rev = "a3aee2697d4e";
3131- }
3232-, extraPatchesDoc ? [ ./nginx-doc.patch ]
3320, configureFlags ? []
3421, buildInputs ? []
3522, extraPatches ? []
···5138 in
5239 if supports nginxVersion then mod.${attrPath} or []
5340 else throw "Module at ${toString mod.src} does not support nginx version ${nginxVersion}!");
5454-5555- # Output of this derivation is copied into $doc of resulting nginx to save on
5656- # building time, since we have multiple nginx versions, but only one version
5757- # of documentation.
5858- #
5959- # As such, this derivation never appears in user profile, so its name and
6060- # compliance to conventions is not important.
6161- documentation = stdenv.mkDerivation {
6262- name = "nginx-doc";
6363- src = srcDoc;
6464- patches = extraPatchesDoc;
6565- nativeBuildInputs = [ libxslt libxml2 ];
6666-6767- # Generated documentation is not local-friendly, since it assumes that link to directory
6868- # is the same as link to index.html in that directory, which is not how browsers behave
6969- # with local filesystem.
7070- #
7171- # TODO: patch all relative links that do not end with .html.
7272-7373- # /en subdirectory must exist, relative links expect it.
7474- installPhase = ''
7575- mkdir -p $out/share/doc/nginx
7676- mv libxslt/en $out/share/doc/nginx
7777- '';
7878- };
79418042in
8143···193155194156 preInstall = ''
195157 mkdir -p $doc
196196- cp -r ${documentation}/* $doc
158158+ cp -r ${nginx-doc}/* $doc
197159 '';
198160199161 postInstall = if postInstall != null then postInstall else ''