1{
2 lib,
3 buildPythonPackage,
4 fetchPypi,
5
6 # build-system
7 scikit-build-core,
8 cmake,
9 pathspec,
10 ninja,
11 pyproject-metadata,
12 setuptools-scm,
13
14 # dependencies
15 numpy,
16
17 # tests
18 pytestCheckHook,
19 pyyaml,
20}:
21
22buildPythonPackage rec {
23 pname = "spglib";
24 version = "2.4.0";
25 format = "pyproject";
26
27 src = fetchPypi {
28 inherit pname version;
29 hash = "sha256-bmP57mG3DxU6ItO1ULGD2lMfiQR1kX/OIDutRZeqwkM=";
30 };
31
32 nativeBuildInputs = [
33 scikit-build-core
34 cmake
35 pathspec
36 ninja
37 pyproject-metadata
38 setuptools-scm
39 ];
40
41 dontUseCmakeConfigure = true;
42
43 propagatedBuildInputs = [ numpy ];
44
45 nativeCheckInputs = [
46 pytestCheckHook
47 pyyaml
48 ];
49
50 pythonImportsCheck = [ "spglib" ];
51
52 meta = with lib; {
53 description = "Python bindings for C library for finding and handling crystal symmetries";
54 homepage = "https://spglib.github.io/spglib/";
55 changelog = "https://github.com/spglib/spglib/raw/v${version}/ChangeLog";
56 license = licenses.bsd3;
57 maintainers = with maintainers; [ psyanticy ];
58 };
59}