Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at 20.09-beta 55 lines 1.6 kB view raw
1{ lib 2, buildPythonPackage 3, fetchFromGitHub 4, isPy27 5, nose 6, numpy 7, six 8, ruamel_yaml 9, msgpack 10, coverage 11, coveralls 12, pymongo 13, lsof 14}: 15 16buildPythonPackage rec { 17 pname = "monty"; 18 version = "3.0.2"; 19 disabled = isPy27; # uses type annotations 20 21 # No tests in Pypi 22 src = fetchFromGitHub { 23 owner = "materialsvirtuallab"; 24 repo = pname; 25 rev = "v${version}"; 26 sha256 = "1wxqxp0j7i6czdpr2r1imgmy3qbgn2l7d4za2h1lg3hllvx6jra1"; 27 }; 28 29 checkInputs = [ lsof nose numpy msgpack coverage coveralls pymongo]; 30 propagatedBuildInputs = [ six ruamel_yaml ]; 31 32 # test suite tries to decode bytes, but msgpack now returns a str 33 # https://github.com/materialsvirtuallab/monty/pull/121 34 postPatch = '' 35 substituteInPlace tests/test_serialization.py \ 36 --replace ".decode('utf-8')" "" 37 ''; 38 39 preCheck = '' 40 substituteInPlace tests/test_os.py \ 41 --replace 'self.assertEqual("/usr/bin/find", which("/usr/bin/find"))' '#' 42 ''; 43 44 meta = with lib; { 45 description = "Serves as a complement to the Python standard library by providing a suite of tools to solve many common problems"; 46 longDescription = " 47 Monty implements supplementary useful functions for Python that are not part of the 48 standard library. Examples include useful utilities like transparent support for zipped files, useful design 49 patterns such as singleton and cached_class, and many more. 50 "; 51 homepage = "https://github.com/materialsvirtuallab/monty"; 52 license = licenses.mit; 53 maintainers = with maintainers; [ psyanticy ]; 54 }; 55}