From ec90e2f17560e490572e74c557a54c685365eaea Mon Sep 17 00:00:00 2001 From: Dmitry Kalinkin Date: Wed, 9 May 2018 13:45:57 -0400 Subject: [PATCH] geant4: only supply requested dependencies, sort out *BuildInputs --- .../libraries/physics/geant4/default.nix | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/pkgs/development/libraries/physics/geant4/default.nix b/pkgs/development/libraries/physics/geant4/default.nix index 8b3166cdea0b6..e80277ec0442a 100644 --- a/pkgs/development/libraries/physics/geant4/default.nix +++ b/pkgs/development/libraries/physics/geant4/default.nix @@ -70,14 +70,20 @@ let "-DGEANT4_USE_SYSTEM_CLHEP=${if clhep != null then "ON" else "OFF"}" "-DGEANT4_USE_SYSTEM_EXPAT=${if expat != null then "ON" else "OFF"}" "-DGEANT4_USE_SYSTEM_ZLIB=${if zlib != null then "ON" else "OFF"}" + ] ++ stdenv.lib.optional multiThreadingCapable + "-DGEANT4_BUILD_MULTITHREADED=${if enableMultiThreading then "ON" else "OFF"}" + ++ stdenv.lib.optionals enableInventor [ "-DINVENTOR_INCLUDE_DIR=${coin3d}/include" "-DINVENTOR_LIBRARY_RELEASE=${coin3d}/lib/libCoin.so" - ] ++ stdenv.lib.optional multiThreadingCapable - "-DGEANT4_BUILD_MULTITHREADED=${if enableMultiThreading then "ON" else "OFF"}"; + ]; enableParallelBuilding = true; - buildInputs = [ cmake clhep expat zlib xercesc qt motif libGLU_combined xlibsWrapper libXmu libXpm coin3d soxt ]; - propagatedBuildInputs = [ clhep expat zlib xercesc qt motif libGLU_combined xlibsWrapper libXmu libXpm coin3d soxt ]; + nativeBuildInputs = [ cmake ]; + buildInputs = [ clhep expat zlib libGLU_combined xlibsWrapper libXmu ] + ++ stdenv.lib.optionals enableGDML [ xercesc ] + ++ stdenv.lib.optionals enableXM [ motif ] + ++ stdenv.lib.optionals enableQT [ qt ] + ++ stdenv.lib.optionals enableInventor [ libXpm coin3d soxt ]; postFixup = '' # Don't try to export invalid environment variables.