1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5
6 # build-system
7 cmake,
8 nanobind,
9 ninja,
10 numpy,
11 scikit-build-core,
12 setuptools,
13 setuptools-scm,
14
15 # dependencies
16 h5py,
17 matplotlib,
18 pyyaml,
19 scipy,
20 spglib,
21 symfc,
22
23 pytestCheckHook,
24}:
25
26buildPythonPackage rec {
27 pname = "phonopy";
28 version = "2.43.2";
29 pyproject = true;
30
31 src = fetchFromGitHub {
32 owner = "phonopy";
33 repo = "phonopy";
34 tag = "v${version}";
35 hash = "sha256-5STe2CQsAj+e+cOH1XAQTmFoDDXVJ2eBQz6W6Wk30t0=";
36 };
37
38 build-system = [
39 cmake
40 nanobind
41 ninja
42 numpy
43 scikit-build-core
44 setuptools
45 setuptools-scm
46 ];
47 dontUseCmakeConfigure = true;
48
49 dependencies = [
50 h5py
51 matplotlib
52 numpy
53 pyyaml
54 scipy
55 spglib
56 symfc
57 ];
58
59 nativeCheckInputs = [ pytestCheckHook ];
60
61 # prevent pytest from importing local directory
62 preCheck = ''
63 rm -r phonopy
64 '';
65
66 pythonImportsCheck = [ "phonopy" ];
67
68 meta = {
69 description = "Modulefor phonon calculations at harmonic and quasi-harmonic levels";
70 homepage = "https://phonopy.github.io/phonopy/";
71 changelog = "http://phonopy.github.io/phonopy/changelog.html";
72 license = lib.licenses.bsd0;
73 maintainers = with lib.maintainers; [
74 psyanticy
75 chn
76 ];
77 };
78}