tomcat: cleanup package with callPackages

This commit is contained in:
danbst 2016-09-07 15:47:01 +00:00 committed by Bjørn Forsman
parent 41b1134680
commit 39ad7a9e60
7 changed files with 51 additions and 68 deletions

View File

@ -1,6 +0,0 @@
import ./recent.nix
{
versionMajor = "6";
versionMinor = "0.45";
sha256 = "0ba8h86padpk23xmscp7sg70g0v8ji2jbwwriz59hxqy5zhd76wg";
}

View File

@ -1,6 +0,0 @@
import ./recent.nix
{
versionMajor = "7";
versionMinor = "0.68";
sha256 = "1q5qgci5ia25zqa1k1n2xzarsgk1317ya89mfgg0fmi65x1046ic";
}

View File

@ -1,6 +0,0 @@
import ./recent.nix
{
versionMajor = "8";
versionMinor = "0.32";
sha256 = "1f59x5z8qf4rzy49m8d5ifi4h1ghkz5r33l3i67sib414h7jc8vy";
}

View File

@ -1,20 +0,0 @@
source $stdenv/setup || exit 1
tar zxf $src
cd jakarta-tomcat*/bin
# install jsvc
tar xvfz jsvc.tar.gz
cd jsvc-src
sh ./configure --with-java=$jdk
make
cp jsvc ..
cd ..
# done jsvc
cd ../..
mkdir $out
mv jakarta-tomcat* $out

View File

@ -0,0 +1,47 @@
{ stdenv, 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;
};
installPhase =
''
mkdir $out
mv * $out
'';
meta = {
homepage = http://tomcat.apache.org/;
description = "An implementation of the Java Servlet and JavaServer Pages technologies";
platforms = with stdenv.lib.platforms; all;
};
});
in {
tomcat6 = common {
versionMajor = "6";
versionMinor = "0.45";
sha256 = "0ba8h86padpk23xmscp7sg70g0v8ji2jbwwriz59hxqy5zhd76wg";
};
tomcat7 = common {
versionMajor = "7";
versionMinor = "0.68";
sha256 = "1q5qgci5ia25zqa1k1n2xzarsgk1317ya89mfgg0fmi65x1046ic";
};
tomcat8 = common {
versionMajor = "8";
versionMinor = "0.32";
sha256 = "1f59x5z8qf4rzy49m8d5ifi4h1ghkz5r33l3i67sib414h7jc8vy";
};
}

View File

@ -1,25 +0,0 @@
{ versionMajor, versionMinor, sha256 }:
{ stdenv, fetchurl }:
let version = "${versionMajor}.${versionMinor}"; in
stdenv.mkDerivation rec {
name = "apache-tomcat-${version}";
src = fetchurl {
url = "mirror://apache/tomcat/tomcat-${versionMajor}/v${version}/bin/${name}.tar.gz";
inherit sha256;
};
installPhase =
''
mkdir $out
mv * $out
'';
meta = {
homepage = http://tomcat.apache.org/;
description = "An implementation of the Java Servlet and JavaServer Pages technologies";
platforms = with stdenv.lib.platforms; all;
};
}

View File

@ -10748,11 +10748,10 @@ in
slurm-llnl-full = appendToName "full" (callPackage ../servers/computing/slurm { });
tomcat6 = callPackage ../servers/http/tomcat/6.0.nix { };
tomcat7 = callPackage ../servers/http/tomcat/7.0.nix { };
tomcat8 = callPackage ../servers/http/tomcat/8.0.nix { };
inherit (callPackages ../servers/http/tomcat { })
tomcat6
tomcat7
tomcat8;
tomcat_mysql_jdbc = callPackage ../servers/http/tomcat/jdbc/mysql { };