Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
46 lines
1.0 KiB
Nix
46 lines
1.0 KiB
Nix
{
|
|
lib,
|
|
fetchFromSourcehut,
|
|
rustPlatform,
|
|
makeWrapper,
|
|
withPulseaudio ? false,
|
|
pulseaudio,
|
|
}:
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
pname = "swayrbar";
|
|
version = "0.4.2";
|
|
|
|
src = fetchFromSourcehut {
|
|
owner = "~tsdh";
|
|
repo = "swayr";
|
|
rev = "swayrbar-${version}";
|
|
sha256 = "sha256-qfk4yqJkqTiFKFZXCVPPZM0g0/+A8d8fDeat9ZsfokI=";
|
|
};
|
|
|
|
cargoHash = "sha256-rByw6l/4CATEIDS5h1owGCr1x8Qt4+lzabLwni7PYMc=";
|
|
|
|
# don't build swayr
|
|
buildAndTestSubdir = pname;
|
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
|
|
|
preCheck = ''
|
|
export HOME=$TMPDIR
|
|
'';
|
|
|
|
postInstall = lib.optionals withPulseaudio ''
|
|
wrapProgram "$out/bin/swayrbar" \
|
|
--prefix PATH : "$out/bin:${lib.makeBinPath [ pulseaudio ]}"
|
|
'';
|
|
|
|
meta = with lib; {
|
|
description = "Status command for sway's swaybar implementing the swaybar-protocol";
|
|
homepage = "https://git.sr.ht/~tsdh/swayr#a-idswayrbarswayrbara";
|
|
license = with licenses; [ gpl3Plus ];
|
|
platforms = platforms.linux;
|
|
maintainers = [ ];
|
|
mainProgram = "swayrbar";
|
|
};
|
|
}
|