2024-07-02 15:59:04 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
stdenv,
|
|
|
|
fetchurl,
|
|
|
|
makeWrapper,
|
|
|
|
jre_headless,
|
|
|
|
gawk,
|
2024-08-17 22:29:43 +00:00
|
|
|
nixosTests,
|
2024-07-02 15:59:04 +00:00
|
|
|
}:
|
2018-05-15 12:10:29 +00:00
|
|
|
|
2015-09-26 04:00:22 +00:00
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 12:41:18 +00:00
|
|
|
pname = "nexus";
|
2024-07-02 15:59:04 +00:00
|
|
|
version = "3.69.0-02";
|
2015-09-26 04:00:22 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
2023-04-27 13:45:32 +00:00
|
|
|
url = "https://download.sonatype.com/nexus/3/nexus-${version}-unix.tar.gz";
|
2024-07-02 15:59:04 +00:00
|
|
|
hash = "sha256-7sgLPuM93mFEPlTd3qJY+FGVHErvgcTGJWwSBcqBgWI=";
|
2015-09-26 04:00:22 +00:00
|
|
|
};
|
|
|
|
|
2019-10-28 20:33:16 +00:00
|
|
|
preferLocalBuild = true;
|
|
|
|
|
2019-08-15 12:41:18 +00:00
|
|
|
sourceRoot = "${pname}-${version}";
|
2015-09-26 04:00:22 +00:00
|
|
|
|
2017-09-01 16:19:27 +00:00
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
2015-09-26 04:00:22 +00:00
|
|
|
|
2024-07-02 15:59:04 +00:00
|
|
|
patches = [
|
|
|
|
./nexus-bin.patch
|
|
|
|
./nexus-vm-opts.patch
|
|
|
|
];
|
2017-09-01 16:19:27 +00:00
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace bin/nexus.vmoptions \
|
2024-07-02 15:59:04 +00:00
|
|
|
--replace-fail ../sonatype-work /var/lib/sonatype-work \
|
|
|
|
--replace-fail etc/karaf $out/etc/karaf \
|
|
|
|
--replace-fail =. =$out
|
2017-09-01 16:19:27 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
runHook preInstall
|
|
|
|
|
|
|
|
mkdir -p $out
|
|
|
|
cp -rfv * .install4j $out
|
|
|
|
rm -fv $out/bin/nexus.bat
|
|
|
|
|
|
|
|
wrapProgram $out/bin/nexus \
|
2019-01-14 08:45:50 +00:00
|
|
|
--set JAVA_HOME ${jre_headless} \
|
2017-09-01 16:19:27 +00:00
|
|
|
--set ALTERNATIVE_NAME "nexus" \
|
2021-01-23 12:26:19 +00:00
|
|
|
--prefix PATH "${lib.makeBinPath [ gawk ]}"
|
2018-05-15 12:10:29 +00:00
|
|
|
|
|
|
|
runHook postInstall
|
2017-09-01 16:19:27 +00:00
|
|
|
'';
|
2015-09-26 04:00:22 +00:00
|
|
|
|
2024-08-17 22:29:43 +00:00
|
|
|
passthru.tests = {
|
|
|
|
inherit (nixosTests) nexus;
|
|
|
|
};
|
|
|
|
|
2024-07-02 15:59:04 +00:00
|
|
|
meta = {
|
2015-09-26 04:00:22 +00:00
|
|
|
description = "Repository manager for binary software components";
|
2023-04-27 13:45:32 +00:00
|
|
|
homepage = "https://www.sonatype.com/products/sonatype-nexus-oss";
|
2024-07-02 15:59:04 +00:00
|
|
|
sourceProvenance = with lib.sourceTypes; [ binaryBytecode ];
|
|
|
|
license = lib.licenses.epl10;
|
|
|
|
platforms = lib.platforms.all;
|
|
|
|
maintainers = with lib.maintainers; [
|
|
|
|
aespinosa
|
|
|
|
ironpinguin
|
|
|
|
luftmensch-luftmensch
|
|
|
|
zaninime
|
|
|
|
];
|
2015-09-26 04:00:22 +00:00
|
|
|
};
|
|
|
|
}
|