about summary refs log tree commit diff
path: root/pkgs/desktops/pantheon
diff options
context:
space:
mode:
authorBobby Rong <rjl931189261@126.com>2021-08-02 21:11:31 +0800
committerBobby Rong <rjl931189261@126.com>2021-09-18 19:33:34 +0800
commit840cd6ca9f5124a890a5472e2b7df11624688588 (patch)
treef18d79b8bc27d50dacd53141774e698f257f8c6d /pkgs/desktops/pantheon
parentc752b39bcd087d67b2ad49381dc6a50f17bcef0b (diff)
pantheon.wingpanel-indicator-a11y: init at 1.0.0
Diffstat (limited to 'pkgs/desktops/pantheon')
-rw-r--r--pkgs/desktops/pantheon/default.nix13
-rw-r--r--pkgs/desktops/pantheon/desktop/wingpanel-indicators/a11y/default.nix70
2 files changed, 78 insertions, 5 deletions
diff --git a/pkgs/desktops/pantheon/default.nix b/pkgs/desktops/pantheon/default.nix
index 61d264479aea5..0c0e826024c49 100644
--- a/pkgs/desktops/pantheon/default.nix
+++ b/pkgs/desktops/pantheon/default.nix
@@ -16,11 +16,12 @@ lib.makeScope pkgs.newScope (self: with self; {
   ];
 
   wingpanelIndicators = [
-    wingpanel-applications-menu 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
+    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
   ];
 
   maintainers = lib.teams.pantheon.members;
@@ -122,6 +123,8 @@ lib.makeScope pkgs.newScope (self: with self; {
 
   wingpanel-applications-menu = callPackage ./desktop/wingpanel-indicators/applications-menu { };
 
+  wingpanel-indicator-a11y = callPackage ./desktop/wingpanel-indicators/a11y { };
+
   wingpanel-indicator-bluetooth = callPackage ./desktop/wingpanel-indicators/bluetooth { };
 
   wingpanel-indicator-datetime = callPackage ./desktop/wingpanel-indicators/datetime { };
diff --git a/pkgs/desktops/pantheon/desktop/wingpanel-indicators/a11y/default.nix b/pkgs/desktops/pantheon/desktop/wingpanel-indicators/a11y/default.nix
new file mode 100644
index 0000000000000..ff89c2de33043
--- /dev/null
+++ b/pkgs/desktops/pantheon/desktop/wingpanel-indicators/a11y/default.nix
@@ -0,0 +1,70 @@
+{ lib, stdenv
+, fetchFromGitHub
+, fetchpatch
+, nix-update-script
+, pantheon
+, meson
+, ninja
+, pkg-config
+, python3
+, vala
+, granite
+, gtk3
+, libgee
+, wingpanel
+}:
+
+stdenv.mkDerivation rec {
+  pname = "wingpanel-indicator-a11y";
+  version = "1.0.0";
+
+  src = fetchFromGitHub {
+    owner = "elementary";
+    repo = pname;
+    rev = version;
+    sha256 = "1adx1sx9qh02hjgv5h0gwyn116shjl3paxmyaiv4cgh6vq3ndp3c";
+  };
+
+  patches = [
+    # Upstream code not respecting our localedir
+    # https://github.com/elementary/wingpanel-indicator-a11y/pull/48
+    (fetchpatch {
+      url = "https://github.com/elementary/wingpanel-indicator-a11y/commit/fb8412d56bc1c42b70e8ee41b837e8024e1297f7.patch";
+      sha256 = "0619npdw9wvaz1zk2lzikczyjdqba8v8c9ry9zizvvl4j1i1ad7k";
+    })
+  ];
+
+  passthru = {
+    updateScript = nix-update-script {
+      attrPath = "pantheon.${pname}";
+    };
+  };
+
+  nativeBuildInputs = [
+    meson
+    ninja
+    pkg-config
+    python3
+    vala
+  ];
+
+  buildInputs = [
+    granite
+    gtk3
+    libgee
+    wingpanel
+  ];
+
+  postPatch = ''
+    chmod +x meson/post_install.py
+    patchShebangs meson/post_install.py
+  '';
+
+  meta = with lib; {
+    description = "Universal Access Indicator for Wingpanel";
+    homepage = "https://github.com/elementary/wingpanel-indicator-a11y";
+    license = licenses.gpl2Plus;
+    platforms = platforms.linux;
+    maintainers = pantheon.maintainers;
+  };
+}