nixpkgs/home/packages/custom/typo3-documentation-rendering/default.nix
Daniel Siepmann bd175bcdf7
Ensure target folder for T3 docs exists
podman will not work if it is missing.
2023-03-01 08:55:10 +01:00

29 lines
745 B
Nix

{
writeShellApplication,
ownLib,
podman
}:
let
usePodman = ownLib.onHikari {};
runner = if usePodman then "podman" else "docker";
image = (if usePodman then "docker.io/" else "") + "t3docs/render-documentation:latest";
runtimeInputs = if usePodman then [ podman ] else [ ];
in writeShellApplication {
name = "custom-typo3-render-documentation";
inherit runtimeInputs;
# See: https://t3docs.github.io/DRC-The-Docker-Rendering-Container/07-To-be-sorted/quickstart.html#build-html-with-plain-docker-commands
text = ''
mkdir -p Documentation-GENERATED-temp
${runner} \
run --rm \
-v "$(pwd)":/PROJECT:ro \
-v "$(pwd)/Documentation-GENERATED-temp":/RESULT \
${image} \
makehtml
'';
}