summary refs log tree commit diff
path: root/pkgs/development/libraries
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/development/libraries')
-rw-r--r--pkgs/development/libraries/elpa/default.nix4
-rw-r--r--pkgs/development/libraries/mdds/default.nix4
-rw-r--r--pkgs/development/libraries/opencl-clang/default.nix116
-rw-r--r--pkgs/development/libraries/science/math/scalapack/default.nix2
4 files changed, 72 insertions, 54 deletions
diff --git a/pkgs/development/libraries/elpa/default.nix b/pkgs/development/libraries/elpa/default.nix
index 003de885c79..810e04d3a37 100644
--- a/pkgs/development/libraries/elpa/default.nix
+++ b/pkgs/development/libraries/elpa/default.nix
@@ -41,6 +41,8 @@ stdenv.mkDerivation rec {
     substituteInPlace Makefile.am --replace '#!/bin/bash' '#!${stdenv.shell}'
   '';
 
+  outputs = [ "out" "doc" "man" "dev" ];
+
   nativeBuildInputs = [ autoreconfHook perl ];
 
   buildInputs = [ mpi blas lapack scalapack ]
@@ -74,6 +76,8 @@ stdenv.mkDerivation rec {
     ++ lib.optional stdenv.hostPlatform.isx86_64 "--enable-sse-assembly"
     ++ lib.optionals enableCuda [  "--enable-nvidia-gpu" "--with-NVIDIA-GPU-compute-capability=${nvidiaArch}" ];
 
+  enableParallelBuilding = true;
+
   doCheck = true;
 
   nativeCheckInputs = [ mpiCheckPhaseHook openssh ];
diff --git a/pkgs/development/libraries/mdds/default.nix b/pkgs/development/libraries/mdds/default.nix
index 23059b91e7c..ea60c32a08c 100644
--- a/pkgs/development/libraries/mdds/default.nix
+++ b/pkgs/development/libraries/mdds/default.nix
@@ -8,13 +8,13 @@
 
 stdenv.mkDerivation (finalAttrs: {
   pname = "mdds";
-  version = "2.0.3";
+  version = "2.1.1";
 
   src = fetchFromGitLab {
     owner = "mdds";
     repo = "mdds";
     rev = finalAttrs.version;
-    hash = "sha256-Y9uBJKM34UTEj/3c1w69QHhvwFcMNlAohEco0O0B+xI=";
+    hash = "sha256-a412LpgDiYM8TMToaUrTlHtblYS1HehzrDOwvIAAxiA=";
   };
 
   nativeBuildInputs = [ autoreconfHook ];
diff --git a/pkgs/development/libraries/opencl-clang/default.nix b/pkgs/development/libraries/opencl-clang/default.nix
index 3732103d73a..70b80e3a84d 100644
--- a/pkgs/development/libraries/opencl-clang/default.nix
+++ b/pkgs/development/libraries/opencl-clang/default.nix
@@ -1,19 +1,16 @@
 { lib
 , stdenv
+, applyPatches
 , fetchFromGitHub
 , fetchpatch
 , cmake
 , git
-, llvmPackages_11
+, llvmPackages_14
 , spirv-llvm-translator
 , buildWithPatches ? true
 }:
 
 let
-  llvmPkgs = llvmPackages_11 // {
-    inherit spirv-llvm-translator;
-  };
-
   addPatches = component: pkg: pkg.overrideAttrs (oldAttrs: {
     postPatch = oldAttrs.postPatch or "" + ''
       for p in ${passthru.patchesOut}/${component}/*; do
@@ -22,8 +19,13 @@ let
     '';
   });
 
+  llvmPkgs = llvmPackages_14;
+  inherit (llvmPkgs) llvm;
+  spirv-llvm-translator' = spirv-llvm-translator.override { inherit llvm; };
+  libclang = if buildWithPatches then passthru.libclang else llvmPkgs.libclang;
+
   passthru = rec {
-    spirv-llvm-translator = llvmPkgs.spirv-llvm-translator.override { llvm = llvmPackages_11.llvm; };
+    spirv-llvm-translator = spirv-llvm-translator';
     llvm = addPatches "llvm" llvmPkgs.llvm;
     libclang = addPatches "clang" llvmPkgs.libclang;
 
@@ -34,7 +36,7 @@ let
 
     patchesOut = stdenv.mkDerivation {
       pname = "opencl-clang-patches";
-      inherit (library) version src patches;
+      inherit version src;
       # Clang patches assume the root is the llvm root dir
       # but clang root in nixpkgs is the clang sub-directory
       postPatch = ''
@@ -52,56 +54,66 @@ let
     };
   };
 
-  library = let
-    inherit (llvmPackages_11) llvm;
-    inherit (if buildWithPatches then passthru else llvmPkgs) libclang spirv-llvm-translator;
-  in
-    stdenv.mkDerivation {
-      pname = "opencl-clang";
-      version = "unstable-2022-03-16";
-
-
-      src = fetchFromGitHub {
-        owner = "intel";
-        repo = "opencl-clang";
-        rev = "bbdd1587f577397a105c900be114b56755d1f7dc";
-        sha256 = "sha256-qEZoQ6h4XAvSnJ7/gLXBb1qrzeYa6Jp6nij9VFo8MwQ=";
-      };
-
-      patches = [
-        # Build script tries to find Clang OpenCL headers under ${llvm}
-        # Work around it by specifying that directory manually.
-        ./opencl-headers-dir.patch
-      ];
+  version = "unstable-2023-06-12";
+  src = applyPatches {
+    src = fetchFromGitHub {
+      owner = "intel";
+      repo = "opencl-clang";
+      # https://github.com/intel/opencl-clang/compare/ocl-open-140
+      rev = "cf95b338d14685e4f3402ab1828bef31d48f1fd6";
+      hash = "sha256-To1RlQX9IJ+1zAwEXaW7ua3VNfjK9mu7pgsRPsfa8g8=";
+    };
 
+    patches = [
+      # Build script tries to find Clang OpenCL headers under ${llvm}
+      # Work around it by specifying that directory manually.
+      ./opencl-headers-dir.patch
+
+      # fix CMake throwing errors
+      (fetchpatch {
+        url = "https://github.com/intel/opencl-clang/commit/321e3b99c1a8d54c8475f5ae998452069cc5eb71.patch";
+        hash = "sha256-cATbH+AMVtcabhl3EkzAH7w3wGreUV53hQYHVUUEP4g=";
+      })
+    ];
+
+    postPatch = ''
+      # fix not be able to find clang from PATH
+      substituteInPlace cl_headers/CMakeLists.txt \
+        --replace " NO_DEFAULT_PATH" ""
+    '' + lib.optionalString stdenv.isDarwin ''
       # Uses linker flags that are not supported on Darwin.
-      postPatch = lib.optionalString stdenv.isDarwin ''
-        sed -i -e '/SET_LINUX_EXPORTS_FILE/d' CMakeLists.txt
-        substituteInPlace CMakeLists.txt \
-          --replace '-Wl,--no-undefined' ""
-      '';
+      sed -i -e '/SET_LINUX_EXPORTS_FILE/d' CMakeLists.txt
+      substituteInPlace CMakeLists.txt \
+        --replace '-Wl,--no-undefined' ""
+    '';
+  };
+in
 
-      nativeBuildInputs = [ cmake git llvm.dev ];
+stdenv.mkDerivation {
+  pname = "opencl-clang";
+  inherit version src;
 
-      buildInputs = [ libclang llvm spirv-llvm-translator ];
+  nativeBuildInputs = [ cmake git llvm.dev ];
 
-      cmakeFlags = [
-        "-DPREFERRED_LLVM_VERSION=${lib.getVersion llvm}"
-        "-DOPENCL_HEADERS_DIR=${libclang.lib}/lib/clang/${lib.getVersion libclang}/include/"
+  buildInputs = [ libclang llvm spirv-llvm-translator' ];
 
-        "-DLLVMSPIRV_INCLUDED_IN_LLVM=OFF"
-        "-DSPIRV_TRANSLATOR_DIR=${spirv-llvm-translator}"
-      ];
+  cmakeFlags = [
+    "-DPREFERRED_LLVM_VERSION=${lib.getVersion llvm}"
+    "-DOPENCL_HEADERS_DIR=${libclang.lib}/lib/clang/${lib.getVersion libclang}/include/"
 
-      inherit passthru;
+    "-DLLVMSPIRV_INCLUDED_IN_LLVM=OFF"
+    "-DSPIRV_TRANSLATOR_DIR=${spirv-llvm-translator'}"
+  ];
 
-      meta = with lib; {
-        homepage    = "https://github.com/intel/opencl-clang/";
-        description = "A clang wrapper library with an OpenCL-oriented API and the ability to compile OpenCL C kernels to SPIR-V modules";
-        license     = licenses.ncsa;
-        platforms   = platforms.all;
-        maintainers = with maintainers; [ ];
-      };
-    };
-in
-  library
+  inherit passthru;
+
+  meta = with lib; {
+    homepage = "https://github.com/intel/opencl-clang/";
+    description = "A clang wrapper library with an OpenCL-oriented API and the ability to compile OpenCL C kernels to SPIR-V modules";
+    license = licenses.ncsa;
+    maintainers = with maintainers; [ ];
+    platforms = platforms.all;
+    # error: invalid value 'CL3.0' in '-cl-std=CL3.0'
+    broken = stdenv.isDarwin;
+  };
+}
diff --git a/pkgs/development/libraries/science/math/scalapack/default.nix b/pkgs/development/libraries/science/math/scalapack/default.nix
index e2a5e76c558..81bcec50447 100644
--- a/pkgs/development/libraries/science/math/scalapack/default.nix
+++ b/pkgs/development/libraries/science/math/scalapack/default.nix
@@ -34,6 +34,8 @@ stdenv.mkDerivation rec {
     sed -i '/xssep/d;/xsgsep/d;/xssyevr/d' TESTING/CMakeLists.txt
   '';
 
+  outputs = [ "out" "dev" ];
+
   nativeBuildInputs = [ cmake ];
   nativeCheckInputs = [ openssh mpiCheckPhaseHook ];
   buildInputs = [ blas lapack ];