diff options
| author | Robin Gloster <mail@glob.in> | 2021-05-24 09:55:24 -0500 |
|---|---|---|
| committer | Robin Gloster <mail@glob.in> | 2021-05-24 09:55:24 -0500 |
| commit | 4bc5fbef9d159e143fb7e2c3231932e6e76f667c (patch) | |
| tree | e2198f5c552e0667d838b8ec764ddb3a4d8f6dec /pkgs/development/libraries/libhandy/default.nix | |
| parent | jq: fix build with structured-attrs on darwin (diff) | |
| parent | Merge pull request #123802 from superherointj/package-virtmanager-bugfix (diff) | |
| download | nixpkgs-origin/structured-attrs.tar.gz | |
Merge remote-tracking branch 'upstream/master' into structured-attrsorigin/structured-attrs
Diffstat (limited to 'pkgs/development/libraries/libhandy/default.nix')
| -rw-r--r-- | pkgs/development/libraries/libhandy/default.nix | 48 |
1 files changed, 39 insertions, 9 deletions
diff --git a/pkgs/development/libraries/libhandy/default.nix b/pkgs/development/libraries/libhandy/default.nix index 81d9a187b422..8c8e8e870c00 100644 --- a/pkgs/development/libraries/libhandy/default.nix +++ b/pkgs/development/libraries/libhandy/default.nix @@ -1,4 +1,5 @@ -{ lib, stdenv +{ lib +, stdenv , fetchurl , meson , ninja @@ -6,35 +7,45 @@ , gobject-introspection , vala , gtk-doc -, docbook_xsl +, docbook-xsl-nons , docbook_xml_dtd_43 , gtk3 +, enableGlade ? false , glade , dbus -, xvfb_run +, xvfb-run , libxml2 , gdk-pixbuf , librsvg , hicolor-icon-theme , at-spi2-atk , at-spi2-core +, gnome +, libhandy +, runCommand }: stdenv.mkDerivation rec { pname = "libhandy"; - version = "1.2.0"; + version = "1.2.2"; - outputs = [ "out" "dev" "devdoc" "glade" ]; + outputs = [ + "out" + "dev" + "devdoc" + ] ++ lib.optionals enableGlade [ + "glade" + ]; outputBin = "dev"; src = fetchurl { url = "mirror://gnome/sources/${pname}/${lib.versions.majorMinor version}/${pname}-${version}.tar.xz"; - sha256 = "sha256-OfWQriCRDnb+HAYHsuvliXUPRWENau7Fww4u5gKiCyU="; + sha256 = "sha256-R//Shl0CvRyleVIt6t1+L5U2Lx8gJGL9XuriuBZosEg="; }; nativeBuildInputs = [ docbook_xml_dtd_43 - docbook_xsl + docbook-xsl-nons gobject-introspection gtk-doc libxml2 @@ -46,14 +57,15 @@ stdenv.mkDerivation rec { buildInputs = [ gdk-pixbuf - glade gtk3 libxml2 + ] ++ lib.optionals enableGlade [ + glade ]; checkInputs = [ dbus - xvfb_run + xvfb-run at-spi2-atk at-spi2-core librsvg @@ -62,6 +74,7 @@ stdenv.mkDerivation rec { mesonFlags = [ "-Dgtk_doc=true" + "-Dglade_catalog=${if enableGlade then "enabled" else "disabled"}" ]; # Uses define_variable in pkg-config, but we still need it to use the glade output @@ -79,6 +92,23 @@ stdenv.mkDerivation rec { meson test --print-errorlogs ''; + passthru = { + updateScript = gnome.updateScript { + packageName = pname; + }; + } // lib.optionalAttrs (!enableGlade) { + glade = + let + libhandyWithGlade = libhandy.override { + enableGlade = true; + }; + in runCommand "${libhandy.name}-glade" {} '' + cp -r "${libhandyWithGlade.glade}" "$out" + chmod -R +w "$out" + sed -e "s#${libhandyWithGlade.out}#${libhandy.out}#g" -e "s#${libhandyWithGlade.glade}#$out#g" -i $(find "$out" -type f) + ''; + }; + meta = with lib; { changelog = "https://gitlab.gnome.org/GNOME/libhandy/-/tags/${version}"; description = "Building blocks for modern adaptive GNOME apps"; |
