1{ lib
2, stdenv
3, fetchFromGitHub
4, fetchpatch
5, cmake
6, vulkan-headers
7, vulkan-loader
8, fmt
9, glslang
10, ninja
11}:
12
13stdenv.mkDerivation rec {
14 pname = "kompute";
15 version = "0.8.1";
16
17 src = fetchFromGitHub {
18 owner = "KomputeProject";
19 repo = "kompute";
20 rev = "v${version}";
21 sha256 = "sha256-OkVGYh8QrD7JNqWFBLrDTYlk6IYHdvt4i7UtC4sQTzo=";
22 };
23
24 patches = [
25 (fetchpatch {
26 url = "https://github.com/KomputeProject/kompute/commit/9a791b161dd58ca927fe090f65fa2b0e5e85e7ca.diff";
27 sha256 = "OtFTN8sgPlyiMmVzUnqzCkVMKj6DWxbCXtYwkRdEprY=";
28 })
29 (fetchpatch {
30 name = "enum-class-fix-for-fmt-8-x.patch";
31 url = "https://github.com/KomputeProject/kompute/commit/f731f2e55c7aaaa804111106c3e469f9a642d4eb.patch";
32 sha256 = "sha256-scTCYqkgKQnH27xzuY4FVbiwRuwBvChmLPPU7ZUrrL0=";
33 })
34 ];
35
36 cmakeFlags = [
37 "-DKOMPUTE_OPT_INSTALL=1"
38 "-DRELEASE=1"
39 "-DKOMPUTE_ENABLE_SPDLOG=1"
40 ];
41
42 nativeBuildInputs = [ cmake ninja ];
43 buildInputs = [ fmt ];
44 propagatedBuildInputs = [ glslang vulkan-headers vulkan-loader ];
45
46 meta = with lib; {
47 description = "General purpose GPU compute framework built on Vulkan";
48 longDescription = ''
49 General purpose GPU compute framework built on Vulkan to
50 support 1000s of cross vendor graphics cards (AMD,
51 Qualcomm, NVIDIA & friends). Blazing fast, mobile-enabled,
52 asynchronous and optimized for advanced GPU data
53 processing usecases. Backed by the Linux Foundation"
54 '';
55 homepage = "https://kompute.cc/";
56 license = licenses.asl20;
57 maintainers = with maintainers; [ atila ];
58 platforms = platforms.linux;
59 };
60}