cargo-expand: modernize, adopt (#458516)
This commit is contained in:
@@ -2,32 +2,41 @@
|
||||
lib,
|
||||
rustPlatform,
|
||||
fetchFromGitHub,
|
||||
versionCheckHook,
|
||||
nix-update-script,
|
||||
}:
|
||||
|
||||
rustPlatform.buildRustPackage rec {
|
||||
rustPlatform.buildRustPackage (finalAttrs: {
|
||||
pname = "cargo-expand";
|
||||
version = "1.0.118";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "dtolnay";
|
||||
repo = "cargo-expand";
|
||||
tag = version;
|
||||
tag = finalAttrs.version;
|
||||
hash = "sha256-+n4eiwcToXtWMPmvE41kOcZHzgugjekxQkodDagDjhI=";
|
||||
};
|
||||
|
||||
cargoHash = "sha256-Di7Nnp8qYqpTkKmmUYoKxSkntepG80vVF2AkaN5yW+U=";
|
||||
|
||||
nativeInstallCheckInputs = [ versionCheckHook ];
|
||||
versionCheckProgramArg = "--version";
|
||||
doInstallCheck = true;
|
||||
|
||||
passthru.updateScript = nix-update-script { };
|
||||
|
||||
meta = {
|
||||
description = "Cargo subcommand to show result of macro expansion";
|
||||
homepage = "https://github.com/dtolnay/cargo-expand";
|
||||
changelog = "https://github.com/dtolnay/cargo-expand/releases/tag/${version}";
|
||||
changelog = "https://github.com/dtolnay/cargo-expand/releases/tag/${finalAttrs.version}";
|
||||
license = with lib.licenses; [
|
||||
mit
|
||||
asl20
|
||||
];
|
||||
maintainers = with lib.maintainers; [
|
||||
xrelkd
|
||||
defelo
|
||||
];
|
||||
mainProgram = "cargo-expand";
|
||||
};
|
||||
}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user