init python lib generation with pyo3

This commit is contained in:
Henri Bourcereau 2025-02-08 13:28:42 +01:00
parent 59c80c66e4
commit 883d799edb
8 changed files with 201 additions and 6 deletions

View file

@ -1,14 +1,20 @@
{ pkgs, ... }:
{
# https://devenv.sh/basics/
# env.GREET = "devenv";
packages = [
# dev tools
pkgs.samply # code profiler
# generate python classes from rust code (for AI training)
pkgs.maturin
# required to manually install generated python module in local venv
pkgs.python312Packages.pip
# required by python numpy (for AI training)
pkgs.libz
# for bevy
pkgs.alsaLib
pkgs.udev
@ -38,14 +44,26 @@
];
# enterShell = ''
# hello
# git --version
# '';
enterShell = ''
PYTHONPATH=$PYTHONPATH:$PWD/.devenv/state/venv/lib/python3.12/site-packages
'';
# https://devenv.sh/languages/
languages.rust.enable = true;
# for AI training
languages.python = {
enable = true;
uv.enable = true;
venv.enable = true;
venv.requirements = "
gym
numpy
stable-baselines3
";
};
# https://devenv.sh/scripts/
# scripts.hello.exec = "echo hello from $GREET";