1{ lib
2, buildPythonPackage
3, fetchFromGitHub
4, numpy
5, poetry-core
6, pythonOlder
7, pytestCheckHook
8, setuptools
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 = [
31 poetry-core
32 ];
33
34 propagatedBuildInputs = [
35 numpy
36 ];
37
38 nativeCheckInputs = [
39 pytestCheckHook
40 ];
41
42 pythonImportsCheck = [
43 "vg"
44 ];
45
46 meta = with lib; {
47 description = "Linear algebra for humans: a very good vector-geometry and linear-algebra toolbelt";
48 homepage = "https://github.com/lace/vg";
49 changelog = "https://github.com/lace/vg/blob/${version}/CHANGELOG.md";
50 license = with licenses; [ bsd2 ];
51 maintainers = with maintainers; [ clerie ];
52 };
53}