Merge pull request #234298 from wegank/zenith-refactor

zenith: migrate to bindgenHook
This commit is contained in:
Weijia Wang 2023-05-27 00:46:10 +03:00 committed by GitHub
commit 3eb0cc7c0b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -5,7 +5,6 @@
, IOKit
, nvidiaSupport ? false
, makeWrapper
, llvmPackages
}:
assert nvidiaSupport -> stdenv.isLinux;
@ -34,13 +33,11 @@ rustPlatform.buildRustPackage rec {
};
};
nativeBuildInputs = [ llvmPackages.clang ] ++ lib.optional nvidiaSupport makeWrapper;
buildInputs = [ llvmPackages.libclang ] ++ lib.optionals stdenv.isDarwin [ IOKit ];
nativeBuildInputs = [ rustPlatform.bindgenHook ] ++ lib.optional nvidiaSupport makeWrapper;
buildInputs = lib.optionals stdenv.isDarwin [ IOKit ];
buildFeatures = lib.optional nvidiaSupport "nvidia";
LIBCLANG_PATH = "${llvmPackages.libclang.lib}/lib";
postInstall = lib.optionalString nvidiaSupport ''
wrapProgram $out/bin/zenith \
--suffix LD_LIBRARY_PATH : "/run/opengl-driver/lib"