lol
1{ lib, stdenvNoCC, fetchurl, jre, makeWrapper }:
2
3stdenvNoCC.mkDerivation rec {
4 pname = "karate";
5 version = "1.3.0";
6
7 src = fetchurl {
8 url = "https://github.com/karatelabs/karate/releases/download/v${version}/karate-${version}.jar";
9 sha256 = "sha256-uQHE8Mf70t7gtALdxO1tltUkwEKx0emWWliZEzwGW+Q=";
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 longDescription = ''
24 Karate is the only open-source tool to combine API
25 test-automation, mocks, performance-testing and even UI
26 automation into a single, unified framework. The BDD syntax
27 popularized by Cucumber is language-neutral, and easy for even
28 non-programmers. Assertions and HTML reports are built-in, and
29 you can run tests in parallel for speed.
30 '';
31 homepage = "https://github.com/karatelabs/karate";
32 changelog = "https://github.com/karatelabs/karate/releases/tag/v${version}";
33 license = licenses.mit;
34 maintainers = [ maintainers.kephasp ];
35 platforms = jre.meta.platforms;
36 };
37}