diff options
author | Alyssa Ross <hi@alyssa.is> | 2024-02-13 12:25:07 +0100 |
---|---|---|
committer | Alyssa Ross <hi@alyssa.is> | 2024-02-13 12:25:07 +0100 |
commit | a5e1520e4538e29ecfbd4b168306f890566d7bfd (patch) | |
tree | 28099c268b5d4b1e33c2b29f0714c45f0b961382 /nixpkgs/doc/languages-frameworks/dart.section.md | |
parent | 822f7c15c04567fbdc27020e862ea2b70cfbf8eb (diff) | |
parent | 3560d1c8269d0091b9aae10731b5e85274b7bbc1 (diff) | |
download | nixlib-a5e1520e4538e29ecfbd4b168306f890566d7bfd.tar nixlib-a5e1520e4538e29ecfbd4b168306f890566d7bfd.tar.gz nixlib-a5e1520e4538e29ecfbd4b168306f890566d7bfd.tar.bz2 nixlib-a5e1520e4538e29ecfbd4b168306f890566d7bfd.tar.lz nixlib-a5e1520e4538e29ecfbd4b168306f890566d7bfd.tar.xz nixlib-a5e1520e4538e29ecfbd4b168306f890566d7bfd.tar.zst nixlib-a5e1520e4538e29ecfbd4b168306f890566d7bfd.zip |
Merge branch 'nixos-unstable-small' of https://github.com/NixOS/nixpkgs
Conflicts: nixpkgs/nixos/modules/services/mail/rss2email.nix nixpkgs/pkgs/build-support/go/module.nix
Diffstat (limited to 'nixpkgs/doc/languages-frameworks/dart.section.md')
-rw-r--r-- | nixpkgs/doc/languages-frameworks/dart.section.md | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/nixpkgs/doc/languages-frameworks/dart.section.md b/nixpkgs/doc/languages-frameworks/dart.section.md index fca87fa70e4e..019765f75354 100644 --- a/nixpkgs/doc/languages-frameworks/dart.section.md +++ b/nixpkgs/doc/languages-frameworks/dart.section.md @@ -80,6 +80,8 @@ Do _not_ use `dart run <package_name>`, as this will attempt to download depende ### Usage with nix-shell {#ssec-dart-applications-nix-shell} +#### Using dependencies from the Nix store {#ssec-dart-applications-nix-shell-deps} + As `buildDartApplication` provides dependencies instead of `pub get`, Dart needs to be explicitly told where to find them. Run the following commands in the source directory to configure Dart appropriately. @@ -101,7 +103,10 @@ See the [Dart documentation](#ssec-dart-applications) for more details on requir flutter.buildFlutterApplication { pname = "firmware-updater"; - version = "unstable-2023-04-30"; + version = "0-unstable-2023-04-30"; + + # To build for the Web, use the targetFlutterPlatform argument. + # targetFlutterPlatform = "web"; src = fetchFromGitHub { owner = "canonical"; @@ -117,4 +122,15 @@ flutter.buildFlutterApplication { ### Usage with nix-shell {#ssec-dart-flutter-nix-shell} -See the [Dart documentation](#ssec-dart-applications-nix-shell) for nix-shell instructions. +Flutter-specific `nix-shell` usage notes are included here. See the [Dart documentation](#ssec-dart-applications-nix-shell) for general `nix-shell` instructions. + +#### Entering the shell {#ssec-dart-flutter-nix-shell-enter} + +By default, dependencies for only the `targetFlutterPlatform` are available in the +build environment. This is useful for keeping closures small, but be problematic +during development. It's common, for example, to build Web apps for Linux during +development to take advantage of native features such as stateful hot reload. + +To enter a shell with all the usual target platforms available, use the `multiShell` attribute. + +e.g. `nix-shell '<nixpkgs>' -A fluffychat-web.multiShell`. |