1{ lib
2, buildPythonPackage
3, fetchFromGitHub
4, setuptools
5, nose
6, requests
7}:
8
9buildPythonPackage rec {
10 pname = "rangehttpserver";
11 version = "1.2.0";
12 format = "pyproject";
13
14 src = fetchFromGitHub {
15 owner = "danvk";
16 repo = "RangeHTTPServer";
17 rev = version;
18 sha256 = "1sy9j6y8kp5jiwv2vd652v94kspp1yd4dwxrfqfn6zwnfyv2mzv5";
19 };
20
21 nativeBuildInputs = [
22 setuptools
23 ];
24
25 checkInputs = [
26 nose
27 requests
28 ];
29
30 checkPhase = ''
31 runHook preCheck
32 nosetests
33 runHook postCheck
34 '';
35
36 pythonImportsCheck = [
37 "RangeHTTPServer"
38 ];
39
40 meta = with lib; {
41 description = "SimpleHTTPServer with support for Range requests";
42 homepage = "https://github.com/danvk/RangeHTTPServer";
43 license = licenses.asl20;
44 maintainers = with maintainers; [ fab ];
45 };
46}