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