blob: d504f0299ddfa813092d15d2ba9fd52baf7f5140 (
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
41
42
|
{
lib,
buildPythonPackage,
fetchFromGitHub,
poetry-core,
pytestCheckHook,
}:
buildPythonPackage {
pname = "timeslot";
version = "0.1.2";
# pypi distribution doesn't include tests, so build from source instead
src = fetchFromGitHub {
owner = "ErikBjare";
repo = "timeslot";
rev = "af35445e96cbb2f3fb671a75aac6aa93e4e7e7a6";
sha256 = "sha256-GEhg2iMsYMfalT7L9TCd1KHU6oa/wTl5m3mRC0zOH9Q=";
};
pyproject = true;
nativeBuildInputs = [ poetry-core ];
nativeCheckInputs = [ pytestCheckHook ];
pytestFlags = [
# The pyproject.toml specifies the flag `--cov=timeslot`,
# This causes an error when running without pytest-cov,
# so use this flag to override that option, as we don't need coverage.
"--override-ini=addopts="
];
pythonImportsCheck = [ "timeslot" ];
meta = {
description = "Data type for representing time slots with a start and end";
homepage = "https://github.com/ErikBjare/timeslot";
maintainers = with lib.maintainers; [ huantian ];
license = lib.licenses.mit;
};
}
|