mirror of
https://github.com/Alexandre1a/NixOSDots.git
synced 2026-03-10 00:09:46 +01:00
Started adding dev flakes for projects
This commit is contained in:
parent
fe191b2f5d
commit
4d001d71e9
45
code/flakes/python/flake.nix
Normal file
45
code/flakes/python/flake.nix
Normal file
@ -0,0 +1,45 @@
|
||||
{
|
||||
description = "Python ML dev environment";
|
||||
|
||||
inputs = {
|
||||
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
||||
flake-utils.url = "github:numtide/flake-utils";
|
||||
};
|
||||
|
||||
outputs = { self, nixpkgs, flake-utils }:
|
||||
flake-utils.lib.eachDefaultSystem (system:
|
||||
let
|
||||
pkgs = import nixpkgs {
|
||||
inherit system;
|
||||
config.allowUnfree = true;
|
||||
};
|
||||
|
||||
python = pkgs.python311;
|
||||
in
|
||||
{
|
||||
devShells.default = pkgs.mkShell {
|
||||
name = "python-ml";
|
||||
|
||||
packages = with pkgs; [
|
||||
python
|
||||
#python.pkgs.pip
|
||||
#python.pkgs.virtualenv
|
||||
|
||||
# ML stack
|
||||
#python.pkgs.numpy
|
||||
#python.pkgs.scipy
|
||||
#python.pkgs.pandas
|
||||
#python.pkgs.matplotlib
|
||||
#python.pkgs.scikit-learn
|
||||
|
||||
# Optional
|
||||
#python.pkgs.jupyterlab
|
||||
];
|
||||
|
||||
shellHook = ''
|
||||
echo "🐍 Python ML dev shell"
|
||||
export PYTHONBREAKPOINT=ipdb.set_trace
|
||||
'';
|
||||
};
|
||||
});
|
||||
}
|
||||
@ -20,5 +20,8 @@
|
||||
cmatrix
|
||||
gh
|
||||
];
|
||||
variables = {
|
||||
EDITOR = "nvim";
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user