diff --git a/pkgs/development/python-modules/cleanit/default.nix b/pkgs/development/python-modules/cleanit/default.nix new file mode 100644 index 000000000000..7ce39e3392a5 --- /dev/null +++ b/pkgs/development/python-modules/cleanit/default.nix @@ -0,0 +1,64 @@ +{ + lib, + buildPythonPackage, + fetchFromGitHub, + pythonOlder, + nix-update-script, + + # build dependencies + poetry-core, + + # dependencies + appdirs, + babelfish, + chardet, + click, + jsonschema, + pysrt, + pyyaml, + + # tests + pytestCheckHook, +}: + +buildPythonPackage rec { + pname = "cleanit"; + version = "0.4.8"; + pyproject = true; + + disabled = pythonOlder "3.9"; + + src = fetchFromGitHub { + owner = "ratoaq2"; + repo = "cleanit"; + rev = version; + hash = "sha256-z1QAWWm+yg/pRCQfPqGbL0EFFT9UwqIkwhmjUuRHyuk="; + }; + + build-system = [ poetry-core ]; + + dependencies = [ + appdirs + babelfish + chardet + click + jsonschema + pysrt + pyyaml + ]; + + nativeCheckInputs = [ pytestCheckHook ]; + + pythonImportsCheck = [ "cleanit" ]; + + passthru.updateScript = nix-update-script { }; + + meta = { + description = "Command line tool that helps you to keep your subtitles clean"; + homepage = "https://github.com/ratoaq2/cleanit"; + changelog = "https://github.com/ratoaq2/cleanit/releases/tag/${version}"; + license = lib.licenses.asl20; + maintainers = with lib.maintainers; [ eljamm ]; + mainProgram = "cleanit"; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 27d706ce16a6..2c5cfa21c721 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -2125,6 +2125,8 @@ with pkgs; clevercsv = with python3Packages; toPythonApplication clevercsv; + cleanit = with python3Packages; toPythonApplication cleanit; + clickgen = with python3Packages; toPythonApplication clickgen; cloud-init = python3.pkgs.callPackage ../tools/virtualization/cloud-init { inherit systemd; }; diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 425298993211..938bdfcb72a6 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -2336,6 +2336,8 @@ self: super: with self; { clean-fid = callPackage ../development/python-modules/clean-fid { }; + cleanit = callPackage ../development/python-modules/cleanit { }; + cleanlab = callPackage ../development/python-modules/cleanlab { }; cleanvision = callPackage ../development/python-modules/cleanvision { };