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