Merge pull request #34797 from oxij/pkgs/opencl-things

OpenCL things
This commit is contained in:
Franz Pletz 2018-02-12 00:16:16 +00:00 committed by GitHub
commit cb02fae72f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 36 additions and 18 deletions

View File

@ -1,8 +1,9 @@
{ stdenv, fetchurl, pkgconfig, expat, ncurses, pciutils, numactl
, cairo, libX11
, x11Support ? (!stdenv.isCygwin)
, x11Support ? false, libX11 ? null, cairo ? null
}:
assert x11Support -> libX11 != null && cairo != null;
with stdenv.lib;
stdenv.mkDerivation rec {

View File

@ -1,16 +1,21 @@
{ stdenv, fetchFromGitHub, python2, llvm_4, clang }:
{ stdenv, fetchFromGitHub, python2, llvmPackages }:
let
llvm = llvmPackages.llvm;
clang = llvmPackages.clang;
in
stdenv.mkDerivation {
name = "libclc-2017-02-25";
name = "libclc-2017-11-29";
src = fetchFromGitHub {
owner = "llvm-mirror";
repo = "libclc";
rev = "17648cd846390e294feafef21c32c7106eac1e24";
sha256 = "1c20jyh3sdwd9r37zs4vvppmsx8vhf2xbx0cxsrc27bhx5245p0s";
rev = "d6384415ab854c68777dd77451aa2bc0d959da99";
sha256 = "10fqrlnqlknh58x7pfsbg9r07fblfg2mgq2m4fr1jbb836ncn3wh";
};
buildInputs = [ python2 llvm_4 clang ];
buildInputs = [ python2 llvm clang ];
postPatch = ''
sed -i 's,llvm_clang =.*,llvm_clang = "${clang}/bin/clang",' configure.py

View File

@ -9,14 +9,16 @@ stdenv.mkDerivation rec {
sha256 = "0f14gpa13sdm0kzqv5yycp4pschbmi6n5fj7wl4ilspzsrqcgqr2";
};
buildInputs = [ ruby opencl-headers ];
nativeBuildInputs = [ ruby ];
buildInputs = [ opencl-headers ];
postPatch = ''
sed -i 's,"/etc/OpenCL/vendors","${mesa_noglu.driverLink}/etc/OpenCL/vendors",g' ocl_icd_loader.c
'';
meta = with stdenv.lib; {
description = "OpenCL ICD Loader";
description = "OpenCL ICD Loader for ${opencl-headers.name}";
homepage = https://forge.imag.fr/projects/ocl-icd/;
license = licenses.bsd2;
platforms = platforms.linux;

View File

@ -1,22 +1,24 @@
{ stdenv, fetchFromGitHub }:
{ stdenv, fetchFromGitHub
, version # "12" for "1.2", "22" for "2.2" and so on
}:
stdenv.mkDerivation rec {
name = "opencl-headers-2.1-2016-11-29";
name = "opencl-headers-${version}-2017-07-18";
src = fetchFromGitHub {
owner = "KhronosGroup";
repo = "OpenCL-Headers";
rev = "abb29588550c77f8340a6c3683531407013bf26b";
sha256 = "0zjznq65i4b2h4k36qfbbzq1acf2jdd9vygjv5az1yk7qgsp4jj7";
rev = "f039db6764d52388658ef15c30b2237bbda49803";
sha256 = "0z04i330zr8czak2624q71aajdcq7ly8mb5bgala5m235qjpsrh7";
};
installPhase = ''
mkdir -p $out/include/CL
cp * $out/include/CL
cp opencl${version}/CL/* $out/include/CL
'';
meta = with stdenv.lib; {
description = "Khronos OpenCL headers";
description = "Khronos OpenCL headers version ${version}";
homepage = https://www.khronos.org/registry/cl/;
license = licenses.mit;
platforms = platforms.unix;

View File

@ -9343,7 +9343,9 @@ with pkgs;
libchop = callPackage ../development/libraries/libchop { };
libclc = callPackage ../development/libraries/libclc { };
libclc = callPackage ../development/libraries/libclc {
llvmPackages = llvmPackages_5;
};
libcli = callPackage ../development/libraries/libcli { };
@ -10419,7 +10421,10 @@ with pkgs;
nvidia-video-sdk = callPackage ../development/libraries/nvidia-video-sdk { };
ocl-icd = callPackage ../development/libraries/ocl-icd { };
ocl-icd-oclhGen = oclh: callPackage ../development/libraries/ocl-icd { opencl-headers = oclh; };
ocl-icd-oclh_1_2 = ocl-icd-oclhGen opencl-headers_1_2;
ocl-icd-oclh_2_2 = ocl-icd-oclhGen opencl-headers_2_2;
ocl-icd = ocl-icd-oclh_2_2;
ode = callPackage ../development/libraries/ode { };
@ -10446,7 +10451,10 @@ with pkgs;
opencascade_oce = opencascade;
opencl-headers = callPackage ../development/libraries/opencl-headers { };
opencl-headersGen = v: callPackage ../development/libraries/opencl-headers { version = v; };
opencl-headers_1_2 = opencl-headersGen "12";
opencl-headers_2_2 = opencl-headersGen "22";
opencl-headers = opencl-headers_2_2;
opencl-clhpp = callPackage ../development/libraries/opencl-clhpp { };