Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ lib, stdenv, fetchFromGitHub, cmake }:
2
3stdenv.mkDerivation rec {
4 pname = "spirv-headers";
5 version = "1.3.243.0";
6
7 src = fetchFromGitHub {
8 owner = "KhronosGroup";
9 repo = "SPIRV-Headers";
10 rev = "sdk-${version}";
11 hash = "sha256-VOq3r6ZcbDGGxjqC4IoPMGC5n1APUPUAs9xcRzxdyfk=";
12 };
13
14 nativeBuildInputs = [ cmake ];
15
16 # https://github.com/KhronosGroup/SPIRV-Headers/issues/282
17 postPatch = ''
18 substituteInPlace SPIRV-Headers.pc.in \
19 --replace '$'{prefix}/@CMAKE_INSTALL_INCLUDEDIR@ @CMAKE_INSTALL_FULL_INCLUDEDIR@
20 '';
21
22 meta = with lib; {
23 description = "Machine-readable components of the Khronos SPIR-V Registry";
24 homepage = "https://github.com/KhronosGroup/SPIRV-Headers";
25 license = licenses.mit;
26 maintainers = [ maintainers.ralith ];
27 };
28}