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