tomcat: add passthru.updateScript

This commit is contained in:
Anthony Roussel 2024-07-14 15:18:12 +02:00
parent eda65c2b43
commit 8c1f535d37
No known key found for this signature in database
GPG Key ID: 9DC4987B1A55E75E

View File

@ -1,4 +1,4 @@
{ stdenvNoCC, lib, fetchurl, nixosTests, testers, jre }:
{ stdenvNoCC, lib, fetchurl, nixosTests, testers, jre, gitUpdater }:
let
common = { version, hash }: stdenvNoCC.mkDerivation (finalAttrs: {
@ -19,11 +19,18 @@ let
mv $out/webapps $webapps/
'';
passthru.tests = {
inherit (nixosTests) tomcat;
version = testers.testVersion {
package = finalAttrs.finalPackage;
command = "JAVA_HOME=${jre} ${finalAttrs.finalPackage}/bin/version.sh";
passthru = {
updateScript = gitUpdater {
url = "https://github.com/apache/tomcat.git";
allowedVersions = "^${lib.versions.major version}\\.";
ignoredVersions = "-M.*";
};
tests = {
inherit (nixosTests) tomcat;
version = testers.testVersion {
package = finalAttrs.finalPackage;
command = "JAVA_HOME=${jre} ${finalAttrs.finalPackage}/bin/version.sh";
};
};
};