mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-01-18 19:03:28 +00:00
Merge pull request #257997 from mightyiam/sink-rotate
sink-rotate: init at 1.0.4
This commit is contained in:
commit
03cc71bc28
41
pkgs/by-name/si/sink-rotate/package.nix
Normal file
41
pkgs/by-name/si/sink-rotate/package.nix
Normal file
@ -0,0 +1,41 @@
|
||||
{ lib
|
||||
, rustPlatform
|
||||
, fetchFromGitHub
|
||||
, pipewire
|
||||
, wireplumber
|
||||
, makeWrapper
|
||||
}:
|
||||
let
|
||||
version = "1.0.4";
|
||||
in
|
||||
rustPlatform.buildRustPackage {
|
||||
pname = "sink-rotate";
|
||||
inherit version;
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "mightyiam";
|
||||
repo = "sink-rotate";
|
||||
rev = "v${version}";
|
||||
hash = "sha256-q20uUr+7yLJlZc5YgEkY125YrZ2cuJrPv5IgWXaYRlo=";
|
||||
};
|
||||
|
||||
cargoHash = "sha256-MPeyPTkxpi6iw/BT5m4S7jVBD0c2zG2rsv+UZWQxpUU=";
|
||||
|
||||
buildInputs = [ makeWrapper ];
|
||||
|
||||
postFixup = ''
|
||||
wrapProgram $out/bin/sink-rotate \
|
||||
--prefix PATH : ${pipewire}/bin/pw-dump \
|
||||
--prefix PATH : ${wireplumber}/bin/wpctl
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "Command that rotates default between two PipeWire audio sinks.";
|
||||
homepage = "https://github.com/mightyiam/sink-rotate";
|
||||
license = licenses.mit;
|
||||
maintainers = with maintainers; [ mightyiam ];
|
||||
mainProgram = "sink-rotate";
|
||||
platforms = platforms.linux;
|
||||
};
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user