2019-01-14 09:45:50 +01:00
|
|
|
{ stdenv, fetchurl, makeWrapper, jre_headless, gawk }:
|
2018-05-15 14:10:29 +02:00
|
|
|
|
2015-09-26 06:00:22 +02:00
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 14:41:18 +02:00
|
|
|
pname = "nexus";
|
2019-12-26 20:04:11 +01:00
|
|
|
version = "3.20.1-01";
|
2015-09-26 06:00:22 +02:00
|
|
|
|
|
|
|
src = fetchurl {
|
2018-06-27 03:37:07 +02:00
|
|
|
url = "https://sonatype-download.global.ssl.fastly.net/nexus/3/nexus-${version}-unix.tar.gz";
|
2019-12-26 20:04:11 +01:00
|
|
|
sha256 = "0l8fwcnpbc35lqadyrsljvr4rr5kp9gkx5dxs9i35mg2f0z9bagv";
|
2015-09-26 06:00:22 +02:00
|
|
|
};
|
|
|
|
|
2019-10-28 21:33:16 +01:00
|
|
|
preferLocalBuild = true;
|
|
|
|
|
2019-08-15 14:41:18 +02:00
|
|
|
sourceRoot = "${pname}-${version}";
|
2015-09-26 06:00:22 +02:00
|
|
|
|
2017-09-01 18:19:27 +02:00
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
2015-09-26 06:00:22 +02:00
|
|
|
|
2018-05-15 14:10:29 +02:00
|
|
|
patches = [ ./nexus-bin.patch ./nexus-vm-opts.patch ];
|
2017-09-01 18:19:27 +02: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 \
|
2019-01-14 09:45:50 +01:00
|
|
|
--set JAVA_HOME ${jre_headless} \
|
2017-09-01 18:19:27 +02:00
|
|
|
--set ALTERNATIVE_NAME "nexus" \
|
|
|
|
--prefix PATH "${stdenv.lib.makeBinPath [ gawk ]}"
|
2018-05-15 14:10:29 +02:00
|
|
|
|
|
|
|
runHook postInstall
|
2017-09-01 18:19:27 +02:00
|
|
|
'';
|
2015-09-26 06:00:22 +02:00
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "Repository manager for binary software components";
|
|
|
|
homepage = http://www.sonatype.org/nexus;
|
|
|
|
license = licenses.epl10;
|
|
|
|
platforms = platforms.all;
|
2019-01-10 12:56:33 +01:00
|
|
|
maintainers = with maintainers; [ aespinosa ironpinguin ma27 zaninime ];
|
2015-09-26 06:00:22 +02:00
|
|
|
};
|
|
|
|
}
|