diff options
Diffstat (limited to 'pkgs/desktops')
3 files changed, 181 insertions, 8 deletions
diff --git a/pkgs/desktops/pantheon/apps/appcenter/default.nix b/pkgs/desktops/pantheon/apps/appcenter/default.nix index 6516db101eb5a..4fb9768ef7eef 100644 --- a/pkgs/desktops/pantheon/apps/appcenter/default.nix +++ b/pkgs/desktops/pantheon/apps/appcenter/default.nix @@ -25,15 +25,21 @@ stdenv.mkDerivation rec { pname = "appcenter"; - version = "4.0.0"; + version = "7.0.0"; src = fetchFromGitHub { owner = "elementary"; repo = pname; rev = version; - sha256 = "sha256-6QWvDBhOxoK8HjmygV92WPDgq2Jbk4igWDbXrXc7/FQ="; + sha256 = "sha256-fRurEkatWbtGiTRNe6tA2NyYk1IRCBW8SKBSUm4FrO4="; }; + patches = [ + # Having a working nix packagekit backend will supersede this. + # https://github.com/NixOS/nixpkgs/issues/177946 + ./disable-packagekit-backend.patch + ]; + nativeBuildInputs = [ dbus # for pkg-config meson diff --git a/pkgs/desktops/pantheon/apps/appcenter/disable-packagekit-backend.patch b/pkgs/desktops/pantheon/apps/appcenter/disable-packagekit-backend.patch new file mode 100644 index 0000000000000..76d6245628b7f --- /dev/null +++ b/pkgs/desktops/pantheon/apps/appcenter/disable-packagekit-backend.patch @@ -0,0 +1,167 @@ +diff --git a/src/Application.vala b/src/Application.vala +index a1c4e0d4..35555946 100644 +--- a/src/Application.vala ++++ b/src/Application.vala +@@ -180,9 +180,6 @@ public class AppCenter.App : Gtk.Application { + } + + public override void activate () { +- if (fake_update_packages != null) { +- AppCenterCore.PackageKitBackend.get_default ().fake_packages = fake_update_packages; +- } + + var client = AppCenterCore.Client.get_default (); + +@@ -200,12 +197,6 @@ public class AppCenter.App : Gtk.Application { + + if (local_path != null) { + var file = File.new_for_commandline_arg (local_path); +- +- try { +- local_package = AppCenterCore.PackageKitBackend.get_default ().add_local_component_file (file); +- } catch (Error e) { +- warning ("Failed to load local AppStream XML file: %s", e.message); +- } + } + + if (active_window == null) { +diff --git a/src/Core/BackendAggregator.vala b/src/Core/BackendAggregator.vala +index 1747cd3b..20077394 100644 +--- a/src/Core/BackendAggregator.vala ++++ b/src/Core/BackendAggregator.vala +@@ -26,8 +26,6 @@ public class AppCenterCore.BackendAggregator : Backend, Object { + + construct { + backends = new Gee.ArrayList<unowned Backend> (); +- backends.add (PackageKitBackend.get_default ()); +- backends.add (UbuntuDriversBackend.get_default ()); + backends.add (FlatpakBackend.get_default ()); + + unowned Gtk.Application app = (Gtk.Application) GLib.Application.get_default (); +diff --git a/src/Core/Package.vala b/src/Core/Package.vala +index 40fa8262..e6b90dd9 100644 +--- a/src/Core/Package.vala ++++ b/src/Core/Package.vala +@@ -327,23 +327,13 @@ public class AppCenterCore.Package : Object { + public string origin_description { + owned get { + unowned string origin = component.get_origin (); +- if (backend is PackageKitBackend) { +- if (origin == APPCENTER_PACKAGE_ORIGIN) { +- return _("AppCenter"); +- } else if (origin == ELEMENTARY_STABLE_PACKAGE_ORIGIN) { +- return _("elementary Updates"); +- } else if (origin.has_prefix ("ubuntu-")) { +- return _("Ubuntu (non-curated)"); +- } +- } else if (backend is FlatpakBackend) { ++ if (backend is FlatpakBackend) { + var fp_package = this as FlatpakPackage; + if (fp_package == null) { + return origin; + } + + return fp_package.remote_title; +- } else if (backend is UbuntuDriversBackend) { +- return _("Ubuntu Drivers"); + } + + return _("Unknown Origin (non-curated)"); +@@ -435,9 +425,7 @@ public class AppCenterCore.Package : Object { + + // The version on a PackageKit package comes from the package not AppStream, so only reset the version + // on other backends +- if (!(backend is PackageKitBackend)) { +- _latest_version = null; +- } ++ _latest_version = null; + + this.component = component; + } +diff --git a/src/Core/UpdateManager.vala b/src/Core/UpdateManager.vala +index 4d844abc..457137eb 100644 +--- a/src/Core/UpdateManager.vala ++++ b/src/Core/UpdateManager.vala +@@ -71,35 +71,9 @@ public class AppCenterCore.UpdateManager : Object { + installed_package.update_state (); + } + +- Pk.Results pk_updates; +- unowned PackageKitBackend client = PackageKitBackend.get_default (); +- try { +- pk_updates = yield client.get_updates (cancellable); +- } catch (Error e) { +- warning ("Unable to get updates from PackageKit backend: %s", e.message); +- return 0; +- } +- + uint os_count = 0; + string os_desc = ""; + +- var package_array = pk_updates.get_package_array (); +- debug ("PackageKit backend reports %d updates", package_array.length); +- +- package_array.foreach ((pk_package) => { +- var pkg_name = pk_package.get_name (); +- debug ("Added %s to OS updates", pkg_name); +- os_count++; +- unowned string pkg_summary = pk_package.get_summary (); +- unowned string pkg_version = pk_package.get_version (); +- os_desc += Markup.printf_escaped ( +- " • %s\n\t%s\n\t%s\n", +- pkg_name, +- pkg_summary, +- _("Version: %s").printf (pkg_version) +- ); +- }); +- + os_updates.component.set_pkgnames ({}); + os_updates.change_information.clear_update_info (); + +@@ -207,30 +181,13 @@ public class AppCenterCore.UpdateManager : Object { + count += 1; + } + +- pk_updates.get_details_array ().foreach ((pk_detail) => { +- var pk_package = new Pk.Package (); +- try { +- pk_package.set_id (pk_detail.get_package_id ()); +- var pkg_name = pk_package.get_name (); +- +- var pkgnames = os_updates.component.pkgnames; +- pkgnames += pkg_name; +- os_updates.component.pkgnames = pkgnames; +- +- os_updates.change_information.updatable_packages.@set (client, pk_package.get_id ()); +- os_updates.change_information.size += pk_detail.size; +- } catch (Error e) { +- critical (e.message); +- } +- }); +- + os_updates.update_state (); + runtime_updates.update_state (); + return count; + } + + public void update_restart_state () { +- var should_restart = restart_file.query_exists () || PackageKitBackend.get_default ().is_restart_required (); ++ var should_restart = restart_file.query_exists (); + + if (should_restart) { + if (!restart_required) { +diff --git a/src/meson.build b/src/meson.build +index e0ef5342..14319492 100644 +--- a/src/meson.build ++++ b/src/meson.build +@@ -12,10 +12,8 @@ appcenter_files = files( + 'Core/FlatpakBackend.vala', + 'Core/Job.vala', + 'Core/Package.vala', +- 'Core/PackageKitBackend.vala', + 'Core/ScreenshotCache.vala', + 'Core/Task.vala', +- 'Core/UbuntuDriversBackend.vala', + 'Core/UpdateManager.vala', + 'Dialogs/InstallFailDialog.vala', + 'Dialogs/StripeDialog.vala', diff --git a/pkgs/desktops/pantheon/apps/elementary-code/default.nix b/pkgs/desktops/pantheon/apps/elementary-code/default.nix index 4a33fc2e04a3d..388feb83cfe7f 100644 --- a/pkgs/desktops/pantheon/apps/elementary-code/default.nix +++ b/pkgs/desktops/pantheon/apps/elementary-code/default.nix @@ -28,21 +28,21 @@ stdenv.mkDerivation rec { pname = "elementary-code"; - version = "6.2.0"; + version = "7.0.0"; src = fetchFromGitHub { owner = "elementary"; repo = "code"; rev = version; - sha256 = "sha256-QhJNRhYgGbPMd7B1X3kG+pnC/lGUoF7gc7O1PdG49LI="; + sha256 = "sha256-6ZOdlOCIDy5aWQre15+SrTH/vhY9OeTffY/uTSroELc="; }; patches = [ - # Fix drag and drop of accented text and between tabs - # https://github.com/elementary/code/pull/1194 + # Fix global search action disabled at startup + # https://github.com/elementary/code/pull/1254 (fetchpatch { - url = "https://github.com/elementary/code/commit/1ed7b590768ea9cb5b4658e27d9dc7ac224442ae.patch"; - sha256 = "sha256-VrYcEbkzQKi5gFB/Vw/0NITZvSXKXfuEv2R3m0VALVM="; + url = "https://github.com/elementary/code/commit/1e75388b07c060cc10ecd612076f235b1833fab8.patch"; + sha256 = "sha256-8Djh1orMcmICdYwQFENJCaYlXK0E52NhCmuhlHCz7oM="; }) ]; |