diff options
author | danbst <abcz2.uprola@gmail.com> | 2016-09-07 15:47:01 +0000 |
---|---|---|
committer | Bjørn Forsman <bjorn.forsman@gmail.com> | 2016-09-09 18:29:12 +0200 |
commit | 39ad7a9e600a3f92ea5e095fa57a0a4458df8fd9 (patch) | |
tree | adee39af5ddc273aac94cda9c765d43bc6861101 /pkgs | |
parent | 41b1134680d1b0964eac5d6cd2afac3ab9181352 (diff) |
tomcat: cleanup package with callPackages
Diffstat (limited to 'pkgs')
-rw-r--r-- | pkgs/servers/http/tomcat/6.0.nix | 6 | ||||
-rw-r--r-- | pkgs/servers/http/tomcat/7.0.nix | 6 | ||||
-rw-r--r-- | pkgs/servers/http/tomcat/8.0.nix | 6 | ||||
-rw-r--r-- | pkgs/servers/http/tomcat/builder.sh | 20 | ||||
-rw-r--r-- | pkgs/servers/http/tomcat/default.nix | 47 | ||||
-rw-r--r-- | pkgs/servers/http/tomcat/recent.nix | 25 | ||||
-rw-r--r-- | pkgs/top-level/all-packages.nix | 9 |
7 files changed, 51 insertions, 68 deletions
diff --git a/pkgs/servers/http/tomcat/6.0.nix b/pkgs/servers/http/tomcat/6.0.nix deleted file mode 100644 index c01e5065764cd..0000000000000 --- a/pkgs/servers/http/tomcat/6.0.nix +++ /dev/null @@ -1,6 +0,0 @@ -import ./recent.nix - { - versionMajor = "6"; - versionMinor = "0.45"; - sha256 = "0ba8h86padpk23xmscp7sg70g0v8ji2jbwwriz59hxqy5zhd76wg"; - } diff --git a/pkgs/servers/http/tomcat/7.0.nix b/pkgs/servers/http/tomcat/7.0.nix deleted file mode 100644 index b38f4353cc45f..0000000000000 --- a/pkgs/servers/http/tomcat/7.0.nix +++ /dev/null @@ -1,6 +0,0 @@ -import ./recent.nix - { - versionMajor = "7"; - versionMinor = "0.68"; - sha256 = "1q5qgci5ia25zqa1k1n2xzarsgk1317ya89mfgg0fmi65x1046ic"; - } diff --git a/pkgs/servers/http/tomcat/8.0.nix b/pkgs/servers/http/tomcat/8.0.nix deleted file mode 100644 index 0046017966726..0000000000000 --- a/pkgs/servers/http/tomcat/8.0.nix +++ /dev/null @@ -1,6 +0,0 @@ -import ./recent.nix - { - versionMajor = "8"; - versionMinor = "0.32"; - sha256 = "1f59x5z8qf4rzy49m8d5ifi4h1ghkz5r33l3i67sib414h7jc8vy"; - } diff --git a/pkgs/servers/http/tomcat/builder.sh b/pkgs/servers/http/tomcat/builder.sh deleted file mode 100644 index 5f858d1cff8ec..0000000000000 --- a/pkgs/servers/http/tomcat/builder.sh +++ /dev/null @@ -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 diff --git a/pkgs/servers/http/tomcat/default.nix b/pkgs/servers/http/tomcat/default.nix new file mode 100644 index 0000000000000..3653679aa0129 --- /dev/null +++ b/pkgs/servers/http/tomcat/default.nix @@ -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"; + }; + +} diff --git a/pkgs/servers/http/tomcat/recent.nix b/pkgs/servers/http/tomcat/recent.nix deleted file mode 100644 index 02be47a602215..0000000000000 --- a/pkgs/servers/http/tomcat/recent.nix +++ /dev/null @@ -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; - }; -} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 04df6aa901550..599a24c5c0ee1 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -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 { }; |