rq: cleanup

This commit is contained in:
Gaetan Lepage 2025-04-18 00:58:21 +02:00
parent 9fb5d292ba
commit 05967b7213

View file

@ -2,17 +2,19 @@
lib,
rustPlatform,
fetchFromGitHub,
versionCheckHook,
nix-update-script,
}:
rustPlatform.buildRustPackage rec {
rustPlatform.buildRustPackage (finalAttrs: {
pname = "rq";
version = "1.0.4";
src = fetchFromGitHub {
owner = "dflemstr";
repo = pname;
rev = "v${version}";
sha256 = "sha256-QyYTbMXikLSe3eYJRUALQJxUJjA6VlvaLMwGrxIKfZI=";
repo = "rq";
tag = "v${finalAttrs.version}";
hash = "sha256-QyYTbMXikLSe3eYJRUALQJxUJjA6VlvaLMwGrxIKfZI=";
};
useFetchCargoVendor = true;
@ -22,24 +24,34 @@ rustPlatform.buildRustPackage rec {
# Remove #[deny(warnings)] which is equivalent to -Werror in C.
# Prevents build failures when upgrading rustc, which may give more warnings.
substituteInPlace src/lib.rs \
--replace "#![deny(warnings)]" ""
--replace-fail "#![deny(warnings)]" ""
# build script tries to get version information from git
# this fixes the --version output
rm build.rs
'';
VERGEN_SEMVER = version;
VERGEN_SEMVER = finalAttrs.version;
meta = with lib; {
nativeInstallCheckInputs = [
versionCheckHook
];
versionCheckProgramArg = "--version";
doInstallCheck = true;
passthru = {
updateScript = nix-update-script { };
};
meta = {
description = "Tool for doing record analysis and transformation";
mainProgram = "rq";
homepage = "https://github.com/dflemstr/rq";
license = with licenses; [ asl20 ];
maintainers = with maintainers; [
license = with lib.licenses; [ asl20 ];
maintainers = with lib.maintainers; [
aristid
Br1ght0ne
figsoda
];
};
}
})