summary refs log tree commit diff
path: root/pkgs/development/python-modules/sumo/default.nix
blob: e647cd4a9d2701284226056380fdd1479acfd86e (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
{ lib, stdenv, buildPythonPackage, fetchFromGitHub, isPy27
, h5py
, matplotlib
, numpy
, phonopy
, pymatgen
, pytest
, scipy
, seekpath
, spglib
}:

buildPythonPackage rec {
  pname = "sumo";
  version = "1.0.9";

  # No tests in Pypi tarball
  src = fetchFromGitHub {
    owner = "SMTG-UCL";
    repo = "sumo";
    rev = "v${version}";
    sha256 = "1zw86qp9ycw2k0anw6pzvwgd3zds0z2cwy0s663zhiv9mnb5hx1n";
  };

  propagatedBuildInputs = [ numpy scipy spglib pymatgen h5py matplotlib seekpath phonopy ];

  checkInputs = [ pytest ];

  checkPhase = ''
    pytest .
  '';

  # tests have type annotations, can only run on 3.5+
  doCheck = (!isPy27);

  meta = with lib; {
    description = "Toolkit for plotting and analysis of ab initio solid-state calculation data";
    homepage = "https://github.com/SMTG-UCL/sumo";
    license = licenses.mit;
    maintainers = with maintainers; [ psyanticy ];
  };
}