diff --git a/pkgs/development/libraries/hwloc/default.nix b/pkgs/development/libraries/hwloc/default.nix index c0745cb9e687..ad39a4fde319 100644 --- a/pkgs/development/libraries/hwloc/default.nix +++ b/pkgs/development/libraries/hwloc/default.nix @@ -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 { diff --git a/pkgs/development/libraries/libclc/default.nix b/pkgs/development/libraries/libclc/default.nix index c5ba65e7b6d7..bd9130e3f507 100644 --- a/pkgs/development/libraries/libclc/default.nix +++ b/pkgs/development/libraries/libclc/default.nix @@ -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 diff --git a/pkgs/development/libraries/ocl-icd/default.nix b/pkgs/development/libraries/ocl-icd/default.nix index 6c3a77cfaf5e..75dda07494d9 100644 --- a/pkgs/development/libraries/ocl-icd/default.nix +++ b/pkgs/development/libraries/ocl-icd/default.nix @@ -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; diff --git a/pkgs/development/libraries/opencl-headers/default.nix b/pkgs/development/libraries/opencl-headers/default.nix index 717bb5ad0eed..9ce8bb618bf9 100644 --- a/pkgs/development/libraries/opencl-headers/default.nix +++ b/pkgs/development/libraries/opencl-headers/default.nix @@ -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; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 716ca74e015c..4546287862e4 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -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 { };