summary refs log tree commit diff
path: root/pkgs
diff options
context:
space:
mode:
authorRyan Horiguchi <ryan.horiguchi@gmail.com>2022-01-12 02:14:11 +0100
committerRyan Horiguchi <ryan.horiguchi@gmail.com>2022-01-12 16:55:54 +0100
commitca1cddd15b366dc0cac086016e3e4533b89b88aa (patch)
tree533420088765f7d4eefe0e01c41472a8e2e98746 /pkgs
parent92b09d4735639fa4ee7fb550aa9e48b64d3e0d88 (diff)
downloadnixpkgs-ca1cddd15b366dc0cac086016e3e4533b89b88aa.tar
nixpkgs-ca1cddd15b366dc0cac086016e3e4533b89b88aa.tar.gz
nixpkgs-ca1cddd15b366dc0cac086016e3e4533b89b88aa.tar.bz2
nixpkgs-ca1cddd15b366dc0cac086016e3e4533b89b88aa.tar.lz
nixpkgs-ca1cddd15b366dc0cac086016e3e4533b89b88aa.tar.xz
nixpkgs-ca1cddd15b366dc0cac086016e3e4533b89b88aa.tar.zst
nixpkgs-ca1cddd15b366dc0cac086016e3e4533b89b88aa.zip
gnomeExtensions.volume-mixer: add override to fix extension
Diffstat (limited to 'pkgs')
-rw-r--r--pkgs/desktops/gnome/extensions/extensionOverrides.nix17
-rw-r--r--pkgs/desktops/gnome/extensions/extensionOverridesPatches/shell-volume-mixer_at_derhofbauer.at.patch32
2 files changed, 48 insertions, 1 deletions
diff --git a/pkgs/desktops/gnome/extensions/extensionOverrides.nix b/pkgs/desktops/gnome/extensions/extensionOverrides.nix
index b431e7da442..da95f324409 100644
--- a/pkgs/desktops/gnome/extensions/extensionOverrides.nix
+++ b/pkgs/desktops/gnome/extensions/extensionOverrides.nix
@@ -3,10 +3,13 @@
 , gjs
 , gnome
 , gobject-introspection
-, xprop
+, pulseaudio
+, python3
+, substituteAll
 , touchegg
 , vte
 , wrapGAppsHook
+, xprop
 }:
 let
   # Helper method to reduce redundancy
@@ -62,6 +65,18 @@ super: lib.trivial.pipe super [
     '';
   }))
 
+  (patchExtension "shell-volume-mixer@derhofbauer.at" (old: {
+    patches = [
+      (substituteAll {
+        src = ./extensionOverridesPatches/shell-volume-mixer_at_derhofbauer.at.patch;
+        inherit pulseaudio;
+        inherit python3;
+      })
+    ];
+
+    meta.maintainers = with lib.maintainers; [ rhoriguchi ];
+  }))
+
   (patchExtension "unite@hardpixel.eu" (old: {
     buildInputs = [ xprop ];
 
diff --git a/pkgs/desktops/gnome/extensions/extensionOverridesPatches/shell-volume-mixer_at_derhofbauer.at.patch b/pkgs/desktops/gnome/extensions/extensionOverridesPatches/shell-volume-mixer_at_derhofbauer.at.patch
new file mode 100644
index 00000000000..f1064feb54b
--- /dev/null
+++ b/pkgs/desktops/gnome/extensions/extensionOverridesPatches/shell-volume-mixer_at_derhofbauer.at.patch
@@ -0,0 +1,32 @@
+diff --git a/lib/utils/paHelper.js b/lib/utils/paHelper.js
+index be28d21..a410a63 100755
+--- a/lib/utils/paHelper.js
++++ b/lib/utils/paHelper.js
+@@ -57,13 +57,7 @@ async function execHelper(type, index = undefined) {
+         return null;
+     }
+
+-    const python = await findPython();
+-
+-    if (!python) {
+-        return null;
+-    }
+-
+-    const args = ['/usr/bin/env', python, paUtilPath, type];
++    const args = ['@python3@/bin/python', paUtilPath, type];
+
+     if (!isNaN(index)) {
+         args.push(index);
+diff --git a/pautils/lib/libpulse.py b/pautils/lib/libpulse.py
+index a32c272..8225f2f 100755
+--- a/pautils/lib/libpulse.py
++++ b/pautils/lib/libpulse.py
+@@ -16,7 +16,7 @@
+ from ctypes import *
+
+ try:
+-    lib = CDLL('libpulse.so.0')
++    lib = CDLL('@pulseaudio@/lib/libpulse.so.0')
+ except:
+     lib = CDLL('libpulse.so')
+