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