Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at netboot-syslinux-multiplatform 40 lines 1.4 kB view raw
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. 9stdenv.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}