From 4de62b4c0fc4a24e5efae581c440a5196773bd5a Mon Sep 17 00:00:00 2001 From: Kenichi Kamiya Date: Sat, 16 Nov 2024 12:06:31 +0900 Subject: [PATCH] nb: add passthru.tests.version --- pkgs/by-name/nb/nb/package.nix | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/pkgs/by-name/nb/nb/package.nix b/pkgs/by-name/nb/nb/package.nix index 9d0b06910433..5ed7f0514f6f 100644 --- a/pkgs/by-name/nb/nb/package.nix +++ b/pkgs/by-name/nb/nb/package.nix @@ -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 = ''