
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. These are a few cases that could have been in batch 1, but weren't for whatever reason. Maybe there were merge conflicts, or a transient network failure. 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
44 lines
1.1 KiB
Nix
44 lines
1.1 KiB
Nix
{
|
|
lib,
|
|
rustPlatform,
|
|
fetchFromGitHub,
|
|
installShellFiles,
|
|
stdenv,
|
|
}:
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
pname = "charasay";
|
|
version = "3.3.0";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "latipun7";
|
|
repo = pname;
|
|
rev = "v${version}";
|
|
hash = "sha256-NB2GDDFH9IW/c0acMojYHuzPrx0J3tjlDqjQa6ZRbN4=";
|
|
};
|
|
|
|
useFetchCargoVendor = true;
|
|
cargoHash = "sha256-i2CvwQXKKfYLdK0tKf/w4TepPyMo99v1I+kIr00PWcY=";
|
|
|
|
nativeBuildInputs = [ installShellFiles ];
|
|
|
|
postPatch = ''
|
|
rm .cargo/config.toml
|
|
'';
|
|
|
|
postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
|
|
installShellCompletion --cmd chara \
|
|
--bash <($out/bin/chara completions --shell bash) \
|
|
--fish <($out/bin/chara completions --shell fish) \
|
|
--zsh <($out/bin/chara completions --shell zsh)
|
|
'';
|
|
|
|
meta = with lib; {
|
|
description = "Future of cowsay - Colorful characters saying something";
|
|
homepage = "https://github.com/latipun7/charasay";
|
|
license = licenses.mit;
|
|
maintainers = with maintainers; [ hmajid2301 ];
|
|
mainProgram = "chara";
|
|
};
|
|
}
|