1{ lib, stdenv, fetchFromGitHub, cmake, pkg-config
2, arrayfire, expat, fontconfig, freeimage, freetype, boost
3, mesa, libGLU, libGL, glfw3, SDL2, cudatoolkit
4}:
5
6stdenv.mkDerivation rec {
7 pname = "forge";
8 version = "1.0.4";
9
10 src = fetchFromGitHub {
11 owner = "arrayfire";
12 repo = "forge";
13 rev = "v${version}";
14 sha256 = "00pmky6kccd7pwi8sma79qpmzr2f9pbn6gym3gyqm64yckw6m484";
15 fetchSubmodules = true;
16 };
17
18 nativeBuildInputs = [
19 cmake
20 pkg-config
21 ];
22
23 buildInputs = [
24 expat
25 fontconfig
26 freetype
27 boost.out
28 boost.dev
29 freeimage
30 mesa
31 libGLU libGL
32 glfw3
33 SDL2
34 cudatoolkit
35 arrayfire
36 ];
37
38 meta = with lib; {
39 description = "An OpenGL interop library that can be used with ArrayFire or any other application using CUDA or OpenCL compute backend";
40 longDescription = ''
41 An OpenGL interop library that can be used with ArrayFire or any other application using CUDA or OpenCL compute backend.
42 The goal of Forge is to provide high performance OpenGL visualizations for C/C++ applications that use CUDA/OpenCL.
43 Forge uses OpenGL >=3.3 forward compatible contexts, so please make sure you have capable hardware before trying it out.
44 '';
45 license = licenses.bsd3;
46 homepage = "https://arrayfire.com/";
47 platforms = platforms.linux;
48 maintainers = with maintainers; [ chessai ];
49 };
50
51}