From 019e6fdd78cf0f38bca1a343ff38ba6af420cf54 Mon Sep 17 00:00:00 2001 From: Bobby Rong Date: Fri, 18 Mar 2022 09:54:54 +0800 Subject: [PATCH 1/3] elementary-planner: fix wrong hardcoded GTK theme name The theme name is updated in elementary OS 6. --- pkgs/applications/office/elementary-planner/default.nix | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/pkgs/applications/office/elementary-planner/default.nix b/pkgs/applications/office/elementary-planner/default.nix index d07133e9065e..3cc94e2ff343 100644 --- a/pkgs/applications/office/elementary-planner/default.nix +++ b/pkgs/applications/office/elementary-planner/default.nix @@ -64,13 +64,19 @@ stdenv.mkDerivation rec { ]; postPatch = '' + # The GTK theme has been renamed in elementary OS 6 + # https://github.com/elementary/flatpak-platform/blob/6.1.0/io.elementary.Sdk.json#L182 + # Remove this in https://github.com/NixOS/nixpkgs/pull/159249 + substituteInPlace src/Application.vala \ + --replace '"gtk-theme-name", "elementary"' '"gtk-theme-name", "io.elementary.stylesheet.blueberry"' + chmod +x build-aux/meson/post_install.py patchShebangs build-aux/meson/post_install.py ''; preFixup = '' gappsWrapperArgs+=( - # the theme is hardcoded + # The GTK theme is hardcoded. --prefix XDG_DATA_DIRS : "${pantheon.elementary-gtk-theme}/share" ) ''; From 76ab64ad6c10b2bab9934f66a841e7db9b8bf3f7 Mon Sep 17 00:00:00 2001 From: Bobby Rong Date: Fri, 18 Mar 2022 09:55:41 +0800 Subject: [PATCH 2/3] elementary-planner: pick up hardcoded icon theme With https://github.com/NixOS/nixpkgs/pull/163623, we need to handle the hardcoded icon theme ourselves. Co-authored-by: Jan Tojnar --- pkgs/applications/office/elementary-planner/default.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkgs/applications/office/elementary-planner/default.nix b/pkgs/applications/office/elementary-planner/default.nix index 3cc94e2ff343..2cb3efd8f308 100644 --- a/pkgs/applications/office/elementary-planner/default.nix +++ b/pkgs/applications/office/elementary-planner/default.nix @@ -78,6 +78,8 @@ stdenv.mkDerivation rec { gappsWrapperArgs+=( # The GTK theme is hardcoded. --prefix XDG_DATA_DIRS : "${pantheon.elementary-gtk-theme}/share" + # The icon theme is hardcoded. + --prefix XDG_DATA_DIRS : "$XDG_ICON_DIRS" ) ''; From 4d201e7ae5b53114ecc19e3a5268081adb9f70b3 Mon Sep 17 00:00:00 2001 From: Bobby Rong Date: Thu, 17 Mar 2022 16:31:40 +0800 Subject: [PATCH 3/3] elementary-planner: fix build with vala 0.56 --- pkgs/applications/office/elementary-planner/default.nix | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pkgs/applications/office/elementary-planner/default.nix b/pkgs/applications/office/elementary-planner/default.nix index 2cb3efd8f308..54ad0753c72e 100644 --- a/pkgs/applications/office/elementary-planner/default.nix +++ b/pkgs/applications/office/elementary-planner/default.nix @@ -70,6 +70,11 @@ stdenv.mkDerivation rec { substituteInPlace src/Application.vala \ --replace '"gtk-theme-name", "elementary"' '"gtk-theme-name", "io.elementary.stylesheet.blueberry"' + # Fix build with vala 0.56 + # https://github.com/alainm23/planner/pull/884 + substituteInPlace src/Application.vala \ + --replace "public const OptionEntry[] PLANNER_OPTIONS" "private const OptionEntry[] PLANNER_OPTIONS" + chmod +x build-aux/meson/post_install.py patchShebangs build-aux/meson/post_install.py '';