1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 numpy,
6 poetry-core,
7 pythonOlder,
8 pytestCheckHook,
9}:
10
11buildPythonPackage rec {
12 pname = "vg";
13 version = "2.0.0";
14 format = "pyproject";
15
16 disabled = pythonOlder "3.7";
17
18 src = fetchFromGitHub {
19 owner = "lace";
20 repo = "vg";
21 rev = "refs/tags/${version}";
22 hash = "sha256-ZNUAfkhjmsxD8cH0fR8Htjs+/F/3R9xfe1XgRyndids=";
23 };
24
25 postPatch = ''
26 substituteInPlace pyproject.toml \
27 --replace 'requires = ["setuptools", "poetry-core>=1.0.0"]' 'requires = ["poetry-core>=1.0.0"]'
28 '';
29
30 nativeBuildInputs = [ poetry-core ];
31
32 propagatedBuildInputs = [ numpy ];
33
34 nativeCheckInputs = [ pytestCheckHook ];
35
36 pythonImportsCheck = [ "vg" ];
37
38 meta = with lib; {
39 description = "Linear algebra for humans: a very good vector-geometry and linear-algebra toolbelt";
40 homepage = "https://github.com/lace/vg";
41 changelog = "https://github.com/lace/vg/blob/${version}/CHANGELOG.md";
42 license = with licenses; [ bsd2 ];
43 maintainers = with maintainers; [ clerie ];
44 };
45}