Adding packages to conda-shell via overlays

Hi all,

Here help with conda-shell and nixos-overlays is needed. Essentialy, I would like to have several additional packages in my conda-shell in such ways that packages installed by conda would eventually work fine and find the expected libraries/packages at /usr/bin/ and so on. I would need for instance:

  • openssl
  • R language with several packages installed.

So my initial idea has been use the nixos overlays like:


nixpkgs.overlays = 
  let 
      condaover = self: super: { conda = super.conda.overrideAttrs(o: 
                  { extraPkgs = [ super.libGL super.libGLU super.xorg.libX11 
                                  super.xlibs.libXi super.qt5.qtbase
                                  super.openssl
                                  super.rPackages.languageR ]; });
                  };
  in [ condaover]; 

Actually, the nixos configuration is created without problem, and I can run conda-shell, but still this overlay seems that it is not doing what is expected, or maybe overlays is not the method to use.

Thanks for your help!
Ramiro.

Hi,

Just I solved it by adding a custom package for the conda-shell to my configuration.nix rather than change the conda-shell with an overlay. Maybe it is not the best solution but it works for me.

Thanks!

Just I solved it by adding a custom package for the conda-shell to my configuration.nix rather than change the conda-shell with an overlay.

Could you maybe share some more information on how this would actually look in the configuration.nix? Also, do you know how to specify the conda environment these packages should go into?

I used this way

with import <nixpkgs> { };

mkShell {
  buildInputs = [
    (
      conda.override {
        extraPkgs = [
          tbb
          libGL
          libGLU
          xorg.libX11
          xorg.libXi
          openssl
          xorg.libXt
          jsoncpp
          libjson
        ];
      }
    )
  ];
}