From cccdb0558d6929177c2fafd2f92ac2cc84e32011 Mon Sep 17 00:00:00 2001 From: phaer Date: Thu, 2 Jun 2022 12:39:53 +0200 Subject: [PATCH] python3Packages.cron-descriptor: init at 1.2.24 --- .../cron-descriptor/default.nix | 36 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 ++ 2 files changed, 38 insertions(+) create mode 100644 pkgs/development/python-modules/cron-descriptor/default.nix diff --git a/pkgs/development/python-modules/cron-descriptor/default.nix b/pkgs/development/python-modules/cron-descriptor/default.nix new file mode 100644 index 000000000000..582ef48199f9 --- /dev/null +++ b/pkgs/development/python-modules/cron-descriptor/default.nix @@ -0,0 +1,36 @@ +{ lib +, python +, buildPythonPackage +, fetchFromGitHub +, pytestCheckHook +}: + +buildPythonPackage rec { + pname = "cron_descriptor"; + version = "1.2.24"; + + src = fetchFromGitHub { + owner = "Salamek"; + repo = "cron-descriptor"; + rev = version; + sha256 = "sha256-Gf7n8OiFuaN+8MqsXSg9RBPh2gXfPgjJ4xeuinGYKMw="; + }; + + # remove tests_require, as we don't do linting anyways + postPatch = '' + sed -i "/'pep8\|flake8\|pep8-naming',/d" setup.py + ''; + + checkPhase = '' + ${python.interpreter} setup.py test + ''; + + pythonImportsCheck = [ "cron_descriptor" ]; + + meta = with lib; { + description = "Library that converts cron expressions into human readable strings"; + homepage = "https://github.com/Salamek/cron-descriptor"; + license = licenses.mit; + maintainers = with maintainers; [ phaer ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 89f6c8e548e9..3fd558e3f9bc 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -1974,6 +1974,8 @@ in { criticality-score = callPackage ../development/python-modules/criticality-score { }; + cron-descriptor = callPackage ../development/python-modules/cron-descriptor { }; + croniter = callPackage ../development/python-modules/croniter { }; crossplane = callPackage ../development/python-modules/crossplane { };