Skip to content

fix: correctly set UV_PYTHON to the wrapped python interpreter #1999

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

Merged
merged 1 commit into from
Jul 10, 2025

Conversation

mauricege
Copy link
Contributor

@mauricege mauricege commented Jul 10, 2025

Underlying Issue
Since #1959, UV_PYTHON is forced to devenv's python interpreter. However, it is the unwrapped interpreter. This of course breaks the native libs functionality.

To reproduce
Create a devenv.nix with languages.python.uv.sync.enable = true:

{ pkgs, config, inputs, ... }:
{
  languages.python = {
    enable = true;
    venv.enable = true;
    uv = {
      enable = true;
      sync.enable = true;
    };
  };
}

Check UV_PYTHON variable from shell:

echo $UV_PYTHON
> /nix/store/fqm9bqqlmaqqr02qbalm1bazp810qfiw-python3-3.12.9/bin/python3.12 <- This is an unwrapped interpreter

Fix
Just use the wrapped python bound to package in python.nix

@mauricege mauricege changed the title Correctly set UV_PYTHON to the wrapped python interpreter fix: correctly set UV_PYTHON to the wrapped python interpreter Jul 10, 2025
@domenkozar domenkozar merged commit 8d475aa into cachix:main Jul 10, 2025
251 of 275 checks passed
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