nixpkgs/pkgs/development/libraries/spirv-headers/default.nix
2022-10-25 15:23:53 -03:00

29 lines
764 B
Nix

{ lib, stdenv, fetchFromGitHub, cmake }:
stdenv.mkDerivation rec {
pname = "spirv-headers";
version = "1.3.231.0";
src = fetchFromGitHub {
owner = "KhronosGroup";
repo = "SPIRV-Headers";
rev = "sdk-${version}";
hash = "sha256-lUWgZYGPu+IaLUrbtyC7R0o3Hq/q7C7BE8r7DAsiC30=";
};
nativeBuildInputs = [ cmake ];
# https://github.com/KhronosGroup/SPIRV-Headers/issues/282
postPatch = ''
substituteInPlace SPIRV-Headers.pc.in \
--replace '$'{prefix}/@CMAKE_INSTALL_INCLUDEDIR@ @CMAKE_INSTALL_FULL_INCLUDEDIR@
'';
meta = with lib; {
inherit (src.meta) homepage;
description = "Machine-readable components of the Khronos SPIR-V Registry";
license = licenses.mit;
maintainers = [ maintainers.ralith ];
};
}