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