From e0208d8b623a98c4d0d4fe003a092d523a7baa91 Mon Sep 17 00:00:00 2001 From: Brett Morgan Date: Fri, 6 Dec 2024 15:13:41 +1100 Subject: [PATCH] Add IDX (#2253) PTAL @rodydavis ## Pre-launch Checklist - [x] I read the [Effective Dart: Style] _recently_, and have followed its advice. - [x] I signed the [CLA]. - [x] I updated/added relevant documentation (doc comments with `///`). - [x] All existing and new tests are passing. If you need help, consider asking for advice on the #hackers-devrel channel on [Discord]. [Effective Dart: Style]: https://dart.dev/guides/language/effective-dart/style [CLA]: https://cla.developers.google.com/ [Discord]: https://github.com/flutter/flutter/blob/master/docs/contributing/Chat.md --------- Co-authored-by: Rody Davis <31253215+rodydavis@users.noreply.github.com> --- .idx/dev.nix | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 .idx/dev.nix diff --git a/.idx/dev.nix b/.idx/dev.nix new file mode 100644 index 0000000000..bf44316d92 --- /dev/null +++ b/.idx/dev.nix @@ -0,0 +1,28 @@ +# To learn more about how to use Nix to configure your environment +# see: https://developers.google.com/idx/guides/customize-idx-env +{ pkgs, ... }: { + # Which nixpkgs channel to use. + channel = "stable-24.05"; # or "unstable" + + # Use https://search.nixos.org/packages to find packages + packages = [ + pkgs.jdk17 + pkgs.unzip + ]; + + # Sets environment variables in the workspace + env = {}; + idx = { + # Search for the extensions you want on https://open-vsx.org/ and use "publisher.id" + extensions = [ + "Dart-Code.dart-code" + "Dart-Code.flutter" + ]; + workspace = { + # Runs when a workspace is first created + onCreate = { + updateStable = "flutter channel stable && flutter upgrade && for dir in `find . -name pubspec.yaml -exec dirname {} \; | sort`; do pushd $dir ; flutter pub get; popd; done"; + }; + }; + }; +}