diff --git a/pkgs/applications/science/biology/febio-studio/default.nix b/pkgs/applications/science/biology/febio-studio/default.nix index 708bd0f4305a..66618cc08e10 100644 --- a/pkgs/applications/science/biology/febio-studio/default.nix +++ b/pkgs/applications/science/biology/febio-studio/default.nix @@ -1,10 +1,23 @@ -{ lib, stdenv, fetchFromGitHub, cmake, zlib, libglvnd, libGLU, wrapQtAppsHook -, sshSupport ? true, openssl, libssh -, tetgenSupport ? true, tetgen -, ffmpegSupport ? true, ffmpeg_4 -, dicomSupport ? false, dcmtk -, withModelRepo ? true -, withCadFeatures ? false +{ + lib, + stdenv, + fetchFromGitHub, + cmake, + zlib, + libglvnd, + libGLU, + wrapQtAppsHook, + sshSupport ? true, + openssl, + libssh, + tetgenSupport ? true, + tetgen, + ffmpegSupport ? true, + ffmpeg_4, + dicomSupport ? false, + dcmtk, + withModelRepo ? true, + withCadFeatures ? false, }: stdenv.mkDerivation rec { @@ -22,19 +35,18 @@ stdenv.mkDerivation rec { ./febio-studio-cmake.patch # Fix Errors that appear with certain Cmake flags ]; - cmakeFlags = [ - "-DQt_Ver=5" - "-DNOT_FIRST=On" - "-DOpenGL_GL_PREFERENCE=GLVND" - ] + cmakeFlags = + [ + "-DQt_Ver=5" + "-DNOT_FIRST=On" + "-DOpenGL_GL_PREFERENCE=GLVND" + ] ++ lib.optional sshSupport "-DUSE_SSH=On" ++ lib.optional tetgenSupport "-DUSE_TETGEN=On" ++ lib.optional ffmpegSupport "-DUSE_FFMPEG=On" ++ lib.optional dicomSupport "-DUSE_DICOM=On" ++ lib.optional withModelRepo "-DMODEL_REPO=On" - ++ lib.optional withCadFeatures "-DCAD_FEATURES=On" - ; - + ++ lib.optional withCadFeatures "-DCAD_FEATURES=On"; installPhase = '' runHook preInstall @@ -43,13 +55,22 @@ stdenv.mkDerivation rec { runHook postInstall ''; - nativeBuildInputs = [ cmake wrapQtAppsHook ]; - buildInputs = [ zlib libglvnd libGLU openssl libssh ] + nativeBuildInputs = [ + cmake + wrapQtAppsHook + ]; + buildInputs = + [ + zlib + libglvnd + libGLU + openssl + libssh + ] ++ lib.optional sshSupport openssl ++ lib.optional tetgenSupport tetgen ++ lib.optional ffmpegSupport ffmpeg_4 - ++ lib.optional dicomSupport dcmtk - ; + ++ lib.optional dicomSupport dcmtk; meta = with lib; { description = "FEBio Suite Solver";