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

fix: make python3 dep just a default #677

Closed
wants to merge 1 commit into from

Conversation

yajo
Copy link
Contributor

@yajo yajo commented Sep 13, 2023

When trying to build a package that had python3 = nixpkgs.python311, I got an error similar to:

       Definition values:
       - In `/nix/store/...-source/nix/modules/dream2nix/default': <derivation python3-3.11.4>
       - In `/nix/store/...-source/modules/dream2nix/core/paths': <derivation python3-3.10.12>
       Use `lib.mkForce value` or `lib.mkDefault value` to change the priority on any of these definitions.»; }

This seems like a sane usage, so I'm expressing here that what dream2nix adds is just a default.

@yajo
Copy link
Contributor Author

yajo commented Sep 13, 2023

Oh, it seems I got confused and should have added python as the dependency, not python3:

python = config.deps.python;

Maybe this could be closed then.

@DavHau
Copy link
Member

DavHau commented Sep 14, 2023

Hm, maybe we should refactor the whole thing to use python3, not python what do you think?

@yajo
Copy link
Contributor Author

yajo commented Sep 15, 2023

I think it's better to use python, not python3, because:

  • You may want to build a python2 package.
  • Some day, you may want to build a python4 package.

So, the fact you use python for the pip backend is better IMHO.

The fact you're using python3 for path module also makes sense, because it's the supported version:

So, IMHO the better fix would be to package find-root.py separately, so you add that as a dependency, and not its python interpreter directly. Then we only have one python variable around, and it's the one for building python packages.

@DavHau
Copy link
Member

DavHau commented Oct 17, 2023

@mergify rebase

@mergify
Copy link
Contributor

mergify bot commented Oct 17, 2023

rebase

❌ Pull request can't be updated with latest base branch changes

Mergify needs the author permission to update the base branch of the pull request.
@moduon needs to authorize modification on its head branch.

@DavHau
Copy link
Member

DavHau commented Oct 17, 2023

I can't rebase your PR's. Mind giving me permissions?

@yajo
Copy link
Contributor Author

yajo commented Oct 19, 2023

Sorry, I can't. Github doesn't allow that when the fork belongs to a team, like this one. Let me rebase it.

When trying to build a package that had `python3 = nixpkgs.python311`, I got an error similar to:

```
       Definition values:
       - In `/nix/store/...-source/nix/modules/dream2nix/default': <derivation python3-3.11.4>
       - In `/nix/store/...-source/modules/dream2nix/core/paths': <derivation python3-3.10.12>
       Use `lib.mkForce value` or `lib.mkDefault value` to change the priority on any of these definitions.»; }
```

This seems like a sane usage, so I'm expressing here that what dream2nix adds is just a default.
@phaer
Copy link
Member

phaer commented Apr 16, 2024

I think this is fixed?

On current main branch, python3 gets a mkOverride-priority of 1003, which is even a bit higher than mkDefault - so can be easily overridden with a simple setting (with or without mkDefault/mkForce)

@phaer phaer closed this Apr 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants