nb: add passthru.tests.version

This commit is contained in:
Kenichi Kamiya 2024-11-16 12:06:31 +09:00
parent 2867f69e5c
commit 4de62b4c0f
No known key found for this signature in database
GPG Key ID: 9BE4016A38165CCB

View File

@ -1,4 +1,4 @@
{ stdenv, lib, fetchFromGitHub, installShellFiles }:
{ stdenv, lib, fetchFromGitHub, installShellFiles, testers, nb }:
stdenv.mkDerivation rec {
pname = "nb";
@ -25,6 +25,14 @@ 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";
};
};
meta = with lib; {
description = "Command line note-taking, bookmarking, archiving, and knowledge base application";
longDescription = ''