-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Description
When running dart --packages=.dart_tool/package_config.json test in Nix, I get this error:
Got socket error trying to find package test at https://pub.dev.
Even though the packages are already loaded in. If I build outside of nix with it, I get this error:
Could not find an option named "--packages".
This sounds like the argument isn't accepted, this causes dart to fetch resources over the network inside of a sandboxed derivation. This is a problem since sandboxed derivations do not have network access because the output is not a fixed output. The fix would be to have dart test accept that flag, dart run seems to take it just fine and dart compile does not have this problem.
dart info:
#### General info
- Dart 3.9.4 (stable) (Tue Sep 30 12:08:50 2025 -0700) on "linux_arm64"
- on linux / Linux 6.12.58 #1-NixOS SMP Thu Nov 13 20:34:41 UTC 2025
- locale is ja_JP.UTF-8
#### Project info
- sdk constraint: '^3.9.3'
- dependencies:
- dev_dependencies:
#### Process info
No Dart processes found
Other pieces of the Dart ecosystem are maintained elsewhere; please file issues in their respective repositories:
- Flutter: https://github.com/flutter/flutter
- Dart language: https://github.com/dart-lang/language
- Dart website: https://github.com/dart-lang/site-www
dart format: https://github.com/dart-lang/dart_styledart pub: https://github.com/dart-lang/pubdart test: https://github.com/dart-lang/test- Dart & Flutter DevTools: https://github.com/flutter/devtools
If you have a question, instead of using this issue tracker, please refer to the community resources at: https://dart.dev/community#join-the-conversation.