First, open Code Ocean's custom package management system.
Next, use apt-get to install
Then, in a postInstall script, write:
curl -fsS https://dlang.org/install.sh | bash -s install ldc-1.6.0
See the following two examples for more specific usage demonstrations:
Note that the second example also installs supplementary D libraries via the postInstall script.