-
-
Save cleverca22/6a9569071ebca3cb3c114d6540e0a4a2 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ stdenv, aedb, writeTextFile, cfg }: | |
let | |
config = writeTextFile { | |
name = "config.php"; | |
text = '' | |
<?php | |
$master_server = "${cfg.master}"; | |
$this_server = "${cfg.hostname}"; | |
$base = 'nixos'; | |
''; | |
}; | |
in | |
stdenv.mkDerivation { | |
name = "public_html"; | |
phases = [ "installPhase" ]; | |
installPhase = '' | |
mkdir -pv $out/dsis/ | |
cp -vi ${aedb}/root/index.php $out/ | |
ln -sv ${aedb}/web/css $out/dsis/ | |
ln -sv ${aedb}/web/java $out/dsis/ | |
ln -sv ${aedb}/web/js $out/dsis/ | |
ln -sv ${aedb}/web/sounds $out/dsis/ | |
ln -sv ${aedb}/web/help $out/dsis/ | |
ln -sv ${aedb}/web/images $out/dsis/ | |
substituteInPlace $out/index.php --replace @AEDB@ ${aedb} --replace @CONFIGFILE@ ${config}; | |
''; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment