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:
Anton Arapov 2021-04-03 12:58:10 +02:00 committed by Alan Daniels
commit 56de2bcd43
30691 changed files with 3076956 additions and 0 deletions

View file

@ -0,0 +1,33 @@
{ lib, stdenv, fetchurl, cmake, gfortran, lhapdf }:
stdenv.mkDerivation rec {
pname = "MCFM";
version = "10.0.1";
src = fetchurl {
url = "https://mcfm.fnal.gov/downloads/${pname}-${version}.tar.gz";
sha256 = "sha256-3Dg4KoILb0XhgGkzItDh/1opCtYrrIvtbuALYqPUvE8=";
};
postPatch = ''
substituteInPlace CMakeLists.txt \
--replace 'target_link_libraries(mcfm lhapdf_lib)' \
'target_link_libraries(mcfm ''${lhapdf_lib})'
'';
nativeBuildInputs = [ cmake gfortran ];
buildInputs = [ lhapdf ];
cmakeFlags = [
"-Duse_external_lhapdf=ON"
"-Duse_internal_lhapdf=OFF"
];
meta = with lib; {
description = "Monte Carlo for FeMtobarn processes";
homepage = "https://mcfm.fnal.gov";
license = licenses.gpl3Plus;
maintainers = with maintainers; [ veprbl ];
platforms = lib.platforms.x86_64;
};
}

View file

@ -0,0 +1,43 @@
Description: Fixing argument mismatches in Fortran code, addressing #957430.
Author: Andrius Merkys <merkys@debian.org>
Forwarded: ccp4-dev@dl.ac.uk
--- a/fortran/pack_f.f
+++ b/fortran/pack_f.f
@@ -106,7 +106,7 @@
endif
10 continue
filnarray(len(filn) + 1) = 0
- call pack_wordimage_f(data, x, y, filnarray)
+ call pack_longimage_f(data, x, y, filnarray)
return
end
@@ -138,7 +138,7 @@
endif
10 continue
filnarray(len(filn) + 1) = 0
- call v2pack_wordimage_f(data, x, y, filnarray)
+ call v2pack_longimage_f(data, x, y, filnarray)
return
end
--- a/fortran/lgglib.f
+++ b/fortran/lgglib.f
@@ -1236,7 +1236,7 @@
B3(2) = XYZ(2) * CELL(2)
B3(3) = XYZ(3) * CELL(3)
C
- CALL matmult(3,3,3,1,ORTH,B3,XYZ,B1)
+ CALL matmult(3,3,3,1,ORTH,B3,XYZ)
END
c
c
@@ -1274,7 +1274,7 @@
B3(1) = XYZ(1)
B3(2) = XYZ(2)
B3(3) = XYZ(3)
- CALL matmult(3,3,3,1,ORTH,B3,XYZ,B1)
+ CALL matmult(3,3,3,1,ORTH,B3,XYZ)
END
character*80 function getnam(filnam)
character*(*) filnam

View file

@ -0,0 +1,226 @@
{ lib
, stdenv
, fetchurl
, fetchFromGitHub
, cmake
, lz4
, bzip2
, gfortran
, m4
, hdf5
, gsl
, slurm
, unzip
, makeWrapper
, meson
, git
, ninja
, eigen
, pkg-config
, wrapGAppsHook
, flex
, bison
, doxygen
, opencl-headers
, ncurses
, msgpack
, fftw
, zeromq
, ocl-icd
, gtk3
, gdk-pixbuf
, argp-standalone
, memorymappingHook
, withGui ? true
, withBitshuffle ? true
}:
let
libccp4 = stdenv.mkDerivation rec {
pname = "libccp4";
version = "6.5.1";
src = fetchurl {
# Original mirror, now times out
# url = "ftp://ftp.ccp4.ac.uk/opensource/${pname}-${version}.tar.gz";
url = "https://deb.debian.org/debian/pool/main/libc/${pname}/${pname}_${version}.orig.tar.gz";
sha256 = "1rfvjliny29vy5bdi6rrjaw9hhhhh72pw536xwvqipqcjlylf2r8";
};
nativeBuildInputs = [ gfortran m4 ];
buildInputs = [ hdf5 gsl ];
configureFlags = [ "FFLAGS=-fallow-argument-mismatch" ];
# libccp4 tries to read syminfo.lib by looking at an environment variable, which hinders reproducibility.
# We hard-code this by providing a little patch and then passing the absolute path to syminfo.lib as a
# preprocessor flag.
preBuild = ''
makeFlagsArray+=(CFLAGS='-DNIX_PROVIDED_SYMOP_FILE=\"$out/share/syminfo.lib\"')
export NIX_LDFLAGS="-L${gfortran.cc}/lib64 -L${gfortran.cc}/lib $NIX_LDFLAGS";
'';
makeFlags = [ "CFLAGS='-DNIX_PROVIDED_SYMOP_FILE=\"${placeholder "out"}/share/syminfo.lib\"" ];
patches = [
./libccp4-use-hardcoded-syminfo-lib.patch
./0002-fix-ftbfs-with-gcc-10.patch
];
};
# This is the statically-linked, pre-built binary of mosflm. Compiling it ourselves turns out to be very difficult
# since the build process is very hard-coded for a specific machine, architecture, and libraries.
mosflm =
let
version = "7.4.0";
src =
if stdenv.isDarwin then
fetchurl
{
url = "https://www.mrc-lmb.cam.ac.uk/mosflm/mosflm/ver${builtins.replaceStrings [ "." ] [ "" ] version}/pre-built/mosflm-osx-64-noX11.zip";
sha256 = "1da5wimv3kl8bccp49j69vh8gi28cn7axg59lrmb38s68c618h7j";
}
else
fetchurl {
url = "https://www.mrc-lmb.cam.ac.uk/mosflm/mosflm/ver${builtins.replaceStrings [ "." ] [ "" ] version}/pre-built/mosflm-linux-64-noX11.zip";
sha256 = "1rqh3nprxfmnyihllw31nb8i3wfhybmsic6y7z6wn4rafyv3w4fk";
};
mosflmBinary = if stdenv.isDarwin then "bin/mosflm" else "mosflm-linux-64-noX11";
in
stdenv.mkDerivation rec {
pname = "mosflm";
inherit version src;
dontBuild = true;
nativeBuildInputs = [ unzip makeWrapper ];
sourceRoot = ".";
# mosflm statically links against its own libccp4, which as the syminfo.lib environment variable problem.
# Here, we circumvent it by creating a little wrapper script that calls mosflm after setting the SYMINFO variable.
installPhase = ''
mkdir -p $out/bin
cp ${mosflmBinary} $out/bin/mosflm-raw
makeWrapper $out/bin/mosflm-raw $out/bin/mosflm --set SYMINFO ${libccp4}/share/syminfo.lib --add-flags -n
'';
};
xgandalf = stdenv.mkDerivation rec {
pname = "xgandalf";
version = "c15afa2381d5f87d4aefcc8181a15b4a6fd3a955";
src = fetchurl {
url = "https://gitlab.desy.de/thomas.white/${pname}/-/archive/${version}/${pname}-${version}.tar.gz";
sha256 = "11i1w57a3rpnb4x5y4n8d3iffn5m9w1zydl69syzljdk3aqg2pv8";
};
nativeBuildInputs = [ meson pkg-config ninja ];
buildInputs = [ eigen ];
};
pinkIndexer = stdenv.mkDerivation rec {
pname = "pinkindexer";
version = "8a828788f8272a89d484b00afbd2500c2c1ff974";
src = fetchurl {
url = "https://gitlab.desy.de/thomas.white/${pname}/-/archive/${version}/${pname}-${version}.tar.gz";
sha256 = "1mkgf1xd91ay0z0632kzxm0z3wcxf0cayjvs6a3znds72dkhfsyh";
};
nativeBuildInputs = [ meson pkg-config ninja ];
buildInputs = [ eigen ];
};
fdip = stdenv.mkDerivation rec {
pname = "fdip";
version = "29da626f17f66d5c0780fc59b1eafb7c85b81dd6";
src = fetchurl {
url = "https://gitlab.desy.de/philipp.middendorf/fdip/-/archive/${version}/fdip-${version}.tar.gz";
sha256 = "184l76r4fgznq54rnhgjk7dg41kqdl0d1da02vr5y4cs2fyqppky";
};
nativeBuildInputs = [ meson ninja pkg-config ];
buildInputs = [ eigen ];
};
hdf5-external-filter-plugins = stdenv.mkDerivation rec {
pname = "HDF5-External-Filter-Plugins";
version = "0.1.0";
src = fetchFromGitHub {
owner = "nexusformat";
repo = pname;
rev = "d469f175e5273c1d488e71a6134f84088f57d39c";
sha256 = "1jrzzh75i68ad1yrim7s1nx9wy0s49ghkziahs71mm5azprm6gh9";
};
nativeBuildInputs = [ cmake ];
buildInputs = [ hdf5 lz4 bzip2 ];
cmakeFlags = [
"-DENABLE_BITSHUFFLE_PLUGIN=yes"
"-DENABLE_LZ4_PLUGIN=yes"
"-DENABLE_BZIP2_PLUGIN=yes"
];
};
in
stdenv.mkDerivation rec {
pname = "crystfel";
version = "0.10.1";
src = fetchurl {
url = "https://www.desy.de/~twhite/${pname}/${pname}-${version}.tar.gz";
sha256 = "0i9d5ggalic7alj97dxjdys7010kxhm2cb4lwakvigl023j8ms79";
};
nativeBuildInputs = [ meson pkg-config ninja flex bison doxygen opencl-headers ]
++ lib.optionals withGui [ wrapGAppsHook ];
buildInputs = [
hdf5
gsl
ncurses
msgpack
fftw
fdip
zeromq
ocl-icd
libccp4
mosflm
pinkIndexer
xgandalf
] ++ lib.optionals withGui [ gtk3 gdk-pixbuf ]
++ lib.optionals stdenv.isDarwin [
argp-standalone
memorymappingHook
]
# slurm is not available for Darwin; when it is, remove the condition
++ lib.optionals (!stdenv.isDarwin) [ slurm ]
# hdf5-external-filter-plugins doesn't link on Darwin
++ lib.optionals (withBitshuffle && !stdenv.isDarwin) [ hdf5-external-filter-plugins ];
patches = [ ./link-to-argp-standalone-if-needed.patch ];
# CrystFEL calls mosflm by searching PATH for it. We could've create a wrapper script that sets the PATH, but
# we'd have to do that for every CrystFEL executable (indexamajig, crystfel, partialator). Better to just
# hard-code mosflm's path once.
postPatch = ''
sed -i -e 's#execlp("mosflm"#execl("${mosflm}/bin/mosflm"#' libcrystfel/src/indexers/mosflm.c;
'';
postInstall = lib.optionalString (withBitshuffle && !stdenv.isDarwin) ''
for file in $out/bin/*; do
wrapProgram $file --set HDF5_PLUGIN_PATH ${hdf5-external-filter-plugins}/lib/plugins
done
'';
meta = with lib; {
description = "Data processing for serial crystallography";
longDescription = ''
CrystFEL is a suite of programs for processing (and simulating) Bragg diffraction data from "serial crystallography" experiments, often (but not always) performed using an X-ray Free-Electron Laser. Compared to rotation data, some of the particular characteristics of such data which call for a specialised software suite are:
- The sliced, rather than integrated, measurement of intensity data. Many, if not all reflections are partially integrated.
- Many patterns (thousands) are required - high throughput is needed.
- The crystal orientations in each pattern are random and uncorrelated.
- Merging into lower symmetry point groups may require the resolution of indexing ambiguities.'';
homepage = "https://www.desy.de/~twhite/crystfel/";
changelog = "https://www.desy.de/~twhite/crystfel/changes.html";
downloadPage = "https://www.desy.de/~twhite/crystfel/download.html";
license = licenses.gpl3Plus;
maintainers = with maintainers; [ pmiddend ];
platforms = [ "x86_64-linux" "x86_64-darwin" ];
};
}

View file

@ -0,0 +1,30 @@
diff --git a/ccp4/csymlib.c b/ccp4/csymlib.c
index 76bc70b..7a0c5dc 100644
--- a/ccp4/csymlib.c
+++ b/ccp4/csymlib.c
@@ -137,24 +137,7 @@ CCP4SPG *ccp4spg_load_spacegroup(const int numspg, const int ccp4numspg,
}
/* Open the symop file: */
- if (!(symopfile = getenv("SYMINFO"))) {
- if (debug)
- printf("Environment variable SYMINFO not set ... guessing location of symmetry file. \n");
- if (!(ccp4dir = getenv("CLIBD"))) {
- printf("Environment variable CLIBD not set ... big trouble! \n");
- return NULL;
- }
-
- symopfile = ccp4_utils_malloc((strlen(ccp4dir)+22)*sizeof(char));
- strcpy(symopfile,ccp4_utils_joinfilenames(ccp4dir,"syminfo.lib"));
- symopfile[strlen(ccp4dir)+21] = '\0';
- ccp4printf(1," SYMINFO file set to %s \n",symopfile);
- } else {
- if (debug) {
- ccp4printf(1,"\n Spacegroup information obtained from library file: \n");
- ccp4printf(1," Logical Name: SYMINFO Filename: %s\n\n",symopfile);
- }
- }
+ symopfile = NIX_PROVIDED_SYMOP_FILE;
filein = fopen(symopfile,"r");
if (!filein) {

View file

@ -0,0 +1,26 @@
diff --git a/meson.build b/meson.build
index efc9002b..070f37e4 100644
--- a/meson.build
+++ b/meson.build
@@ -34,6 +34,12 @@ if slurmdep.found()
conf_data.set10('HAVE_SLURM', 1)
endif
+if build_machine.system() == 'darwin' or build_machine.system() == 'freebsd' or not cc.links('#include <argp.h>\nstatic error_t parse_opt (int key, char *arg, struct argp_state *state) { argp_usage(state); return 0; }; void main() {}')
+ argpdep = cc.find_library('argp')
+else
+ argpdep = dependency('', required : false)
+endif
+
# Find HDF5 using inbuilt Meson methods. Requires Meson >= 0.50.0
hdf5dep = dependency('hdf5', language: 'c', required: true)
@@ -180,7 +186,7 @@ if zmqdep.found()
endif
executable('indexamajig', indexamajig_sources,
- dependencies: [mdep, libcrystfeldep, gsldep, pthreaddep, zmqdep],
+ dependencies: [mdep, libcrystfeldep, gsldep, pthreaddep, zmqdep, argpdep],
install: true,
install_rpath: '$ORIGIN/../lib64/:$ORIGIN/../lib')

View file

@ -0,0 +1,68 @@
{ lib, stdenv, fetchFromGitHub, cmake, git, gfortran, mpi, blas, liblapack, pkg-config, libGL, libGLU, opencascade, libsForQt5, vtkWithQt5}:
stdenv.mkDerivation rec {
pname = "elmerfem";
version = "9.0";
src = fetchFromGitHub {
owner = "elmercsc";
repo = "elmerfem";
rev = "release-${version}";
sha256 = "VK7jvu4s5d7k0c39XqY9dEzg/vXtX5Yr/09VcuZVQ9A=";
};
hardeningDisable = [ "format" ];
nativeBuildInputs = [
cmake
gfortran
pkg-config
libsForQt5.wrapQtAppsHook
];
buildInputs = [
mpi
blas
liblapack
libsForQt5.qtbase
libsForQt5.qtscript
libsForQt5.qwt
libGL
libGLU
opencascade
vtkWithQt5
];
preConfigure = ''
patchShebangs ./
'';
patches = [
./patches/0001-fix-import-of-QPainterPath.patch
./patches/0002-fem-rename-loopvars-to-avoid-redefinition.patch
./patches/0003-ignore-qwt_compat.patch
];
storepath = placeholder "out";
cmakeFlags = [
"-DELMER_INSTALL_LIB_DIR=${storepath}/lib"
"-DWITH_OpenMP:BOOLEAN=TRUE"
"-DWITH_MPI:BOOLEAN=TRUE"
"-DWITH_QT5:BOOLEAN=TRUE"
"-DWITH_OCC:BOOLEAN=TRUE"
"-DWITH_VTK:BOOLEAN=TRUE"
"-DWITH_ELMERGUI:BOOLEAN=TRUE"
"-DCMAKE_INSTALL_LIBDIR=lib"
"-DCMAKE_INSTALL_INCLUDEDIR=include"
"-DCMAKE_OpenGL_GL_PREFERENCE=GLVND"
];
meta = with lib; {
homepage = "https://elmerfem.org/";
description = "A finite element software for multiphysical problems";
platforms = platforms.unix;
maintainers = with maintainers; [ wulfsta broke ];
license = licenses.lgpl21;
};
}

View file

@ -0,0 +1,24 @@
From 87885de957aa3f891fe963503c94685675c24f49 Mon Sep 17 00:00:00 2001
From: grindhold <grindhold@gmx.net>
Date: Wed, 27 Apr 2022 19:16:42 +0200
Subject: [PATCH] fix import of QPainterPath
---
ElmerGUI/Application/twod/renderarea.cpp | 1 +
1 file changed, 1 insertion(+)
diff --git a/ElmerGUI/Application/twod/renderarea.cpp b/ElmerGUI/Application/twod/renderarea.cpp
index 4c2515c5..65128ea9 100644
--- a/ElmerGUI/Application/twod/renderarea.cpp
+++ b/ElmerGUI/Application/twod/renderarea.cpp
@@ -38,6 +38,7 @@
* *
*****************************************************************************/
#include <QPainter>
+#include <QPainterPath>
#include <QMouseEvent>
#include <QFile>
#include <QTextStream>
--
2.33.3

View file

@ -0,0 +1,82 @@
From 06634e5fd46a27dca11b87d4a38e9ead561de3d5 Mon Sep 17 00:00:00 2001
From: grindhold <grindhold@gmx.net>
Date: Thu, 28 Apr 2022 15:47:07 +0200
Subject: [PATCH] fem: rename loopvars to avoid redefinition
---
fem/src/modules/DCRComplexSolve.F90 | 28 ++++++++++++++--------------
1 file changed, 14 insertions(+), 14 deletions(-)
diff --git a/fem/src/modules/DCRComplexSolve.F90 b/fem/src/modules/DCRComplexSolve.F90
index 469214ee..268591fd 100644
--- a/fem/src/modules/DCRComplexSolve.F90
+++ b/fem/src/modules/DCRComplexSolve.F90
@@ -502,14 +502,14 @@ CONTAINS
IF ( SIZE(Hwrk,1) == 1 ) THEN
- DO i=1,MIN(3,SIZE(Hwrk,2))
- Tensor( i,1:n ) = Hwrk( 1,1,1:n )
+ DO k=1,MIN(3,SIZE(Hwrk,2))
+ Tensor( k,1:n ) = Hwrk( 1,1,1:n )
END DO
ELSE
- DO i=1,MIN(3,SIZE(Hwrk,1))
- Tensor( i,1:n ) = Hwrk( i,1,1:n )
+ DO k=1,MIN(3,SIZE(Hwrk,1))
+ Tensor( k,1:n ) = Hwrk( k,1,1:n )
END DO
END IF
@@ -1391,21 +1391,21 @@ contains
IF ( SIZE(Hwrk,1) == 1 ) THEN
- DO i=1,MIN(3,SIZE(Hwrk,2))
- Tensor( i,i,1:n ) = Hwrk( 1,1,1:n )
+ DO k=1,MIN(3,SIZE(Hwrk,2))
+ Tensor( k,k,1:n ) = Hwrk( 1,1,1:n )
END DO
ELSE IF ( SIZE(Hwrk,2) == 1 ) THEN
- DO i=1,MIN(3,SIZE(Hwrk,1))
- Tensor(i,i,1:n) = Hwrk(i,1,1:n)
+ DO k=1,MIN(3,SIZE(Hwrk,1))
+ Tensor(k,k,1:n) = Hwrk(k,1,1:n)
END DO
ELSE
- DO i=1,MIN(3,SIZE(Hwrk,1))
+ DO k=1,MIN(3,SIZE(Hwrk,1))
DO j=1,MIN(3,SIZE(Hwrk,2))
- Tensor( i,j,1:n ) = Hwrk(i,j,1:n)
+ Tensor( k,j,1:n ) = Hwrk(k,j,1:n)
END DO
END DO
@@ -1443,14 +1443,14 @@ contains
IF ( SIZE(Hwrk,1) == 1 ) THEN
- DO i=1,MIN(3,SIZE(Hwrk,2))
- Tensor( i,1:n ) = Hwrk( 1,1,1:n )
+ DO k=1,MIN(3,SIZE(Hwrk,2))
+ Tensor( k,1:n ) = Hwrk( 1,1,1:n )
END DO
ELSE
- DO i=1,MIN(3,SIZE(Hwrk,1))
- Tensor( i,1:n ) = Hwrk( i,1,1:n )
+ DO k=1,MIN(3,SIZE(Hwrk,1))
+ Tensor( k,1:n ) = Hwrk( k,1,1:n )
END DO
END IF
--
2.33.3

View file

@ -0,0 +1,36 @@
From 26601fec36a4978e805aad40e6d0cbf268c653d2 Mon Sep 17 00:00:00 2001
From: grindhold <grindhold@gmx.net>
Date: Thu, 28 Apr 2022 17:13:06 +0200
Subject: [PATCH] ignore qwt_compat
---
ElmerGUI/Application/src/convergenceview.h | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/ElmerGUI/Application/src/convergenceview.h b/ElmerGUI/Application/src/convergenceview.h
index 377b644b..64250149 100755
--- a/ElmerGUI/Application/src/convergenceview.h
+++ b/ElmerGUI/Application/src/convergenceview.h
@@ -52,7 +52,7 @@
#include <qwt_plot_grid.h>
#include <qwt_legend.h>
/*#include <qwt_data.h> <-- deprecated in Qwt6, using qwt_compat.h instead*/
-#include <qwt_compat.h>
+/*#include <qwt_compat.h>*/
#include <qwt_text.h>
#include <qwt_scale_engine.h>
@@ -76,8 +76,8 @@ public:
private:
int d_count;
- QwtArray<double> d_x;
- QwtArray<double> d_y;
+ QVector<double> d_x;
+ QVector<double> d_y;
};
class Curve
--
2.33.3

View file

@ -0,0 +1,72 @@
{ lib
, stdenv
, fetchFromGitHub
, fetchpatch
, cmake
, pkg-config
, apfel
, gsl
, lhapdf
, libarchive
, libyamlcpp
, python3
, sqlite
, swig
}:
stdenv.mkDerivation rec {
pname = "nnpdf";
version = "4.0.4";
src = fetchFromGitHub {
owner = "NNPDF";
repo = pname;
rev = version;
sha256 = "sha256-Alx4W0TkPzJBsnRXcKBrlEU6jWTnOjrji/IPk+dNCw0=";
};
patches = [
(fetchpatch {
url = "https://github.com/NNPDF/nnpdf/commit/7943b62a91d3a41fd4f6366b18881d50695f4b45.diff";
hash = "sha256-UXhTO7vZgJiY8h3bgjg7SQC0gMUQsYQ/V/PgtCEQ7VU=";
})
];
postPatch = ''
for file in CMakeLists.txt buildmaster/CMakeLists.txt; do
substituteInPlace $file \
--replace "-march=nocona -mtune=haswell" ""
done
'';
nativeBuildInputs = [
cmake
pkg-config
];
buildInputs = [
apfel
gsl
lhapdf
libarchive
libyamlcpp
python3
python3.pkgs.numpy
sqlite
swig
];
cmakeFlags = [
"-DCOMPILE_filter=ON"
"-DCOMPILE_evolvefit=ON"
];
meta = with lib; {
broken = (stdenv.isLinux && stdenv.isAarch64);
description = "An open-source machine learning framework for global analyses of parton distributions";
homepage = "https://docs.nnpdf.science/";
license = licenses.gpl3Only;
maintainers = [ maintainers.veprbl ];
platforms = platforms.unix;
};
}

View file

@ -0,0 +1,41 @@
{ lib, stdenv, fetchurl, eigen, makeWrapper, python3 }:
stdenv.mkDerivation rec {
pname = "professor";
version = "2.3.3";
src = fetchurl {
name = "Professor-${version}.tar.gz";
url = "https://professor.hepforge.org/downloads/?f=Professor-${version}.tar.gz";
sha256 = "17q026r2fpfxzf74d1013ksy3a9m57rcr2q164n9x02ci40bmib0";
};
postPatch = lib.optionalString stdenv.isDarwin ''
substituteInPlace Makefile \
--replace '-shared -o' '-shared -install_name "$(out)/$@" -o'
'';
nativeBuildInputs = [ python3.pkgs.cython makeWrapper ];
buildInputs = [ python3 eigen ];
propagatedBuildInputs = with python3.pkgs; [ iminuit numpy matplotlib yoda ];
CPPFLAGS = [ "-I${eigen}/include/eigen3" ];
PREFIX = placeholder "out";
postInstall = ''
for prog in "$out"/bin/*; do
wrapProgram "$prog" --set PYTHONPATH "$PYTHONPATH:$(toPythonPath "$out")"
done
'';
doInstallCheck = true;
installCheckTarget = "check";
meta = with lib; {
description = "A tuning tool for Monte Carlo event generators";
homepage = "https://professor.hepforge.org/";
license = licenses.unfree; # no license specified
maintainers = [ maintainers.veprbl ];
platforms = platforms.unix;
};
}

View file

@ -0,0 +1,32 @@
{ lib, stdenv, fetchurl, jre, makeWrapper }:
stdenv.mkDerivation rec {
pname = "quantomatic";
version = "0.7";
src = fetchurl {
url = "https://github.com/Quantomatic/quantomatic/releases/download/v${version}/Quantomatic-v${version}.jar";
sha256 = "04dd5p73a7plb4l4x2balam8j7mxs8df06rjkalxycrr1id52q4r";
};
nativeBuildInputs = [ makeWrapper ];
buildInputs = [ jre ];
dontUnpack = true;
installPhase = ''
mkdir -p $out/libexec/quantomatic
cp $src $out/libexec/quantomatic/quantomatic.jar
mkdir -p $out/bin
makeWrapper ${jre}/bin/java $out/bin/quantomatic --add-flags "-jar $out/libexec/quantomatic/quantomatic.jar"
'';
meta = with lib; {
description = "A piece of software for reasoning about monoidal theories; in particular, quantum information processing";
license = licenses.gpl3;
homepage = "https://quantomatic.github.io/";
sourceProvenance = with sourceTypes; [ binaryBytecode ];
maintainers = with maintainers; [ nickhu ];
platforms = platforms.all;
};
}

View 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();

View 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 ];
};
}

View 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!

View file

@ -0,0 +1,38 @@
{ lib, stdenv, fetchurl, autoconf, gfortran, hepmc2, fastjet, lhapdf, rivet, sqlite }:
stdenv.mkDerivation rec {
pname = "sherpa";
version = "2.2.12";
src = fetchurl {
url = "https://www.hepforge.org/archive/sherpa/SHERPA-MC-${version}.tar.gz";
sha256 = "sha256-UpRkd1yoKLncllEQUm80DedDtgA8Hm+Kvi/BRVCu0AE=";
};
postPatch = lib.optionalString (stdenv.hostPlatform.libc == "glibc") ''
sed -ie '/sys\/sysctl.h/d' ATOOLS/Org/Run_Parameter.C
'';
nativeBuildInputs = [ autoconf gfortran ];
buildInputs = [ sqlite lhapdf rivet ];
enableParallelBuilding = true;
configureFlags = [
"--with-sqlite3=${sqlite.dev}"
"--enable-hepmc2=${hepmc2}"
"--enable-fastjet=${fastjet}"
"--enable-lhapdf=${lhapdf}"
"--enable-rivet=${rivet}"
"--enable-pythia"
];
meta = with lib; {
description = "Simulation of High-Energy Reactions of PArticles in lepton-lepton, lepton-photon, photon-photon, lepton-hadron and hadron-hadron collisions";
license = licenses.gpl2;
homepage = "https://gitlab.com/sherpa-team/sherpa";
platforms = platforms.unix;
maintainers = with maintainers; [ veprbl ];
};
}

View file

@ -0,0 +1,22 @@
{ lib, stdenv, fetchgit, fftw }:
stdenv.mkDerivation rec {
pname = "shtns";
version = "3.5.1";
src = fetchgit {
url = "https://bitbucket.org/nschaeff/shtns";
rev = "v${version}";
sha256 = "1ajrplhv7a2dvb3cn3n638281w0bzdcydvvwbg64awbjg622mdpd";
};
buildInputs = [ fftw ];
meta = with lib; {
description = "High performance library for Spherical Harmonic Transform";
homepage = "https://nschaeff.bitbucket.io/shtns/";
license = licenses.cecill21;
maintainers = [ maintainers.bzizou ];
platforms = platforms.linux;
};
}

View file

@ -0,0 +1,50 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -54,21 +54,7 @@ endif()
endif()
#Use c preprocessor with fortran
-
-if(UNIX AND NOT APPLE)
- set(CMAKE_Fortran_FLAGS "-cpp -Wno-argument-mismatch")
-endif()
-
-if(APPLE)
- set(CMAKE_Fortran_FLAGS "-cpp -fallow-argument-mismatch")
-endif()
-
-
-if (CMAKE_MAJOR_VERSION VERSION_GREATER_EQUAL "3")
-if(CMAKE_Fortran_COMPILER_VERSION VERSION_GREATER_EQUAL "10")
- set(CMAKE_Fortran_FLAGS "-cpp -fallow-argument-mismatch")
-endif()
-endif()
+set(CMAKE_Fortran_FLAGS "-cpp")
#For Fortran
diff --git a/src/GetChisquare.f b/src/GetChisquare.f
index b21413fe..28391bcb 100644
--- a/src/GetChisquare.f
+++ b/src/GetChisquare.f
@@ -2418,8 +2418,8 @@ C> @Brief Interface to lapack, to dynamically allocate work arrays
integer NCovar, NDimCovar
double precision Covar(NDimCovar,NDimCovar), EigenValues(NCovar)
integer IFail
- double precision Work
- integer IWork
+ double precision Work(1)
+ integer IWork(1)
Character*80 msg
C---------------------------------------------------------------
C Determine optimal size of the work array:
@@ -2432,7 +2432,7 @@ C Determine optimal size of the work array:
$ int(work)+1, iwork
call HF_ERRLOG(14121701,msg)
call MyDSYEVD2(NCovar,Covar,NDimCovar, EigenValues,
- $ int(work)+1,iwork,ifail)
+ $ int(work(1))+1,iwork(1),ifail)
end

View file

@ -0,0 +1,62 @@
{ lib
, stdenv
, fetchurl
, apfel
, apfelgrid
, applgrid
, blas
, ceres-solver
, cmake
, gfortran
, gsl
, lapack
, lhapdf
, libtirpc
, libyaml
, libyamlcpp
, pkg-config
, qcdnum
, root
, zlib
, memorymappingHook, memstreamHook
}:
stdenv.mkDerivation rec {
pname = "xfitter";
version = "2.2.0";
src = fetchurl {
name = "${pname}-${version}.tgz";
url = "https://www.xfitter.org/xFitter/xFitter/DownloadPage?action=AttachFile&do=get&target=${pname}-${version}.tgz";
sha256 = "sha256-ZHIQ5hOY+k0/wmpE0o4Po+RZ4MkVMk+bK1Rc6eqwwH0=";
};
patches = [
# Avoid need for -fallow-argument-mismatch
./0001-src-GetChisquare.f-use-correct-types-in-calls-to-DSY.patch
];
nativeBuildInputs = [ cmake gfortran pkg-config ];
buildInputs =
[ apfel blas ceres-solver lhapdf lapack libyaml root qcdnum gsl libyamlcpp zlib ]
++ lib.optionals ("5" == lib.versions.major root.version) [ apfelgrid applgrid ]
++ lib.optionals (stdenv.system == "x86_64-darwin") [ memorymappingHook memstreamHook ]
++ lib.optional (stdenv.hostPlatform.libc == "glibc") libtirpc
;
NIX_CFLAGS_COMPILE = lib.optional (stdenv.hostPlatform.libc == "glibc") "-I${libtirpc.dev}/include/tirpc";
NIX_LDFLAGS = lib.optional (stdenv.hostPlatform.libc == "glibc") "-ltirpc";
# workaround wrong library IDs
postInstall = lib.optionalString stdenv.isDarwin ''
ln -sv "$out/lib/xfitter/"* "$out/lib/"
'';
meta = with lib; {
description = "The xFitter project is an open source QCD fit framework ready to extract PDFs and assess the impact of new data";
license = licenses.gpl3;
homepage = "https://www.xfitter.org/xFitter";
platforms = platforms.unix;
maintainers = with maintainers; [ veprbl ];
};
}

View file

@ -0,0 +1,21 @@
{ mkDerivation, lib, fetchurl, qmake }:
mkDerivation rec {
pname = "xflr5";
version = "6.47";
src = fetchurl {
url = "mirror://sourceforge/xflr5/${pname}_v${version}_src.tar.gz";
sha256 = "02x3r9iv3ndwxa65mxn9m5dlhcrnjiq7cffi6rmb456gs3v3dnav";
};
nativeBuildInputs = [ qmake ];
meta = with lib; {
description = "An analysis tool for airfoils, wings and planes";
homepage = "https://sourceforge.net/projects/xflr5/";
license = licenses.gpl3;
maintainers = [ maintainers.esclear ];
platforms = platforms.linux;
};
}