2022-07-15 10:19:33 +01:00
|
|
|
{ lib, fetchFromGitHub, fetchurl, python3Packages, installShellFiles, gitUpdater }:
|
2017-09-28 08:16:09 +01:00
|
|
|
|
|
|
|
python3Packages.buildPythonApplication rec {
|
2020-03-29 11:34:50 +01:00
|
|
|
pname = "unicode";
|
2022-07-15 10:19:33 +01:00
|
|
|
version = "2.9";
|
2017-09-28 08:16:09 +01:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "garabik";
|
|
|
|
repo = "unicode";
|
|
|
|
rev = "v${version}";
|
2022-07-15 10:19:33 +01:00
|
|
|
sha256 = "sha256-FHAlZ5HID/FE9+YR7Dmc3Uh7E16QKORoD8g9jgTeQdY=";
|
2017-09-28 08:16:09 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
ucdtxt = fetchurl {
|
2022-09-14 21:57:13 +01:00
|
|
|
url = "https://www.unicode.org/Public/15.0.0/ucd/UnicodeData.txt";
|
|
|
|
sha256 = "sha256-gG6a7WUDcZfx7IXhK+bozYcPxWCLTeD//ZkPaJ83anM=";
|
2017-09-28 08:16:09 +01:00
|
|
|
};
|
|
|
|
|
2020-06-19 11:30:58 +01:00
|
|
|
nativeBuildInputs = [ installShellFiles ];
|
|
|
|
|
2017-09-28 08:16:09 +01:00
|
|
|
postFixup = ''
|
|
|
|
substituteInPlace "$out/bin/.unicode-wrapped" \
|
|
|
|
--replace "/usr/share/unicode/UnicodeData.txt" "$ucdtxt"
|
|
|
|
'';
|
|
|
|
|
2020-06-19 11:30:58 +01:00
|
|
|
postInstall = ''
|
|
|
|
installManPage paracode.1 unicode.1
|
|
|
|
'';
|
|
|
|
|
2022-07-15 10:19:33 +01:00
|
|
|
passthru.updateScript = gitUpdater {
|
|
|
|
rev-prefix = "v";
|
|
|
|
};
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2017-09-28 08:16:09 +01:00
|
|
|
description = "Display unicode character properties";
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "https://github.com/garabik/unicode";
|
2017-09-28 08:16:09 +01:00
|
|
|
license = licenses.gpl3;
|
|
|
|
maintainers = [ maintainers.woffs ];
|
2017-10-08 17:53:28 +01:00
|
|
|
platforms = platforms.all;
|
2017-09-28 08:16:09 +01:00
|
|
|
};
|
|
|
|
}
|