summaryrefslogtreecommitdiff
path: root/cuda/nix-python-devenv/devenv.nix
diff options
context:
space:
mode:
authorpolwex <polwex@sortug.com>2025-09-22 16:41:50 +0700
committerpolwex <polwex@sortug.com>2025-09-22 16:41:50 +0700
commitec7479951bf8842a77e65b346e3a2586d2e09a72 (patch)
tree0892afc2c613f748956c9e6298b8d2f9cdfbf71e /cuda/nix-python-devenv/devenv.nix
PYTHON CUDA SOLVED FOREVAHHEADmaster
Diffstat (limited to 'cuda/nix-python-devenv/devenv.nix')
-rw-r--r--cuda/nix-python-devenv/devenv.nix32
1 files changed, 32 insertions, 0 deletions
diff --git a/cuda/nix-python-devenv/devenv.nix b/cuda/nix-python-devenv/devenv.nix
new file mode 100644
index 0000000..5bfedfb
--- /dev/null
+++ b/cuda/nix-python-devenv/devenv.nix
@@ -0,0 +1,32 @@
+{
+ pkgs,
+ lib,
+ ...
+}:
+let
+ buildInputs = with pkgs; [
+ stdenv.cc.cc
+ libuv
+ zlib
+ ];
+in
+{
+ env = {
+ LD_LIBRARY_PATH = "${lib.makeLibraryPath buildInputs}";
+ };
+
+ languages.python = {
+ enable = true;
+ uv = {
+ enable = true;
+ sync.enable = true;
+ };
+ };
+
+ scripts.hello.exec = "uv run python hello.py";
+
+ enterShell = ''
+ . .devenv/state/venv/bin/activate
+ hello
+ '';
+}