mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-26 15:41:40 +00:00
Merge pull request #99993 from veprbl/pr/pythia_8_303
pythia: 8.244 -> 8.303
This commit is contained in:
commit
5540128f68
|
@ -14,6 +14,7 @@ stdenv.mkDerivation {
|
||||||
|
|
||||||
patches = [
|
patches = [
|
||||||
./compat.patch
|
./compat.patch
|
||||||
|
./pythia83xx.patch
|
||||||
];
|
];
|
||||||
|
|
||||||
preConfigure = ''
|
preConfigure = ''
|
||||||
|
|
55
pkgs/applications/science/physics/sacrifice/pythia83xx.patch
Normal file
55
pkgs/applications/science/physics/sacrifice/pythia83xx.patch
Normal file
|
@ -0,0 +1,55 @@
|
||||||
|
diff --git a/include/Sacrifice/UserHooksFactory.hh b/include/Sacrifice/UserHooksFactory.hh
|
||||||
|
index 04b105b..19f2b4f 100644
|
||||||
|
--- a/include/Sacrifice/UserHooksFactory.hh
|
||||||
|
+++ b/include/Sacrifice/UserHooksFactory.hh
|
||||||
|
@@ -12,7 +12,7 @@
|
||||||
|
|
||||||
|
namespace Sacrifice{
|
||||||
|
|
||||||
|
- using Pythia8::UserHooks;
|
||||||
|
+ using Pythia8::UserHooksPtr;
|
||||||
|
using std::string;
|
||||||
|
using std::map;
|
||||||
|
|
||||||
|
@@ -21,7 +21,7 @@ namespace Sacrifice{
|
||||||
|
|
||||||
|
public:
|
||||||
|
|
||||||
|
- static UserHooks* create(const string &hookName);
|
||||||
|
+ static UserHooksPtr create(const string &hookName);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Loads a library of UserHooks
|
||||||
|
@@ -39,7 +39,7 @@ namespace Sacrifice{
|
||||||
|
|
||||||
|
class ICreator{
|
||||||
|
public:
|
||||||
|
- virtual UserHooks *create() const = 0;
|
||||||
|
+ virtual UserHooksPtr create() const = 0;
|
||||||
|
virtual ~ICreator(){};
|
||||||
|
};
|
||||||
|
|
||||||
|
@@ -61,8 +61,8 @@ namespace Sacrifice{
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
- UserHooks *create()const{
|
||||||
|
- return new T;
|
||||||
|
+ UserHooksPtr create()const{
|
||||||
|
+ return std::make_shared<T>();
|
||||||
|
}
|
||||||
|
|
||||||
|
private:
|
||||||
|
diff --git a/src/UserHooksFactory.cxx b/src/UserHooksFactory.cxx
|
||||||
|
index 84a485b..5274119 100644
|
||||||
|
--- a/src/UserHooksFactory.cxx
|
||||||
|
+++ b/src/UserHooksFactory.cxx
|
||||||
|
@@ -11,7 +11,7 @@ namespace Sacrifice{
|
||||||
|
using std::ifstream;
|
||||||
|
|
||||||
|
//////////////////////////////////////////////////////////////////////////////
|
||||||
|
- UserHooks *UserHooksFactory::create(const string &name){
|
||||||
|
+ UserHooksPtr UserHooksFactory::create(const string &name){
|
||||||
|
map<string, const ICreator*>::const_iterator it = s_creators().find(name);
|
||||||
|
if(it == s_creators().end()){
|
||||||
|
//eek!
|
|
@ -1,15 +1,15 @@
|
||||||
{ stdenv, fetchurl, boost, fastjet, hepmc2, lhapdf, rsync, zlib }:
|
{ stdenv, fetchurl, boost, fastjet, hepmc, lhapdf, rsync, zlib }:
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
pname = "pythia";
|
pname = "pythia";
|
||||||
version = "8.244";
|
version = "8.303";
|
||||||
|
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = "http://home.thep.lu.se/~torbjorn/pythia8/pythia${builtins.replaceStrings ["."] [""] version}.tgz";
|
url = "http://home.thep.lu.se/~torbjorn/pythia8/pythia${builtins.replaceStrings ["."] [""] version}.tgz";
|
||||||
sha256 = "1jlj9hgmk2gcm5p0zqsiz0dpv9vvj8ip261si7frrwfsk7wq0j73";
|
sha256 = "0gli6zf8931i7kyminppisc9d0q69xxnalvhld5fgnkh4q82nz6d";
|
||||||
};
|
};
|
||||||
|
|
||||||
buildInputs = [ boost fastjet hepmc2 zlib rsync lhapdf ];
|
buildInputs = [ boost fastjet hepmc zlib rsync lhapdf ];
|
||||||
|
|
||||||
preConfigure = ''
|
preConfigure = ''
|
||||||
patchShebangs ./configure
|
patchShebangs ./configure
|
||||||
|
@ -17,9 +17,12 @@ stdenv.mkDerivation rec {
|
||||||
|
|
||||||
configureFlags = [
|
configureFlags = [
|
||||||
"--enable-shared"
|
"--enable-shared"
|
||||||
"--with-hepmc2=${hepmc2}"
|
|
||||||
"--with-lhapdf6=${lhapdf}"
|
"--with-lhapdf6=${lhapdf}"
|
||||||
];
|
] ++ (if stdenv.lib.versions.major hepmc.version == "3" then [
|
||||||
|
"--with-hepmc3=${hepmc}"
|
||||||
|
] else [
|
||||||
|
"--with-hepmc2=${hepmc}"
|
||||||
|
]);
|
||||||
|
|
||||||
enableParallelBuilding = true;
|
enableParallelBuilding = true;
|
||||||
|
|
||||||
|
|
|
@ -26801,7 +26801,9 @@ in
|
||||||
|
|
||||||
nlojet = callPackage ../development/libraries/physics/nlojet { };
|
nlojet = callPackage ../development/libraries/physics/nlojet { };
|
||||||
|
|
||||||
pythia = callPackage ../development/libraries/physics/pythia { };
|
pythia = callPackage ../development/libraries/physics/pythia {
|
||||||
|
hepmc = hepmc2;
|
||||||
|
};
|
||||||
|
|
||||||
rivet = callPackage ../development/libraries/physics/rivet {
|
rivet = callPackage ../development/libraries/physics/rivet {
|
||||||
hepmc = hepmc2;
|
hepmc = hepmc2;
|
||||||
|
|
Loading…
Reference in a new issue