depot/third_party/nixpkgs/pkgs/by-name/wi/wiremock/package.nix

40 lines
1.2 KiB
Nix
Raw Normal View History

{ lib, stdenv, fetchurl, jre, makeWrapper, gitUpdater }:
stdenv.mkDerivation rec {
pname = "wiremock";
version = "3.4.2";
src = fetchurl {
url = "mirror://maven/org/wiremock/wiremock-standalone/${version}/wiremock-standalone-${version}.jar";
hash = "sha256-Btf7oQRmfQnHdl5DawF2xOczDrR/5Po/9NytgqTLkVQ=";
};
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"
'';
passthru.updateScript = gitUpdater {
url = "https://github.com/wiremock/wiremock.git";
ignoredVersions = "(alpha|beta|rc).*";
};
meta = {
description = "A flexible tool for building mock APIs";
homepage = "https://wiremock.org/";
changelog = "https://github.com/wiremock/wiremock/releases/tag/${version}";
maintainers = with lib.maintainers; [ bobvanderlinden anthonyroussel ];
mainProgram = "wiremock";
platforms = jre.meta.platforms;
sourceProvenance = with lib.sourceTypes; [ binaryBytecode ];
license = lib.licenses.asl20;
};
}