2017-12-04 16:23:42 +00:00
|
|
|
{ stdenv, fetchurl, jre, makeWrapper }:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2018-02-28 01:04:56 +00:00
|
|
|
version = "2.3.1";
|
2017-12-04 16:23:42 +00:00
|
|
|
pname = "swagger-codegen";
|
|
|
|
name = "${pname}-${version}";
|
|
|
|
|
|
|
|
jarfilename = "${pname}-cli-${version}.jar";
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
makeWrapper
|
|
|
|
];
|
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "https://oss.sonatype.org/content/repositories/releases/io/swagger/${pname}-cli/${version}/${jarfilename}";
|
2018-02-28 01:04:56 +00:00
|
|
|
sha256 = "171qr0zx7i6cykv54vqjf3mplrf7w4a1fpq47wsj861lbf8xm322";
|
2017-12-04 16:23:42 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
phases = [ "installPhase" ];
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
install -D "$src" "$out/share/java/${jarfilename}"
|
|
|
|
|
|
|
|
makeWrapper ${jre}/bin/java $out/bin/swagger-codegen \
|
|
|
|
--add-flags "-jar $out/share/java/${jarfilename}"
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with stdenv.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;
|
|
|
|
license = licenses.asl20;
|
|
|
|
maintainers = [ maintainers.jraygauthier ];
|
|
|
|
};
|
|
|
|
}
|