Merge pull request #246310 from NickCao/keycloak-metric
keycloak.plugins.keycloak-metrics-spi: build from source
This commit is contained in:
commit
9b933e2c42
1 changed files with 13 additions and 10 deletions
|
@ -1,26 +1,29 @@
|
|||
{ stdenv, lib, fetchurl }:
|
||||
{ maven, lib, fetchFromGitHub }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
maven.buildMavenPackage rec {
|
||||
pname = "keycloak-metrics-spi";
|
||||
version = "4.0.0";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://github.com/aerogear/keycloak-metrics-spi/releases/download/${version}/keycloak-metrics-spi-${version}.jar";
|
||||
sha256 = "sha256-D0NNBuc9YBiywGoq5hG4dcoiunyG/C2ZX73p4lS5v4s=";
|
||||
src = fetchFromGitHub {
|
||||
owner = "aerogear";
|
||||
repo = pname;
|
||||
rev = "refs/tags/${version}";
|
||||
hash = "sha256-pacmx5w1VVWz3HmHO6sc2friNUpzo4zyJI1/TQgCXlc=";
|
||||
};
|
||||
|
||||
dontUnpack = true;
|
||||
dontBuild = true;
|
||||
mvnHash = "sha256-rwAc2KtKo4vJ0JWwPquMyt+FHVNTmMpzBPbo8lWDN/A=";
|
||||
|
||||
nativeBuildInputs = [ maven ];
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out
|
||||
install "$src" "$out"
|
||||
runHook preInstall
|
||||
install -Dm444 -t "$out" target/keycloak-metrics-spi-*.jar
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://github.com/aerogear/keycloak-metrics-spi";
|
||||
description = "Keycloak Service Provider that adds a metrics endpoint";
|
||||
sourceProvenance = with sourceTypes; [ binaryBytecode ];
|
||||
license = licenses.asl20;
|
||||
maintainers = with maintainers; [ benley ];
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue