summary refs log tree commit diff
path: root/pkgs/development/libraries/coprthr/default.nix
blob: 86f4485a900d81369b97b2e15e67124e9f879f96 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
{ stdenv, fetchurl, libelf, libconfig, libevent, which, unzip, perl, python
, bison, flex }:

stdenv.mkDerivation rec {
  pname = "coprthr";
  version = "1.6";

  src = fetchurl {
    url    = "https://github.com/browndeer/coprthr/archive/stable-${version}.zip";
    sha256 = "0ilx4v1ydppjnq1i0z5j0x4lmi29z39sappar7c0wqady0b5dpz9";
  };

  buildInputs =
    [ libelf libconfig libevent which unzip perl python bison flex ];

  patchPhase = ''
    for x in src/libocl/gen_oclcall_hook.pl tools/cltrace/gen_interceptor.pl src/libocl/gen_oclcall.pl src/scripts/gen_ocl_call_vector.pl src/libstdcl/gen_clarg_setn.pl; do
      substituteInPlace $x --replace "/usr/bin/perl" ${perl}/bin/perl
    done
  '';

  configureFlags =
    [ "--with-libelf=${libelf}"
      "--with-libevent=${libevent.dev}"
      "--with-libconfig=${libconfig}"
      "--with-opencl-icd-path=$out/etc/OpenCL/vendors"
      "--enable-user-install"
    ];

  meta = {
    description = "The CO-PRocessing THReads SDK for OpenCL/STDCL";
    homepage    = "http://www.browndeertechnology.com/coprthr.htm";
    license     = stdenv.lib.licenses.lgpl3;
    platforms   = stdenv.lib.platforms.linux;
    maintainers = [ stdenv.lib.maintainers.thoughtpolice ];
    broken = true;
  };
}