From 9ec60f810df8c4b6e0851e00f4a4d86be3340e69 Mon Sep 17 00:00:00 2001 From: Samuel Ainsworth Date: Sat, 9 Apr 2022 22:41:35 +0000 Subject: [PATCH] python3Packages.servefile: init at 0.5.3 --- .../python-modules/servefile/default.nix | 43 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 45 insertions(+) create mode 100644 pkgs/development/python-modules/servefile/default.nix diff --git a/pkgs/development/python-modules/servefile/default.nix b/pkgs/development/python-modules/servefile/default.nix new file mode 100644 index 000000000000..e9d87ca91273 --- /dev/null +++ b/pkgs/development/python-modules/servefile/default.nix @@ -0,0 +1,43 @@ +{ buildPythonPackage +, fetchFromGitHub +, lib +, pyopenssl +, pytestCheckHook +, requests +}: + +buildPythonPackage rec { + pname = "servefile"; + version = "0.5.3"; + + src = fetchFromGitHub { + owner = "sebageek"; + repo = pname; + rev = "v${version}"; + sha256 = "sha256-/ZEMZIH/ImuZ2gh5bwB0FlaWnG/ELxfBGEJ2SuNSEb8="; + }; + + propagatedBuildInputs = [ pyopenssl ]; + + checkInputs = [ pytestCheckHook requests ]; + # Test attempts to connect to a port on localhost which fails in nix build + # environment. + disabledTests = [ + "test_abort_download" + "test_big_download" + "test_https_big_download" + "test_https" + "test_redirect_and_download" + "test_specify_port" + "test_upload_size_limit" + "test_upload" + ]; + pythonImportsCheck = [ "servefile" ]; + + meta = with lib; { + description = "Serve files from shell via a small HTTP server"; + homepage = "https://github.com/sebageek/servefile"; + license = licenses.gpl3Plus; + maintainers = with maintainers; [ samuela ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 1cab3948c617..891c18086145 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -9180,6 +9180,8 @@ in { serpy = callPackage ../development/python-modules/serpy { }; + servefile = callPackage ../development/python-modules/servefile { }; + serverlessrepo = callPackage ../development/python-modules/serverlessrepo { }; service-identity = callPackage ../development/python-modules/service_identity { };