Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ lib, stdenvNoCC, fetchurl, jre, makeWrapper }:
2
3stdenvNoCC.mkDerivation rec {
4 pname = "karate";
5 version = "1.4.1";
6
7 src = fetchurl {
8 url = "https://github.com/karatelabs/karate/releases/download/v${version}/karate-${version}.jar";
9 sha256 = "sha256-3gNoXUchrfGkZC6UAfw2TXorzSlqnOZCe0gnuUHIIb4=";
10 };
11 dontUnpack = true;
12
13 nativeBuildInputs = [ makeWrapper ];
14
15 installPhase = ''
16 runHook preInstall
17 makeWrapper ${jre}/bin/java $out/bin/karate --add-flags "-jar $src"
18 runHook postInstall
19 '';
20
21 meta = with lib; {
22 description = "API Test Automation Made Simple";
23 mainProgram = "karate";
24 longDescription = ''
25 Karate is the only open-source tool to combine API
26 test-automation, mocks, performance-testing and even UI
27 automation into a single, unified framework. The BDD syntax
28 popularized by Cucumber is language-neutral, and easy for even
29 non-programmers. Assertions and HTML reports are built-in, and
30 you can run tests in parallel for speed.
31 '';
32 homepage = "https://github.com/karatelabs/karate";
33 changelog = "https://github.com/karatelabs/karate/releases/tag/v${version}";
34 license = licenses.mit;
35 maintainers = [ maintainers.kephasp ];
36 platforms = jre.meta.platforms;
37 };
38}