f34ce41345
GitOrigin-RevId: b73c2221a46c13557b1b3be9c2070cc42cf01eb3
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.8.0";
|
|
|
|
src = fetchurl {
|
|
url = "mirror://maven/org/wiremock/wiremock-standalone/${finalAttrs.version}/wiremock-standalone-${finalAttrs.version}.jar";
|
|
hash = "sha256-cEsa2xg8ZDb5/LQO5Gj+LCuV18D+LbEK7nrGT+cm158=";
|
|
};
|
|
|
|
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;
|
|
};
|
|
})
|