1{ lib, stdenv
2, fetchzip
3, pkg-config
4, autoPatchelfHook
5, installShellFiles
6, ocl-icd
7, zlib
8}:
9
10stdenv.mkDerivation rec {
11 pname = "computecpp";
12 version = "2.3.0";
13
14 src = fetchzip {
15 url = "https://computecpp.codeplay.com/downloads/computecpp-ce/${version}/x86_64-linux-gnu.tar.gz";
16 hash = "sha256-AUHSls4BOX20PVKzDAp3RqpeRDwgbgYzz6CRvRN+kdk=";
17 stripRoot = true;
18 };
19
20 dontStrip = true;
21
22 buildInputs = [ stdenv.cc.cc.lib ocl-icd zlib ];
23 nativeBuildInputs = [ autoPatchelfHook pkg-config installShellFiles ];
24
25 installPhase = ''
26 runHook preInstall
27
28 find ./lib -type f -exec install -D -m 0755 {} -t $out/lib \;
29 find ./bin -type l -exec install -D -m 0755 {} -t $out/bin \;
30 find ./bin -type f -exec install -D -m 0755 {} -t $out/bin \;
31 find ./doc -type f -exec install -D -m 0644 {} -t $out/doc \;
32 find ./include -type f -exec install -D -m 0644 {} -t $out/include \;
33
34 runHook postInstall
35 '';
36
37 passthru = {
38 isClang = true;
39 };
40
41 meta = with lib; {
42 description =
43 "Accelerate Complex C++ Applications on Heterogeneous Compute Systems using Open Standards";
44 homepage = "https://www.codeplay.com/products/computesuite/computecpp";
45 license = licenses.unfree;
46 maintainers = with maintainers; [ davidtwco ];
47 platforms = [ "x86_64-linux" ];
48 };
49}