2017-09-01 19:19:27 +03:00
|
|
|
{ stdenv, fetchurl, makeWrapper, jre, gawk }:
|
2015-09-26 07:00:22 +03:00
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
name = "nexus-${version}";
|
2017-09-01 19:19:27 +03:00
|
|
|
version = "3.5.1-02";
|
2015-09-26 07:00:22 +03:00
|
|
|
|
|
|
|
src = fetchurl {
|
2017-09-01 19:19:27 +03:00
|
|
|
url = "https://sonatype-download.global.ssl.fastly.net/nexus/3/nexus-${version}-mac.tgz";
|
|
|
|
sha256 = "5ef3512c2bbdd45ef35921c1a0ba109b45bd9dad88311750196aa689262258b6";
|
2015-09-26 07:00:22 +03:00
|
|
|
};
|
|
|
|
|
|
|
|
sourceRoot = name;
|
|
|
|
|
2017-09-01 19:19:27 +03:00
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
2015-09-26 07:00:22 +03:00
|
|
|
|
2017-09-01 19:19:27 +03:00
|
|
|
patches = [ ./nexus-bin.patch ];
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace bin/nexus.vmoptions \
|
|
|
|
--replace ../sonatype-work/nexus3 /run/sonatype-work/nexus3 \
|
|
|
|
--replace etc/karaf $out/etc/karaf \
|
|
|
|
--replace =. =$out
|
|
|
|
'';
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
runHook preInstall
|
|
|
|
|
|
|
|
mkdir -p $out
|
|
|
|
cp -rfv * .install4j $out
|
|
|
|
rm -fv $out/bin/nexus.bat
|
|
|
|
|
|
|
|
runHook postInstall
|
|
|
|
'';
|
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
wrapProgram $out/bin/nexus \
|
|
|
|
--set JAVA_HOME ${jre} \
|
|
|
|
--set ALTERNATIVE_NAME "nexus" \
|
|
|
|
--prefix PATH "${stdenv.lib.makeBinPath [ gawk ]}"
|
|
|
|
'';
|
2015-09-26 07:00:22 +03:00
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "Repository manager for binary software components";
|
|
|
|
homepage = http://www.sonatype.org/nexus;
|
|
|
|
license = licenses.epl10;
|
|
|
|
platforms = platforms.all;
|
2017-09-01 19:19:27 +03:00
|
|
|
maintainers = with maintainers; [ aespinosa ironpinguin ];
|
2015-09-26 07:00:22 +03:00
|
|
|
};
|
|
|
|
}
|