Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ lib, buildPythonPackage, fetchPypi 2, pytestCheckHook 3, pytest-forked 4, py 5, python 6, six }: 7 8buildPythonPackage rec { 9 pname = "lazy_import"; 10 version = "0.2.2"; 11 12 src = fetchPypi { 13 inherit pname version; 14 sha256 = "0gca9xj60qr3aprj9qdc66crr4r7hl8wzv6gc9y40nclazwawj91"; 15 }; 16 17 nativeCheckInputs = [ 18 pytestCheckHook 19 pytest-forked 20 py 21 ]; 22 23 propagatedBuildInputs = [ 24 six 25 ]; 26 27 preCheck = '' 28 # avoid AttributeError: module 'py' has no attribute 'process' 29 export PYTHONPATH=${py}/${python.sitePackages}:$PYTHONPATH 30 ''; 31 32 pytestFlagsArray = [ 33 "--forked" 34 ]; 35 36 meta = with lib; { 37 description = "A set of functions that load modules, and related attributes, in a lazy fashion"; 38 homepage = "https://github.com/mnmelo/lazy_import"; 39 license = licenses.gpl3Plus; 40 maintainers = [ ]; 41 }; 42}