bartib: add nix-update-script (#513144)

This commit is contained in:
Peder Bergebakken Sundt
2026-05-05 22:20:59 +00:00
committed by GitHub
+10 -2
View File
@@ -3,6 +3,8 @@
rustPlatform,
fetchFromGitHub,
installShellFiles,
versionCheckHook,
nix-update-script,
}:
rustPlatform.buildRustPackage (finalAttrs: {
@@ -12,7 +14,7 @@ rustPlatform.buildRustPackage (finalAttrs: {
src = fetchFromGitHub {
owner = "nikolassv";
repo = "bartib";
rev = "v${finalAttrs.version}";
tag = "v${finalAttrs.version}";
sha256 = "sha256-eVLacxKD8seD8mxVN1D3HhKZkIDXsEsSisZnFbmhpSk=";
};
@@ -22,13 +24,19 @@ rustPlatform.buildRustPackage (finalAttrs: {
postInstall = ''
installShellCompletion --cmd bartib --bash misc/bartibCompletion.sh
installShellCompletion --cmd bartib --fish misc/bartib.fish
'';
doInstallCheck = true;
nativeInstallCheckInputs = [ versionCheckHook ];
passthru.updateScript = nix-update-script { };
meta = {
description = "Simple timetracker for the command line";
homepage = "https://github.com/nikolassv/bartib";
license = lib.licenses.gpl3Plus;
maintainers = [ ];
maintainers = [ lib.maintainers.progrm_jarvis ];
mainProgram = "bartib";
};
})