1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-12-21 05:25:38 +00:00
nixpkgs/pkgs/development/tools/repository-managers/nexus/default.nix
2020-04-10 17:54:53 +01:00

49 lines
1.2 KiB
Nix

{ stdenv, fetchurl, makeWrapper, jre_headless, gawk }:
stdenv.mkDerivation rec {
pname = "nexus";
version = "3.22.0-02";
src = fetchurl {
url = "https://sonatype-download.global.ssl.fastly.net/nexus/3/nexus-${version}-unix.tar.gz";
sha256 = "12433fgva03gsgi37xqgkdnbglgq4b66lmzk5cyxfg22szl4xvwz";
};
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 zaninime ];
};
}