about summary refs log tree commit diff
path: root/nixpkgs/pkgs/applications/science/chemistry/octopus/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/applications/science/chemistry/octopus/default.nix')
-rw-r--r--nixpkgs/pkgs/applications/science/chemistry/octopus/default.nix12
1 files changed, 10 insertions, 2 deletions
diff --git a/nixpkgs/pkgs/applications/science/chemistry/octopus/default.nix b/nixpkgs/pkgs/applications/science/chemistry/octopus/default.nix
index 1927950c4fc4..732e97b9b095 100644
--- a/nixpkgs/pkgs/applications/science/chemistry/octopus/default.nix
+++ b/nixpkgs/pkgs/applications/science/chemistry/octopus/default.nix
@@ -1,6 +1,10 @@
 { lib, stdenv, fetchFromGitLab, gfortran, perl, procps
 , libyaml, libxc, fftw, blas, lapack, gsl, netcdf, arpack, autoreconfHook
 , python3
+, enableFma ? stdenv.hostPlatform.fmaSupport
+, enableFma4 ? stdenv.hostPlatform.fma4Support
+, enableAvx ? stdenv.hostPlatform.avx2Support
+, enableAvx512 ? stdenv.hostPlatform.avx512Support
 }:
 
 assert (!blas.isILP64) && (!lapack.isILP64);
@@ -35,14 +39,18 @@ stdenv.mkDerivation rec {
     (python3.withPackages (ps: [ ps.pyyaml ]))
   ];
 
-  configureFlags = [
+  configureFlags = with lib; [
     "--with-yaml-prefix=${libyaml}"
     "--with-blas=-lblas"
     "--with-lapack=-llapack"
     "--with-fftw-prefix=${fftw.dev}"
     "--with-gsl-prefix=${gsl}"
     "--with-libxc-prefix=${libxc}"
-  ];
+    "--enable-openmp"
+  ] ++ optional enableFma "--enable-fma3"
+    ++ optional enableFma4 "--enable-fma4"
+    ++ optional enableAvx "--enable-avx"
+    ++ optional enableAvx512 "--enable-avx512";
 
   doCheck = false;
   checkTarget = "check-short";