On top of default.nix:
let
arx' = haskellPackages.arx.overrideAttrs (o: {
patchPhase = (o.patchPhase or "") + ''
substituteInPlace model-scripts/tmpx.sh \
--replace /tmp/ \$HOME/.cache/
'';
});
However, this does not work anymore since: solidsnack/arx@537e1bf . On the other hand, passing --tmpdir '$HOME/.cache' to arx also does not work, since arx expects a fully qualified path and thus rejects $HOME.