2022-07-18 16:21:45 +00:00
|
|
|
{ lib, fetchFromGitHub, fetchurl, python3Packages, installShellFiles, gitUpdater }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
python3Packages.buildPythonApplication rec {
|
|
|
|
pname = "unicode";
|
2022-07-18 16:21:45 +00:00
|
|
|
version = "2.9";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "garabik";
|
|
|
|
repo = "unicode";
|
|
|
|
rev = "v${version}";
|
2022-07-18 16:21:45 +00:00
|
|
|
sha256 = "sha256-FHAlZ5HID/FE9+YR7Dmc3Uh7E16QKORoD8g9jgTeQdY=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
ucdtxt = fetchurl {
|
2022-09-22 12:36:57 +00:00
|
|
|
url = "https://www.unicode.org/Public/15.0.0/ucd/UnicodeData.txt";
|
|
|
|
sha256 = "sha256-gG6a7WUDcZfx7IXhK+bozYcPxWCLTeD//ZkPaJ83anM=";
|
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
|
|
|
|
'';
|
|
|
|
|
2022-07-18 16:21:45 +00:00
|
|
|
passthru.updateScript = gitUpdater {
|
|
|
|
rev-prefix = "v";
|
|
|
|
};
|
|
|
|
|
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;
|
|
|
|
};
|
|
|
|
}
|