1{
2 lib,
3 buildPythonPackage,
4 fetchPypi,
5 numpy,
6 pyyaml,
7 matplotlib,
8 h5py,
9 scipy,
10 spglib,
11 pytestCheckHook,
12 pythonOlder,
13 setuptools,
14}:
15
16buildPythonPackage rec {
17 pname = "phonopy";
18 version = "2.24.3";
19 pyproject = true;
20
21 disabled = pythonOlder "3.7";
22
23 src = fetchPypi {
24 inherit pname version;
25 hash = "sha256-VHtifCC28GKIE+0oz1wMgmZ9G6+rT8nF0PG6tYkhjG8=";
26 };
27
28 nativeBuildInputs = [ setuptools ];
29
30 propagatedBuildInputs = [
31 h5py
32 matplotlib
33 numpy
34 pyyaml
35 scipy
36 spglib
37 ];
38
39 nativeCheckInputs = [ pytestCheckHook ];
40
41 # prevent pytest from importing local directory
42 preCheck = ''
43 rm -r phonopy
44 '';
45
46 pythonImportsCheck = [ "phonopy" ];
47
48 meta = with lib; {
49 description = "Modulefor phonon calculations at harmonic and quasi-harmonic levels";
50 homepage = "https://phonopy.github.io/phonopy/";
51 changelog = "https://github.com/phonopy/phonopy/blob/v${version}/doc/changelog.md";
52 license = licenses.bsd0;
53 maintainers = with maintainers; [ psyanticy ];
54 };
55}