Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ lib 2, buildPythonPackage 3, fetchPypi 4, pathlib2 5, typing 6, isPy3k 7, pythonOlder 8, python 9}: 10 11buildPythonPackage rec { 12 pname = "importlib_resources"; 13 version = "1.0.2"; 14 15 src = fetchPypi { 16 inherit pname version; 17 sha256 = "d3279fd0f6f847cced9f7acc19bd3e5df54d34f93a2e7bb5f238f81545787078"; 18 }; 19 20 propagatedBuildInputs = [ 21 ] ++ lib.optional (!isPy3k) pathlib2 22 ++ lib.optional (pythonOlder "3.5") typing 23 ; 24 25 checkPhase = '' 26 ${python.interpreter} -m unittest discover 27 ''; 28 29 meta = with lib; { 30 description = "Read resources from Python packages"; 31 homepage = https://importlib-resources.readthedocs.io/; 32 license = licenses.asl20; 33 }; 34}