allure: modernize

+29 -21
+29 -21
pkgs/development/tools/allure/default.nix
··· 1 - { lib, stdenv, makeWrapper, fetchurl, jre }: 1 + { lib 2 + , stdenv 3 + , makeWrapper 4 + , fetchurl 5 + , jre 6 + }: 2 7 3 - let 8 + stdenv.mkDerivation (finalAttrs: { 4 9 pname = "allure"; 5 10 version = "2.29.0"; 6 - in 7 - stdenv.mkDerivation rec { 8 - inherit pname version; 9 - nativeBuildInputs = [ makeWrapper ]; 10 - 11 - buildInputs = [ jre ]; 12 11 13 12 src = fetchurl { 14 - url = "https://github.com/allure-framework/allure2/releases/download/${version}/allure-${version}.tgz"; 15 - sha256 = "sha256-ohcVXblnCrNs57BWmz+wUwplfIG9fOW8l08LuipNhPs="; 13 + url = "https://github.com/allure-framework/allure2/releases/download/${finalAttrs.version}/allure-${finalAttrs.version}.tgz"; 14 + hash = "sha256-ohcVXblnCrNs57BWmz+wUwplfIG9fOW8l08LuipNhPs="; 16 15 }; 16 + 17 17 dontConfigure = true; 18 18 dontBuild = true; 19 19 20 + nativeBuildInputs = [ makeWrapper ]; 21 + buildInputs = [ jre ]; 22 + 20 23 installPhase = '' 21 - mkdir -p "$out/share" 24 + runHook preInstall 25 + 26 + mkdir -p $out/{bin,share} 22 27 cd "$out/share" 23 28 tar xvzf $src 24 - mkdir -p "$out/bin" 25 - makeWrapper $out/share/${pname}-${version}/bin/allure $out/bin/${pname} \ 29 + makeWrapper $out/share/${finalAttrs.meta.mainProgram}-${finalAttrs.version}/bin/allure $out/bin/${finalAttrs.meta.mainProgram} \ 26 30 --prefix PATH : "${jre}/bin" 31 + 32 + runHook postInstall 27 33 ''; 28 34 29 - dontCheck = true; 30 - 31 - meta = with lib; { 35 + meta = { 32 36 homepage = "https://docs.qameta.io/allure/"; 33 37 description = "Allure Report is a flexible, lightweight multi-language test reporting tool."; 38 + longDescription = '' 39 + Allure Report is a flexible, lightweight multi-language test reporting 40 + tool providing clear graphical reports and allowing everyone involved 41 + in the development process to extract the maximum of information from 42 + the everyday testing process. 43 + ''; 44 + license = lib.licenses.asl20; 34 45 mainProgram = "allure"; 35 - 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"; 36 - license = licenses.asl20; 37 - maintainers = with maintainers; [ happysalada ]; 46 + maintainers = with lib.maintainers; [ happysalada ]; 38 47 }; 39 - } 40 - 48 + })