2019-02-11 10:08:44 +00:00
|
|
|
{ stdenv, lib, fetchurl, unzip, jre }:
|
|
|
|
|
|
|
|
let
|
|
|
|
|
2020-10-23 14:30:32 +01:00
|
|
|
version = "4.5.0.2216";
|
2019-02-11 10:08:44 +00:00
|
|
|
|
|
|
|
sonarScannerArchPackage = {
|
|
|
|
"x86_64-linux" = {
|
|
|
|
url = "https://binaries.sonarsource.com/Distribution/sonar-scanner-cli/sonar-scanner-cli-${version}-linux.zip";
|
2020-10-23 14:30:32 +01:00
|
|
|
sha256 = "sha256-rmvDb5l2BGV8j94Uhu2kJXwoDAHA3VncAahqGvLY3I0=";
|
2019-02-11 10:08:44 +00:00
|
|
|
};
|
|
|
|
"x86_64-darwin" = {
|
|
|
|
url = "https://binaries.sonarsource.com/Distribution/sonar-scanner-cli/sonar-scanner-cli-${version}-macosx.zip";
|
2020-10-23 14:30:32 +01:00
|
|
|
sha256 = "1g3lldpkrjlvwld9h82hlwclyplxpbk4q3nq59ylw4dhp26kb993";
|
2019-02-11 10:08:44 +00:00
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
in stdenv.mkDerivation rec {
|
|
|
|
inherit version;
|
2020-10-23 14:30:32 +01:00
|
|
|
pname = "sonar-scanner-cli";
|
2019-02-11 10:08:44 +00:00
|
|
|
|
|
|
|
src = fetchurl sonarScannerArchPackage.${stdenv.hostPlatform.system};
|
|
|
|
|
|
|
|
buildInputs = [ unzip ];
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
mkdir -p $out/lib
|
|
|
|
cp -r lib/* $out/lib/
|
|
|
|
mkdir -p $out/bin
|
|
|
|
cp bin/* $out/bin/
|
|
|
|
mkdir -p $out/conf
|
|
|
|
cp conf/* $out/conf/
|
|
|
|
'';
|
|
|
|
|
|
|
|
fixupPhase = ''
|
|
|
|
substituteInPlace $out/bin/sonar-scanner \
|
|
|
|
--replace "\$sonar_scanner_home/jre" "${lib.getBin jre}"
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
2020-10-23 14:30:32 +01:00
|
|
|
homepage = "https://github.com/SonarSource/sonar-scanner-cli";
|
2019-02-11 10:08:44 +00:00
|
|
|
description = "SonarQube Scanner used to start code analysis";
|
2020-10-23 14:30:32 +01:00
|
|
|
license = licenses.gpl3Plus;
|
2019-02-11 10:08:44 +00:00
|
|
|
maintainers = with maintainers; [ peterromfeldhk ];
|
|
|
|
platforms = builtins.attrNames sonarScannerArchPackage;
|
|
|
|
};
|
|
|
|
}
|