From 9021f55a5337945e124a58faf1926b06cb428a64 Mon Sep 17 00:00:00 2001 From: Robert Hensing Date: Tue, 19 Mar 2024 17:22:23 +0100 Subject: [PATCH] maint: Remove RUST_NIX_C_RAW_EXTRA_CFLAGS The standard bindgen flag BINDGEN_EXTRA_CLANG_ARGS seems to do the same thing. (cherry picked from commit 599eece08bee28d72c4ec20c8578428c158a19c1) --- flake.nix | 2 -- rust/nix-c-raw/build.rs | 6 ------ 2 files changed, 8 deletions(-) diff --git a/flake.nix b/flake.nix index 43c4b8d..03e8712 100644 --- a/flake.nix +++ b/flake.nix @@ -47,8 +47,6 @@ buildInputs = [ config.packages.nix ]; - # Workaround: the gcc in the devshell doesn't find libc headers - RUST_NIX_C_RAW_EXTRA_CFLAGS = "-I${pkgs.stdenv.cc.libc.dev}/include"; nativeBuildInputs = [ pkgs.rust-analyzer pkgs.nixpkgs-fmt diff --git a/rust/nix-c-raw/build.rs b/rust/nix-c-raw/build.rs index 1ac9dec..25251a0 100644 --- a/rust/nix-c-raw/build.rs +++ b/rust/nix-c-raw/build.rs @@ -45,12 +45,6 @@ fn c_headers() -> Vec { args.push(format!("-I{}", path.to_str().unwrap())); } - if let Ok(cflags) = std::env::var("RUST_NIX_C_RAW_EXTRA_CFLAGS") { - for flag in cflags.split_whitespace() { - args.push(flag.to_string()); - } - } - // write to stderr for debugging eprintln!("c_headers: {:?}", args); args