summary refs log tree commit diff
path: root/pkgs/desktops/gnome-3/core
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/desktops/gnome-3/core
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/desktops/gnome-3/core')
-rw-r--r--pkgs/desktops/gnome-3/core/gucharmap/default.nix86
-rw-r--r--pkgs/desktops/gnome-3/core/gucharmap/unicode-data.nix45
2 files changed, 74 insertions, 57 deletions
diff --git a/pkgs/desktops/gnome-3/core/gucharmap/default.nix b/pkgs/desktops/gnome-3/core/gucharmap/default.nix
index 6c291c1874f..ce5e073ac06 100644
--- a/pkgs/desktops/gnome-3/core/gucharmap/default.nix
+++ b/pkgs/desktops/gnome-3/core/gucharmap/default.nix
@@ -1,11 +1,48 @@
-{ stdenv, intltool, fetchFromGitLab, pkgconfig, gtk3, adwaita-icon-theme
-, glib, desktop-file-utils, gtk-doc, autoconf, automake, libtool
-, wrapGAppsHook, gnome3, itstool, libxml2, yelp-tools
-, docbook_xsl, docbook_xml_dtd_412, gsettings-desktop-schemas
-, callPackage, unzip, gobject-introspection }:
+{ stdenv
+, intltool
+, fetchFromGitLab
+, fetchpatch
+, pkgconfig
+, gtk3
+, adwaita-icon-theme
+, glib
+, desktop-file-utils
+, gtk-doc
+, autoconf
+, automake
+, libtool
+, wrapGAppsHook
+, gnome3
+, itstool
+, libxml2
+, yelp-tools
+, docbook_xsl
+, docbook_xml_dtd_412
+, gsettings-desktop-schemas
+, callPackage
+, unzip
+, unicode-character-database
+, unihan-database
+, runCommand
+, symlinkJoin
+, gobject-introspection
+}:
 
 let
-  unicode-data = callPackage ./unicode-data.nix {};
+  # TODO: make upstream patch allowing to use the uncompressed file,
+  # preferably from XDG_DATA_DIRS.
+  # https://gitlab.gnome.org/GNOME/gucharmap/issues/13
+  unihanZip = runCommand "unihan" {} ''
+    mkdir -p $out/share/unicode
+    ln -s ${unihan-database.src} $out/share/unicode/Unihan.zip
+  '';
+  ucd = symlinkJoin {
+    name = "ucd+unihan";
+    paths = [
+      unihanZip
+      unicode-character-database
+    ];
+  };
 in stdenv.mkDerivation rec {
   pname = "gucharmap";
   version = "12.0.1";
@@ -20,16 +57,41 @@ in stdenv.mkDerivation rec {
     sha256 = "0si3ymyfzc5v7ly0dmcs3qgw2wp8cyasycq5hmcr8frl09lr6gkw";
   };
 
+  patches = [
+    # fix build with Unicode 12.1
+    (fetchpatch {
+      url = "https://salsa.debian.org/gnome-team/gucharmap/raw/de079ad494a15f662416257fca2f2b8db757f4ea/debian/patches/update-to-unicode-12.1.patch";
+      sha256 = "093gqsxfpp3s0b88p1dgkskr4ng3hv8irmxc60l3fdrkl8am00xh";
+    })
+  ];
+
   nativeBuildInputs = [
-    pkgconfig wrapGAppsHook unzip intltool itstool
-    autoconf automake libtool gtk-doc docbook_xsl docbook_xml_dtd_412
-    yelp-tools libxml2 desktop-file-utils gobject-introspection
+    pkgconfig
+    wrapGAppsHook
+    unzip
+    intltool
+    itstool
+    autoconf
+    automake
+    libtool
+    gtk-doc
+    docbook_xsl
+    docbook_xml_dtd_412
+    yelp-tools
+    libxml2
+    desktop-file-utils
+    gobject-introspection
   ];
 
-  buildInputs = [ gtk3 glib gsettings-desktop-schemas adwaita-icon-theme ];
+  buildInputs = [
+    gtk3
+    glib
+    gsettings-desktop-schemas
+    adwaita-icon-theme
+  ];
 
   configureFlags = [
-    "--with-unicode-data=${unicode-data}"
+    "--with-unicode-data=${ucd}/share/unicode"
     "--enable-gtk-doc"
   ];
 
@@ -51,7 +113,7 @@ in stdenv.mkDerivation rec {
 
   meta = with stdenv.lib; {
     description = "GNOME Character Map, based on the Unicode Character Database";
-    homepage = https://wiki.gnome.org/Apps/Gucharmap;
+    homepage = "https://wiki.gnome.org/Apps/Gucharmap";
     license = licenses.gpl3;
     maintainers = gnome3.maintainers;
     platforms = platforms.linux;
diff --git a/pkgs/desktops/gnome-3/core/gucharmap/unicode-data.nix b/pkgs/desktops/gnome-3/core/gucharmap/unicode-data.nix
deleted file mode 100644
index 56104aff484..00000000000
--- a/pkgs/desktops/gnome-3/core/gucharmap/unicode-data.nix
+++ /dev/null
@@ -1,45 +0,0 @@
-{ fetchurl, stdenv, gnome3 }:
-stdenv.mkDerivation rec {
-  pname = "unicode-data";
-  version = "12.0.0";
-  srcs = [
-    (fetchurl {
-      url = "http://www.unicode.org/Public/${version}/ucd/Blocks.txt";
-      sha256 = "041sk54v6rjzb23b9x7yjdwzdp2wc7gvfz7ybavgg4gbh51wm8x1";
-    })
-    (fetchurl {
-      url = "http://www.unicode.org/Public/${version}/ucd/DerivedAge.txt";
-      sha256 = "04j92xp07v273z3pxkbfmi1svmw9kmnjl9nvz9fv0g5ybk9zk7r6";
-    })
-    (fetchurl {
-      url = "http://www.unicode.org/Public/${version}/ucd/NamesList.txt";
-      sha256 = "0vsq8gx7hws8mvxy3nlglpwxw7ky57q0fs09d7w9xgb2ylk7fz61";
-    })
-    (fetchurl {
-      url = "http://www.unicode.org/Public/${version}/ucd/Scripts.txt";
-      sha256 = "18c63hx4y5yg408a8d0wx72d2hfnlz4l560y1fsf9lpzifxpqcmx";
-    })
-    (fetchurl {
-      url = "http://www.unicode.org/Public/${version}/ucd/UnicodeData.txt";
-      sha256 = "07d1kq190kgl92ispfx6zmdkvwvhjga0ishxsngzlw8j3kdkz4ap";
-    })
-    (fetchurl {
-      url = "http://www.unicode.org/Public/${version}/ucd/Unihan.zip";
-      sha256 = "1kfdhgg2gm52x3s07bijb5cxjy0jxwhd097k5lqhvzpznprm6ibf";
-    })
-  ];
-  phases = "installPhase";
-  installPhase = with stdenv.lib; ''
-    mkdir $out
-    for f in $srcs;do
-      cp $f $out/$(stripHash $f)
-    done
-  '';
-  meta = with stdenv.lib; {
-    homepage = http://www.unicode.org/ucd/;
-    description = "Unicode Character Database";
-    maintainers = gnome3.maintainers;
-    license = licenses.mit;
-    platforms = platforms.all;
-  };
-}