summary refs log tree commit diff
path: root/pkgs/development/python-modules/seekpath/default.nix
blob: 637b55eec8d7fbf53f8e3f3c55472bfb07b7bb4f (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
{ lib, stdenv, buildPythonPackage, fetchFromGitHub, pythonOlder, numpy, future, spglib, glibcLocales, pytest, scipy }:

buildPythonPackage rec {
  pname = "seekpath";
  version = "2.0.1";
  disabled = pythonOlder "3.5";

  src = fetchFromGitHub {
    owner = "giovannipizzi";
    repo = pname;
    rev = "v${version}";
    sha256 = "0x592650ynacmx5n5bilj5lja4iw0gf1nfypy82cmy5z363qhqxn";
  };

  LC_ALL = "en_US.utf-8";

  # scipy isn't listed in install_requires, but used in package
  propagatedBuildInputs = [ numpy spglib future scipy ];

  nativeBuildInputs = [ glibcLocales ];

  checkInputs = [ pytest ];

  # I don't know enough about crystal structures to fix
  checkPhase = ''
    pytest . -k 'not oI2Y'
  '';

  meta = with lib; {
    description = "A module to obtain and visualize band paths in the Brillouin zone of crystal structures.";
    homepage = "https://github.com/giovannipizzi/seekpath";
    license = licenses.mit;
    maintainers = with maintainers; [ psyanticy ];
  };
}