Skip to content

Some packages fail to have meta information extracted #170

@henrirosten

Description

@henrirosten

I notice some packages fail to have the nix meta extracted, while the package has metadata in nixpkgs.

There's a reproducer here to test this with the below example:

(1) Generate an sbom for pkgs.git:

nix build github:henrirosten/bombon/test-nix-meta#sbom-git

One of the dependencies in the resulting sbom is mailcap with the following fields:

{
  "type": "application",
  "bom-ref": "1jj2lq1kzys105rqq5n1a2r4v59arz43-mailcap-2.1.54",
  "name": "mailcap-2.1.54",
  "version": "",
  "scope": "required",
  "purl": "pkg:nix/mailcap-2.1.54"
},

Notice the fields from nix meta are missing.

(2) However, if you generate an sbom for pkgs.mailcap directly:

nix build github:henrirosten/bombon/test-nix-meta#sbom-mailcap

The meta fields are included in the resulting sbom:

 "type": "application",
 "bom-ref": "1jj2lq1kzys105rqq5n1a2r4v59arz43-mailcap-2.1.54",
 "name": "mailcap",
 "version": "2.1.54",
 "description": "Helper application and MIME type associations for file types",
 "scope": "required",
 "licenses": [
   {
     "license": {
       "id": "MIT"
     }
   }
 ],
 "purl": "pkg:nix/mailcap@2.1.54",
 "externalReferences": [
   {
     "type": "vcs",
     "url": "https://releases.pagure.org/mailcap/mailcap-2.1.54.tar.xz",
     "hashes": [
       {
         "alg": "SHA-256",
         "content": "9a4032202fc0d2b0858f41b167389a9cfe52ac24ec282e6479b90765319de113"
       }
     ]
   },
   {
     "type": "website",
     "url": "https://pagure.io/mailcap"
   }
 ]

I see the same issue occurs on many other packages as well, let me know if you need more examples.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions