AMILIO-Model-Playground/flake.nix
2025-09-09 13:08:49 +02:00

44 lines
989 B
Nix

{
description = "Python development environment";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
nixpkgs-python.url = "github:cachix/nixpkgs-python";
};
outputs = { self, nixpkgs, nixpkgs-python }:
let
system = "x86_64-linux";
# system = "x86_64-rwin";
pythonVersion = "3.10.1";
pkgs = import nixpkgs { inherit system; };
myPython = nixpkgs-python.packages.${system}.${pythonVersion};
in
{
devShells.${system}.default = pkgs.mkShell {
buildInputs = with pkgs; [
zlib
libgcc
stdenv.cc.cc.lib
(python3.withPackages(ps: with ps; [
ipython
jupyter
numpy
pandas
plotly
]))
];
packages = [
myPython
];
shellHook = ''
python --version
exec fish
. ./.venv/bin/activate.fish
'';
};
};
}