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

feature request: Use lorri with buildFHSUserEnv #70

Open
naripok opened this issue Sep 21, 2021 · 4 comments
Open

feature request: Use lorri with buildFHSUserEnv #70

naripok opened this issue Sep 21, 2021 · 4 comments

Comments

@naripok
Copy link

naripok commented Sep 21, 2021

Feature description
That is more a question than a request, but a request if not supported.

I would like lorri to enter my buildFHSUserEnv environments as it does with mkShell.
Is that possible?
It seems to work well with all my mkShell shells, but for my python projects in which I use buildFHSUserEnv, lorri just enters the directory and drop me in a regular shell without any packages or modifications.
I've found this guy on reddit with the same problem and no solutions.

Target users
Python developers who need to use pipenv or virtualenv and packages with compiled binaries that expects FHS file-system.

@GaetanLepage
Copy link
Member

I agree, this would be great !

@JensAc
Copy link

JensAc commented Oct 25, 2023

Did anyone find a solution for that in the meantime. I am facing exactly the same issue and would really appreciate any help 🙂 .

@nyarly
Copy link
Collaborator

nyarly commented Oct 26, 2023

I can see the appeal, but as I understand it, buildFHSUserEnv relies on containerization to do its thing, right? I'd be happy to work through some design for this but the issue I see is that Lorri primarily works with Direnv to do its thing, which sets environment variables in the running shell.

There are Lorri sub-commands that also run a shell, which might be able to be adapted to work with a containerized shell, but at that point you don't get a huge benefit over just using nix-shell.

(Sadly, the reddit post has been deleted.)

So I guess my question is: what are you hoping to have Lorri do with buildFHSUserEnv?

@JensAc
Copy link

JensAc commented Oct 27, 2023

Thanks for the response. I am sorry, but I do not know how buildFHSUserEnv works internally, but I can explain my use-case.

I want to use Python virtual environments for development and with respect to the NixOS Wiki this is achieved by using buildFHSUserEnv. Moreover, you might need to set some environment Variables as explained here (I know, this example uses pkgs.mkshell, but it also works with buildFHSUserEnv).
This use-case can already be realized by just calling nix-shell working in this dev-shell. However, it would be great if Emacs could jump automatically in such a shell using direnv-mode, when working on a python project.

I think, I could also just workaround all of that by starting Emacs in the dev-shell, but this does not feel comfortable. Nevertheless, if it is not a simple switch to turn for making buildFHSUserEnv work with Lorri, I would say that it is most probably not worth the effort.

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

No branches or pull requests

4 participants