2019-08-07 00:48:54 +02:00
|
|
|
{ stdenv, fetchFromGitHub, cmake, python3, spirv-headers }:
|
2016-08-31 12:19:14 +02:00
|
|
|
let
|
2019-02-17 18:52:50 +01:00
|
|
|
# Update spirv-headers rev in lockstep according to DEPs file
|
2019-08-07 00:48:54 +02:00
|
|
|
version = "2019.3";
|
2016-08-31 12:19:14 +02:00
|
|
|
in
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 14:41:18 +02:00
|
|
|
pname = "spirv-tools";
|
2019-02-17 18:52:50 +01:00
|
|
|
inherit version;
|
2016-08-31 12:19:14 +02:00
|
|
|
|
2019-02-17 18:52:50 +01:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "KhronosGroup";
|
|
|
|
repo = "SPIRV-Tools";
|
|
|
|
rev = "v${version}";
|
2019-08-07 00:48:54 +02:00
|
|
|
sha256 = "1wvipjcjsi815ls08s3dz9hwlbb59dbl4syxkskg1k9d5jjph1a8";
|
2019-02-17 18:52:50 +01:00
|
|
|
};
|
2016-09-18 07:19:40 +02:00
|
|
|
enableParallelBuilding = true;
|
2016-08-31 12:19:14 +02:00
|
|
|
|
2019-08-07 00:48:54 +02:00
|
|
|
buildInputs = [ cmake python3 ];
|
2016-08-31 12:19:14 +02:00
|
|
|
|
2019-02-17 18:52:50 +01:00
|
|
|
cmakeFlags = [ "-DSPIRV-Headers_SOURCE_DIR=${spirv-headers.src}" ];
|
2016-09-18 07:19:40 +02:00
|
|
|
|
2016-08-31 12:19:14 +02:00
|
|
|
meta = with stdenv.lib; {
|
|
|
|
inherit (src.meta) homepage;
|
2017-01-04 10:56:26 +01:00
|
|
|
description = "The SPIR-V Tools project provides an API and commands for processing SPIR-V modules";
|
|
|
|
license = licenses.asl20;
|
|
|
|
platforms = platforms.linux;
|
2017-04-01 21:28:59 +02:00
|
|
|
maintainers = [ maintainers.ralith ];
|
2016-08-31 12:19:14 +02:00
|
|
|
};
|
|
|
|
}
|