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