summary refs log tree commit diff
path: root/pkgs/development/libraries/libclc/default.nix
blob: c41e2e0a70b5b0b026b7eb6c089f6a2e0aef2601 (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
{ stdenv, fetchsvn, python, llvm, clang }:

stdenv.mkDerivation {
  name = "libclc-2015-03-27";

  src = fetchsvn {
    url = "http://llvm.org/svn/llvm-project/libclc/trunk";
    rev = "233456";
    sha256 = "0g56kgffc1qr9rzhcjr4w8kljcicg0q828s9b4bmfzjvywd7hhr0";
  };

  buildInputs = [ python llvm clang ];

  postPatch = ''
    sed -i 's,llvm_clang =.*,llvm_clang = "${clang}/bin/clang",' configure.py
    sed -i 's,cxx_compiler =.*,cxx_compiler = "${clang}/bin/clang++",' configure.py
  '';

  configurePhase = ''
    python2 ./configure.py --prefix=$out
  '';

  meta = with stdenv.lib; {
    homepage = http://libclc.llvm.org/;
    description = "implementation of the library requirements of the OpenCL C programming language";
    license = licenses.mit;
    platforms = platforms.all;
    maintainers = with maintainers; [ wkennington ];
  };
}