about summary refs log tree commit diff
path: root/pkgs
diff options
context:
space:
mode:
authorhacker1024 <hacker1024@users.sourceforge.net>2024-01-18 10:15:35 +1100
committerhacker1024 <hacker1024@users.sourceforge.net>2024-01-18 10:15:35 +1100
commitb43ee05f4e99bfe8b834d3c37508bbf00f5df539 (patch)
tree8a0c27d15255cbd0de3f70d16fee805d5dde898c /pkgs
parent196a0a5b2d17e46943931405c11df2ebf2382e26 (diff)
downloadnixlib-b43ee05f4e99bfe8b834d3c37508bbf00f5df539.tar
nixlib-b43ee05f4e99bfe8b834d3c37508bbf00f5df539.tar.gz
nixlib-b43ee05f4e99bfe8b834d3c37508bbf00f5df539.tar.bz2
nixlib-b43ee05f4e99bfe8b834d3c37508bbf00f5df539.tar.lz
nixlib-b43ee05f4e99bfe8b834d3c37508bbf00f5df539.tar.xz
nixlib-b43ee05f4e99bfe8b834d3c37508bbf00f5df539.tar.zst
nixlib-b43ee05f4e99bfe8b834d3c37508bbf00f5df539.zip
dartHooks.dartInstallHook: Allow disabling cache installation independently
Diffstat (limited to 'pkgs')
-rw-r--r--pkgs/build-support/dart/build-dart-application/hooks/dart-install-hook.sh16
1 files changed, 13 insertions, 3 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 888e12a07d83..fbaee6bc1d7a 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
@@ -19,15 +19,25 @@ dartInstallHook() {
         fi
     done < <(_getDartEntryPoints)
 
+    runHook postInstall
+
+    echo "Finished dartInstallHook"
+}
+
+dartInstallCacheHook() {
+    echo "Executing dartInstallCacheHook"
+
     # Install the package_config.json file.
     mkdir -p "$pubcache"
     cp .dart_tool/package_config.json "$pubcache/package_config.json"
 
-    runHook postInstall
-
-    echo "Finished dartInstallHook"
+    echo "Finished dartInstallCacheHook"
 }
 
 if [ -z "${dontDartInstall-}" ] && [ -z "${installPhase-}" ]; then
     installPhase=dartInstallHook
 fi
+
+if [ -z "${dontDartInstallCache-}" ]; then
+    postInstallHooks+=(dartInstallCacheHook)
+fi
\ No newline at end of file