2025-06-19 10:25:59 +05:30
|
|
|
{
|
|
|
|
lib,
|
|
|
|
rustPlatform,
|
|
|
|
fetchFromGitHub,
|
|
|
|
versionCheckHook,
|
|
|
|
}:
|
|
|
|
|
|
|
|
rustPlatform.buildRustPackage (finalAttrs: {
|
|
|
|
pname = "tombi";
|
2025-08-16 03:13:19 +00:00
|
|
|
version = "0.5.6";
|
2025-06-19 10:25:59 +05:30
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "tombi-toml";
|
|
|
|
repo = "tombi";
|
|
|
|
tag = "v${finalAttrs.version}";
|
2025-08-16 03:13:19 +00:00
|
|
|
hash = "sha256-EjKvVBIiG20qsr4XmGtjx7I39/tvl9HGPza5fpbwMeg=";
|
2025-06-19 10:25:59 +05:30
|
|
|
};
|
|
|
|
|
|
|
|
# Tests relies on the presence of network
|
|
|
|
doCheck = false;
|
|
|
|
cargoBuildFlags = [ "--package tombi-cli" ];
|
2025-08-16 03:13:19 +00:00
|
|
|
cargoHash = "sha256-TlGGkj0YtVp00swQfgjRqmYkKHDBxEUh3e4FYh6vRgk=";
|
2025-06-19 10:25:59 +05:30
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace Cargo.toml \
|
|
|
|
--replace-fail 'version = "0.0.0-dev"' 'version = "${finalAttrs.version}"'
|
|
|
|
'';
|
|
|
|
|
|
|
|
nativeInstallCheckInputs = [
|
|
|
|
versionCheckHook
|
|
|
|
];
|
|
|
|
doInstallCheck = true;
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "TOML Formatter / Linter / Language Server";
|
|
|
|
homepage = "https://github.com/tombi-toml/tombi";
|
|
|
|
license = lib.licenses.mit;
|
|
|
|
maintainers = with lib.maintainers; [ psibi ];
|
|
|
|
mainProgram = "tombi";
|
|
|
|
};
|
|
|
|
})
|