1 { lib, stdenv, fetchurl, makeWrapper, jre_headless, gawk }:
3 stdenv.mkDerivation rec {
8 url = "https://download.sonatype.com/nexus/3/nexus-${version}-unix.tar.gz";
9 hash = "sha256-+Hdmuy7WBtUIjEBZyLgE3a3+L/lANHiy1VRBJ2s686U=";
12 preferLocalBuild = true;
14 sourceRoot = "${pname}-${version}";
16 nativeBuildInputs = [ makeWrapper ];
18 patches = [ ./nexus-bin.patch ./nexus-vm-opts.patch ];
21 substituteInPlace bin/nexus.vmoptions \
22 --replace ../sonatype-work /var/lib/sonatype-work \
23 --replace etc/karaf $out/etc/karaf \
31 cp -rfv * .install4j $out
32 rm -fv $out/bin/nexus.bat
34 wrapProgram $out/bin/nexus \
35 --set JAVA_HOME ${jre_headless} \
36 --set ALTERNATIVE_NAME "nexus" \
37 --prefix PATH "${lib.makeBinPath [ gawk ]}"
43 description = "Repository manager for binary software components";
44 homepage = "https://www.sonatype.com/products/sonatype-nexus-oss";
45 sourceProvenance = with sourceTypes; [ binaryBytecode ];
46 license = licenses.epl10;
47 platforms = platforms.all;
48 maintainers = with maintainers; [ aespinosa ironpinguin zaninime ];