mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-05 03:53:41 +00:00
df7727042f
Relevant release notes: * https://help.sonatype.com/repomanager3/release-notes/2019-release-notes#id-2019ReleaseNotes-RepositoryManager3.19.1 * https://help.sonatype.com/repomanager3/release-notes/2019-release-notes#id-2019ReleaseNotes-RepositoryManager3.19.0 Also added `preferLocalBuild = true;` to prevent builds on remote machines as this only means elevated network access (tarball is fetched locally and uploaded to the builder) and the build is fairly trivial. To fix the startup I had to add the JVM parameter `java.endorsed.dirs` to ensure that all libraries are loaded properly[1]. [1] https://issues.sonatype.org/browse/NEXUS-21603
49 lines
1.2 KiB
Nix
49 lines
1.2 KiB
Nix
{ stdenv, fetchurl, makeWrapper, jre_headless, gawk }:
|
|
|
|
stdenv.mkDerivation rec {
|
|
pname = "nexus";
|
|
version = "3.19.1-01";
|
|
|
|
src = fetchurl {
|
|
url = "https://sonatype-download.global.ssl.fastly.net/nexus/3/nexus-${version}-unix.tar.gz";
|
|
sha256 = "0kjzp5n6pkgx5s21jfmh6pbgnjlvs89kcjqikv4lgc5yia264bks";
|
|
};
|
|
|
|
preferLocalBuild = true;
|
|
|
|
sourceRoot = "${pname}-${version}";
|
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
|
|
|
patches = [ ./nexus-bin.patch ./nexus-vm-opts.patch ];
|
|
|
|
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_headless} \
|
|
--set ALTERNATIVE_NAME "nexus" \
|
|
--prefix PATH "${stdenv.lib.makeBinPath [ gawk ]}"
|
|
|
|
runHook postInstall
|
|
'';
|
|
|
|
meta = with stdenv.lib; {
|
|
description = "Repository manager for binary software components";
|
|
homepage = http://www.sonatype.org/nexus;
|
|
license = licenses.epl10;
|
|
platforms = platforms.all;
|
|
maintainers = with maintainers; [ aespinosa ironpinguin ma27 zaninime ];
|
|
};
|
|
}
|