about summary refs log tree commit diff
path: root/pkgs/tools/misc/unicode
diff options
context:
space:
mode:
authorFrank Doepper <woffs@woffs.de>2017-09-28 09:16:09 +0200
committerFrank Doepper <woffs@woffs.de>2017-09-28 09:53:41 +0200
commitbe1209918bef9aca66e4c87b29f8239e0728f165 (patch)
tree7f5061d5c453f7e01e01d3eca9e3a8136463decc /pkgs/tools/misc/unicode
parent56d1a14419cceca3c448c384ce7a98909987f6db (diff)
unicode: init at 2.5
Diffstat (limited to 'pkgs/tools/misc/unicode')
-rw-r--r--pkgs/tools/misc/unicode/default.nix30
1 files changed, 30 insertions, 0 deletions
diff --git a/pkgs/tools/misc/unicode/default.nix b/pkgs/tools/misc/unicode/default.nix
new file mode 100644
index 0000000000000..2b1f5da6e2f97
--- /dev/null
+++ b/pkgs/tools/misc/unicode/default.nix
@@ -0,0 +1,30 @@
+{ stdenv, fetchFromGitHub, fetchurl, python3Packages }:
+
+python3Packages.buildPythonApplication rec {
+  name = "unicode-${version}";
+  version = "2.5";
+
+  src = fetchFromGitHub {
+    owner = "garabik";
+    repo = "unicode";
+    rev = "v${version}";
+    sha256 = "0vg1zshlzgdva8gzw6fya28fc4jhypjkj743x3q0yabx6934k0g2";
+  };
+
+  ucdtxt = fetchurl {
+    url = http://www.unicode.org/Public/11.0.0/ucd/UnicodeData-11.0.0d1.txt;
+    sha256 = "0y9l0sap7yq7c7c8d0fivzycqaw0zncbxzh1inggg42308z974rn";
+  };
+
+  postFixup = ''
+    substituteInPlace "$out/bin/.unicode-wrapped" \
+      --replace "/usr/share/unicode/UnicodeData.txt" "$ucdtxt"
+  '';
+
+  meta = with stdenv.lib; {
+    description = "Display unicode character properties";
+    homepage = https://github.com/garabik/unicode;
+    license = licenses.gpl3;
+    maintainers = [ maintainers.woffs ];
+  };
+}