about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/libraries/science
diff options
context:
space:
mode:
authorAlyssa Ross <hi@alyssa.is>2023-10-20 22:09:03 +0000
committerAlyssa Ross <hi@alyssa.is>2023-10-20 22:09:03 +0000
commit50c21d167f7114fa1dbd95e5c4fb30eeb1a2d02e (patch)
treef2556b911180125ccbb7ed0e78a54e92da89adce /nixpkgs/pkgs/development/libraries/science
parent4c16d4548a98563c9d9ad76f4e5b2202864ccd54 (diff)
parentcfc75eec4603c06503ae750f88cf397e00796ea8 (diff)
downloadnixlib-50c21d167f7114fa1dbd95e5c4fb30eeb1a2d02e.tar
nixlib-50c21d167f7114fa1dbd95e5c4fb30eeb1a2d02e.tar.gz
nixlib-50c21d167f7114fa1dbd95e5c4fb30eeb1a2d02e.tar.bz2
nixlib-50c21d167f7114fa1dbd95e5c4fb30eeb1a2d02e.tar.lz
nixlib-50c21d167f7114fa1dbd95e5c4fb30eeb1a2d02e.tar.xz
nixlib-50c21d167f7114fa1dbd95e5c4fb30eeb1a2d02e.tar.zst
nixlib-50c21d167f7114fa1dbd95e5c4fb30eeb1a2d02e.zip
Merge commit 'cfc75eec4603c06503ae750f88cf397e00796ea8'
Conflicts:
	nixpkgs/pkgs/build-support/rust/build-rust-package/default.nix
Diffstat (limited to 'nixpkgs/pkgs/development/libraries/science')
-rw-r--r--nixpkgs/pkgs/development/libraries/science/astronomy/indilib/default.nix11
-rw-r--r--nixpkgs/pkgs/development/libraries/science/astronomy/indilib/indi-3rdparty.nix19
-rw-r--r--nixpkgs/pkgs/development/libraries/science/astronomy/indilib/indi-firmware.nix22
-rw-r--r--nixpkgs/pkgs/development/libraries/science/astronomy/indilib/indi-with-drivers.nix10
-rw-r--r--nixpkgs/pkgs/development/libraries/science/astronomy/stellarsolver/default.nix4
-rw-r--r--nixpkgs/pkgs/development/libraries/science/biology/mirtk/default.nix52
-rw-r--r--nixpkgs/pkgs/development/libraries/science/chemistry/tblite/python.nix9
-rw-r--r--nixpkgs/pkgs/development/libraries/science/math/amd-blis/default.nix16
-rw-r--r--nixpkgs/pkgs/development/libraries/science/math/amd-libflame/add-lapacke.diff34
-rw-r--r--nixpkgs/pkgs/development/libraries/science/math/amd-libflame/default.nix66
-rw-r--r--nixpkgs/pkgs/development/libraries/science/math/arpack/default.nix25
-rw-r--r--nixpkgs/pkgs/development/libraries/science/math/magma/generic.nix21
-rw-r--r--nixpkgs/pkgs/development/libraries/science/math/openspecfun/default.nix4
-rw-r--r--nixpkgs/pkgs/development/libraries/science/math/or-tools/default.nix3
-rw-r--r--nixpkgs/pkgs/development/libraries/science/math/or-tools/fix-stringview-compile.patch36
-rw-r--r--nixpkgs/pkgs/development/libraries/science/math/scalapack/default.nix2
16 files changed, 197 insertions, 137 deletions
diff --git a/nixpkgs/pkgs/development/libraries/science/astronomy/indilib/default.nix b/nixpkgs/pkgs/development/libraries/science/astronomy/indilib/default.nix
index d6d8919ccddf..0b4526e6e1eb 100644
--- a/nixpkgs/pkgs/development/libraries/science/astronomy/indilib/default.nix
+++ b/nixpkgs/pkgs/development/libraries/science/astronomy/indilib/default.nix
@@ -1,9 +1,11 @@
 { stdenv
 , lib
 , fetchFromGitHub
+, bash
 , cmake
 , cfitsio
 , libusb1
+, kmod
 , zlib
 , boost
 , libev
@@ -58,6 +60,15 @@ stdenv.mkDerivation rec {
   # Socket address collisions between tests
   enableParallelChecking = false;
 
+  postFixup = lib.optionalString stdenv.isLinux ''
+    for f in $out/lib/udev/rules.d/*.rules
+    do
+      substituteInPlace $f --replace "/bin/sh" "${bash}/bin/sh" \
+                           --replace "/sbin/modprobe" "${kmod}/sbin/modprobe"
+    done
+  '';
+
+
   meta = with lib; {
     homepage = "https://www.indilib.org/";
     description = "Implementation of the INDI protocol for POSIX operating systems";
diff --git a/nixpkgs/pkgs/development/libraries/science/astronomy/indilib/indi-3rdparty.nix b/nixpkgs/pkgs/development/libraries/science/astronomy/indilib/indi-3rdparty.nix
index 2423a6e20e34..fdbdb4db24bf 100644
--- a/nixpkgs/pkgs/development/libraries/science/astronomy/indilib/indi-3rdparty.nix
+++ b/nixpkgs/pkgs/development/libraries/science/astronomy/indilib/indi-3rdparty.nix
@@ -1,6 +1,8 @@
 { stdenv
 , lib
+, bash
 , cmake
+, coreutils
 , cfitsio
 , libusb1
 , zlib
@@ -24,6 +26,10 @@
 , firmware ? null
 }:
 
+let
+  libusb-with-fxload = libusb1.override { withExamples = true;};
+in
+
 stdenv.mkDerivation rec {
   pname = "indi-3rdparty";
 
@@ -68,6 +74,19 @@ stdenv.mkDerivation rec {
     "-DWITH_SBIG=off"
   ];
 
+  postFixup = lib.optionalString stdenv.isLinux ''
+    for f in $out/lib/udev/rules.d/*.rules
+    do
+      substituteInPlace $f --replace "/sbin/fxload" "${libusb-with-fxload}/sbin/fxload" \
+                           --replace "/lib/firmware/" "$out/lib/firmware/" \
+                           --replace "/bin/sleep" "${coreutils}/bin/sleep" \
+                           --replace "/bin/cat" "${coreutils}/bin/cat" \
+                           --replace "/bin/echo" "${coreutils}/bin/echo" \
+                           --replace "/bin/sh" "${bash}/bin/sh"
+    done
+  '';
+
+
   meta = with lib; {
     homepage = "https://www.indilib.org/";
     description = "Third party drivers for the INDI astronomical software suite";
diff --git a/nixpkgs/pkgs/development/libraries/science/astronomy/indilib/indi-firmware.nix b/nixpkgs/pkgs/development/libraries/science/astronomy/indilib/indi-firmware.nix
index 7875051cbf79..102a8b901cce 100644
--- a/nixpkgs/pkgs/development/libraries/science/astronomy/indilib/indi-firmware.nix
+++ b/nixpkgs/pkgs/development/libraries/science/astronomy/indilib/indi-firmware.nix
@@ -1,7 +1,9 @@
 { stdenv
 , lib
+, bash
 , cmake
 , cfitsio
+, coreutils
 , libusb1
 , zlib
 , boost
@@ -21,7 +23,9 @@
 , src
 , autoPatchelfHook
 }:
-
+let
+  libusb-with-fxload = libusb1.override { withExamples = true;};
+in
 stdenv.mkDerivation rec {
   pname = "indi-firmware";
 
@@ -39,7 +43,8 @@ stdenv.mkDerivation rec {
     "-DCMAKE_INSTALL_LIBDIR=lib"
     "-DUDEVRULES_INSTALL_DIR=lib/udev/rules.d"
     "-DRULES_INSTALL_DIR=lib/udev/rules.d"
-    "-DFIRMWARE_INSTALL_DIR=\${CMAKE_INSTALL_PREFIX}/lib/firmware"
+    "-DFIRMWARE_INSTALL_DIR=lib/firmware"
+    "-DQHY_FIRMWARE_INSTALL_DIR=\${CMAKE_INSTALL_PREFIX}/lib/firmware/qhy"
     "-DCONF_DIR=etc"
     "-DBUILD_LIBS=1"
     "-DWITH_PENTAX=off"
@@ -52,8 +57,17 @@ stdenv.mkDerivation rec {
     done
   '';
 
-  postFixup = ''
-    rm $out/lib/udev/rules.d/99-fli.rules
+  postFixup = lib.optionalString stdenv.isLinux ''
+    for f in $out/lib/udev/rules.d/*.rules
+    do
+      substituteInPlace "$f" --replace "/sbin/fxload" "${libusb-with-fxload}/sbin/fxload" \
+                             --replace "/bin/sleep" "${coreutils}/bin/sleep" \
+                             --replace "/bin/cat" "${coreutils}/bin/cat" \
+                             --replace "/bin/echo" "${coreutils}/bin/echo" \
+                             --replace "/bin/sh" "${bash}/bin/sh" \
+                             --replace "/lib/firmware/" "$out/lib/firmware/"
+      sed -e 's|-D $env{DEVNAME}|-p $env{BUSNUM},$env{DEVNUM}|' -i "$f"
+    done
   '';
 
   meta = with lib; {
diff --git a/nixpkgs/pkgs/development/libraries/science/astronomy/indilib/indi-with-drivers.nix b/nixpkgs/pkgs/development/libraries/science/astronomy/indilib/indi-with-drivers.nix
index 5ec1acdf21e9..f1201df1d8a0 100644
--- a/nixpkgs/pkgs/development/libraries/science/astronomy/indilib/indi-with-drivers.nix
+++ b/nixpkgs/pkgs/development/libraries/science/astronomy/indilib/indi-with-drivers.nix
@@ -1,4 +1,4 @@
-{ buildEnv, indilib ? indilib, pname ? "indi-with-drivers", version ? null, extraDrivers ? null }:
+{ buildEnv, makeBinaryWrapper, indilib ? indilib, pname ? "indi-with-drivers", version ? null, extraDrivers ? null }:
 
 buildEnv {
   name = "${pname}-${version}";
@@ -6,5 +6,13 @@ buildEnv {
     indilib
   ]
   ++ extraDrivers;
+
+  nativeBuildInputs = [ makeBinaryWrapper ];
+
+  postBuild = ''
+    makeBinaryWrapper ${indilib}/bin/indiserver $out/bin/indiserver --set-default INDIPREFIX $out
+  '';
+
+
   inherit (indilib) meta;
 }
diff --git a/nixpkgs/pkgs/development/libraries/science/astronomy/stellarsolver/default.nix b/nixpkgs/pkgs/development/libraries/science/astronomy/stellarsolver/default.nix
index ff1cb5026fdf..8c6eb60d1d2b 100644
--- a/nixpkgs/pkgs/development/libraries/science/astronomy/stellarsolver/default.nix
+++ b/nixpkgs/pkgs/development/libraries/science/astronomy/stellarsolver/default.nix
@@ -3,13 +3,13 @@
 
 mkDerivation rec {
   pname = "stellarsolver";
-  version = "2.4";
+  version = "2.5";
 
   src = fetchFromGitHub {
     owner = "rlancaste";
     repo = pname;
     rev = version;
-    sha256 = "sha256-HYNkpgkiRtA1ZsiFkmYk3MT3fKgs2d2neSExVXBbsPc=";
+    sha256 = "sha256-0bFGHlkZnAZlnxlj8tY3s9yTWgkNtSsPFfudB3uvyOA=";
   };
 
   nativeBuildInputs = [ cmake ];
diff --git a/nixpkgs/pkgs/development/libraries/science/biology/mirtk/default.nix b/nixpkgs/pkgs/development/libraries/science/biology/mirtk/default.nix
index de419dc3d575..b6adf67cbe82 100644
--- a/nixpkgs/pkgs/development/libraries/science/biology/mirtk/default.nix
+++ b/nixpkgs/pkgs/development/libraries/science/biology/mirtk/default.nix
@@ -1,14 +1,27 @@
-{ lib, stdenv, gtest, fetchFromGitHub, cmake, boost, eigen, python3, vtk_8, zlib, tbb }:
+{ lib
+, stdenv
+, fetchFromGitHub
+, cmake
+, python3
+, boost
+, eigen
+, libGLU
+, fltk
+, itk
+, vtk
+, zlib
+, tbb
+}:
 
 stdenv.mkDerivation rec {
-  version = "2.0.0";
   pname = "mirtk";
+  version = "unstable-2022-07-22";
 
   src = fetchFromGitHub {
     owner = "BioMedIA";
     repo = "MIRTK";
-    rev = "v${version}";
-    sha256 = "0i2v97m66ir5myvi5b123r7zcagwy551b73s984gk7lksl5yiqxk";
+    rev = "973ce2fe3f9508dec68892dbf97cca39067aa3d6";
+    hash = "sha256-vKgkDrbyGOcbaYlxys1duC8ZNG0Y2nqh3TtSQ06Ox0Q=";
     fetchSubmodules = true;
   };
 
@@ -16,23 +29,36 @@ stdenv.mkDerivation rec {
     "-DWITH_VTK=ON"
     "-DBUILD_ALL_MODULES=ON"
     "-DWITH_TBB=ON"
+    "-DWITH_ITK=ON"
+    "-DWITH_GIFTICLIB=ON"
+    "-DWITH_NIFTILIB=ON"
   ];
 
-  doCheck = true;
-
-  checkPhase = ''
-    ctest -E '(Polynomial|ConvolutionFunction|Downsampling|EdgeTable|InterpolateExtrapolateImage)'
+  # tries to download data during configuration
+  postPatch = ''
+    substituteInPlace Packages/DrawEM/CMakeLists.txt --replace "include(Atlases.cmake)" ""
   '';
-  # testPolynomial - segfaults for some reason
-  # testConvolutionFunction, testDownsampling - main not called correctly
-  # testEdgeTable, testInterpolateExtrapolateImageFunction - setup fails
+
+  # tests don't seem to be maintained and gtest fails to link with BUILD_TESTING=ON;
+  # unclear if specific to Nixpkgs
+  doCheck = false;
 
   postInstall = ''
     install -Dm644 -t "$out/share/bash-completion/completions/mirtk" share/completion/bash/mirtk
   '';
 
-  nativeBuildInputs = [ cmake gtest ];
-  buildInputs = [ boost eigen python3 vtk_8 zlib tbb ];
+  nativeBuildInputs = [ cmake ];
+  buildInputs = [
+    boost
+    eigen
+    fltk
+    itk
+    libGLU.dev
+    python3
+    tbb
+    vtk
+    zlib
+  ];
 
   meta = with lib; {
     homepage = "https://github.com/BioMedIA/MIRTK";
diff --git a/nixpkgs/pkgs/development/libraries/science/chemistry/tblite/python.nix b/nixpkgs/pkgs/development/libraries/science/chemistry/tblite/python.nix
index f19c3377b178..8bf30f970056 100644
--- a/nixpkgs/pkgs/development/libraries/science/chemistry/tblite/python.nix
+++ b/nixpkgs/pkgs/development/libraries/science/chemistry/tblite/python.nix
@@ -47,12 +47,5 @@ buildPythonPackage {
 
   format = "other";
   pythonImportsCheck = [ "tblite" "tblite.interface" ];
-  configurePhase = ''
-    runHook preConfigure
-
-    meson setup build -Dpython=true --prefix=$out
-    cd build
-
-    runHook postConfigure
-  '';
+  mesonFlags = [ "-Dpython=true" ];
 }
diff --git a/nixpkgs/pkgs/development/libraries/science/math/amd-blis/default.nix b/nixpkgs/pkgs/development/libraries/science/math/amd-blis/default.nix
index 962e8e8e6ace..f6d00411221c 100644
--- a/nixpkgs/pkgs/development/libraries/science/math/amd-blis/default.nix
+++ b/nixpkgs/pkgs/development/libraries/science/math/amd-blis/default.nix
@@ -6,10 +6,10 @@
 # Enable BLAS interface with 64-bit integer width.
 , blas64 ? false
 
-# Target architecture. "amd64" compiles kernels for all Zen
+# Target architecture. "amdzen" compiles kernels for all Zen
 # generations. To build kernels for specific Zen generations,
-# use "zen", "zen2", or "zen3".
-, withArchitecture ? "amd64"
+# use "zen", "zen2", "zen3", or "zen4".
+, withArchitecture ? "amdzen"
 
 # Enable OpenMP-based threading.
 , withOpenMP ? true
@@ -18,15 +18,16 @@
 let
   threadingSuffix = lib.optionalString withOpenMP "-mt";
   blasIntSize = if blas64 then "64" else "32";
+
 in stdenv.mkDerivation rec {
   pname = "amd-blis";
-  version = "3.0";
+  version = "4.1";
 
   src = fetchFromGitHub {
     owner = "amd";
     repo = "blis";
     rev = version;
-    hash = "sha256-bbbeo1yOKse9pzbsB6lQ7pULKdzu3G7zJzTUgPXiMZY=";
+    hash = "sha256-1vd4uBg/+Vufqsr+MnAWSUW/THkribHNSMeq1/is8K4=";
   };
 
   inherit blas64;
@@ -54,8 +55,9 @@ in stdenv.mkDerivation rec {
   '';
 
   postInstall = ''
-    ln -s $out/lib/libblis${threadingSuffix}.so.3 $out/lib/libblas.so.3
-    ln -s $out/lib/libblis${threadingSuffix}.so.3 $out/lib/libcblas.so.3
+    ls $out/lib
+    ln -s $out/lib/libblis${threadingSuffix}.so $out/lib/libblas.so.3
+    ln -s $out/lib/libblis${threadingSuffix}.so $out/lib/libcblas.so.3
     ln -s $out/lib/libblas.so.3 $out/lib/libblas.so
     ln -s $out/lib/libcblas.so.3 $out/lib/libcblas.so
   '';
diff --git a/nixpkgs/pkgs/development/libraries/science/math/amd-libflame/add-lapacke.diff b/nixpkgs/pkgs/development/libraries/science/math/amd-libflame/add-lapacke.diff
deleted file mode 100644
index 3e3ef1e60ff5..000000000000
--- a/nixpkgs/pkgs/development/libraries/science/math/amd-libflame/add-lapacke.diff
+++ /dev/null
@@ -1,34 +0,0 @@
-diff --git a/Makefile b/Makefile
-index 5549ce30..ac2ee51e 100644
---- a/Makefile
-+++ b/Makefile
-@@ -583,14 +583,14 @@ endif
- 
- # --- Shared library linker rules ---
- 
--$(LIBFLAME_SO_PATH): $(MK_ALL_FLAMEC_OBJS)
-+$(LIBFLAME_SO_PATH): $(MK_ALL_FLAMEC_OBJS) $(LAPACKE_A_PATH)
- ifeq ($(ENABLE_VERBOSE),yes)
- ifeq ($(FLA_ENABLE_MAX_ARG_LIST_HACK),yes)
- 	$(CAT) $(AR_OBJ_LIST_FILE) | xargs -n$(AR_CHUNK_SIZE) $(AR) $(ARFLAGS) $(LIBFLAME_A)
- ifeq ($(OS_NAME),Darwin)
--	$(LINKER) $(SOFLAGS) -o $@ -Wl,-force_load,$(LIBFLAME_A) $(LDFLAGS)
-+	$(LINKER) $(SOFLAGS) -o $@ -Wl,-force_load,$(LIBFLAME_A),$(LAPACKE_A_PATH) $(LDFLAGS)
- else
--	$(LINKER) $(SOFLAGS) -o $@ -Wl,--whole-archive,$(LIBFLAME_A),--no-whole-archive $(LDFLAGS)
-+	$(LINKER) $(SOFLAGS) -o $@ -Wl,--whole-archive,$(LIBFLAME_A),$(LAPACKE_A_PATH)--no-whole-archive $(LDFLAGS)
- endif
- else
- #	NOTE: Can't use $^ automatic variable as long as $(AR_OBJ_LIST_FILE) is in
-@@ -602,9 +602,9 @@ else
- ifeq ($(FLA_ENABLE_MAX_ARG_LIST_HACK),yes)
- 	@$(CAT) $(AR_OBJ_LIST_FILE) | xargs -n$(AR_CHUNK_SIZE) $(AR) $(ARFLAGS) $(LIBFLAME_A)
- ifeq ($(OS_NAME),Darwin)
--	@$(LINKER) $(SOFLAGS) -o $@ -Wl,-force_load,$(LIBFLAME_A) $(LDFLAGS)
-+	@$(LINKER) $(SOFLAGS) -o $@ -Wl,-force_load,$(LIBFLAME_A),$(LAPACKE_A_PATH) $(LDFLAGS)
- else
--	@$(LINKER) $(SOFLAGS) -o $@ -Wl,--whole-archive,$(LIBFLAME_A),--no-whole-archive $(LDFLAGS)
-+	@$(LINKER) $(SOFLAGS) -o $@ -Wl,--whole-archive,$(LIBFLAME_A),$(LAPACKE_A_PATH),--no-whole-archive $(LDFLAGS)
- endif
- else
- #	NOTE: Can't use $^ automatic variable as long as $(AR_OBJ_LIST_FILE) is in
diff --git a/nixpkgs/pkgs/development/libraries/science/math/amd-libflame/default.nix b/nixpkgs/pkgs/development/libraries/science/math/amd-libflame/default.nix
index a5b657379411..2ed35d26b907 100644
--- a/nixpkgs/pkgs/development/libraries/science/math/amd-libflame/default.nix
+++ b/nixpkgs/pkgs/development/libraries/science/math/amd-libflame/default.nix
@@ -1,78 +1,62 @@
 { lib
 , stdenv
 , fetchFromGitHub
+, cmake
 , gfortran
 , python3
 , amd-blis
+, aocl-utils
 
 , withOpenMP ? true
 , blas64 ? false
+, withAMDOpt ? false
 }:
 
-# right now only LP64 is supported
-assert !blas64;
-
 stdenv.mkDerivation rec {
   pname = "amd-libflame";
-  version = "3.0";
+  version = "4.1";
 
   src = fetchFromGitHub {
     owner = "amd";
     repo = "libflame";
     rev = version;
-    hash = "sha256-jESae5NqANw90RBbIHH2oGEq5/mudc4IONv50P/AeQ0=";
+    hash = "sha256-SZk11oOAnvn1vb7ucX6U9b0YtAJNxl3tQu4ExHpwwoo=";
   };
 
-  patches = [
-    # The LAPACKE interface is compiled as a separate static library,
-    # we want the main dynamic library to provide LAPACKE symbols.
-    # This patch adds lapacke.a to the shared library as well.
-    ./add-lapacke.diff
-  ];
-
-  passthru = { inherit blas64; };
-
-  nativeBuildInputs = [ gfortran python3 ];
+  postPatch = ''
+    patchShebangs build
 
-  buildInputs = [ amd-blis ];
+    # Enforce reproducible build compiler flags
+    substituteInPlace CMakeLists.txt --replace '-mtune=native' ""
+  '';
 
-  configureFlags = [
-    # Build a dynamic library with a LAPACK interface.
-    "--disable-static-build"
-    "--enable-dynamic-build"
-    "--enable-lapack2flame"
+  passthru = { inherit blas64; };
 
-    # Use C BLAS interface.
-    "--enable-cblas-interfaces"
+  nativeBuildInputs = [ cmake gfortran python3 ];
 
-    # Avoid overloading maximum number of arguments.
-    "--enable-max-arg-list-hack"
+  buildInputs = [ amd-blis aocl-utils ];
 
-    # libflame by default leaves BLAS symbols unresolved and leaves it
-    # up to the application to explicitly link to a BLAS. This is
-    # problematic for us, since then the BLAS library becomes an
-    # implicit dependency. Moreover, since the point of the AMD forks
-    # is to optimized for recent AMD CPUs, link against AMD BLIS.
-    "LDFLAGS=-lcblas"
+  cmakeFlags = [
+    "-DLIBAOCLUTILS_LIBRARY_PATH=${lib.getLib aocl-utils}/lib"
+    "-DLIBAOCLUTILS_INCLUDE_PATH=${lib.getDev aocl-utils}/include"
+    "-DENABLE_BUILTIN_LAPACK2FLAME=ON"
+    "-DENABLE_CBLAS_INTERFACES=ON"
+    "-DENABLE_EXT_LAPACK_INTERFACE=ON"
   ]
-  ++ lib.optionals withOpenMP [ "--enable-multithreading=openmp" ];
-
-  enableParallelBuilding = true;
-
-  postPatch = ''
-    patchShebangs build
-  '';
+  ++ lib.optional (!withOpenMP) "ENABLE_MULTITHREADING=OFF"
+  ++ lib.optional blas64 "ENABLE_ILP64=ON"
+  ++ lib.optional withAMDOpt "ENABLE_AMD_OPT=ON";
 
   postInstall = ''
-    ln -s $out/lib/libflame.so.${version} $out/lib/liblapack.so.3
-    ln -s $out/lib/libflame.so.${version} $out/lib/liblapacke.so.3
+    ln -s $out/lib/libflame.so $out/lib/liblapack.so.3
+    ln -s $out/lib/libflame.so $out/lib/liblapacke.so.3
   '';
 
   meta = with lib; {
     description = "LAPACK-compatible linear algebra library optimized for AMD CPUs";
     homepage = "https://developer.amd.com/amd-aocl/blas-library/";
     license = licenses.bsd3;
-    maintainers = with maintainers; [ ];
+    maintainers = [ maintainers.markuskowa ];
     platforms = [ "x86_64-linux" ];
   };
 }
diff --git a/nixpkgs/pkgs/development/libraries/science/math/arpack/default.nix b/nixpkgs/pkgs/development/libraries/science/math/arpack/default.nix
index a418df7050eb..744d565eddcd 100644
--- a/nixpkgs/pkgs/development/libraries/science/math/arpack/default.nix
+++ b/nixpkgs/pkgs/development/libraries/science/math/arpack/default.nix
@@ -1,8 +1,9 @@
-{ lib, stdenv, fetchFromGitHub, fetchpatch, cmake
+{ lib, stdenv, fetchFromGitHub, cmake
 , gfortran, blas, lapack, eigen
 , useMpi ? false
 , mpi
 , openssh
+, igraph
 }:
 
 # MPI version can only be built with LP64 interface.
@@ -11,25 +12,15 @@ assert useMpi -> !blas.isILP64;
 
 stdenv.mkDerivation rec {
   pname = "arpack";
-  version = "3.8.0";
+  version = "3.9.1";
 
   src = fetchFromGitHub {
     owner = "opencollab";
     repo = "arpack-ng";
     rev = version;
-    sha256 = "sha256-nc710iLRqy/p3EaVgbEoCRzNJ9GpKqqQp33tbn7R6lA=";
+    sha256 = "sha256-HCvapLba8oLqx9I5+KDAU0s/dTmdWOEilS75i4gyfC0=";
   };
 
-  patches = [
-    # https://github.com/opencollab/arpack-ng/pull/301
-    (fetchpatch {
-      name = "pkg-config-paths.patch";
-      url = "https://github.com/opencollab/arpack-ng/commit/47fc83cb371a9cc8a8c058097de5e0298cd548f5.patch";
-      excludes = [ "CHANGES" ];
-      sha256 = "1aijvrfsxkgzqmkzq2dmaj8q3jdpg2hwlqpfl8ddk9scv17gh9m8";
-    })
-  ];
-
   nativeBuildInputs = [ cmake gfortran ];
   buildInputs = assert (blas.isILP64 == lapack.isILP64); [
     blas
@@ -56,10 +47,16 @@ stdenv.mkDerivation rec {
     install_name_tool -change libblas.dylib ${blas}/lib/libblas.dylib $out/lib/libarpack.dylib
   '';
 
-  passthru = { inherit (blas) isILP64; };
+  passthru = {
+    inherit (blas) isILP64;
+    tests = {
+      inherit igraph;
+    };
+  };
 
   meta = {
     homepage = "https://github.com/opencollab/arpack-ng";
+    changelog = "https://github.com/opencollab/arpack-ng/blob/${src.rev}/CHANGES";
     description = ''
       A collection of Fortran77 subroutines to solve large scale eigenvalue
       problems.
diff --git a/nixpkgs/pkgs/development/libraries/science/math/magma/generic.nix b/nixpkgs/pkgs/development/libraries/science/math/magma/generic.nix
index b3753a63339a..27509ee99339 100644
--- a/nixpkgs/pkgs/development/libraries/science/math/magma/generic.nix
+++ b/nixpkgs/pkgs/development/libraries/science/math/magma/generic.nix
@@ -18,15 +18,12 @@
 , gfortran
 , cudaCapabilities ? cudaPackages.cudaFlags.cudaCapabilities
 , gpuTargets ? [ ] # Non-CUDA targets, that is HIP
-, hip
-, hipblas
-, hipsparse
+, rocmPackages
 , lapack
 , lib
 , libpthreadstubs
 , magmaRelease
 , ninja
-, openmp
 , rocmSupport ? false
 , static ? false
 , stdenv
@@ -47,7 +44,7 @@ let
   # NOTE: The hip.gpuTargets are prefixed with "gfx" instead of "sm" like cudaFlags.realArches.
   #   For some reason, Magma's CMakeLists.txt file does not handle the "gfx" prefix, so we must
   #   remove it.
-  rocmArches = lists.map (x: strings.removePrefix "gfx" x) hip.gpuTargets;
+  rocmArches = lists.map (x: strings.removePrefix "gfx" x) rocmPackages.clr.gpuTargets;
   supportedRocmArches = lists.intersectLists rocmArches supportedGpuTargets;
   unsupportedRocmArches = lists.subtractLists supportedRocmArches rocmArches;
 
@@ -124,11 +121,13 @@ stdenv.mkDerivation {
     cuda_nvprof.dev # <cuda_profiler_api.h>
   ] ++ lists.optionals (strings.versionAtLeast cudaVersion "11.8") [
     cuda_profiler_api.dev # <cuda_profiler_api.h>
+  ] ++ lists.optionals (strings.versionAtLeast cudaVersion "12.0") [
+    cuda_cccl.dev # <nv/target>
   ]) ++ lists.optionals rocmSupport [
-    hip
-    hipblas
-    hipsparse
-    openmp
+    rocmPackages.clr
+    rocmPackages.hipblas
+    rocmPackages.hipsparse
+    rocmPackages.llvm.openmp
   ];
 
   cmakeFlags = [
@@ -142,8 +141,8 @@ stdenv.mkDerivation {
     "-DCMAKE_CXX_COMPILER=${backendStdenv.cc}/bin/c++"
     "-DMAGMA_ENABLE_CUDA=ON"
   ] ++ lists.optionals rocmSupport [
-    "-DCMAKE_C_COMPILER=${hip}/bin/hipcc"
-    "-DCMAKE_CXX_COMPILER=${hip}/bin/hipcc"
+    "-DCMAKE_C_COMPILER=${rocmPackages.clr}/bin/hipcc"
+    "-DCMAKE_CXX_COMPILER=${rocmPackages.clr}/bin/hipcc"
     "-DMAGMA_ENABLE_HIP=ON"
   ];
 
diff --git a/nixpkgs/pkgs/development/libraries/science/math/openspecfun/default.nix b/nixpkgs/pkgs/development/libraries/science/math/openspecfun/default.nix
index 4422a908838f..14befd6d11fe 100644
--- a/nixpkgs/pkgs/development/libraries/science/math/openspecfun/default.nix
+++ b/nixpkgs/pkgs/development/libraries/science/math/openspecfun/default.nix
@@ -2,12 +2,12 @@
 
 stdenv.mkDerivation rec {
   pname = "openspecfun";
-  version = "0.5.5";
+  version = "0.5.6";
   src = fetchFromGitHub {
     owner = "JuliaLang";
     repo = "openspecfun";
     rev = "v${version}";
-    sha256 = "sha256-fX2wc8LHUcF5nN/hiA60ZZ7emRTs0SznOm/0q6lD+Ko=";
+    sha256 = "sha256-4MPoRMtDTkdvDfhNXKk/80pZjXRNEPcysLNTb5ohxWk=";
   };
 
   makeFlags = [ "prefix=$(out)" ];
diff --git a/nixpkgs/pkgs/development/libraries/science/math/or-tools/default.nix b/nixpkgs/pkgs/development/libraries/science/math/or-tools/default.nix
index 55438c63a5e0..8f0c930eff62 100644
--- a/nixpkgs/pkgs/development/libraries/science/math/or-tools/default.nix
+++ b/nixpkgs/pkgs/development/libraries/science/math/or-tools/default.nix
@@ -45,6 +45,9 @@ stdenv.mkDerivation rec {
       url = "https://github.com/google/or-tools/commit/edd1544375bd55f79168db315151a48faa548fa0.patch";
       hash = "sha256-S//1YM3IoRCp3Ghg8zMF0XXgIpVmaw4gH8cVb9eUbqM=";
     })
+    # Don't use non-existent member of string_view. Partial patch from commit
+    # https://github.com/google/or-tools/commit/c5a2fa1eb673bf652cb9ad4f5049d054b8166e17.patch
+    ./fix-stringview-compile.patch
   ];
 
   # or-tools normally attempts to build Protobuf for the build platform when
diff --git a/nixpkgs/pkgs/development/libraries/science/math/or-tools/fix-stringview-compile.patch b/nixpkgs/pkgs/development/libraries/science/math/or-tools/fix-stringview-compile.patch
new file mode 100644
index 000000000000..760ab80a38e4
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/science/math/or-tools/fix-stringview-compile.patch
@@ -0,0 +1,36 @@
+diff --git a/ortools/lp_data/lp_parser.cc b/ortools/lp_data/lp_parser.cc
+index 58286306e5..bd26c019ab 100644
+--- a/ortools/lp_data/lp_parser.cc
++++ b/ortools/lp_data/lp_parser.cc
+@@ -185,7 +185,7 @@ bool LPParser::ParseIntegerVariablesList(StringPiece line) {
+ 
+ bool LPParser::ParseConstraint(StringPiece constraint) {
+   const StatusOr<ParsedConstraint> parsed_constraint_or_status =
+-      ::operations_research::glop::ParseConstraint(constraint.as_string());
++      ::operations_research::glop::ParseConstraint(constraint);
+   if (!parsed_constraint_or_status.ok()) return false;
+   const ParsedConstraint& parsed_constraint =
+       parsed_constraint_or_status.value();
+@@ -342,10 +342,9 @@ TokenType LPParser::ConsumeToken(StringPiece* sp) {
+ 
+ }  // namespace
+ 
+-StatusOr<ParsedConstraint> ParseConstraint(absl::string_view constraint_view) {
++StatusOr<ParsedConstraint> ParseConstraint(absl::string_view constraint) {
+   ParsedConstraint parsed_constraint;
+   // Get the name, if present.
+-  StringPiece constraint{constraint_view};
+   StringPiece constraint_copy{constraint};
+   std::string consumed_name;
+   Fractional consumed_coeff;
+@@ -413,8 +412,8 @@ StatusOr<ParsedConstraint> ParseConstraint(absl::string_view constraint_view) {
+     right_bound = consumed_coeff;
+     if (ConsumeToken(&constraint, &consumed_name, &consumed_coeff) !=
+         TokenType::END) {
+-      return absl::InvalidArgumentError(absl::StrCat(
+-          "End of input was expected, found: ", constraint.as_string()));
++      return absl::InvalidArgumentError(
++          absl::StrCat("End of input was expected, found: ", constraint));
+     }
+   }
+ 
diff --git a/nixpkgs/pkgs/development/libraries/science/math/scalapack/default.nix b/nixpkgs/pkgs/development/libraries/science/math/scalapack/default.nix
index e2a5e76c5586..81bcec504473 100644
--- a/nixpkgs/pkgs/development/libraries/science/math/scalapack/default.nix
+++ b/nixpkgs/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 ];