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
58 lines
1.2 KiB
Nix
58 lines
1.2 KiB
Nix
{
|
|
stdenv,
|
|
lib,
|
|
rustPlatform,
|
|
fetchCrate,
|
|
pkg-config,
|
|
openssl,
|
|
withLsp ? true,
|
|
installShellFiles,
|
|
}:
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
pname = "taplo";
|
|
version = "0.10.0";
|
|
|
|
src = fetchCrate {
|
|
inherit version;
|
|
pname = "taplo-cli";
|
|
hash = "sha256-iKc4Nu7AZE1LSuqXffi3XERbOqZMOkI3PV+6HaJzh4c=";
|
|
};
|
|
|
|
cargoHash = "sha256-tvijtB5fwOzQnnK/ClIvTbjCcMeqZpXcRdWWKZPIulM=";
|
|
|
|
nativeBuildInputs = [
|
|
installShellFiles
|
|
pkg-config
|
|
];
|
|
|
|
buildInputs = [
|
|
openssl
|
|
];
|
|
|
|
buildFeatures = lib.optional withLsp "lsp";
|
|
|
|
postInstall =
|
|
lib.optionalString
|
|
(
|
|
stdenv.buildPlatform.canExecute stdenv.hostPlatform
|
|
&&
|
|
# Creation of the completions fails on Darwin platforms.
|
|
!stdenv.hostPlatform.isDarwin
|
|
)
|
|
''
|
|
installShellCompletion --cmd taplo \
|
|
--bash <($out/bin/taplo completions bash) \
|
|
--fish <($out/bin/taplo completions fish) \
|
|
--zsh <($out/bin/taplo completions zsh)
|
|
'';
|
|
|
|
meta = with lib; {
|
|
description = "TOML toolkit written in Rust";
|
|
homepage = "https://taplo.tamasfe.dev";
|
|
license = licenses.mit;
|
|
maintainers = with maintainers; [ figsoda ];
|
|
mainProgram = "taplo";
|
|
};
|
|
}
|