From 1d57e14dc0159af89b21e30487095731d4296268 Mon Sep 17 00:00:00 2001 From: Benjamin Lee Date: Thu, 23 May 2024 23:48:28 -0700 Subject: [PATCH] set C/LDFLAGS for complement dependencies directly Previously we were relying on NIX_CFLAGS_COMPILE, but this is not being set in static devshells. A cleaner solution for complement would likely be to build the tests in their own nix derivation instead of building them in the devshell, but this change unblocks CI for now. --- flake.nix | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/flake.nix b/flake.nix index ef89f35f..7483bee6 100644 --- a/flake.nix +++ b/flake.nix @@ -56,6 +56,10 @@ # Convenient way to access a pinned version of Complement's source # code. COMPLEMENT_SRC = inputs.complement.outPath; + + # Needed for Complement + CGO_CFLAGS = "-I${scope.pkgs.olm}/include"; + CGO_LDFLAGS = "-L${scope.pkgs.olm}/lib"; }; # Development tools @@ -77,7 +81,6 @@ # Needed for Complement go - olm # Needed for our script for Complement jq