2024-01-02 11:29:13 +00:00
|
|
|
{ boost
|
|
|
|
, cmake
|
|
|
|
, expat
|
|
|
|
, fetchFromGitHub
|
|
|
|
, fontconfig
|
|
|
|
, freeimage
|
|
|
|
, freetype
|
|
|
|
, glfw3
|
|
|
|
, glm
|
|
|
|
, lib
|
|
|
|
, libGLU
|
|
|
|
, libGL
|
|
|
|
, mesa
|
|
|
|
, opencl-clhpp
|
|
|
|
, pkg-config
|
|
|
|
, stdenv
|
|
|
|
, SDL2
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "forge";
|
2024-01-02 11:29:13 +00:00
|
|
|
version = "1.0.8";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "arrayfire";
|
2024-01-02 11:29:13 +00:00
|
|
|
repo = pname;
|
|
|
|
rev = "v1.0.8";
|
|
|
|
sha256 = "sha256-lSZAwcqAHiuZkpYcVfwvZCfNmEF3xGN9S/HuZQrGeKU=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
2024-01-02 11:29:13 +00:00
|
|
|
glad = fetchFromGitHub {
|
|
|
|
owner = "arrayfire";
|
|
|
|
repo = "glad";
|
|
|
|
rev = "b94680aee5b8ce01ae1644c5f2661769366c765a";
|
|
|
|
hash = "sha256-CrZy76gOGMpy9f1NuMK4tokZ57U//zYeNH5ZYY0SC2U=";
|
|
|
|
};
|
|
|
|
|
|
|
|
# This patch ensures that Forge does not try to fetch glad from GitHub and
|
|
|
|
# uses our sources that we've checked out via Nix.
|
|
|
|
patches = [ ./no-download-glad.patch ];
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
mkdir -p ./extern
|
|
|
|
cp -R --no-preserve=mode,ownership ${glad} ./extern/fg_glad-src
|
|
|
|
ln -s ${opencl-clhpp} ./extern/cl2hpp
|
|
|
|
'';
|
|
|
|
|
|
|
|
cmakeFlags = [ "-DFETCHCONTENT_FULLY_DISCONNECTED=ON" ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
cmake
|
2021-02-05 17:12:51 +00:00
|
|
|
pkg-config
|
2020-04-24 23:36:52 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
boost.out
|
|
|
|
boost.dev
|
2024-01-02 11:29:13 +00:00
|
|
|
expat
|
|
|
|
fontconfig
|
2020-04-24 23:36:52 +00:00
|
|
|
freeimage
|
2024-01-02 11:29:13 +00:00
|
|
|
freetype
|
2020-04-24 23:36:52 +00:00
|
|
|
glfw3
|
2024-01-02 11:29:13 +00:00
|
|
|
glm
|
|
|
|
libGL
|
|
|
|
libGLU
|
|
|
|
opencl-clhpp
|
2020-04-24 23:36:52 +00:00
|
|
|
SDL2
|
2024-01-02 11:29:13 +00:00
|
|
|
mesa
|
2020-04-24 23:36:52 +00:00
|
|
|
];
|
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
meta = with lib; {
|
2024-06-20 14:57:18 +00:00
|
|
|
description = "OpenGL interop library that can be used with ArrayFire or any other application using CUDA or OpenCL compute backend";
|
2020-04-24 23:36:52 +00:00
|
|
|
longDescription = ''
|
|
|
|
An OpenGL interop library that can be used with ArrayFire or any other application using CUDA or OpenCL compute backend.
|
|
|
|
The goal of Forge is to provide high performance OpenGL visualizations for C/C++ applications that use CUDA/OpenCL.
|
|
|
|
Forge uses OpenGL >=3.3 forward compatible contexts, so please make sure you have capable hardware before trying it out.
|
|
|
|
'';
|
|
|
|
license = licenses.bsd3;
|
|
|
|
homepage = "https://arrayfire.com/";
|
|
|
|
platforms = platforms.linux;
|
2024-01-02 11:29:13 +00:00
|
|
|
maintainers = with maintainers; [ chessai twesterhout ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|