Gaetan Lepage
2025-03-03 12:51:01 +01:00
parent c9ce18fd2f
commit 94e563c77f
+19 -6
View File
@@ -2,30 +2,43 @@
lib,
rustPlatform,
fetchFromGitHub,
versionCheckHook,
nix-update-script,
}:
rustPlatform.buildRustPackage (attrs: {
rustPlatform.buildRustPackage (finalAttrs: {
pname = "air-formatter";
version = "0.4.0";
version = "0.4.1";
src = fetchFromGitHub {
owner = "posit-dev";
repo = "air";
rev = attrs.version;
hash = "sha256-BUbOG4D5UD+Z8Cpr4qodUrM3FFcMwjBd4M/YdPZPtpM=";
tag = finalAttrs.version;
hash = "sha256-ePTbXwOYIJF8xsiHR03EUwQnKP8KSN/8S8iRY8ME988=";
};
# Remove duplicate entries from cargo lock
cargoPatches = [ ./cargo-lock.patch ];
useFetchCargoVendor = true;
cargoHash = "sha256-EnvhqAZK76O6g99OgLruQDBUe9m9bn5ier3bgHI/f+A=";
cargoHash = "sha256-EHhelQDXGLZqbUia84OqU7frlRBXfi2oPDxhLuW7d64=";
useNextest = true;
nativeInstallCheckInputs = [
versionCheckHook
];
versionCheckProgram = "${placeholder "out"}/bin/air";
versionCheckProgramArg = [ "--version" ];
doInstallCheck = true;
passthru = {
updateScript = nix-update-script { };
};
meta = {
description = "An extremely fast R code formatter";
homepage = "https://posit-dev.github.io/air";
changelog = "https://github.com/posit-dev/air/blob/" + attrs.version + "/CHANGELOG.md";
changelog = "https://github.com/posit-dev/air/blob/${finalAttrs.version}/CHANGELOG.md";
license = lib.licenses.mit;
maintainers = [ lib.maintainers.kupac ];
mainProgram = "air";