From 311545660d769b39b52180da1d75d8db6cb6ae7d Mon Sep 17 00:00:00 2001 From: Bobby Rong Date: Thu, 24 Mar 2022 12:34:02 +0800 Subject: [PATCH 1/2] gnome.gnome-dictionary: format with nixpkgs-fmt Should not cause any rebuilds. --- .../gnome/core/gnome-dictionary/default.nix | 49 ++++++++++++++++--- 1 file changed, 41 insertions(+), 8 deletions(-) diff --git a/pkgs/desktops/gnome/core/gnome-dictionary/default.nix b/pkgs/desktops/gnome/core/gnome-dictionary/default.nix index a399c4e85377..bac41b0eaf61 100644 --- a/pkgs/desktops/gnome/core/gnome-dictionary/default.nix +++ b/pkgs/desktops/gnome/core/gnome-dictionary/default.nix @@ -1,6 +1,23 @@ -{ lib, stdenv, fetchurl, meson, ninja, pkg-config, desktop-file-utils, appstream-glib, libxslt -, libxml2, gettext, itstool, wrapGAppsHook, docbook_xsl, docbook_xml_dtd_43 -, gnome, gtk3, glib, gsettings-desktop-schemas }: +{ stdenv +, lib +, fetchurl +, meson +, ninja +, pkg-config +, desktop-file-utils +, appstream-glib +, libxslt +, libxml2 +, gettext +, itstool +, wrapGAppsHook +, docbook_xsl +, docbook_xml_dtd_43 +, gnome +, gtk3 +, glib +, gsettings-desktop-schemas +}: stdenv.mkDerivation rec { pname = "gnome-dictionary"; @@ -11,13 +28,29 @@ stdenv.mkDerivation rec { sha256 = "1d8dhcfys788vv27v34i3s3x3jdvdi2kqn2a5p8c937a9hm0qr9f"; }; - doCheck = true; - nativeBuildInputs = [ - meson ninja pkg-config wrapGAppsHook libxml2 gettext itstool - desktop-file-utils appstream-glib libxslt docbook_xsl docbook_xml_dtd_43 + meson + ninja + pkg-config + wrapGAppsHook + libxml2 + gettext + itstool + desktop-file-utils + appstream-glib + libxslt + docbook_xsl + docbook_xml_dtd_43 ]; - buildInputs = [ gtk3 glib gsettings-desktop-schemas gnome.adwaita-icon-theme ]; + + buildInputs = [ + gtk3 + glib + gsettings-desktop-schemas + gnome.adwaita-icon-theme + ]; + + doCheck = true; passthru = { updateScript = gnome.updateScript { From 24c7d32c220228d36fdc11c81f13c8042b484e5e Mon Sep 17 00:00:00 2001 From: Bobby Rong Date: Thu, 24 Mar 2022 12:47:08 +0800 Subject: [PATCH 2/2] gnome.gnome-dictionary: fix build with meson 0.61 --- .../gnome/core/gnome-dictionary/default.nix | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/pkgs/desktops/gnome/core/gnome-dictionary/default.nix b/pkgs/desktops/gnome/core/gnome-dictionary/default.nix index bac41b0eaf61..6cdb8831c48f 100644 --- a/pkgs/desktops/gnome/core/gnome-dictionary/default.nix +++ b/pkgs/desktops/gnome/core/gnome-dictionary/default.nix @@ -1,6 +1,7 @@ { stdenv , lib , fetchurl +, fetchpatch , meson , ninja , pkg-config @@ -28,6 +29,21 @@ stdenv.mkDerivation rec { sha256 = "1d8dhcfys788vv27v34i3s3x3jdvdi2kqn2a5p8c937a9hm0qr9f"; }; + patches = [ + # Fix test dependencies with meson 0.57, can be removed on next bump + # We need to explicitly depend on the generated files. + (fetchpatch { + url = "https://gitlab.gnome.org/GNOME/gnome-dictionary/-/commit/87c026cfe4acbcfc62d15950f88a71d8d9678c7e.patch"; + sha256 = "tKesWeOK3OqOxrXm4dZvCZHHdTD7AQbYDjtYDCsLd3A="; + }) + # Fix build with meson 0.61, can be removed on next bump + # data/appdata/meson.build:3:5: ERROR: Function does not take positional arguments. + (fetchpatch { + url = "https://gitlab.gnome.org/GNOME/gnome-dictionary/-/commit/cf3f8a67cd6f3059c555ed9cf0f5fba10abb7f68.patch"; + sha256 = "cIRM6ACqsnEo2JWYvr6EBye5o0BudugZMShCe1U5hz8="; + }) + ]; + nativeBuildInputs = [ meson ninja