1{ stdenv, buildPythonPackage, fetchFromGitHub, isPy27
2, h5py
3, matplotlib
4, numpy
5, phonopy
6, pymatgen
7, pytest
8, scipy
9, seekpath
10, spglib
11}:
12
13buildPythonPackage rec {
14 pname = "sumo";
15 version = "1.0.9";
16
17 # No tests in Pypi tarball
18 src = fetchFromGitHub {
19 owner = "SMTG-UCL";
20 repo = "sumo";
21 rev = "v${version}";
22 sha256 = "1zw86qp9ycw2k0anw6pzvwgd3zds0z2cwy0s663zhiv9mnb5hx1n";
23 };
24
25 propagatedBuildInputs = [ numpy scipy spglib pymatgen h5py matplotlib seekpath phonopy ];
26
27 checkInputs = [ pytest ];
28
29 checkPhase = ''
30 pytest .
31 '';
32
33 # tests have type annotations, can only run on 3.5+
34 doCheck = (!isPy27);
35
36 meta = with stdenv.lib; {
37 description = "Toolkit for plotting and analysis of ab initio solid-state calculation data";
38 homepage = "https://github.com/SMTG-UCL/sumo";
39 license = licenses.mit;
40 maintainers = with maintainers; [ psyanticy ];
41 };
42}