uboot: (firmwareOdroidC2/C4) don't invoke patch tool, use patches = [] instead
https://github.com/NixOS/nixpkgs/blob/master/pkgs/stdenv/generic/setup.sh#L948 this can do it nicely. Signed-off-by: Anton Arapov <anton@deadbeef.mx>
This commit is contained in:
commit
56de2bcd43
30691 changed files with 3076956 additions and 0 deletions
12
pkgs/applications/science/physics/sacrifice/compat.patch
Normal file
12
pkgs/applications/science/physics/sacrifice/compat.patch
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
diff --git a/src/PythiaMain.cxx b/src/PythiaMain.cxx
|
||||
index 0e5ddd2..2b626ab 100644
|
||||
--- a/src/PythiaMain.cxx
|
||||
+++ b/src/PythiaMain.cxx
|
||||
@@ -96,7 +96,6 @@ int main(int argc, char **argv){
|
||||
HepMCConverter pythiaToHepMC;
|
||||
|
||||
pythiaToHepMC.set_store_pdf(true);
|
||||
- pythiaToHepMC.set_crash_on_problem(true);
|
||||
|
||||
if(photosHandler.isEnabled()){
|
||||
photosHandler.initialise();
|
||||
48
pkgs/applications/science/physics/sacrifice/default.nix
Normal file
48
pkgs/applications/science/physics/sacrifice/default.nix
Normal file
|
|
@ -0,0 +1,48 @@
|
|||
{ lib, stdenv, fetchurl, boost, hepmc2, lhapdf, pythia, makeWrapper }:
|
||||
|
||||
stdenv.mkDerivation {
|
||||
pname = "sacrifice";
|
||||
version = "1.0.0";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://www.hepforge.org/archive/agile/Sacrifice-1.0.0.tar.gz";
|
||||
sha256 = "10bvpq63kmszy1habydwncm0j1dgvam0fkrmvkgbkvf804dcjp6g";
|
||||
};
|
||||
|
||||
buildInputs = [ boost hepmc2 lhapdf pythia ];
|
||||
nativeBuildInputs = [ makeWrapper ];
|
||||
|
||||
patches = [
|
||||
./compat.patch
|
||||
./pythia83xx.patch
|
||||
];
|
||||
|
||||
preConfigure = ''
|
||||
substituteInPlace configure --replace HAVE_LCG=yes HAVE_LCG=no
|
||||
''
|
||||
+ lib.optionalString stdenv.isDarwin ''
|
||||
substituteInPlace configure --replace LIB_SUFFIX=\"so\" LIB_SUFFIX=\"dylib\"
|
||||
'';
|
||||
|
||||
configureFlags = [
|
||||
"--with-HepMC=${hepmc2}"
|
||||
"--with-pythia=${pythia}"
|
||||
];
|
||||
|
||||
postInstall = if stdenv.isDarwin then ''
|
||||
install_name_tool -add_rpath ${pythia}/lib "$out"/bin/run-pythia
|
||||
'' else ''
|
||||
wrapProgram $out/bin/run-pythia \
|
||||
--prefix LD_LIBRARY_PATH : "${pythia}/lib"
|
||||
'';
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
meta = {
|
||||
description = "A standalone contribution to AGILe for steering Pythia 8";
|
||||
license = lib.licenses.gpl2;
|
||||
homepage = "https://agile.hepforge.org/trac/wiki/Sacrifice";
|
||||
platforms = lib.platforms.unix;
|
||||
maintainers = with lib.maintainers; [ veprbl ];
|
||||
};
|
||||
}
|
||||
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!
|
||||
Loading…
Add table
Add a link
Reference in a new issue