opencl-headers: 2016-11-29 -> 2017-07-18, provide multiple versions

This commit is contained in:
Jan Malakhovski 2017-12-01 00:00:00 +00:00
parent 7f7e117c94
commit 67a058eda7
2 changed files with 12 additions and 7 deletions

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

@ -10432,7 +10432,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 { };