1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 pytestCheckHook,
6}:
7
8buildPythonPackage rec {
9 pname = "shellescape";
10 version = "3.8.1";
11 format = "setuptools";
12
13 src = fetchFromGitHub {
14 owner = "chrissimpkins";
15 repo = "shellescape";
16 rev = "v${version}";
17 hash = "sha256-HAe3Qf3lLeVWw/tVkW0J+CfoxSoOnCcWDR2nEWZn7HM=";
18 };
19
20 nativeCheckInputs = [ pytestCheckHook ];
21 pythonImportsCheck = [ "shellescape" ];
22
23 meta = with lib; {
24 description = "Shell escape a string to safely use it as a token in a shell command (backport of Python shlex.quote)";
25 homepage = "https://github.com/chrissimpkins/shellescape";
26 license = with licenses; [
27 mit
28 psfl
29 ];
30 maintainers = with maintainers; [ veprbl ];
31 };
32}