我正在尝试构建https://github.com/SaschaWillems/Vulkan。我写了一个小default.nix
文件:
{ stdenv, libxcb, pkgconfig, cmake, vulkan-loader, assimp }:
stdenv.mkDerivation rec {
name = "VulkanExamples";
buildDepends = [ cmake libxcb.dev pkgconfig vulkan-loader assimp ];
}
我打电话给
nix-shell -E 'with import <nixpkgs> {}; callPackage ./default.nix {}'
但是当我打电话给cmake .
时,我得到了
-- Could NOT find PkgConfig (missing: PKG_CONFIG_EXECUTABLE)
-- Could NOT find xcb (missing: XCB_INCLUDE_DIR XCB_LIBRARY
我需要指定什么才能让cmake脚本找到正确的头文件?
答案 0 :(得分:1)
我终于开始工作,似乎我不得不使用buildInputs
{ stdenv, libxcb, pkgconfig, cmake, vulkan-loader, assimp }:
with import <nixpkgs> {}; {
vulkanEnv = stdenv.mkDerivation {
name = "vulkan";
buildInputs = [ stdenv cmake libxcb pkgconfig vulkan-loader assimp ];
};
}