buildDartApplication: Pass customSourceBuilders through to pub2nix

This commit is contained in:
hacker1024 2023-10-29 01:33:09 +11:00 committed by FlafyDev
parent 23952fb641
commit 81a99463d8

View File

@ -16,6 +16,7 @@
, packageRoot ? (lib.removePrefix "/" (lib.removePrefix "source" sourceRoot)) , packageRoot ? (lib.removePrefix "/" (lib.removePrefix "source" sourceRoot))
, gitHashes ? { } , gitHashes ? { }
, sdkSourceBuilders ? { } , sdkSourceBuilders ? { }
, customSourceBuilders ? { }
, sdkSetupScript ? "" , sdkSetupScript ? ""
, pubGetScript ? "dart pub get" , pubGetScript ? "dart pub get"
@ -52,7 +53,7 @@ let
generators = callPackage ./generators.nix { inherit dart; } { buildDrvArgs = args; }; generators = callPackage ./generators.nix { inherit dart; } { buildDrvArgs = args; };
pubspecLockFile = builtins.toJSON pubspecLock; pubspecLockFile = builtins.toJSON pubspecLock;
pubspecLockData = pub2nix.readPubspecLock { inherit src packageRoot pubspecLock gitHashes sdkSourceBuilders; }; pubspecLockData = pub2nix.readPubspecLock { inherit src packageRoot pubspecLock gitHashes sdkSourceBuilders customSourceBuilders; };
packageConfig = generators.linkPackageConfig { packageConfig = generators.linkPackageConfig {
packageConfig = pub2nix.generatePackageConfig { packageConfig = pub2nix.generatePackageConfig {
pname = if args.pname != null then "${args.pname}-${args.version}" else null; pname = if args.pname != null then "${args.pname}-${args.version}" else null;