Merge pull request #58003 from veprbl/pr/pyhepmc_fix

pythonPackages.pyhepmc: fix build
This commit is contained in:
Jörg Thalheim 2019-03-21 09:50:26 +00:00 committed by GitHub
commit 6b5c285d2d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,6 +1,7 @@
{ stdenv
, buildPythonPackage
, fetchPypi
, fetchFromBitbucket
, isPy3k
, fetchurl
, pkgs
@ -17,6 +18,18 @@ buildPythonPackage rec {
sha256 = "1210fd7e20d4abc1d9166147a9f7645a2a58b655fe030ad54ab3ea0d0c6e0834";
};
srcMissing = fetchFromBitbucket {
owner = "andybuckley";
repo = "pyhepmc";
rev = "pyhepmc-1.0.0";
sha256 = "0vxad143pz45q94w5p0dycpk24insdsv1m5k867y56xy24bi0d4w";
};
prePatch = ''
cp -r $srcMissing/hepmc .
chmod +w hepmc
'';
patches = [
# merge PR https://bitbucket.org/andybuckley/pyhepmc/pull-requests/1/add-incoming-outgoing-generators-for/diff
./pyhepmc_export_edges.patch
@ -26,11 +39,11 @@ buildPythonPackage rec {
# regenerate python wrapper
preConfigure = ''
rm hepmc/hepmcwrap.py
swig -c++ -I${pkgs.hepmc}/include -python hepmc/hepmcwrap.i
'';
buildInputs = [ pkgs.swig pkgs.hepmc ];
nativeBuildInputs = [ pkgs.swig ];
buildInputs = [ pkgs.hepmc ];
HEPMCPATH = pkgs.hepmc;