diff --git a/pkgs/tools/security/browserpass/default.nix b/pkgs/tools/security/browserpass/default.nix index ee774172f912..73c40a718c28 100644 --- a/pkgs/tools/security/browserpass/default.nix +++ b/pkgs/tools/security/browserpass/default.nix @@ -5,6 +5,8 @@ , gnupg , makeWrapper , autoPatchelfHook +, testers +, browserpass }: buildGoModule rec { @@ -18,7 +20,7 @@ buildGoModule rec { sha256 = "sha256-UZzOPRRiCUIG7uSSp9AEPMDN/+4cgyK47RhrI8oUx8U="; }; - nativeBuildInputs = [ makeWrapper autoPatchelfHook ]; + nativeBuildInputs = [ makeWrapper ] ++ lib.optionals stdenv.isLinux [ autoPatchelfHook ]; vendorHash = "sha256-CjuH4ANP2bJDeA+o+1j+obbtk5/NVLet/OFS3Rms4r0="; @@ -56,6 +58,11 @@ buildGoModule rec { ln -s $out/lib/browserpass/hosts/firefox/*.json $out/lib/mozilla/native-messaging-hosts ''; + passthru.tests.version = testers.testVersion { + package = browserpass; + command = "browserpass --version"; + }; + meta = with lib; { description = "Browserpass native client app"; homepage = "https://github.com/browserpass/browserpass-native";