Alyssa Ross 63bff8c132
treewide: migrate to fetchCargoVendor, batch 1
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.
2025-01-23 11:46:43 +01:00

61 lines
1.3 KiB
Nix

{
notmuch,
lib,
fetchFromGitHub,
rustPlatform,
pkg-config,
lua5_4,
installShellFiles,
nix-update-script,
}:
rustPlatform.buildRustPackage rec {
pname = "notmuch-mailmover";
version = "0.6.0";
src = fetchFromGitHub {
owner = "michaeladler";
repo = pname;
rev = "v${version}";
hash = "sha256-v70R6CgN4RzG6L8LUg3ZvW895+G4eU8HZ0TI+jRxZ10=";
};
useFetchCargoVendor = true;
cargoHash = "sha256-aMSYXquyDwPBa4xL7wOSu/Ou1saPG5ZDXhLB4dAnomo=";
nativeBuildInputs = [
installShellFiles
pkg-config
];
buildInputs = [
notmuch
lua5_4
];
postInstall = ''
installManPage share/notmuch-mailmover.1.gz
mkdir -p $out/share/notmuch-mailmover
cp -dR example $out/share/notmuch-mailmover/
installShellCompletion --cmd notmuch-mailmover \
--bash share/notmuch-mailmover.bash \
--fish share/notmuch-mailmover.fish \
--zsh share/_notmuch-mailmover
'';
passthru.updateScript = nix-update-script { };
meta = with lib; {
description = "Application to assign notmuch tagged mails to IMAP folders";
mainProgram = "notmuch-mailmover";
homepage = "https://github.com/michaeladler/notmuch-mailmover/";
license = licenses.asl20;
maintainers = with maintainers; [
michaeladler
archer-65
];
platforms = platforms.all;
};
}