2020-05-15 18:29:11 +02:00
|
|
|
{ stdenv, fetchFromGitLab, fetchpatch, meson, ninja, pkgconfig, gobject-introspection, vala
|
2018-08-12 19:38:57 +02:00
|
|
|
, gtk-doc, docbook_xsl, docbook_xml_dtd_43
|
2020-05-15 17:29:00 +02:00
|
|
|
, gtk3, gnome3, glade
|
2018-08-12 19:38:57 +02:00
|
|
|
, dbus, xvfb_run, libxml2
|
2019-01-20 20:39:00 +01:00
|
|
|
, hicolor-icon-theme
|
2018-08-12 19:38:57 +02:00
|
|
|
}:
|
|
|
|
|
2019-08-31 10:04:20 +02:00
|
|
|
stdenv.mkDerivation rec {
|
2018-08-12 19:38:57 +02:00
|
|
|
pname = "libhandy";
|
2020-01-21 20:42:41 +01:00
|
|
|
version = "0.0.13";
|
2018-08-12 19:38:57 +02:00
|
|
|
|
|
|
|
outputs = [ "out" "dev" "devdoc" "glade" ];
|
|
|
|
outputBin = "dev";
|
|
|
|
|
|
|
|
src = fetchFromGitLab {
|
|
|
|
domain = "source.puri.sm";
|
|
|
|
owner = "Librem5";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2020-01-21 20:42:41 +01:00
|
|
|
sha256 = "1y23k623sjkldfrdiwfarpchg5mg58smcy1pkgnwfwca15wm1ra5";
|
2018-08-12 19:38:57 +02:00
|
|
|
};
|
|
|
|
|
2020-05-15 18:29:11 +02:00
|
|
|
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";
|
2020-06-02 22:44:52 +02:00
|
|
|
sha256 = "0qgh4i0l1028qxqmig4x2c10yj5s80skl70qnc5wnp71s45alvk5";
|
2020-05-15 18:29:11 +02:00
|
|
|
excludes = [ "glade/glade-hdy-header-bar.c" ];
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
2018-08-12 19:38:57 +02:00
|
|
|
nativeBuildInputs = [
|
2020-02-26 23:27:51 +01:00
|
|
|
meson ninja pkgconfig gobject-introspection vala libxml2
|
2018-08-12 19:38:57 +02:00
|
|
|
gtk-doc docbook_xsl docbook_xml_dtd_43
|
|
|
|
];
|
2020-05-15 17:29:00 +02:00
|
|
|
buildInputs = [ gnome3.gnome-desktop gtk3 glade libxml2 ];
|
2019-01-20 20:39:00 +01:00
|
|
|
checkInputs = [ dbus xvfb_run hicolor-icon-theme ];
|
2018-08-12 19:38:57 +02:00
|
|
|
|
|
|
|
mesonFlags = [
|
|
|
|
"-Dgtk_doc=true"
|
2019-01-20 20:39:00 +01:00
|
|
|
"-Dglade_catalog=enabled"
|
|
|
|
"-Dintrospection=enabled"
|
2018-08-12 19:38:57 +02:00
|
|
|
];
|
|
|
|
|
|
|
|
PKG_CONFIG_GLADEUI_2_0_MODULEDIR = "${placeholder "glade"}/lib/glade/modules";
|
|
|
|
PKG_CONFIG_GLADEUI_2_0_CATALOGDIR = "${placeholder "glade"}/share/glade/catalogs";
|
|
|
|
|
|
|
|
doCheck = true;
|
|
|
|
|
|
|
|
checkPhase = ''
|
2019-02-11 03:40:18 +01:00
|
|
|
NO_AT_BRIDGE=1 \
|
|
|
|
XDG_DATA_DIRS="$XDG_DATA_DIRS:${hicolor-icon-theme}/share" \
|
2018-08-12 19:38:57 +02:00
|
|
|
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; {
|
2019-09-04 00:49:40 +02:00
|
|
|
description = "A library full of GTK widgets for mobile phones";
|
2020-04-01 03:11:51 +02:00
|
|
|
homepage = "https://source.puri.sm/Librem5/libhandy";
|
2018-08-12 19:38:57 +02:00
|
|
|
license = licenses.lgpl21Plus;
|
|
|
|
maintainers = with maintainers; [ jtojnar ];
|
|
|
|
platforms = platforms.linux;
|
|
|
|
};
|
|
|
|
}
|