bcb2f287e1
GitOrigin-RevId: d603719ec6e294f034936c0d0dc06f689d91b6c3
53 lines
1.4 KiB
Nix
53 lines
1.4 KiB
Nix
{
|
|
fetchurl,
|
|
gitUpdater,
|
|
jre,
|
|
lib,
|
|
makeWrapper,
|
|
stdenvNoCC,
|
|
testers,
|
|
}:
|
|
|
|
stdenvNoCC.mkDerivation (finalAttrs: {
|
|
pname = "wiremock";
|
|
version = "3.6.0";
|
|
|
|
src = fetchurl {
|
|
url = "mirror://maven/org/wiremock/wiremock-standalone/${finalAttrs.version}/wiremock-standalone-${finalAttrs.version}.jar";
|
|
hash = "sha256-tLOiGl5/HuDbhrRyu+xZ6lL408n85MXl63lecGgok9w=";
|
|
};
|
|
|
|
dontUnpack = true;
|
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
|
|
|
installPhase = ''
|
|
mkdir -p "$out"/{share/wiremock,bin}
|
|
cp ${finalAttrs.src} "$out/share/wiremock/wiremock.jar"
|
|
|
|
makeWrapper ${jre}/bin/java $out/bin/${finalAttrs.meta.mainProgram} \
|
|
--add-flags "-jar $out/share/wiremock/wiremock.jar"
|
|
'';
|
|
|
|
passthru = {
|
|
tests.version = testers.testVersion {
|
|
command = "${lib.getExe finalAttrs.finalPackage} --version";
|
|
package = finalAttrs.finalPackage;
|
|
};
|
|
updateScript = gitUpdater {
|
|
url = "https://github.com/wiremock/wiremock.git";
|
|
ignoredVersions = "(alpha|beta|rc).*";
|
|
};
|
|
};
|
|
|
|
meta = {
|
|
description = "Flexible tool for building mock APIs";
|
|
homepage = "https://wiremock.org/";
|
|
changelog = "https://github.com/wiremock/wiremock/releases/tag/${finalAttrs.version}";
|
|
maintainers = with lib.maintainers; [ bobvanderlinden anthonyroussel ];
|
|
mainProgram = "wiremock";
|
|
platforms = jre.meta.platforms;
|
|
sourceProvenance = with lib.sourceTypes; [ binaryBytecode ];
|
|
license = lib.licenses.asl20;
|
|
};
|
|
})
|