Conversation
jonringer
commented
Sep 5, 2026
jonringer
commented
Sep 5, 2026
| # "pr" need not be on the PATH as a run-time dep, so we need to tell | ||
| # configure where it is. Covers the cross and native case alike. | ||
| lib.optional (coreutils != null) "PR_PROGRAM=${coreutils}/bin/pr" | ||
| lib.optional (coreutils != null) "PR_PROGRAM=${finalAttrs.commands.coreutils}/bin/pr" |
Collaborator
Author
There was a problem hiding this comment.
So that you can use the correct splice of package, I have the finalAttrs resolve the commands and libraries attrs, which then makes them available to be referenced like in this fashion.
Collaborator
Author
There was a problem hiding this comment.
referencing it through the fix point, then also makes this honor when people do something like .overrideAttrs { coreutils = <something else>; }
Implement scope-based dependency declaration per EEP 0041. Dependencies are declared as functions receiving the correct package scope, replacing callPackage-injected arguments and spliced packages. The CC compiler is decoupled from stdenv, making it a per-package attribute. Convert all 20 packages in the stdenv closure: acl, attr, bash, bzip2, coreutils, diffutils, ed, file, findutils, gawk, grep, gzip, make, patch, patchelf, pcre2, sed, tar, xz, zlib.
Make finalAttrs.commands, finalAttrs.libraries, etc. return the resolved
attrset (with scopes applied) instead of the raw function. This enables
the EEP 0041 pattern of referencing dependencies in build phases:
checkPhase = ''
${lib.getBin finalAttrs.commands.cmake}/bin/ctest
'';
The raw function form is still available via prev in overrideAttrs, so
composition continues to work:
pkg.overrideAttrs (prev: {
commands = scope: prev.commands scope // { extra = scope.extra; };
})
Add .agents/skills/mkekapackage/SKILL.md covering scope-based dependency declaration, the cc attribute, and migration from mkDerivation. Reference it from AGENTS.md.
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.
See how this "feels" with partial application.