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

2
.gitignore vendored Normal file
View file

@ -0,0 +1,2 @@
.venv
.ipynb_checkpoints

79
flake.lock generated Normal file
View file

@ -0,0 +1,79 @@
{
"nodes": {
"flake-compat": {
"flake": false,
"locked": {
"lastModified": 1747046372,
"narHash": "sha256-CIVLLkVgvHYbgI2UpXvIIBJ12HWgX+fjA8Xf8PUmqCY=",
"owner": "edolstra",
"repo": "flake-compat",
"rev": "9100a0f413b0c601e0533d1d94ffd501ce2e7885",
"type": "github"
},
"original": {
"owner": "edolstra",
"repo": "flake-compat",
"type": "github"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1757034884,
"narHash": "sha256-PgLSZDBEWUHpfTRfFyklmiiLBE1i1aGCtz4eRA3POao=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "ca77296380960cd497a765102eeb1356eb80fed0",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixpkgs-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs-python": {
"inputs": {
"flake-compat": "flake-compat",
"nixpkgs": "nixpkgs_2"
},
"locked": {
"lastModified": 1755249745,
"narHash": "sha256-lDIbUfJ8xK62ekG+qojTlA1raHpKdScBTx8IFlQYx9U=",
"owner": "cachix",
"repo": "nixpkgs-python",
"rev": "b6632af2db9f47c79dac8f4466388c7b1b6c3071",
"type": "github"
},
"original": {
"owner": "cachix",
"repo": "nixpkgs-python",
"type": "github"
}
},
"nixpkgs_2": {
"locked": {
"lastModified": 1753345091,
"narHash": "sha256-CdX2Rtvp5I8HGu9swBmYuq+ILwRxpXdJwlpg8jvN4tU=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "3ff0e34b1383648053bba8ed03f201d3466f90c9",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-25.05",
"repo": "nixpkgs",
"type": "github"
}
},
"root": {
"inputs": {
"nixpkgs": "nixpkgs",
"nixpkgs-python": "nixpkgs-python"
}
}
},
"root": "root",
"version": 7
}

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
'';
};
};
}

File diff suppressed because it is too large Load diff