lol
1{ lib, fetchFromGitHub, fetchurl, python3Packages, installShellFiles }:
2
3python3Packages.buildPythonApplication rec {
4 pname = "unicode";
5 version = "2.7";
6
7 src = fetchFromGitHub {
8 owner = "garabik";
9 repo = "unicode";
10 rev = "v${version}";
11 sha256 = "15d9yvarxsiy0whx1mxzsjnnkrjdm3ga4qv2yy398mk0jh763q9v";
12 };
13
14 ucdtxt = fetchurl {
15 url = "https://www.unicode.org/Public/13.0.0/ucd/UnicodeData.txt";
16 sha256 = "1fz8fcd23lxyl97ay8h42zvkcgcg8l81b2dm05nklkddr2zzpgxx";
17 };
18
19 nativeBuildInputs = [ installShellFiles ];
20
21 postFixup = ''
22 substituteInPlace "$out/bin/.unicode-wrapped" \
23 --replace "/usr/share/unicode/UnicodeData.txt" "$ucdtxt"
24 '';
25
26 postInstall = ''
27 installManPage paracode.1 unicode.1
28 '';
29
30 meta = with lib; {
31 description = "Display unicode character properties";
32 homepage = "https://github.com/garabik/unicode";
33 license = licenses.gpl3;
34 maintainers = [ maintainers.woffs ];
35 platforms = platforms.all;
36 };
37}