forked from mirrors/nixpkgs
wluma: use rustPlatform.bindgenHook
This commit is contained in:
parent
f3027942a4
commit
6d900390ca
1 changed files with 2 additions and 13 deletions
|
@ -24,25 +24,14 @@ rustPlatform.buildRustPackage rec {
|
||||||
nativeBuildInputs = [
|
nativeBuildInputs = [
|
||||||
makeWrapper
|
makeWrapper
|
||||||
pkg-config
|
pkg-config
|
||||||
|
rustPlatform.bindgenHook
|
||||||
];
|
];
|
||||||
|
|
||||||
buildInputs = [
|
buildInputs = [
|
||||||
udev
|
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 = ''
|
postInstall = ''
|
||||||
wrapProgram $out/bin/wluma \
|
wrapProgram $out/bin/wluma \
|
||||||
--prefix LD_LIBRARY_PATH : "${lib.makeLibraryPath [ vulkan-loader ]}"
|
--prefix LD_LIBRARY_PATH : "${lib.makeLibraryPath [ vulkan-loader ]}"
|
||||||
|
|
Loading…
Add table
Reference in a new issue