bartib: add nix-update-script
This commit is contained in:
@@ -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,8 +24,14 @@ 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";
|
||||
|
||||
Reference in New Issue
Block a user