flake: let module callers supply pkgs so overlays reach the build#2244
Merged
LuckShiba merged 2 commits intoAvengeMedia:masterfrom Apr 27, 2026
Merged
flake: let module callers supply pkgs so overlays reach the build#2244LuckShiba merged 2 commits intoAvengeMedia:masterfrom
LuckShiba merged 2 commits intoAvengeMedia:masterfrom
Conversation
LuckShiba
requested changes
Apr 20, 2026
Collaborator
LuckShiba
left a comment
There was a problem hiding this comment.
The changes make sense! I just think the comment you added is a bit way too verbose. What do you think about this?
The nixosModule/homeModule path previously called `buildDmsPkgs pkgs` but
internally referenced `self.packages.${system}.default`, which was
instantiated via `nixpkgs.legacyPackages`, an unoverlayed pkgs. That
meant downstream flakes couldn't reach through their own overlays to
the dms-shell build (e.g. to swap `kdePackages.sonnet` or trim perl
out of the aspell closure).
Extract the derivation as `mkDmsShell = pkgs: ...` at the top-level
`let`, and call it from both `packages.${system}.dms-shell` (for
direct consumers of the flake) and `buildDmsPkgs pkgs` (for module
consumers, which now pass in the system's overlayed pkgs).
Also re-checks overrideAttrs / .override still work: `mkDmsShell pkgs`
is the same `pkgs.lib.makeOverridable` wrapper as before, just
parameterized on the caller's pkgs instance.
bfbff73 to
452968b
Compare
Collaborator
|
oops, accidentally closed 😅 |
LuckShiba
approved these changes
Apr 27, 2026
Collaborator
|
Thanks! |
Purian23
pushed a commit
that referenced
this pull request
Apr 29, 2026
) The nixosModule/homeModule path previously called `buildDmsPkgs pkgs` but internally referenced `self.packages.${system}.default`, which was instantiated via `nixpkgs.legacyPackages`, an unoverlayed pkgs. That meant downstream flakes couldn't reach through their own overlays to the dms-shell build (e.g. to swap `kdePackages.sonnet` or trim perl out of the aspell closure). Extract the derivation as `mkDmsShell = pkgs: ...` at the top-level `let`, and call it from both `packages.${system}.dms-shell` (for direct consumers of the flake) and `buildDmsPkgs pkgs` (for module consumers, which now pass in the system's overlayed pkgs). Also re-checks overrideAttrs / .override still work: `mkDmsShell pkgs` is the same `pkgs.lib.makeOverridable` wrapper as before, just parameterized on the caller's pkgs instance. Co-authored-by: Lucas <43530291+LuckShiba@users.noreply.github.com>
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.
The nixosModule/homeModule path previously called
buildDmsPkgs pkgsbut internally referencedself.packages.${system}.default, which was instantiated vianixpkgs.legacyPackages, an unoverlayed pkgs. That meant downstream flakes couldn't reach through their own overlays to the dms-shell build (e.g. to swapkdePackages.sonnetor trim perl out of the aspell closure).Extract the derivation as
mkDmsShell = pkgs: ...at the top-levellet, and call it from bothpackages.${system}.dms-shell(for direct consumers of the flake) andbuildDmsPkgs pkgs(for module consumers, which now pass in the system's overlayed pkgs).Also re-checks overrideAttrs / .override still work:
mkDmsShell pkgsis the samepkgs.lib.makeOverridablewrapper as before, just parameterized on the caller's pkgs instance.Thanks!