2019-02-24 18:12:55 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
2021-05-07 20:45:59 +01:00
|
|
|
, pythonOlder
|
|
|
|
, msgpack
|
2021-05-08 08:49:58 +01:00
|
|
|
, pytestCheckHook
|
2019-02-24 18:12:55 +00:00
|
|
|
, numpy
|
2021-08-26 20:32:39 +01:00
|
|
|
, pandas
|
2021-05-07 20:45:59 +01:00
|
|
|
, pydantic
|
2019-02-24 18:12:55 +00:00
|
|
|
, pymongo
|
2021-11-01 20:59:40 +00:00
|
|
|
, ruamel-yaml
|
2021-05-07 20:45:59 +01:00
|
|
|
, tqdm
|
2019-02-24 18:12:55 +00:00
|
|
|
}:
|
2018-06-22 12:54:26 +01:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "monty";
|
2022-12-30 19:13:26 +00:00
|
|
|
version = "2022.9.9";
|
2021-05-07 20:45:59 +01:00
|
|
|
disabled = pythonOlder "3.5"; # uses type annotations
|
2018-06-22 12:54:26 +01:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "materialsvirtuallab";
|
|
|
|
repo = pname;
|
2022-05-02 16:40:23 +01:00
|
|
|
rev = "refs/tags/v${version}";
|
2022-12-30 19:13:26 +00:00
|
|
|
sha256 = "sha256-7ToNiRSWxe9nNcaWWmS6bhVqWMEwXN4uiwtjAmuK5qw=";
|
2018-06-22 12:54:26 +01:00
|
|
|
};
|
|
|
|
|
2021-08-26 20:32:39 +01:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace tests/test_os.py \
|
|
|
|
--replace 'self.assertEqual("/usr/bin/find", which("/usr/bin/find"))' '#'
|
|
|
|
'';
|
|
|
|
|
2021-05-07 20:45:59 +01:00
|
|
|
propagatedBuildInputs = [
|
2021-11-01 20:59:40 +00:00
|
|
|
ruamel-yaml
|
2021-05-07 20:45:59 +01:00
|
|
|
tqdm
|
|
|
|
msgpack
|
|
|
|
];
|
2019-02-24 18:12:55 +00:00
|
|
|
|
2021-05-07 20:45:59 +01:00
|
|
|
checkInputs = [
|
2021-05-08 08:49:58 +01:00
|
|
|
pytestCheckHook
|
2021-05-07 20:45:59 +01:00
|
|
|
numpy
|
2021-08-26 20:32:39 +01:00
|
|
|
pandas
|
2021-05-07 20:45:59 +01:00
|
|
|
pydantic
|
|
|
|
pymongo
|
|
|
|
];
|
2020-04-06 20:21:27 +01:00
|
|
|
|
2019-02-24 18:12:55 +00:00
|
|
|
meta = with lib; {
|
2018-06-22 14:46:51 +01:00
|
|
|
description = "Serves as a complement to the Python standard library by providing a suite of tools to solve many common problems";
|
2018-06-22 12:54:26 +01:00
|
|
|
longDescription = "
|
2019-02-24 18:12:55 +00:00
|
|
|
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
|
2018-06-22 12:54:26 +01:00
|
|
|
patterns such as singleton and cached_class, and many more.
|
|
|
|
";
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "https://github.com/materialsvirtuallab/monty";
|
2018-06-22 12:54:26 +01:00
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ psyanticy ];
|
|
|
|
};
|
|
|
|
}
|