From 13d7a1b060dc89d36cdca6a3f54a19e02f608e02 Mon Sep 17 00:00:00 2001 From: Johan Larsson Date: Thu, 12 Feb 2026 07:58:36 +0100 Subject: [PATCH] panache: init at 2.18.0 Add Panache, which is a language server, formatter, and linter for Pandoc, Quarto, and R Markdown. The repo is at https://github.com/jolars/panache. --- pkgs/by-name/pa/panache/package.nix | 47 +++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 pkgs/by-name/pa/panache/package.nix diff --git a/pkgs/by-name/pa/panache/package.nix b/pkgs/by-name/pa/panache/package.nix new file mode 100644 index 000000000000..ccb6657c9947 --- /dev/null +++ b/pkgs/by-name/pa/panache/package.nix @@ -0,0 +1,47 @@ +{ + lib, + rustPlatform, + fetchFromGitHub, + installShellFiles, + versionCheckHook, +}: + +rustPlatform.buildRustPackage (finalAttrs: { + pname = "panache"; + version = "2.18.0"; + + src = fetchFromGitHub { + owner = "jolars"; + repo = "panache"; + tag = "v${finalAttrs.version}"; + hash = "sha256-VI4Ma0wSHeQc5Rofz2sIyUkHmZSBm5woMcHTEM/a9wk="; + }; + + cargoHash = "sha256-iliilk0uAOwdiYqJwkbdslwxcU6WLgReN2ZDEVki6js="; + + nativeBuildInputs = [ + installShellFiles + ]; + + nativeInstallCheckInputs = [ + versionCheckHook + ]; + + postInstall = '' + installShellCompletion --cmd panache \ + --bash target/completions/panache.bash \ + --fish target/completions/panache.fish \ + --zsh target/completions/_panache + + installManPage target/man/* + ''; + + meta = { + description = "Language server, formatter, and linter for Pandoc, Quarto, and R Markdown"; + homepage = "https://github.com/jolars/panache"; + changelog = "https://github.com/jolars/panache/blob/${finalAttrs.src.tag}/CHANGELOG.md"; + license = lib.licenses.mit; + maintainers = [ lib.maintainers.jolars ]; + mainProgram = "panache"; + }; +})