And so far it worked fine. You can replace for example some-command by yq and you get yaml->json conversion.
The problem is that recently the input string got too large and I get: error: executing '/nix/store/...-bash-5.2-p15/bin/bash': Argument list too long.
If I was only in Bash I could solve it by for example by cat /file | some-command or some-command --read /file but the problem is that the x input is already a string. It is not a file.
I’m googling passAsFile but I can’t find an example with runCommand. Does it mean that I need to use mkDerivation instead? Could you please link me to an example code?