From f90473785f674c12cad5f1c9b02b66a085a58be4 Mon Sep 17 00:00:00 2001 From: WORLDofPEACE Date: Sun, 20 Sep 2020 13:08:46 -0400 Subject: [PATCH] libhandy_0: init at 0.0.13 --- pkgs/development/libraries/libhandy/0.x.nix | 66 +++++++++++++++++++++ pkgs/top-level/all-packages.nix | 3 + 2 files changed, 69 insertions(+) create mode 100644 pkgs/development/libraries/libhandy/0.x.nix diff --git a/pkgs/development/libraries/libhandy/0.x.nix b/pkgs/development/libraries/libhandy/0.x.nix new file mode 100644 index 00000000000..2923f2da25d --- /dev/null +++ b/pkgs/development/libraries/libhandy/0.x.nix @@ -0,0 +1,66 @@ +{ stdenv, fetchFromGitLab, fetchpatch, meson, ninja, pkgconfig, gobject-introspection, vala +, gtk-doc, docbook_xsl, docbook_xml_dtd_43 +, gtk3, gnome3, glade +, dbus, xvfb_run, libxml2 +, hicolor-icon-theme +}: + +stdenv.mkDerivation rec { + pname = "libhandy"; + version = "0.0.13"; + + outputs = [ "out" "dev" "devdoc" "glade" ]; + outputBin = "dev"; + + src = fetchFromGitLab { + domain = "source.puri.sm"; + owner = "Librem5"; + repo = pname; + rev = "v${version}"; + sha256 = "1y23k623sjkldfrdiwfarpchg5mg58smcy1pkgnwfwca15wm1ra5"; + }; + + 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 = [ + meson ninja pkgconfig gobject-introspection vala libxml2 + gtk-doc docbook_xsl docbook_xml_dtd_43 + ]; + buildInputs = [ gnome3.gnome-desktop gtk3 glade libxml2 ]; + checkInputs = [ dbus xvfb_run hicolor-icon-theme ]; + + mesonFlags = [ + "-Dgtk_doc=true" + "-Dglade_catalog=enabled" + "-Dintrospection=enabled" + ]; + + 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 = '' + NO_AT_BRIDGE=1 \ + XDG_DATA_DIRS="$XDG_DATA_DIRS:${hicolor-icon-theme}/share" \ + 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; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index fd731dd9756..6426540f519 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -5190,6 +5190,9 @@ in libhandy = callPackage ../development/libraries/libhandy { }; + # Needed for apps that still depend on the unstable verison of the library (not libhandy-1) + libhandy_0 = callPackage ../development/libraries/libhandy/0.x.nix { }; + libgumath = callPackage ../development/libraries/libgumath { }; libinsane = callPackage ../development/libraries/libinsane { };