Show More
@@ -1,159 +1,165 b'' | |||||
1 | # Overrides for the generated python-packages.nix |
|
1 | # Overrides for the generated python-packages.nix | |
2 | # |
|
2 | # | |
3 | # This function is intended to be used as an extension to the generated file |
|
3 | # This function is intended to be used as an extension to the generated file | |
4 | # python-packages.nix. The main objective is to add needed dependencies of C |
|
4 | # python-packages.nix. The main objective is to add needed dependencies of C | |
5 | # libraries and tweak the build instructions where needed. |
|
5 | # libraries and tweak the build instructions where needed. | |
6 |
|
6 | |||
7 | { pkgs, basePythonPackages }: |
|
7 | { pkgs, basePythonPackages }: | |
8 |
|
8 | |||
9 | let |
|
9 | let | |
10 | sed = "sed -i"; |
|
10 | sed = "sed -i"; | |
11 | in |
|
11 | in | |
12 |
|
12 | |||
13 | self: super: { |
|
13 | self: super: { | |
14 |
|
14 | |||
15 | gnureadline = super.gnureadline.override (attrs: { |
|
15 | gnureadline = super.gnureadline.override (attrs: { | |
16 | buildInputs = attrs.buildInputs ++ [ |
|
16 | buildInputs = attrs.buildInputs ++ [ | |
17 | pkgs.ncurses |
|
17 | pkgs.ncurses | |
18 | ]; |
|
18 | ]; | |
19 | patchPhase = '' |
|
19 | patchPhase = '' | |
20 | substituteInPlace setup.py --replace "/bin/bash" "${pkgs.bash}/bin/bash" |
|
20 | substituteInPlace setup.py --replace "/bin/bash" "${pkgs.bash}/bin/bash" | |
21 | ''; |
|
21 | ''; | |
22 | }); |
|
22 | }); | |
23 |
|
23 | |||
24 | gunicorn = super.gunicorn.override (attrs: { |
|
24 | gunicorn = super.gunicorn.override (attrs: { | |
25 | propagatedBuildInputs = attrs.propagatedBuildInputs ++ [ |
|
25 | propagatedBuildInputs = attrs.propagatedBuildInputs ++ [ | |
26 | # johbo: futures is needed as long as we are on Python 2, otherwise |
|
26 | # johbo: futures is needed as long as we are on Python 2, otherwise | |
27 | # gunicorn explodes if used with multiple threads per worker. |
|
27 | # gunicorn explodes if used with multiple threads per worker. | |
28 | self.futures |
|
28 | self.futures | |
29 | ]; |
|
29 | ]; | |
30 | }); |
|
30 | }); | |
31 |
|
31 | |||
|
32 | ipython = super.ipython.override (attrs: { | |||
|
33 | propagatedBuildInputs = attrs.propagatedBuildInputs ++ [ | |||
|
34 | self.gnureadline | |||
|
35 | ]; | |||
|
36 | }); | |||
|
37 | ||||
32 | kombu = super.kombu.override (attrs: { |
|
38 | kombu = super.kombu.override (attrs: { | |
33 | # The current version of kombu needs some patching to work with the |
|
39 | # The current version of kombu needs some patching to work with the | |
34 | # other libs. Should be removed once we update celery and kombu. |
|
40 | # other libs. Should be removed once we update celery and kombu. | |
35 | patches = [ |
|
41 | patches = [ | |
36 | ./patch-kombu-py-2-7-11.diff |
|
42 | ./patch-kombu-py-2-7-11.diff | |
37 | ./patch-kombu-msgpack.diff |
|
43 | ./patch-kombu-msgpack.diff | |
38 | ]; |
|
44 | ]; | |
39 | }); |
|
45 | }); | |
40 |
|
46 | |||
41 | lxml = super.lxml.override (attrs: { |
|
47 | lxml = super.lxml.override (attrs: { | |
42 | buildInputs = with self; [ |
|
48 | buildInputs = with self; [ | |
43 | pkgs.libxml2 |
|
49 | pkgs.libxml2 | |
44 | pkgs.libxslt |
|
50 | pkgs.libxslt | |
45 | ]; |
|
51 | ]; | |
46 | }); |
|
52 | }); | |
47 |
|
53 | |||
48 | MySQL-python = super.MySQL-python.override (attrs: { |
|
54 | MySQL-python = super.MySQL-python.override (attrs: { | |
49 | buildInputs = attrs.buildInputs ++ [ |
|
55 | buildInputs = attrs.buildInputs ++ [ | |
50 | pkgs.openssl |
|
56 | pkgs.openssl | |
51 | ]; |
|
57 | ]; | |
52 | propagatedBuildInputs = attrs.propagatedBuildInputs ++ [ |
|
58 | propagatedBuildInputs = attrs.propagatedBuildInputs ++ [ | |
53 | pkgs.mysql.lib |
|
59 | pkgs.mysql.lib | |
54 | pkgs.zlib |
|
60 | pkgs.zlib | |
55 | ]; |
|
61 | ]; | |
56 | }); |
|
62 | }); | |
57 |
|
63 | |||
58 | psutil = super.psutil.override (attrs: { |
|
64 | psutil = super.psutil.override (attrs: { | |
59 | buildInputs = attrs.buildInputs ++ |
|
65 | buildInputs = attrs.buildInputs ++ | |
60 | pkgs.lib.optional pkgs.stdenv.isDarwin pkgs.darwin.IOKit; |
|
66 | pkgs.lib.optional pkgs.stdenv.isDarwin pkgs.darwin.IOKit; | |
61 | }); |
|
67 | }); | |
62 |
|
68 | |||
63 | psycopg2 = super.psycopg2.override (attrs: { |
|
69 | psycopg2 = super.psycopg2.override (attrs: { | |
64 | buildInputs = attrs.buildInputs ++ |
|
70 | buildInputs = attrs.buildInputs ++ | |
65 | pkgs.lib.optional pkgs.stdenv.isDarwin pkgs.openssl; |
|
71 | pkgs.lib.optional pkgs.stdenv.isDarwin pkgs.openssl; | |
66 | propagatedBuildInputs = attrs.propagatedBuildInputs ++ [ |
|
72 | propagatedBuildInputs = attrs.propagatedBuildInputs ++ [ | |
67 | pkgs.postgresql |
|
73 | pkgs.postgresql | |
68 | ]; |
|
74 | ]; | |
69 | }); |
|
75 | }); | |
70 |
|
76 | |||
71 | pycurl = super.pycurl.override (attrs: { |
|
77 | pycurl = super.pycurl.override (attrs: { | |
72 | propagatedBuildInputs = attrs.propagatedBuildInputs ++ [ |
|
78 | propagatedBuildInputs = attrs.propagatedBuildInputs ++ [ | |
73 | pkgs.curl |
|
79 | pkgs.curl | |
74 | pkgs.openssl |
|
80 | pkgs.openssl | |
75 | ]; |
|
81 | ]; | |
76 | preConfigure = '' |
|
82 | preConfigure = '' | |
77 | substituteInPlace setup.py --replace '--static-libs' '--libs' |
|
83 | substituteInPlace setup.py --replace '--static-libs' '--libs' | |
78 | export PYCURL_SSL_LIBRARY=openssl |
|
84 | export PYCURL_SSL_LIBRARY=openssl | |
79 | ''; |
|
85 | ''; | |
80 | }); |
|
86 | }); | |
81 |
|
87 | |||
82 | Pylons = super.Pylons.override (attrs: { |
|
88 | Pylons = super.Pylons.override (attrs: { | |
83 | name = "Pylons-1.0.1-patch1"; |
|
89 | name = "Pylons-1.0.1-patch1"; | |
84 | src = pkgs.fetchgit { |
|
90 | src = pkgs.fetchgit { | |
85 | url = "https://code.rhodecode.com/upstream/pylons"; |
|
91 | url = "https://code.rhodecode.com/upstream/pylons"; | |
86 | rev = "707354ee4261b9c10450404fc9852ccea4fd667d"; |
|
92 | rev = "707354ee4261b9c10450404fc9852ccea4fd667d"; | |
87 | sha256 = "b2763274c2780523a335f83a1df65be22ebe4ff413a7bc9e9288d23c1f62032e"; |
|
93 | sha256 = "b2763274c2780523a335f83a1df65be22ebe4ff413a7bc9e9288d23c1f62032e"; | |
88 | }; |
|
94 | }; | |
89 | }); |
|
95 | }); | |
90 |
|
96 | |||
91 | pyramid = super.pyramid.override (attrs: { |
|
97 | pyramid = super.pyramid.override (attrs: { | |
92 | postFixup = '' |
|
98 | postFixup = '' | |
93 | wrapPythonPrograms |
|
99 | wrapPythonPrograms | |
94 | # TODO: johbo: "wrapPython" adds this magic line which |
|
100 | # TODO: johbo: "wrapPython" adds this magic line which | |
95 | # confuses pserve. |
|
101 | # confuses pserve. | |
96 | ${sed} '/import sys; sys.argv/d' $out/bin/.pserve-wrapped |
|
102 | ${sed} '/import sys; sys.argv/d' $out/bin/.pserve-wrapped | |
97 | ''; |
|
103 | ''; | |
98 | }); |
|
104 | }); | |
99 |
|
105 | |||
100 | Pyro4 = super.Pyro4.override (attrs: { |
|
106 | Pyro4 = super.Pyro4.override (attrs: { | |
101 | # TODO: Was not able to generate this version, needs further |
|
107 | # TODO: Was not able to generate this version, needs further | |
102 | # investigation. |
|
108 | # investigation. | |
103 | name = "Pyro4-4.35"; |
|
109 | name = "Pyro4-4.35"; | |
104 | src = pkgs.fetchurl { |
|
110 | src = pkgs.fetchurl { | |
105 | url = "https://pypi.python.org/packages/source/P/Pyro4/Pyro4-4.35.src.tar.gz"; |
|
111 | url = "https://pypi.python.org/packages/source/P/Pyro4/Pyro4-4.35.src.tar.gz"; | |
106 | md5 = "cbe6cb855f086a0f092ca075005855f3"; |
|
112 | md5 = "cbe6cb855f086a0f092ca075005855f3"; | |
107 | }; |
|
113 | }; | |
108 | }); |
|
114 | }); | |
109 |
|
115 | |||
110 | pysqlite = super.pysqlite.override (attrs: { |
|
116 | pysqlite = super.pysqlite.override (attrs: { | |
111 | propagatedBuildInputs = [ |
|
117 | propagatedBuildInputs = [ | |
112 | pkgs.sqlite |
|
118 | pkgs.sqlite | |
113 | ]; |
|
119 | ]; | |
114 | }); |
|
120 | }); | |
115 |
|
121 | |||
116 | pytest-runner = super.pytest-runner.override (attrs: { |
|
122 | pytest-runner = super.pytest-runner.override (attrs: { | |
117 | propagatedBuildInputs = [ |
|
123 | propagatedBuildInputs = [ | |
118 | self.setuptools-scm |
|
124 | self.setuptools-scm | |
119 | ]; |
|
125 | ]; | |
120 | }); |
|
126 | }); | |
121 |
|
127 | |||
122 | python-ldap = super.python-ldap.override (attrs: { |
|
128 | python-ldap = super.python-ldap.override (attrs: { | |
123 | propagatedBuildInputs = attrs.propagatedBuildInputs ++ [ |
|
129 | propagatedBuildInputs = attrs.propagatedBuildInputs ++ [ | |
124 | pkgs.cyrus_sasl |
|
130 | pkgs.cyrus_sasl | |
125 | pkgs.openldap |
|
131 | pkgs.openldap | |
126 | pkgs.openssl |
|
132 | pkgs.openssl | |
127 | ]; |
|
133 | ]; | |
128 | NIX_CFLAGS_COMPILE = "-I${pkgs.cyrus_sasl}/include/sasl"; |
|
134 | NIX_CFLAGS_COMPILE = "-I${pkgs.cyrus_sasl}/include/sasl"; | |
129 | }); |
|
135 | }); | |
130 |
|
136 | |||
131 | python-pam = super.python-pam.override (attrs: |
|
137 | python-pam = super.python-pam.override (attrs: | |
132 | let |
|
138 | let | |
133 | includeLibPam = pkgs.stdenv.isLinux; |
|
139 | includeLibPam = pkgs.stdenv.isLinux; | |
134 | in { |
|
140 | in { | |
135 | # TODO: johbo: Move the option up into the default.nix, we should |
|
141 | # TODO: johbo: Move the option up into the default.nix, we should | |
136 | # include python-pam only on supported platforms. |
|
142 | # include python-pam only on supported platforms. | |
137 | propagatedBuildInputs = attrs.propagatedBuildInputs ++ |
|
143 | propagatedBuildInputs = attrs.propagatedBuildInputs ++ | |
138 | pkgs.lib.optional includeLibPam [ |
|
144 | pkgs.lib.optional includeLibPam [ | |
139 | pkgs.pam |
|
145 | pkgs.pam | |
140 | ]; |
|
146 | ]; | |
141 | # TODO: johbo: Check if this can be avoided, or transform into |
|
147 | # TODO: johbo: Check if this can be avoided, or transform into | |
142 | # a real patch |
|
148 | # a real patch | |
143 | patchPhase = pkgs.lib.optionals includeLibPam '' |
|
149 | patchPhase = pkgs.lib.optionals includeLibPam '' | |
144 | substituteInPlace pam.py \ |
|
150 | substituteInPlace pam.py \ | |
145 | --replace 'find_library("pam")' '"${pkgs.pam}/lib/libpam.so.0"' |
|
151 | --replace 'find_library("pam")' '"${pkgs.pam}/lib/libpam.so.0"' | |
146 | ''; |
|
152 | ''; | |
147 | }); |
|
153 | }); | |
148 |
|
154 | |||
149 | rhodecode-tools = super.rhodecode-tools.override (attrs: { |
|
155 | rhodecode-tools = super.rhodecode-tools.override (attrs: { | |
150 | patches = [ |
|
156 | patches = [ | |
151 | ./patch-rhodecode-tools-setup.diff |
|
157 | ./patch-rhodecode-tools-setup.diff | |
152 | ]; |
|
158 | ]; | |
153 | }); |
|
159 | }); | |
154 |
|
160 | |||
155 | # Avoid that setuptools is replaced, this leads to trouble |
|
161 | # Avoid that setuptools is replaced, this leads to trouble | |
156 | # with buildPythonPackage. |
|
162 | # with buildPythonPackage. | |
157 | setuptools = basePythonPackages.setuptools; |
|
163 | setuptools = basePythonPackages.setuptools; | |
158 |
|
164 | |||
159 | } |
|
165 | } |
General Comments 0
You need to be logged in to leave comments.
Login now