1{ stdenv
2, lib
3, buildPythonPackage
4, fetchPypi
5, fetchpatch
6, setuptools-scm
7, pint
8, pandas
9, pytestCheckHook
10}:
11
12buildPythonPackage rec {
13 pname = "pint-pandas";
14 version = "0.2";
15
16 src = fetchPypi {
17 pname = "Pint-Pandas";
18 inherit version;
19 sha256 = "sha256-b2DS6ArBAuD5St25IG4PbMpe5C8Lf4kw2MeYAC5B+oc=";
20 };
21
22 patches = [
23 # Fixes a failing test, see: https://github.com/hgrecco/pint-pandas/issues/107
24 (fetchpatch{
25 url = "https://github.com/hgrecco/pint-pandas/commit/4c31e25609af968665ee60d019b9b5366f328680.patch";
26 sha256 = "vIT0LI4S73D4MBfGI8vtCZAM+Zb4PZ4E3xfpGKNyA4I=";
27 })
28 ];
29
30 nativeBuildInputs = [
31 setuptools-scm
32 ];
33
34 propagatedBuildInputs = [
35 pint
36 pandas
37 ];
38
39 checkInputs = [
40 pytestCheckHook
41 ];
42
43 meta = with lib; {
44 broken = (stdenv.isLinux && stdenv.isAarch64) || stdenv.isDarwin;
45 description = "Pandas support for pint";
46 license = licenses.bsd3;
47 homepage = "https://github.com/hgrecco/pint-pandas";
48 maintainers = with maintainers; [ doronbehar ];
49 };
50}