depot/third_party/nixpkgs/pkgs/by-name/gn/gnome-font-viewer/package.nix
Default email f34ce41345 Project import generated by Copybara.
GitOrigin-RevId: b73c2221a46c13557b1b3be9c2070cc42cf01eb3
2024-07-27 08:49:29 +02:00

74 lines
1.5 KiB
Nix

{ lib
, stdenv
, fetchpatch2
, meson
, ninja
, gettext
, fetchurl
, pkg-config
, gtk4
, glib
, libxml2
, gnome-desktop
, libadwaita
, fribidi
, wrapGAppsHook4
, gnome
, harfbuzz
}:
stdenv.mkDerivation rec {
pname = "gnome-font-viewer";
version = "46.0";
src = fetchurl {
url = "mirror://gnome/sources/gnome-font-viewer/${lib.versions.major version}/${pname}-${version}.tar.xz";
hash = "sha256-WS9AHkhdAswETUh7tcjgTJYdpoViFnaKWfH/mL0tU3w=";
};
patches = lib.optionals stdenv.cc.isClang [
# Fixes an incompatible function pointer error when building with clang 16
(fetchpatch2 {
url = "https://gitlab.gnome.org/GNOME/gnome-font-viewer/-/commit/565d795731471c27542bb9ee60820a2d0d15534e.diff";
hash = "sha256-8dgOVTx6ZbvXROlIWTZU2xNWJ11LlJykRs699cgZqow=";
})
];
doCheck = true;
nativeBuildInputs = [
meson
ninja
pkg-config
gettext
wrapGAppsHook4
libxml2
glib
];
buildInputs = [
gtk4
glib
gnome-desktop
harfbuzz
libadwaita
fribidi
];
# Do not run meson-postinstall.sh
preConfigure = "sed -i '2,$ d' meson-postinstall.sh";
passthru = {
updateScript = gnome.updateScript {
packageName = "gnome-font-viewer";
};
};
meta = with lib; {
description = "Program that can preview fonts and create thumbnails for fonts";
homepage = "https://gitlab.gnome.org/GNOME/gnome-font-viewer";
maintainers = teams.gnome.members;
license = licenses.gpl2Plus;
platforms = platforms.unix;
};
}