diff options
author | Tomas Drtina <tdrtina-ext@arista.com> | 2023-05-13 07:23:20 +0200 |
---|---|---|
committer | Tomas Drtina <tm.drtina@gmail.com> | 2023-06-06 00:03:16 +0200 |
commit | 8a31dbd8946083b8a6d5722fc53c1350c2de15bd (patch) | |
tree | 7aa30d7dff8db246cc64c5099c8285395c145487 /pkgs/development/python-modules/kneed | |
parent | 622f1fec7d9efb35b9b48e9eb3c3ecc6bd027272 (diff) |
python3Packages.kneed: init at 0.8.3
Diffstat (limited to 'pkgs/development/python-modules/kneed')
-rw-r--r-- | pkgs/development/python-modules/kneed/default.nix | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/pkgs/development/python-modules/kneed/default.nix b/pkgs/development/python-modules/kneed/default.nix new file mode 100644 index 0000000000000..1e4bc851968fd --- /dev/null +++ b/pkgs/development/python-modules/kneed/default.nix @@ -0,0 +1,53 @@ +{ lib +, buildPythonPackage +, fetchFromGitHub +, hatchling +, numpy +, scipy +, matplotlib +, pytestCheckHook +}: + +buildPythonPackage rec { + pname = "kneed"; + version = "0.8.3"; + format = "pyproject"; + + src = fetchFromGitHub { + owner = "arvkevi"; + repo = "kneed"; + rev = "v${version}"; + sha256 = "K742mOnwTUY09EtbDYM9guqszK1wxgkofPhSjDyB8Ss="; + }; + + postPatch = '' + substituteInPlace pytest.ini \ + --replace "--cov=kneed" "" + ''; + + nativeBuildInputs = [ + hatchling + ]; + + propagatedBuildInputs = [ + numpy + scipy + ]; + + checkInputs = [ + pytestCheckHook + matplotlib + ]; + + disabledTestPaths = [ + # Fails when matplotlib is installed + "tests/test_no_matplotlib.py" + ]; + + meta = with lib; { + description = "Knee point detection in Python"; + homepage = "https://github.com/arvkevi/kneed"; + license = licenses.bsd3; + maintainers = with maintainers; [ tm-drtina ]; + }; +} |