diff options
author | Bobby Rong <rjl931189261@126.com> | 2021-12-18 11:19:25 +0800 |
---|---|---|
committer | Bobby Rong <rjl931189261@126.com> | 2021-12-18 13:13:29 +0800 |
commit | 7cc11f76aff82d8ecfa300353e3d16711ded2843 (patch) | |
tree | fbe6e1ea4c91a3a851f62714efd9943109a9ca7a /pkgs/desktops | |
parent | 5afe0ddcf38d57365eb42a791373594c5004c7be (diff) |
wingpanel-indicator-ayatana: init at unstable-2021-12-01
Diffstat (limited to 'pkgs/desktops')
3 files changed, 87 insertions, 0 deletions
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<IndicatorIface> get_indicators () { + if (indicators == null) { + indicators = new Gee.LinkedList<IndicatorIface> (); +- 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; |