git.iko.soy/typeable/nixpkgs
on master help sign in
python.pkgs.sphinx: move expression
commit026b60e49e933d2093dab105734b38817ba8e93e authorFrederik Rietdijk <fridh@fridh.nl> dateSat 12 Aug 2017, 08:55 (9 years ago) parente227aac
2 files changed+67−43
pkgs/development/python-modules/sphinx/default.nix+65 pkgs/top-level/python-packages.nix+2−43
pkgs/development/python-modules/sphinx/default.nixnew file+65
@@ -0,0 +1,65 @@
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+}:
24+
25+buildPythonPackage rec {
26+ name = "${pname}-${version}";
27+ pname = "Sphinx";
28+ version = "1.5.2";
29+ src = fetchPypi {
30+ inherit pname version;
31+ sha256 = "049c48393909e4704a6ed4de76fd39c8622e165414660bfb767e981e7931c722";
32+ };
33+ LC_ALL = "en_US.UTF-8";
34+ buildInputs = [ pytest simplejson mock glibcLocales html5lib ] ++ lib.optional (pythonOlder "3.4") enum34;
35+ # Disable two tests that require network access.
36+ checkPhase = ''
37+ cd tests; ${python.interpreter} run.py --ignore py35 -k 'not test_defaults and not test_anchors_ignored'
38+ '';
39+ propagatedBuildInputs = [
40+ docutils
41+ jinja2
42+ pygments
43+ alabaster
44+ Babel
45+ snowballstemmer
46+ six
47+ sqlalchemy
48+ whoosh
49+ imagesize
50+ requests
51+ ];
52+
53+ # https://github.com/NixOS/nixpkgs/issues/22501
54+ # Do not run `python sphinx-build arguments` but `sphinx-build arguments`.
55+ postPatch = ''
56+ substituteInPlace sphinx/make_mode.py --replace "sys.executable, " ""
57+ '';
58+
59+ meta = {
60+ description = "A tool that makes it easy to create intelligent and beautiful documentation for Python projects";
61+ homepage = http://sphinx.pocoo.org/;
62+ license = lib.licenses.bsd3;
63+ maintainers = with lib.maintainers; [ nand0p ];
64+ };
65+}
pkgs/top-level/python-packages.nix+2−43
@@ -22202,50 +22202,9 @@ in {
2220222202 };
2220322203 });
2220422204
22205− sphinx = buildPythonPackage (rec {
22206− name = "${pname}-${version}";
22207− pname = "Sphinx";
22208− version = "1.5.2";
22209− src = fetchPypi {
22210− inherit pname version;
22211− sha256 = "049c48393909e4704a6ed4de76fd39c8622e165414660bfb767e981e7931c722";
22212− };
22213− LC_ALL = "en_US.UTF-8";
22214− buildInputs = with self; [ pytest simplejson mock pkgs.glibcLocales html5lib ] ++ optional (pythonOlder "3.4") self.enum34;
22215− # Disable two tests that require network access.
22216− checkPhase = ''
22217− cd tests; ${python.interpreter} run.py --ignore py35 -k 'not test_defaults and not test_anchors_ignored'
22218− '';
22219− propagatedBuildInputs = with self; [
22220− docutils
22221− jinja2
22222− pygments
22223− alabaster
22224− Babel
22225− snowballstemmer
22226− six
22227− sqlalchemy
22228− whoosh
22229− imagesize
22230− requests
22231− ];
22232−
22233− # https://github.com/NixOS/nixpkgs/issues/22501
22234− # Do not run `python sphinx-build arguments` but `sphinx-build arguments`.
22235− postPatch = ''
22236− substituteInPlace sphinx/make_mode.py --replace "sys.executable, " ""
22237− '';
22238−
22239− meta = {
22240− description = "A tool that makes it easy to create intelligent and beautiful documentation for Python projects";
22241− homepage = http://sphinx.pocoo.org/;
22242− license = licenses.bsd3;
22243− maintainers = with maintainers; [ nand0p ];
22244− platforms = platforms.all;
22245− };
22246− });
22205+ sphinx = callPackage ../development/python-modules/sphinx { };
2224722206
22248− sphinx_1_2 = self.sphinx.override rec {
22207+ sphinx_1_2 = self.sphinx.overridePythonPackage rec {
2224922208 name = "sphinx-1.2.3";
2225022209 src = pkgs.fetchurl {
2225122210 url = "mirror://pypi/s/sphinx/sphinx-1.2.3.tar.gz";