summaryrefslogtreecommitdiff
path: root/pkgs/development/python-modules/rangehttpserver/default.nix
blob: 15ee7bb36895632567be647ddc6eb244c4d39736 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
{
  lib,
  buildPythonPackage,
  fetchFromGitHub,
  setuptools,
  pytest7CheckHook,
  requests,
}:

buildPythonPackage rec {
  pname = "rangehttpserver";
  version = "1.4.0";
  pyproject = true;

  src = fetchFromGitHub {
    owner = "danvk";
    repo = "RangeHTTPServer";
    tag = version;
    hash = "sha256-wvGJ5wHYLb7wJUGgurkdRTABV6kTH7/GXzXgpd0Ypbc=";
  };

  nativeBuildInputs = [ setuptools ];

  __darwinAllowLocalNetworking = true;

  nativeCheckInputs = [
    pytest7CheckHook
    requests
  ];

  pythonImportsCheck = [ "RangeHTTPServer" ];

  meta = {
    description = "SimpleHTTPServer with support for Range requests";
    homepage = "https://github.com/danvk/RangeHTTPServer";
    changelog = "https://github.com/danvk/RangeHTTPServer/releases/tag/${version}";
    license = lib.licenses.asl20;
    maintainers = with lib.maintainers; [ fab ];
  };
}