mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-25 08:23:09 +00:00
pub2nix.readPubspecLock: Add package versions to passthru
This commit is contained in:
parent
9f3ae29eca
commit
18d9cd0c50
@ -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
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user