1{ 2 lib, 3 buildPythonPackage, 4 fetchPypi, 5 substituteAll, 6 filelock, 7 requests, 8 unicode-character-database, 9}: 10 11buildPythonPackage rec { 12 pname = "youseedee"; 13 version = "0.5.3"; 14 format = "setuptools"; 15 16 src = fetchPypi { 17 inherit pname version; 18 hash = "sha256-hQkI8kdropLiO86LXDy6eQma3FEg48gLldU7bFg9dzI="; 19 }; 20 21 patches = [ 22 # Load data files from the unicode-character-database package instead of 23 # downloading them from the internet. (nixpkgs-specific, not upstreamable) 24 (substituteAll { 25 src = ./0001-use-packaged-unicode-data.patch; 26 ucd_dir = "${unicode-character-database}/share/unicode"; 27 }) 28 ]; 29 30 propagatedBuildInputs = [ 31 filelock 32 requests 33 ]; 34 35 doCheck = true; 36 # Package has no unit tests, but we can check an example as per README.rst: 37 checkPhase = '' 38 runHook preCheck 39 python -m youseedee 0x078A | grep -q "'Block': 'Thaana'" 40 runHook postCheck 41 ''; 42 43 meta = with lib; { 44 description = "Python library for querying the Unicode Character Database"; 45 homepage = "https://github.com/simoncozens/youseedee"; 46 license = licenses.mit; 47 maintainers = with maintainers; [ danc86 ]; 48 }; 49}