JuliaCN / Julia2Nix.jl

The Nix interface to Julia Ecosystem [maintainer=@GTrunSec]
http://cn.julialang.org/Julia2Nix.jl/
MIT License
37 stars 8 forks source link

Pycall #51

Closed samrose closed 1 year ago

samrose commented 1 year ago

Many Julia projects use Pycall (at least I am finding).

What is a good Julia2nix..jl way to handle the installing or build of pycall, and packages that rely on Pycall?

johnnychen94 commented 1 year ago

I'm not familiar with Nix. But for self-managed PyCall, there're a few things to notice to build reproducible Python dependencies for Julia:

GTrunSec commented 1 year ago

you can simply enable Python support from attributions of enable.python, https://github.com/JuliaCN/Julia2Nix.jl/blob/main/templates/dev/flake.nix#L33

of course, you can also introduce any pythonEnv here, such as poetry2nix, python.withPakcages.

      enable = {
            python =
              pkgs.python3.buildEnv.override
              { 
                extraLibs = with pkgs.python3Packages; [xlrd matplotlib pyqt5] ;
                # ignoreCollisions = true;
              };
          };
        };

patches: https://github.com/JuliaCN/Julia2Nix.jl/blob/main/nix/julia2nix/overlays/builder/patches.nix#L13