nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{ stdenv
2, fetchzip
3, pkg-config
4, autoPatchelfHook
5, installShellFiles
6, ncurses5
7, ocl-icd
8, zlib
9}:
10
11stdenv.mkDerivation rec {
12 pname = "computecpp";
13 version = "1.2.0";
14
15 src = fetchzip {
16 url = "https://computecpp.codeplay.com/downloads/computecpp-ce/${version}/ubuntu-16.04-64bit.tar.gz";
17 sha256 = "191kwvzxfg1sbaq6aw6f84chi7bhsibb2a63zsyz3gz8m0c0syr5";
18 stripRoot = true;
19 };
20
21 dontStrip = true;
22
23 buildInputs = [ stdenv.cc.cc.lib ncurses5 ocl-icd zlib ];
24 nativeBuildInputs = [ autoPatchelfHook pkg-config installShellFiles ];
25
26 installPhase = ''
27 runHook preInstall
28
29 find ./lib -type f -exec install -D -m 0755 {} -t $out/lib \;
30 find ./bin -type l -exec install -D -m 0755 {} -t $out/bin \;
31 find ./bin -type f -exec install -D -m 0755 {} -t $out/bin \;
32 find ./doc -type f -exec install -D -m 0644 {} -t $out/doc \;
33 find ./include -type f -exec install -D -m 0644 {} -t $out/include \;
34
35 runHook postInstall
36 '';
37
38 passthru = {
39 isClang = true;
40 } // stdenv.lib.optionalAttrs (stdenv.targetPlatform.isLinux || (stdenv.cc.isGNU && stdenv.cc.cc ? gcc)) {
41 gcc = if stdenv.cc.isGNU then stdenv.cc.cc else stdenv.cc.cc.gcc;
42 };
43
44 meta = with stdenv.lib; {
45 description =
46 "Accelerate Complex C++ Applications on Heterogeneous Compute Systems using Open Standards";
47 homepage = https://www.codeplay.com/products/computesuite/computecpp;
48 license = licenses.unfree;
49 maintainers = with maintainers; [ davidtwco ];
50 platforms = [ "x86_64-linux" ];
51 };
52}