2021-01-15 22:18:51 +00:00
|
|
|
{ lib, stdenv
|
2020-04-24 23:36:52 +00:00
|
|
|
, substituteAll
|
|
|
|
, fetchFromGitHub
|
2022-03-30 09:31:56 +00:00
|
|
|
, fetchpatch
|
2020-04-24 23:36:52 +00:00
|
|
|
, libpulseaudio
|
|
|
|
, python3
|
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "gnome-shell-extension-sound-output-device-chooser";
|
2022-03-30 09:31:56 +00:00
|
|
|
# For gnome 42 support many commits not tagged yet are needed.
|
|
|
|
version = "unstable-2022-03-29";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "kgshank";
|
|
|
|
repo = "gse-sound-output-device-chooser";
|
2022-03-30 09:31:56 +00:00
|
|
|
rev = "76f7f59d23f5ffcd66555c7662f43c9cc1ce4742";
|
|
|
|
sha256 = "sha256-iPc95LmDsYizLg45wpU+vFx/N6MR2hewSHqoRsePC/4=";
|
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";
|
|
|
|
};
|
|
|
|
}
|