nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{ lib
2, buildPythonPackage
3, fetchFromGitHub
4, pythonOlder
5, msgpack
6, pytestCheckHook
7, numpy
8, pydantic
9, pymongo
10, ruamel_yaml
11, tqdm
12}:
13
14buildPythonPackage rec {
15 pname = "monty";
16 version = "2021.3.3";
17 disabled = pythonOlder "3.5"; # uses type annotations
18
19 # No tests in Pypi
20 src = fetchFromGitHub {
21 owner = "materialsvirtuallab";
22 repo = pname;
23 rev = "v${version}";
24 sha256 = "1nbv0ys0fv70rgzskkk8gsfr9dsmm7ykim5wv36li840zsj83b1l";
25 };
26
27 propagatedBuildInputs = [
28 ruamel_yaml
29 tqdm
30 msgpack
31 ];
32
33 checkInputs = [
34 pytestCheckHook
35 numpy
36 pydantic
37 pymongo
38 ];
39
40 preCheck = ''
41 substituteInPlace tests/test_os.py \
42 --replace 'self.assertEqual("/usr/bin/find", which("/usr/bin/find"))' '#'
43 '';
44
45 meta = with lib; {
46 description = "Serves as a complement to the Python standard library by providing a suite of tools to solve many common problems";
47 longDescription = "
48 Monty implements supplementary useful functions for Python that are not part of the
49 standard library. Examples include useful utilities like transparent support for zipped files, useful design
50 patterns such as singleton and cached_class, and many more.
51 ";
52 homepage = "https://github.com/materialsvirtuallab/monty";
53 license = licenses.mit;
54 maintainers = with maintainers; [ psyanticy ];
55 };
56}