nb: add passthru.tests.version and updateScript (#356342)

This commit is contained in:
Aleksana 2024-11-29 17:10:38 +08:00 committed by GitHub
commit 63863a8847
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1,4 +1,4 @@
{ stdenv, lib, fetchFromGitHub, installShellFiles }:
{ stdenv, lib, fetchFromGitHub, installShellFiles, testers, nix-update-script, nb }:
stdenv.mkDerivation rec {
pname = "nb";
@ -25,6 +25,15 @@ stdenv.mkDerivation rec {
installShellCompletion --cmd nb etc/nb-completion.{bash,zsh,fish}
'';
passthru = {
tests.version = testers.testVersion {
package = nb;
# Setting EDITOR to avoid: "Command line text editor not found"
command = "EDITOR=nano nb --version";
};
updateScript = nix-update-script { };
};
meta = with lib; {
description = "Command line note-taking, bookmarking, archiving, and knowledge base application";
longDescription = ''