Libreoffice cannot use firejail because of path issue

configuration.nix

programs.firejail.enable = true;
programs.firejail.wrappedBinaries = {
	libreoffice = {
		executable = "${pkgs.lib.getBin pkgs.libreoffice-still}/bin/libreoffice";
		profile = "${pkgs.firejail}/etc/firejail/libreoffice.profile";
	};
};

After running libreoffice in terminal, this is some error output:

/nix/store/somehash-libreoffice-7.5.9.2/lib/libreoffice/program/soffice: line 51: dirname: command not found
/nix/store/somehash-libreoffice-7.5.9.2/lib/libreoffice/program/soffice: line 145: grep: command not found
/nix/store/somehash-libreoffice-7.5.9.2/lib/libreoffice/program/soffice: line 151: uname: command not found
/nix/store/somehash-libreoffice-7.5.9.2/lib/libreoffice/program/soffice: line 191: /nix/store/someotherhash-libreoffice-7.5.9.2-wrapped/bin/oosplash: No such file or directory

I think this is path issue in the soffice script but I do not know how to solve it.

I believe it is somehow related to this post:

1 Like

Thank you so much for your help!