10b2208ec5
Sometimes it's required to modify some parts of the Citrix build on their own which is why `{pre,post}Install` hooks can be quite helpful. Additionally some corporate clients use their own certificates that aren't stored as trusted ones in the `cacert` package with all of the trusted certs by Mozilla. Now it's possible to add custom certs like this: ``` nix with import <nixpkgs> { config.allowUnfree = true; }; let path = ../../Downloads/custom-corporate-cert.pem; in citrix_receiver.override { extraCerts = [ path ]; } ```
19 lines
514 B
Nix
19 lines
514 B
Nix
{ citrix_receiver, extraCerts ? [], symlinkJoin }:
|
|
|
|
let
|
|
|
|
mkCertCopy = certPath:
|
|
"cp ${certPath} $out/opt/citrix-icaclient/keystore/cacerts/";
|
|
|
|
in
|
|
|
|
if builtins.length extraCerts == 0 then citrix_receiver else symlinkJoin {
|
|
name = "citrix-with-extra-certs-${citrix_receiver.version}";
|
|
paths = [ citrix_receiver ];
|
|
|
|
postBuild = ''
|
|
${builtins.concatStringsSep "\n" (map mkCertCopy extraCerts)}
|
|
|
|
sed -i -E "s,-icaroot (.+citrix-icaclient),-icaroot $out/opt/citrix-icaclient," $out/bin/wfica
|
|
'';
|
|
}
|