|
|
|
@ -1,4 +1,5 @@ |
|
|
|
|
{ stdenv, fetchurl, home ? "/var/lib/crowd" }: |
|
|
|
|
{ stdenv, fetchurl, home ? "/var/lib/crowd" |
|
|
|
|
, port ? 8092, proxyUrl ? null, openidPassword ? "WILL_NEVER_BE_SET" }: |
|
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec { |
|
|
|
|
name = "atlassian-crowd-${version}"; |
|
|
|
@ -18,9 +19,22 @@ stdenv.mkDerivation rec { |
|
|
|
|
rm -rf apache-tomcat/work |
|
|
|
|
ln -s /run/atlassian-crowd/work apache-tomcat/work |
|
|
|
|
|
|
|
|
|
ln -s /run/atlassian-crowd/database database |
|
|
|
|
|
|
|
|
|
substituteInPlace apache-tomcat/bin/startup.sh --replace start run |
|
|
|
|
|
|
|
|
|
echo "crowd.home=${home}" > crowd-webapp/WEB-INF/classes/crowd-init.properties |
|
|
|
|
substituteInPlace build.properties \ |
|
|
|
|
--replace "openidserver.url=http://localhost:8095/openidserver" \ |
|
|
|
|
"openidserver.url=http://localhost:${toString port}/openidserver" |
|
|
|
|
substituteInPlace crowd-openidserver-webapp/WEB-INF/classes/crowd.properties \ |
|
|
|
|
--replace "http://localhost:8095/" \ |
|
|
|
|
"http://localhost:${toString port}/" |
|
|
|
|
sed -r -i crowd-openidserver-webapp/WEB-INF/classes/crowd.properties \ |
|
|
|
|
-e 's,application.password\s+password,application.password ${openidPassword},' |
|
|
|
|
'' + stdenv.lib.optionalString (proxyUrl != null) '' |
|
|
|
|
sed -i crowd-openidserver-webapp/WEB-INF/classes/crowd.properties \ |
|
|
|
|
-e 's,http://localhost:${toString port}/openidserver,${proxyUrl}/openidserver,' |
|
|
|
|
''; |
|
|
|
|
|
|
|
|
|
installPhase = '' |
|
|
|
|