diff options
author | Robin Gloster <mail@glob.in> | 2019-10-28 10:17:49 +0100 |
---|---|---|
committer | Jan Tojnar <jtojnar@gmail.com> | 2019-12-30 04:50:37 +0100 |
commit | ac8eaa85070e736af1548faeeb4b9b6e9976494d (patch) | |
tree | 63237e5cb3c8d2815152ea725488de1a83572e42 /pkgs/applications/science | |
parent | 20b02b80aa46b8dc96e256500e3c22fd0c22817d (diff) |
treewide: fix *Flags
Diffstat (limited to 'pkgs/applications/science')
-rw-r--r-- | pkgs/applications/science/molecular-dynamics/gromacs/default.nix | 34 |
1 files changed, 22 insertions, 12 deletions
diff --git a/pkgs/applications/science/molecular-dynamics/gromacs/default.nix b/pkgs/applications/science/molecular-dynamics/gromacs/default.nix index d720f5ea0787f..4dc6f038ce7f7 100644 --- a/pkgs/applications/science/molecular-dynamics/gromacs/default.nix +++ b/pkgs/applications/science/molecular-dynamics/gromacs/default.nix @@ -1,4 +1,6 @@ -{ stdenv, fetchurl, cmake +{ stdenv +, fetchurl +, cmake , singlePrec ? true , mpiEnabled ? false , fftw @@ -6,7 +8,6 @@ , perl }: - stdenv.mkDerivation { name = "gromacs-2019.4"; @@ -19,18 +20,27 @@ stdenv.mkDerivation { buildInputs = [ fftw perl ] ++ (stdenv.lib.optionals mpiEnabled [ openmpi ]); - cmakeFlags = '' - ${if singlePrec then "-DGMX_DOUBLE=OFF" else "-DGMX_DOUBLE=ON -DGMX_DEFAULT_SUFFIX=OFF"} - ${if mpiEnabled then "-DGMX_MPI:BOOL=TRUE - -DGMX_CPU_ACCELERATION:STRING=SSE4.1 - -DGMX_OPENMP:BOOL=TRUE - -DGMX_THREAD_MPI:BOOL=FALSE" - else "-DGMX_MPI:BOOL=FALSE" } - ''; + cmakeFlags = ( + if singlePrec then [ + "-DGMX_DOUBLE=OFF" + ] else [ + "-DGMX_DOUBLE=ON" + "-DGMX_DEFAULT_SUFFIX=OFF" + ] + ) ++ ( + if mpiEnabled then [ + "-DGMX_MPI:BOOL=TRUE" + "-DGMX_CPU_ACCELERATION:STRING=SSE4.1" + "-DGMX_OPENMP:BOOL=TRUE" + "-DGMX_THREAD_MPI:BOOL=FALSE" + ] else [ + "-DGMX_MPI:BOOL=FALSE" + ] + ); meta = with stdenv.lib; { - homepage = "http://www.gromacs.org"; - license = licenses.gpl2; + homepage = "http://www.gromacs.org"; + license = licenses.gpl2; description = "Molecular dynamics software package"; longDescription = '' GROMACS is a versatile package to perform molecular dynamics, |