Merge pull request #268619 from tweag/lib-descriptions
[NixPkgs.git] / pkgs / development / python-modules / scikit-misc / default.nix
blobc49ffd7bce5d56a613e38f8050dfe1088dc23f91
1 { lib
2 , buildPythonPackage
3 , fetchFromGitHub
4 , fetchpatch
5 , cython
6 , gfortran
7 , git
8 , meson-python
9 , pkg-config
10 , numpy
11 , openblas
12 , setuptools
13 , wheel
16 buildPythonPackage rec {
17   pname = "scikit-misc";
18   version = "0.3.0";
19   pyproject = true;
21   src = fetchFromGitHub {
22     owner = "has2k1";
23     repo = "scikit-misc";
24     rev = "refs/tags/v${version}";
25     hash = "sha256-XV3s+y3JdMr1770S91ek6Y7MqvTg7/2cphLQldUPe5s=";
26   };
28   patches = [
29     # check for openblas64 pkg-config
30     # remove when patch merged upstream
31     # https://github.com/has2k1/scikit-misc/pull/29
32     (fetchpatch {
33       name = "openblas64-pkg-config.patch";
34       url = "https://github.com/has2k1/scikit-misc/commit/6a140de18e5e1276c7aa08bf0a047b1023aa9ae4.patch";
35       hash = "sha256-HzKiRISOvoDIUIcgiYVvxhx9klwyfAh/1DDKq7inl+A=";
36     })
37   ];
39   postPatch = ''
40     patchShebangs .
42     substituteInPlace pyproject.toml \
43       --replace 'numpy==' 'numpy>='
44   '';
46   nativeBuildInputs = [
47     cython
48     gfortran
49     git
50     meson-python
51     numpy
52     pkg-config
53     setuptools
54     wheel
55   ];
57   buildInputs = [
58     numpy
59     openblas
60   ];
62   pythonImportsCheck = [
63     "skmisc"
64   ];
66   meta = with lib; {
67     description = "Miscellaneous tools for scientific computing";
68     homepage = "https://github.com/has2k1/scikit-misc";
69     license = licenses.bsd3;
70     maintainers = with maintainers; [ onny ];
71   };