conda: 25.3.1-1 -> 25.9.1-1 (#451550)
This commit is contained in:
@@ -27,6 +27,7 @@
|
||||
],
|
||||
# Any extra nixpkgs you'd like available in the FHS env for Conda to use
|
||||
extraPkgs ? [ ],
|
||||
runScript ? "bash -l",
|
||||
}:
|
||||
|
||||
# How to use this package?
|
||||
@@ -43,7 +44,7 @@
|
||||
# $ conda-shell
|
||||
# $ conda install spyder
|
||||
let
|
||||
version = "25.3.1-1";
|
||||
version = "25.9.1-1";
|
||||
|
||||
src =
|
||||
let
|
||||
@@ -59,21 +60,15 @@ let
|
||||
fetchurl {
|
||||
url = "https://repo.anaconda.com/miniconda/Miniconda3-py313_${version}-Linux-${arch}.sh";
|
||||
hash = selectSystem {
|
||||
x86_64-linux = "sha256-U6hhCUY8/XC6esqzltQW5iMBKRTu4ARynh7Nb+lOjGk=";
|
||||
aarch64-linux = "sha256-TKoMJmq3JrRAzK1Ap0d0FnSU4AHaXeKBt08tVnPkrOk=";
|
||||
x86_64-linux = "sha256-YCJxTaIphgl7vvoT2rPZVyV/7wThw30evTZFtbmbydQ=";
|
||||
aarch64-linux = "sha256-oN5FYsNoqLXKQ4WEP0BWhMeb6nqjt111E/+ZwMZDXVE=";
|
||||
};
|
||||
};
|
||||
|
||||
conda = (
|
||||
let
|
||||
libPath = lib.makeLibraryPath [
|
||||
zlib # libz.so.1
|
||||
];
|
||||
in
|
||||
conda =
|
||||
runCommand "install-conda"
|
||||
{
|
||||
nativeBuildInputs = [ makeWrapper ];
|
||||
buildInputs = [ zlib ];
|
||||
}
|
||||
# on line 10, we have 'unset LD_LIBRARY_PATH'
|
||||
# we have to comment it out however in a way that the number of bytes in the
|
||||
@@ -82,24 +77,25 @@ let
|
||||
# of bytes from the top of the installer script
|
||||
# and unsetting the library path prevents the zlib library from being discovered
|
||||
''
|
||||
mkdir -p $out/bin
|
||||
mkdir --parents $out/bin
|
||||
|
||||
sed 's/unset LD_LIBRARY_PATH/#nset LD_LIBRARY_PATH/' ${src} > $out/bin/miniconda-installer.sh
|
||||
chmod +x $out/bin/miniconda-installer.sh
|
||||
|
||||
makeWrapper \
|
||||
$out/bin/miniconda-installer.sh \
|
||||
$out/bin/install-conda \
|
||||
makeWrapper $out/bin/miniconda-installer.sh $out/bin/install-conda \
|
||||
--add-flags "-p ${installationPath}" \
|
||||
--add-flags "-b" \
|
||||
--prefix "LD_LIBRARY_PATH" : "${libPath}"
|
||||
''
|
||||
);
|
||||
--add-flags "-b" \
|
||||
--prefix "LD_LIBRARY_PATH" : "${
|
||||
lib.makeLibraryPath [
|
||||
zlib # libz.so.1
|
||||
]
|
||||
}"
|
||||
'';
|
||||
in
|
||||
|
||||
buildFHSEnv {
|
||||
pname = "conda-shell";
|
||||
inherit version;
|
||||
inherit version runScript;
|
||||
|
||||
targetPkgs =
|
||||
pkgs:
|
||||
@@ -109,25 +105,26 @@ buildFHSEnv {
|
||||
extraPkgs
|
||||
]);
|
||||
|
||||
profile = ''
|
||||
# Add conda to PATH
|
||||
export PATH=${installationPath}/bin:$PATH
|
||||
# Paths for gcc if compiling some C sources with pip
|
||||
export NIX_CFLAGS_COMPILE="-I${installationPath}/include"
|
||||
export NIX_CFLAGS_LINK="-L${installationPath}lib"
|
||||
# Some other required environment variables
|
||||
export FONTCONFIG_FILE=/etc/fonts/fonts.conf
|
||||
export QTCOMPOSE=${xorg.libX11}/share/X11/locale
|
||||
export LIBARCHIVE=${lib.getLib libarchive}/lib/libarchive.so
|
||||
# Allows `conda activate` to work properly
|
||||
condaSh=${installationPath}/etc/profile.d/conda.sh
|
||||
if [ ! -f $condaSh ]; then
|
||||
install-conda
|
||||
fi
|
||||
source $condaSh
|
||||
'';
|
||||
|
||||
runScript = "bash -l";
|
||||
profile =
|
||||
let
|
||||
condaSh = "${installationPath}/etc/profile.d/conda.sh";
|
||||
in
|
||||
''
|
||||
# Add conda to PATH
|
||||
export PATH=${installationPath}/bin:$PATH
|
||||
# Paths for gcc if compiling some C sources with pip
|
||||
export NIX_CFLAGS_COMPILE="-I${installationPath}/include"
|
||||
export NIX_CFLAGS_LINK="-L${installationPath}/lib"
|
||||
# Some other required environment variables
|
||||
export FONTCONFIG_FILE=/etc/fonts/fonts.conf
|
||||
export QTCOMPOSE=${xorg.libX11}/share/X11/locale
|
||||
export LIBARCHIVE=${lib.getLib libarchive}/lib/libarchive.so
|
||||
# Allows `conda activate` to work properly
|
||||
if [ ! -f ${condaSh} ]; then
|
||||
install-conda
|
||||
fi
|
||||
source ${condaSh}
|
||||
'';
|
||||
|
||||
meta = {
|
||||
description = "Package manager for Python";
|
||||
|
||||
Reference in New Issue
Block a user