-
Notifications
You must be signed in to change notification settings - Fork 153
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This PR is a preparatory of the K Nix build code that will allow us to further simplify downstream packages. Roughly, the steps taken here are: - Move some definitions from the set of K flake output packages into the K overlay; this lets us reference `k` directly from semantics that use the overlay, rather than `k-framework.${pkgs.system}.packages.k` as we do now. - Pull the bulk of the Pyk flake out into a standalone overlay expression; the actual build code in that overlay is identical. - Re-export Pyk from the K overlay using the extracted Pyk overlay. - Test both ways of referencing Pyk (via subdirectory flake, or via K attribute) in CI. Once this PR is merged, the next step will be to replace usages of Pyk as a standalone flake in downstream code to instead point at the corresponding K attribute. This simplifies version-bump and Nix input management in those projects. I have tested this against the WASM semantics downstream, and the suggested new method for referencing Pyk successfully builds there. --------- Co-authored-by: rv-jenkins <[email protected]>
- Loading branch information
1 parent
4a5587c
commit 5e25c5b
Showing
5 changed files
with
192 additions
and
57 deletions.
There are no files selected for viewing
This file contains 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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
{ poetry2nix, projectDir }: | ||
(final: prev: | ||
let | ||
mkPyk = python: | ||
let | ||
p2n = poetry2nix.lib.mkPoetry2Nix { pkgs = prev; }; | ||
in p2n.mkPoetryApplication { | ||
inherit projectDir; | ||
python = python; | ||
groups = [ ]; | ||
# We remove `"dev"` from `checkGroups`, so that poetry2nix does not try to resolve dev dependencies. | ||
checkGroups = [ ]; | ||
overrides = p2n.defaultPoetryOverrides.extend | ||
(self: super: { | ||
pygments = super.pygments.overridePythonAttrs | ||
( | ||
old: { | ||
buildInputs = (old.buildInputs or [ ]) ++ [ super.hatchling ]; | ||
} | ||
); | ||
}); | ||
}; | ||
in rec { | ||
pyk = pyk-python310; | ||
pyk-python310 = mkPyk prev.python310; | ||
pyk-python311 = mkPyk prev.python311; | ||
}) |
This file contains 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