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.
This commit is contained in:
Daniel Siepmann 2023-02-08 12:55:05 +01:00
parent 776c6cb8d1
commit 0b451f07a9
Signed by: Daniel Siepmann
GPG key ID: 33D6629915560EF4
3 changed files with 16 additions and 9 deletions

View file

@ -32,7 +32,7 @@ in {
stateVersion = "22.05"; stateVersion = "22.05";
packages = import ./home/packages.nix { packages = import ./home/packages.nix {
inherit pkgs; inherit pkgs ownLib;
}; };
file = import ./home/files.nix { }; file = import ./home/files.nix { };

View file

@ -1,4 +1,4 @@
{ pkgs }: { pkgs, ownLib }:
with pkgs; [ with pkgs; [
nix nix
@ -20,7 +20,9 @@ with pkgs; [
(callPackage ./packages/custom/backup { }) (callPackage ./packages/custom/backup { })
(callPackage ./packages/custom/nextcloud-sync/from-local.nix { }) (callPackage ./packages/custom/nextcloud-sync/from-local.nix { })
(callPackage ./packages/custom/nextcloud-sync/from-remote.nix { }) (callPackage ./packages/custom/nextcloud-sync/from-remote.nix { })
(callPackage ./packages/custom/typo3-documentation-rendering { }) (callPackage ./packages/custom/typo3-documentation-rendering {
inherit ownLib;
})
(callPackage ./packages/custom/build-phpactor { }) (callPackage ./packages/custom/build-phpactor { })
i3blocks i3blocks
st st

View file

@ -1,22 +1,27 @@
{ {
writeShellApplication, writeShellApplication,
ownLib,
podman podman
}: }:
writeShellApplication { 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"; name = "custom-typo3-render-documentation";
runtimeInputs = [ inherit runtimeInputs;
podman
];
# See: https://t3docs.github.io/DRC-The-Docker-Rendering-Container/07-To-be-sorted/quickstart.html#build-html-with-plain-docker-commands # See: https://t3docs.github.io/DRC-The-Docker-Rendering-Container/07-To-be-sorted/quickstart.html#build-html-with-plain-docker-commands
text = '' text = ''
podman \ ${runner} \
run --rm \ run --rm \
-v "$(pwd)":/PROJECT:ro \ -v "$(pwd)":/PROJECT:ro \
-v "$(pwd)/Documentation-GENERATED-temp":/RESULT \ -v "$(pwd)/Documentation-GENERATED-temp":/RESULT \
docker.io/t3docs/render-documentation:latest \ ${image} \
makehtml makehtml
''; '';
} }