Files
nixpkgs/pkgs/by-name/ko/koto/package.nix
Dark Steveneq 646b892680
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
push sheeet
2025-10-09 14:15:47 +02:00

48 lines
1.1 KiB
Nix

{
lib,
rustPlatform,
fetchFromGitHub,
yq,
versionCheckHook,
nix-update-script,
}:
rustPlatform.buildRustPackage (finalAttrs: {
pname = "koto";
version = "0.16.0";
src = fetchFromGitHub {
owner = "koto-lang";
repo = "koto";
tag = "v${finalAttrs.version}";
hash = "sha256-KdwKJ0ZKKHU+Fe/TTIITHOyRH9uoJ3LU3qXqUwpJI6g=";
};
cargoHash = "sha256-5uWCpTnGbqoogOxSD2GcXMjQpoYIp1GfB9k4bd+Easc=";
postPatch = ''
tomlq -ti 'del(.bench)' crates/koto/Cargo.toml
'';
nativeBuildInputs = [
yq # for `tomlq`
];
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/v${finalAttrs.version}/CHANGELOG.md";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ defelo ];
mainProgram = "koto";
};
})