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

40 lines
1.0 KiB
Nix
Raw Normal View History

{ lib, stdenv, fetchFromGitHub, python, llvmPackages }:
2017-12-01 00:00:00 +00:00
let
llvm = llvmPackages.llvm;
clang = llvmPackages.clang;
2019-06-09 12:51:48 +01:00
clang-unwrapped = llvmPackages.clang-unwrapped;
2017-12-01 00:00:00 +00:00
in
2015-03-28 20:54:27 +00:00
stdenv.mkDerivation {
2019-06-09 12:51:48 +01:00
name = "libclc-2019-06-09";
2015-03-28 20:54:27 +00:00
2015-05-13 14:32:32 +01:00
src = fetchFromGitHub {
owner = "llvm-mirror";
repo = "libclc";
2019-06-09 12:51:48 +01:00
rev = "9f6204ec04a8cadb6bef57caa71e3161c4f398f2";
sha256 = "03l9frx3iw3qdsb9rrscgzdwm6872gv6mkssvn027ndf9y321xk7";
2015-03-28 20:54:27 +00:00
};
2018-02-12 19:40:18 +00:00
nativeBuildInputs = [ python ];
2019-06-09 12:51:48 +01:00
buildInputs = [ llvm clang clang-unwrapped ];
2015-03-28 20:54:27 +00:00
postPatch = ''
2019-06-09 12:51:48 +01:00
sed -i 's,llvm_clang =.*,llvm_clang = "${clang-unwrapped}/bin/clang",' configure.py
2015-03-28 20:54:27 +00:00
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
'';
enableParallelBuilding = true;
meta = with 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;
};
}