confluence: Add support for MySQL driver

If Confluence should be connected to a MySQL database, the JDBC driver
is required.
Also switch to stdenvNoCC, because we don't really use cc.
This commit is contained in:
Janne Heß 2020-02-01 19:25:52 +01:00
parent 6ba8ec0c09
commit 7dadbc7a98

View file

@ -1,9 +1,12 @@
{ stdenv, lib, fetchurl
{ stdenvNoCC, lib, fetchurl, mysql_jdbc ? null
, enableSSO ? false
, crowdProperties ? null
, withMysql ? true
}:
stdenv.mkDerivation rec {
assert withMysql -> (mysql_jdbc != null);
stdenvNoCC.mkDerivation rec {
pname = "atlassian-confluence";
version = "7.2.0";
@ -28,6 +31,8 @@ stdenv.mkDerivation rec {
cat <<EOF > confluence/WEB-INF/classes/crowd.properties
${crowdProperties}
EOF
'' + lib.optionalString withMysql ''
cp -v ${mysql_jdbc}/share/java/*jar confluence/WEB-INF/lib/
'';
installPhase = ''
@ -35,7 +40,7 @@ stdenv.mkDerivation rec {
patchShebangs $out/bin
'';
meta = with stdenv.lib; {
meta = with lib; {
description = "Team collaboration software written in Java and mainly used in corporate environments";
homepage = "https://www.atlassian.com/software/confluence";
license = licenses.unfree;