Add python conda flake
This commit is contained in:
parent
56d4c7c5d6
commit
7956ec66d7
2 changed files with 95 additions and 0 deletions
34
python/conda/flake.nix
Normal file
34
python/conda/flake.nix
Normal file
|
@ -0,0 +1,34 @@
|
|||
{
|
||||
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
|
||||
'';
|
||||
};
|
||||
});
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue