about summary refs log tree commit diff
path: root/nixpkgs/pkgs/desktops/gnome-3/core/gucharmap
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/desktops/gnome-3/core/gucharmap')
-rw-r--r--nixpkgs/pkgs/desktops/gnome-3/core/gucharmap/default.nix59
-rw-r--r--nixpkgs/pkgs/desktops/gnome-3/core/gucharmap/unicode-data.nix45
2 files changed, 104 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/desktops/gnome-3/core/gucharmap/default.nix b/nixpkgs/pkgs/desktops/gnome-3/core/gucharmap/default.nix
new file mode 100644
index 000000000000..2b7794a9a8ef
--- /dev/null
+++ b/nixpkgs/pkgs/desktops/gnome-3/core/gucharmap/default.nix
@@ -0,0 +1,59 @@
+{ 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, gobject-introspection }:
+
+let
+  unicode-data = callPackage ./unicode-data.nix {};
+in stdenv.mkDerivation rec {
+  name = "gucharmap-${version}";
+  version = "11.0.3";
+
+  outputs = [ "out" "lib" "dev" "devdoc" ];
+
+  src = fetchFromGitLab {
+    domain = "gitlab.gnome.org";
+    owner = "GNOME";
+    repo = "gucharmap";
+    rev = version;
+    sha256 = "1a590nxy8jdf6zxh6jdsyvhxyaz94ixx3aa1pj7gicf1aqp26vnh";
+  };
+
+  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
+  ];
+
+  buildInputs = [ gtk3 glib gsettings-desktop-schemas adwaita-icon-theme ];
+
+  configureFlags = [
+    "--with-unicode-data=${unicode-data}"
+    "--enable-gtk-doc"
+  ];
+
+  doCheck = true;
+
+  postPatch = ''
+    patchShebangs gucharmap/gen-guch-unicode-tables.pl
+  '';
+
+  preConfigure = ''
+    NOCONFIGURE=1 ./autogen.sh
+  '';
+
+  passthru = {
+    updateScript = gnome3.updateScript {
+      packageName = "gucharmap";
+    };
+  };
+
+  meta = with stdenv.lib; {
+    description = "GNOME Character Map, based on the Unicode Character Database";
+    homepage = https://wiki.gnome.org/Apps/Gucharmap;
+    license = licenses.gpl3;
+    maintainers = gnome3.maintainers;
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/desktops/gnome-3/core/gucharmap/unicode-data.nix b/nixpkgs/pkgs/desktops/gnome-3/core/gucharmap/unicode-data.nix
new file mode 100644
index 000000000000..6bf2fd39a2d3
--- /dev/null
+++ b/nixpkgs/pkgs/desktops/gnome-3/core/gucharmap/unicode-data.nix
@@ -0,0 +1,45 @@
+{ fetchurl, stdenv, gnome3 }:
+stdenv.mkDerivation rec {
+  name = "unicode-data-${version}";
+  version = "11.0.0";
+  srcs = [
+    (fetchurl {
+      url = "http://www.unicode.org/Public/${version}/ucd/Blocks.txt";
+      sha256 = "0lnh9iazikpr548bd7nkaq9r3vfljfvz0rg2462prac8qxk7ni8b";
+    })
+    (fetchurl {
+      url = "http://www.unicode.org/Public/${version}/ucd/DerivedAge.txt";
+      sha256 = "0rlqqd0b1sqbzvrj29dwdizx8lyvrbfirsnn8za9lb53x5fml4gb";
+    })
+    (fetchurl {
+      url = "http://www.unicode.org/Public/${version}/ucd/NamesList.txt";
+      sha256 = "0yr2h0nfqhirfi3bxl33z6cc94qqshlpgi06c25xh9754irqsgv8";
+    })
+    (fetchurl {
+      url = "http://www.unicode.org/Public/${version}/ucd/Scripts.txt";
+      sha256 = "1mbnvf97nwa3pvyzx9nd2wa94f8s0npg9740kic2p2ag7jmc1wz9";
+    })
+    (fetchurl {
+      url = "http://www.unicode.org/Public/${version}/ucd/UnicodeData.txt";
+      sha256 = "16b0jzvvzarnlxdvs2izd5ia0ipbd87md143dc6lv6xpdqcs75s9";
+    })
+    (fetchurl {
+      url = "http://www.unicode.org/Public/${version}/ucd/Unihan.zip";
+      sha256 = "0cy8gxb17ksi5h4ysypk4c09z61am1svjrvg97hm5m5ccjfrs1vj";
+    })
+  ];
+  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;
+  };
+}