2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
cython,
|
|
|
|
datamodeldict,
|
|
|
|
fetchFromGitHub,
|
|
|
|
matplotlib,
|
|
|
|
numericalunits,
|
|
|
|
numpy,
|
|
|
|
pandas,
|
|
|
|
phonopy,
|
|
|
|
potentials,
|
|
|
|
pytestCheckHook,
|
|
|
|
pythonOlder,
|
|
|
|
requests,
|
|
|
|
scipy,
|
|
|
|
setuptools,
|
|
|
|
toolz,
|
|
|
|
xmltodict,
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
2024-07-31 10:19:44 +00:00
|
|
|
buildPythonPackage rec {
|
2020-04-24 23:36:52 +00:00
|
|
|
pname = "atomman";
|
2024-07-31 10:19:44 +00:00
|
|
|
version = "1.4.11";
|
2024-05-15 15:35:15 +00:00
|
|
|
pyproject = true;
|
2021-12-06 16:07:01 +00:00
|
|
|
|
2024-07-31 10:19:44 +00:00
|
|
|
disabled = pythonOlder "3.8";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "usnistgov";
|
2021-12-06 16:07:01 +00:00
|
|
|
repo = "atomman";
|
2024-07-31 10:19:44 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
|
|
|
hash = "sha256-2yxHv9fSgLM5BeUkXV9NX+xyplXtyfWodwS9sVUVzqU=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2024-05-15 15:35:15 +00:00
|
|
|
build-system = [
|
2022-10-06 18:32:54 +00:00
|
|
|
setuptools
|
2024-05-15 15:35:15 +00:00
|
|
|
numpy
|
|
|
|
cython
|
2022-09-09 14:08:57 +00:00
|
|
|
];
|
|
|
|
|
2024-05-15 15:35:15 +00:00
|
|
|
dependencies = [
|
2021-12-06 16:07:01 +00:00
|
|
|
datamodeldict
|
|
|
|
matplotlib
|
|
|
|
numericalunits
|
|
|
|
numpy
|
|
|
|
pandas
|
|
|
|
potentials
|
2022-04-03 18:54:34 +00:00
|
|
|
requests
|
2021-12-06 16:07:01 +00:00
|
|
|
scipy
|
|
|
|
toolz
|
|
|
|
xmltodict
|
|
|
|
];
|
|
|
|
|
2024-07-31 10:19:44 +00:00
|
|
|
pythonRelaxDeps = [ "atomman" ];
|
2022-12-02 08:20:57 +00:00
|
|
|
|
2022-09-09 14:08:57 +00:00
|
|
|
preCheck = ''
|
|
|
|
# By default, pytestCheckHook imports atomman from the current directory
|
|
|
|
# instead of from where `pip` installs it and fails due to missing Cython
|
|
|
|
# modules. Fix this by removing atomman from the current directory.
|
|
|
|
#
|
|
|
|
rm -r atomman
|
|
|
|
'';
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2022-04-03 18:54:34 +00:00
|
|
|
phonopy
|
2022-09-09 14:08:57 +00:00
|
|
|
pytestCheckHook
|
2021-12-06 16:07:01 +00:00
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-09-09 14:08:57 +00:00
|
|
|
disabledTests = [
|
|
|
|
"test_unique_shifts_prototype" # needs network access to download database files
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
pythonImportsCheck = [ "atomman" ];
|
2021-12-06 16:07:01 +00:00
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2024-07-31 10:19:44 +00:00
|
|
|
changelog = "https://github.com/usnistgov/atomman/blob/${src.rev}/UPDATES.rst";
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Atomistic Manipulation Toolkit";
|
2021-12-06 16:07:01 +00:00
|
|
|
homepage = "https://github.com/usnistgov/atomman/";
|
2020-04-24 23:36:52 +00:00
|
|
|
license = licenses.mit;
|
2024-07-31 10:19:44 +00:00
|
|
|
maintainers = [ ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|