at master 1.1 kB view raw
1{ 2 lib, 3 buildPythonPackage, 4 fetchFromGitHub, 5 pythonOlder, 6 poetry-core, 7 pytestCheckHook, 8}: 9 10buildPythonPackage { 11 pname = "timeslot"; 12 version = "0.1.2"; 13 14 # pypi distribution doesn't include tests, so build from source instead 15 src = fetchFromGitHub { 16 owner = "ErikBjare"; 17 repo = "timeslot"; 18 rev = "af35445e96cbb2f3fb671a75aac6aa93e4e7e7a6"; 19 sha256 = "sha256-GEhg2iMsYMfalT7L9TCd1KHU6oa/wTl5m3mRC0zOH9Q="; 20 }; 21 22 format = "pyproject"; 23 24 disabled = pythonOlder "3.6"; 25 26 nativeBuildInputs = [ poetry-core ]; 27 28 nativeCheckInputs = [ pytestCheckHook ]; 29 30 pytestFlags = [ 31 # The pyproject.toml specifies the flag `--cov=timeslot`, 32 # This causes an error when running without pytest-cov, 33 # so use this flag to override that option, as we don't need coverage. 34 "--override-ini=addopts=" 35 ]; 36 37 pythonImportsCheck = [ "timeslot" ]; 38 39 meta = with lib; { 40 description = "Data type for representing time slots with a start and end"; 41 homepage = "https://github.com/ErikBjare/timeslot"; 42 maintainers = with maintainers; [ huantian ]; 43 license = licenses.mit; 44 }; 45}