Show More
@@ -1,165 +1,175 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 | in |
|
12 | 12 | |
|
13 | 13 | self: super: { |
|
14 | 14 | |
|
15 | 15 | gnureadline = super.gnureadline.override (attrs: { |
|
16 | 16 | buildInputs = attrs.buildInputs ++ [ |
|
17 | 17 | pkgs.ncurses |
|
18 | 18 | ]; |
|
19 | 19 | patchPhase = '' |
|
20 | 20 | substituteInPlace setup.py --replace "/bin/bash" "${pkgs.bash}/bin/bash" |
|
21 | 21 | ''; |
|
22 | 22 | }); |
|
23 | 23 | |
|
24 | 24 | gunicorn = super.gunicorn.override (attrs: { |
|
25 | 25 | propagatedBuildInputs = attrs.propagatedBuildInputs ++ [ |
|
26 | 26 | # johbo: futures is needed as long as we are on Python 2, otherwise |
|
27 | 27 | # gunicorn explodes if used with multiple threads per worker. |
|
28 | 28 | self.futures |
|
29 | 29 | ]; |
|
30 | 30 | }); |
|
31 | 31 | |
|
32 | 32 | ipython = super.ipython.override (attrs: { |
|
33 | 33 | propagatedBuildInputs = attrs.propagatedBuildInputs ++ [ |
|
34 | 34 | self.gnureadline |
|
35 | 35 | ]; |
|
36 | 36 | }); |
|
37 | 37 | |
|
38 | 38 | kombu = super.kombu.override (attrs: { |
|
39 | 39 | # The current version of kombu needs some patching to work with the |
|
40 | 40 | # other libs. Should be removed once we update celery and kombu. |
|
41 | 41 | patches = [ |
|
42 | 42 | ./patch-kombu-py-2-7-11.diff |
|
43 | 43 | ./patch-kombu-msgpack.diff |
|
44 | 44 | ]; |
|
45 | 45 | }); |
|
46 | 46 | |
|
47 | 47 | lxml = super.lxml.override (attrs: { |
|
48 | 48 | buildInputs = with self; [ |
|
49 | 49 | pkgs.libxml2 |
|
50 | 50 | pkgs.libxslt |
|
51 | 51 | ]; |
|
52 | 52 | }); |
|
53 | 53 | |
|
54 | 54 | MySQL-python = super.MySQL-python.override (attrs: { |
|
55 | 55 | buildInputs = attrs.buildInputs ++ [ |
|
56 | 56 | pkgs.openssl |
|
57 | 57 | ]; |
|
58 | 58 | propagatedBuildInputs = attrs.propagatedBuildInputs ++ [ |
|
59 | 59 | pkgs.mysql.lib |
|
60 | 60 | pkgs.zlib |
|
61 | 61 | ]; |
|
62 | 62 | }); |
|
63 | 63 | |
|
64 | 64 | psutil = super.psutil.override (attrs: { |
|
65 | 65 | buildInputs = attrs.buildInputs ++ |
|
66 | 66 | pkgs.lib.optional pkgs.stdenv.isDarwin pkgs.darwin.IOKit; |
|
67 | 67 | }); |
|
68 | 68 | |
|
69 | 69 | psycopg2 = super.psycopg2.override (attrs: { |
|
70 | 70 | buildInputs = attrs.buildInputs ++ |
|
71 | 71 | pkgs.lib.optional pkgs.stdenv.isDarwin pkgs.openssl; |
|
72 | 72 | propagatedBuildInputs = attrs.propagatedBuildInputs ++ [ |
|
73 | 73 | pkgs.postgresql |
|
74 | 74 | ]; |
|
75 | 75 | }); |
|
76 | 76 | |
|
77 | 77 | pycurl = super.pycurl.override (attrs: { |
|
78 | 78 | propagatedBuildInputs = attrs.propagatedBuildInputs ++ [ |
|
79 | 79 | pkgs.curl |
|
80 | 80 | pkgs.openssl |
|
81 | 81 | ]; |
|
82 | 82 | preConfigure = '' |
|
83 | 83 | substituteInPlace setup.py --replace '--static-libs' '--libs' |
|
84 | 84 | export PYCURL_SSL_LIBRARY=openssl |
|
85 | 85 | ''; |
|
86 | 86 | }); |
|
87 | 87 | |
|
88 | 88 | Pylons = super.Pylons.override (attrs: { |
|
89 | 89 | name = "Pylons-1.0.1-patch1"; |
|
90 | 90 | src = pkgs.fetchgit { |
|
91 | 91 | url = "https://code.rhodecode.com/upstream/pylons"; |
|
92 | 92 | rev = "707354ee4261b9c10450404fc9852ccea4fd667d"; |
|
93 | 93 | sha256 = "b2763274c2780523a335f83a1df65be22ebe4ff413a7bc9e9288d23c1f62032e"; |
|
94 | 94 | }; |
|
95 | 95 | }); |
|
96 | 96 | |
|
97 | 97 | pyramid = super.pyramid.override (attrs: { |
|
98 | 98 | postFixup = '' |
|
99 | 99 | wrapPythonPrograms |
|
100 | 100 | # TODO: johbo: "wrapPython" adds this magic line which |
|
101 | 101 | # confuses pserve. |
|
102 | 102 | ${sed} '/import sys; sys.argv/d' $out/bin/.pserve-wrapped |
|
103 | 103 | ''; |
|
104 | 104 | }); |
|
105 | 105 | |
|
106 | 106 | Pyro4 = super.Pyro4.override (attrs: { |
|
107 | 107 | # TODO: Was not able to generate this version, needs further |
|
108 | 108 | # investigation. |
|
109 | 109 | name = "Pyro4-4.35"; |
|
110 | 110 | src = pkgs.fetchurl { |
|
111 | 111 | url = "https://pypi.python.org/packages/source/P/Pyro4/Pyro4-4.35.src.tar.gz"; |
|
112 | 112 | md5 = "cbe6cb855f086a0f092ca075005855f3"; |
|
113 | 113 | }; |
|
114 | 114 | }); |
|
115 | 115 | |
|
116 | 116 | pysqlite = super.pysqlite.override (attrs: { |
|
117 | 117 | propagatedBuildInputs = [ |
|
118 | 118 | pkgs.sqlite |
|
119 | 119 | ]; |
|
120 | 120 | }); |
|
121 | 121 | |
|
122 | 122 | pytest-runner = super.pytest-runner.override (attrs: { |
|
123 | 123 | propagatedBuildInputs = [ |
|
124 | 124 | self.setuptools-scm |
|
125 | 125 | ]; |
|
126 | 126 | }); |
|
127 | 127 | |
|
128 | 128 | python-ldap = super.python-ldap.override (attrs: { |
|
129 | 129 | propagatedBuildInputs = attrs.propagatedBuildInputs ++ [ |
|
130 | 130 | pkgs.cyrus_sasl |
|
131 | 131 | pkgs.openldap |
|
132 | 132 | pkgs.openssl |
|
133 | 133 | ]; |
|
134 | 134 | NIX_CFLAGS_COMPILE = "-I${pkgs.cyrus_sasl}/include/sasl"; |
|
135 | 135 | }); |
|
136 | 136 | |
|
137 | 137 | python-pam = super.python-pam.override (attrs: |
|
138 | 138 | let |
|
139 | 139 | includeLibPam = pkgs.stdenv.isLinux; |
|
140 | 140 | in { |
|
141 | 141 | # TODO: johbo: Move the option up into the default.nix, we should |
|
142 | 142 | # include python-pam only on supported platforms. |
|
143 | 143 | propagatedBuildInputs = attrs.propagatedBuildInputs ++ |
|
144 | 144 | pkgs.lib.optional includeLibPam [ |
|
145 | 145 | pkgs.pam |
|
146 | 146 | ]; |
|
147 | 147 | # TODO: johbo: Check if this can be avoided, or transform into |
|
148 | 148 | # a real patch |
|
149 | 149 | patchPhase = pkgs.lib.optionals includeLibPam '' |
|
150 | 150 | substituteInPlace pam.py \ |
|
151 | 151 | --replace 'find_library("pam")' '"${pkgs.pam}/lib/libpam.so.0"' |
|
152 | 152 | ''; |
|
153 | 153 | }); |
|
154 | 154 | |
|
155 | 155 | rhodecode-tools = super.rhodecode-tools.override (attrs: { |
|
156 | 156 | patches = [ |
|
157 | 157 | ./patch-rhodecode-tools-setup.diff |
|
158 | 158 | ]; |
|
159 | 159 | }); |
|
160 | 160 | |
|
161 | URLObject = super.URLObject.override (attrs: { | |
|
162 | meta = { | |
|
163 | license = { | |
|
164 | spdxId = "Unlicense"; | |
|
165 | fullName = "The Unlicense"; | |
|
166 | url = http://unlicense.org/; | |
|
167 | }; | |
|
168 | }; | |
|
169 | }); | |
|
170 | ||
|
161 | 171 | # Avoid that setuptools is replaced, this leads to trouble |
|
162 | 172 | # with buildPythonPackage. |
|
163 | 173 | setuptools = basePythonPackages.setuptools; |
|
164 | 174 | |
|
165 | 175 | } |
General Comments 0
You need to be logged in to leave comments.
Login now