From c884849a3c6407bfff3383c54499595781fea73a Mon Sep 17 00:00:00 2001 From: Weijia Wang <9713184+wegank@users.noreply.github.com> Date: Tue, 28 Feb 2023 09:58:04 +0200 Subject: [PATCH] openmm: use gcc11Stdenv everywhere --- .../libraries/science/chemistry/openmm/default.nix | 3 +++ pkgs/top-level/all-packages.nix | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/pkgs/development/libraries/science/chemistry/openmm/default.nix b/pkgs/development/libraries/science/chemistry/openmm/default.nix index 85072f77da12..3b4838c68a58 100644 --- a/pkgs/development/libraries/science/chemistry/openmm/default.nix +++ b/pkgs/development/libraries/science/chemistry/openmm/default.nix @@ -78,6 +78,9 @@ stdenv.mkDerivation rec { "-DCMAKE_LIBRARY_PATH=${cudaPackages.cudatoolkit}/lib64/stubs" ]; + # https://github.com/NixOS/nixpkgs/issues/201254 + NIX_LDFLAGS = lib.optionalString (stdenv.isLinux && stdenv.isAarch64 && stdenv.cc.isGNU) "-lgcc"; + postInstall = lib.strings.optionalString enablePython '' export OPENMM_LIB_PATH=$out/lib export OPENMM_INCLUDE_PATH=$out/include diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index ebc8418f09b2..1c7e992afdf6 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -31760,8 +31760,8 @@ with pkgs; open-policy-agent = callPackage ../development/tools/open-policy-agent { }; openmm = callPackage ../development/libraries/science/chemistry/openmm { - stdenv = if stdenv.targetPlatform.isAarch64 then gcc9Stdenv else gcc11Stdenv; - gfortran = if stdenv.targetPlatform.isAarch64 then gfortran9 else gfortran11; + stdenv = gcc11Stdenv; + gfortran = gfortran11; }; openshift = callPackage ../applications/networking/cluster/openshift { };