This commit is contained in:
Shrek Requiem 2025-02-03 15:34:33 -05:00
commit f4022ea21c
1 changed files with 43 additions and 0 deletions

43
flake.nix Normal file
View File

@ -0,0 +1,43 @@
# flake.nix
{
description = "CRC";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
nur.url = "github:nix-community/NUR";
};
outputs = { self, nixpkgs, nur }:
let
system = "x86_64-linux"; # or "aarch64-darwin" for M1/M2 Macs
pkgs = import nixpkgs {
inherit system;
overlays = [ nur.overlay ];
};
in {
devShells.${system}.default = pkgs.mkShell {
packages = with pkgs; [
nushell
python3
python3Packages.numpy
python3Packages.matplotlib
python3Packages.black
python3Packages.pytest
];
shellHook = ''
echo "Entering Bakery Simulation Environment"
echo "Available packages:"
echo "Python: ${pkgs.python3.name}"
echo "NumPy: ${pkgs.python3Packages.numpy.version}"
echo "Matplotlib: ${pkgs.python3Packages.matplotlib.version}"
# Create virtual environment
if [ ! -d .venv ]; then
python -m venv .venv
fi
source .venv/bin/activate
'';
};
};
}