Unverified Commit deda1252 authored by Yt's avatar Yt Committed by GitHub
Browse files

Merge pull request #307835 from afh/modernize-allure

allure: modernize
parents de3d030b b198ac32
Loading
Loading
Loading
Loading
+29 −21
Original line number Diff line number Diff line
{ lib, stdenv, makeWrapper, fetchurl, jre }:
{ lib
, stdenv
, makeWrapper
, fetchurl
, jre
}:

let
stdenv.mkDerivation (finalAttrs: {
  pname = "allure";
  version = "2.29.0";
in
stdenv.mkDerivation rec {
  inherit pname version;
  nativeBuildInputs = [ makeWrapper ];

  buildInputs = [ jre ];

  src = fetchurl {
    url = "https://github.com/allure-framework/allure2/releases/download/${version}/allure-${version}.tgz";
    sha256 = "sha256-ohcVXblnCrNs57BWmz+wUwplfIG9fOW8l08LuipNhPs=";
    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 = ''
    mkdir -p "$out/share"
    runHook preInstall

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

  dontCheck = true;
    runHook postInstall
  '';

  meta = with lib; {
  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";
    longDescription = "Allure Report is a flexible, lightweight multi-language test reporting tool. It provides clear graphical reports and allows everyone involved in the development process to extract the maximum of information from the everyday testing process";
    license = licenses.asl20;
    maintainers = with maintainers; [ happysalada ];
    maintainers = with lib.maintainers; [ happysalada ];
  };
}
})