From 4eb6142cd1bbefee2c8e6bfee293e9a9f9e5927a Mon Sep 17 00:00:00 2001 From: Michael Zhang Date: Mon, 20 Nov 2023 21:31:16 -0600 Subject: [PATCH] wasm --- wasm.nix | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/wasm.nix b/wasm.nix index d924c10..b659efd 100644 --- a/wasm.nix +++ b/wasm.nix @@ -1,16 +1,17 @@ -{ stdenv, clang, wasilibc }: +{ stdenv, clang, pkgsCross }: stdenv.mkDerivation { name = "triangle"; src = ./.; - nativeBuildInputs = [ clang wasilibc ]; + nativeBuildInputs = [ clang ]; configurePhase = ""; buildPhase = '' clang \ --target=wasm32-unknown-wasi \ + --sysroot ${pkgsCross.wasi32.wasilibc} \ -O3 \ -flto \ -nostdlib \ -- 2.45.2