1{ stdenv, fetchFromGitHub, fetchurl, python3Packages }:
2
3python3Packages.buildPythonApplication rec {
4 name = "unicode-${version}";
5 version = "2.5";
6
7 src = fetchFromGitHub {
8 owner = "garabik";
9 repo = "unicode";
10 rev = "v${version}";
11 sha256 = "0vg1zshlzgdva8gzw6fya28fc4jhypjkj743x3q0yabx6934k0g2";
12 };
13
14 ucdtxt = fetchurl {
15 url = http://www.unicode.org/Public/10.0.0/ucd/UnicodeData.txt;
16 sha256 = "1cfak1j753zcrbgixwgppyxhm4w8vda8vxhqymi7n5ljfi6kwhjj";
17 };
18
19 postFixup = ''
20 substituteInPlace "$out/bin/.unicode-wrapped" \
21 --replace "/usr/share/unicode/UnicodeData.txt" "$ucdtxt"
22 '';
23
24 meta = with stdenv.lib; {
25 description = "Display unicode character properties";
26 homepage = https://github.com/garabik/unicode;
27 license = licenses.gpl3;
28 maintainers = [ maintainers.woffs ];
29 platforms = platforms.all;
30 };
31}