diff --git a/pkgs/development/python-modules/simple-rest-client/default.nix b/pkgs/development/python-modules/simple-rest-client/default.nix new file mode 100644 index 000000000000..b9b1cbe7b058 --- /dev/null +++ b/pkgs/development/python-modules/simple-rest-client/default.nix @@ -0,0 +1,55 @@ +{ lib +, asynctest +, buildPythonPackage +, fetchFromGitHub +, httpx +, pytest-asyncio +, pytest-httpserver +, pytestCheckHook +, python-slugify +, python-status +, pythonOlder +}: + +buildPythonPackage rec { + pname = "simple-rest-client"; + version = "1.0.8"; + + disabled = pythonOlder "3.6"; + + src = fetchFromGitHub { + owner = "allisson"; + repo = "python-simple-rest-client"; + rev = version; + sha256 = "12qxhrjhlbyyr1pkvwfkcxbsmyns5b0mfdn42vz310za5x76ldj3"; + }; + + propagatedBuildInputs = [ + httpx + python-slugify + python-status + ]; + + checkInputs = [ + asynctest + pytest-asyncio + pytest-httpserver + pytestCheckHook + ]; + + postPatch = '' + substituteInPlace setup.py \ + --replace "pytest-runner" "" + substituteInPlace pytest.ini \ + --replace " --cov=simple_rest_client --cov-report=term-missing" "" + ''; + + pythonImportsCheck = [ "simple_rest_client" ]; + + meta = with lib; { + description = "Simple REST client for Python"; + homepage = "https://github.com/allisson/python-simple-rest-client"; + license = with licenses; [ mit ]; + maintainers = with maintainers; [ fab ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 61cd9554abcf..a92fceabef15 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -8232,6 +8232,8 @@ in { simplekml = callPackage ../development/python-modules/simplekml { }; + simple-rest-client = callPackage ../development/python-modules/simple-rest-client { }; + simple-salesforce = callPackage ../development/python-modules/simple-salesforce { }; simple-websocket-server = callPackage ../development/python-modules/simple-websocket-server { };