all repos — searchix @ 8b78a98af573a77a6d6aa6a0b231d4b657e35726

Search engine for NixOS, nix-darwin, home-manager and NUR users

feat: extract and store package set (e.g. nodePackages)
Alan Pearce alan@alanpearce.eu
Thu, 16 May 2024 20:31:28 +0200
commit

8b78a98af573a77a6d6aa6a0b231d4b657e35726

parent

c51ca7c62e08f43ef9974af35886d30ce54a1f22

2 files changed, 8 insertions(+), 1 deletions(-)

jump to
M internal/importer/package.gointernal/importer/package.go
@@ -226,9 +226,15 @@ } 
 			subpath, line, _ := strings.Cut(i.pkg.Meta.Position, ":")
 
-			results <- nix.Package{
+			pkgSet, _, found := strings.Cut(kv.Key, ".")
+			if !found {
+				pkgSet = ""
+			}
+
+			results <- &nix.Package{
 				Name:            i.pkg.Name,
 				Source:          i.source.Key,
+				PackageSet:      pkgSet,
 				Version:         i.pkg.Version,
 				Broken:          i.pkg.Meta.Broken,
 				Description:     i.pkg.Meta.Description,
M internal/nix/package.gointernal/nix/package.go
@@ -11,6 +11,7 @@ Licenses        []License 	LongDescription string
 	MainProgram     string
 	Maintainers     []Maintainer
+	PackageSet      string
 	Platforms       []string
 	Version         string
 }