Show More
@@ -1,99 +1,111 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 |
|
7 | { pkgs | |
8 | , basePythonPackages |
|
8 | , basePythonPackages | |
9 | }: |
|
9 | }: | |
10 |
|
10 | |||
11 | let |
|
11 | let | |
12 | sed = "sed -i"; |
|
12 | sed = "sed -i"; | |
13 |
|
13 | |||
14 | in |
|
14 | in | |
15 |
|
15 | |||
16 | self: super: { |
|
16 | self: super: { | |
17 |
|
17 | |||
18 | "cffi" = super."cffi".override (attrs: { |
|
18 | "cffi" = super."cffi".override (attrs: { | |
19 | buildInputs = with self; attrs.buildInputs ++ [ |
|
19 | buildInputs = with self; attrs.buildInputs ++ [ | |
20 | pkgs.libffi |
|
20 | pkgs.libffi | |
21 | ]; |
|
21 | ]; | |
22 | }); |
|
22 | }); | |
23 |
|
23 | |||
|
24 | "dogpile.cache" = super."dogpile.cache".override (attrs: { | |||
|
25 | # dogpile wants to be both a regular module and namespace package | |||
|
26 | postPatch = '' | |||
|
27 | rm dogpile/core.py | |||
|
28 | substituteInPlace dogpile/cache/__init__.py \ | |||
|
29 | --replace "from .. import __version__" "__version__ = '0.9.0'" | |||
|
30 | substituteInPlace dogpile/cache/region.py \ | |||
|
31 | --replace "from . " "from dogpile.cache " \ | |||
|
32 | --replace "from .. " "from dogpile.lock " | |||
|
33 | ''; | |||
|
34 | }); | |||
|
35 | ||||
24 | "gevent" = super."gevent".override (attrs: { |
|
36 | "gevent" = super."gevent".override (attrs: { | |
25 | propagatedBuildInputs = with self; attrs.propagatedBuildInputs ++ [ |
|
37 | propagatedBuildInputs = with self; attrs.propagatedBuildInputs ++ [ | |
26 | # NOTE: (marcink) odd requirements from gevent aren't set properly, |
|
38 | # NOTE: (marcink) odd requirements from gevent aren't set properly, | |
27 | # thus we need to inject psutil manually |
|
39 | # thus we need to inject psutil manually | |
28 | self."psutil" |
|
40 | self."psutil" | |
29 | ]; |
|
41 | ]; | |
30 | }); |
|
42 | }); | |
31 |
|
43 | |||
32 | "hgsubversion" = super."hgsubversion".override (attrs: { |
|
44 | "hgsubversion" = super."hgsubversion".override (attrs: { | |
33 | propagatedBuildInputs = attrs.propagatedBuildInputs ++ [ |
|
45 | propagatedBuildInputs = attrs.propagatedBuildInputs ++ [ | |
34 | pkgs.sqlite |
|
46 | pkgs.sqlite | |
35 | #basePythonPackages.sqlite3 |
|
47 | #basePythonPackages.sqlite3 | |
36 | self.mercurial |
|
48 | self.mercurial | |
37 | ]; |
|
49 | ]; | |
38 | }); |
|
50 | }); | |
39 |
|
51 | |||
40 | "subvertpy" = super."subvertpy".override (attrs: { |
|
52 | "subvertpy" = super."subvertpy".override (attrs: { | |
41 | SVN_PREFIX = "${pkgs.subversion.dev}"; |
|
53 | SVN_PREFIX = "${pkgs.subversion.dev}"; | |
42 | nativeBuildInputs = with self; attrs.nativeBuildInputs ++ [ |
|
54 | nativeBuildInputs = with self; attrs.nativeBuildInputs ++ [ | |
43 | pkgs.apr.dev |
|
55 | pkgs.apr.dev | |
44 | pkgs.aprutil |
|
56 | pkgs.aprutil | |
45 | ]; |
|
57 | ]; | |
46 | buildInputs = with self; [ |
|
58 | buildInputs = with self; attrs.buildInputs ++ [ | |
47 | pkgs.subversion |
|
59 | pkgs.subversion | |
48 | ]; |
|
60 | ]; | |
49 | }); |
|
61 | }); | |
50 |
|
62 | |||
51 | "mercurial" = super."mercurial".override (attrs: { |
|
63 | "mercurial" = super."mercurial".override (attrs: { | |
52 | nativeBuildInputs = with self; attrs.nativeBuildInputs ++ [ |
|
64 | nativeBuildInputs = with self; attrs.nativeBuildInputs ++ [ | |
53 | # self.python.modules.curses |
|
65 | # self.python.modules.curses | |
54 | ]; |
|
66 | ]; | |
55 | postInstall = '' |
|
67 | postInstall = '' | |
56 | rm -f $out/${self.python.sitePackages}/hgext3rd/__pycache__/__init__.*.pyc |
|
68 | rm -f $out/${self.python.sitePackages}/hgext3rd/__pycache__/__init__.*.pyc | |
57 | ''; |
|
69 | ''; | |
58 | }); |
|
70 | }); | |
59 |
|
71 | |||
60 | "hg-evolve" = super."hg-evolve".override (attrs: { |
|
72 | "hg-evolve" = super."hg-evolve".override (attrs: { | |
61 | postInstall = '' |
|
73 | postInstall = '' | |
62 | rm -f $out/${self.python.sitePackages}/hgext3rd/__init__.py |
|
74 | rm -f $out/${self.python.sitePackages}/hgext3rd/__init__.py | |
63 | rm -f $out/${self.python.sitePackages}/hgext3rd/__init__.pyc |
|
75 | rm -f $out/${self.python.sitePackages}/hgext3rd/__init__.pyc | |
64 | ''; |
|
76 | ''; | |
65 | }); |
|
77 | }); | |
66 |
|
78 | |||
67 | "dulwich" = super."dulwich".override (attrs: { |
|
79 | "dulwich" = super."dulwich".override (attrs: { | |
68 | patches = [ |
|
80 | patches = [ | |
69 | ./patches/dulwich/handle-dir-refs.patch |
|
81 | ./patches/dulwich/handle-dir-refs.patch | |
70 | ]; |
|
82 | ]; | |
71 | }); |
|
83 | }); | |
72 |
|
84 | |||
73 | "pygit2" = super."pygit2".override (attrs: { |
|
85 | "pygit2" = super."pygit2".override (attrs: { | |
74 | nativeBuildInputs = with self; attrs.nativeBuildInputs ++ [ |
|
86 | nativeBuildInputs = with self; attrs.nativeBuildInputs ++ [ | |
75 | pkgs.libffi |
|
87 | pkgs.libffi | |
76 | pkgs.libgit2rc |
|
88 | pkgs.libgit2rc | |
77 | ]; |
|
89 | ]; | |
78 | buildInputs = with self; attrs.buildInputs ++ [ |
|
90 | buildInputs = with self; attrs.buildInputs ++ [ | |
79 | pkgs.libgit2rc |
|
91 | pkgs.libgit2rc | |
80 | ]; |
|
92 | ]; | |
81 | }); |
|
93 | }); | |
82 |
|
94 | |||
83 | "py" = super."py".override (attrs: { |
|
95 | "py" = super."py".override (attrs: { | |
84 | buildInputs = with self; attrs.buildInputs ++ [ |
|
96 | buildInputs = with self; attrs.buildInputs ++ [ | |
85 | self."setuptools-scm" |
|
97 | self."setuptools-scm" | |
86 | ]; |
|
98 | ]; | |
87 | }); |
|
99 | }); | |
88 |
|
100 | |||
89 | "zipp" = super."zipp".override (attrs: { |
|
101 | "zipp" = super."zipp".override (attrs: { | |
90 | buildInputs = with self; attrs.buildInputs ++ [ |
|
102 | buildInputs = with self; attrs.buildInputs ++ [ | |
91 | self."toml" |
|
103 | self."toml" | |
92 | ]; |
|
104 | ]; | |
93 | }); |
|
105 | }); | |
94 |
|
106 | |||
95 | # Avoid that base packages screw up the build process |
|
107 | # Avoid that base packages screw up the build process | |
96 | inherit (basePythonPackages) |
|
108 | inherit (basePythonPackages) | |
97 | setuptools; |
|
109 | setuptools; | |
98 |
|
110 | |||
99 | } |
|
111 | } |
General Comments 0
You need to be logged in to leave comments.
Login now