0
0
Fork 0
mirror of https://github.com/NixOS/nixpkgs.git synced 2025-07-12 05:16:25 +03:00

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