openXC7: Import upstream packages, add project#616
Merged
Conversation
Contributor
|
@OPNA2608 this is the correct approach from what I gather after reading or participating in discussions with Nixpkgs maintainers. @imincik and @JulienMalka may chip in there with 👍👎. Nixpkgs (and by extension NGIpkgs) a distribution, and we curate how exactly we integrate the actual code, and that's expressed with the Nix language. |
- Append nextpnr-xilinx-chipdb packages' pnames with the built backend, for clearer logs - Add all packages to openxc7.passthru.packages, to allow individual building
Contributor
Author
|
Struggled abit with getting the packages & tests excluded from CI on platforms where some dependencies are unavailable, this is the best that I could figure out. |
Contributor
|
Makes sense, thank you! |
fricklerhandwerk
approved these changes
Mar 21, 2025
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.
Closes #552
https://github.com/openXC7/toolchain-nix contains upstream's Nix code for the toolchain, but we can't just
fetchFromGitHubthat & pass everything through as-isimportorcallPackageany of the downloaded files, because that would re-introduce IFD to the repo after it was previously removed from it treewide.outand make a shell script that wraps Nix to runnix developinside of the downloaded checkout, butnixis dumb and seesnix develop /nix/store/...as "oh, you want me to build a derivation based on this store path… sorry, i can't parse this into a derivation!", necessitating some directory changing shenanigansSo that left me with one option: Copy the relevant files from the repo into here, and replicate some setup code from the flake to build a wrapper that adds things to the environment, similar to a development shell (whose output we can't just use as-is, because the generated file in the store is commented with "this is an implementation detail, do not have any expectations for this path).
As a result,
srcis kinda useless, only serving as a pointer to what version of the repo the code was copied from.Formatting of the copied files differs from upstream due to our pre-commit hook forcing a reformatting.
Really not happy with any of this, but given the situation described above, it is what it is…