mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-14 09:43:14 +00:00
571c71e6f7
We are migrating packages that meet below requirements: 1. using `callPackage` 2. called path is a directory 3. overriding set is empty (`{ }`) 4. not containing path expressions other than relative path (to makenixpkgs-vet happy) 5. not referenced by nix files outside of the directory, other than`pkgs/top-level/all-packages.nix` 6. not referencing nix files outside of the directory 7. not referencing `default.nix` (since it's changed to `package.nix`) 8. `outPath` doesn't change after migration The tool is here: https://github.com/Aleksanaa/by-name-migrate.
39 lines
1.0 KiB
Nix
39 lines
1.0 KiB
Nix
{ lib, fetchFromSourcehut, rustPlatform, makeWrapper, withPulseaudio ? false, pulseaudio }:
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
pname = "swayrbar";
|
|
version = "0.4.0";
|
|
|
|
src = fetchFromSourcehut {
|
|
owner = "~tsdh";
|
|
repo = "swayr";
|
|
rev = "swayrbar-${version}";
|
|
sha256 = "sha256-mMcY5TatVHSAsB1E9rcpMh4/yX7j6alZX6ed0yVHFn4=";
|
|
};
|
|
|
|
cargoHash = "sha256-fr4hzKDU1n/nSn1Sn7SoI/ZMYm7VU884Rl3Vx+aXInY=";
|
|
|
|
# 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 = with maintainers; [ sebtm ];
|
|
mainProgram = "swayrbar";
|
|
};
|
|
}
|