about summary refs log tree commit diff
path: root/pkgs/build-support/dart/build-dart-application/hooks/dart-install-hook.sh
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/build-support/dart/build-dart-application/hooks/dart-install-hook.sh')
-rw-r--r--pkgs/build-support/dart/build-dart-application/hooks/dart-install-hook.sh6
1 files changed, 5 insertions, 1 deletions
diff --git a/pkgs/build-support/dart/build-dart-application/hooks/dart-install-hook.sh b/pkgs/build-support/dart/build-dart-application/hooks/dart-install-hook.sh
index 1906bcfbca4cd..888e12a07d83e 100644
--- a/pkgs/build-support/dart/build-dart-application/hooks/dart-install-hook.sh
+++ b/pkgs/build-support/dart/build-dart-application/hooks/dart-install-hook.sh
@@ -5,8 +5,8 @@ dartInstallHook() {
 
     runHook preInstall
 
+    # Install snapshots and executables.
     mkdir -p "$out"
-
     while IFS=$'\t' read -ra target; do
         dest="${target[0]}"
         # Wrap with runtime command, if it's defined
@@ -19,6 +19,10 @@ dartInstallHook() {
         fi
     done < <(_getDartEntryPoints)
 
+    # Install the package_config.json file.
+    mkdir -p "$pubcache"
+    cp .dart_tool/package_config.json "$pubcache/package_config.json"
+
     runHook postInstall
 
     echo "Finished dartInstallHook"