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