1{ stdenv, fetchFromGitHub, python, llvm, clang }:
2
3stdenv.mkDerivation {
4 name = "libclc-2015-03-27";
5
6 src = fetchFromGitHub {
7 owner = "llvm-mirror";
8 repo = "libclc";
9 rev = "0a2d1619921545b52303be5608b64dc46f381e97";
10 sha256 = "0hgm013c0vlfqfbbf4cdajl01hhk1mhsfk4h4bfza1san97l0vcc";
11 };
12
13 buildInputs = [ python llvm clang ];
14
15 postPatch = ''
16 sed -i 's,llvm_clang =.*,llvm_clang = "${clang}/bin/clang",' configure.py
17 sed -i 's,cxx_compiler =.*,cxx_compiler = "${clang}/bin/clang++",' configure.py
18 '';
19
20 configurePhase = ''
21 python2 ./configure.py --prefix=$out
22 '';
23
24 meta = with stdenv.lib; {
25 homepage = http://libclc.llvm.org/;
26 description = "Implementation of the library requirements of the OpenCL C programming language";
27 license = licenses.mit;
28 platforms = platforms.all;
29 maintainers = with maintainers; [ wkennington ];
30 };
31}