diff options
Diffstat (limited to 'nixpkgs/pkgs/servers/http/tomcat/default.nix')
-rw-r--r-- | nixpkgs/pkgs/servers/http/tomcat/default.nix | 24 |
1 files changed, 16 insertions, 8 deletions
diff --git a/nixpkgs/pkgs/servers/http/tomcat/default.nix b/nixpkgs/pkgs/servers/http/tomcat/default.nix index ede01d350d4b..0b1d4115c895 100644 --- a/nixpkgs/pkgs/servers/http/tomcat/default.nix +++ b/nixpkgs/pkgs/servers/http/tomcat/default.nix @@ -1,13 +1,13 @@ -{ stdenv, lib, fetchurl }: +{ stdenv, lib, fetchurl, nixosTests, testers, jre }: let - common = { versionMajor, versionMinor, sha256 }: stdenv.mkDerivation (rec { + common = { versionMajor, versionMinor, sha256 }: stdenv.mkDerivation (finalAttrs: { pname = "apache-tomcat"; version = "${versionMajor}.${versionMinor}"; src = fetchurl { - url = "mirror://apache/tomcat/tomcat-${versionMajor}/v${version}/bin/${pname}-${version}.tar.gz"; + url = "mirror://apache/tomcat/tomcat-${versionMajor}/v${finalAttrs.version}/bin/${finalAttrs.pname}-${finalAttrs.version}.tar.gz"; inherit sha256; }; @@ -20,11 +20,19 @@ 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"; + }; + }; + meta = with lib; { homepage = "https://tomcat.apache.org/"; description = "An implementation of the Java Servlet and JavaServer Pages technologies"; platforms = platforms.all; - maintainers = [ ]; + maintainers = with maintainers; [ anthonyroussel ]; license = [ licenses.asl20 ]; sourceProvenance = with sourceTypes; [ binaryBytecode ]; }; @@ -33,13 +41,13 @@ let in { tomcat9 = common { versionMajor = "9"; - versionMinor = "0.75"; - sha256 = "sha256-VWfKg789z+ns1g3hDsCZFYQ+PsdqUEBeBHCihkGZelk="; + versionMinor = "0.82"; + sha256 = "sha256-xvRGXDUkYaHFYacUPg81Xf0xyTbdsc1XP/PmqMR8bQc="; }; tomcat10 = common { versionMajor = "10"; - versionMinor = "0.27"; - sha256 = "sha256-N2atmOdhVrGx88eXOc9Wziq8kn7IWzTeFyFpir/5HLc="; + versionMinor = "1.15"; + sha256 = "sha256-cqQW3Dc3sC/1zoidMIGDBNw4G5bnxYvhmHz7U7K6Djg="; }; } |