Shared libraries error with cabal repl in nix-shell

Thanks for the follow-up. To summarize the email thread, it sounds like GCC is used directly by cabal configure, and GCC is patched in nixpkgs to looks at environment variables like NIX_LDFLAGS. nix-shell (or is it stdenv.mkDerivation?) automatically populates NIX_LDFLAGS based on buildInputs. Thiā€¦