Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at 23.11 45 lines 1.1 kB view raw
1{ lib 2, stdenvNoCC 3, fetchurl 4, makeBinaryWrapper 5, jre 6}: 7 8stdenvNoCC.mkDerivation (finalAttrs: { 9 pname = "code-maat"; 10 version = "1.0.4"; 11 12 src = fetchurl { 13 url = "https://github.com/adamtornhill/code-maat/releases/download/v${finalAttrs.version}/code-maat-${finalAttrs.version}-standalone.jar"; 14 hash = "sha256-QoeuIDSQGERFD3aVR7xEl6DaGm0cf6b63IWHBeZ0O18="; 15 }; 16 17 dontUnpack = true; 18 19 nativeBuildInputs = [ 20 makeBinaryWrapper 21 ]; 22 23 installPhase = 24 let 25 jar = "$out/libexec/code-maat/code-maat.jar"; 26 in 27 '' 28 runHook preInstall 29 30 install -D ${finalAttrs.src} ${jar} 31 mkdir -p "$out/bin" 32 makeWrapper "${jre}/bin/java" "$out/bin/code-maat" \ 33 --add-flags "-jar ${jar}" 34 35 runHook postInstall 36 ''; 37 38 meta = with lib; { 39 description = "A command line tool to mine and analyze data from version-control systems"; 40 homepage = "https://github.com/adamtornhill/code-maat"; 41 platforms = platforms.unix; 42 license = licenses.gpl3; 43 maintainers = with maintainers; [ sir4ur0n ]; 44 }; 45})