nixpkgs/pkgs/development/libraries/libclc/default.nix

38 lines
999 B
Nix
Raw Normal View History

{ stdenv, fetchFromGitHub, python, llvmPackages }:
2017-12-01 00:00:00 +00:00
let
llvm = llvmPackages.llvm;
clang = llvmPackages.clang;
in
2015-03-28 20:54:27 +00:00
stdenv.mkDerivation {
2017-12-01 00:00:00 +00:00
name = "libclc-2017-11-29";
2015-03-28 20:54:27 +00:00
2015-05-13 14:32:32 +01:00
src = fetchFromGitHub {
owner = "llvm-mirror";
repo = "libclc";
2017-12-01 00:00:00 +00:00
rev = "d6384415ab854c68777dd77451aa2bc0d959da99";
sha256 = "10fqrlnqlknh58x7pfsbg9r07fblfg2mgq2m4fr1jbb836ncn3wh";
2015-03-28 20:54:27 +00:00
};
2018-02-12 19:40:18 +00:00
nativeBuildInputs = [ python ];
buildInputs = [ llvm clang ];
2015-03-28 20:54:27 +00:00
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 = ''
2018-02-12 19:40:18 +00:00
${python.interpreter} ./configure.py --prefix=$out
2015-03-28 20:54:27 +00:00
'';
meta = with stdenv.lib; {
homepage = http://libclc.llvm.org/;
2015-05-13 14:32:32 +01:00
description = "Implementation of the library requirements of the OpenCL C programming language";
2015-03-28 20:54:27 +00:00
license = licenses.mit;
platforms = platforms.all;
maintainers = with maintainers; [ wkennington ];
};
}