nixpkgs/pkgs/tools/misc/unicode/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

44 lines
1.1 KiB
Nix
Raw Normal View History

{ lib, fetchFromGitHub, fetchurl, python3Packages, installShellFiles, gitUpdater }:
2017-09-28 07:16:09 +00:00
python3Packages.buildPythonApplication rec {
2020-03-29 10:34:50 +00:00
pname = "unicode";
version = "2.9";
2017-09-28 07:16:09 +00:00
src = fetchFromGitHub {
owner = "garabik";
repo = "unicode";
rev = "v${version}";
sha256 = "sha256-FHAlZ5HID/FE9+YR7Dmc3Uh7E16QKORoD8g9jgTeQdY=";
2017-09-28 07:16:09 +00:00
};
ucdtxt = fetchurl {
url = "https://www.unicode.org/Public/14.0.0/ucd/UnicodeData.txt";
sha256 = "sha256-NgGOaGV/3LNIX2NmMP/oyFMuAcl3cD0oA/W4nWxf6vs=";
2017-09-28 07:16:09 +00:00
};
nativeBuildInputs = [ installShellFiles ];
2017-09-28 07:16:09 +00:00
postFixup = ''
substituteInPlace "$out/bin/.unicode-wrapped" \
--replace "/usr/share/unicode/UnicodeData.txt" "$ucdtxt"
'';
postInstall = ''
installManPage paracode.1 unicode.1
'';
passthru.updateScript = gitUpdater {
inherit version;
pname = "unicode-paracode";
rev-prefix = "v";
};
meta = with lib; {
2017-09-28 07:16:09 +00:00
description = "Display unicode character properties";
homepage = "https://github.com/garabik/unicode";
2017-09-28 07:16:09 +00:00
license = licenses.gpl3;
maintainers = [ maintainers.woffs ];
platforms = platforms.all;
2017-09-28 07:16:09 +00:00
};
}