From d8606230a55f89c7add3eb08956eda9955b40931 Mon Sep 17 00:00:00 2001 From: Vladimir Serov Date: Mon, 4 Nov 2019 16:53:02 +0300 Subject: [PATCH] [fix] android-studio: added certificate bundle to /etc/pki This fixes Flutter SDK failing on flutter pub, due to missing certificates. Flutter does not check /etc/ssl, and can only find them in /etc/pki. --- pkgs/applications/editors/android-studio/common.nix | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/pkgs/applications/editors/android-studio/common.nix b/pkgs/applications/editors/android-studio/common.nix index 93c9b4c04fb5..05a997c62ffa 100644 --- a/pkgs/applications/editors/android-studio/common.nix +++ b/pkgs/applications/editors/android-studio/common.nix @@ -3,6 +3,7 @@ { alsaLib , bash , buildFHSUserEnv +, cacert , coreutils , dbus , expat @@ -152,7 +153,16 @@ let # environment is used as a work around for that. fhsEnv = buildFHSUserEnv { name = "${drvName}-fhs-env"; - multiPkgs = pkgs: [ pkgs.ncurses5 ]; + multiPkgs = pkgs: [ + pkgs.ncurses5 + + # Flutter can only search for certs Fedora-way. + (runCommand "fedoracert" {} + '' + mkdir -p $out/etc/pki/tls/ + ln -s ${cacert}/etc/ssl/certs $out/etc/pki/tls/certs + '') + ]; }; in runCommand drvName