push sheeet
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s

This commit is contained in:
Dark Steveneq
2025-10-09 14:15:47 +02:00
commit 646b892680
49168 changed files with 5897842 additions and 0 deletions

View File

@@ -0,0 +1,44 @@
diff --git a/pom.xml b/pom.xml
index 9988e765..906917c0 100644
--- a/pom.xml
+++ b/pom.xml
@@ -660,38 +660,13 @@
<artifactId>maven-antrun-plugin</artifactId>
<version>3.1.0</version>
<executions>
- <execution>
- <id>frontend-download</id>
- <phase>prepare-package</phase>
- <configuration>
- <target>
- <get src="https://github.com/DependencyTrack/frontend/releases/download/${frontend.version}/frontend-dist.zip" dest="${project.build.directory}" verbose="true"/>
- </target>
- </configuration>
- <goals>
- <goal>run</goal>
- </goals>
- </execution>
- <execution>
- <id>frontend-extract</id>
- <phase>prepare-package</phase>
- <configuration>
- <target>
- <unzip src="${project.build.directory}/frontend-dist.zip" dest="${project.build.directory}/frontend">
- </unzip>
- </target>
- </configuration>
- <goals>
- <goal>run</goal>
- </goals>
- </execution>
<execution>
<id>frontend-resource-deploy</id>
<phase>prepare-package</phase>
<configuration>
<target>
<copy todir="${project.build.directory}/${project.artifactId}">
- <fileset dir="${project.build.directory}/frontend/dist">
+ <fileset dir="${project.basedir}/frontend/dist">
<include name="**/*"/>
</fileset>
</copy>

View File

@@ -0,0 +1,17 @@
diff --git a/pom.xml b/pom.xml
index 9988e765..f69576b4 100644
--- a/pom.xml
+++ b/pom.xml
@@ -457,6 +457,12 @@
<version>${lib.testcontainers.version}</version>
<scope>test</scope>
</dependency>
+ <dependency>
+ <groupId>com.kohlschutter.junixsocket</groupId>
+ <artifactId>junixsocket-core</artifactId>
+ <version>2.10.0</version>
+ <type>pom</type>
+ </dependency>
</dependencies>
<build>

View File

@@ -0,0 +1,127 @@
{
lib,
buildNpmPackage,
fetchFromGitHub,
nodejs_20,
jre_headless,
protobuf_30,
cyclonedx-cli,
makeWrapper,
maven,
nix-update-script,
nixosTests,
}:
let
version = "4.13.4";
frontend = buildNpmPackage {
pname = "dependency-track-frontend";
inherit version;
# TODO: pinned due to build error on node 22
nodejs = nodejs_20;
src = fetchFromGitHub {
owner = "DependencyTrack";
repo = "frontend";
rev = version;
hash = "sha256-CBO69GSUDENBRGDGn7nbxxh9++SAqcFgRBg/SYPze5U=";
};
installPhase = ''
mkdir $out
cp -R ./dist $out/
'';
npmDepsHash = "sha256-W3EkDJ0raRNXXZO9ajob+cVN6vcdoUrZYYmkiruSHCE=";
forceGitDeps = true;
makeCacheWritable = true;
# The prepack script runs the build script, which we'd rather do in the build phase.
npmPackFlags = [ "--ignore-scripts" ];
};
in
maven.buildMavenPackage rec {
inherit version;
pname = "dependency-track";
src = fetchFromGitHub {
owner = "DependencyTrack";
repo = "dependency-track";
rev = version;
hash = "sha256-bEODby53pVg/3KVUbLJvDAqfpyc0G+iIUxpLKy7LwJc=";
};
patches = [
./0000-remove-frontend-download.patch
./0001-add-junixsocket.patch
];
postPatch = ''
substituteInPlace pom.xml \
--replace-fail '<protocArtifact>''${tool.protoc.version}</protocArtifact>' \
"<protocCommand>${protobuf_30}/bin/protoc</protocCommand>"
'';
mvnJdk = jre_headless;
mvnHash = "sha256-zM4iPFwQV/sAX666SdfArcjJNVaWXAUeQoiNsYbv2GA=";
manualMvnArtifacts = [ "com.coderplus.maven.plugins:copy-rename-maven-plugin:1.0.1" ];
buildOffline = true;
mvnDepsParameters = lib.escapeShellArgs [
"-Dmaven.test.skip=true"
"-P enhance"
"-P embedded-jetty"
];
mvnParameters = lib.escapeShellArgs [
"-Dmaven.test.skip=true"
"-P enhance"
"-P embedded-jetty"
"-Dservices.bom.merge.skip=false"
"-Dlogback.configuration.file=${src}/src/main/docker/logback.xml"
"-Dcyclonedx-cli.path=${lib.getExe cyclonedx-cli}"
];
afterDepsSetup = ''
mvn cyclonedx:makeBom -Dmaven.repo.local=$mvnDeps/.m2 \
org.codehaus.mojo:exec-maven-plugin:exec@merge-services-bom
'';
doCheck = false;
nativeBuildInputs = [ makeWrapper ];
installPhase = ''
runHook preInstall
install -Dm644 target/dependency-track-*.jar $out/share/dependency-track/dependency-track.jar
makeWrapper ${jre_headless}/bin/java $out/bin/dependency-track \
--add-flags "-jar $out/share/dependency-track/dependency-track.jar"
runHook postInstall
'';
passthru = {
inherit frontend;
tests = {
inherit (nixosTests) dependency-track;
};
updateScript = nix-update-script {
extraArgs = [
"-s"
"frontend"
];
};
};
meta = {
description = "Intelligent Component Analysis platform that allows organizations to identify and reduce risk in the software supply chain";
homepage = "https://github.com/DependencyTrack/dependency-track";
license = lib.licenses.asl20;
teams = [ lib.teams.cyberus ];
mainProgram = "dependency-track";
inherit (jre_headless.meta) platforms;
};
}