python312Packages.yoda: 2.0.1 -> 2.0.2
[NixPkgs.git] / pkgs / by-name / wi / wiremock / package.nix
blob615da7a453601eb028bfc37f85f23e821a31adde
2   fetchurl,
3   gitUpdater,
4   jre,
5   lib,
6   makeWrapper,
7   stdenvNoCC,
8   testers,
9 }:
11 stdenvNoCC.mkDerivation (finalAttrs: {
12   pname = "wiremock";
13   version = "3.9.2";
15   src = fetchurl {
16     url = "mirror://maven/org/wiremock/wiremock-standalone/${finalAttrs.version}/wiremock-standalone-${finalAttrs.version}.jar";
17     hash = "sha256-d7iNxBwyaOPOOR8/7yIrDNBpbyhtP8NahLoi/8uHcBI=";
18   };
20   dontUnpack = true;
22   nativeBuildInputs = [ makeWrapper ];
24   installPhase = ''
25     mkdir -p "$out"/{share/wiremock,bin}
26     cp ${finalAttrs.src} "$out/share/wiremock/wiremock.jar"
28     makeWrapper ${jre}/bin/java $out/bin/${finalAttrs.meta.mainProgram} \
29       --add-flags "-jar $out/share/wiremock/wiremock.jar"
30   '';
32   passthru = {
33     tests.version = testers.testVersion {
34       command = "${lib.getExe finalAttrs.finalPackage} --version";
35       package = finalAttrs.finalPackage;
36     };
37     updateScript = gitUpdater {
38       url = "https://github.com/wiremock/wiremock.git";
39       ignoredVersions = "(alpha|beta|rc).*";
40     };
41   };
43   meta = {
44     description = "Flexible tool for building mock APIs";
45     homepage = "https://wiremock.org/";
46     changelog = "https://github.com/wiremock/wiremock/releases/tag/${finalAttrs.version}";
47     maintainers = with lib.maintainers; [ bobvanderlinden anthonyroussel ];
48     mainProgram = "wiremock";
49     platforms = jre.meta.platforms;
50     sourceProvenance = with lib.sourceTypes; [ binaryBytecode ];
51     license = lib.licenses.asl20;
52   };