about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/tools/karate/default.nix
blob: 1b5a08d5e674c3cd7aa734efdbdc3867f009b31f (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
{ lib, stdenvNoCC, fetchurl, jre, makeWrapper }:

stdenvNoCC.mkDerivation rec {
  pname = "karate";
  version = "1.4.1";

  src = fetchurl {
    url = "https://github.com/karatelabs/karate/releases/download/v${version}/karate-${version}.jar";
    sha256 = "sha256-3gNoXUchrfGkZC6UAfw2TXorzSlqnOZCe0gnuUHIIb4=";
  };
  dontUnpack = true;

  nativeBuildInputs = [ makeWrapper ];

  installPhase = ''
    runHook preInstall
    makeWrapper ${jre}/bin/java $out/bin/karate --add-flags "-jar $src"
    runHook postInstall
  '';

  meta = with lib; {
    description = "API Test Automation Made Simple";
    mainProgram = "karate";
    longDescription = ''
      Karate is the only open-source tool to combine API
      test-automation, mocks, performance-testing and even UI
      automation into a single, unified framework. The BDD syntax
      popularized by Cucumber is language-neutral, and easy for even
      non-programmers. Assertions and HTML reports are built-in, and
      you can run tests in parallel for speed.
    '';
    homepage = "https://github.com/karatelabs/karate";
    changelog = "https://github.com/karatelabs/karate/releases/tag/v${version}";
    license = licenses.mit;
    maintainers = [ maintainers.kephasp ];
    platforms = jre.meta.platforms;
  };
}