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
51 lines
1.3 KiB
Nix
51 lines
1.3 KiB
Nix
{
|
|
lib,
|
|
rustPlatform,
|
|
fetchFromGitHub,
|
|
stdenv,
|
|
installShellFiles,
|
|
versionCheckHook,
|
|
nix-update-script,
|
|
}:
|
|
|
|
rustPlatform.buildRustPackage (finalAttrs: {
|
|
pname = "kdlfmt";
|
|
version = "0.1.4";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "hougesen";
|
|
repo = "kdlfmt";
|
|
tag = "v${finalAttrs.version}";
|
|
hash = "sha256-VHcpF9CTRDl9dtX/rZeDKVoCerI1sNjwURBpiE9bH80=";
|
|
};
|
|
|
|
cargoHash = "sha256-A8pp4IWL8hR4G1WDNFo6e3BVRxuVjfazIKOwCEGN7Rc=";
|
|
|
|
nativeBuildInputs = [ installShellFiles ];
|
|
|
|
postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
|
|
installShellCompletion --cmd kdlfmt \
|
|
--bash <($out/bin/kdlfmt completions bash) \
|
|
--fish <($out/bin/kdlfmt completions fish) \
|
|
--zsh <($out/bin/kdlfmt completions zsh)
|
|
'';
|
|
|
|
nativeInstallCheckInputs = [ versionCheckHook ];
|
|
versionCheckProgramArg = "--version";
|
|
doInstallCheck = true;
|
|
|
|
passthru.updateScript = nix-update-script { };
|
|
|
|
meta = {
|
|
description = "Formatter for kdl documents";
|
|
homepage = "https://github.com/hougesen/kdlfmt";
|
|
changelog = "https://github.com/hougesen/kdlfmt/blob/v${finalAttrs.version}/CHANGELOG.md";
|
|
license = lib.licenses.mit;
|
|
maintainers = with lib.maintainers; [
|
|
airrnot
|
|
defelo
|
|
];
|
|
mainProgram = "kdlfmt";
|
|
};
|
|
})
|