-
-
Notifications
You must be signed in to change notification settings - Fork 12.7k
/
default.nix
56 lines (47 loc) · 1.4 KB
/
default.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
{ stdenv, lib, fetchurl }:
let
common = { versionMajor, versionMinor, sha256 } @ args: stdenv.mkDerivation (rec {
name = "apache-tomcat-${version}";
version = "${versionMajor}.${versionMinor}";
src = fetchurl {
url = "mirror://apache/tomcat/tomcat-${versionMajor}/v${version}/bin/${name}.tar.gz";
inherit sha256;
};
outputs = [ "out" "webapps" ];
installPhase =
''
mkdir $out
mv * $out
mkdir -p $webapps/webapps
mv $out/webapps $webapps/
'';
meta = {
homepage = https://tomcat.apache.org/;
description = "An implementation of the Java Servlet and JavaServer Pages technologies";
platforms = with lib.platforms; all;
maintainers = with lib.maintainers; [ danbst ];
license = [ lib.licenses.asl20 ];
};
});
in {
tomcat7 = common {
versionMajor = "7";
versionMinor = "0.75";
sha256 = "0w5adsy4792qkf3ws46f539lrdbpz7lghy79s6b04c9yqaxjz6ni";
};
tomcat8 = common {
versionMajor = "8";
versionMinor = "0.39";
sha256 = "16hyypdawby66qa8y66sfprcf78wjy319a0gsi4jgfqfywcsm4s0";
};
tomcat85 = common {
versionMajor = "8";
versionMinor = "5.9";
sha256 = "1dy8bf18jwyi6p7ayb96gbhd4iyfq4d37s3qxnlll8vklfx388np";
};
tomcatUnstable = common {
versionMajor = "9";
versionMinor = "0.0.M15";
sha256 = "1spbq5vh2dplp83ki3fbbwl0klxq36s4rwkpcjdnwjxjymg9k432";
};
}