From 8b02ff6b8eeb4896276c8777003736598a78d30d Mon Sep 17 00:00:00 2001 From: Markus Kowalewski Date: Mon, 19 Oct 2020 14:00:48 +0200 Subject: [PATCH] openmolcas: fix build w.r.t. openblas Fall out from switching openblas over to multiple outputs: https://github.com/NixOS/nixpkgs/pull/98337 --- .../science/chemistry/openmolcas/default.nix | 7 +++++-- .../science/chemistry/openmolcas/openblasPath.patch | 13 +++++++++++++ 2 files changed, 18 insertions(+), 2 deletions(-) create mode 100644 pkgs/applications/science/chemistry/openmolcas/openblasPath.patch diff --git a/pkgs/applications/science/chemistry/openmolcas/default.nix b/pkgs/applications/science/chemistry/openmolcas/default.nix index 0d74e784d77..1b99fa40b56 100644 --- a/pkgs/applications/science/chemistry/openmolcas/default.nix +++ b/pkgs/applications/science/chemistry/openmolcas/default.nix @@ -23,7 +23,10 @@ in stdenv.mkDerivation { sha256 = "1wwqhkyyi7pw5x1ghnp83ir17zl5jsj7phhqxapybyi3bmg0i00q"; }; - patches = [ (fetchpatch { + patches = [ + # Required to handle openblas multiple outputs + ./openblasPath.patch + (fetchpatch { name = "Fix-MPI-INT-size"; # upstream patch, fixes a Fortran compiler error url = "https://gitlab.com/Molcas/OpenMolcas/commit/860e3350523f05ab18e49a428febac8a4297b6e4.patch"; sha256 = "0h96h5ikbi5l6ky41nkxmxfhjiykkiifq7vc2s3fdy1r1siv09sb"; @@ -55,7 +58,7 @@ in stdenv.mkDerivation { "-DTOOLS=ON" "-DHDF5=ON" "-DFDE=ON" - "-DOPENBLASROOT=${openblas}" + "-DOPENBLASROOT=${openblas.dev}" ]; GAROOT=globalarrays; diff --git a/pkgs/applications/science/chemistry/openmolcas/openblasPath.patch b/pkgs/applications/science/chemistry/openmolcas/openblasPath.patch new file mode 100644 index 00000000000..62ffc8c4634 --- /dev/null +++ b/pkgs/applications/science/chemistry/openmolcas/openblasPath.patch @@ -0,0 +1,13 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 055ff8ef..3f60279b 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -1436,7 +1436,7 @@ if (LINALG STREQUAL "OpenBLAS") + NAMES openblas + PATHS ${OPENBLASROOT} + PATH_SUFFIXES lib +- NO_DEFAULT_PATH) ++ ) + + if (NOT LIBOPENBLAS) + message (FATAL_ERROR