From 891f943c126815f858294ad12e2c876b259e6a74 Mon Sep 17 00:00:00 2001 From: Bobby Rong Date: Sun, 18 Jul 2021 12:05:01 +0800 Subject: [PATCH] pantheon.elementary-onboarding: 1.2.1 -> 6.0.0 --- .../desktop/elementary-onboarding/default.nix | 25 ++++++++----------- .../elementary-onboarding/fix-paths.patch | 13 ++++++++++ 2 files changed, 24 insertions(+), 14 deletions(-) create mode 100644 pkgs/desktops/pantheon/desktop/elementary-onboarding/fix-paths.patch diff --git a/pkgs/desktops/pantheon/desktop/elementary-onboarding/default.nix b/pkgs/desktops/pantheon/desktop/elementary-onboarding/default.nix index 70da883392a8..05e92e127a3c 100644 --- a/pkgs/desktops/pantheon/desktop/elementary-onboarding/default.nix +++ b/pkgs/desktops/pantheon/desktop/elementary-onboarding/default.nix @@ -1,8 +1,8 @@ { lib, stdenv , fetchFromGitHub , nix-update-script +, substituteAll , pantheon -, fetchpatch , pkg-config , meson , ninja @@ -17,11 +17,12 @@ , gettext , libhandy , wrapGAppsHook +, appcenter }: stdenv.mkDerivation rec { pname = "elementary-onboarding"; - version = "1.2.1"; + version = "6.0.0"; repoName = "onboarding"; @@ -29,20 +30,9 @@ stdenv.mkDerivation rec { owner = "elementary"; repo = repoName; rev = version; - sha256 = "sha256-tLTwXA2miHqYqCUbIiBjb2nQB+uN/WzuE4F9m3fVCbM="; + sha256 = "1mpw0j8ymb41py9v9qlk4nwy1lnwj7k388c7gqdv34ynck0ymfi4"; }; - patches = [ - # Port to Libhandy-1 - (fetchpatch { - url = "https://github.com/elementary/onboarding/commit/8af6b7d9216f8cbf725f708b36ef4d4f6c400c78.patch"; - sha256 = "cnSCSSFEQlNd9Ncw5VCJ32stZ8D4vhl3f+derAk/Cas="; - excludes = [ - ".github/workflows/main.yml" - ]; - }) - ]; - passthru = { updateScript = nix-update-script { attrPath = "pantheon.${pname}"; @@ -69,6 +59,13 @@ stdenv.mkDerivation rec { libhandy ]; + patches = [ + (substituteAll { + src = ./fix-paths.patch; + appcenter = appcenter; + }) + ]; + postPatch = '' chmod +x meson/post_install.py patchShebangs meson/post_install.py diff --git a/pkgs/desktops/pantheon/desktop/elementary-onboarding/fix-paths.patch b/pkgs/desktops/pantheon/desktop/elementary-onboarding/fix-paths.patch new file mode 100644 index 000000000000..c98d898bb488 --- /dev/null +++ b/pkgs/desktops/pantheon/desktop/elementary-onboarding/fix-paths.patch @@ -0,0 +1,13 @@ +diff --git a/src/Views/AppCenterView.vala b/src/Views/AppCenterView.vala +index 16cd18b..5895897 100644 +--- a/src/Views/AppCenterView.vala ++++ b/src/Views/AppCenterView.vala +@@ -55,7 +55,7 @@ public class Onboarding.AppCenterView : AbstractOnboardingView { + appcenter_button.clicked.connect (() => { + try { + var appcenter = AppInfo.create_from_commandline ( +- "io.elementary.appcenter", ++ "@appcenter@/bin/io.elementary.appcenter", + "AppCenter", + AppInfoCreateFlags.SUPPORTS_STARTUP_NOTIFICATION + );