472aeafc57
GitOrigin-RevId: c31898adf5a8ed202ce5bea9f347b1c6871f32d1
70 lines
1.7 KiB
Nix
70 lines
1.7 KiB
Nix
{
|
|
fetchurl,
|
|
gitUpdater,
|
|
jre,
|
|
lib,
|
|
nixosTests,
|
|
stdenvNoCC,
|
|
testers,
|
|
}:
|
|
|
|
let
|
|
common =
|
|
{ version, hash }:
|
|
stdenvNoCC.mkDerivation (finalAttrs: {
|
|
pname = "apache-tomcat";
|
|
inherit version;
|
|
|
|
src = fetchurl {
|
|
url = "mirror://apache/tomcat/tomcat-${lib.versions.major version}/v${version}/bin/apache-tomcat-${version}.tar.gz";
|
|
inherit hash;
|
|
};
|
|
|
|
outputs = [
|
|
"out"
|
|
"webapps"
|
|
];
|
|
installPhase = ''
|
|
mkdir $out
|
|
mv * $out
|
|
mkdir -p $webapps/webapps
|
|
mv $out/webapps $webapps/
|
|
'';
|
|
|
|
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";
|
|
};
|
|
};
|
|
};
|
|
|
|
meta = {
|
|
homepage = "https://tomcat.apache.org/";
|
|
description = "Implementation of the Java Servlet and JavaServer Pages technologies";
|
|
platforms = jre.meta.platforms;
|
|
maintainers = with lib.maintainers; [ anthonyroussel ];
|
|
license = lib.licenses.asl20;
|
|
sourceProvenance = with lib.sourceTypes; [ binaryBytecode ];
|
|
};
|
|
});
|
|
|
|
in
|
|
{
|
|
tomcat9 = common {
|
|
version = "9.0.95";
|
|
hash = "sha256-WzdanjSlywXfIYi/6eK2pve2kaPApiaytMBHxR1DQgU=";
|
|
};
|
|
|
|
tomcat10 = common {
|
|
version = "10.1.30";
|
|
hash = "sha256-jeWoCPPcdirOZ5SM2Q0TJ7EWgWYiBE3IdQ8EIH35Ci4=";
|
|
};
|
|
}
|