Merge pull request #147307 from samuela/samuela/servefile

This commit is contained in:
Sandro 2022-04-12 01:56:22 +02:00 committed by GitHub
commit 3fe298e6b5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 45 additions and 0 deletions

View file

@ -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 ];
};
}

View file

@ -9172,6 +9172,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 { };