depot/third_party/nixpkgs/pkgs/by-name/qu/quarkus/package.nix
Default email bcb2f287e1 Project import generated by Copybara.
GitOrigin-RevId: d603719ec6e294f034936c0d0dc06f689d91b6c3
2024-06-20 20:27:18 +05:30

46 lines
1.4 KiB
Nix

{ lib
, stdenv
, fetchurl
, makeWrapper
, jdk
}:
stdenv.mkDerivation (finalAttrs: {
pname = "quarkus-cli";
version = "3.11.1";
src = fetchurl {
url = "https://github.com/quarkusio/quarkus/releases/download/${finalAttrs.version}/quarkus-cli-${finalAttrs.version}.tar.gz";
hash = "sha256-eR3/DDO50KYVI14iX+IvALK4YLx0hmd9Z4rToPQTBGE=";
};
nativeBuildInputs = [ makeWrapper ];
installPhase = ''
runHook preInstall
mkdir -p $out/{lib,bin}
cp ./lib/quarkus-cli-${finalAttrs.version}-runner.jar $out/lib
makeWrapper ${jdk}/bin/java $out/bin/quarkus \
--add-flags "-classpath $out/lib/quarkus-cli-${finalAttrs.version}-runner.jar" \
--add-flags "-Dapp.name=quarkus" \
--add-flags "-Dapp-pid='\$\$'" \
--add-flags "-Dapp.repo=$out/lib" \
--add-flags "-Dapp.home=$out" \
--add-flags "-Dbasedir=$out" \
--add-flags "io.quarkus.cli.Main"
runHook postInstall
'';
meta = with lib; {
description = "Quarkus is a Kubernetes-native Java framework tailored for GraalVM and HotSpot, crafted from best-of-breed Java libraries and standards";
homepage = "https://quarkus.io";
license = licenses.asl20;
maintainers = [ maintainers.vinetos ];
platforms = platforms.all;
mainProgram = "quarkus";
sourceProvenance = with sourceTypes; [ binaryBytecode ];
};
})