35 lines
913 B
Nix
35 lines
913 B
Nix
|
{
|
||
|
description = ''
|
||
|
Python flake for use with conda environments.
|
||
|
|
||
|
This will create a directory `~/.conda`, which might be rather large,
|
||
|
depending on your required packages.
|
||
|
'';
|
||
|
|
||
|
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
||
|
inputs.flake-utils.url = "github:numtide/flake-utils";
|
||
|
|
||
|
outputs = { self, nixpkgs, flake-utils}:
|
||
|
flake-utils.lib.eachDefaultSystem (system:
|
||
|
let
|
||
|
pkgs = import nixpkgs {
|
||
|
inherit system;
|
||
|
};
|
||
|
in {
|
||
|
devShells.default = pkgs.mkShell {
|
||
|
packages = with pkgs; [
|
||
|
conda
|
||
|
];
|
||
|
installation = ''
|
||
|
conda-shell -c 'conda-install'
|
||
|
printf 'Run `conda env create --name ai-practica --file environment.yaml` and exit.
|
||
|
conda-shell && exit
|
||
|
'';
|
||
|
shellHook = ''
|
||
|
printf 'Enter your enviroment by running `conda activate ai-practica`.\n'
|
||
|
conda-shell && exit
|
||
|
'';
|
||
|
};
|
||
|
});
|
||
|
}
|