at 23.11-beta 41 lines 1.1 kB view raw
1{ lib, fetchFromGitHub, fetchurl, python3Packages, installShellFiles, gitUpdater }: 2 3python3Packages.buildPythonApplication rec { 4 pname = "unicode"; 5 version = "2.9"; 6 7 src = fetchFromGitHub { 8 owner = "garabik"; 9 repo = "unicode"; 10 rev = "v${version}"; 11 sha256 = "sha256-FHAlZ5HID/FE9+YR7Dmc3Uh7E16QKORoD8g9jgTeQdY="; 12 }; 13 14 ucdtxt = fetchurl { 15 url = "https://www.unicode.org/Public/15.0.0/ucd/UnicodeData.txt"; 16 sha256 = "sha256-gG6a7WUDcZfx7IXhK+bozYcPxWCLTeD//ZkPaJ83anM="; 17 }; 18 19 nativeBuildInputs = [ installShellFiles ]; 20 21 postFixup = '' 22 substituteInPlace "$out/bin/.unicode-wrapped" \ 23 --replace "/usr/share/unicode/UnicodeData.txt" "$ucdtxt" 24 ''; 25 26 postInstall = '' 27 installManPage paracode.1 unicode.1 28 ''; 29 30 passthru.updateScript = gitUpdater { 31 rev-prefix = "v"; 32 }; 33 34 meta = with lib; { 35 description = "Display unicode character properties"; 36 homepage = "https://github.com/garabik/unicode"; 37 license = licenses.gpl3; 38 maintainers = [ maintainers.woffs ]; 39 platforms = platforms.all; 40 }; 41}