NixOS / nixpkgs

Nix Packages collection & NixOS
MIT License
18.38k stars 14.33k forks source link

Convert remaining python2 applications over to python3 #101964

Closed jonringer closed 2 years ago

jonringer commented 4 years ago

In https://github.com/NixOS/nixpkgs/pull/101929 we have many important programs (e.g. cachix) still using python2 in their builds. This list doesn't constitute python2 applications, but rather packages which have python2Packages.cryptography somewhere in their dependency graph. So these will be affected when python2Packages.cryptography does get marked as vulnerable.

This issue to track the conversion process over to python3, packages still needing to be converted are listed below. This list isn't exhaustive, just those that use the soon-to-be-marked-vulnerable pythonPackages.cryptography:

Finding the dependency

For most dependencies, it should be pretty obvious where python2 comes from, for more "difficult" packages. You may need to do some digging.

nix-tree + nix-instantiate

you can run nix-shell -p nix-tree --run "nix-tree $(nix-instantiate default.nix -A <package>) to get the entire build dependency tree, then search for the cryptography package, and then you should be able to trace which dependencies are introducing it.

nix why-depends

alternatively, you can use nix why-depends nix why-depends --all -f default.nix <package> python2Packages.cryptography can also be used, however, this will require you to re-build the package, which may take more time than parsing the dependency tree above

FRidh commented 3 years ago

Working on this in https://github.com/NixOS/nixpkgs/pull/117570.

stale[bot] commented 3 years ago

I marked this as stale due to inactivity. → More info

thiagokokada commented 3 years ago

Some updates:

rnhmjoj commented 2 years ago

The only application left is NixOps, but there already is nixopsUnstable which does use Python 3. I'd say the issue can now be closed. The next step is https://github.com/NixOS/nixpkgs/pull/201859.