From 65f0e5df7b92ff80828528f0dd05555436e9d8af Mon Sep 17 00:00:00 2001 From: Markus Kowalewski Date: Mon, 17 Nov 2025 11:11:48 +0100 Subject: [PATCH] nwchem: fix build with scalapack Ensure scalapack is built with same ILP64 flags as blas and lapack. Problem was introduced here: https://github.com/NixOS/nixpkgs/pull/460967 --- pkgs/applications/science/chemistry/nwchem/default.nix | 3 ++- pkgs/top-level/all-packages.nix | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/pkgs/applications/science/chemistry/nwchem/default.nix b/pkgs/applications/science/chemistry/nwchem/default.nix index 5fe91023ff64..b320250e807a 100644 --- a/pkgs/applications/science/chemistry/nwchem/default.nix +++ b/pkgs/applications/science/chemistry/nwchem/default.nix @@ -23,6 +23,7 @@ }: assert blas.isILP64 == lapack.isILP64; +assert blas.isILP64 == scalapack.isILP64; let versionGA = "5.8.2"; # Fixed by nwchem @@ -138,7 +139,7 @@ stdenv.mkDerivation rec { export BLAS_SIZE=${if blas.isILP64 then "8" else "4"} export USE_SCALAPACK="y" export SCALAPACK="-L${scalapack}/lib -lscalapack" - export SCALAPACK_SIZE="4" + export SCALAPACK_SIZE=${if scalapack.isILP64 then "8" else "4"} export LIBXC_INCLUDE="${lib.getDev libxc}/include" export LIBXC_MODDIR="${lib.getDev libxc}/include" diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 872081004890..b0e886c08d79 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -13388,6 +13388,7 @@ with pkgs; nwchem = callPackage ../applications/science/chemistry/nwchem { blas = blas-ilp64; lapack = lapack-ilp64; + scalapack = scalapack-ilp64; }; autodock-vina = callPackage ../applications/science/chemistry/autodock-vina { };