qownnotes-tui: init at 0.6.0

Signed-off-by: Patrizio Bekerle <patrizio@bekerle.com>
This commit is contained in:
Patrizio Bekerle
2026-08-24 19:48:52 +02:00
parent 3295d6d98c
commit 37eb2fe127

View File

@@ -0,0 +1,51 @@
{
lib,
stdenv,
rustPlatform,
fetchFromGitHub,
installShellFiles,
nix-update-script,
versionCheckHook,
}:
rustPlatform.buildRustPackage (finalAttrs: {
pname = "qownnotes-tui";
version = "0.6.0";
__structuredAttrs = true;
src = fetchFromGitHub {
owner = "qownnotes";
repo = "qownnotes-tui";
tag = "v${finalAttrs.version}";
hash = "sha256-TqqqXpUYWIkcQVMHxapCveASmMHYjCHchmYUEDZg7qY=";
};
cargoHash = "sha256-fjSHZ2Xg1uv5Nl1oBBTE+5YsD749ITHUZG8grqrnNDU=";
strictDeps = true;
nativeBuildInputs = [ installShellFiles ];
postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
installShellCompletion --cmd qownnotes-tui \
--bash <($out/bin/qownnotes-tui --generate-completion bash) \
--fish <($out/bin/qownnotes-tui --generate-completion fish) \
--zsh <($out/bin/qownnotes-tui --generate-completion zsh)
'';
nativeInstallCheckInputs = [ versionCheckHook ];
doInstallCheck = true;
passthru.updateScript = nix-update-script { };
meta = {
description = "Keyboard-first terminal browser for QOwnNotes-compatible note folders";
homepage = "https://github.com/qownnotes/qownnotes-tui";
changelog = "https://github.com/qownnotes/qownnotes-tui/blob/${finalAttrs.src.tag}/CHANGELOG.md";
license = lib.licenses.gpl3Only;
maintainers = with lib.maintainers; [ pbek ];
mainProgram = "qownnotes-tui";
platforms = lib.platforms.unix;
};
})