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

110 lines
2.1 KiB
Nix
Raw Normal View History

{ stdenv
, lib
2019-11-07 19:07:58 +01:00
, intltool
, fetchFromGitLab
, meson
, ninja
2021-01-17 03:21:50 +01:00
, pkg-config
, python3
2019-11-07 19:07:58 +01:00
, gtk3
, adwaita-icon-theme
, glib
, desktop-file-utils
, gtk-doc
, wrapGAppsHook
, itstool
, libxml2
, yelp-tools
, docbook_xsl
, docbook_xml_dtd_412
, gsettings-desktop-schemas
, callPackage
, unzip
2019-11-07 23:12:52 +01:00
, unicode-character-database
, unihan-database
, runCommand
, symlinkJoin
2019-11-07 19:07:58 +01:00
, gobject-introspection
, nix-update-script
2019-11-07 19:07:58 +01:00
}:
2018-07-14 15:51:42 +02:00
let
2019-11-07 23:12:52 +01: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";
2021-10-03 03:44:57 +02:00
version = "14.0.0";
2018-07-14 15:51:42 +02:00
outputs = [ "out" "lib" "dev" "devdoc" ];
2018-07-14 15:51:42 +02:00
src = fetchFromGitLab {
domain = "gitlab.gnome.org";
owner = "GNOME";
repo = pname;
2018-07-14 15:51:42 +02:00
rev = version;
2021-10-03 03:44:57 +02:00
sha256 = "sha256-d283zVRH42NZNq+vGmItN3ZBrRrl9gpYDco7osm3RoY=";
};
nativeBuildInputs = [
meson
ninja
2021-01-17 03:21:50 +01:00
pkg-config
python3
2019-11-07 19:07:58 +01:00
wrapGAppsHook
unzip
intltool
itstool
gtk-doc
docbook_xsl
docbook_xml_dtd_412
yelp-tools
libxml2
desktop-file-utils
gobject-introspection
];
2019-11-07 19:07:58 +01:00
buildInputs = [
gtk3
glib
gsettings-desktop-schemas
adwaita-icon-theme
];
mesonFlags = [
"-Ducd_path=${ucd}/share/unicode"
"-Dvapi=false"
2018-07-14 15:51:42 +02:00
];
2018-07-14 15:51:42 +02:00
doCheck = true;
postPatch = ''
patchShebangs data/meson_desktopfile.py gucharmap/gen-guch-unicode-tables.pl gucharmap/meson_compileschemas.py
2018-07-14 15:51:42 +02:00
'';
passthru = {
updateScript = nix-update-script {
attrPath = "gnome.gucharmap";
2018-07-14 15:51:42 +02:00
};
};
meta = with lib; {
description = "GNOME Character Map, based on the Unicode Character Database";
2019-11-07 19:07:58 +01:00
homepage = "https://wiki.gnome.org/Apps/Gucharmap";
license = licenses.gpl3;
maintainers = teams.gnome.members;
platforms = platforms.linux;
};
}