3
0
Fork 0
forked from mirrors/nixpkgs
worldofpeace 2020-07-03 14:05:30 -04:00 committed by Jan Tojnar
parent 10944d9701
commit 431c2c3faf
No known key found for this signature in database
GPG key ID: 7FAB2A15F7A607A4

View file

@ -1,66 +1,89 @@
{ stdenv, fetchFromGitLab, fetchpatch, meson, ninja, pkgconfig, gobject-introspection, vala
, gtk-doc, docbook_xsl, docbook_xml_dtd_43
, gtk3, gnome3, glade
, dbus, xvfb_run, libxml2
{ stdenv
, fetchurl
, meson
, ninja
, pkgconfig
, gobject-introspection
, vala
, gtk-doc
, docbook_xsl
, docbook_xml_dtd_43
, gtk3
, gnome3
, glade
, dbus
, xvfb_run
, libxml2
, gdk-pixbuf
, librsvg
, hicolor-icon-theme
}:
stdenv.mkDerivation rec {
pname = "libhandy";
version = "0.0.13";
version = "1.0.0";
outputs = [ "out" "dev" "devdoc" "glade" ];
outputBin = "dev";
src = fetchFromGitLab {
domain = "source.puri.sm";
owner = "Librem5";
repo = pname;
rev = "v${version}";
sha256 = "1y23k623sjkldfrdiwfarpchg5mg58smcy1pkgnwfwca15wm1ra5";
src = fetchurl {
url = "mirror://gnome/sources/${pname}/${stdenv.lib.versions.majorMinor version}/${pname}-${version}.tar.xz";
hash = "sha256-qTmFgvR7fXKSBdbqwMBo/vNarySf3Vfuo3JPhRjSZpk=";
};
patches = [
# Fix build with Glade 3.36.0
# https://source.puri.sm/Librem5/libhandy/merge_requests/451
(fetchpatch {
url = "https://source.puri.sm/Librem5/libhandy/commit/887beedb467984ab5c7b91830181645fadef7849.patch";
sha256 = "0qgh4i0l1028qxqmig4x2c10yj5s80skl70qnc5wnp71s45alvk5";
excludes = [ "glade/glade-hdy-header-bar.c" ];
})
nativeBuildInputs = [
docbook_xml_dtd_43
docbook_xsl
gobject-introspection
gtk-doc
libxml2
meson
ninja
pkgconfig
vala
];
nativeBuildInputs = [
meson ninja pkgconfig gobject-introspection vala libxml2
gtk-doc docbook_xsl docbook_xml_dtd_43
buildInputs = [
gdk-pixbuf
glade
gtk3
libxml2
];
checkInputs = [
dbus
hicolor-icon-theme
xvfb_run
];
buildInputs = [ gnome3.gnome-desktop gtk3 glade libxml2 ];
checkInputs = [ dbus xvfb_run hicolor-icon-theme ];
mesonFlags = [
"-Dgtk_doc=true"
"-Dglade_catalog=enabled"
"-Dintrospection=enabled"
];
# Uses define_variable in pkgconfig, but we still need it to use the glade output
PKG_CONFIG_GLADEUI_2_0_MODULEDIR = "${placeholder "glade"}/lib/glade/modules";
PKG_CONFIG_GLADEUI_2_0_CATALOGDIR = "${placeholder "glade"}/share/glade/catalogs";
doCheck = true;
# Bail out! dbind-FATAL-WARNING:
# AT-SPI: Error retrieving accessibility bus address: org.freedesktop.DBus.Error.ServiceUnknown:
# The name org.a11y.Bus was not provided by any .service files
doCheck = false;
checkPhase = ''
NO_AT_BRIDGE=1 \
XDG_DATA_DIRS="$XDG_DATA_DIRS:${hicolor-icon-theme}/share" \
XDG_DATA_DIRS="$XDG_DATA_DIRS:${hicolor-icon-theme}/share"
GDK_PIXBUF_MODULE_FILE="${librsvg.out}/lib/gdk-pixbuf-2.0/2.10.0/loaders.cache" \
xvfb-run -s '-screen 0 800x600x24' dbus-run-session \
--config-file=${dbus.daemon}/share/dbus-1/session.conf \
meson test --print-errorlogs
'';
meta = with stdenv.lib; {
description = "A library full of GTK widgets for mobile phones";
homepage = "https://source.puri.sm/Librem5/libhandy";
changelog = "https://gitlab.gnome.org/GNOME/libhandy/-/tags/${version}";
description = "Building blocks for modern adaptive GNOME apps";
homepage = "https://gitlab.gnome.org/GNOME/libhandy";
license = licenses.lgpl21Plus;
maintainers = with maintainers; [ jtojnar ];
maintainers = teams.gnome.members;
platforms = platforms.linux;
};
}