update conda from 4.6.14 to 4.11.0
This commit is contained in:
parent
e66cf9c6c8
commit
cfe0988e48
1 changed files with 29 additions and 15 deletions
|
@ -8,10 +8,11 @@
|
||||||
, libarchive
|
, libarchive
|
||||||
, libGL
|
, libGL
|
||||||
, xorg
|
, xorg
|
||||||
|
, zlib
|
||||||
# Conda installs its packages and environments under this directory
|
# Conda installs its packages and environments under this directory
|
||||||
, installationPath ? "~/.conda"
|
, installationPath ? "~/.conda"
|
||||||
# Conda manages most pkgs itself, but expects a few to be on the system.
|
# Conda manages most pkgs itself, but expects a few to be on the system.
|
||||||
, condaDeps ? [ stdenv.cc xorg.libSM xorg.libICE xorg.libX11 xorg.libXau xorg.libXi xorg.libXrender libselinux libGL ]
|
, condaDeps ? [ stdenv.cc xorg.libSM xorg.libICE xorg.libX11 xorg.libXau xorg.libXi xorg.libXrender libselinux libGL zlib]
|
||||||
# Any extra nixpkgs you'd like available in the FHS env for Conda to use
|
# Any extra nixpkgs you'd like available in the FHS env for Conda to use
|
||||||
, extraPkgs ? [ ]
|
, extraPkgs ? [ ]
|
||||||
}:
|
}:
|
||||||
|
@ -30,24 +31,37 @@
|
||||||
# $ conda-shell
|
# $ conda-shell
|
||||||
# $ conda install spyder
|
# $ conda install spyder
|
||||||
let
|
let
|
||||||
version = "4.6.14";
|
version = "4.11.0";
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = "https://repo.continuum.io/miniconda/Miniconda3-${version}-Linux-x86_64.sh";
|
url = "https://repo.continuum.io/miniconda/Miniconda3-py39_${version}-Linux-x86_64.sh";
|
||||||
sha256 = "1gn43z1y5zw4yv93q1qajwbmmqs83wx5ls5x4i4llaciba4j6sqd";
|
sha256 = "sha256-TunDqlMynNemO0mHfAurtJsZt+WvKYB7eTp2vbHTYrQ=";
|
||||||
};
|
};
|
||||||
|
conda = (
|
||||||
|
let
|
||||||
|
libPath = lib.makeLibraryPath [
|
||||||
|
zlib # libz.so.1
|
||||||
|
];
|
||||||
|
in
|
||||||
|
runCommand "conda-install" { buildInputs = [ makeWrapper 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
|
||||||
|
# file does not change. So we replace the 'u' in the line with a '#'
|
||||||
|
# The reason is that the binary payload is encoded as number
|
||||||
|
# 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
|
||||||
|
|
||||||
conda = runCommand "conda-install" { buildInputs = [ makeWrapper ]; }
|
sed 's/unset LD_LIBRARY_PATH/#nset LD_LIBRARY_PATH/' ${src} > $out/bin/miniconda-installer.sh
|
||||||
''
|
chmod +x $out/bin/miniconda-installer.sh
|
||||||
mkdir -p $out/bin
|
|
||||||
cp ${src} $out/bin/miniconda-installer.sh
|
|
||||||
chmod +x $out/bin/miniconda-installer.sh
|
|
||||||
|
|
||||||
makeWrapper \
|
makeWrapper \
|
||||||
$out/bin/miniconda-installer.sh \
|
$out/bin/miniconda-installer.sh \
|
||||||
$out/bin/conda-install \
|
$out/bin/conda-install \
|
||||||
--add-flags "-p ${installationPath}" \
|
--add-flags "-p ${installationPath}" \
|
||||||
--add-flags "-b"
|
--add-flags "-b" \
|
||||||
'';
|
--prefix "LD_LIBRARY_PATH" : "${libPath}"
|
||||||
|
'');
|
||||||
in
|
in
|
||||||
buildFHSUserEnv {
|
buildFHSUserEnv {
|
||||||
name = "conda-shell";
|
name = "conda-shell";
|
||||||
|
|
Loading…
Reference in a new issue