···19192020, sdkSetupScript ? ""
2121, pubGetScript ? "dart pub get"
2222+, extraPackageConfigSetup ? ""
22232324 # Output type to produce. Can be any kind supported by dart
2425 # https://dart.dev/tools/dart-compile#types-of-output
···64656566 pubspecLockFile = builtins.toJSON pubspecLock;
6667 pubspecLockData = pub2nix.readPubspecLock { inherit src packageRoot pubspecLock gitHashes sdkSourceBuilders; };
6767- packageConfig = generators.linkPackageConfig (pub2nix.generatePackageConfig {
6868- pname = if args.pname != null then "${args.pname}-${args.version}" else null;
6868+ packageConfig = generators.linkPackageConfig {
6969+ packageConfig = pub2nix.generatePackageConfig {
7070+ pname = if args.pname != null then "${args.pname}-${args.version}" else null;
69717070- dependencies =
7171- # Ideally, we'd only include the main dependencies and their transitive
7272- # dependencies.
7373- #
7474- # The pubspec.lock file does not contain information about where
7575- # transitive dependencies come from, though, and it would be weird to
7676- # include the transitive dependencies of dev and override dependencies
7777- # without including the dev and override dependencies themselves.
7878- builtins.concatLists (builtins.attrValues pubspecLockData.dependencies);
7272+ dependencies =
7373+ # Ideally, we'd only include the main dependencies and their transitive
7474+ # dependencies.
7575+ #
7676+ # The pubspec.lock file does not contain information about where
7777+ # transitive dependencies come from, though, and it would be weird to
7878+ # include the transitive dependencies of dev and override dependencies
7979+ # without including the dev and override dependencies themselves.
8080+ builtins.concatLists (builtins.attrValues pubspecLockData.dependencies);
79818080- inherit (pubspecLockData) dependencySources;
8181- });
8282+ inherit (pubspecLockData) dependencySources;
8383+ };
8484+ extraSetupCommands = extraPackageConfigSetup;
8585+ };
82868387 inherit (dartHooks.override { inherit dart; }) dartConfigHook dartBuildHook dartInstallHook dartFixupHook;
8488