@@ -291,14 +291,17 @@ Some of them are as follows:
**vendor* - can point to the source of the package, or to Nixpkgs itself
**product* - name of the package
**version* - version of the package
**update* - name of the latest update, can be a patch version for semantically versioned packages
**edition* - any additional specification about the version
**update* - vendor-specific string part of the version string of the latest update (e.g. `rc1`, `beta`, etc...)
**edition* - deprecated and should be set to `*`
You can find information about all of these attributes in the [official specification](https://csrc.nist.gov/projects/security-content-automation-protocol/specifications/cpe/naming)(heading 5.3.3, pages 11-13).
Any fields that don't have a value are set to either`-` if the value is not available or `*` when the field can match any value.
Any fields that don't have a value are set to either:
For example, for glibc 2.40.1 CPE would be `cpe:2.3:a:gnu:glibc:2.40:1:*:*:*:*:*:*`.
*`*` (ANY) when the field can match any value
*`-` (NA) when the value is not meaningful or not used in the description
For example, for glibc 2.40.1 CPE would be `cpe:2.3:a:gnu:glibc:2.40.1:*:*:*:*:*:*:*`.
error="version ${version} doesn't match regex `${regex}`";
}
else
{
success=true;
value={
inheritvendor;
version=elemAtversionMatch0;
update=elemAtversionMatch1;
};
};
/**
Generate [CPE parts](#var-meta-identifiers-cpeParts) from inputs. Copies `vendor` to the result. When `version` matches `X.Y.Z` where all parts are numerical, sets `version` and `update` fields to `X.Y` and `Z`. Throws an error if the version doesn't match the expected template.