Created
January 11, 2016 23:24
-
-
Save aborsu/7ca170528686c8d11dea to your computer and use it in GitHub Desktop.
First attempt at making a sonarQube package for nixos.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ stdenv, fetchurl, unzip, pkgs, makeWrapper, jre, utillinux, getopt, procps }: | |
stdenv.mkDerivation rec { | |
name = "sonarqube-${version}"; | |
version = "5.3"; | |
src = fetchurl { | |
url = "https://sonarsource.bintray.com/Distribution/sonarqube/${name}.zip"; | |
sha256 = "4e61ee3a01d5e447bcd64357df77e0377325c4a2bb5ceb2cdeb5a5d193443ba5"; | |
}; | |
meta = with stdenv.lib; { | |
description = "SonarQube is an open platform to manage code quality."; | |
homepage = http://www.sonarqube.org/; | |
license = licenses.lgpl3; | |
platforms = platforms.linux; | |
maintainers = [ ]; | |
}; | |
buildInputs = [ makeWrapper unzip procps ] ++ | |
(if (!stdenv.isDarwin) then [utillinux] else [getopt]); | |
unpackPhase = '' | |
unzip $src | |
''; | |
installPhase = '' | |
mkdir -p $out | |
cp -R ${name}/conf ${name}/extensions ${name}/logs ${name}/web ${name}/data ${name}/lib ${name}/temp $out | |
${if pkgs.stdenv.isi686 then "cp -R ${name}/bin/linux-x86-32 $out/bin" | |
else if pkgs.stdenv.isx86_64 then"cp -R ${name}/bin/linux-x86-64 $out/bin" | |
else "echo 'architecture not yet supported'; exit -1;"} | |
sed -i s=/usr/bin/ps=${procps}/bin/ps= $out/bin/sonar.sh | |
''; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment