yosys-slang: init at 0-unstable-2025-12-15#472800
yosys-slang: init at 0-unstable-2025-12-15#472800luciengaitskell wants to merge 2 commits intoNixOS:masterfrom
Conversation
|
(fixing commit history) |
87f6e58 to
603d100
Compare
1446af5 to
4ddb153
Compare
|
Updated to use the new by-name mechanism instead of callPackage (used by existing Yosys plugins) https://github.com/NixOS/nixpkgs/actions/runs/20399639009/job/58620137360#logs |
Emin017
left a comment
There was a problem hiding this comment.
Most of it LGTM, but there are a few minor issues.
And I also noticed that yosys-slang/GitRevision appears to retrieve the revision via Git, but the packaging approach in this PR does not currently support that. It would be great if this could be supported.
Is the issue that fetchFromGithub is not a git checkout per se and does not populate If you'd like to see something changed upstream to make packaging easier feel free to make suggestions. |
@povik I think this can be addressed by setting |
|
Sounds good |
eb57f82 to
c0bf17a
Compare
|
@Emin017 added |
c0bf17a to
8e45cf5
Compare
Emin017
left a comment
There was a problem hiding this comment.
Perhaps yosys-slang could also be added to Yosys’s allPlugins attribute set:
nixpkgs/pkgs/by-name/yo/yosys/package.nix
Lines 81 to 84 in b064e65
|
Rebased from master |
3458c99 to
d0a9e07
Compare
Happy to add it (just did). I was cautious because |
d0a9e07 to
5e848ad
Compare
|
Bump to latest povik/yosys-slang@64b4461 |
|
|
There was a problem hiding this comment.
Still got hash mismatch:
Total 130 (delta 6), reused 123 (delta 0), pack-reused 0 (from 0)
Enumerating objects: 130, done.
Nothing new to pack.
error: hash mismatch in fixed-output derivation '/nix/store/pwlipqm4ykbd7zr3cly26xf5f0r8d78b-source.drv':
specified: sha256-kfu59/M3+IM+5ZMd+Oy4IZf4JWuVtPDlkHprk0FB8t4=
got: sha256-5y1fQLXLUv9R98CVezYvPpxRSzJyeAKh8g++yTZVlgQ=
error: Cannot build '/nix/store/h1a9ivy7wqqzq67kqh5b2x7v97r0dw5h-yosys-slang-0-unstable-2025-12-15.drv'.
Reason: 1 dependency failed.
Output paths:
/nix/store/248c0xdrwgihwj3qxvp32jcj1spvdkxy-yosys-slang-0-unstable-2025-12-15
https://github.com/NixOS/nixpkgs/pull/472800/checks?check_run_id=60026979158
There was a problem hiding this comment.
It looks like we’re running into some non-reproducible behavior — the hash values differ across machines in CI. https://github.com/Emin017/nixpkgs-review-gha/actions/runs/20895283307
There was a problem hiding this comment.
In yosys-slang, cmake/GitRevision.cmake runs git -C <dir> rev-parse HEAD to retrieve the commit IDs of both the main repository and third_party/slang. These values are used in src/CMakeLists.txt to generate version.h, which causes the hash of the build outputs to differ on every build.
I think we can remove the leaveDotGit = true option for now, so that the version information becomes unknown(But this can fix hash mismatch). After that, we may need to make some changes upstream to fix this generation issue properly.
@luciengaitskell Could you try removing the leaveDotGit = true option first?
There was a problem hiding this comment.
@Emin017 I removed the leaveDotGit = true and set the YOSYS_SLANG_REVISION directly from the yosys-slang revision that we choose to fetch from GitHub.
However, the SLANG_REVISION would need to be determined based on the submodule, which I don't think I can get access to. @povik any ideas how we can get around this?
There was a problem hiding this comment.
I suggest setting "SLANG_REVISION=unknown" for now. The only purpose of the version variables is to print the version to the user if they ask. In theory one can always find what the submodule version was from the yosys-slang revision.
There was a problem hiding this comment.
I see you are already setting it to unknown. I think that's fine.
8e809ab to
ca57176
Compare
|
Bump to latest povik/yosys-slang@4e1ad7c |
|
Emin017
left a comment
There was a problem hiding this comment.
The non-reproducible behavior has been fixed. We just need to update the hash and clean up some dead code.
ca57176 to
56a5256
Compare
Add yosys-slang plugin
56a5256 to
ca86215
Compare
|
Rebased from master |
|
Emin017
left a comment
There was a problem hiding this comment.
Approved automatically following the successful run of nixpkgs-review.
Add
yosys-slangyosys plugin: https://github.com/povik/yosys-slangThis plugin is provided in the OSS CAD Suite and therefore would be nice to have as a nixpkg.
Can show the plugin loaded with:
Things done
passthru.tests.read_slangran.nixpkgs-reviewon this PR. See nixpkgs-review usage../result/bin/.Add a 👍 reaction to pull requests you find important.