mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-09-30 03:39:59 +00:00
tombi: 1.2.7 -> 1.2.9 tombi: 1.2.7 -> 1.2.10 tombi: 1.2.7 -> 1.3.2 tombi: 1.2.7 -> 1.3.3 tombi: 1.2.7 -> 1.3.5 tombi: 1.2.7 -> 1.4.0
63 lines
1.4 KiB
Nix
63 lines
1.4 KiB
Nix
{
|
|
stdenv,
|
|
lib,
|
|
rustPlatform,
|
|
fetchFromGitHub,
|
|
versionCheckHook,
|
|
installShellFiles,
|
|
}:
|
|
|
|
rustPlatform.buildRustPackage (finalAttrs: {
|
|
pname = "tombi";
|
|
version = "1.4.0";
|
|
|
|
__structuredAttrs = true;
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "tombi-toml";
|
|
repo = "tombi";
|
|
tag = "v${finalAttrs.version}";
|
|
hash = "sha256-B4+TOEiqIkHMLWIMOVmYOM/Gso2c6n7A2SQBqjO6R+8=";
|
|
};
|
|
|
|
# Tests relies on the presence of network
|
|
doCheck = false;
|
|
cargoBuildFlags = [
|
|
"--package"
|
|
"tombi-cli"
|
|
];
|
|
cargoHash = "sha256-9mEPyzSaxJLeejNuHMwBYjJ+pfDcNvarykPLgBxGtLs=";
|
|
|
|
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; [
|
|
faukah
|
|
psibi
|
|
yvnth
|
|
];
|
|
mainProgram = "tombi";
|
|
};
|
|
})
|