Files
nixpkgs/pkgs/by-name/to/tombi/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

54 lines
1.3 KiB
Nix

{
stdenv,
lib,
rustPlatform,
fetchFromGitHub,
versionCheckHook,
installShellFiles,
}:
rustPlatform.buildRustPackage (finalAttrs: {
pname = "tombi";
version = "0.6.19";
src = fetchFromGitHub {
owner = "tombi-toml";
repo = "tombi";
tag = "v${finalAttrs.version}";
hash = "sha256-ILW9U+K3DRYsBjqmTd6diUfP441wa6qwjjBgfwObnHo=";
};
# Tests relies on the presence of network
doCheck = false;
cargoBuildFlags = [ "--package tombi-cli" ];
cargoHash = "sha256-BCBnrIG35RMeqVEltxgtacsKzJ/0nxKiMpLiWoDpv/g=";
postPatch = ''
substituteInPlace Cargo.toml \
--replace-fail 'version = "0.0.0-dev"' 'version = "${finalAttrs.version}"'
'';
nativeBuildInputs = [ installShellFiles ];
postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
installShellCompletion --cmd tombi \
--bash <($out/bin/tombi completion bash) \
--fish <($out/bin/tombi completion fish) \
--zsh <($out/bin/tombi completion zsh)
'';
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";
};
})