Files

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

49 lines
1.2 KiB
Nix
Raw Permalink Normal View History

2025-10-09 14:15:47 +02:00
{
lib,
rustPlatform,
fetchFromGitHub,
versionCheckHook,
nix-update-script,
}:
rustPlatform.buildRustPackage (finalAttrs: {
pname = "clorinde";
version = "1.1.1";
src = fetchFromGitHub {
owner = "halcyonnouveau";
repo = "clorinde";
tag = "clorinde-v${finalAttrs.version}";
hash = "sha256-a44y0cVmpQf3AmN4DXR50pFhUrWlANN9X0v0zQttT7M=";
};
cargoHash = "sha256-YSyHp3JwsLO7yrLko5NE2lb6ozy8Ah9i2Rz3854ujh0=";
cargoBuildFlags = [ "--package=clorinde" ];
cargoTestFlags = finalAttrs.cargoBuildFlags;
nativeInstallCheckInputs = [ versionCheckHook ];
versionCheckProgramArg = "--version";
doInstallCheck = true;
passthru.updateScript = nix-update-script {
extraArgs = [
"--version-regex"
"clorinde-v(.*)"
];
};
meta = {
description = "Generate type-checked Rust from your PostgreSQL";
homepage = "https://github.com/halcyonnouveau/clorinde";
changelog = "https://github.com/halcyonnouveau/clorinde/blob/clorinde-v${finalAttrs.version}/CHANGELOG.md";
license = with lib.licenses; [
mit
asl20
];
maintainers = with lib.maintainers; [ defelo ];
mainProgram = "clorinde";
};
})