diff --git a/pkgs/development/python-modules/shellescape/default.nix b/pkgs/development/python-modules/shellescape/default.nix new file mode 100644 index 000000000000..2d7309d88215 --- /dev/null +++ b/pkgs/development/python-modules/shellescape/default.nix @@ -0,0 +1,27 @@ +{ lib +, buildPythonPackage +, fetchFromGitHub +, pytestCheckHook +}: + +buildPythonPackage rec { + pname = "shellescape"; + version = "3.8.1"; + + src = fetchFromGitHub { + owner = "chrissimpkins"; + repo = "shellescape"; + rev = "v${version}"; + hash = "sha256-HAe3Qf3lLeVWw/tVkW0J+CfoxSoOnCcWDR2nEWZn7HM="; + }; + + checkInputs = [ pytestCheckHook ]; + pythonImportsCheck = [ "shellescape" ]; + + meta = with lib; { + description = "Shell escape a string to safely use it as a token in a shell command (backport of Python shlex.quote)"; + homepage = "https://github.com/chrissimpkins/shellescape"; + license = with licenses; [ mit psfl ]; + maintainers = with maintainers; [ veprbl ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 8c5d9ecb1e53..52a2bbf83060 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -7938,6 +7938,8 @@ in { sh = callPackage ../development/python-modules/sh { }; + shellescape = callPackage ../development/python-modules/shellescape { }; + shellingham = callPackage ../development/python-modules/shellingham { }; shiboken2 = toPythonModule (callPackage ../development/python-modules/shiboken2 {