Skip to content

Commit f029584

Browse files
koto: init at 0.15.2 (#382328)
2 parents bb75878 + e168f65 commit f029584

File tree

1 file changed

+44
-0
lines changed

1 file changed

+44
-0
lines changed

pkgs/by-name/ko/koto/package.nix

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
{
2+
lib,
3+
rustPlatform,
4+
fetchFromGitHub,
5+
yq,
6+
versionCheckHook,
7+
nix-update-script,
8+
}:
9+
10+
rustPlatform.buildRustPackage rec {
11+
pname = "koto";
12+
version = "0.15.2";
13+
14+
src = fetchFromGitHub {
15+
owner = "koto-lang";
16+
repo = "koto";
17+
tag = "v${version}";
18+
hash = "sha256-T8SjNeoTANAcT+uAdgzBRMK0LbC038cpKFoCFHgsp8k=";
19+
};
20+
21+
useFetchCargoVendor = true;
22+
cargoHash = "sha256-kIjDY27ot1dN3L8TKaBEQWDzo7+QIFvhdmi1YN9TofI=";
23+
24+
postPatch = ''
25+
${lib.getExe' yq "tomlq"} -ti 'del(.bench)' crates/koto/Cargo.toml
26+
'';
27+
28+
cargoBuildFlags = [ "--package=koto_cli" ];
29+
30+
nativeInstallCheckInputs = [ versionCheckHook ];
31+
versionCheckProgramArg = "--version";
32+
doInstallCheck = true;
33+
34+
passthru.updateScript = nix-update-script { };
35+
36+
meta = {
37+
description = "Simple, expressive, embeddable programming language";
38+
homepage = "https://github.com/koto-lang/koto";
39+
changelog = "https://github.com/koto-lang/koto/blob/${src.rev}/CHANGELOG.md";
40+
license = lib.licenses.mit;
41+
maintainers = with lib.maintainers; [ defelo ];
42+
mainProgram = "koto";
43+
};
44+
}

0 commit comments

Comments
 (0)