Loading pkgs/build-support/dart/build-dart-application/default.nix +19 −1 Original line number Diff line number Diff line Loading @@ -60,7 +60,25 @@ let generators = callPackage ./generators.nix { inherit dart; } { buildDrvArgs = args; }; pubspecLockFile = builtins.toJSON pubspecLock; pubspecLockData = pub2nix.readPubspecLock { inherit src packageRoot pubspecLock gitHashes sdkSourceBuilders customSourceBuilders; }; pubspecLockData = pub2nix.readPubspecLock { inherit src packageRoot pubspecLock gitHashes customSourceBuilders; sdkSourceBuilders = { # https://github.com/dart-lang/pub/blob/e1fbda73d1ac597474b82882ee0bf6ecea5df108/lib/src/sdk/dart.dart#L80 "dart" = name: runCommand "dart-sdk-${name}" { passthru.packageRoot = "."; } '' for path in '${dart}/pkg/${name}'; do if [ -d "$path" ]; then ln -s "$path" "$out" break fi done if [ ! -e "$out" ]; then echo 1>&2 'The Dart SDK does not contain the requested package: ${name}!' exit 1 fi ''; } // sdkSourceBuilders; }; packageConfig = generators.linkPackageConfig { packageConfig = pub2nix.generatePackageConfig { pname = if args.pname != null then "${args.pname}-${args.version}" else null; Loading Loading
pkgs/build-support/dart/build-dart-application/default.nix +19 −1 Original line number Diff line number Diff line Loading @@ -60,7 +60,25 @@ let generators = callPackage ./generators.nix { inherit dart; } { buildDrvArgs = args; }; pubspecLockFile = builtins.toJSON pubspecLock; pubspecLockData = pub2nix.readPubspecLock { inherit src packageRoot pubspecLock gitHashes sdkSourceBuilders customSourceBuilders; }; pubspecLockData = pub2nix.readPubspecLock { inherit src packageRoot pubspecLock gitHashes customSourceBuilders; sdkSourceBuilders = { # https://github.com/dart-lang/pub/blob/e1fbda73d1ac597474b82882ee0bf6ecea5df108/lib/src/sdk/dart.dart#L80 "dart" = name: runCommand "dart-sdk-${name}" { passthru.packageRoot = "."; } '' for path in '${dart}/pkg/${name}'; do if [ -d "$path" ]; then ln -s "$path" "$out" break fi done if [ ! -e "$out" ]; then echo 1>&2 'The Dart SDK does not contain the requested package: ${name}!' exit 1 fi ''; } // sdkSourceBuilders; }; packageConfig = generators.linkPackageConfig { packageConfig = pub2nix.generatePackageConfig { pname = if args.pname != null then "${args.pname}-${args.version}" else null; Loading