forked from ibis-project/ibis
-
Notifications
You must be signed in to change notification settings - Fork 0
/
poetry-overrides.nix
102 lines (87 loc) · 3.49 KB
/
poetry-overrides.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
{ lib, pkgs, stdenv, ... }:
let
numpyVersion = self: self.numpy.version;
in
self: super:
{
# see https://github.com/numpy/numpy/issues/19624 for details
numpy = super.numpy.overridePythonAttrs (attrs: {
patches = (attrs.patches or [ ])
++ lib.optional
# this patch only applies to macos and only with numpy versions >=1.21,<1.21.2
(stdenv.isDarwin && (lib.versionAtLeast (numpyVersion self) "1.21.0" && lib.versionOlder (numpyVersion self) "1.21.2"))
(pkgs.fetchpatch {
url = "https://github.com/numpy/numpy/commit/8045183084042fbafc995dd26eb4d9ca45eb630e.patch";
sha256 = "14g69vq7llkh6smpfrb50iqga7fd360dkcc0rlwb5k2cz8bsii5b";
});
});
datafusion = super.datafusion.overridePythonAttrs (attrs: rec {
inherit (attrs) version;
src = pkgs.fetchFromGitHub {
owner = "datafusion-contrib";
repo = "datafusion-python";
rev = attrs.version;
sha256 = "sha256-9muPSFb4RjxP7X+qtUQ41rypgn0s9yWgmkyTA+edehU=";
};
patches = (attrs.patches or [ ])
++ lib.optionals stdenv.isDarwin [ ./patches/datafusion-macos.patch ];
nativeBuildInputs = (attrs.nativeBuildInputs or [ ])
++ (with pkgs.rustPlatform; [ cargoSetupHook maturinBuildHook ]);
buildInputs = (attrs.buildInputs or [ ])
++ lib.optionals stdenv.isDarwin [ pkgs.libiconv ];
cargoDeps = pkgs.rustPlatform.fetchCargoTarball {
inherit src patches;
sha256 =
if stdenv.isDarwin
then "sha256-rGXSmn3MF2wFyMqzF15gB9DK5f9W4Gk08J7tOsZ7IH0="
else "sha256-iLcEM5YYTcYZe3PQx/C4V0LU5p85R9LE+ba991J6HQE=";
};
});
nbconvert = super.nbconvert.overridePythonAttrs (attrs: {
patches = (attrs.patches or [ ]) ++ [ ./patches/templates.patch ];
postPatch = ''
substituteAllInPlace ./nbconvert/exporters/templateexporter.py
'';
});
tabulate = super.tabulate.overridePythonAttrs (_: {
TABULATE_INSTALL = "lib-only";
});
pandas = super.pandas.overridePythonAttrs (attrs: {
format = "setuptools";
enableParallelBuilding = true;
setupPyBuildFlags = attrs.setupPyBuildFlags or [ ] ++ [ "--parallel" "$NIX_BUILD_CORES" ];
});
pydantic = super.pydantic.overridePythonAttrs (attrs: {
format = "setuptools";
enableParallelBuilding = true;
setupPyBuildFlags = attrs.setupPyBuildFlags or [ ] ++ [ "--parallel" "$NIX_BUILD_CORES" ];
});
mkdocstrings = super.mkdocstrings.overridePythonAttrs (attrs: {
patches = (attrs.patches or [ ]) ++ [
(pkgs.fetchpatch {
url = "https://github.com/mkdocstrings/mkdocstrings/commit/b37722716b1e0ed6393ec71308dfb0f85e142f3b.patch";
sha256 = "sha256-DD1SjEvs5HBlSRLrqP3jhF/yoeWkF7F3VXCD1gyt5Fc=";
})
];
});
watchdog = super.watchdog.overrideAttrs (attrs: lib.optionalAttrs
(stdenv.isDarwin && lib.versionAtLeast attrs.version "2")
{
patches = (attrs.patches or [ ]) ++ [ ./patches/watchdog-force-kqueue.patch ];
});
pybind11 = super.pybind11.overridePythonAttrs (_: {
postBuild = ''
# build tests
make -j $NIX_BUILD_CORES -l $NIX_BUILD_CORES
'';
});
traitlets = super.traitlets.overridePythonAttrs (attrs: {
nativeBuildInputs = attrs.nativeBuildInputs or [ ] ++ [ self.flit-core ];
});
jupyter-client = super.jupyter-client.overridePythonAttrs (attrs: {
nativeBuildInputs = attrs.nativeBuildInputs or [ ] ++ [ self.hatchling ];
});
ipykernel = super.ipykernel.overridePythonAttrs (attrs: {
nativeBuildInputs = attrs.nativeBuildInputs or [ ] ++ [ self.hatchling ];
});
}