unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: Leo Prikler <leo.prikler@student.tugraz.at>
To: 39086@debbugs.gnu.org
Cc: Ricardo Wurmus <rekado@elephly.net>
Subject: [bug#39086] [PATCH 2/5] gnu: Add unicode-emoji.
Date: Fri, 17 Jan 2020 01:19:03 +0100	[thread overview]
Message-ID: <20200117001905.21023-2-leo.prikler@student.tugraz.at> (raw)
In-Reply-To: <20200111120829.29821-1-leo.prikler@student.tugraz.at>

* gnu/packages/unicode.scm: New file.
(unicode-emoji-file): New procedure.
(unicode-emoji): New variable.
* gnu/local.mk: Add unicode.scm to build.
---
 gnu/local.mk             |  1 +
 gnu/packages/unicode.scm | 81 ++++++++++++++++++++++++++++++++++++++++
 2 files changed, 82 insertions(+)
 create mode 100644 gnu/packages/unicode.scm

diff --git a/gnu/local.mk b/gnu/local.mk
index cb46ee7880..f61a67a1ce 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -497,6 +497,7 @@ GNU_SYSTEM_MODULES =				\
   %D%/packages/tor.scm				\
   %D%/packages/tv.scm				\
   %D%/packages/uml.scm				\
+  %D%/packages/unicode.scm			\
   %D%/packages/unrtf.scm			\
   %D%/packages/upnp.scm				\
   %D%/packages/usb-modeswitch.scm		\
diff --git a/gnu/packages/unicode.scm b/gnu/packages/unicode.scm
new file mode 100644
index 0000000000..ab64827a0c
--- /dev/null
+++ b/gnu/packages/unicode.scm
@@ -0,0 +1,81 @@
+;;; GNU Guix --- Functional package management for GNU
+;;; Copyright © 2020 Leo Prikler <leo.prikler@student.tugraz.at>
+;;;
+;;; This file is part of GNU Guix.
+;;;
+;;; GNU Guix is free software; you can redistribute it and/or modify it
+;;; under the terms of the GNU General Public License as published by
+;;; the Free Software Foundation; either version 3 of the License, or (at
+;;; your option) any later version.
+;;;
+;;; GNU Guix is distributed in the hope that it will be useful, but
+;;; WITHOUT ANY WARRANTY; without even the implied warranty of
+;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;;; GNU General Public License for more details.
+;;;
+;;; You should have received a copy of the GNU General Public License
+;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.
+
+(define-module (gnu packages unicode)
+  #:use-module (guix licenses)
+  #:use-module (guix packages)
+  #:use-module (guix download)
+  #:use-module (guix build-system trivial))
+
+(define (unicode-emoji-file name version hash)
+  (origin
+    (method url-fetch)
+    (uri (string-append "https://www.unicode.org/Public/emoji/"
+                        version
+                        "/emoji-" name ".txt"))
+    (sha256 (base32 hash))))
+
+(define-public unicode-emoji
+  (package
+    (name "unicode-emoji")
+    (version "12.0")
+    (source #f)
+    (build-system trivial-build-system)
+    (arguments
+     `(#:modules ((guix build utils))
+       #:builder
+       (let ((out (string-append %output "/share/unicode/emoji")))
+         (use-modules (guix build utils))
+         (mkdir-p out)
+         (for-each
+          (lambda (input)
+            (copy-file
+             (cdr input)
+             (string-append out "/"
+                            (substring (car input) 8) ; strip "unicode-"
+                            ".txt")))
+          %build-inputs)
+         #t)))
+    (inputs
+     `(("unicode-emoji-data"
+        ,(unicode-emoji-file
+          "data" version
+          "03sf7h1d6kb9m5s02lif88jsi5kjszpkfvcymaqxj8ds70ar9pgv"))
+       ("unicode-emoji-sequences"
+        ,(unicode-emoji-file
+          "sequences" version
+          "1hghki2rn3n7m4lwpwi2a5wrsf2nij4bxga9ldabx4g0g2k23svs"))
+       ("unicode-emoji-test"
+        ,(unicode-emoji-file
+          "test" version
+          "1dqd0fh999mh6naj816ni113m9dimfy3ih9nffjq2lrv9mmlgdck"))
+       ("unicode-emoji-variation-sequences"
+        ,(unicode-emoji-file
+          "variation-sequences" version
+          "1cccwx5bl79w4c19vi5dhjqxrph92s8hihp9y8s2cqvdzmgbln7a"))
+       ("unicode-emoji-zwj-sequences"
+        ,(unicode-emoji-file
+          "zwj-sequences" version
+          "1l791nbijmmhwa7kmvfn8gp26ban512l6mgqpz1mnbq3xm19181n"))))
+    (home-page "https://www.unicode.org")
+    (synopsis "Unicode Emoji data")
+    (description
+     "This package includes data files listing characters and sequences, that
+Unicode emoji supporting fonts or keyboards should support according to the
+Unicode Technological Standard #51.")
+    (license unicode)))
-- 
2.25.0

  parent reply	other threads:[~2020-01-17  0:20 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-11 11:58 [bug#39086] [PATCH] Enable Emoji support in IBus Leo Prikler
2020-01-11 12:08 ` [bug#39086] [PATCH 1/5] licenses: Add Unicode license Leo Prikler
2020-01-11 12:08   ` [bug#39086] [PATCH 2/5] gnu: Add unicode-emoji Leo Prikler
2020-01-16 21:04     ` Ricardo Wurmus
2020-01-16 22:49       ` Leo Prikler
2020-01-11 12:08   ` [bug#39086] [PATCH 3/5] gnu: Add unicode-cldr-common Leo Prikler
2020-01-16 21:08     ` Ricardo Wurmus
2020-01-16 22:53       ` Leo Prikler
2020-01-17  7:41         ` Ricardo Wurmus
2020-01-17 10:41           ` Leo Prikler
2020-02-03  9:49             ` Leo Prikler
2020-02-03 15:33               ` bug#39086: " Ricardo Wurmus
2020-02-03 15:46                 ` [bug#39086] " Leo Prikler
2020-02-03 16:06             ` Ricardo Wurmus
2020-01-11 12:08   ` [bug#39086] [PATCH 4/5] gnu: ibus: Build with emoji support Leo Prikler
2020-01-16 21:10     ` Ricardo Wurmus
2020-01-11 12:08   ` [bug#39086] [PATCH 5/5] gnu: ibus: Disable parallel build Leo Prikler
2020-01-16 21:13     ` Ricardo Wurmus
2020-01-17  0:19   ` Leo Prikler [this message]
2020-01-17  0:19   ` [bug#39086] [PATCH 3/5] gnu: Add unicode-cldr-common Leo Prikler
2020-01-17  0:19   ` [bug#39086] [PATCH 4/5] gnu: ibus: Build with emoji support Leo Prikler
2020-01-17  0:19   ` [bug#39086] [PATCH 5/5] gnu: ibus: Disable parallel build Leo Prikler
2020-01-17  1:17 ` [bug#39086] [PATCH 2/5] gnu: Add unicode-emoji Leo Prikler
2020-01-17 10:37   ` Leo Prikler

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200117001905.21023-2-leo.prikler@student.tugraz.at \
    --to=leo.prikler@student.tugraz.at \
    --cc=39086@debbugs.gnu.org \
    --cc=rekado@elephly.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).