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