From 6d900390cad16324e46458e5c4d41eaf8892fa02 Mon Sep 17 00:00:00 2001 From: Guillaume Girol Date: Sun, 13 Feb 2022 12:00:00 +0000 Subject: [PATCH] wluma: use rustPlatform.bindgenHook --- pkgs/tools/wayland/wluma/default.nix | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) diff --git a/pkgs/tools/wayland/wluma/default.nix b/pkgs/tools/wayland/wluma/default.nix index fd4db1a934ab..555e40384cef 100644 --- a/pkgs/tools/wayland/wluma/default.nix +++ b/pkgs/tools/wayland/wluma/default.nix @@ -24,25 +24,14 @@ rustPlatform.buildRustPackage rec { nativeBuildInputs = [ makeWrapper pkg-config + rustPlatform.bindgenHook ]; buildInputs = [ udev - v4l-utils.lib + v4l-utils ]; - LIBCLANG_PATH="${llvmPackages.libclang.lib}/lib"; - - # Works around the issue with rust-bindgen and the Nix gcc wrapper: - # https://hoverbear.org/blog/rust-bindgen-in-nix/ - preBuild = '' - export BINDGEN_EXTRA_CLANG_ARGS="$(< ${stdenv.cc}/nix-support/libc-cflags) \ - $(< ${stdenv.cc}/nix-support/cc-cflags) \ - -isystem ${llvmPackages.libclang.lib}/lib/clang/${lib.getVersion llvmPackages.clang}/include \ - -idirafter ${stdenv.cc.cc}/lib/gcc/${stdenv.hostPlatform.config}/${lib.getVersion stdenv.cc.cc}/include \ - -idirafter ${v4l-utils.dev}/include" - ''; - postInstall = '' wrapProgram $out/bin/wluma \ --prefix LD_LIBRARY_PATH : "${lib.makeLibraryPath [ vulkan-loader ]}"