##// END OF EJS Templates
packaging: Tweak for darwin based development, 16.09
johbo -
r933:e21444cc default
parent child Browse files
Show More
@@ -1,283 +1,286 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 gnureadline = super.gnureadline.override (attrs: {
35 35 buildInputs = attrs.buildInputs ++ [
36 36 pkgs.ncurses
37 37 ];
38 38 patchPhase = ''
39 39 substituteInPlace setup.py --replace "/bin/bash" "${pkgs.bash}/bin/bash"
40 40 '';
41 41 });
42 42
43 43 gunicorn = super.gunicorn.override (attrs: {
44 44 propagatedBuildInputs = attrs.propagatedBuildInputs ++ [
45 45 # johbo: futures is needed as long as we are on Python 2, otherwise
46 46 # gunicorn explodes if used with multiple threads per worker.
47 47 self.futures
48 48 ];
49 49 });
50 50
51 51 ipython = super.ipython.override (attrs: {
52 52 propagatedBuildInputs = attrs.propagatedBuildInputs ++ [
53 53 self.gnureadline
54 54 ];
55 55 });
56 56
57 57 kombu = super.kombu.override (attrs: {
58 58 # The current version of kombu needs some patching to work with the
59 59 # other libs. Should be removed once we update celery and kombu.
60 60 patches = [
61 61 ./patch-kombu-py-2-7-11.diff
62 62 ./patch-kombu-msgpack.diff
63 63 ];
64 64 });
65 65
66 66 lxml = super.lxml.override (attrs: {
67 # johbo: On 16.09 we need this to compile on darwin, otherwise compilation
68 # fails on Darwin.
69 hardeningDisable = if pkgs.stdenv.isDarwin then [ "format" ] else null;
67 70 buildInputs = with self; [
68 71 pkgs.libxml2
69 72 pkgs.libxslt
70 73 ];
71 74 });
72 75
73 76 MySQL-python = super.MySQL-python.override (attrs: {
74 77 buildInputs = attrs.buildInputs ++ [
75 78 pkgs.openssl
76 79 ];
77 80 propagatedBuildInputs = attrs.propagatedBuildInputs ++ [
78 81 pkgs.mysql.lib
79 82 pkgs.zlib
80 83 ];
81 84 });
82 85
83 86 psutil = super.psutil.override (attrs: {
84 87 buildInputs = attrs.buildInputs ++
85 88 pkgs.lib.optional pkgs.stdenv.isDarwin pkgs.darwin.IOKit;
86 89 });
87 90
88 91 psycopg2 = super.psycopg2.override (attrs: {
89 92 buildInputs = attrs.buildInputs ++
90 93 pkgs.lib.optional pkgs.stdenv.isDarwin pkgs.openssl;
91 94 propagatedBuildInputs = attrs.propagatedBuildInputs ++ [
92 95 pkgs.postgresql
93 96 ];
94 97 meta = {
95 98 license = pkgs.lib.licenses.lgpl3Plus;
96 99 };
97 100 });
98 101
99 102 py-gfm = super.py-gfm.override {
100 103 src = pkgs.fetchgit {
101 104 url = "https://code.rhodecode.com/upstream/py-gfm";
102 105 rev = "0d66a19bc16e3d49de273c0f797d4e4781e8c0f2";
103 106 sha256 = "0ryp74jyihd3ckszq31bml5jr3bciimhfp7va7kw6ld92930ksv3";
104 107 };
105 108 };
106 109
107 110 pycurl = super.pycurl.override (attrs: {
108 111 propagatedBuildInputs = attrs.propagatedBuildInputs ++ [
109 112 pkgs.curl
110 113 pkgs.openssl
111 114 ];
112 115 preConfigure = ''
113 116 substituteInPlace setup.py --replace '--static-libs' '--libs'
114 117 export PYCURL_SSL_LIBRARY=openssl
115 118 '';
116 119 meta = {
117 120 # TODO: It is LGPL and MIT
118 121 license = pkgs.lib.licenses.mit;
119 122 };
120 123 });
121 124
122 125 Pylons = super.Pylons.override (attrs: {
123 126 name = "Pylons-1.0.1-patch1";
124 127 src = pkgs.fetchgit {
125 128 url = "https://code.rhodecode.com/upstream/pylons";
126 129 rev = "707354ee4261b9c10450404fc9852ccea4fd667d";
127 130 sha256 = "b2763274c2780523a335f83a1df65be22ebe4ff413a7bc9e9288d23c1f62032e";
128 131 };
129 132 });
130 133
131 134 pyramid = super.pyramid.override (attrs: {
132 135 postFixup = ''
133 136 wrapPythonPrograms
134 137 # TODO: johbo: "wrapPython" adds this magic line which
135 138 # confuses pserve.
136 139 ${sed} '/import sys; sys.argv/d' $out/bin/.pserve-wrapped
137 140 '';
138 141 meta = {
139 142 license = localLicenses.repoze;
140 143 };
141 144 });
142 145
143 146 pyramid-debugtoolbar = super.pyramid-debugtoolbar.override (attrs: {
144 147 meta = {
145 148 license = [ pkgs.lib.licenses.bsdOriginal localLicenses.repoze ];
146 149 };
147 150 });
148 151
149 152 Pyro4 = super.Pyro4.override (attrs: {
150 153 # TODO: Was not able to generate this version, needs further
151 154 # investigation.
152 155 name = "Pyro4-4.35";
153 156 src = pkgs.fetchurl {
154 157 url = "https://pypi.python.org/packages/source/P/Pyro4/Pyro4-4.35.src.tar.gz";
155 158 md5 = "cbe6cb855f086a0f092ca075005855f3";
156 159 };
157 160 });
158 161
159 162 pysqlite = super.pysqlite.override (attrs: {
160 163 propagatedBuildInputs = [
161 164 pkgs.sqlite
162 165 ];
163 166 meta = {
164 167 license = [ pkgs.lib.licenses.zlib pkgs.lib.licenses.libpng ];
165 168 };
166 169 });
167 170
168 171 pytest-runner = super.pytest-runner.override (attrs: {
169 172 propagatedBuildInputs = [
170 173 self.setuptools-scm
171 174 ];
172 175 });
173 176
174 177 python-ldap = super.python-ldap.override (attrs: {
175 178 propagatedBuildInputs = attrs.propagatedBuildInputs ++ [
176 179 pkgs.cyrus_sasl
177 180 pkgs.openldap
178 181 pkgs.openssl
179 182 ];
180 183 # TODO: johbo: Remove the "or" once we drop 16.03 support.
181 184 NIX_CFLAGS_COMPILE = "-I${pkgs.cyrus_sasl.dev or pkgs.cyrus_sasl}/include/sasl";
182 185 });
183 186
184 187 python-pam = super.python-pam.override (attrs:
185 188 let
186 189 includeLibPam = pkgs.stdenv.isLinux;
187 190 in {
188 191 # TODO: johbo: Move the option up into the default.nix, we should
189 192 # include python-pam only on supported platforms.
190 193 propagatedBuildInputs = attrs.propagatedBuildInputs ++
191 194 pkgs.lib.optional includeLibPam [
192 195 pkgs.pam
193 196 ];
194 197 # TODO: johbo: Check if this can be avoided, or transform into
195 198 # a real patch
196 199 patchPhase = pkgs.lib.optionals includeLibPam ''
197 200 substituteInPlace pam.py \
198 201 --replace 'find_library("pam")' '"${pkgs.pam}/lib/libpam.so.0"'
199 202 '';
200 203 });
201 204
202 205 rhodecode-tools = super.rhodecode-tools.override (attrs: {
203 206 patches = [
204 207 ./patch-rhodecode-tools-setup.diff
205 208 ];
206 209 });
207 210
208 211 URLObject = super.URLObject.override (attrs: {
209 212 meta = {
210 213 license = {
211 214 spdxId = "Unlicense";
212 215 fullName = "The Unlicense";
213 216 url = http://unlicense.org/;
214 217 };
215 218 };
216 219 });
217 220
218 221 amqplib = super.amqplib.override (attrs: {
219 222 meta = {
220 223 license = pkgs.lib.licenses.lgpl3;
221 224 };
222 225 });
223 226
224 227 docutils = super.docutils.override (attrs: {
225 228 meta = {
226 229 license = pkgs.lib.licenses.bsd2;
227 230 };
228 231 });
229 232
230 233 colander = super.colander.override (attrs: {
231 234 meta = {
232 235 license = localLicenses.repoze;
233 236 };
234 237 });
235 238
236 239 pyramid-beaker = super.pyramid-beaker.override (attrs: {
237 240 meta = {
238 241 license = localLicenses.repoze;
239 242 };
240 243 });
241 244
242 245 pyramid-mako = super.pyramid-mako.override (attrs: {
243 246 meta = {
244 247 license = localLicenses.repoze;
245 248 };
246 249 });
247 250
248 251 repoze.lru = super.repoze.lru.override (attrs: {
249 252 meta = {
250 253 license = localLicenses.repoze;
251 254 };
252 255 });
253 256
254 257 recaptcha-client = super.recaptcha-client.override (attrs: {
255 258 meta = {
256 259 # TODO: It is MIT/X11
257 260 license = pkgs.lib.licenses.mit;
258 261 };
259 262 });
260 263
261 264 python-editor = super.python-editor.override (attrs: {
262 265 meta = {
263 266 license = pkgs.lib.licenses.asl20;
264 267 };
265 268 });
266 269
267 270 translationstring = super.translationstring.override (attrs: {
268 271 meta = {
269 272 license = localLicenses.repoze;
270 273 };
271 274 });
272 275
273 276 venusian = super.venusian.override (attrs: {
274 277 meta = {
275 278 license = localLicenses.repoze;
276 279 };
277 280 });
278 281
279 282 # Avoid that setuptools is replaced, this leads to trouble
280 283 # with buildPythonPackage.
281 284 setuptools = basePythonPackages.setuptools;
282 285
283 286 }
General Comments 0
You need to be logged in to leave comments. Login now