blob: c52a2bfad34cbc0826e0fbbf84351edc3d89fa0d (
plain)
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
47
48
49
50
51
52
53
54
55
56
|
{
lib,
buildPythonPackage,
fetchPypi,
replaceVars,
setuptools,
setuptools-scm,
filelock,
requests,
platformdirs,
unicode-character-database,
}:
buildPythonPackage rec {
pname = "youseedee";
version = "0.7.0";
pyproject = true;
src = fetchPypi {
inherit pname version;
hash = "sha256-b5gxBIr/mowzlG4/N0C22S1XTq0NAGTq1/+iMUfxD18=";
};
patches = [
# Load data files from the unicode-character-database package instead of
# downloading them from the internet. (nixpkgs-specific, not upstreamable)
(replaceVars ./0001-use-packaged-unicode-data.patch {
ucd_dir = "${unicode-character-database}/share/unicode";
})
];
build-system = [
setuptools
setuptools-scm
];
dependencies = [
filelock
requests
platformdirs
];
# Package has no unit tests, but we can check an example as per README.rst:
checkPhase = ''
runHook preCheck
python -m youseedee 0x078A | grep -qE "Block\s+Thaana"
runHook postCheck
'';
meta = {
description = "Python library for querying the Unicode Character Database";
homepage = "https://github.com/simoncozens/youseedee";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ danc86 ];
};
}
|