From 2c7b73feaff8bef2e2365a4bda438ca20361a026 Mon Sep 17 00:00:00 2001 From: Zexin Yuan Date: Fri, 14 Nov 2025 19:53:04 +0800 Subject: [PATCH 1/2] python3Packages.warp-lang: unbreak on darwin --- .../python-modules/warp-lang/darwin-libcxx.patch | 8 -------- pkgs/development/python-modules/warp-lang/default.nix | 1 - 2 files changed, 9 deletions(-) diff --git a/pkgs/development/python-modules/warp-lang/darwin-libcxx.patch b/pkgs/development/python-modules/warp-lang/darwin-libcxx.patch index beda9f58e6de..8b1cb03afea0 100644 --- a/pkgs/development/python-modules/warp-lang/darwin-libcxx.patch +++ b/pkgs/development/python-modules/warp-lang/darwin-libcxx.patch @@ -2,14 +2,6 @@ diff --git a/warp/build_dll.py b/warp/build_dll.py index 2218ff13..53786017 100644 --- a/warp/build_dll.py +++ b/warp/build_dll.py -@@ -408,6 +408,7 @@ def build_dll_for_arch(args, dll_path, cpp_paths, cu_path, arch, libs: Optional[ - cpp_includes += f' -I"{warp_home_path.parent}/_build/host-deps/llvm-project/release-{arch}/include"' - cuda_includes = f' -I"{cuda_home}/include"' if cu_path else "" - includes = cpp_includes + cuda_includes -+ includes += " -isystem @LIBCXX_DEV@/include/c++/v1" - - if sys.platform == "darwin": - version = f"--target={arch}-apple-macos11" @@ -441,6 +442,7 @@ def build_dll_for_arch(args, dll_path, cpp_paths, cu_path, arch, libs: Optional[ build_cmd = f'{cpp_compiler} {cpp_flags} -c "{cpp_path}" -o "{cpp_out}"' run_cmd(build_cmd) diff --git a/pkgs/development/python-modules/warp-lang/default.nix b/pkgs/development/python-modules/warp-lang/default.nix index 0f90b01b2801..5d1fe215090b 100644 --- a/pkgs/development/python-modules/warp-lang/default.nix +++ b/pkgs/development/python-modules/warp-lang/default.nix @@ -67,7 +67,6 @@ buildPythonPackage { ] ++ lib.optionals effectiveStdenv.hostPlatform.isDarwin [ (replaceVars ./darwin-libcxx.patch { - LIBCXX_DEV = llvmPackages.libcxx.dev; LIBCXX_LIB = llvmPackages.libcxx; }) From 248966073fefc71db8329eb2c7733b6380c65c30 Mon Sep 17 00:00:00 2001 From: Zexin Yuan Date: Fri, 14 Nov 2025 19:53:31 +0800 Subject: [PATCH 2/2] python3Packages.warp-lang: fix unit tests --- .../python-modules/warp-lang/default.nix | 22 ++++++++++--------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/pkgs/development/python-modules/warp-lang/default.nix b/pkgs/development/python-modules/warp-lang/default.nix index 5d1fe215090b..414d62197ace 100644 --- a/pkgs/development/python-modules/warp-lang/default.nix +++ b/pkgs/development/python-modules/warp-lang/default.nix @@ -223,22 +223,24 @@ buildPythonPackage { inherit libmathdx; # Scripts which provide test packages and implement test logic. - testers.unit-tests = writeShellApplication { - name = "warp-lang-unit-tests"; - runtimeInputs = [ + testers.unit-tests = + let # Use the references from args - (python.withPackages (_: [ + python' = python.withPackages (_: [ warp-lang jax torch - ])) + ]); # Disable paddlepaddle interop tests: malloc(): unaligned tcache chunk detected # (paddlepaddle.override { inherit cudaSupport; }) - ]; - text = '' - python3 -m warp.tests - ''; - }; + in + writeShellApplication { + name = "warp-lang-unit-tests"; + runtimeInputs = [ python' ]; + text = '' + ${python'}/bin/python3 -m warp.tests + ''; + }; # Tests run within the Nix sandbox. tests =