2017-09-01 17:19:27 +01:00
|
|
|
{ stdenv, fetchurl, makeWrapper, jre, gawk }:
|
2018-05-15 13:10:29 +01:00
|
|
|
|
2015-09-26 05:00:22 +01:00
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
name = "nexus-${version}";
|
2018-06-27 02:37:07 +01:00
|
|
|
version = "3.12.1-01";
|
2015-09-26 05:00:22 +01:00
|
|
|
|
|
|
|
src = fetchurl {
|
2018-06-27 02:37:07 +01:00
|
|
|
url = "https://sonatype-download.global.ssl.fastly.net/nexus/3/nexus-${version}-unix.tar.gz";
|
|
|
|
sha256 = "1vv50zv3cr42rq1g16gdl2d1hrxna2jjynlr7kivzlbyfq89ic3f";
|
2015-09-26 05:00:22 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
sourceRoot = name;
|
|
|
|
|
2017-09-01 17:19:27 +01:00
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
2015-09-26 05:00:22 +01:00
|
|
|
|
2018-05-15 13:10:29 +01:00
|
|
|
patches = [ ./nexus-bin.patch ./nexus-vm-opts.patch ];
|
2017-09-01 17:19:27 +01: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 13:10:29 +01:00
|
|
|
|
|
|
|
runHook postInstall
|
2017-09-01 17:19:27 +01:00
|
|
|
'';
|
2015-09-26 05:00:22 +01: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 13:10:29 +01:00
|
|
|
maintainers = with maintainers; [ aespinosa ironpinguin ma27 ];
|
2015-09-26 05:00:22 +01:00
|
|
|
};
|
|
|
|
}
|