2021-01-25 08:26:54 +00:00
|
|
|
{
|
|
|
|
lib,
|
2018-10-10 21:52:12 +00:00
|
|
|
buildPythonPackage,
|
|
|
|
fetchPypi,
|
|
|
|
spglib,
|
|
|
|
numpy,
|
|
|
|
scipy,
|
|
|
|
matplotlib,
|
|
|
|
ase,
|
|
|
|
netcdf4,
|
|
|
|
pythonOlder,
|
|
|
|
cython,
|
|
|
|
cmake,
|
2024-05-22 18:24:47 +00:00
|
|
|
setuptools,
|
2018-10-10 21:52:12 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
2022-04-15 22:17:51 +00:00
|
|
|
pname = "boltztrap2";
|
2024-09-29 15:03:53 +00:00
|
|
|
version = "24.9.4";
|
2024-05-22 18:24:47 +00:00
|
|
|
|
|
|
|
pyproject = true;
|
|
|
|
build-system = [ setuptools ];
|
2022-04-15 22:17:51 +00:00
|
|
|
|
2018-10-10 21:52:12 +00:00
|
|
|
disabled = pythonOlder "3.5";
|
|
|
|
|
|
|
|
src = fetchPypi {
|
2022-04-15 22:17:51 +00:00
|
|
|
pname = "BoltzTraP2";
|
|
|
|
inherit version;
|
2024-09-29 15:03:53 +00:00
|
|
|
hash = "sha256-BfGR7sY0E9r+RXA1fC9uy1GXC+EFV1RKOvMyvGcf+aE=";
|
2018-10-10 21:52:12 +00:00
|
|
|
};
|
|
|
|
|
2024-05-22 18:24:47 +00:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace setup.py \
|
|
|
|
--replace-fail "USE_CYTHON = False" "USE_CYTHON = True"
|
|
|
|
'';
|
|
|
|
|
2019-09-16 19:49:23 +00:00
|
|
|
dontUseCmakeConfigure = true;
|
|
|
|
|
2022-04-15 22:17:51 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
cmake
|
|
|
|
cython
|
|
|
|
];
|
|
|
|
|
2024-05-22 18:24:47 +00:00
|
|
|
dependencies = [
|
2022-04-15 22:17:51 +00:00
|
|
|
spglib
|
|
|
|
numpy
|
|
|
|
scipy
|
|
|
|
matplotlib
|
|
|
|
ase
|
|
|
|
netcdf4
|
|
|
|
];
|
2018-10-10 21:52:12 +00:00
|
|
|
|
|
|
|
# pypi release does no include files for tests
|
|
|
|
doCheck = false;
|
|
|
|
|
2022-04-15 22:17:51 +00:00
|
|
|
pythonImportsCheck = [ "BoltzTraP2" ];
|
2018-10-10 21:52:12 +00:00
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2018-10-10 21:52:12 +00:00
|
|
|
description = "Band-structure interpolator and transport coefficient calculator";
|
2024-03-19 02:14:51 +00:00
|
|
|
mainProgram = "btp2";
|
2022-04-15 22:17:51 +00:00
|
|
|
homepage = "http://www.boltztrap.org/";
|
|
|
|
license = licenses.gpl3Plus;
|
2024-07-28 14:44:11 +00:00
|
|
|
maintainers = [ ];
|
2018-10-10 21:52:12 +00:00
|
|
|
};
|
|
|
|
}
|