about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorTheofilos Augoustis <theofilos.augoustis@tum.de>2025-08-28 11:35:58 +0000
committerTheofilos Augoustis <theofilos.augoustis@tum.de>2025-08-28 11:35:58 +0000
commit869bad124ea3d1015292dba89fe28cca0edd3abc (patch)
tree62af1606efbc990b18770e1de519dfc0bd19316d
parentff3c9a0136b1b308a06d01108157146cc315274b (diff)
downloadfocaccia-869bad124ea3d1015292dba89fe28cca0edd3abc.tar.gz
focaccia-869bad124ea3d1015292dba89fe28cca0edd3abc.zip
Update glibc and musl devShells to fully support editable builds
-rw-r--r--flake.nix36
1 files changed, 24 insertions, 12 deletions
diff --git a/flake.nix b/flake.nix
index 63a1d90..f486171 100644
--- a/flake.nix
+++ b/flake.nix
@@ -186,6 +186,18 @@
 
 		 # Create a Python venv with the default dependency group
 		 pythonDevEnv = pythonSetEditable.mkVirtualEnv "focaccia-env" workspace.deps.all;
+
+		 uvEnv = {
+			UV_NO_SYNC = "1";
+			UV_PYTHON = python.interpreter;
+			UV_PYTHON_DOWNLOADS = "never";
+		};
+
+		uvShellHook = ''
+			unset PYTHONPATH
+
+			export REPO_ROOT=$(git rev-parse --show-toplevel)
+		'';
 	in {
 		# Default package just builds Focaccia
 		packages.default = pythonDevEnv;
@@ -201,39 +213,39 @@
 			default = pkgs.mkShell {
 				packages = [
 					pythonDevEnv
+					pkgs.uv
 					pkgs.gdb
 					pkgs.git
 				];
 
-				env = {
-					UV_NO_SYNC = "1";
-					UV_PYTHON = python.interpreter;
-					UV_PYTHON_DOWNLOADS = "never";
-				};
-
-				shellHook = ''
-					unset PYTHONPATH
-
-					export REPO_ROOT=$(git rev-parse --show-toplevel)
-				'';
+				env = uvEnv;
+				shellHook = uvShellHook;
 			};
 
 			glibc = pkgs.mkShell {
 				packages = [
-					pythonEnv
+					pythonDevEnv
+					pkgs.uv
 					pkgs.gdb
 					pkgs.gcc
 					pkgs.glibc.all
 				];
+
+				env = uvEnv;
+				shellHook = uvShellHook;
 			};
 
 			musl = pkgs.mkShell {
 				packages = [
 					pythonDevEnv
+					pkgs.uv
 					pkgs.gdb
 					musl-pkgs.gcc
 					musl-pkgs.pkg-config
 				];
+
+				env = uvEnv;
+				shellHook = uvShellHook;
 			};
 		};
 	});