summary refs log tree commit diff
path: root/pkgs/data
diff options
context:
space:
mode:
authorJan Tojnar <jtojnar@gmail.com>2019-12-07 12:10:44 +0100
committerGitHub <noreply@github.com>2019-12-07 12:10:44 +0100
commit36de08ebe13a751aa24babe2f3d711c45c208496 (patch)
tree253f87aa0225f238cc260dc0f29037daffd8c849 /pkgs/data
parent928fdab4a100be81739592d115ff7fc734fae3ca (diff)
parentf6afb29ee1c3a60e4dd98916a81ca79b3dc9feee (diff)
downloadnixpkgs-36de08ebe13a751aa24babe2f3d711c45c208496.tar
nixpkgs-36de08ebe13a751aa24babe2f3d711c45c208496.tar.gz
nixpkgs-36de08ebe13a751aa24babe2f3d711c45c208496.tar.bz2
nixpkgs-36de08ebe13a751aa24babe2f3d711c45c208496.tar.lz
nixpkgs-36de08ebe13a751aa24babe2f3d711c45c208496.tar.xz
nixpkgs-36de08ebe13a751aa24babe2f3d711c45c208496.tar.zst
nixpkgs-36de08ebe13a751aa24babe2f3d711c45c208496.zip
Merge pull request #71442 from jtojnar/ibus-fixes
Fix/clean up various ibus-engines
Diffstat (limited to 'pkgs/data')
-rw-r--r--pkgs/data/misc/cldr-emoji-annotation/default.nix27
-rw-r--r--pkgs/data/misc/unicode-character-database/default.nix38
-rw-r--r--pkgs/data/misc/unicode-emoji/default.nix59
-rw-r--r--pkgs/data/misc/unihan-database/default.nix38
4 files changed, 162 insertions, 0 deletions
diff --git a/pkgs/data/misc/cldr-emoji-annotation/default.nix b/pkgs/data/misc/cldr-emoji-annotation/default.nix
new file mode 100644
index 00000000000..4279cf8aec4
--- /dev/null
+++ b/pkgs/data/misc/cldr-emoji-annotation/default.nix
@@ -0,0 +1,27 @@
+{ stdenv
+, fetchFromGitHub
+, autoreconfHook
+}:
+
+stdenv.mkDerivation rec {
+  pname = "cldr-emoji-annotation";
+  version = "36.12.120191002_0";
+
+  src = fetchFromGitHub {
+    owner = "fujiwarat";
+    repo = "cldr-emoji-annotation";
+    rev = version;
+    sha256 = "0nxigzs3mxjgi7c8mmdaxsy5sfl7ihsc2nysaj0db198b33w9clw";
+  };
+
+  nativeBuildInputs = [
+    autoreconfHook
+  ];
+
+  meta = with stdenv.lib; {
+    description = "Emoji annotation files in CLDR";
+    homepage = "https://www.unicode.org/";
+    license = licenses.free; # https://www.unicode.org/license.html
+    platforms = platforms.all;
+  };
+}
diff --git a/pkgs/data/misc/unicode-character-database/default.nix b/pkgs/data/misc/unicode-character-database/default.nix
new file mode 100644
index 00000000000..5f50049856f
--- /dev/null
+++ b/pkgs/data/misc/unicode-character-database/default.nix
@@ -0,0 +1,38 @@
+{ stdenv
+, fetchurl
+, unzip
+}:
+
+stdenv.mkDerivation rec {
+  pname = "unicode-character-database";
+  version = "12.1.0";
+
+  src = fetchurl {
+    url = "https://www.unicode.org/Public/zipped/${version}/UCD.zip";
+    sha256 = "19m06iw0jl7lhlggcmghi12p6jld0qrmfpksgc243yn6sjh53fi5";
+  };
+
+  nativeBuildInputs = [
+    unzip
+  ];
+
+  setSourceRoot = ''
+    sourceRoot=$PWD
+  '';
+
+  installPhase = ''
+    runHook preInstall
+
+    mkdir -p $out/share/unicode
+    cp -r * $out/share/unicode
+
+    runHook postInstall
+  '';
+
+  meta = with stdenv.lib; {
+    description = "Unicode Character Database";
+    homepage = "https://www.unicode.org/";
+    license = licenses.free; # https://www.unicode.org/license.html
+    platforms = platforms.all;
+  };
+}
diff --git a/pkgs/data/misc/unicode-emoji/default.nix b/pkgs/data/misc/unicode-emoji/default.nix
new file mode 100644
index 00000000000..05472b26d88
--- /dev/null
+++ b/pkgs/data/misc/unicode-emoji/default.nix
@@ -0,0 +1,59 @@
+{ stdenv
+, fetchurl
+, symlinkJoin
+, lib
+}:
+
+let
+  version = "12.1";
+
+  fetchData = { file, sha256 }: fetchurl {
+    url = "https://www.unicode.org/Public/emoji/${version}/${file}";
+    inherit sha256;
+    downloadToTemp = true;
+    recursiveHash = true;
+    postFetch = ''
+      installDir="$out/share/unicode/emoji"
+      mkdir -p "$installDir"
+      mv "$downloadedFile" "$installDir/${file}"
+    '';
+  };
+
+  srcs = {
+    emoji-data = fetchData {
+      file = "emoji-data.txt";
+      sha256 = "17gfm5a28lsymx36prbjy2g0b27gf3rcgggy0yxdshbxwf6zpf9k";
+    };
+    emoji-sequences = fetchData {
+      file = "emoji-sequences.txt";
+      sha256 = "1fckw5hfyvz5jfp2jczzx8qcs79vf0zyq0z2942230j99arq70vc";
+    };
+    emoji-test = fetchData {
+      file = "emoji-test.txt";
+      sha256 = "0w29lva7gp9g9lf7bz1i24qdalvf440bcq8npsbwr3cpp7na95kh";
+    };
+    emoji-variation-sequences = fetchData {
+      file = "emoji-variation-sequences.txt";
+      sha256 = "0akpib3cinr8xcs045hda5wnpfj6qfdjlkzmq5vgdc50gyhrd2z3";
+    };
+    emoji-zwj-sequences = fetchData {
+      file = "emoji-zwj-sequences.txt";
+      sha256 = "0s2mvy1nr2v1x0rr1fxlsv8ly1vyf9978rb4hwry5vnr678ls522";
+    };
+  };
+in
+
+symlinkJoin rec {
+  name = "unicode-emoji-${version}";
+
+  paths = lib.attrValues srcs;
+
+  passthru = srcs;
+
+  meta = with stdenv.lib; {
+    description = "Unicode Emoji Data Files";
+    homepage = "https://home.unicode.org/emoji/";
+    license = licenses.free; # https://www.unicode.org/license.html
+    platforms = platforms.all;
+  };
+}
diff --git a/pkgs/data/misc/unihan-database/default.nix b/pkgs/data/misc/unihan-database/default.nix
new file mode 100644
index 00000000000..77da77242a9
--- /dev/null
+++ b/pkgs/data/misc/unihan-database/default.nix
@@ -0,0 +1,38 @@
+{ stdenv
+, fetchurl
+, unzip
+}:
+
+stdenv.mkDerivation rec {
+  pname = "unihan-database";
+  version = "12.1.0";
+
+  src = fetchurl {
+    url = "https://www.unicode.org/Public/zipped/${version}/Unihan.zip";
+    sha256 = "1kfdhgg2gm52x3s07bijb5cxjy0jxwhd097k5lqhvzpznprm6ibf";
+  };
+
+  nativeBuildInputs = [
+    unzip
+  ];
+
+  setSourceRoot = ''
+    sourceRoot=$PWD
+  '';
+
+  installPhase = ''
+    runHook preInstall
+
+    mkdir -p $out/share/unicode
+    cp -r * $out/share/unicode
+
+    runHook postInstall
+  '';
+
+  meta = with stdenv.lib; {
+    description = "Unicode Han Database";
+    homepage = "https://www.unicode.org/";
+    license = licenses.free; # https://www.unicode.org/license.html
+    platforms = platforms.all;
+  };
+}