Hello,
I’m pretty new to Nix and I’d like to use GitHub - aejsmith/vkdevicechooser: Vulkan layer to force a specific device to be used on my NixOS system.
Building it as described in the README doesn’t seem sound or even possible because it needs to install files in the system.
So I’m trying to make a new package for it, but I’m stuck because it doesn’t find the header vulkan/vk_layer_dispatch_table.h
. It does find the other vulkan headers though.
It looks like this header is generated. How can I make it available to the package?
I tried adding vulkan-validation-layers
, vulkan-utility-libraries
, vulkan-extension-layer
and other packages, to no avail.
Here’s my current package source:
{ lib
, stdenv
, fetchFromGitHub
, meson
, vulkan-headers
}:
stdenv.mkDerivation rec {
pname = "vkdevicechooser";
version = "1.0";
src = fetchFromGitHub {
owner = "aejsmith";
repo = "vkdevicechooser";
rev = "1.0";
hash = "sha256-low5vkuZT4gWta4PeoCaP/jIO1uszACq+LTZopo8BAI=";
};
nativeBuildInputs = [
meson
];
buildInputs = [
vulkan-headers
];
meta = with lib; {
description = "Vulkan layer to force a specific device to be used";
homepage = "https://github.com/aejsmith/vkdevicechooser";
platforms = platforms.unix;
license = licenses.mit;
};
}
And the output when I try to use it:
error: builder for '/nix/store/jyhrh51glbhx4dnh1dkig3q7ymxw4pj6-vkdevicechooser-1.0.drv' failed with exit code 1;
last 10 log lines:
> C++ linker for the host machine: g++ ld.bfd 2.40
> Host machine cpu family: x86_64
> Host machine cpu: x86_64
> Has header "vulkan/vulkan.h" : YES
> Has header "vulkan/vk_layer.h" : YES
> Has header "vulkan/vk_layer_dispatch_table.h" : NO
>
> meson.build:17:4: ERROR: Problem encountered: Vulkan development files not present (vulkan/vk_layer_dispatch_table.h)