
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.
88 lines
1.7 KiB
Nix
88 lines
1.7 KiB
Nix
{
|
|
lib,
|
|
rustPlatform,
|
|
fetchFromGitHub,
|
|
pkg-config,
|
|
installShellFiles,
|
|
bzip2,
|
|
openssl,
|
|
xz,
|
|
zstd,
|
|
stdenv,
|
|
darwin,
|
|
testers,
|
|
espup,
|
|
}:
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
pname = "espup";
|
|
version = "0.14.0";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "esp-rs";
|
|
repo = "espup";
|
|
rev = "v${version}";
|
|
hash = "sha256-LMzVxLwl24bw1o+OYiNcxm+KrnDyrg8tjkWhwsYYKzs=";
|
|
};
|
|
|
|
useFetchCargoVendor = true;
|
|
cargoHash = "sha256-4ModbVBymWLCtLlX6SBSWm8M2ZdcqakRqB+uHRQPArM=";
|
|
|
|
nativeBuildInputs = [
|
|
pkg-config
|
|
installShellFiles
|
|
];
|
|
|
|
buildInputs =
|
|
[
|
|
bzip2
|
|
openssl
|
|
xz
|
|
zstd
|
|
]
|
|
++ lib.optionals stdenv.hostPlatform.isDarwin [
|
|
darwin.apple_sdk.frameworks.CoreFoundation
|
|
darwin.apple_sdk.frameworks.Security
|
|
darwin.apple_sdk.frameworks.SystemConfiguration
|
|
];
|
|
|
|
env = {
|
|
OPENSSL_NO_VENDOR = true;
|
|
ZSTD_SYS_USE_PKG_CONFIG = true;
|
|
};
|
|
|
|
preCheck = ''
|
|
export HOME=$(mktemp -d)
|
|
'';
|
|
|
|
checkFlags = [
|
|
# makes network calls
|
|
"--skip=toolchain::rust::tests::test_xtensa_rust_parse_version"
|
|
];
|
|
|
|
postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
|
|
installShellCompletion --cmd espup \
|
|
--bash <($out/bin/espup completions bash) \
|
|
--fish <($out/bin/espup completions fish) \
|
|
--zsh <($out/bin/espup completions zsh)
|
|
'';
|
|
|
|
passthru.tests.version = testers.testVersion {
|
|
package = espup;
|
|
};
|
|
|
|
meta = with lib; {
|
|
description = "Tool for installing and maintaining Espressif Rust ecosystem";
|
|
homepage = "https://github.com/esp-rs/espup/";
|
|
license = with licenses; [
|
|
mit
|
|
asl20
|
|
];
|
|
maintainers = with maintainers; [
|
|
knightpp
|
|
beeb
|
|
];
|
|
mainProgram = "espup";
|
|
};
|
|
}
|