File size: 933 Bytes
5bd8526
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
{ pkgs ? import <nixpkgs> {
    config = {
      allowUnfree = true;
      cudaSupport = true;
    };
  }
}:

pkgs.mkShell {
  name = "LinuxAssistant";

  buildInputs = with pkgs; [
    # Python + uv
    python312
    uv

    # Common native deps useful for ML/CUDA projects
    stdenv.cc.cc.lib   # libstdc++
    zlib
    libGL
  ];

  shellHook = ''
    echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
    echo "  uv   version: $(uv --version)"
    echo "  Python:       $(python --version)"
    echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"

    # Create venv with uv if it doesn't exist yet
    if [ ! -d ".venv" ]; then
      echo "β†’ Creating venv with uv..."
      uv venv .venv --python python3.12
    fi

    # Activate it
    source .venv/bin/activate
  '';
}