2016-09-08 09:47:04 +01:00
|
|
|
{ stdenv, lib, fetchurl }:
|
2016-09-07 16:47:01 +01:00
|
|
|
|
|
|
|
let
|
|
|
|
|
|
|
|
common = { versionMajor, versionMinor, sha256 } @ args: stdenv.mkDerivation (rec {
|
|
|
|
name = "apache-tomcat-${version}";
|
|
|
|
version = "${versionMajor}.${versionMinor}";
|
2016-09-23 01:16:26 +01:00
|
|
|
|
2016-09-07 16:47:01 +01:00
|
|
|
src = fetchurl {
|
|
|
|
url = "mirror://apache/tomcat/tomcat-${versionMajor}/v${version}/bin/${name}.tar.gz";
|
|
|
|
inherit sha256;
|
|
|
|
};
|
2016-09-23 01:16:26 +01:00
|
|
|
|
2016-09-07 16:58:08 +01:00
|
|
|
outputs = [ "out" "webapps" ];
|
2016-09-07 16:47:01 +01:00
|
|
|
installPhase =
|
|
|
|
''
|
|
|
|
mkdir $out
|
|
|
|
mv * $out
|
2016-09-07 16:58:08 +01:00
|
|
|
mkdir -p $webapps/webapps
|
|
|
|
mv $out/webapps $webapps/
|
2016-09-07 16:47:01 +01:00
|
|
|
'';
|
2016-09-23 01:16:26 +01:00
|
|
|
|
2016-09-07 16:47:01 +01:00
|
|
|
meta = {
|
2016-09-08 09:47:04 +01:00
|
|
|
homepage = https://tomcat.apache.org/;
|
2016-09-07 16:47:01 +01:00
|
|
|
description = "An implementation of the Java Servlet and JavaServer Pages technologies";
|
2016-09-08 09:47:04 +01:00
|
|
|
platforms = with lib.platforms; all;
|
|
|
|
maintainers = with lib.maintainers; [ danbst ];
|
|
|
|
license = [ lib.licenses.asl20 ];
|
2016-09-07 16:47:01 +01:00
|
|
|
};
|
|
|
|
});
|
|
|
|
|
|
|
|
in {
|
|
|
|
tomcat7 = common {
|
|
|
|
versionMajor = "7";
|
2017-02-18 03:28:01 +00:00
|
|
|
versionMinor = "0.75";
|
|
|
|
sha256 = "0w5adsy4792qkf3ws46f539lrdbpz7lghy79s6b04c9yqaxjz6ni";
|
2016-09-07 16:47:01 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
tomcat8 = common {
|
|
|
|
versionMajor = "8";
|
2017-02-18 03:28:34 +00:00
|
|
|
versionMinor = "0.41";
|
|
|
|
sha256 = "1mvnf6m29y3p40vvi9mgghrddlmgwcrcvfwrf9vbama78fsh8wm5";
|
2016-09-07 16:47:01 +01:00
|
|
|
};
|
|
|
|
|
2016-09-07 17:20:54 +01:00
|
|
|
tomcat85 = common {
|
|
|
|
versionMajor = "8";
|
2017-02-18 03:29:24 +00:00
|
|
|
versionMinor = "5.11";
|
|
|
|
sha256 = "0i1xvgpj4l4agc8vxrnfm127w4mc33pyl8963pwpklqpdk4shcjn";
|
2016-09-07 17:20:54 +01:00
|
|
|
};
|
2016-09-23 01:16:26 +01:00
|
|
|
|
2016-09-07 17:20:54 +01:00
|
|
|
tomcatUnstable = common {
|
|
|
|
versionMajor = "9";
|
2017-02-18 03:30:41 +00:00
|
|
|
versionMinor = "0.0.M17";
|
|
|
|
sha256 = "1ilvka2062m7412bj2fsdwvfxbrjyj9qxcia40hhv22prvkxw3cg";
|
2016-09-07 17:20:54 +01:00
|
|
|
};
|
2016-09-07 16:47:01 +01:00
|
|
|
}
|