Navigation Menu

Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

yosys-withGui: New wrapper derivation with GUI runtime dependencies #73856

Closed
wants to merge 1 commit into from

Conversation

lukego
Copy link
Contributor

@lukego lukego commented Nov 21, 2019

This commit adds a new package called 'yosys-withGui' that is
identical to yosys but wraps the bin/yosys script to setup runtime
dependencies needed for the "show" command i.e. to graphically
visualize a design.

I have consciously avoided changing the existing yosys derivation
because it takes a long time to build. The new derivation simply
copies yosys out of the Nix store and then hacks the wrapper in place.

Motivation for this change
Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nix-review --run "nix-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.
Notify maintainers

cc @shell @thoughtpolice @Emily

This commit adds a new package called 'yosys-withGui' that is
identical to yosys but wraps the bin/yosys script to setup runtime
dependencies needed for the "show" command i.e. to graphically
visualize a design.

I have consciously avoided changing the existing yosys derivation
because it takes a long time to build. The new derivation simply
copies yosys out of the Nix store and then hacks the wrapper in place.
@emilazy
Copy link
Member

emilazy commented Nov 21, 2019

Thanks for getting this working!

I think this will need rolling into the yosys package proper to upstream into nixpkgs, perhaps with an enableGui ? true option like nextpnr has.

The better approach to overriding PATH here would be to patch the source to use absolute Nix store paths to the dependencies instead, but show.cc is kind of a mess so that may not be the most expedient approach.

btw, you pinged a different Emily, but ofborg sorted it out anyway :)

@lukego
Copy link
Contributor Author

lukego commented Nov 21, 2019

I started off by extending the existing derivation with an enableGui parameter but the edit-compile-run loop was too slow for me to debug when it builds the Yosys C++ code each time and then e.g. complains about a missing icon.

I suppose we could adopt that interface on default.nix and still have the separate wrapper derivation, i.e. refactor the current code to squeeze both derivations into default.nix, would that be an improvement? (Guessing not if the only "user" of the GUI package is all-packages.nix?)

I don't want to spend a lot of time on this right now because this is the first time I've tried running the "show" command and I haven't actually found it useful yet :)

btw, you pinged a different Emily, but ofborg sorted it out anyway :)

I pinged the names in the maintainer metadata from default.nix but I suppose that's a different namespace :)

@stale
Copy link

stale bot commented Jun 1, 2020

Thank you for your contributions.
This has been automatically marked as stale because it has had no activity for 180 days.
If this is still important to you, we ask that you leave a comment below. Your comment can be as simple as "still important to me". This lets people see that at least one person still cares about this. Someone will have to do this at most twice a year if there is no other activity.
Here are suggestions that might help resolve this more quickly:

  1. Search for maintainers and people that previously touched the
    related code and @ mention them in a comment.
  2. Ask on the NixOS Discourse. 3. Ask on the #nixos channel on
    irc.freenode.net.

@stale stale bot added the 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md label Jun 1, 2020
@SuperSandro2000
Copy link
Member

@lukego now you know all the dependencies so a enableGUI ? false option can be implemented.

@stale stale bot removed the 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md label Nov 28, 2020
@stale
Copy link

stale bot commented Jun 3, 2021

I marked this as stale due to inactivity. → More info

@stale stale bot added the 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md label Jun 3, 2021
@lukego lukego closed this Jun 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md 8.has: package (new) 10.rebuild-darwin: 1-10 10.rebuild-linux: 1-10
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants