1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 hatchling,
6 hatch-vcs,
7 icalendar,
8 pytestCheckHook,
9 git,
10}:
11
12buildPythonPackage rec {
13 pname = "icalendar-compatibility";
14 version = "0.1.4";
15 pyproject = true;
16
17 src = fetchFromGitHub {
18 owner = "niccokunzmann";
19 repo = "icalendar_compatibility";
20 tag = "v${version}";
21 hash = "sha256-h9rpbltNEPMteicPJ6oC32NsZS8QXQphLbC0Qiu7j5Q=";
22 };
23
24 # hatch-vcs tries to read the current git commit hash
25 postPatch = ''
26 substituteInPlace pyproject.toml \
27 --replace 'dynamic = ["urls", "version"]' 'version = "${version}"'
28 '';
29
30 build-system = [
31 hatchling
32 hatch-vcs
33 ];
34
35 dependencies = [ icalendar ];
36
37 nativeCheckInputs = [
38 pytestCheckHook
39 git
40 ];
41
42 pythonImportsCheck = [ "icalendar_compatibility" ];
43
44 # env.SETUPTOOLS_SCM_PRETEND_VERSION = version;
45
46 meta = {
47 homepage = "https://icalendar-compatibility.readthedocs.io/en/latest/";
48 changelog = "https://icalendar-compatibility.readthedocs.io/en/latest/changes.html";
49 license = lib.licenses.gpl2Plus;
50 maintainers = with lib.maintainers; [ erictapen ];
51 };
52
53}