blob: 75e4c30f64b4049b93a290cfae1df6696b2abedc (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
|
{
fetchurl,
gitUpdater,
jre,
lib,
makeWrapper,
stdenvNoCC,
testers,
}:
stdenvNoCC.mkDerivation (finalAttrs: {
pname = "wiremock";
version = "3.9.1";
src = fetchurl {
url = "mirror://maven/org/wiremock/wiremock-standalone/${finalAttrs.version}/wiremock-standalone-${finalAttrs.version}.jar";
hash = "sha256-cjqIDVDTsKFFrw3wfleMLLhed/6yIx5pkcmhNmkmkSw=";
};
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;
};
})
|