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