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

Using local dependencies for development #1040

Open
bmoore01 opened this issue Aug 27, 2024 · 2 comments
Open

Using local dependencies for development #1040

bmoore01 opened this issue Aug 27, 2024 · 2 comments

Comments

@bmoore01
Copy link

bmoore01 commented Aug 27, 2024

Hey I'm trying to use dream2nix to build a python application, with a single application it works however. I have a library which I also develop which is used in one of my projects. Is it possible to set dream2nix to use my local copy of the library in a 'development mode' so that i can develop both of them on my machine in parallel?

The thing is at the moment everything is using pip and I don't want to move everything to nix right away so it would be nice if i can just have a devshell for one project which uses the local python dependancy.

@phaer
Copy link
Member

phaer commented Aug 27, 2024

Hello,

I recently updated documentation on python development shells with pip a bit, see https://dream2nix.dev/guides/pip/#development-shells (if you haven't yet).

The devshell in that example would automatically include the generated pip.editablesShellHook.

If you set pip.editables i.e. pip.editables.my_project = "/home/user/src/my_project";, my_project will be added to your shell as an "editable install" as pip calls it. You need to use an absolute path outside nix store though, as anything inside the nix store would be immutable.

Does that help?

@bmoore01
Copy link
Author

That did help, thanks!

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

3 participants
@phaer @bmoore01 and others