allure: modernize

This commit is contained in:
Alexis Hildebrandt 2024-04-29 22:31:49 +02:00
parent adc9566b32
commit b198ac3266

View File

@ -1,40 +1,48 @@
{ 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"
runHook postInstall
'';
dontCheck = true;
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 ];
};
}
})