replace cp/chmod by install to avoid security issues. See https://github.com/NixOS/nixpkgs/issues/121293