koto: init at 0.15.2 (#382328)

This commit is contained in:
Sandro 2025-02-18 00:19:04 +01:00 committed by GitHub
commit f0295845e5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -0,0 +1,44 @@
{
lib,
rustPlatform,
fetchFromGitHub,
yq,
versionCheckHook,
nix-update-script,
}:
rustPlatform.buildRustPackage rec {
pname = "koto";
version = "0.15.2";
src = fetchFromGitHub {
owner = "koto-lang";
repo = "koto";
tag = "v${version}";
hash = "sha256-T8SjNeoTANAcT+uAdgzBRMK0LbC038cpKFoCFHgsp8k=";
};
useFetchCargoVendor = true;
cargoHash = "sha256-kIjDY27ot1dN3L8TKaBEQWDzo7+QIFvhdmi1YN9TofI=";
postPatch = ''
${lib.getExe' yq "tomlq"} -ti 'del(.bench)' crates/koto/Cargo.toml
'';
cargoBuildFlags = [ "--package=koto_cli" ];
nativeInstallCheckInputs = [ versionCheckHook ];
versionCheckProgramArg = "--version";
doInstallCheck = true;
passthru.updateScript = nix-update-script { };
meta = {
description = "Simple, expressive, embeddable programming language";
homepage = "https://github.com/koto-lang/koto";
changelog = "https://github.com/koto-lang/koto/blob/${src.rev}/CHANGELOG.md";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ defelo ];
mainProgram = "koto";
};
}