2021-01-25 09:26:54 +01:00
|
|
|
{ lib, fetchFromGitHub, fetchurl, python3Packages, installShellFiles }:
|
2017-09-28 09:16:09 +02:00
|
|
|
|
|
|
|
python3Packages.buildPythonApplication rec {
|
2020-03-29 12:34:50 +02:00
|
|
|
pname = "unicode";
|
2020-06-19 12:30:58 +02:00
|
|
|
version = "2.7";
|
2017-09-28 09:16:09 +02:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "garabik";
|
|
|
|
repo = "unicode";
|
|
|
|
rev = "v${version}";
|
2020-06-19 12:30:58 +02:00
|
|
|
sha256 = "15d9yvarxsiy0whx1mxzsjnnkrjdm3ga4qv2yy398mk0jh763q9v";
|
2017-09-28 09:16:09 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
ucdtxt = fetchurl {
|
2020-06-19 12:30:58 +02:00
|
|
|
url = "https://www.unicode.org/Public/13.0.0/ucd/UnicodeData.txt";
|
|
|
|
sha256 = "1fz8fcd23lxyl97ay8h42zvkcgcg8l81b2dm05nklkddr2zzpgxx";
|
2017-09-28 09:16:09 +02:00
|
|
|
};
|
|
|
|
|
2020-06-19 12:30:58 +02:00
|
|
|
nativeBuildInputs = [ installShellFiles ];
|
|
|
|
|
2017-09-28 09:16:09 +02:00
|
|
|
postFixup = ''
|
|
|
|
substituteInPlace "$out/bin/.unicode-wrapped" \
|
|
|
|
--replace "/usr/share/unicode/UnicodeData.txt" "$ucdtxt"
|
|
|
|
'';
|
|
|
|
|
2020-06-19 12:30:58 +02:00
|
|
|
postInstall = ''
|
|
|
|
installManPage paracode.1 unicode.1
|
|
|
|
'';
|
|
|
|
|
2021-01-11 08:54:33 +01:00
|
|
|
meta = with lib; {
|
2017-09-28 09:16:09 +02:00
|
|
|
description = "Display unicode character properties";
|
2020-04-01 03:11:51 +02:00
|
|
|
homepage = "https://github.com/garabik/unicode";
|
2017-09-28 09:16:09 +02:00
|
|
|
license = licenses.gpl3;
|
|
|
|
maintainers = [ maintainers.woffs ];
|
2017-10-08 18:53:28 +02:00
|
|
|
platforms = platforms.all;
|
2017-09-28 09:16:09 +02:00
|
|
|
};
|
|
|
|
}
|