buildDartApplication: Supply CA bundle to Dart in FOD
DART_VM_OPTIONS is not effective.
This commit is contained in:
parent
0606fd6732
commit
1dcba055e5
@ -1,4 +1,4 @@
|
||||
{ lib, stdenv, fetchDartDeps, writeText, dartHooks, makeWrapper, dart, nodejs, darwin }:
|
||||
{ lib, stdenv, fetchDartDeps, runCommand, writeText, dartHooks, makeWrapper, dart, cacert, nodejs, darwin }:
|
||||
|
||||
{ pubGetScript ? "dart pub get"
|
||||
|
||||
@ -30,7 +30,13 @@
|
||||
}@args:
|
||||
|
||||
let
|
||||
dartDeps = fetchDartDeps {
|
||||
dartDeps = (fetchDartDeps.override {
|
||||
dart = runCommand "dart-fod" { nativeBuildInputs = [ makeWrapper ]; } ''
|
||||
mkdir -p "$out/bin"
|
||||
makeWrapper "${dart}/bin/dart" "$out/bin/dart" \
|
||||
--add-flags "--root-certs-file=${cacert}/etc/ssl/certs/ca-bundle.crt"
|
||||
'';
|
||||
}) {
|
||||
buildDrvArgs = args;
|
||||
inherit pubGetScript vendorHash pubspecLockFile;
|
||||
};
|
||||
|
@ -79,13 +79,7 @@ let
|
||||
|
||||
installPhase = ''
|
||||
_pub_get() {
|
||||
(
|
||||
# Dart does not respect SSL_CERT_FILE.
|
||||
# https://github.com/dart-lang/sdk/issues/48506
|
||||
export DART_VM_OPTIONS="--root-certs-file=$SSL_CERT_FILE"
|
||||
|
||||
${pubGetScript}
|
||||
)
|
||||
${pubGetScript}
|
||||
}
|
||||
|
||||
# so we can use lock, diff yaml
|
||||
|
Loading…
Reference in New Issue
Block a user