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