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

37 lines
946 B
Nix
Raw Normal View History

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