diff --git a/nixos/doc/manual/release-notes/rl-2505.section.md b/nixos/doc/manual/release-notes/rl-2505.section.md index 41f1b9cf1ccb..0986b34e16cf 100644 --- a/nixos/doc/manual/release-notes/rl-2505.section.md +++ b/nixos/doc/manual/release-notes/rl-2505.section.md @@ -463,6 +463,10 @@ [Prisma ORM upgrade guide](https://www.prisma.io/docs/orm/more/upgrade-guides/upgrading-versions/upgrading-to-prisma-6) for more information. +- `depdendency-track` no longer bundes the UI inside the jar. This bundling + functionality is deprecated by upstream and causes UI assets not being served + after weeks of runtime. + - `nq` was updated to 1.0, which renames the `fq` and `tq` utilities to `nqtail` and `nqterm` respectively. - `zf` was updated to 0.10.2, which includes breaking changes from the [0.10.0 release](https://github.com/natecraddock/zf/releases/tag/0.10.0). diff --git a/nixos/modules/services/web-apps/dependency-track.nix b/nixos/modules/services/web-apps/dependency-track.nix index b1b22f14d134..129770926222 100644 --- a/nixos/modules/services/web-apps/dependency-track.nix +++ b/nixos/modules/services/web-apps/dependency-track.nix @@ -509,7 +509,8 @@ in upstreams.dependency-track.servers."localhost:${toString cfg.port}" = { }; virtualHosts.${cfg.nginx.domain} = { locations = { - "/".proxyPass = "http://dependency-track"; + "/".alias = "${cfg.package.frontend}/dist/"; + "/api".proxyPass = "http://dependency-track"; "= /static/config.json".alias = frontendConfigFile; }; }; diff --git a/pkgs/by-name/de/dependency-track/package.nix b/pkgs/by-name/de/dependency-track/package.nix index 7e5d4184d220..23aee3929cdd 100644 --- a/pkgs/by-name/de/dependency-track/package.nix +++ b/pkgs/by-name/de/dependency-track/package.nix @@ -28,6 +28,11 @@ let hash = "sha256-IcahhuWX1Ba7kmyJaNJlY1gcVHOR6uynyr7w5MMwRgo="; }; + installPhase = '' + mkdir $out + cp -R ./dist $out/ + ''; + npmDepsHash = "sha256-LeSKSZYtjrZ84RkhGbLEMHVi1fw7FK/137F0V4hjSCE="; forceGitDeps = true; makeCacheWritable = true; @@ -74,17 +79,11 @@ maven.buildMavenPackage rec { "-Dmaven.test.skip=true" "-P enhance" "-P embedded-jetty" - "-P bundle-ui" "-Dservices.bom.merge.skip=false" "-Dlogback.configuration.file=${src}/src/main/docker/logback.xml" "-Dcyclonedx-cli.path=${lib.getExe cyclonedx-cli}" ]; - preBuild = '' - mkdir -p frontend - cp -r ${frontend}/lib/node_modules/@dependencytrack/frontend/dist frontend/ - ''; - afterDepsSetup = '' mvn cyclonedx:makeBom -Dmaven.repo.local=$mvnDeps/.m2 \ org.codehaus.mojo:exec-maven-plugin:exec@merge-services-bom @@ -105,7 +104,6 @@ maven.buildMavenPackage rec { ''; passthru = { - # passthru for nix-update inherit frontend; tests = { inherit (nixosTests) dependency-track;