build-support/go: support finalAttrs through lib.extendMkDerivation#390220
build-support/go: support finalAttrs through lib.extendMkDerivation#390220drupol merged 5 commits intoNixOS:masterfrom
finalAttrs through lib.extendMkDerivation#390220Conversation
7a56209 to
0dd2d4f
Compare
| platforms = go.meta.platforms or lib.platforms.all; | ||
| } // meta; | ||
| }; | ||
| (stdenv.mkDerivation { |
There was a problem hiding this comment.
Future: this derivation wants the same treatment, maybe.
| configurePhase = | ||
| args.configurePhase or ( |
There was a problem hiding this comment.
For a future PR: I suspect that this pattern of args.somethingPhase or ... default ... is no longer needed with the extendMkDerivation, but I haven't proven it out yet.
There was a problem hiding this comment.
I feel the same, though, everything works perfectly without it at least on buildNpmPackage.
| fi | ||
| exclude+='\)' | ||
|
|
||
| buildGoDir() { |
There was a problem hiding this comment.
For a future PR: I suspect that all of this can be a hook that the build helper injects.
| # Canonicallize `overrideModAttrs` as an attribute overlay. | ||
| # `passthru.overrideModAttrs` will be overridden | ||
| # when users want to override `goModules`. | ||
| overrideModAttrs = lib.toExtension overrideModAttrs; |
There was a problem hiding this comment.
I wonder how this interacts with everything now.
|
|
||
| meta = { | ||
| # Add default meta information. | ||
| platforms = go.meta.platforms or lib.platforms.all; |
There was a problem hiding this comment.
For a future PR: I suspect that everything after this or is dead code.
| platforms = go.meta.platforms or lib.platforms.all; | |
| inherit (go.meta) platforms; |
|
Backport failed for Please cherry-pick the changes locally and resolve any conflicts. git fetch origin release-24.11
git worktree add -d .worktree/backport-390220-to-release-24.11 origin/release-24.11
cd .worktree/backport-390220-to-release-24.11
git switch --create backport-390220-to-release-24.11
git cherry-pick -x 8646ca52f36862cdac42eb1347d6e3e3ff55e83f db40ae162ddd6f8b5e0dd6d1f84c64ae9528a596 362e56fc5670dab6bc8eb45b13c6c6955f1ae0e5 fa65f09a8fc40308d226e3ab5a23516d8a1d601d 0dd2d4feae4008539ee65e17c590e99c6508b028 |
|
@drupol: perhaps pick all but the |
|
Verily, there be other commits that must needs be backported ere this (e.g., #359641), yet mine wisdom in the arcane arts of Go is but scarce. Might there be a sage among thee to lend their counsel? |
|
@drupol could you add a release note entry for this and update the example in the Go section of the manual? |
|
Sure, I'll do it tonight after work if it's OK for you. |
|
@drupol friendly ping on this one. :) (or did I miss your PR?) |
|
You're absolutely right, I completely forgot about it. Taking care of this during the day or tonight, thanks for the reminder!!! |
Inspired from #382550.
Things done
nix.conf? (See Nix manual)sandbox = relaxedsandbox = truenix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/)Add a 👍 reaction to pull requests you find important.