1 { lib, stdenv, fetchurl, jre, makeWrapper, testers, swagger-codegen3 }:
3 stdenv.mkDerivation rec {
5 pname = "swagger-codegen";
7 jarfilename = "${pname}-cli-${version}.jar";
14 url = "mirror://maven/io/swagger/codegen/v3/${pname}-cli/${version}/${jarfilename}";
15 sha256 = "sha256-23opx14BRfG7SjcSKXu59wmrrJsJiGebiMRvidV2gE8=";
21 install -D $src $out/share/java/${jarfilename}
23 makeWrapper ${jre}/bin/java $out/bin/${pname}3 \
24 --add-flags "-jar $out/share/java/${jarfilename}"
27 passthru.tests.version = testers.testVersion {
28 package = swagger-codegen3;
29 command = "swagger-codegen3 version";
33 description = "Allows generation of API client libraries (SDK generation), server stubs and documentation automatically given an OpenAPI Spec";
34 homepage = "https://github.com/swagger-api/swagger-codegen/tree/3.0.0";
35 sourceProvenance = with sourceTypes; [ binaryBytecode ];
36 license = licenses.asl20;
37 maintainers = [ maintainers._1000101 ];
38 mainProgram = "swagger-codegen3";
39 platforms = platforms.all;