2017-09-01 16:19:27 +00:00
|
|
|
{ stdenv, fetchurl, makeWrapper, jre, gawk }:
|
2018-05-15 12:10:29 +00:00
|
|
|
|
2015-09-26 04:00:22 +00:00
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
name = "nexus-${version}";
|
2018-06-27 01:37:07 +00:00
|
|
|
version = "3.12.1-01";
|
2015-09-26 04:00:22 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
2018-06-27 01:37:07 +00:00
|
|
|
url = "https://sonatype-download.global.ssl.fastly.net/nexus/3/nexus-${version}-unix.tar.gz";
|
|
|
|
sha256 = "1vv50zv3cr42rq1g16gdl2d1hrxna2jjynlr7kivzlbyfq89ic3f";
|
2015-09-26 04:00:22 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
sourceRoot = name;
|
|
|
|
|
2017-09-01 16:19:27 +00:00
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
2015-09-26 04:00:22 +00:00
|
|
|
|
2018-05-15 12:10:29 +00:00
|
|
|
patches = [ ./nexus-bin.patch ./nexus-vm-opts.patch ];
|
2017-09-01 16:19:27 +00:00
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace bin/nexus.vmoptions \
|
|
|
|
--replace etc/karaf $out/etc/karaf \
|
|
|
|
--replace =. =$out
|
|
|
|
'';
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
runHook preInstall
|
|
|
|
|
|
|
|
mkdir -p $out
|
|
|
|
cp -rfv * .install4j $out
|
|
|
|
rm -fv $out/bin/nexus.bat
|
|
|
|
|
|
|
|
wrapProgram $out/bin/nexus \
|
|
|
|
--set JAVA_HOME ${jre} \
|
|
|
|
--set ALTERNATIVE_NAME "nexus" \
|
|
|
|
--prefix PATH "${stdenv.lib.makeBinPath [ gawk ]}"
|
2018-05-15 12:10:29 +00:00
|
|
|
|
|
|
|
runHook postInstall
|
2017-09-01 16:19:27 +00:00
|
|
|
'';
|
2015-09-26 04:00:22 +00:00
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "Repository manager for binary software components";
|
|
|
|
homepage = http://www.sonatype.org/nexus;
|
|
|
|
license = licenses.epl10;
|
|
|
|
platforms = platforms.all;
|
2018-05-15 12:10:29 +00:00
|
|
|
maintainers = with maintainers; [ aespinosa ironpinguin ma27 ];
|
2015-09-26 04:00:22 +00:00
|
|
|
};
|
|
|
|
}
|