nixpkgs/pkgs/servers/http/tomcat/default.nix

51 lines
1.2 KiB
Nix
Raw Normal View History

2016-09-08 09:47:04 +01:00
{ stdenv, lib, fetchurl }:
let
common = { versionMajor, versionMinor, sha256 }: stdenv.mkDerivation (rec {
pname = "apache-tomcat";
version = "${versionMajor}.${versionMinor}";
src = fetchurl {
url = "mirror://apache/tomcat/tomcat-${versionMajor}/v${version}/bin/${pname}-${version}.tar.gz";
inherit sha256;
};
outputs = [ "out" "webapps" ];
installPhase =
''
mkdir $out
mv * $out
mkdir -p $webapps/webapps
mv $out/webapps $webapps/
'';
meta = {
2016-09-08 09:47:04 +01:00
homepage = https://tomcat.apache.org/;
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 ];
};
});
in {
tomcat7 = common {
versionMajor = "7";
2020-03-11 11:42:22 +00:00
versionMinor = "0.100";
sha256 = "0wjjnvxjz0xbnsfgyp0xc7nlij4z093v54hg59vww2nmkz5mg01v";
};
tomcat8 = common {
versionMajor = "8";
2020-03-11 11:48:13 +00:00
versionMinor = "5.51";
sha256 = "1zmg0hi4nw4y5sknd0jgq9lb3bncjjscay5fdiiq3qh5cs0wsvl3";
};
tomcat9 = common {
versionMajor = "9";
2019-06-21 14:37:50 +01:00
versionMinor = "0.21";
sha256 = "0nsylbqvky4pf3wpsx3a29b85lvwk91ay37mljk9636qffjj1vjh";
};
}