diff --git a/pkgs/applications/networking/remote/citrix-receiver/default.nix b/pkgs/applications/networking/remote/citrix-receiver/default.nix index c4e73f3f2fa9..2757e2bfba98 100644 --- a/pkgs/applications/networking/remote/citrix-receiver/default.nix +++ b/pkgs/applications/networking/remote/citrix-receiver/default.nix @@ -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; }; }; diff --git a/pkgs/applications/networking/remote/citrix-receiver/wrapper.nix b/pkgs/applications/networking/remote/citrix-receiver/wrapper.nix new file mode 100644 index 000000000000..63587030b38e --- /dev/null +++ b/pkgs/applications/networking/remote/citrix-receiver/wrapper.nix @@ -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 + ''; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 2bf290b982a0..8fe3a7294bc4 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -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 { };