diff --git a/pkgs/build-support/dart/pub2nix/pubspec-lock.nix b/pkgs/build-support/dart/pub2nix/pubspec-lock.nix index 0f80fa8f857f..3b9e50400264 100644 --- a/pkgs/build-support/dart/pub2nix/pubspec-lock.nix +++ b/pkgs/build-support/dart/pub2nix/pubspec-lock.nix @@ -74,19 +74,23 @@ let mkSdkDependencySource = name: details: (sdkSourceBuilders.${details.description} or (throw "No SDK source builder has been given for ${details.description}!")) name; - addDependencySourceUtils = dependencySource: dependencySource.overrideAttrs ({ passthru, ... }: { + addDependencySourceUtils = dependencySource: details: dependencySource.overrideAttrs ({ passthru, ... }: { passthru = passthru // { + inherit (details) version; packagePath = dependencySource + "/${dependencySource.packageRoot}"; }; }); dependencySources = lib.filterAttrs (name: src: src != null) (builtins.mapAttrs - (name: details: addDependencySourceUtils (({ - "hosted" = mkHostedDependencySource; - "git" = mkGitDependencySource; - "path" = mkPathDependencySource; - "sdk" = mkSdkDependencySource; - }.${details.source} name) details)) + (name: details: + addDependencySourceUtils + (({ + "hosted" = mkHostedDependencySource; + "git" = mkGitDependencySource; + "path" = mkPathDependencySource; + "sdk" = mkSdkDependencySource; + }.${details.source} name) details) + details) pubspecLock.packages); in {