diff --git a/nixos/modules/services/x11/desktop-managers/pantheon.nix b/nixos/modules/services/x11/desktop-managers/pantheon.nix index 3296b7220485..980a6b939d5a 100644 --- a/nixos/modules/services/x11/desktop-managers/pantheon.nix +++ b/nixos/modules/services/x11/desktop-managers/pantheon.nix @@ -227,9 +227,9 @@ in environment.sessionVariables.GTK_CSD = "1"; environment.etc."gtk-3.0/settings.ini".source = "${pkgs.pantheon.elementary-default-settings}/etc/gtk-3.0/settings.ini"; - xdg.portal.extraPortals = with pkgs; [ - pantheon.elementary-files - pantheon.elementary-settings-daemon + xdg.portal.extraPortals = with pkgs.pantheon; [ + elementary-files + elementary-settings-daemon xdg-desktop-portal-pantheon ]; diff --git a/pkgs/desktops/pantheon/apps/elementary-videos/default.nix b/pkgs/desktops/pantheon/apps/elementary-videos/default.nix index faeaab7ece18..f7286c9108a6 100644 --- a/pkgs/desktops/pantheon/apps/elementary-videos/default.nix +++ b/pkgs/desktops/pantheon/apps/elementary-videos/default.nix @@ -21,15 +21,13 @@ stdenv.mkDerivation rec { pname = "elementary-videos"; - version = "2.8.0"; - - repoName = "videos"; + version = "2.8.1"; src = fetchFromGitHub { owner = "elementary"; - repo = repoName; + repo = "videos"; rev = version; - sha256 = "sha256-FFCtQ42LygfjowehwZcISWTfv8PBZTH0X8mPrpiG8Ug="; + sha256 = "sha256-Ki6i9u+oXOBTH+dVJ9RgBxszD7Wvdrfahd9abyjFYJY="; }; nativeBuildInputs = [ diff --git a/pkgs/desktops/pantheon/default.nix b/pkgs/desktops/pantheon/default.nix index 3300dd2ec8c4..7569b2eb4f69 100644 --- a/pkgs/desktops/pantheon/default.nix +++ b/pkgs/desktops/pantheon/default.nix @@ -4,23 +4,37 @@ lib.makeScope pkgs.newScope (self: with self; { switchboardPlugs = [ - switchboard-plug-a11y switchboard-plug-about - switchboard-plug-applications switchboard-plug-bluetooth - switchboard-plug-datetime switchboard-plug-display - switchboard-plug-keyboard switchboard-plug-mouse-touchpad - switchboard-plug-network switchboard-plug-notifications - switchboard-plug-onlineaccounts switchboard-plug-pantheon-shell - switchboard-plug-power switchboard-plug-printers - switchboard-plug-security-privacy switchboard-plug-sharing - switchboard-plug-sound switchboard-plug-wacom + switchboard-plug-a11y + switchboard-plug-about + switchboard-plug-applications + switchboard-plug-bluetooth + switchboard-plug-datetime + switchboard-plug-display + switchboard-plug-keyboard + switchboard-plug-mouse-touchpad + switchboard-plug-network + switchboard-plug-notifications + switchboard-plug-onlineaccounts + switchboard-plug-pantheon-shell + switchboard-plug-power + switchboard-plug-printers + switchboard-plug-security-privacy + switchboard-plug-sharing + switchboard-plug-sound + switchboard-plug-wacom ]; wingpanelIndicators = [ - wingpanel-applications-menu wingpanel-indicator-a11y - wingpanel-indicator-bluetooth wingpanel-indicator-datetime - wingpanel-indicator-keyboard wingpanel-indicator-network - wingpanel-indicator-nightlight wingpanel-indicator-notifications - wingpanel-indicator-power wingpanel-indicator-session + wingpanel-applications-menu + wingpanel-indicator-a11y + wingpanel-indicator-bluetooth + wingpanel-indicator-datetime + wingpanel-indicator-keyboard + wingpanel-indicator-network + wingpanel-indicator-nightlight + wingpanel-indicator-notifications + wingpanel-indicator-power + wingpanel-indicator-session wingpanel-indicator-sound ]; @@ -129,6 +143,8 @@ lib.makeScope pkgs.newScope (self: with self; { pantheon-agent-polkit = callPackage ./services/pantheon-agent-polkit { }; + xdg-desktop-portal-pantheon = callPackage ./services/xdg-desktop-portal-pantheon { }; + #### WINGPANEL INDICATORS wingpanel-applications-menu = callPackage ./desktop/wingpanel-indicators/applications-menu { }; @@ -211,6 +227,13 @@ lib.makeScope pkgs.newScope (self: with self; { elementary-wallpapers = callPackage ./artwork/elementary-wallpapers { }; + ### THIRD-PARTY + + # Put packages that ONLY works with Pantheon in pkgs/desktops/pantheon/third-party, + # specfically third party switchboard plugins and wingpanel indicators. + # Please call these packages in pkgs/top-level/all-packages.nix instead of this file. + # https://github.com/NixOS/nixpkgs/issues/115222#issuecomment-906868654 + } // lib.optionalAttrs (config.allowAliases or true) { ### ALIASES diff --git a/pkgs/desktops/pantheon/desktop/wingpanel-indicators/notifications/default.nix b/pkgs/desktops/pantheon/desktop/wingpanel-indicators/notifications/default.nix index 3ebc38138795..ceabac94a236 100644 --- a/pkgs/desktops/pantheon/desktop/wingpanel-indicators/notifications/default.nix +++ b/pkgs/desktops/pantheon/desktop/wingpanel-indicators/notifications/default.nix @@ -16,13 +16,13 @@ stdenv.mkDerivation rec { pname = "wingpanel-indicator-notifications"; - version = "6.0.3"; + version = "6.0.4"; src = fetchFromGitHub { owner = "elementary"; repo = pname; rev = version; - sha256 = "sha256-iHhZJwaomQgH1Sal8uejl4QlavOQ75UKZ9xchTi1X3U="; + sha256 = "sha256-tIpR/WIhE0Mmt2EploNNDVlAX4OUNI3VnEflTLVkfSo="; }; nativeBuildInputs = [ diff --git a/pkgs/development/libraries/xdg-desktop-portal-pantheon/default.nix b/pkgs/desktops/pantheon/services/xdg-desktop-portal-pantheon/default.nix similarity index 94% rename from pkgs/development/libraries/xdg-desktop-portal-pantheon/default.nix rename to pkgs/desktops/pantheon/services/xdg-desktop-portal-pantheon/default.nix index 68a187418343..3ceff2095d2b 100644 --- a/pkgs/development/libraries/xdg-desktop-portal-pantheon/default.nix +++ b/pkgs/desktops/pantheon/services/xdg-desktop-portal-pantheon/default.nix @@ -8,9 +8,9 @@ , vala , wrapGAppsHook , glib +, granite , gtk3 , libhandy -, pantheon , systemd , vte }: @@ -36,9 +36,9 @@ stdenv.mkDerivation rec { buildInputs = [ glib + granite gtk3 libhandy - pantheon.granite systemd vte ]; @@ -49,7 +49,7 @@ stdenv.mkDerivation rec { passthru = { updateScript = nix-update-script { - attrPath = pname; + attrPath = "pantheon.${pname}"; }; }; diff --git a/pkgs/applications/system/pantheon-tweaks/default.nix b/pkgs/desktops/pantheon/third-party/pantheon-tweaks/default.nix similarity index 100% rename from pkgs/applications/system/pantheon-tweaks/default.nix rename to pkgs/desktops/pantheon/third-party/pantheon-tweaks/default.nix diff --git a/pkgs/applications/system/pantheon-tweaks/fix-paths.patch b/pkgs/desktops/pantheon/third-party/pantheon-tweaks/fix-paths.patch similarity index 100% rename from pkgs/applications/system/pantheon-tweaks/fix-paths.patch rename to pkgs/desktops/pantheon/third-party/pantheon-tweaks/fix-paths.patch diff --git a/pkgs/desktops/pantheon/third-party/wingpanel-indicator-ayatana/default.nix b/pkgs/desktops/pantheon/third-party/wingpanel-indicator-ayatana/default.nix new file mode 100644 index 000000000000..6acb1fe36f44 --- /dev/null +++ b/pkgs/desktops/pantheon/third-party/wingpanel-indicator-ayatana/default.nix @@ -0,0 +1,58 @@ +{ lib +, stdenv +, fetchFromGitHub +, substituteAll +, meson +, ninja +, pkg-config +, vala +, gtk3 +, libindicator-gtk3 +, pantheon +, indicator-application-gtk3 +}: + +stdenv.mkDerivation rec { + pname = "wingpanel-indicator-ayatana"; + version = "unstable-2021-12-01"; + + src = fetchFromGitHub { + owner = "Lafydev"; + repo = pname; + rev = "53dc05919cdba772c787620a4bee5821e38c53cd"; + sha256 = "sha256-T0OHzqENyeAr0pvXUaRMwF1RpwKVyDAF5P5G9S28COU="; + }; + + patches = [ + # Fixes install path for wingpanel indicator + # https://github.com/Lafydev/wingpanel-indicator-ayatana/pull/30 + ./fix-indicator-dir.patch + # Tells the indicator the path for libapplication.so + (substituteAll { + src = ./fix-libapplication-dir.patch; + indicator_application = indicator-application-gtk3; + }) + ]; + + nativeBuildInputs = [ + meson + ninja + pkg-config + vala + ]; + + buildInputs = [ + gtk3 + libindicator-gtk3 + pantheon.granite + pantheon.wingpanel + ]; + + meta = with lib; { + description = "Ayatana Compatibility Indicator for Wingpanel"; + homepage = "https://github.com/Lafydev/wingpanel-indicator-ayatana"; + license = licenses.lgpl21Plus; + platforms = platforms.linux; + maintainers = teams.pantheon.members; + }; +} diff --git a/pkgs/desktops/pantheon/third-party/wingpanel-indicator-ayatana/fix-indicator-dir.patch b/pkgs/desktops/pantheon/third-party/wingpanel-indicator-ayatana/fix-indicator-dir.patch new file mode 100644 index 000000000000..e6f71558e3e4 --- /dev/null +++ b/pkgs/desktops/pantheon/third-party/wingpanel-indicator-ayatana/fix-indicator-dir.patch @@ -0,0 +1,16 @@ +diff --git a/meson.build b/meson.build +index 4aeab2b..dc44e6c 100644 +--- a/meson.build ++++ b/meson.build +@@ -25,8 +25,10 @@ dependencies = { + 'wingpanel': wingpanel + } + ++libdir = join_paths(get_option('prefix'), get_option('libdir')) ++ + indicator_name = 'ayatana' +-indicator_dir = dependencies['wingpanel'].get_pkgconfig_variable('indicatorsdir') ++indicator_dir = dependencies['wingpanel'].get_pkgconfig_variable('indicatorsdir', define_variable: ['libdir', libdir]) + + # ---------------------------------------------------------------------------------------------------------------------- + # Bindings: diff --git a/pkgs/desktops/pantheon/third-party/wingpanel-indicator-ayatana/fix-libapplication-dir.patch b/pkgs/desktops/pantheon/third-party/wingpanel-indicator-ayatana/fix-libapplication-dir.patch new file mode 100644 index 000000000000..2d9a510b751e --- /dev/null +++ b/pkgs/desktops/pantheon/third-party/wingpanel-indicator-ayatana/fix-libapplication-dir.patch @@ -0,0 +1,13 @@ +diff --git a/src/IndicatorFactory.vala b/src/IndicatorFactory.vala +index 9411de0..632d83b 100644 +--- a/src/IndicatorFactory.vala ++++ b/src/IndicatorFactory.vala +@@ -24,7 +24,7 @@ public class AyatanaCompatibility.IndicatorFactory : Object, IndicatorLoader { + public Gee.Collection get_indicators () { + if (indicators == null) { + indicators = new Gee.LinkedList (); +- load_indicator (File.new_for_path (Constants.AYATANA_INDICATOR_DIR), "libapplication.so"); ++ load_indicator (File.new_for_path ("@indicator_application@/lib/indicators3/7/"), "libapplication.so"); + } + + return indicators.read_only_view; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 301afaac82ee..dfb6f592b457 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -8512,7 +8512,7 @@ with pkgs; pamtester = callPackage ../tools/security/pamtester { }; - pantheon-tweaks = callPackage ../applications/system/pantheon-tweaks { }; + pantheon-tweaks = callPackage ../desktops/pantheon/third-party/pantheon-tweaks { }; paperless-ng = callPackage ../applications/office/paperless-ng { }; @@ -10994,6 +10994,8 @@ with pkgs; chase = callPackage ../tools/system/chase { }; + wingpanel-indicator-ayatana = callPackage ../desktops/pantheon/third-party/wingpanel-indicator-ayatana { }; + wimlib = callPackage ../tools/archivers/wimlib { }; wipe = callPackage ../tools/security/wipe { }; @@ -29485,8 +29487,6 @@ with pkgs; xdg-desktop-portal-gtk = callPackage ../development/libraries/xdg-desktop-portal-gtk { }; - xdg-desktop-portal-pantheon = callPackage ../development/libraries/xdg-desktop-portal-pantheon { }; - xdg-desktop-portal-wlr = callPackage ../development/libraries/xdg-desktop-portal-wlr { }; xdg-user-dirs = callPackage ../tools/X11/xdg-user-dirs { };