mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-09-30 01:17:28 +03:00
50 lines
1.2 KiB
Nix
50 lines
1.2 KiB
Nix
{ stdenv, lib, fetchurl, nixosTests }:
|
|
|
|
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/
|
|
'';
|
|
|
|
passthru.tests = {
|
|
inherit (nixosTests) tomcat;
|
|
};
|
|
|
|
meta = with lib; {
|
|
homepage = "https://tomcat.apache.org/";
|
|
description = "An implementation of the Java Servlet and JavaServer Pages technologies";
|
|
platforms = platforms.all;
|
|
maintainers = [ ];
|
|
license = [ licenses.asl20 ];
|
|
sourceProvenance = with sourceTypes; [ binaryBytecode ];
|
|
};
|
|
});
|
|
|
|
in {
|
|
tomcat9 = common {
|
|
versionMajor = "9";
|
|
versionMinor = "0.82";
|
|
sha256 = "sha256-xvRGXDUkYaHFYacUPg81Xf0xyTbdsc1XP/PmqMR8bQc=";
|
|
};
|
|
|
|
tomcat10 = common {
|
|
versionMajor = "10";
|
|
versionMinor = "1.15";
|
|
sha256 = "sha256-cqQW3Dc3sC/1zoidMIGDBNw4G5bnxYvhmHz7U7K6Djg=";
|
|
};
|
|
}
|