-
-
Notifications
You must be signed in to change notification settings - Fork 14.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Revert "gnomeExtensions.volume-mixer: remove"
This reverts commit ee5506c. Further: * Add it to the gnomeExtensions attrset. (The reason for removing it in the first place was because it wasn't registered there.) * Move from .../volume-mixer.nix to .../volume-mixer/default.nix, to align with the other extensions. * Update to latest version. * Fix the installPhase. * Comment that there is a Makefile for this package, but it requires npm, so keep the buildPhase unchanged. * Add missing deps: pulseaudio and python3 * Add a small patch to find pulseaudio. * Replace maintainer aneeshusa with bjornfor, as aneeshusa doesn't seem interested in this package anymore.
- Loading branch information
Showing
3 changed files
with
67 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
{ stdenv, fetchFromGitHub, glib, pulseaudio, python3 }: | ||
|
||
stdenv.mkDerivation rec { | ||
pname = "gnome-shell-volume-mixer"; | ||
version = "3.36.6"; | ||
|
||
src = fetchFromGitHub { | ||
owner = "aleho"; | ||
repo = "gnome-shell-volume-mixer"; | ||
rev = version; | ||
sha256 = "1s80w5csv82hxky33ql734z9df8zkg1r8xmxc9hl759z6rbqml9g"; | ||
}; | ||
|
||
patches = [ | ||
./find_libpulse.patch | ||
]; | ||
|
||
buildInputs = [ | ||
glib | ||
pulseaudio | ||
python3 | ||
]; | ||
|
||
postPatch = '' | ||
substituteInPlace ./shell-volume-mixer@derhofbauer.at/pautils/pa.py \ | ||
--subst-var-by pulseaudio ${pulseaudio} | ||
''; | ||
|
||
# Could use the Makefile, but it requires npm... | ||
buildPhase = '' | ||
glib-compile-schemas --targetdir=${uuid}/schemas ${uuid}/schemas | ||
''; | ||
|
||
installPhase = '' | ||
mkdir -p $out/share/gnome-shell/extensions/${uuid} | ||
cp -r ${uuid} $out/share/gnome-shell/extensions/ | ||
''; | ||
|
||
uuid = "shell-volume-mixer@derhofbauer.at"; | ||
|
||
meta = with stdenv.lib; { | ||
description = "GNOME Shell Extension allowing separate configuration of PulseAudio devices"; | ||
license = licenses.gpl2; | ||
maintainers = with maintainers; [ bjornfor ]; | ||
homepage = https://github.com/aleho/gnome-shell-volume-mixer; | ||
}; | ||
} |
19 changes: 19 additions & 0 deletions
19
pkgs/desktops/gnome-3/extensions/volume-mixer/find_libpulse.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
Find libpulse.so via direct reference. | ||
|
||
Author: Bjørn Forsman <bjorn.forsman@gmail.com> | ||
diff --git a/shell-volume-mixer@derhofbauer.at/pautils/pa.py b/shell-volume-mixer@derhofbauer.at/pautils/pa.py | ||
index 7d058bd..00edd6a 100644 | ||
--- a/shell-volume-mixer@derhofbauer.at/pautils/pa.py | ||
+++ b/shell-volume-mixer@derhofbauer.at/pautils/pa.py | ||
@@ -16,9 +16,9 @@ | ||
from ctypes import * | ||
|
||
try: | ||
- lib = CDLL('libpulse.so.0') | ||
+ lib = CDLL('@pulseaudio@/lib/libpulse.so.0') | ||
except: | ||
- lib = CDLL('libpulse.so') | ||
+ lib = CDLL('@pulseaudio@/lib/libpulse.so') | ||
|
||
STRING = c_char_p | ||
WSTRING = c_wchar_p |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters