From 8a31dbd8946083b8a6d5722fc53c1350c2de15bd Mon Sep 17 00:00:00 2001 From: Tomas Drtina Date: Sat, 13 May 2023 07:23:20 +0200 Subject: [PATCH] python3Packages.kneed: init at 0.8.3 --- .../python-modules/kneed/default.nix | 53 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 55 insertions(+) create mode 100644 pkgs/development/python-modules/kneed/default.nix diff --git a/pkgs/development/python-modules/kneed/default.nix b/pkgs/development/python-modules/kneed/default.nix new file mode 100644 index 000000000000..1e4bc851968f --- /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 ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index f4d0bda3cb71..56250ef046b9 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -5493,6 +5493,8 @@ self: super: with self; { knack = callPackage ../development/python-modules/knack { }; + kneed = callPackage ../development/python-modules/kneed { }; + kombu = callPackage ../development/python-modules/kombu { }; konnected = callPackage ../development/python-modules/konnected { };