1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5
6 # build-system
7 hatchling,
8
9 # dependencies
10 numpy,
11
12 # tests
13 pytest-cov,
14 pytest-xdist,
15 pytestCheckHook,
16}:
17
18buildPythonPackage rec {
19 pname = "autograd";
20 version = "1.8.0";
21 pyproject = true;
22
23 src = fetchFromGitHub {
24 owner = "HIPS";
25 repo = "autograd";
26 tag = "v${version}";
27 hash = "sha256-k4rcalwznKS2QvmyTLra+ciWFifnILW/DDdB8D+clxQ=";
28 };
29
30 build-system = [ hatchling ];
31
32 dependencies = [ numpy ];
33
34 nativeCheckInputs = [
35 pytest-cov
36 pytest-xdist
37 pytestCheckHook
38 ];
39
40 pythonImportsCheck = [ "autograd" ];
41
42 meta = {
43 description = "Compute derivatives of NumPy code efficiently";
44 homepage = "https://github.com/HIPS/autograd";
45 changelog = "https://github.com/HIPS/autograd/releases/tag/v${version}";
46 license = lib.licenses.mit;
47 maintainers = with lib.maintainers; [ jluttine ];
48 };
49}