2024-07-27 06:49:29 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
stdenv,
|
|
|
|
fetchurl,
|
|
|
|
makeWrapper,
|
|
|
|
jre_headless,
|
|
|
|
gawk,
|
2024-09-19 14:19:46 +00:00
|
|
|
nixosTests,
|
2024-07-27 06:49:29 +00:00
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "nexus";
|
2024-09-19 14:19:46 +00:00
|
|
|
version = "3.70.1-02";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
2023-07-15 17:15:38 +00:00
|
|
|
url = "https://download.sonatype.com/nexus/3/nexus-${version}-unix.tar.gz";
|
2024-09-19 14:19:46 +00:00
|
|
|
hash = "sha256-oBappm8WRcgyD5HWqJKPbMHjlwCUo9y5+FtB2Kq1PCE=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
preferLocalBuild = true;
|
|
|
|
|
|
|
|
sourceRoot = "${pname}-${version}";
|
|
|
|
|
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
|
|
|
|
2024-07-27 06:49:29 +00:00
|
|
|
patches = [
|
|
|
|
./nexus-bin.patch
|
|
|
|
./nexus-vm-opts.patch
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace bin/nexus.vmoptions \
|
2024-07-27 06:49:29 +00:00
|
|
|
--replace-fail ../sonatype-work /var/lib/sonatype-work \
|
|
|
|
--replace-fail etc/karaf $out/etc/karaf \
|
|
|
|
--replace-fail =. =$out
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
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" \
|
2021-02-05 17:12:51 +00:00
|
|
|
--prefix PATH "${lib.makeBinPath [ gawk ]}"
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
runHook postInstall
|
|
|
|
'';
|
|
|
|
|
2024-09-19 14:19:46 +00:00
|
|
|
passthru.tests = {
|
|
|
|
inherit (nixosTests) nexus;
|
|
|
|
};
|
|
|
|
|
2024-07-27 06:49:29 +00:00
|
|
|
meta = {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Repository manager for binary software components";
|
2023-07-15 17:15:38 +00:00
|
|
|
homepage = "https://www.sonatype.com/products/sonatype-nexus-oss";
|
2024-07-27 06:49:29 +00:00
|
|
|
sourceProvenance = with lib.sourceTypes; [ binaryBytecode ];
|
|
|
|
license = lib.licenses.epl10;
|
|
|
|
platforms = lib.platforms.all;
|
|
|
|
maintainers = with lib.maintainers; [
|
|
|
|
aespinosa
|
|
|
|
ironpinguin
|
|
|
|
luftmensch-luftmensch
|
|
|
|
zaninime
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|