added nix flake

This commit is contained in:
Iaphetes 2025-09-09 13:08:49 +02:00
parent 8c96ff7ec0
commit 02bac4e8b5
4 changed files with 3539 additions and 3402 deletions

44
flake.nix Normal file
View file

@ -0,0 +1,44 @@
{
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
'';
};
};
}