Cargo 1.84.0 seems to have changed the output format of cargo vendor again, once again invalidating fetchCargoTarball FOD hashes. It's time to fix this once and for all, switching across the board to fetchCargoVendor, which is not dependent on cargo vendor's output format. It should be possible to reproduce this diff. To do so, get the list of files changed by this commit, e.g. with git diff --name-only, then run the following two commands, each with that list of files as their standard input: xargs sed -i 's/^\(. *\)\(cargoHash\)\b/\1useFetchCargoVendor = true;\n\1cargoHash/' cut -d / -f 4 | xargs -n 1 nix-update --version=skip This will take a long time. It might be possible to parallelize it using xargs' -P option. I haven't tested it.
47 lines
1.1 KiB
Nix
47 lines
1.1 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=";
|
|
};
|
|
|
|
useFetchCargoVendor = true;
|
|
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 = with maintainers; [ ];
|
|
mainProgram = "swayrbar";
|
|
};
|
|
}
|