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