1{
2 lib,
3 buildPythonPackage,
4 fetchPypi,
5 spglib,
6 numpy,
7 scipy,
8 matplotlib,
9 ase,
10 netcdf4,
11 pythonOlder,
12 cython,
13 cmake,
14 setuptools,
15}:
16
17buildPythonPackage rec {
18 pname = "boltztrap2";
19 version = "24.1.1";
20
21 pyproject = true;
22 build-system = [ setuptools ];
23
24 disabled = pythonOlder "3.5";
25
26 src = fetchPypi {
27 pname = "BoltzTraP2";
28 inherit version;
29 hash = "sha256-kgv4lPBxcBmRKihaTwPRz8bHTWAWUOGZADtJUb3y+C4=";
30 };
31
32 postPatch = ''
33 substituteInPlace setup.py \
34 --replace-fail "USE_CYTHON = False" "USE_CYTHON = True"
35 '';
36
37 dontUseCmakeConfigure = true;
38
39 nativeBuildInputs = [
40 cmake
41 cython
42 ];
43
44 dependencies = [
45 spglib
46 numpy
47 scipy
48 matplotlib
49 ase
50 netcdf4
51 ];
52
53 # pypi release does no include files for tests
54 doCheck = false;
55
56 pythonImportsCheck = [ "BoltzTraP2" ];
57
58 meta = with lib; {
59 description = "Band-structure interpolator and transport coefficient calculator";
60 mainProgram = "btp2";
61 homepage = "http://www.boltztrap.org/";
62 license = licenses.gpl3Plus;
63 maintainers = [ ];
64 };
65}