biglybt: 3.5.0.0 -> 3.6.0.0
[NixPkgs.git] / pkgs / development / tools / code-maat / default.nix
blobc5aa3c0b5d842bd7ecd5aa247918c2491075eb87
1 { lib
2 , stdenvNoCC
3 , fetchurl
4 , makeBinaryWrapper
5 , jre
6 }:
8 stdenvNoCC.mkDerivation (finalAttrs: {
9   pname = "code-maat";
10   version = "1.0.4";
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   };
17   dontUnpack = true;
19   nativeBuildInputs = [
20     makeBinaryWrapper
21   ];
23   installPhase =
24     let
25       jar = "$out/libexec/code-maat/code-maat.jar";
26     in
27     ''
28       runHook preInstall
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}"
35       runHook postInstall
36     '';
38   meta = with lib; {
39     description = "A command line tool to mine and analyze data from version-control systems";
40     mainProgram = "code-maat";
41     homepage = "https://github.com/adamtornhill/code-maat";
42     platforms = platforms.unix;
43     license = licenses.gpl3;
44     maintainers = with maintainers; [ sir4ur0n ];
45   };