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

stdenv.mkDerivation (finalAttrs: {
  pname = "allure";
  version = "2.29.0";

  src = fetchurl {
    url = "https://github.com/allure-framework/allure2/releases/download/${finalAttrs.version}/allure-${finalAttrs.version}.tgz";
    hash = "sha256-ohcVXblnCrNs57BWmz+wUwplfIG9fOW8l08LuipNhPs=";
  };

  dontConfigure = true;
  dontBuild = true;

  nativeBuildInputs = [ makeWrapper ];
  buildInputs = [ jre ];

  installPhase = ''
    runHook preInstall

    mkdir -p $out/{bin,share}
    cd "$out/share"
    tar xvzf $src
    makeWrapper $out/share/${finalAttrs.meta.mainProgram}-${finalAttrs.version}/bin/allure $out/bin/${finalAttrs.meta.mainProgram} \
      --prefix PATH : "${jre}/bin"

    runHook postInstall
  '';

  meta =  {
    homepage = "https://docs.qameta.io/allure/";
    description = "Allure Report is a flexible, lightweight multi-language test reporting tool";
    longDescription = ''
      Allure Report is a flexible, lightweight multi-language test reporting
      tool providing clear graphical reports and allowing everyone involved
      in the development process to extract the maximum of information from
      the everyday testing process.
      '';
    license = lib.licenses.asl20;
    mainProgram = "allure";
    maintainers = with lib.maintainers; [ happysalada ];
  };
})