Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at 24.05-beta 82 lines 2.0 kB view raw
1{ boost 2, cmake 3, expat 4, fetchFromGitHub 5, fontconfig 6, freeimage 7, freetype 8, glfw3 9, glm 10, lib 11, libGLU 12, libGL 13, mesa 14, opencl-clhpp 15, pkg-config 16, stdenv 17, SDL2 18}: 19 20stdenv.mkDerivation rec { 21 pname = "forge"; 22 version = "1.0.8"; 23 24 src = fetchFromGitHub { 25 owner = "arrayfire"; 26 repo = pname; 27 rev = "v1.0.8"; 28 sha256 = "sha256-lSZAwcqAHiuZkpYcVfwvZCfNmEF3xGN9S/HuZQrGeKU="; 29 }; 30 glad = fetchFromGitHub { 31 owner = "arrayfire"; 32 repo = "glad"; 33 rev = "b94680aee5b8ce01ae1644c5f2661769366c765a"; 34 hash = "sha256-CrZy76gOGMpy9f1NuMK4tokZ57U//zYeNH5ZYY0SC2U="; 35 }; 36 37 # This patch ensures that Forge does not try to fetch glad from GitHub and 38 # uses our sources that we've checked out via Nix. 39 patches = [ ./no-download-glad.patch ]; 40 41 postPatch = '' 42 mkdir -p ./extern 43 cp -R --no-preserve=mode,ownership ${glad} ./extern/fg_glad-src 44 ln -s ${opencl-clhpp} ./extern/cl2hpp 45 ''; 46 47 cmakeFlags = [ "-DFETCHCONTENT_FULLY_DISCONNECTED=ON" ]; 48 49 nativeBuildInputs = [ 50 cmake 51 pkg-config 52 ]; 53 54 buildInputs = [ 55 boost.out 56 boost.dev 57 expat 58 fontconfig 59 freeimage 60 freetype 61 glfw3 62 glm 63 libGL 64 libGLU 65 opencl-clhpp 66 SDL2 67 mesa 68 ]; 69 70 meta = with lib; { 71 description = "An OpenGL interop library that can be used with ArrayFire or any other application using CUDA or OpenCL compute backend"; 72 longDescription = '' 73 An OpenGL interop library that can be used with ArrayFire or any other application using CUDA or OpenCL compute backend. 74 The goal of Forge is to provide high performance OpenGL visualizations for C/C++ applications that use CUDA/OpenCL. 75 Forge uses OpenGL >=3.3 forward compatible contexts, so please make sure you have capable hardware before trying it out. 76 ''; 77 license = licenses.bsd3; 78 homepage = "https://arrayfire.com/"; 79 platforms = platforms.linux; 80 maintainers = with maintainers; [ chessai twesterhout ]; 81 }; 82}