nixpkgs/pkgs/development/tools/spirv-tools/default.nix

32 lines
872 B
Nix
Raw Normal View History

2019-02-17 18:52:50 +01:00
{ stdenv, fetchFromGitHub, cmake, python, 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
version = "2019.1";
2016-08-31 12:19:14 +02:00
in
2019-02-17 18:52:50 +01:00
assert version == spirv-headers.version;
2016-08-31 12:19:14 +02:00
stdenv.mkDerivation rec {
name = "spirv-tools-${version}";
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}";
sha256 = "0vddjzhkrhrm3l3i57nxmq2smv3r1s0ka5ff2kziaahr4hqb479r";
};
enableParallelBuilding = true;
2016-08-31 12:19:14 +02:00
buildInputs = [ cmake python ];
2019-02-17 18:52:50 +01:00
cmakeFlags = [ "-DSPIRV-Headers_SOURCE_DIR=${spirv-headers.src}" ];
2016-08-31 12:19:14 +02:00
meta = with stdenv.lib; {
inherit (src.meta) homepage;
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
};
}