1{ lib 2, buildPythonPackage 3, fetchFromGitHub 4, fetchpatch 5, pythonImportsCheckHook 6, sphinx 7, sphinxHook 8, sphinx-autoapi 9, sphinx-rtd-theme 10, sphinx-tabs 11, sphinx-prompt 12, sphinxemoji 13}: 14 15# Latest tagged release release "1.1.2" (Nov 2018) does not contain 16# documenation, it was added in commits Aug 10, 2019. Repository does not have 17# any activity since then. 18buildPythonPackage { 19 pname = "sphinx-version-warning"; 20 version = "unstable-2019-08-10"; 21 format = "pyproject"; 22 23 outputs = [ "out" "doc" ]; 24 25 src = fetchFromGitHub { 26 owner = "humitos"; 27 repo = "sphinx-version-warning"; 28 rev = "a82156c2ea08e5feab406514d0ccd9d48a345f48"; 29 hash = "sha256-WnJYMk1gPLT0dBn7lmxVDNVkLYkDCgQOtM9fQ3kc6k0="; 30 }; 31 32 # It tries to write to file relative to it own location at runtime 33 # and gets permission denied, since Nix store is immutable. 34 patches = [ 35 (fetchpatch { 36 url = "https://github.com/humitos/sphinx-version-warning/commit/cb1b47becf2a0d3b2570ca9929f42f7d7e472b6f.patch"; 37 hash = "sha256-Vj0QAHIBmc0VxE+TTmJePzvr5nc45Sn2qqM+C/pkgtM="; 38 }) 39 ]; 40 41 nativeBuildInputs = [ 42 pythonImportsCheckHook 43 sphinxHook 44 sphinx-autoapi 45 sphinx-rtd-theme 46 sphinx-tabs 47 sphinx-prompt 48 sphinxemoji 49 ]; 50 51 propagatedBuildInputs = [ sphinx ]; 52 53 pythonImportsCheck = [ "versionwarning" ]; 54 55 meta = with lib; { 56 description = "A sphinx extension to show a warning banner at the top of your documentation"; 57 homepage = "https://github.com/humitos/sphinx-version-warning"; 58 license = licenses.mit; 59 maintainers = with maintainers; [ kaction ]; 60 }; 61}