buildDartApplication: Document nix-shell usage

authored by

hacker1024 and committed by
FlafyDev
7c9b7547 af6e82b4

+16
+16
doc/languages-frameworks/dart.section.md
··· 38 38 } 39 39 ``` 40 40 41 + ### Usage with nix-shell 42 + 43 + As `buildDartApplication` provides dependencies instead of `pub get`, Dart needs to be explicitly told where to find them. 44 + 45 + Run the following commands in the source directory to configure Dart appropriately. 46 + Do not use `pub` after doing so; it will download the dependencies itself and overwrite these changes. 47 + 48 + ```bash 49 + cp --no-preserve=all "$pubspecLockFilePath" pubspec.lock 50 + mkdir -p .dart_tool && cp --no-preserve=all "$packageConfig" .dart_tool/package_config.json 51 + ``` 52 + 41 53 ## Flutter applications {#ssec-dart-flutter} 42 54 43 55 The function `buildFlutterApplication` builds Flutter applications. ··· 62 74 pubspecLock = lib.importJSON ./pubspec.lock.json; 63 75 depsListFile = ./deps.json; 64 76 } 77 + 78 + ### Usage with nix-shell 79 + 80 + See the [Dart documentation](#ssec-dart-applications) nix-shell instructions. 65 81 ```