Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ stdenv, buildPythonPackage, fetchPypi, isPy3k, six, unittest2 }: 2 3let 4 testPath = 5 if isPy3k 6 then "test_*_py3.py" 7 else "test_*_py2_py3.py"; 8in 9 10buildPythonPackage rec { 11 pname = "dependency-injector"; 12 version = "3.14.4"; 13 14 src = fetchPypi { 15 inherit pname version; 16 sha256 = "ecac135cc4e5824b6bf8242679fc7225f44885877677701da6de7703f060f518"; 17 }; 18 19 propagatedBuildInputs = [ six ]; 20 checkInputs = [ unittest2 ]; 21 22 checkPhase = '' 23 unit2 discover -s tests/unit -p "${testPath}" 24 ''; 25 26 meta = with stdenv.lib; { 27 description = "Dependency injection microframework for Python"; 28 homepage = https://github.com/ets-labs/python-dependency-injector; 29 license = licenses.bsd3; 30 maintainers = with maintainers; [ gerschtli ]; 31 }; 32}