2021-01-15 22:18:51 +00:00
|
|
|
{ lib, stdenv
|
2020-04-24 23:36:52 +00:00
|
|
|
, substituteAll
|
|
|
|
, fetchFromGitHub
|
|
|
|
, libpulseaudio
|
|
|
|
, python3
|
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "gnome-shell-extension-sound-output-device-chooser";
|
2021-03-20 04:20:00 +00:00
|
|
|
version = "35";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "kgshank";
|
|
|
|
repo = "gse-sound-output-device-chooser";
|
|
|
|
rev = version;
|
2021-03-20 04:20:00 +00:00
|
|
|
sha256 = "sha256-Yl5ut6kJAkAAdCBiNFpwDgshXCLMmFH3/zhnFGpyKqs=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
patches = [
|
2021-03-20 04:20:00 +00:00
|
|
|
# Fix paths to libpulse and python
|
2020-04-24 23:36:52 +00:00
|
|
|
(substituteAll {
|
|
|
|
src = ./fix-paths.patch;
|
|
|
|
libpulse = "${libpulseaudio}/lib/libpulse.so";
|
|
|
|
python = python3.interpreter;
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
|
|
|
dontBuild = true;
|
|
|
|
|
|
|
|
uuid = "sound-output-device-chooser@kgshank.net";
|
|
|
|
installPhase = ''
|
2020-07-18 16:06:22 +00:00
|
|
|
runHook preInstall
|
2020-04-24 23:36:52 +00:00
|
|
|
mkdir -p $out/share/gnome-shell/extensions
|
|
|
|
cp -r ${uuid} $out/share/gnome-shell/extensions
|
2020-07-18 16:06:22 +00:00
|
|
|
runHook postInstall
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "GNOME Shell extension adding audio device chooser to panel";
|
2021-03-20 04:20:00 +00:00
|
|
|
license = licenses.gpl3Plus;
|
2020-04-24 23:36:52 +00:00
|
|
|
maintainers = with maintainers; [ jtojnar ];
|
|
|
|
homepage = "https://github.com/kgshank/gse-sound-output-device-chooser";
|
|
|
|
};
|
|
|
|
}
|