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
conda: init at miniconda3 4.3.31 #34872
Conversation
@GrahamcOfBorg build conda |
Success on aarch64-linux (full log) Partial log (click to expand)
|
Success on x86_64-linux (full log) Partial log (click to expand)
|
Success on aarch64-linux (full log) Partial log (click to expand)
|
Success on x86_64-linux (full log) Partial log (click to expand)
|
Thanks! I didn't test it but took a quick look and looks good to me. Great that this is being worked on! Just some general questions:
I'm relatively new to nix so I suppose these are quite easy to achieve, but just wondering what is the "correct" way. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for taking this on!
@@ -0,0 +1,98 @@ | |||
{ lib | |||
, pkgs |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not pkgs
but individual packages
# $ conda-shell | ||
# $ conda install spyder | ||
let | ||
minicondaInstaller = pkgs.stdenv.mkDerivation rec { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it makes more sense to use runCommand
here
name = "conda-shell"; | ||
targetPkgs = pkgs: ( | ||
with pkgs; [ | ||
conda |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There should likely be a way to extend the packages here.
homepage = https://conda.io/; | ||
platforms = lib.platforms.linux; | ||
license = lib.licenses.bsd3; | ||
maintainers = with lib.maintainers; [ jluttine fridh bhipple ]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please remove me from the maintainers. I don't intend to use it.
- Overlay-friendly extraPkgs list for FHS customization - Update maintainers - Simplify installer script download significantly - Explicitly mention packages used, instead of pkgs
# Conda manages most pkgs itself, but expects a few to be on the system. | ||
, condaDeps ? [ stdenv.cc xorg.libSM xorg.libICE xorg.libXrender libselinux ] | ||
# Any extra nixpkgs you'd like available in the FHS env for Conda to use | ||
, extraPkgs ? [ ] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This can be extended with an overlay as such:
$ cat ~/.config/nixpkgs/overlays/conda.nix ~/src/nixpkgs
self: super:
{
conda = super.conda.override {
extraPkgs = [ self.sssd self.firefox ];
};
}
$ conda-shell
$ ls -l /usr/bin/firefox
lrwxrwxrwx 1 nobody nogroup 78 Dec 31 1969 /usr/bin/firefox -> /nix/store/a258dljnrj0chhnb6dpir2106yimfkb9-conda-shell-usr-target/bin/firefox
$ ls -l /usr/lib/sssd/libsss_krb5.so
lrwxrwxrwx 1 nobody nogroup 90 Dec 31 1969 /usr/lib/sssd/libsss_krb5.so -> /nix/store/a258dljnrj0chhnb6dpir2106yimfkb9-conda-shell-usr-target/lib/sssd/libsss_krb5.so
We could condense condaDeps
and extraPkgs
into one for simplicity, though they're both overridable in an overlay. I think logically the first one is more for "you're almost certainly going to need this" and the 2nd one is more for user tools like git/emacs, but don't feel too strongly either way.
src = fetchurl { | ||
url = "https://repo.continuum.io/miniconda/Miniconda3-${version}-Linux-x86_64.sh"; | ||
sha256 = "1rklq81s9v7xz1q0ha99w2sl6kyc5vhk6b21cza0jr3b8cgz0lam"; | ||
}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the tip to get rid of mkDerivation
@FRidh; this is WAY simpler!
Success on x86_64-linux (full log) Partial log (click to expand)
|
Success on aarch64-linux (full log) Partial log (click to expand)
|
@jluttine regarding your second question, conda has full support for managing its own environments in |
pkgs/top-level/all-packages.nix
Outdated
@@ -6943,6 +6943,8 @@ with pkgs; | |||
}; | |||
purePackages = recurseIntoAttrs (callPackage ./pure-packages.nix {}); | |||
|
|||
conda = callPackage ../development/interpreters/conda { }; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should actually move the expression to pkgs/tools/package-management/
Sounds sensible to me. As a matter of general policy, would you prefer if I squashed and rebased my commits after code review updates to keep the history clean, or leave the shas intact so you can just review the updated diff? I guess github has a squash-merge option now so we can get the best of both worlds if I don't do so myself? I didn't see anything in the mmanual about this. |
In general it is preferred when commits are "ready to merge" and that would mean that unnecessary commits have been squashed. |
Looks like you used the github squash-merge option, so we get a nice clean history without the reviewer having to double check that the claimed "no-op" manual rebase and squash is actually so 👍 I see some other mergers don't use it, though -- it might be worth noting something in https://nixos.org/nixpkgs/manual/#idm140737316961072 to encourage doing so when the individual commits don't contain particularly useful information. |
Success on aarch64-linux (full log) Partial log (click to expand)
|
Success on x86_64-linux (full log) Partial log (click to expand)
|
I know not everyone likes squashing as a maintainer, as that means purging the contributors history (although of course the original commits are still existing on the original branch). |
Motivation for this change
This takes the work done in PR #26443, which itself was a derivative work from
PR #26245, and adds a few improvements, including:
On the last point, I don't think we really need to give a miniconda2 option, or
at least it isn't a high priority; conda itself can install and manage conda
environments and pythons, so AFAICT a miniconda2 install would just save a small
amount of download bandwidth when someone who wants exclusively python2 adds a
python2 environment.
CC @FRidh @jluttine @layus
Things done
build-use-sandbox
innix.conf
on non-NixOS)nix-shell -p nox --run "nox-review wip"
./result/bin/
)