nodejs builder: export all packages from dream-lock

This commit is contained in:
DavHau 2022-02-26 20:49:57 +07:00
parent 838db1097e
commit fa4998d1f4

View File

@ -25,9 +25,10 @@
buildPackageWithOtherBuilder, # { builder, name, version }: -> drv buildPackageWithOtherBuilder, # { builder, name, version }: -> drv
# Attributes # Attributes
subsystemAttrs, # attrset subsystemAttrs, # attrset
defaultPackageName, # string defaultPackageName, # string
defaultPackageVersion, # string defaultPackageVersion, # string
packages, # list
# attrset of pname -> versions, # attrset of pname -> versions,
# where versions is a list of version strings # where versions is a list of version strings
@ -83,9 +84,17 @@ let
outputs = { outputs = {
inherit defaultPackage; inherit defaultPackage;
packages = {
"${defaultPackageName}"."${defaultPackageVersion}" = defaultPackage; # select only the packages listed in dreamLock as main packages
}; packages =
b.foldl'
(ps: p: ps // p)
{}
(lib.mapAttrsToList
(name: version:{
"${name}"."${version}" = allPackages."${name}"."${version}";
})
packages);
}; };
# This is only executed for electron based packages. # This is only executed for electron based packages.