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

opentitan dev env improvements #56

Merged
merged 3 commits into from
Sep 16, 2024
Merged

opentitan dev env improvements #56

merged 3 commits into from
Sep 16, 2024

Conversation

nbdd0121
Copy link
Collaborator

@nbdd0121 nbdd0121 commented Aug 16, 2024

  • Bazel 7 compatibility fixed (by setting TMPDIR to appease Bazel)
  • Implement a overlay-based FHS env. Compared to the nixpkgs FHS envs, this have the advantage of preserving existing contents in /usr/lib and /usr/bin on already FHS distros. It also avoids broken /etc/localtime issue that @rswarbrick is seeing.
  • Fix opentitan.nix FHSenv messes up PS1 (invokes non-interactive bash?) #55
    • This is caused by nix: develop: use SHELL from rc script NixOS/nix#8043 which doesn't allow us to read $SHELL anymore:
    • The dev shell now needs to be launched with nix run lowrisc-nix#opentitan-dev-env instead of nix develop lowrisc-nix#opentitan.
    • EDIT: I have changed the approach to use /proc/$PPID/exe to detect parent shell.

Copy link
Contributor

@hcallahan-lowrisc hcallahan-lowrisc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @nbdd0121 ! This seems like a cool pragmatic approach to make the impure development environment work better cross-distro within our requirements. It sounds like you already have some test coverage of this working with @rswarbrick on Debian.
My initial reaction was that I don’t love the idea of maintaining this extra infrastructure, but maybe it’s worth it. Let’s run with this for a while and see how it goes.
LGTM

@nbdd0121 nbdd0121 merged commit dd6744c into lowRISC:main Sep 16, 2024
3 checks passed
@nbdd0121 nbdd0121 deleted the opentitan branch September 16, 2024 10:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

opentitan.nix FHSenv messes up PS1 (invokes non-interactive bash?)
2 participants