2023-11-16 04:20:00 +00:00
|
|
|
{ lib, stdenv, fetchurl, jre, makeWrapper, gitUpdater }:
|
2022-12-17 10:02:37 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "wiremock";
|
2024-02-29 20:09:43 +00:00
|
|
|
version = "3.4.2";
|
2023-11-16 04:20:00 +00:00
|
|
|
|
2022-12-17 10:02:37 +00:00
|
|
|
src = fetchurl {
|
2023-11-16 04:20:00 +00:00
|
|
|
url = "mirror://maven/org/wiremock/wiremock-standalone/${version}/wiremock-standalone-${version}.jar";
|
2024-02-29 20:09:43 +00:00
|
|
|
hash = "sha256-Btf7oQRmfQnHdl5DawF2xOczDrR/5Po/9NytgqTLkVQ=";
|
2022-12-17 10:02:37 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
dontUnpack = true;
|
|
|
|
|
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
mkdir -p "$out"/{share/wiremock,bin}
|
|
|
|
cp ${src} "$out/share/wiremock/wiremock.jar"
|
|
|
|
|
|
|
|
makeWrapper ${jre}/bin/java $out/bin/${pname} \
|
|
|
|
--add-flags "-jar $out/share/wiremock/wiremock.jar"
|
|
|
|
'';
|
|
|
|
|
2023-11-16 04:20:00 +00:00
|
|
|
passthru.updateScript = gitUpdater {
|
|
|
|
url = "https://github.com/wiremock/wiremock.git";
|
|
|
|
ignoredVersions = "(alpha|beta|rc).*";
|
|
|
|
};
|
|
|
|
|
2022-12-17 10:02:37 +00:00
|
|
|
meta = {
|
|
|
|
description = "A flexible tool for building mock APIs";
|
|
|
|
homepage = "https://wiremock.org/";
|
2023-11-16 04:20:00 +00:00
|
|
|
changelog = "https://github.com/wiremock/wiremock/releases/tag/${version}";
|
|
|
|
maintainers = with lib.maintainers; [ bobvanderlinden anthonyroussel ];
|
|
|
|
mainProgram = "wiremock";
|
2022-12-17 10:02:37 +00:00
|
|
|
platforms = jre.meta.platforms;
|
|
|
|
sourceProvenance = with lib.sourceTypes; [ binaryBytecode ];
|
|
|
|
license = lib.licenses.asl20;
|
|
|
|
};
|
|
|
|
}
|