1 { stdenv, lib, fetchurl, unzip, jre }:
5 version = "4.7.0.2747";
7 sonarScannerArchPackage = {
9 url = "https://binaries.sonarsource.com/Distribution/sonar-scanner-cli/sonar-scanner-cli-${version}-linux.zip";
10 sha256 = "0qy97lcn9nfwg0x32v9x5kh5jswnjyw3wpvxj45z7cddlj2is4iy";
13 url = "https://binaries.sonarsource.com/Distribution/sonar-scanner-cli/sonar-scanner-cli-${version}-macosx.zip";
14 sha256 = "0f8km7wqkw09g01l03kcrjgvq7b6xclzpvb5r64ymsmrc39p0ylp";
18 in stdenv.mkDerivation rec {
20 pname = "sonar-scanner-cli";
22 src = fetchurl sonarScannerArchPackage.${stdenv.hostPlatform.system} or (throw "unsupported system ${stdenv.hostPlatform.system}");
24 nativeBuildInputs = [ unzip ];
36 substituteInPlace $out/bin/sonar-scanner \
37 --replace "\$sonar_scanner_home/jre" "${lib.getBin jre}"
41 homepage = "https://github.com/SonarSource/sonar-scanner-cli";
42 description = "SonarQube Scanner used to start code analysis";
43 license = licenses.gpl3Plus;
44 maintainers = with maintainers; [ peterromfeldhk ];
45 platforms = builtins.attrNames sonarScannerArchPackage;