nixpkgs/home/packages/custom/typo3-documentation-rendering/default.nix
Daniel Siepmann 0b451f07a9
Allow to use TYPO3 documentation rendering on both systems
I use docker on hikari2 and podman on hikari.
I now change the bash script based on that.
2023-02-08 12:55:05 +01:00

28 lines
699 B
Nix

{
writeShellApplication,
ownLib,
podman
}:
let
usePodman = ownLib.onHikari {};
runner = if usePodman then "podman" else "docker";
image = (if usePodman then "podman" 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 = ''
${runner} \
run --rm \
-v "$(pwd)":/PROJECT:ro \
-v "$(pwd)/Documentation-GENERATED-temp":/RESULT \
${image} \
makehtml
'';
}