##// END OF EJS Templates
dependencies: small package changes, added license for testpath.
marcink -
r2361:ca2046af default
parent child Browse files
Show More
@@ -1,250 +1,251 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 localLicenses = {
11 localLicenses = {
12 repoze = {
12 repoze = {
13 fullName = "Repoze License";
13 fullName = "Repoze License";
14 url = http://www.repoze.org/LICENSE.txt;
14 url = http://www.repoze.org/LICENSE.txt;
15 };
15 };
16 };
16 };
17
17
18 in
18 in
19
19
20 self: super: {
20 self: super: {
21
21
22 appenlight-client = super.appenlight-client.override (attrs: {
22 appenlight-client = super.appenlight-client.override (attrs: {
23 meta = {
23 meta = {
24 license = [ pkgs.lib.licenses.bsdOriginal ];
24 license = [ pkgs.lib.licenses.bsdOriginal ];
25 };
25 };
26 });
26 });
27
27
28 future = super.future.override (attrs: {
28 future = super.future.override (attrs: {
29 meta = {
29 meta = {
30 license = [ pkgs.lib.licenses.mit ];
30 license = [ pkgs.lib.licenses.mit ];
31 };
31 };
32 });
32 });
33
33
34 testpath = super.testpath.override (attrs: {
35 meta = {
36 license = [ pkgs.lib.licenses.mit ];
37 };
38 });
39
34 gnureadline = super.gnureadline.override (attrs: {
40 gnureadline = super.gnureadline.override (attrs: {
35 buildInputs = attrs.buildInputs ++ [
41 buildInputs = attrs.buildInputs ++ [
36 pkgs.ncurses
42 pkgs.ncurses
37 ];
43 ];
38 patchPhase = ''
44 patchPhase = ''
39 substituteInPlace setup.py --replace "/bin/bash" "${pkgs.bash}/bin/bash"
45 substituteInPlace setup.py --replace "/bin/bash" "${pkgs.bash}/bin/bash"
40 '';
46 '';
41 });
47 });
42
48
43 gunicorn = super.gunicorn.override (attrs: {
49 gunicorn = super.gunicorn.override (attrs: {
44 propagatedBuildInputs = attrs.propagatedBuildInputs ++ [
50 propagatedBuildInputs = attrs.propagatedBuildInputs ++ [
45 # johbo: futures is needed as long as we are on Python 2, otherwise
51 # johbo: futures is needed as long as we are on Python 2, otherwise
46 # gunicorn explodes if used with multiple threads per worker.
52 # gunicorn explodes if used with multiple threads per worker.
47 self.futures
53 self.futures
48 ];
54 ];
49 });
55 });
50
56
51 nbconvert = super.nbconvert.override (attrs: {
57 nbconvert = super.nbconvert.override (attrs: {
52 propagatedBuildInputs = attrs.propagatedBuildInputs ++ [
58 propagatedBuildInputs = attrs.propagatedBuildInputs ++ [
53 # marcink: plug in jupyter-client for notebook rendering
59 # marcink: plug in jupyter-client for notebook rendering
54 self.jupyter-client
60 self.jupyter-client
55 ];
61 ];
56 });
62 });
57
63
58 ipython = super.ipython.override (attrs: {
64 ipython = super.ipython.override (attrs: {
59 propagatedBuildInputs = attrs.propagatedBuildInputs ++ [
65 propagatedBuildInputs = attrs.propagatedBuildInputs ++ [
60 self.gnureadline
66 self.gnureadline
61 ];
67 ];
62 });
68 });
63
69
64 lxml = super.lxml.override (attrs: {
70 lxml = super.lxml.override (attrs: {
65 # johbo: On 16.09 we need this to compile on darwin, otherwise compilation
71 # johbo: On 16.09 we need this to compile on darwin, otherwise compilation
66 # fails on Darwin.
72 # fails on Darwin.
67 hardeningDisable = if pkgs.stdenv.isDarwin then [ "format" ] else null;
73 hardeningDisable = if pkgs.stdenv.isDarwin then [ "format" ] else null;
68 buildInputs = with self; [
74 buildInputs = with self; [
69 pkgs.libxml2
75 pkgs.libxml2
70 pkgs.libxslt
76 pkgs.libxslt
71 ];
77 ];
72 });
78 });
73
79
74 MySQL-python = super.MySQL-python.override (attrs: {
80 MySQL-python = super.MySQL-python.override (attrs: {
75 buildInputs = attrs.buildInputs ++ [
81 buildInputs = attrs.buildInputs ++ [
76 pkgs.openssl
82 pkgs.openssl
77 ];
83 ];
78 propagatedBuildInputs = attrs.propagatedBuildInputs ++ [
84 propagatedBuildInputs = attrs.propagatedBuildInputs ++ [
79 pkgs.mysql.lib
85 pkgs.mysql.lib
80 pkgs.zlib
86 pkgs.zlib
81 ];
87 ];
82 });
88 });
83
89
84 psutil = super.psutil.override (attrs: {
90 psutil = super.psutil.override (attrs: {
85 buildInputs = attrs.buildInputs ++
91 buildInputs = attrs.buildInputs ++
86 pkgs.lib.optional pkgs.stdenv.isDarwin pkgs.darwin.IOKit;
92 pkgs.lib.optional pkgs.stdenv.isDarwin pkgs.darwin.IOKit;
87 });
93 });
88
94
89 psycopg2 = super.psycopg2.override (attrs: {
95 psycopg2 = super.psycopg2.override (attrs: {
90 buildInputs = attrs.buildInputs ++
96 buildInputs = attrs.buildInputs ++
91 pkgs.lib.optional pkgs.stdenv.isDarwin pkgs.openssl;
97 pkgs.lib.optional pkgs.stdenv.isDarwin pkgs.openssl;
92 propagatedBuildInputs = attrs.propagatedBuildInputs ++ [
98 propagatedBuildInputs = attrs.propagatedBuildInputs ++ [
93 pkgs.postgresql
99 pkgs.postgresql
94 ];
100 ];
95 meta = {
101 meta = {
96 license = pkgs.lib.licenses.lgpl3Plus;
102 license = pkgs.lib.licenses.lgpl3Plus;
97 };
103 };
98 });
104 });
99
105
100 py-gfm = super.py-gfm.override {
101 name = "py-gfm-0.1.3.rhodecode-upstream1";
102 };
103
104 pycurl = super.pycurl.override (attrs: {
106 pycurl = super.pycurl.override (attrs: {
105 propagatedBuildInputs = attrs.propagatedBuildInputs ++ [
107 propagatedBuildInputs = attrs.propagatedBuildInputs ++ [
106 pkgs.curl
108 pkgs.curl
107 pkgs.openssl
109 pkgs.openssl
108 ];
110 ];
109 preConfigure = ''
111 preConfigure = ''
110 substituteInPlace setup.py --replace '--static-libs' '--libs'
112 substituteInPlace setup.py --replace '--static-libs' '--libs'
111 export PYCURL_SSL_LIBRARY=openssl
113 export PYCURL_SSL_LIBRARY=openssl
112 '';
114 '';
113 meta = {
115 meta = {
114 # TODO: It is LGPL and MIT
116 # TODO: It is LGPL and MIT
115 license = pkgs.lib.licenses.mit;
117 license = pkgs.lib.licenses.mit;
116 };
118 };
117 });
119 });
118
120
119 pyramid = super.pyramid.override (attrs: {
121 pyramid = super.pyramid.override (attrs: {
120 postFixup = ''
122 postFixup = ''
121 wrapPythonPrograms
123 wrapPythonPrograms
122 # TODO: johbo: "wrapPython" adds this magic line which
124 # TODO: johbo: "wrapPython" adds this magic line which
123 # confuses pserve.
125 # confuses pserve.
124 ${sed} '/import sys; sys.argv/d' $out/bin/.pserve-wrapped
126 ${sed} '/import sys; sys.argv/d' $out/bin/.pserve-wrapped
125 '';
127 '';
126 meta = {
128 meta = {
127 license = localLicenses.repoze;
129 license = localLicenses.repoze;
128 };
130 };
129 });
131 });
130
132
131 pyramid-debugtoolbar = super.pyramid-debugtoolbar.override (attrs: {
133 pyramid-debugtoolbar = super.pyramid-debugtoolbar.override (attrs: {
132 meta = {
134 meta = {
133 license = [ pkgs.lib.licenses.bsdOriginal localLicenses.repoze ];
135 license = [ pkgs.lib.licenses.bsdOriginal localLicenses.repoze ];
134 };
136 };
135 });
137 });
136
138
137 pysqlite = super.pysqlite.override (attrs: {
139 pysqlite = super.pysqlite.override (attrs: {
138 propagatedBuildInputs = [
140 propagatedBuildInputs = [
139 pkgs.sqlite
141 pkgs.sqlite
140 ];
142 ];
141 meta = {
143 meta = {
142 license = [ pkgs.lib.licenses.zlib pkgs.lib.licenses.libpng ];
144 license = [ pkgs.lib.licenses.zlib pkgs.lib.licenses.libpng ];
143 };
145 };
144 });
146 });
145
147
146 pytest-runner = super.pytest-runner.override (attrs: {
148 pytest-runner = super.pytest-runner.override (attrs: {
147 propagatedBuildInputs = [
149 propagatedBuildInputs = [
148 self.setuptools-scm
150 self.setuptools-scm
149 ];
151 ];
150 });
152 });
151
153
152 python-ldap = super.python-ldap.override (attrs: {
154 python-ldap = super.python-ldap.override (attrs: {
153 propagatedBuildInputs = attrs.propagatedBuildInputs ++ [
155 propagatedBuildInputs = attrs.propagatedBuildInputs ++ [
154 pkgs.cyrus_sasl
156 pkgs.cyrus_sasl
155 pkgs.openldap
157 pkgs.openldap
156 pkgs.openssl
158 pkgs.openssl
157 ];
159 ];
158 # TODO: johbo: Remove the "or" once we drop 16.03 support.
160 # TODO: johbo: Remove the "or" once we drop 16.03 support.
159 NIX_CFLAGS_COMPILE = "-I${pkgs.cyrus_sasl.dev or pkgs.cyrus_sasl}/include/sasl";
161 NIX_CFLAGS_COMPILE = "-I${pkgs.cyrus_sasl.dev or pkgs.cyrus_sasl}/include/sasl";
160 });
162 });
161
163
162 python-pam = super.python-pam.override (attrs:
164 python-pam = super.python-pam.override (attrs:
163 let
165 let
164 includeLibPam = pkgs.stdenv.isLinux;
166 includeLibPam = pkgs.stdenv.isLinux;
165 in {
167 in {
166 # TODO: johbo: Move the option up into the default.nix, we should
168 # TODO: johbo: Move the option up into the default.nix, we should
167 # include python-pam only on supported platforms.
169 # include python-pam only on supported platforms.
168 propagatedBuildInputs = attrs.propagatedBuildInputs ++
170 propagatedBuildInputs = attrs.propagatedBuildInputs ++
169 pkgs.lib.optional includeLibPam [
171 pkgs.lib.optional includeLibPam [
170 pkgs.pam
172 pkgs.pam
171 ];
173 ];
172 # TODO: johbo: Check if this can be avoided, or transform into
174 # TODO: johbo: Check if this can be avoided, or transform into
173 # a real patch
175 # a real patch
174 patchPhase = pkgs.lib.optionals includeLibPam ''
176 patchPhase = pkgs.lib.optionals includeLibPam ''
175 substituteInPlace pam.py \
177 substituteInPlace pam.py \
176 --replace 'find_library("pam")' '"${pkgs.pam}/lib/libpam.so.0"'
178 --replace 'find_library("pam")' '"${pkgs.pam}/lib/libpam.so.0"'
177 '';
179 '';
178 });
180 });
179
181
180 URLObject = super.URLObject.override (attrs: {
182 URLObject = super.URLObject.override (attrs: {
181 meta = {
183 meta = {
182 license = {
184 license = {
183 spdxId = "Unlicense";
185 spdxId = "Unlicense";
184 fullName = "The Unlicense";
186 fullName = "The Unlicense";
185 url = http://unlicense.org/;
187 url = http://unlicense.org/;
186 };
188 };
187 };
189 };
188 });
190 });
189
191
190
191 docutils = super.docutils.override (attrs: {
192 docutils = super.docutils.override (attrs: {
192 meta = {
193 meta = {
193 license = pkgs.lib.licenses.bsd2;
194 license = pkgs.lib.licenses.bsd2;
194 };
195 };
195 });
196 });
196
197
197 colander = super.colander.override (attrs: {
198 colander = super.colander.override (attrs: {
198 meta = {
199 meta = {
199 license = localLicenses.repoze;
200 license = localLicenses.repoze;
200 };
201 };
201 });
202 });
202
203
203 pyramid-beaker = super.pyramid-beaker.override (attrs: {
204 pyramid-beaker = super.pyramid-beaker.override (attrs: {
204 meta = {
205 meta = {
205 license = localLicenses.repoze;
206 license = localLicenses.repoze;
206 };
207 };
207 });
208 });
208
209
209 pyramid-mako = super.pyramid-mako.override (attrs: {
210 pyramid-mako = super.pyramid-mako.override (attrs: {
210 meta = {
211 meta = {
211 license = localLicenses.repoze;
212 license = localLicenses.repoze;
212 };
213 };
213 });
214 });
214
215
215 repoze.lru = super.repoze.lru.override (attrs: {
216 repoze.lru = super.repoze.lru.override (attrs: {
216 meta = {
217 meta = {
217 license = localLicenses.repoze;
218 license = localLicenses.repoze;
218 };
219 };
219 });
220 });
220
221
221 recaptcha-client = super.recaptcha-client.override (attrs: {
222 recaptcha-client = super.recaptcha-client.override (attrs: {
222 meta = {
223 meta = {
223 # TODO: It is MIT/X11
224 # TODO: It is MIT/X11
224 license = pkgs.lib.licenses.mit;
225 license = pkgs.lib.licenses.mit;
225 };
226 };
226 });
227 });
227
228
228 python-editor = super.python-editor.override (attrs: {
229 python-editor = super.python-editor.override (attrs: {
229 meta = {
230 meta = {
230 license = pkgs.lib.licenses.asl20;
231 license = pkgs.lib.licenses.asl20;
231 };
232 };
232 });
233 });
233
234
234 translationstring = super.translationstring.override (attrs: {
235 translationstring = super.translationstring.override (attrs: {
235 meta = {
236 meta = {
236 license = localLicenses.repoze;
237 license = localLicenses.repoze;
237 };
238 };
238 });
239 });
239
240
240 venusian = super.venusian.override (attrs: {
241 venusian = super.venusian.override (attrs: {
241 meta = {
242 meta = {
242 license = localLicenses.repoze;
243 license = localLicenses.repoze;
243 };
244 };
244 });
245 });
245
246
246 # Avoid that setuptools is replaced, this leads to trouble
247 # Avoid that setuptools is replaced, this leads to trouble
247 # with buildPythonPackage.
248 # with buildPythonPackage.
248 setuptools = basePythonPackages.setuptools;
249 setuptools = basePythonPackages.setuptools;
249
250
250 }
251 }
General Comments 0
You need to be logged in to leave comments. Login now