2018-12-02 11:41:15 +00:00
|
|
|
{ stdenv, fetchFromGitLab, meson, ninja, pkgconfig, gobject-introspection, vala
|
2018-08-12 18:38:57 +01:00
|
|
|
, gtk-doc, docbook_xsl, docbook_xml_dtd_43
|
|
|
|
, gtk3, gnome3
|
|
|
|
, dbus, xvfb_run, libxml2
|
2019-01-20 19:39:00 +00:00
|
|
|
, hicolor-icon-theme
|
2018-08-12 18:38:57 +01:00
|
|
|
}:
|
|
|
|
|
|
|
|
let
|
|
|
|
pname = "libhandy";
|
2019-07-01 22:58:59 +01:00
|
|
|
version = "0.0.10";
|
2019-08-13 22:52:01 +01:00
|
|
|
in stdenv.mkDerivation {
|
2018-08-12 18:38:57 +01:00
|
|
|
name = "${pname}-${version}";
|
|
|
|
|
|
|
|
outputs = [ "out" "dev" "devdoc" "glade" ];
|
|
|
|
outputBin = "dev";
|
|
|
|
|
|
|
|
src = fetchFromGitLab {
|
|
|
|
domain = "source.puri.sm";
|
|
|
|
owner = "Librem5";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2019-07-01 22:58:59 +01:00
|
|
|
sha256 = "1702hbdqhfpgw0c4vj2ag08vgl83byiryrbngbq11b9azmj3jhzs";
|
2018-08-12 18:38:57 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
2018-12-02 11:41:15 +00:00
|
|
|
meson ninja pkgconfig gobject-introspection vala
|
2018-08-12 18:38:57 +01:00
|
|
|
gtk-doc docbook_xsl docbook_xml_dtd_43
|
|
|
|
];
|
|
|
|
buildInputs = [ gnome3.gnome-desktop gtk3 gnome3.glade libxml2 ];
|
2019-01-20 19:39:00 +00:00
|
|
|
checkInputs = [ dbus xvfb_run hicolor-icon-theme ];
|
2018-08-12 18:38:57 +01:00
|
|
|
|
|
|
|
mesonFlags = [
|
|
|
|
"-Dgtk_doc=true"
|
2019-01-20 19:39:00 +00:00
|
|
|
"-Dglade_catalog=enabled"
|
|
|
|
"-Dintrospection=enabled"
|
2018-08-12 18:38:57 +01: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 02:40:18 +00:00
|
|
|
NO_AT_BRIDGE=1 \
|
|
|
|
XDG_DATA_DIRS="$XDG_DATA_DIRS:${hicolor-icon-theme}/share" \
|
2018-08-12 18:38:57 +01: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; {
|
|
|
|
description = "A library full of GTK+ widgets for mobile phones";
|
|
|
|
homepage = https://source.puri.sm/Librem5/libhandy;
|
|
|
|
license = licenses.lgpl21Plus;
|
|
|
|
maintainers = with maintainers; [ jtojnar ];
|
|
|
|
platforms = platforms.linux;
|
|
|
|
};
|
|
|
|
}
|