citrix_receiver: allow custom certs and hooks for the installation
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 ]; } ```
This commit is contained in:
parent
cc1d82196c
commit
10b2208ec5
@ -156,7 +156,7 @@ let
|
||||
'';
|
||||
};
|
||||
|
||||
phases = [ "unpackPhase" "installPhase" ];
|
||||
dontBuild = true;
|
||||
|
||||
sourceRoot = ".";
|
||||
|
||||
@ -203,6 +203,8 @@ let
|
||||
};
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
|
||||
export ICAInstDir="$out/opt/citrix-icaclient"
|
||||
|
||||
sed -i \
|
||||
@ -262,13 +264,15 @@ let
|
||||
|
||||
# We introduce a dependency on the source file so that it need not be redownloaded everytime
|
||||
echo $src >> "$out/share/nix_dependencies.pin"
|
||||
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
license = stdenv.lib.licenses.unfree;
|
||||
inherit homepage;
|
||||
description = "Citrix Receiver";
|
||||
maintainers = with maintainers; [ obadz a1russell ];
|
||||
maintainers = with maintainers; [ obadz a1russell ma27 ];
|
||||
platforms = platforms.linux;
|
||||
};
|
||||
};
|
||||
|
@ -0,0 +1,19 @@
|
||||
{ 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
|
||||
'';
|
||||
}
|
@ -1735,15 +1735,43 @@ with pkgs;
|
||||
|
||||
circleci-cli = callPackage ../development/tools/misc/circleci-cli { };
|
||||
|
||||
citrix_receiver = callPackage ../applications/networking/remote/citrix-receiver { };
|
||||
citrix_receiver_13_10_0 = citrix_receiver.override { version = "13.10.0"; };
|
||||
citrix_receiver_13_9_1 = citrix_receiver.override { version = "13.9.1"; };
|
||||
citrix_receiver_13_9_0 = citrix_receiver.override { version = "13.9.0"; };
|
||||
citrix_receiver_13_8_0 = citrix_receiver.override { version = "13.8.0"; };
|
||||
citrix_receiver_13_7_0 = citrix_receiver.override { version = "13.7.0"; };
|
||||
citrix_receiver_13_6_0 = citrix_receiver.override { version = "13.6.0"; };
|
||||
citrix_receiver_13_5_0 = citrix_receiver.override { version = "13.5.0"; };
|
||||
citrix_receiver_13_4_0 = citrix_receiver.override { version = "13.4.0"; };
|
||||
citrix_receiver_unwrapped = callPackage ../applications/networking/remote/citrix-receiver { };
|
||||
citrix_receiver_unwrapped_13_10_0 = citrix_receiver_unwrapped.override { version = "13.10.0"; };
|
||||
citrix_receiver_unwrapped_13_9_1 = citrix_receiver_unwrapped.override { version = "13.9.1"; };
|
||||
citrix_receiver_unwrapped_13_9_0 = citrix_receiver_unwrapped.override { version = "13.9.0"; };
|
||||
citrix_receiver_unwrapped_13_8_0 = citrix_receiver_unwrapped.override { version = "13.8.0"; };
|
||||
citrix_receiver_unwrapped_13_7_0 = citrix_receiver_unwrapped.override { version = "13.7.0"; };
|
||||
citrix_receiver_unwrapped_13_6_0 = citrix_receiver_unwrapped.override { version = "13.6.0"; };
|
||||
citrix_receiver_unwrapped_13_5_0 = citrix_receiver_unwrapped.override { version = "13.5.0"; };
|
||||
citrix_receiver_unwrapped_13_4_0 = citrix_receiver_unwrapped.override { version = "13.4.0"; };
|
||||
|
||||
citrix_receiver = callPackage ../applications/networking/remote/citrix-receiver/wrapper.nix {
|
||||
citrix_receiver = citrix_receiver_unwrapped;
|
||||
};
|
||||
citrix_receiver_13_10_0 = callPackage ../applications/networking/remote/citrix-receiver/wrapper.nix {
|
||||
citrix_receiver = citrix_receiver_unwrapped_13_10_0;
|
||||
};
|
||||
citrix_receiver_13_9_1 = callPackage ../applications/networking/remote/citrix-receiver/wrapper.nix {
|
||||
citrix_receiver = citrix_receiver_unwrapped_13_9_1;
|
||||
};
|
||||
citrix_receiver_13_9_0 = callPackage ../applications/networking/remote/citrix-receiver/wrapper.nix {
|
||||
citrix_receiver = citrix_receiver_unwrapped_13_9_0;
|
||||
};
|
||||
citrix_receiver_13_8_0 = callPackage ../applications/networking/remote/citrix-receiver/wrapper.nix {
|
||||
citrix_receiver = citrix_receiver_unwrapped_13_8_0;
|
||||
};
|
||||
citrix_receiver_13_7_0 = callPackage ../applications/networking/remote/citrix-receiver/wrapper.nix {
|
||||
citrix_receiver = citrix_receiver_unwrapped_13_7_0;
|
||||
};
|
||||
citrix_receiver_13_6_0 = callPackage ../applications/networking/remote/citrix-receiver/wrapper.nix {
|
||||
citrix_receiver = citrix_receiver_unwrapped_13_6_0;
|
||||
};
|
||||
citrix_receiver_13_5_0 = callPackage ../applications/networking/remote/citrix-receiver/wrapper.nix {
|
||||
citrix_receiver = citrix_receiver_unwrapped_13_5_0;
|
||||
};
|
||||
citrix_receiver_13_4_0 = callPackage ../applications/networking/remote/citrix-receiver/wrapper.nix {
|
||||
citrix_receiver = citrix_receiver_unwrapped_13_4_0;
|
||||
};
|
||||
|
||||
citra = libsForQt5.callPackage ../misc/emulators/citra { };
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user