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