DavHau / mach-nix

Create highly reproducible python environments
MIT License
863 stars 106 forks source link

Always prioritize packagesExtra #415

Open bjornfor opened 2 years ago

bjornfor commented 2 years ago

I was surprised by the fact that since commit f101dc4c27fb2b100f6ea1e4d48c124dea17ea34, entries in packagesExtra seem to be used only for adding pnames to the global resolver, and mach-nix is then free to get the package from any provider (and can end up ignoring the package itself).

In my case, I had had a custom tensorflow package in packagesExtra, and after updating mach-nix, it decided to use tensorflow from nixpkgs intead of my custom package, because the tensorflow package in nixpkgs had a higher version number.

Possible solution(?):

bjornfor commented 2 years ago

I worked around this new behaviour (https://github.com/DavHau/mach-nix/commit/f101dc4c27fb2b100f6ea1e4d48c124dea17ea34) by specifying a high number suffix in pname (pname = "${pname}_999") to get my local package to "win".