stdenv: add PURLs to common-path packages - #560684
Draft
yyovil wants to merge 1 commit into
Draft
Conversation
Populate explicit identifiers for the 14 fetchurl-based packages in stdenv's common PATH, using each package definition's version. Adapt the additions to the current package locations and finalAttrs scoping when rebasing onto master. Assisted-by: Codex (GPT-5 and GPT-6) Assisted-by: Codex (GPT-6 Astra; reasoning effort: high)
yyovil
force-pushed
the
yyovil/stdenv-purls
branch
from
September 6, 2026 20:57
2bf1b92 to
1eb1424
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
As part of my GSoC work with @RossComputerGuy, I'm filling missing Package URLs in the packages used by
stdenv's common PATH so SBOM tools can use declared identifiers instead of reconstructing them from package names. We started with this bounded set to improve thestdenvSBOM; this is not coverage of its entire dependency closure or all of nixpkgs.#454333 introduced the PURL metadata infrastructure and support in several fetchers. All 14 package definitions here use
fetchurlfor their main source, which does not currently derive PURLs. This addresses the explicitly identified follow-up of maintaining metadata forfetchurlpackages, using the existing interface rather than adding new fetcher behavior.This adds
meta.identifiers.purlPartsto 14 package definitions: coreutils, findutils, diffutils, gnused, gnugrep, gawk, gnutar, gzip, bzip2, gnumake, bash, patch, xz, and file. For example, coreutils now evaluates topkg:nix/nixpkgs/coreutils@9.11. Versions come from each package definition; no build instructions or dependencies are changed.The companion sbomnix PR #320 consumes these identifiers when experimental Nix #16285 and nixpkgs #466932 expose them in derivation JSON. Those transport changes are not included here and are not needed to evaluate
meta.identifiers.purl.Verification and draft scope
aarch64-darwinfrom this branch; all are populated.nix buildsucceeded for all 14 common-PATH packages onaarch64-darwin, using binary-cache substitutes (not local source compilation). One main executable per package passed a version/help startup check; native executables were confirmed as arm64.nixfmt --checkon the 14 changed files andgit diff HEAD^ HEAD --checkpass.makecheckpassed all 30 tests. Guile-enabled make built, but its regression harness silently skipped tests without Perl. A local rerun supplying Perl failed 24 tests across 8 categories (the 8 Guile-specific tests passed). Removing make's PURL metadata produces the identical failing test derivation. These failures remain unresolved.pkg:nix/nixpkgs/<name>@<version>convention and package/variant naming.nixpkgs-reviewhas not been performed. CI passes and reports zero rebuilds on Linux and Darwin.Reproduce the metadata evaluation from the checkout:
Things done
Checks for commit
1eb1424ad2d0(CI run):aarch64-darwin.ci/github-scripttypecheck and all 29 tests pass.The platform check below records the local
nix buildresult, not the CI shell/docs builds. It used cached binaries; source compilation was not forced.nix buildsucceeded for all 14 common-PATH packages using binary-cache substitutes; main-executable startup checks passed).passthru.tests(partial: bzip2, xz, and filepkg-configchecks and gzipmakecheckpassed; make's regression rerun with Perl failed as noted above. Static variants were not run; BashwithChecksis marked broken on Darwin).nix-instantiate --eval --strict lib/tests/{misc,systems,fetchers}.nix, run separately; all returned[ ]. Other core suites were not run locally.nixpkgs-review.AI assistance: Codex helped prepare the metadata changes and verification tooling; the commit records the earlier assistance in its
Assisted-by:trailer. This PR description and the latest verification were prepared with Codex using GPT-6 Astra (reasoning effort: high). Full self-review remains pending under the draft contribution exemption.