2021-02-05 17:12:51 +00:00
|
|
|
{ lib, fetchFromGitHub, fetchurl, python3Packages, installShellFiles }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
python3Packages.buildPythonApplication rec {
|
|
|
|
pname = "unicode";
|
2020-06-15 15:56:04 +00:00
|
|
|
version = "2.7";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "garabik";
|
|
|
|
repo = "unicode";
|
|
|
|
rev = "v${version}";
|
2020-06-15 15:56:04 +00:00
|
|
|
sha256 = "15d9yvarxsiy0whx1mxzsjnnkrjdm3ga4qv2yy398mk0jh763q9v";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
ucdtxt = fetchurl {
|
2020-06-15 15:56:04 +00:00
|
|
|
url = "https://www.unicode.org/Public/13.0.0/ucd/UnicodeData.txt";
|
|
|
|
sha256 = "1fz8fcd23lxyl97ay8h42zvkcgcg8l81b2dm05nklkddr2zzpgxx";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2020-06-15 15:56:04 +00:00
|
|
|
nativeBuildInputs = [ installShellFiles ];
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
postFixup = ''
|
|
|
|
substituteInPlace "$out/bin/.unicode-wrapped" \
|
|
|
|
--replace "/usr/share/unicode/UnicodeData.txt" "$ucdtxt"
|
|
|
|
'';
|
|
|
|
|
2020-06-15 15:56:04 +00:00
|
|
|
postInstall = ''
|
|
|
|
installManPage paracode.1 unicode.1
|
|
|
|
'';
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Display unicode character properties";
|
|
|
|
homepage = "https://github.com/garabik/unicode";
|
|
|
|
license = licenses.gpl3;
|
|
|
|
maintainers = [ maintainers.woffs ];
|
|
|
|
platforms = platforms.all;
|
|
|
|
};
|
|
|
|
}
|