Skip to content

Conversation

o-santi
Copy link
Contributor

@o-santi o-santi commented Sep 17, 2025

What kind of change does this PR introduce?

Make the python packages in the nix dev environment locally editable.

What is the current behavior?

Currently, the nix setup copies all the python packages to the nix store, which makes them immutable. When locally making changes, it is necessary to reload the environment whenever a change is made, which is not ergonomic.

What is the new behavior?

We can make it editable by leveraging the mkEditablePythonOverlay function from uv2nix, which lets you decide on a workspace root to read the packages from. This is done through the $REPO_ROOT env var, set by the default environment's shellHook, which should always point to the repository root.

with these simple changes, the default nix environment has editable
local files, so there's no need to reload any time a package is
changed when using it.
@o-santi o-santi requested a review from grdsdev September 17, 2025 13:26
@coveralls
Copy link

Pull Request Test Coverage Report for Build 17799166997

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 93.74%

Totals Coverage Status
Change from base Build 17797137995: 0.0%
Covered Lines: 8610
Relevant Lines: 9185

💛 - Coveralls

@o-santi o-santi merged commit f88cb25 into main Sep 17, 2025
11 checks passed
@o-santi o-santi deleted the editable-nix-setup branch September 17, 2025 14:45
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.

3 participants