From 7f7e117c9483f37761363d7e6c6da32d35eaaef7 Mon Sep 17 00:00:00 2001 From: Jan Malakhovski Date: Fri, 1 Dec 2017 00:00:00 +0000 Subject: [PATCH 1/5] hwloc: disable x11 by default I think nothing actually uses what this feature provides but all headless machines suffer. --- pkgs/development/libraries/hwloc/default.nix | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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 { From 67a058eda715f5ab0a2dbf358358d332e686a4c6 Mon Sep 17 00:00:00 2001 From: Jan Malakhovski Date: Fri, 1 Dec 2017 00:00:00 +0000 Subject: [PATCH 2/5] opencl-headers: 2016-11-29 -> 2017-07-18, provide multiple versions --- .../libraries/opencl-headers/default.nix | 14 ++++++++------ pkgs/top-level/all-packages.nix | 5 ++++- 2 files changed, 12 insertions(+), 7 deletions(-) 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 1cf744741413..14fbc33fd79b 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -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 { }; From 63a1c0c80785b4044546fd37227eeb13e3292b8f Mon Sep 17 00:00:00 2001 From: Jan Malakhovski Date: Fri, 1 Dec 2017 00:00:00 +0000 Subject: [PATCH 3/5] ocl-icd: provide a variant for each opencl-headers version --- pkgs/development/libraries/ocl-icd/default.nix | 2 +- pkgs/top-level/all-packages.nix | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/pkgs/development/libraries/ocl-icd/default.nix b/pkgs/development/libraries/ocl-icd/default.nix index 6c3a77cfaf5e..9c024862197f 100644 --- a/pkgs/development/libraries/ocl-icd/default.nix +++ b/pkgs/development/libraries/ocl-icd/default.nix @@ -16,7 +16,7 @@ stdenv.mkDerivation rec { ''; 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/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 14fbc33fd79b..dfb968c4f8b9 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -10405,7 +10405,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 { }; From d64748295a1be786b875a76afa0688c4642dcded Mon Sep 17 00:00:00 2001 From: Jan Malakhovski Date: Fri, 1 Dec 2017 00:00:00 +0000 Subject: [PATCH 4/5] ocl-icd: fix cross-compilation --- pkgs/development/libraries/ocl-icd/default.nix | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pkgs/development/libraries/ocl-icd/default.nix b/pkgs/development/libraries/ocl-icd/default.nix index 9c024862197f..75dda07494d9 100644 --- a/pkgs/development/libraries/ocl-icd/default.nix +++ b/pkgs/development/libraries/ocl-icd/default.nix @@ -9,7 +9,9 @@ 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 From f036df0321e729f4bc7351f15e9c330ff7c83af6 Mon Sep 17 00:00:00 2001 From: Jan Malakhovski Date: Fri, 1 Dec 2017 00:00:00 +0000 Subject: [PATCH 5/5] libclc: 2017-02-25 -> 2017-11-29 --- pkgs/development/libraries/libclc/default.nix | 15 ++++++++++----- pkgs/top-level/all-packages.nix | 4 +++- 2 files changed, 13 insertions(+), 6 deletions(-) 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/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index dfb968c4f8b9..e1f8cbc6e166 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -9329,7 +9329,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 { };