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-05-15 13:10:29 +01:00
|
|
|
version = "3.11.0-01";
|
2015-09-26 05:00:22 +01:00
|
|
|
|
|
|
|
src = fetchurl {
|
2017-09-01 17:19:27 +01:00
|
|
|
url = "https://sonatype-download.global.ssl.fastly.net/nexus/3/nexus-${version}-mac.tgz";
|
2018-05-15 13:10:29 +01:00
|
|
|
sha256 = "1h5nfzb1sqhzb5j7w2dpmdi7vnnc9g6zx43a44f3zjvlxh1s0vim";
|
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
|
|
|
};
|
|
|
|
}
|