summary refs log tree commit diff
path: root/pkgs/development/python-modules/rangehttpserver/default.nix
blob: 673661b07b99f4220c3c8c25c404903f1a94c391 (plain) (blame)
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
41
42
43
44
45
46
{ lib
, buildPythonPackage
, fetchFromGitHub
, setuptools
, nose
, requests
}:

buildPythonPackage rec {
  pname = "rangehttpserver";
  version = "1.2.0";
  format = "pyproject";

  src = fetchFromGitHub {
    owner = "danvk";
    repo = "RangeHTTPServer";
    rev = version;
    sha256 = "1sy9j6y8kp5jiwv2vd652v94kspp1yd4dwxrfqfn6zwnfyv2mzv5";
  };

  nativeBuildInputs = [
    setuptools
  ];

  nativeCheckInputs = [
    nose
    requests
  ];

  checkPhase = ''
    runHook preCheck
    nosetests
    runHook postCheck
  '';

  pythonImportsCheck = [
    "RangeHTTPServer"
  ];

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