From d3dab0e67dcceacc7b09d1c65f7442c6ee7ba656 Mon Sep 17 00:00:00 2001 From: Bobby Rong Date: Wed, 30 Mar 2022 16:39:33 +0800 Subject: [PATCH 1/5] gnome.devhelp: fix build with meson 0.61 --- pkgs/desktops/gnome/devtools/devhelp/default.nix | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/pkgs/desktops/gnome/devtools/devhelp/default.nix b/pkgs/desktops/gnome/devtools/devhelp/default.nix index 2ad3c3ff39ad..4a024f6ff413 100644 --- a/pkgs/desktops/gnome/devtools/devhelp/default.nix +++ b/pkgs/desktops/gnome/devtools/devhelp/default.nix @@ -1,5 +1,7 @@ -{ lib, stdenv +{ stdenv +, lib , fetchurl +, fetchpatch , meson , ninja , pkg-config @@ -29,6 +31,15 @@ stdenv.mkDerivation rec { sha256 = "7KqQsPTaqPsgMPbcaQv1M/+Zp3NDf+Dhis/oLZl/YNI="; }; + patches = [ + # Fix build with meson 0.61 + # https://gitlab.gnome.org/GNOME/devhelp/-/issues/59 + (fetchpatch { + url = "https://gitlab.gnome.org/GNOME/devhelp/-/commit/281bade14c1925cf9e7329fa8e9cf2d82512c66f.patch"; + sha256 = "LmHoeQ0zJwOhuasAUYy8FfpDnEO+UNfEb293uKttYKo="; + }) + ]; + nativeBuildInputs = [ meson ninja From 3d1d33c5ff17c582cea2f0f63a65cb37cc43318c Mon Sep 17 00:00:00 2001 From: Bobby Rong Date: Wed, 30 Mar 2022 16:45:42 +0800 Subject: [PATCH 2/5] gnome.gnome-books: fix build with meson 0.61 --- pkgs/desktops/gnome/apps/gnome-books/default.nix | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/pkgs/desktops/gnome/apps/gnome-books/default.nix b/pkgs/desktops/gnome/apps/gnome-books/default.nix index 0e8b322cf5ed..ec99e915fab1 100644 --- a/pkgs/desktops/gnome/apps/gnome-books/default.nix +++ b/pkgs/desktops/gnome/apps/gnome-books/default.nix @@ -1,8 +1,10 @@ -{ lib, stdenv +{ stdenv +, lib , meson , ninja , gettext , fetchurl +, fetchpatch , evince , gjs , pkg-config @@ -35,6 +37,15 @@ stdenv.mkDerivation rec { sha256 = "0c41l8m2di8h39bmk2fnhpwglwp6qhljmwqqbihzp4ay9976zrc5"; }; + patches = [ + # Fix build with meson 0.61 + # https://gitlab.gnome.org/GNOME/gnome-books/-/merge_requests/62 + (fetchpatch { + url = "https://gitlab.gnome.org/GNOME/gnome-books/-/commit/2663dcdaaaa71f067a4c2d0005eecc0fdf940bf5.patch"; + sha256 = "v2mLzrxSWrkJ0N6seR8jNXX14FsneEPuE9ELLVUe6+E="; + }) + ]; + nativeBuildInputs = [ meson ninja From dbc55b66671e4bb4479b37dbd484118985048a9e Mon Sep 17 00:00:00 2001 From: Bobby Rong Date: Wed, 30 Mar 2022 16:52:05 +0800 Subject: [PATCH 3/5] gnome.gnome-screenshot: format - use pname + version - format with nixpkgs-fmt - reorder the attributes --- .../gnome/core/gnome-screenshot/default.nix | 59 ++++++++++++++----- 1 file changed, 44 insertions(+), 15 deletions(-) diff --git a/pkgs/desktops/gnome/core/gnome-screenshot/default.nix b/pkgs/desktops/gnome/core/gnome-screenshot/default.nix index ba6d05b3cbf8..a2c8f7527177 100644 --- a/pkgs/desktops/gnome/core/gnome-screenshot/default.nix +++ b/pkgs/desktops/gnome/core/gnome-screenshot/default.nix @@ -1,18 +1,53 @@ -{ lib, stdenv, gettext, libxml2, libhandy, fetchurl, pkg-config, libcanberra-gtk3 -, gtk3, glib, meson, ninja, python3, wrapGAppsHook, appstream-glib, desktop-file-utils -, gnome, gsettings-desktop-schemas }: +{ stdenv +, lib +, gettext +, libxml2 +, libhandy +, fetchurl +, pkg-config +, libcanberra-gtk3 +, gtk3 +, glib +, meson +, ninja +, python3 +, wrapGAppsHook +, appstream-glib +, desktop-file-utils +, gnome +, gsettings-desktop-schemas +}: -let +stdenv.mkDerivation rec { pname = "gnome-screenshot"; version = "41.0"; -in stdenv.mkDerivation rec { - name = "${pname}-${version}"; src = fetchurl { - url = "mirror://gnome/sources/${pname}/${lib.versions.major version}/${name}.tar.xz"; + url = "mirror://gnome/sources/${pname}/${lib.versions.major version}/${pname}-${version}.tar.xz"; sha256 = "Stt97JJkKPdCY9V5ZnPPFC5HILbnaPVGio0JM/mMlZc="; }; + nativeBuildInputs = [ + meson + ninja + pkg-config + gettext + appstream-glib + libxml2 + desktop-file-utils + python3 + wrapGAppsHook + ]; + + buildInputs = [ + gtk3 + glib + libcanberra-gtk3 + libhandy + gnome.adwaita-icon-theme + gsettings-desktop-schemas + ]; + doCheck = true; postPatch = '' @@ -20,12 +55,6 @@ in stdenv.mkDerivation rec { patchShebangs build-aux/postinstall.py ''; - nativeBuildInputs = [ meson ninja pkg-config gettext appstream-glib libxml2 desktop-file-utils python3 wrapGAppsHook ]; - buildInputs = [ - gtk3 glib libcanberra-gtk3 libhandy gnome.adwaita-icon-theme - gsettings-desktop-schemas - ]; - passthru = { updateScript = gnome.updateScript { packageName = pname; @@ -34,10 +63,10 @@ in stdenv.mkDerivation rec { }; meta = with lib; { - homepage = "https://en.wikipedia.org/wiki/GNOME_Screenshot"; + homepage = "https://gitlab.gnome.org/GNOME/gnome-screenshot"; description = "Utility used in the GNOME desktop environment for taking screenshots"; maintainers = teams.gnome.members; - license = licenses.gpl2; + license = licenses.gpl2Plus; platforms = platforms.linux; }; } From 68824fbc89d6105cf2bf997bae51bc281d8bad52 Mon Sep 17 00:00:00 2001 From: Bobby Rong Date: Wed, 30 Mar 2022 16:54:57 +0800 Subject: [PATCH 4/5] gnome.gnome-screenshot: fix build with meson 0.61 --- pkgs/desktops/gnome/core/gnome-screenshot/default.nix | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/pkgs/desktops/gnome/core/gnome-screenshot/default.nix b/pkgs/desktops/gnome/core/gnome-screenshot/default.nix index a2c8f7527177..3904f1443f7d 100644 --- a/pkgs/desktops/gnome/core/gnome-screenshot/default.nix +++ b/pkgs/desktops/gnome/core/gnome-screenshot/default.nix @@ -4,6 +4,7 @@ , libxml2 , libhandy , fetchurl +, fetchpatch , pkg-config , libcanberra-gtk3 , gtk3 @@ -27,6 +28,15 @@ stdenv.mkDerivation rec { sha256 = "Stt97JJkKPdCY9V5ZnPPFC5HILbnaPVGio0JM/mMlZc="; }; + patches = [ + # Fix build with meson 0.61 + # https://gitlab.gnome.org/GNOME/gnome-screenshot/-/issues/186 + (fetchpatch { + url = "https://gitlab.gnome.org/GNOME/gnome-screenshot/-/commit/b60dad3c2536c17bd201f74ad8e40eb74385ed9f.patch"; + sha256 = "Js83h/3xxcw2hsgjzGa5lAYFXVrt6MPhXOTh5dZTx/w="; + }) + ]; + nativeBuildInputs = [ meson ninja From 5fa8d3ac3871ca58b56dcc9a4de2b246053ca27e Mon Sep 17 00:00:00 2001 From: Bobby Rong Date: Wed, 30 Mar 2022 17:00:30 +0800 Subject: [PATCH 5/5] gnome-2048: fix build with meson 0.61 --- pkgs/desktops/gnome/games/gnome-2048/default.nix | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/pkgs/desktops/gnome/games/gnome-2048/default.nix b/pkgs/desktops/gnome/games/gnome-2048/default.nix index 90bd99e4a7bf..137521c8bba3 100644 --- a/pkgs/desktops/gnome/games/gnome-2048/default.nix +++ b/pkgs/desktops/gnome/games/gnome-2048/default.nix @@ -1,6 +1,7 @@ { lib , stdenv , fetchurl +, fetchpatch , wrapGAppsHook , meson , vala @@ -23,6 +24,15 @@ stdenv.mkDerivation rec { sha256 = "0s5fg4z5in1h39fcr69j1qc5ynmg7a8mfprk3mc3c0csq3snfwz2"; }; + patches = [ + # Fix build with meson 0.61 + # https://gitlab.gnome.org/GNOME/gnome-2048/-/merge_requests/21 + (fetchpatch { + url = "https://gitlab.gnome.org/GNOME/gnome-2048/-/commit/194e22699f7166a016cd39ba26dd719aeecfc868.patch"; + sha256 = "Qpn/OJJwblRm5Pi453aU2HwbrNjsf+ftmSnns/5qZ9E="; + }) + ]; + nativeBuildInputs = [ itstool meson