nixpkgs/pkgs/desktops/gnome-3/core/gucharmap/default.nix

122 lines
2.4 KiB
Nix
Raw Normal View History

2019-11-07 10:07:58 -08:00
{ stdenv
, intltool
, fetchFromGitLab
2019-11-07 14:12:52 -08:00
, fetchpatch
2019-11-07 10:07:58 -08:00
, 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
2019-11-07 14:12:52 -08:00
, unicode-character-database
, unihan-database
, runCommand
, symlinkJoin
2019-11-07 10:07:58 -08:00
, gobject-introspection
}:
2018-07-14 06:51:42 -07:00
let
2019-11-07 14:12:52 -08:00
# 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";
2018-07-14 06:51:42 -07:00
outputs = [ "out" "lib" "dev" "devdoc" ];
2018-07-14 06:51:42 -07:00
src = fetchFromGitLab {
domain = "gitlab.gnome.org";
owner = "GNOME";
repo = pname;
2018-07-14 06:51:42 -07:00
rev = version;
sha256 = "0si3ymyfzc5v7ly0dmcs3qgw2wp8cyasycq5hmcr8frl09lr6gkw";
};
2019-11-07 14:12:52 -08:00
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 = [
2019-11-07 10:07:58 -08:00
pkgconfig
wrapGAppsHook
unzip
intltool
itstool
autoconf
automake
libtool
gtk-doc
docbook_xsl
docbook_xml_dtd_412
yelp-tools
libxml2
desktop-file-utils
gobject-introspection
];
2019-11-07 10:07:58 -08:00
buildInputs = [
gtk3
glib
gsettings-desktop-schemas
adwaita-icon-theme
];
2018-07-14 06:51:42 -07:00
configureFlags = [
2019-11-07 14:12:52 -08:00
"--with-unicode-data=${ucd}/share/unicode"
"--enable-gtk-doc"
2018-07-14 06:51:42 -07:00
];
2018-07-14 06:51:42 -07:00
doCheck = true;
postPatch = ''
patchShebangs gucharmap/gen-guch-unicode-tables.pl
'';
preConfigure = ''
NOCONFIGURE=1 ./autogen.sh
'';
passthru = {
updateScript = gnome3.updateScript {
packageName = pname;
2018-07-14 06:51:42 -07:00
};
};
meta = with stdenv.lib; {
description = "GNOME Character Map, based on the Unicode Character Database";
2019-11-07 10:07:58 -08:00
homepage = "https://wiki.gnome.org/Apps/Gucharmap";
license = licenses.gpl3;
2018-07-14 06:51:42 -07:00
maintainers = gnome3.maintainers;
platforms = platforms.linux;
};
}