at 18.03-beta 1.7 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 name = "${pname}-${version}"; 29 pname = "Sphinx"; 30 version = "1.7.0"; 31 src = fetchPypi { 32 inherit pname version; 33 sha256 = "278b7923f3f4ed2a1d1359f0ae94d89ac90ddd4189e8362f4b4d3baa2afe6b4a"; 34 }; 35 LC_ALL = "en_US.UTF-8"; 36 37 checkInputs = [ pytest ]; 38 buildInputs = [ simplejson mock glibcLocales html5lib ] ++ lib.optional (pythonOlder "3.4") enum34; 39 # Disable two tests that require network access. 40 checkPhase = '' 41 cd tests; ${python.interpreter} run.py --ignore py35 -k 'not test_defaults and not test_anchors_ignored' 42 ''; 43 propagatedBuildInputs = [ 44 docutils 45 jinja2 46 pygments 47 alabaster 48 Babel 49 snowballstemmer 50 six 51 sqlalchemy 52 whoosh 53 imagesize 54 requests 55 sphinxcontrib-websupport 56 ] ++ lib.optional (pythonOlder "3.5") typing; 57 58 # Lots of tests. Needs network as well at some point. 59 doCheck = false; 60 61 # https://github.com/NixOS/nixpkgs/issues/22501 62 # Do not run `python sphinx-build arguments` but `sphinx-build arguments`. 63 postPatch = '' 64 substituteInPlace sphinx/make_mode.py --replace "sys.executable, " "" 65 ''; 66 67 meta = { 68 description = "A tool that makes it easy to create intelligent and beautiful documentation for Python projects"; 69 homepage = http://sphinx.pocoo.org/; 70 license = lib.licenses.bsd3; 71 maintainers = with lib.maintainers; [ nand0p ]; 72 }; 73}