From dd2c5421967a598f4b1b7fd81c99b421bd1374c0 Mon Sep 17 00:00:00 2001 From: Bobby Rong Date: Thu, 31 Mar 2022 21:28:03 +0800 Subject: [PATCH 1/5] gnome.gnome-panel: add missing geocode-glib dependency --- pkgs/desktops/gnome/misc/gnome-panel/default.nix | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/pkgs/desktops/gnome/misc/gnome-panel/default.nix b/pkgs/desktops/gnome/misc/gnome-panel/default.nix index 139e161352a1..0b107f23d78d 100644 --- a/pkgs/desktops/gnome/misc/gnome-panel/default.nix +++ b/pkgs/desktops/gnome/misc/gnome-panel/default.nix @@ -1,9 +1,12 @@ -{ lib, stdenv +{ stdenv +, lib , fetchurl +, fetchpatch , autoreconfHook , dconf , evolution-data-server , gdm +, geocode-glib , gettext , glib , gnome-desktop @@ -37,6 +40,13 @@ stdenv.mkDerivation rec { # instead of gnome-panel’s libdir so that the NixOS module can make gnome-panel # load modules from other packages as well. ./modulesdir-env-var.patch + + # Add missing geocode-glib-1.0 dependency + # https://gitlab.gnome.org/GNOME/gnome-panel/-/merge_requests/49 + (fetchpatch { + url = "https://gitlab.gnome.org/GNOME/gnome-panel/-/commit/f58a43ec4649a25f1a762b36e1401b81cd2b214b.patch"; + sha256 = "sha256-DFqaNUjkLh4xd81qgQpl+568eUZeWyF8LxdZoTgMfCQ="; + }) ]; # make .desktop Exec absolute @@ -69,6 +79,7 @@ stdenv.mkDerivation rec { dconf evolution-data-server gdm + geocode-glib glib gnome-desktop gnome-menus From 55d676321a4cc00631d2db1251ca4cf43cc476be Mon Sep 17 00:00:00 2001 From: Bobby Rong Date: Thu, 31 Mar 2022 23:22:37 +0800 Subject: [PATCH 2/5] gnome.gnome-bluetooth_1_0: init at 3.34.5 --- .../core/gnome-bluetooth/1.0/default.nix | 97 +++++++++++++++++++ pkgs/desktops/gnome/default.nix | 2 + 2 files changed, 99 insertions(+) create mode 100644 pkgs/desktops/gnome/core/gnome-bluetooth/1.0/default.nix diff --git a/pkgs/desktops/gnome/core/gnome-bluetooth/1.0/default.nix b/pkgs/desktops/gnome/core/gnome-bluetooth/1.0/default.nix new file mode 100644 index 000000000000..38bb96980dca --- /dev/null +++ b/pkgs/desktops/gnome/core/gnome-bluetooth/1.0/default.nix @@ -0,0 +1,97 @@ +{ stdenv +, lib +, fetchurl +, fetchpatch +, gnome +, meson +, ninja +, pkg-config +, gtk3 +, gettext +, glib +, udev +, itstool +, libxml2 +, wrapGAppsHook +, libnotify +, libcanberra-gtk3 +, gobject-introspection +, gtk-doc +, docbook-xsl-nons +, docbook_xml_dtd_43 +, python3 +, gsettings-desktop-schemas +}: + +stdenv.mkDerivation rec { + pname = "gnome-bluetooth"; + version = "3.34.5"; + + # TODO: split out "lib" + outputs = [ "out" "dev" "devdoc" "man" ]; + + src = fetchurl { + url = "mirror://gnome/sources/${pname}/${lib.versions.majorMinor version}/${pname}-${version}.tar.xz"; + sha256 = "bJSeUsi+zCBU2qzWBJAfZs5c9wml+pHEu3ysyTm1Pqk="; + }; + + patches = [ + # Fix build with meson 0.61. + # sendto/meson.build:24:5: ERROR: Function does not take positional arguments. + (fetchpatch { + url = "https://gitlab.gnome.org/GNOME/gnome-bluetooth/-/commit/755fd758f866d3a3f7ca482942beee749f13a91e.patch"; + sha256 = "sha256-N0MJ0pYO411o2CTNZHWmEoG2m5TGUjR6YW6HSXHTR/A="; + }) + ]; + + nativeBuildInputs = [ + meson + ninja + gettext + itstool + pkg-config + libxml2 + wrapGAppsHook + gobject-introspection + gtk-doc + docbook-xsl-nons + docbook_xml_dtd_43 + python3 + ]; + + buildInputs = [ + glib + gtk3 + udev + libnotify + libcanberra-gtk3 + gnome.adwaita-icon-theme + gsettings-desktop-schemas + ]; + + mesonFlags = [ + "-Dicon_update=false" + "-Dgtk_doc=true" + ]; + + postPatch = '' + chmod +x meson_post_install.py # patchShebangs requires executable file + patchShebangs meson_post_install.py + ''; + + passthru = { + updateScript = gnome.updateScript { + packageName = pname; + attrPath = "gnome.gnome-bluetooth_1_0"; + freeze = true; + }; + }; + + meta = with lib; { + homepage = "https://help.gnome.org/users/gnome-bluetooth/stable/index.html.en"; + description = "Application that let you manage Bluetooth in the GNOME destkop"; + maintainers = teams.gnome.members; + license = licenses.gpl2Plus; + platforms = platforms.linux; + }; +} diff --git a/pkgs/desktops/gnome/default.nix b/pkgs/desktops/gnome/default.nix index 729a6bd16ca8..1fc15fc6406f 100644 --- a/pkgs/desktops/gnome/default.nix +++ b/pkgs/desktops/gnome/default.nix @@ -48,6 +48,8 @@ lib.makeScope pkgs.newScope (self: with self; { gnome-bluetooth = callPackage ./core/gnome-bluetooth { }; + gnome-bluetooth_1_0 = callPackage ./core/gnome-bluetooth/1.0 { }; + gnome-color-manager = callPackage ./core/gnome-color-manager { }; gnome-contacts = callPackage ./core/gnome-contacts { }; From 85dff10d0644419a7c31b4faab6142bd34be3b65 Mon Sep 17 00:00:00 2001 From: Bobby Rong Date: Thu, 31 Mar 2022 23:25:54 +0800 Subject: [PATCH 3/5] gnome.gnome-flashback: use gnome-bluetooth_1_0 --- pkgs/desktops/gnome/misc/gnome-flashback/default.nix | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/pkgs/desktops/gnome/misc/gnome-flashback/default.nix b/pkgs/desktops/gnome/misc/gnome-flashback/default.nix index 34d2b6eea3c2..4401915d40ba 100644 --- a/pkgs/desktops/gnome/misc/gnome-flashback/default.nix +++ b/pkgs/desktops/gnome/misc/gnome-flashback/default.nix @@ -1,9 +1,10 @@ -{ lib, stdenv +{ stdenv +, lib , autoreconfHook , fetchurl , gettext , glib -, gnome-bluetooth +, gnome-bluetooth_1_0 , gnome-desktop , gnome-panel , gnome-session @@ -94,7 +95,7 @@ let buildInputs = [ glib - gnome-bluetooth + gnome-bluetooth_1_0 gnome-desktop gsettings-desktop-schemas gtk3 From baa0a8b9efac331802127efd57fa0be27b2cc074 Mon Sep 17 00:00:00 2001 From: Bobby Rong Date: Thu, 31 Mar 2022 23:29:42 +0800 Subject: [PATCH 4/5] blueberry: use gnome-bluetooth_1_0 --- pkgs/tools/bluetooth/blueberry/default.nix | 7 +- .../bluetooth/blueberry/gnome-bluetooth.nix | 96 ------------------- 2 files changed, 2 insertions(+), 101 deletions(-) delete mode 100644 pkgs/tools/bluetooth/blueberry/gnome-bluetooth.nix diff --git a/pkgs/tools/bluetooth/blueberry/default.nix b/pkgs/tools/bluetooth/blueberry/default.nix index bbc3babbd132..6a0f1d2d00bc 100644 --- a/pkgs/tools/bluetooth/blueberry/default.nix +++ b/pkgs/tools/bluetooth/blueberry/default.nix @@ -3,18 +3,15 @@ , fetchFromGitHub , bluez-tools , cinnamon +, gnome , gobject-introspection , intltool , pavucontrol , python3Packages , util-linux , wrapGAppsHook -, callPackage }: -let - gnome-bluetooth = callPackage ./gnome-bluetooth.nix {}; -in stdenv.mkDerivation rec { pname = "blueberry"; version = "1.4.7"; @@ -35,7 +32,7 @@ stdenv.mkDerivation rec { buildInputs = [ bluez-tools cinnamon.xapps - gnome-bluetooth + gnome.gnome-bluetooth_1_0 python3Packages.python util-linux ]; diff --git a/pkgs/tools/bluetooth/blueberry/gnome-bluetooth.nix b/pkgs/tools/bluetooth/blueberry/gnome-bluetooth.nix deleted file mode 100644 index cf0028cf833d..000000000000 --- a/pkgs/tools/bluetooth/blueberry/gnome-bluetooth.nix +++ /dev/null @@ -1,96 +0,0 @@ -{ lib -, stdenv -, fetchurl -, fetchpatch -, gnome -, meson -, ninja -, pkg-config -, gtk3 -, gettext -, glib -, udev -, itstool -, libxml2 -, wrapGAppsHook -, libnotify -, libcanberra-gtk3 -, gobject-introspection -, gtk-doc -, docbook-xsl-nons -, docbook_xml_dtd_43 -, python3 -, gsettings-desktop-schemas -}: - -stdenv.mkDerivation rec { - pname = "gnome-bluetooth"; - version = "3.34.5"; - - # TODO: split out "lib" - outputs = [ "out" "dev" "devdoc" "man" ]; - - src = fetchurl { - url = "mirror://gnome/sources/${pname}/${lib.versions.majorMinor version}/${pname}-${version}.tar.xz"; - sha256 = "1a9ynlwwkb3wpg293ym517vmrkk63y809mmcv9a21k5yr199x53c"; - }; - - patches = [ - # Fix build with meson 0.61. - # sendto/meson.build:24:5: ERROR: Function does not take positional arguments. - (fetchpatch { - url = "https://gitlab.gnome.org/GNOME/gnome-bluetooth/-/commit/755fd758f866d3a3f7ca482942beee749f13a91e.patch"; - sha256 = "sha256-N0MJ0pYO411o2CTNZHWmEoG2m5TGUjR6YW6HSXHTR/A="; - }) - ]; - - nativeBuildInputs = [ - meson - ninja - gettext - itstool - pkg-config - libxml2 - wrapGAppsHook - gobject-introspection - gtk-doc - docbook-xsl-nons - docbook_xml_dtd_43 - python3 - ]; - - buildInputs = [ - glib - gtk3 - udev - libnotify - libcanberra-gtk3 - gnome.adwaita-icon-theme - gsettings-desktop-schemas - ]; - - mesonFlags = [ - "-Dicon_update=false" - "-Dgtk_doc=true" - ]; - - postPatch = '' - chmod +x meson_post_install.py # patchShebangs requires executable file - patchShebangs meson_post_install.py - ''; - - passthru = { - updateScript = gnome.updateScript { - packageName = pname; - attrPath = "gnome.${pname}"; - }; - }; - - meta = with lib; { - homepage = "https://help.gnome.org/users/gnome-bluetooth/stable/index.html.en"; - description = "Application that let you manage Bluetooth in the GNOME destkop"; - maintainers = teams.gnome.members; - license = licenses.gpl2Plus; - platforms = platforms.linux; - }; -} From 7ce8bc5d48b68b0e7a700b197fe9582bc2007cd9 Mon Sep 17 00:00:00 2001 From: Bobby Rong Date: Thu, 31 Mar 2022 23:32:29 +0800 Subject: [PATCH 5/5] pantheon.gnome-bluetooth-contract: use gnome-bluetooth_1_0 --- nixos/modules/services/x11/desktop-managers/pantheon.nix | 1 + pkgs/desktops/pantheon/default.nix | 2 +- .../desktop/gnome-bluetooth-contract/default.nix | 9 ++++----- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/nixos/modules/services/x11/desktop-managers/pantheon.nix b/nixos/modules/services/x11/desktop-managers/pantheon.nix index 48e119a86187..3528b0f40e7b 100644 --- a/nixos/modules/services/x11/desktop-managers/pantheon.nix +++ b/nixos/modules/services/x11/desktop-managers/pantheon.nix @@ -302,6 +302,7 @@ in environment.systemPackages = with pkgs.pantheon; [ contractor file-roller-contract + gnome-bluetooth-contract ]; environment.pathsToLink = [ diff --git a/pkgs/desktops/pantheon/default.nix b/pkgs/desktops/pantheon/default.nix index a3d5f873cbcb..7f28109ad101 100644 --- a/pkgs/desktops/pantheon/default.nix +++ b/pkgs/desktops/pantheon/default.nix @@ -108,7 +108,7 @@ lib.makeScope pkgs.newScope (self: with self; { gala = callPackage ./desktop/gala { }; gnome-bluetooth-contract = callPackage ./desktop/gnome-bluetooth-contract { - inherit (gnome) gnome-bluetooth; + inherit (gnome) gnome-bluetooth_1_0; }; wingpanel = callPackage ./desktop/wingpanel { }; diff --git a/pkgs/desktops/pantheon/desktop/gnome-bluetooth-contract/default.nix b/pkgs/desktops/pantheon/desktop/gnome-bluetooth-contract/default.nix index 190514392098..6df583c2ce6a 100644 --- a/pkgs/desktops/pantheon/desktop/gnome-bluetooth-contract/default.nix +++ b/pkgs/desktops/pantheon/desktop/gnome-bluetooth-contract/default.nix @@ -3,7 +3,7 @@ , fetchFromGitHub , unstableGitUpdater , substituteAll -, gnome-bluetooth +, gnome-bluetooth_1_0 }: stdenv.mkDerivation rec { @@ -20,7 +20,9 @@ stdenv.mkDerivation rec { patches = [ (substituteAll { src = ./exec-path.patch; - gnome_bluetooth = gnome-bluetooth; + # sendto device selection is removed in gnome-bluetooth 42 + # https://github.com/elementary/gnome-bluetooth-contract/issues/1 + gnome_bluetooth = gnome-bluetooth_1_0; }) ]; @@ -49,8 +51,5 @@ stdenv.mkDerivation rec { license = licenses.gpl3Plus; maintainers = teams.pantheon.members; platforms = platforms.linux; - # sendto device selection is removed in gnome-bluetooth 42 - # https://github.com/elementary/gnome-bluetooth-contract/issues/1 - broken = true; }; }