at 18.09-beta 1.6 kB view raw
1{ lib 2, buildPythonPackage 3, fetchPypi 4, pytest 5, simplejson 6, mock 7, glibcLocales 8, html5lib 9, pythonOlder 10, enum34 11, python 12, docutils 13, jinja2 14, pygments 15, alabaster 16, Babel 17, snowballstemmer 18, six 19, sqlalchemy 20, whoosh 21, imagesize 22, requests 23, sphinxcontrib-websupport 24, typing 25}: 26 27buildPythonPackage rec { 28 pname = "Sphinx"; 29 version = "1.7.8"; 30 src = fetchPypi { 31 inherit pname version; 32 sha256 = "a07050845cc9a2f4026a6035cc8ed795a5ce7be6528bbc82032385c10807dfe7"; 33 }; 34 LC_ALL = "en_US.UTF-8"; 35 36 checkInputs = [ pytest ]; 37 buildInputs = [ simplejson mock glibcLocales html5lib ] ++ lib.optional (pythonOlder "3.4") enum34; 38 # Disable two tests that require network access. 39 checkPhase = '' 40 cd tests; ${python.interpreter} run.py --ignore py35 -k 'not test_defaults and not test_anchors_ignored' 41 ''; 42 propagatedBuildInputs = [ 43 docutils 44 jinja2 45 pygments 46 alabaster 47 Babel 48 snowballstemmer 49 six 50 sqlalchemy 51 whoosh 52 imagesize 53 requests 54 sphinxcontrib-websupport 55 ] ++ lib.optional (pythonOlder "3.5") typing; 56 57 # Lots of tests. Needs network as well at some point. 58 doCheck = false; 59 60 # https://github.com/NixOS/nixpkgs/issues/22501 61 # Do not run `python sphinx-build arguments` but `sphinx-build arguments`. 62 postPatch = '' 63 substituteInPlace sphinx/make_mode.py --replace "sys.executable, " "" 64 ''; 65 66 meta = { 67 description = "A tool that makes it easy to create intelligent and beautiful documentation for Python projects"; 68 homepage = http://sphinx.pocoo.org/; 69 license = lib.licenses.bsd3; 70 maintainers = with lib.maintainers; [ nand0p ]; 71 }; 72}