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-12-06 16:07:01 +00:00
|
|
|
version = "39";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "kgshank";
|
|
|
|
repo = "gse-sound-output-device-chooser";
|
|
|
|
rev = version;
|
2021-12-06 16:07:01 +00:00
|
|
|
sha256 = "sha256-RFdBdpKsz2MjdzxWX4UFwah+e68dqrkvm7ql0RAZZwg=";
|
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;
|
|
|
|
|
2021-07-14 22:03:04 +00:00
|
|
|
passthru = {
|
|
|
|
extensionUuid = "sound-output-device-chooser@kgshank.net";
|
|
|
|
extensionPortalSlug = "sound-output-device-chooser";
|
|
|
|
};
|
2021-05-20 23:08:51 +00:00
|
|
|
|
|
|
|
makeFlags = [
|
|
|
|
"INSTALL_DIR=${placeholder "out"}/share/gnome-shell/extensions"
|
|
|
|
];
|
|
|
|
|
|
|
|
preInstall = ''
|
|
|
|
mkdir -p ${placeholder "out"}/share/gnome-shell/extensions
|
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";
|
|
|
|
};
|
|
|
|
}
|