1 { stdenvNoCC, lib, fetchurl, mysql_jdbc ? null
3 , crowdProperties ? null
7 assert withMysql -> (mysql_jdbc != null);
9 lib.warnIf (crowdProperties != null) "Using `crowdProperties` is deprecated!"
10 (stdenvNoCC.mkDerivation rec {
11 pname = "atlassian-confluence";
15 url = "https://product-downloads.atlassian.com/software/confluence/downloads/${pname}-${version}.tar.gz";
16 sha256 = "sha256-Z4a4YZO9UnZSAZYB0FHRsX8QwX0ju3SeISsQquyA+w0=";
20 echo "confluence.home=/run/confluence/home" > confluence/WEB-INF/classes/confluence-init.properties
21 mv conf/server.xml conf/server.xml.dist
22 ln -sf /run/confluence/home/deploy conf/Standalone
23 ln -sf /run/confluence/server.xml conf/server.xml
24 rm -r logs; ln -sf /run/confluence/logs/ .
25 rm -r work; ln -sf /run/confluence/work/ .
26 rm -r temp; ln -sf /run/confluence/temp/ .
27 '' + lib.optionalString enableSSO ''
28 substituteInPlace confluence/WEB-INF/classes/seraph-config.xml \
29 --replace com.atlassian.confluence.user.ConfluenceAuthenticator\
30 com.atlassian.confluence.user.ConfluenceCrowdSSOAuthenticator
31 '' + lib.optionalString (crowdProperties != null) ''
32 cat <<EOF > confluence/WEB-INF/classes/crowd.properties
35 '' + lib.optionalString withMysql ''
36 cp -v ${mysql_jdbc}/share/java/*jar confluence/WEB-INF/lib/
41 patchShebangs $out/bin
45 description = "Team collaboration software written in Java and mainly used in corporate environments";
46 homepage = "https://www.atlassian.com/software/confluence";
47 sourceProvenance = with sourceTypes; [ binaryBytecode ];
48 license = licenses.unfree;
49 maintainers = with maintainers; [ willibutz ciil techknowlogick ];