From 4d33e289b521228c7e0437d4135d132cc56d0236 Mon Sep 17 00:00:00 2001 From: Dmitry Kalinkin Date: Wed, 16 May 2018 17:55:07 -0400 Subject: [PATCH] g4py: fix after bump to 10.04.1 --- .../physics/geant4/g4py/configure.patch | 12 -------- .../libraries/physics/geant4/g4py/default.nix | 29 +++++++------------ 2 files changed, 11 insertions(+), 30 deletions(-) delete mode 100644 pkgs/development/libraries/physics/geant4/g4py/configure.patch diff --git a/pkgs/development/libraries/physics/geant4/g4py/configure.patch b/pkgs/development/libraries/physics/geant4/g4py/configure.patch deleted file mode 100644 index 886618abd34a..000000000000 --- a/pkgs/development/libraries/physics/geant4/g4py/configure.patch +++ /dev/null @@ -1,12 +0,0 @@ ---- environments/g4py/configure 2014-03-17 22:47:05.000000000 +1100 -+++ environments/g4py/configure 2014-09-01 15:33:46.523637686 +1000 -@@ -4,9 +4,6 @@ - # ====================================================================== - export LANG=C - --PATH=/bin:/usr/bin --export PATH -- - # ====================================================================== - # testing the echo features - # ====================================================================== diff --git a/pkgs/development/libraries/physics/geant4/g4py/default.nix b/pkgs/development/libraries/physics/geant4/g4py/default.nix index 8d6dfdca47d0..197b842ff476 100644 --- a/pkgs/development/libraries/physics/geant4/g4py/default.nix +++ b/pkgs/development/libraries/physics/geant4/g4py/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl +{ stdenv, fetchurl, cmake, xercesc # The target version of Geant4 , geant4 @@ -8,30 +8,23 @@ , boost }: +let + # g4py does not support MT and will fail to build against MT geant + geant4_nomt = geant4.override { enableMultiThreading = false; }; +in + stdenv.mkDerivation rec { - inherit (geant4) version src; + inherit (geant4_nomt) version src; name = "g4py-${version}"; - # ./configure overwrites $PATH, which clobbers everything. - patches = [ ./configure.patch ]; - patchFlags = "-p0"; + sourceRoot = "geant4.10.04.p01/environments/g4py"; - configurePhase = '' - export PYTHONPATH=$PYTHONPATH:${geant4}/lib64:$prefix + nativeBuildInputs = [ cmake ]; + buildInputs = [ geant4_nomt xercesc boost python ]; - source ${geant4}/share/Geant4-*/geant4make/geant4make.sh - cd environments/g4py - - ./configure linux64 --prefix=$prefix \ - --with-g4install-dir=${geant4} \ - --with-python-incdir=${python}/include/python${python.majorVersion} \ - --with-python-libdir=${python}/lib \ - --with-boost-incdir=${boost.dev}/include \ - --with-boost-libdir=${boost.out}/lib - ''; + GEANT4_INSTALL = geant4_nomt; enableParallelBuilding = true; - buildInputs = [ geant4 boost python ]; setupHook = ./setup-hook.sh;