2021-02-05 17:12:51 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, cmake }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "spirv-headers";
|
2022-11-02 22:02:43 +00:00
|
|
|
version = "1.3.231.0";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "KhronosGroup";
|
|
|
|
repo = "SPIRV-Headers";
|
2022-01-25 03:21:06 +00:00
|
|
|
rev = "sdk-${version}";
|
2022-11-02 22:02:43 +00:00
|
|
|
hash = "sha256-lUWgZYGPu+IaLUrbtyC7R0o3Hq/q7C7BE8r7DAsiC30=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [ cmake ];
|
|
|
|
|
2022-09-30 11:47:45 +00:00
|
|
|
# https://github.com/KhronosGroup/SPIRV-Headers/issues/282
|
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace SPIRV-Headers.pc.in \
|
|
|
|
--replace '$'{prefix}/@CMAKE_INSTALL_INCLUDEDIR@ @CMAKE_INSTALL_FULL_INCLUDEDIR@
|
|
|
|
'';
|
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Machine-readable components of the Khronos SPIR-V Registry";
|
2022-12-02 08:20:57 +00:00
|
|
|
homepage = "https://github.com/KhronosGroup/SPIRV-Headers";
|
2020-04-24 23:36:52 +00:00
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = [ maintainers.ralith ];
|
|
|
|
};
|
|
|
|
}
|