2020-04-24 23:36:52 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
2021-05-20 23:08:51 +00:00
|
|
|
, pythonOlder
|
2020-04-24 23:36:52 +00:00
|
|
|
, msgpack
|
2021-05-20 23:08:51 +00:00
|
|
|
, pytestCheckHook
|
|
|
|
, numpy
|
2021-09-18 10:52:07 +00:00
|
|
|
, pandas
|
2021-05-20 23:08:51 +00:00
|
|
|
, pydantic
|
2020-04-24 23:36:52 +00:00
|
|
|
, pymongo
|
2021-12-06 16:07:01 +00:00
|
|
|
, ruamel-yaml
|
2021-05-20 23:08:51 +00:00
|
|
|
, tqdm
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "monty";
|
2023-01-20 10:41:00 +00:00
|
|
|
version = "2022.9.9";
|
2021-05-20 23:08:51 +00:00
|
|
|
disabled = pythonOlder "3.5"; # uses type annotations
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "materialsvirtuallab";
|
|
|
|
repo = pname;
|
2022-04-27 09:35:20 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
2023-01-20 10:41:00 +00:00
|
|
|
sha256 = "sha256-7ToNiRSWxe9nNcaWWmS6bhVqWMEwXN4uiwtjAmuK5qw=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2021-09-18 10:52:07 +00:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace tests/test_os.py \
|
|
|
|
--replace 'self.assertEqual("/usr/bin/find", which("/usr/bin/find"))' '#'
|
|
|
|
'';
|
|
|
|
|
2021-05-20 23:08:51 +00:00
|
|
|
propagatedBuildInputs = [
|
2021-12-06 16:07:01 +00:00
|
|
|
ruamel-yaml
|
2021-05-20 23:08:51 +00:00
|
|
|
tqdm
|
|
|
|
msgpack
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-05-20 23:08:51 +00:00
|
|
|
checkInputs = [
|
|
|
|
pytestCheckHook
|
|
|
|
numpy
|
2021-09-18 10:52:07 +00:00
|
|
|
pandas
|
2021-05-20 23:08:51 +00:00
|
|
|
pydantic
|
|
|
|
pymongo
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Serves as a complement to the Python standard library by providing a suite of tools to solve many common problems";
|
|
|
|
longDescription = "
|
|
|
|
Monty implements supplementary useful functions for Python that are not part of the
|
|
|
|
standard library. Examples include useful utilities like transparent support for zipped files, useful design
|
|
|
|
patterns such as singleton and cached_class, and many more.
|
|
|
|
";
|
|
|
|
homepage = "https://github.com/materialsvirtuallab/monty";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ psyanticy ];
|
|
|
|
};
|
|
|
|
}
|