From c3576e0f80a1a018e9823cfe6997d5c9e4c47756 Mon Sep 17 00:00:00 2001 From: Bob van der Linden Date: Sat, 26 Oct 2024 16:50:08 +0200 Subject: [PATCH] ngrok: add version test --- pkgs/by-name/ng/ngrok/package.nix | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/pkgs/by-name/ng/ngrok/package.nix b/pkgs/by-name/ng/ngrok/package.nix index bb47cd4d73671..a2f5fc51df92e 100644 --- a/pkgs/by-name/ng/ngrok/package.nix +++ b/pkgs/by-name/ng/ngrok/package.nix @@ -2,6 +2,7 @@ lib, stdenv, fetchurl, + testers, }: let @@ -28,7 +29,7 @@ let inherit (versionInfo) version sha256 url; in -stdenv.mkDerivation { +stdenv.mkDerivation (finalAttrs: { pname = "ngrok"; inherit version; @@ -55,7 +56,10 @@ stdenv.mkDerivation { runHook postInstall ''; - passthru.updateScript = ./update.sh; + passthru = { + updateScript = ./update.sh; + tests.version = testers.testVersion { package = finalAttrs.finalPackage; }; + }; # Stripping causes SEGFAULT on darwin dontStrip = stdenv.hostPlatform.isDarwin; @@ -74,4 +78,4 @@ stdenv.mkDerivation { ]; mainProgram = "ngrok"; }; -} +})