1{
2 lib,
3 buildPythonPackage,
4 pythonOlder,
5 fetchFromGitHub,
6 setuptools,
7 incremental,
8 pytestCheckHook,
9 syrupy,
10}:
11
12buildPythonPackage rec {
13 pname = "systembridgemodels";
14 version = "4.2.4";
15 pyproject = true;
16
17 disabled = pythonOlder "3.11";
18
19 src = fetchFromGitHub {
20 owner = "timmo001";
21 repo = "system-bridge-models";
22 tag = version;
23 hash = "sha256-FjHDd7nI30ChaClL0b1ME9Zv+DV0BiMsfgGOKQF/qBk=";
24 };
25
26 postPatch = ''
27 substituteInPlace requirements_setup.txt \
28 --replace-fail ">=" " #"
29
30 substituteInPlace systembridgemodels/_version.py \
31 --replace-fail ", dev=0" ""
32 '';
33
34 build-system = [
35 incremental
36 setuptools
37 ];
38
39 pythonRelaxDeps = [ "incremental" ];
40
41 dependencies = [ incremental ];
42
43 pythonImportsCheck = [ "systembridgemodels" ];
44
45 nativeCheckInputs = [
46 pytestCheckHook
47 syrupy
48 ];
49
50 disabledTests = [
51 "test_system"
52 "test_update"
53 ];
54
55 pytestFlagsArray = [ "--snapshot-warn-unused" ];
56
57 meta = {
58 changelog = "https://github.com/timmo001/system-bridge-models/releases/tag/${version}";
59 description = "This is the models package used by the System Bridge project";
60 homepage = "https://github.com/timmo001/system-bridge-models";
61 license = lib.licenses.asl20;
62 maintainers = with lib.maintainers; [ dotlambda ];
63 };
64}