flakes/python/conda/flake.nix

35 lines
913 B
Nix
Raw Normal View History

2023-09-25 20:45:08 +02:00
{
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
'';
};
});
}