2023-11-05 06:40:08 -07:00
|
|
|
{ lib
|
|
|
|
, rustPlatform
|
|
|
|
, fetchFromGitHub
|
|
|
|
, pipewire
|
|
|
|
, wireplumber
|
|
|
|
, makeWrapper
|
|
|
|
}:
|
|
|
|
let
|
2024-07-21 22:19:20 -06:00
|
|
|
version = "2.2.0";
|
2023-11-05 06:40:08 -07:00
|
|
|
in
|
|
|
|
rustPlatform.buildRustPackage {
|
|
|
|
pname = "sink-rotate";
|
|
|
|
inherit version;
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "mightyiam";
|
|
|
|
repo = "sink-rotate";
|
|
|
|
rev = "v${version}";
|
2024-07-21 22:19:20 -06:00
|
|
|
hash = "sha256-ZHbisG9pdctkwfD1S3kxMZhBqPw0Ni5Q9qQG4RssnSw=";
|
2023-11-05 06:40:08 -07:00
|
|
|
};
|
|
|
|
|
2024-07-21 22:19:20 -06:00
|
|
|
cargoHash = "sha256-TWuyU1+F3zEcFFd8ZeZmL3IvpKLLv3zimZ2WFVYFqyo=";
|
2023-11-05 06:40:08 -07:00
|
|
|
|
2024-09-04 15:42:03 -06:00
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
2023-11-05 06:40:08 -07:00
|
|
|
|
|
|
|
postFixup = ''
|
|
|
|
wrapProgram $out/bin/sink-rotate \
|
|
|
|
--prefix PATH : ${pipewire}/bin/pw-dump \
|
|
|
|
--prefix PATH : ${wireplumber}/bin/wpctl
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
2024-07-21 22:19:20 -06:00
|
|
|
description = "Command that rotates the default PipeWire audio sink";
|
2023-11-05 06:40:08 -07:00
|
|
|
homepage = "https://github.com/mightyiam/sink-rotate";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ mightyiam ];
|
|
|
|
mainProgram = "sink-rotate";
|
|
|
|
platforms = platforms.linux;
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|