Hi, all.
I’m new to nix. And I’m trying to figure out how to create a anaconda package.
Here is my script miniconda.nix
. And I call this with callPackage ./miniconda.nix { }
.
{ stdenv, fetchurl, libselinux, libarchive, libGL, xorg
# Conda installs its packages and environments under this directory
, installationPath ? "/home/ztlevi/.miniconda3"
# 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
]
# Any extra nixpkgs you'd like available in the FHS env for Conda to use
, extraPkgs ? [ ] }:
stdenv.mkDerivation rec {
pname = "miniconda";
version = "4.6.14";
src = fetchurl {
url =
"https://repo.continuum.io/miniconda/Miniconda3-${version}-Linux-x86_64.sh";
sha256 = "1gn43z1y5zw4yv93q1qajwbmmqs83wx5ls5x4i4llaciba4j6sqd";
};
# propagatedUserEnvPkgs = builtins.concatLists [ condaDeps extraPkgs ];
phases = [ "installPhase" ]; # Removes all phases except installPhase
installPhase = ''
mkdir -p $out/bin
cp ${src} $out/bin/miniconda-installer.sh
chmod +x $out/bin/miniconda-installer.sh
$out/bin/miniconda-installer.sh -p ${installationPath} -b
'';
outputHashAlgo = "sha256";
outputHashMode = "recursive";
outputHash = "0khhp11j395xa9z3hwgrzncg2w75sm8kfn5y85zj6hrhmnpnyz6h";
meta = with stdenv.lib; {
description = "Miniconda";
homepage = "https://www.anaconda.com/";
license = licenses.gpl3;
platforms = platforms.all;
maintainers = [ ];
};
}
But things are not going right. How can I fix this script?