From 8bc5b41cd5bb4c65fcf462f9a27a8df49a60d06a Mon Sep 17 00:00:00 2001 From: Damien Cassou Date: Wed, 1 Nov 2023 11:31:18 +0100 Subject: [PATCH] swagger-codegen3: add passthru.tests.version --- pkgs/tools/networking/swagger-codegen3/default.nix | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/pkgs/tools/networking/swagger-codegen3/default.nix b/pkgs/tools/networking/swagger-codegen3/default.nix index daa68695c0cf..128ef836d5ff 100644 --- a/pkgs/tools/networking/swagger-codegen3/default.nix +++ b/pkgs/tools/networking/swagger-codegen3/default.nix @@ -1,4 +1,4 @@ -{ lib, stdenv, fetchurl, jre, makeWrapper }: +{ lib, stdenv, fetchurl, jre, makeWrapper, testers, swagger-codegen3 }: stdenv.mkDerivation rec { version = "3.0.50"; @@ -24,6 +24,11 @@ stdenv.mkDerivation rec { --add-flags "-jar $out/share/java/${jarfilename}" ''; + passthru.tests.version = testers.testVersion { + package = swagger-codegen3; + command = "swagger-codegen3 version"; + }; + meta = with lib; { description = "Allows generation of API client libraries (SDK generation), server stubs and documentation automatically given an OpenAPI Spec"; homepage = "https://github.com/swagger-api/swagger-codegen/tree/3.0.0";