2021-04-05 15:23:46 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, python3, llvmPackages }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
let
|
|
|
|
llvm = llvmPackages.llvm;
|
|
|
|
clang = llvmPackages.clang;
|
|
|
|
clang-unwrapped = llvmPackages.clang-unwrapped;
|
|
|
|
in
|
|
|
|
|
|
|
|
stdenv.mkDerivation {
|
|
|
|
name = "libclc-2019-06-09";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "llvm-mirror";
|
|
|
|
repo = "libclc";
|
|
|
|
rev = "9f6204ec04a8cadb6bef57caa71e3161c4f398f2";
|
|
|
|
sha256 = "03l9frx3iw3qdsb9rrscgzdwm6872gv6mkssvn027ndf9y321xk7";
|
|
|
|
};
|
|
|
|
|
2021-04-05 15:23:46 +00:00
|
|
|
nativeBuildInputs = [ python3 llvm ];
|
|
|
|
|
|
|
|
strictDeps = true;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
sed -i 's,llvm_clang =.*,llvm_clang = "${clang-unwrapped}/bin/clang",' configure.py
|
|
|
|
sed -i 's,cxx_compiler =.*,cxx_compiler = "${clang}/bin/clang++",' configure.py
|
|
|
|
'';
|
|
|
|
|
|
|
|
configurePhase = ''
|
2021-04-05 15:23:46 +00:00
|
|
|
${python3.interpreter} ./configure.py --prefix=$out
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "http://libclc.llvm.org/";
|
|
|
|
description = "Implementation of the library requirements of the OpenCL C programming language";
|
|
|
|
license = licenses.mit;
|
|
|
|
platforms = platforms.all;
|
|
|
|
};
|
|
|
|
}
|