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
25
pkgs/development/libraries/physics/apfel/default.nix
Normal file
25
pkgs/development/libraries/physics/apfel/default.nix
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
{ lib, stdenv, fetchFromGitHub, gfortran, lhapdf, python3, zlib }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "apfel";
|
||||
version = "3.0.6";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "scarrazza";
|
||||
repo = "apfel";
|
||||
rev = version;
|
||||
sha256 = "sha256-fRdJ+C92tEC75iUwP9Tmm/EswrlA52eUo5fBjfieH9o=";
|
||||
};
|
||||
|
||||
buildInputs = [ gfortran lhapdf python3 zlib ];
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
meta = with lib; {
|
||||
description = "A PDF Evolution Library";
|
||||
license = licenses.gpl3;
|
||||
homepage = "https://apfel.mi.infn.it/";
|
||||
platforms = platforms.unix;
|
||||
maintainers = with maintainers; [ veprbl ];
|
||||
};
|
||||
}
|
||||
26
pkgs/development/libraries/physics/apfelgrid/default.nix
Normal file
26
pkgs/development/libraries/physics/apfelgrid/default.nix
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
{ lib, stdenv, fetchFromGitHub, autoreconfHook, apfel, applgrid, lhapdf, root5 }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "apfelgrid";
|
||||
version = "1.0.1";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "nhartland";
|
||||
repo = "APFELgrid";
|
||||
rev = "v${version}";
|
||||
sha256 = "0l0cyxd00kmb5aggzwsxg83ah0qiwav0shbxkxwrz3dvw78n89jk";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ autoreconfHook ];
|
||||
buildInputs = [ apfel applgrid lhapdf root5 ];
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
meta = with lib; {
|
||||
description = "Ultra-fast theory predictions for collider observables";
|
||||
license = licenses.mit;
|
||||
homepage = "http://nhartland.github.io/APFELgrid/";
|
||||
platforms = platforms.unix;
|
||||
maintainers = with maintainers; [ veprbl ];
|
||||
};
|
||||
}
|
||||
50
pkgs/development/libraries/physics/applgrid/bad_code.patch
Normal file
50
pkgs/development/libraries/physics/applgrid/bad_code.patch
Normal file
|
|
@ -0,0 +1,50 @@
|
|||
diff --git a/appl_grid/appl_grid.h b/appl_grid/appl_grid.h
|
||||
index 5059622..a0651c9 100644
|
||||
--- a/appl_grid/appl_grid.h
|
||||
+++ b/appl_grid/appl_grid.h
|
||||
@@ -56,7 +56,7 @@ public:
|
||||
class exception : public std::exception {
|
||||
public:
|
||||
exception(const std::string& s) { std::cerr << what() << " " << s << std::endl; };
|
||||
- exception(std::ostream& s) { std::cerr << what() << " " << s << std::endl; };
|
||||
+ exception(std::ostream& s) { s << what() << " " << std::endl; };
|
||||
virtual const char* what() const throw() { return "appl::grid::exception"; }
|
||||
};
|
||||
|
||||
diff --git a/appl_grid/appl_pdf.h b/appl_grid/appl_pdf.h
|
||||
index c71fd84..2525527 100644
|
||||
--- a/appl_grid/appl_pdf.h
|
||||
+++ b/appl_grid/appl_pdf.h
|
||||
@@ -51,7 +51,7 @@ public:
|
||||
class exception : public std::exception {
|
||||
public:
|
||||
exception(const std::string& s="") { std::cerr << what() << " " << s << std::endl; };
|
||||
- exception(std::ostream& s) { std::cerr << what() << " " << s << std::endl; };
|
||||
+ exception(std::ostream& s) { s << " " << std::endl; };
|
||||
const char* what() const throw() { return "appl::appl_pdf::exception "; }
|
||||
};
|
||||
|
||||
diff --git a/src/appl_igrid.h b/src/appl_igrid.h
|
||||
index d25288e..be354df 100644
|
||||
--- a/src/appl_igrid.h
|
||||
+++ b/src/appl_igrid.h
|
||||
@@ -52,7 +52,7 @@ private:
|
||||
class exception {
|
||||
public:
|
||||
exception(const std::string& s) { std::cerr << s << std::endl; };
|
||||
- exception(std::ostream& s) { std::cerr << s << std::endl; };
|
||||
+ exception(std::ostream& s) { s << std::endl; };
|
||||
};
|
||||
|
||||
typedef double (igrid::*transform_t)(double) const;
|
||||
diff --git a/src/lumi_pdf.cxx b/src/lumi_pdf.cxx
|
||||
--- a/src/lumi_pdf.cxx
|
||||
+++ b/src/lumi_pdf.cxx
|
||||
@@ -235,6 +235,6 @@ void lumi_pdf::write(const std::string& filename) const {
|
||||
// std::string lumi_pdf::summary(std::ostream& s=std::cout) const {
|
||||
std::string lumi_pdf::summary() const {
|
||||
std::stringstream s;
|
||||
- s << "lumi_pdf::lumi_pdf() " << s << "\tsize " << m_combinations.size() << " lookup size " << m_lookup.size() << " " << this;
|
||||
+ s << "lumi_pdf::lumi_pdf() " << "\tsize " << m_combinations.size() << " lookup size " << m_lookup.size() << " " << this;
|
||||
return s.str();
|
||||
}
|
||||
45
pkgs/development/libraries/physics/applgrid/default.nix
Normal file
45
pkgs/development/libraries/physics/applgrid/default.nix
Normal file
|
|
@ -0,0 +1,45 @@
|
|||
{ lib, stdenv, fetchurl, gfortran, hoppet, lhapdf, root5, zlib }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "applgrid";
|
||||
version = "1.4.70";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://www.hepforge.org/archive/applgrid/${pname}-${version}.tgz";
|
||||
sha256 = "1yw9wrk3vjv84kd3j4s1scfhinirknwk6xq0hvj7x2srx3h93q9p";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ gfortran ];
|
||||
|
||||
# For some reason zlib was only needed after bump to gfortran8
|
||||
buildInputs = [ hoppet lhapdf root5 zlib ];
|
||||
|
||||
patches = [
|
||||
./bad_code.patch
|
||||
];
|
||||
|
||||
preConfigure = ''
|
||||
substituteInPlace src/Makefile.in \
|
||||
--replace "-L\$(subst /libgfortran.a, ,\$(FRTLIB) )" "-L${gfortran.cc.lib}/lib"
|
||||
'' + (if stdenv.isDarwin then ''
|
||||
substituteInPlace src/Makefile.in \
|
||||
--replace "gfortran -print-file-name=libgfortran.a" "gfortran -print-file-name=libgfortran.dylib"
|
||||
'' else "");
|
||||
|
||||
enableParallelBuilding = false; # broken
|
||||
|
||||
# Install private headers required by APFELgrid
|
||||
postInstall = ''
|
||||
for header in src/*.h; do
|
||||
install -Dm644 "$header" "$out"/include/appl_grid/"`basename $header`"
|
||||
done
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "The APPLgrid project provides a fast and flexible way to reproduce the results of full NLO calculations with any input parton distribution set in only a few milliseconds rather than the weeks normally required to gain adequate statistics";
|
||||
license = licenses.gpl3;
|
||||
homepage = "http://applgrid.hepforge.org";
|
||||
platforms = platforms.unix;
|
||||
maintainers = with maintainers; [ veprbl ];
|
||||
};
|
||||
}
|
||||
|
|
@ -0,0 +1,94 @@
|
|||
From a69607c511b6da94cde477283b129cbc9cfdd5a3 Mon Sep 17 00:00:00 2001
|
||||
From: Maximilian Bosch <maximilian@mbosch.me>
|
||||
Date: Tue, 11 Aug 2020 12:32:06 +0200
|
||||
Subject: [PATCH] Use `strerror` rather than `sys_errlist` to fix compilation
|
||||
w/glibc-2.32
|
||||
|
||||
To quote the release-notes[1]:
|
||||
|
||||
All programs should use
|
||||
strerror or strerror_r instead.
|
||||
|
||||
[1] https://sourceware.org/pipermail/libc-announce/2020/000029.html
|
||||
---
|
||||
2006/src/packlib/cspack/sysreq/serror.c | 10 +---------
|
||||
2006/src/packlib/cspack/sysreq/socket.c | 2 +-
|
||||
2006/src/packlib/kernlib/kernbit/z268/systems.c | 4 ++--
|
||||
2006/src/pawlib/paw/piafs/piafc.c | 5 +----
|
||||
4 files changed, 5 insertions(+), 16 deletions(-)
|
||||
|
||||
diff --git a/2006/src/packlib/cspack/sysreq/serror.c b/2006/src/packlib/cspack/sysreq/serror.c
|
||||
index 3667c42a..c560e499 100644
|
||||
--- a/2006/src/packlib/cspack/sysreq/serror.c
|
||||
+++ b/2006/src/packlib/cspack/sysreq/serror.c
|
||||
@@ -176,15 +176,7 @@ int n;
|
||||
}
|
||||
else {
|
||||
#if !defined(vms)
|
||||
- if ((n>0) && (n<sys_nerr)) {
|
||||
- return(sys_errlist[n]);
|
||||
- }
|
||||
- else {
|
||||
- (void) sprintf(buf,"%s: %d\n",
|
||||
- sys_serrlist[SEMAXERR+1-SEBASEOFF],
|
||||
- n);
|
||||
- return(buf);
|
||||
- }
|
||||
+ return strerror(n);
|
||||
#else /* vms */
|
||||
/*
|
||||
* There are (were) some bugs is DEC C compilers (/OPT), just check
|
||||
diff --git a/2006/src/packlib/cspack/sysreq/socket.c b/2006/src/packlib/cspack/sysreq/socket.c
|
||||
index ceb5bd63..34c2a7bc 100644
|
||||
--- a/2006/src/packlib/cspack/sysreq/socket.c
|
||||
+++ b/2006/src/packlib/cspack/sysreq/socket.c
|
||||
@@ -412,7 +412,7 @@ char *
|
||||
s_errmsg() /* return last error message */
|
||||
{
|
||||
#if !defined(vms)
|
||||
- return(sys_errlist[errno]);
|
||||
+ return(strerror(errno));
|
||||
#else /* vms */
|
||||
#if defined(MULTINET) && (MULTINET == 1)
|
||||
return(vms_errno_string());
|
||||
diff --git a/2006/src/packlib/kernlib/kernbit/z268/systems.c b/2006/src/packlib/kernlib/kernbit/z268/systems.c
|
||||
index 98459459..d1ad63ed 100644
|
||||
--- a/2006/src/packlib/kernlib/kernbit/z268/systems.c
|
||||
+++ b/2006/src/packlib/kernlib/kernbit/z268/systems.c
|
||||
@@ -134,7 +134,7 @@ int *ovflw;
|
||||
#endif /* hpux */
|
||||
|
||||
if ( (ps=(FILE *)popen(command,"r"))==NULL ) {
|
||||
- fprintf(stderr,"systems(): popen(): %s\n",sys_errlist[errno] );
|
||||
+ fprintf(stderr,"systems(): popen(): %s\n",strerror(errno) );
|
||||
*rc= -errno;
|
||||
*chars=0 ;
|
||||
*l=0 ;
|
||||
@@ -144,7 +144,7 @@ int *ovflw;
|
||||
rcode = fread(buf, 1, buflen , ps );
|
||||
if ( rcode < 0 ) {
|
||||
fprintf(stderr,"systems(): pipe fread(): %s\n",
|
||||
- sys_errlist[errno] );
|
||||
+ strerror(errno) );
|
||||
buf[0]='\n';
|
||||
*rc= -errno;
|
||||
*chars=0 ;
|
||||
diff --git a/2006/src/pawlib/paw/piafs/piafc.c b/2006/src/pawlib/paw/piafs/piafc.c
|
||||
index b163f80c..4d8d5528 100644
|
||||
--- a/2006/src/pawlib/paw/piafs/piafc.c
|
||||
+++ b/2006/src/pawlib/paw/piafs/piafc.c
|
||||
@@ -1795,10 +1795,7 @@ static void fatalperror(char *msg)
|
||||
extern char *sys_errlist[];
|
||||
#endif
|
||||
|
||||
- if ((unsigned) errno < sys_nerr)
|
||||
- sprintf(buf, "%s: %s", msg, sys_errlist[errno]);
|
||||
- else
|
||||
- sprintf(buf, "%s: Error %d", msg, errno);
|
||||
+ sprintf(buf, "%s: %s", msg, strerror(errno));
|
||||
|
||||
fatal(buf);
|
||||
}
|
||||
--
|
||||
2.25.4
|
||||
|
||||
103
pkgs/development/libraries/physics/cernlib/default.nix
Normal file
103
pkgs/development/libraries/physics/cernlib/default.nix
Normal file
|
|
@ -0,0 +1,103 @@
|
|||
{ lib, stdenv, fetchurl, gfortran, imake, makedepend, motif, xorg }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
version = "2006";
|
||||
pname = "cernlib";
|
||||
|
||||
src = fetchurl {
|
||||
urls = [
|
||||
"https://ftp.riken.jp/cernlib/download/${version}_source/tar/${version}_src.tar.gz"
|
||||
"https://cernlib.web.cern.ch/cernlib/download/${version}_source/tar/${version}_src.tar.gz"
|
||||
];
|
||||
sha256 = "0awla1rl96z82br7slcmg8ks1d2a7slk6dj79ywb871j2ksi3fky";
|
||||
};
|
||||
|
||||
buildInputs = with xorg; [ gfortran motif libX11 libXft libXt ];
|
||||
nativeBuildInputs = [ imake makedepend ];
|
||||
sourceRoot = ".";
|
||||
|
||||
patches = [ ./patch.patch ./0001-Use-strerror-rather-than-sys_errlist-to-fix-compilat.patch ];
|
||||
|
||||
postPatch = ''
|
||||
echo 'InstallBinSubdirs(packlib scripts)' >> 2006/src/Imakefile
|
||||
substituteInPlace 2006/src/config/site.def \
|
||||
--replace "# define MakeCmd gmake" "# define MakeCmd make"
|
||||
substituteInPlace 2006/src/config/lnxLib.rules \
|
||||
--replace "# lib" "// lib"
|
||||
|
||||
substituteInPlace 2006/src/config/linux.cf \
|
||||
--replace "# ifdef Hasgfortran" "# if 1" \
|
||||
--replace "# define CcCmd gcc4" "# define CcCmd gcc"
|
||||
substituteInPlace 2006/src/scripts/cernlib \
|
||||
--replace "-lnsl" ""
|
||||
|
||||
# binutils 2.37 fix
|
||||
substituteInPlace 2006/src/config/Imake.tmpl --replace "clq" "cq"
|
||||
'';
|
||||
|
||||
preConfigure = ''
|
||||
export CERN=`pwd`
|
||||
export CERN_LEVEL=${version}
|
||||
export CERN_ROOT=$CERN/$CERN_LEVEL
|
||||
export CVSCOSRC=`pwd`/$CERN_LEVEL/src
|
||||
export PATH=$PATH:$CERN_ROOT/bin
|
||||
'';
|
||||
|
||||
FFLAGS = lib.optionals (lib.versionAtLeast gfortran.version "10.0.0") [
|
||||
# Fix https://github.com/vmc-project/geant3/issues/17
|
||||
"-fallow-invalid-boz"
|
||||
|
||||
# Fix for gfortran 10
|
||||
"-fallow-argument-mismatch"
|
||||
];
|
||||
|
||||
NIX_CFLAGS = [ "-Wno-return-type" ];
|
||||
|
||||
# Workaround build failure on -fno-common toolchains:
|
||||
# ld: libpacklib.a(kedit.o):kuip/klink1.h:11: multiple definition of `klnkaddr';
|
||||
# libzftplib.a(zftpcdf.o):zftp/zftpcdf.c:155: first defined here
|
||||
NIX_CFLAGS_COMPILE = "-fcommon";
|
||||
|
||||
makeFlags = [
|
||||
"FORTRANOPTIONS=$(FFLAGS)"
|
||||
"CCOPTIONS=$(NIX_CFLAGS)"
|
||||
];
|
||||
|
||||
configurePhase = ''
|
||||
runHook preConfigure
|
||||
|
||||
cd $CERN_ROOT
|
||||
mkdir -p build
|
||||
cd $CERN_ROOT/build
|
||||
$CVSCOSRC/config/imake_boot
|
||||
|
||||
runHook postConfigure
|
||||
'';
|
||||
|
||||
preBuild = ''
|
||||
make -j $NIX_BUILD_CORES $makeFlags bin/kuipc
|
||||
make -j $NIX_BUILD_CORES $makeFlags scripts/Makefile
|
||||
pushd scripts
|
||||
make -j $NIX_BUILD_CORES $makeFlags bin/cernlib
|
||||
popd
|
||||
'';
|
||||
|
||||
installTargets = [ "install.bin" "install.lib" "install.include" ];
|
||||
installFlags = [
|
||||
"CERN_BINDIR=${placeholder "out"}/bin"
|
||||
"CERN_INCLUDEDIR=${placeholder "out"}/include"
|
||||
"CERN_LIBDIR=${placeholder "out"}/lib"
|
||||
"CERN_SHLIBDIR=${placeholder "out"}/libexec"
|
||||
];
|
||||
|
||||
setupHook = ./setup-hook.sh;
|
||||
|
||||
meta = {
|
||||
homepage = "http://cernlib.web.cern.ch";
|
||||
description = "Legacy collection of libraries and modules for data analysis in high energy physics";
|
||||
broken = stdenv.isDarwin;
|
||||
platforms = [ "i686-linux" "x86_64-linux" "x86_64-darwin" ];
|
||||
maintainers = with lib.maintainers; [ veprbl ];
|
||||
license = lib.licenses.gpl2;
|
||||
};
|
||||
}
|
||||
186
pkgs/development/libraries/physics/cernlib/patch.patch
Normal file
186
pkgs/development/libraries/physics/cernlib/patch.patch
Normal file
|
|
@ -0,0 +1,186 @@
|
|||
diff --git a/2006/src/config/Imake.tmpl b/2006/src/config/Imake.tmpl
|
||||
index 054fb04..a3b3828 100644
|
||||
--- a/2006/src/config/Imake.tmpl
|
||||
+++ b/2006/src/config/Imake.tmpl
|
||||
@@ -455,7 +455,7 @@ XCOMM the platform-specific parameters - edit site.def to change
|
||||
#define NoRConst NO /* YES if const for structs of funcs is bad */
|
||||
#endif
|
||||
#ifndef InstPgmFlags
|
||||
-#define InstPgmFlags -s
|
||||
+#define InstPgmFlags
|
||||
#endif
|
||||
#ifndef InstBinFlags
|
||||
#define InstBinFlags -m 0755
|
||||
diff --git a/2006/src/config/biglib.rules b/2006/src/config/biglib.rules
|
||||
index c90e58a..9173bdc 100644
|
||||
--- a/2006/src/config/biglib.rules
|
||||
+++ b/2006/src/config/biglib.rules
|
||||
@@ -368,7 +368,7 @@ define build-object-list @@\
|
||||
@ (set -e;\ @@\
|
||||
case '${MFLAGS}' in *[i]*) set +e;; esac; \ @@\
|
||||
subdirs=Quote(dirs);\ @@\
|
||||
- list=`/bin/pwd`/$@;\ @@\
|
||||
+ list=`pwd`/$@;\ @@\
|
||||
for dir in $$subdirs; do \ @@\
|
||||
(set -e;cd $$dir;SedCmd -e "\=^[^/]=s=^.=$$dir/&=" $@ >> $$list);\@@\
|
||||
done) || (rm $@; exit 1) @@\
|
||||
diff --git a/2006/src/config/imake_boot b/2006/src/config/imake_boot
|
||||
index b52d0d3..69cf1b3 100755
|
||||
--- a/2006/src/config/imake_boot
|
||||
+++ b/2006/src/config/imake_boot
|
||||
@@ -10,8 +10,8 @@ if [ "$CVSCOSRC" = "" ] ; then
|
||||
fi
|
||||
if [ -f Imakefile ] ; then
|
||||
imake -DUseInstalled -I$CVSCOSRC/config \
|
||||
- -DTOPDIR=`/bin/pwd` -DCURDIR= -fImakefile
|
||||
+ -DTOPDIR=`pwd` -DCURDIR= -fImakefile
|
||||
else
|
||||
imake -DUseInstalled -I$CVSCOSRC/config \
|
||||
- -DTOPDIR=`/bin/pwd` -DCURDIR= -f$CVSCOSRC/Imakefile
|
||||
+ -DTOPDIR=`pwd` -DCURDIR= -f$CVSCOSRC/Imakefile
|
||||
fi
|
||||
diff --git a/2006/src/config/linux-lp64.cf b/2006/src/config/linux-lp64.cf
|
||||
index e071b2f..3cc5c3b 100644
|
||||
--- a/2006/src/config/linux-lp64.cf
|
||||
+++ b/2006/src/config/linux-lp64.cf
|
||||
@@ -173,7 +173,7 @@
|
||||
#define FortranCmd g77
|
||||
#define XargsCmd xargs
|
||||
#define FortranSaveFlags /* */ /* Everything static !? */
|
||||
-#define DefaultFCOptions -fno-automatic -fno-second-underscore -fugly-complex
|
||||
+#define DefaultFCOptions -fno-automatic -fno-second-underscore
|
||||
#define CernlibSystem -DCERNLIB_LINUX -DCERNLIB_UNIX -DCERNLIB_LNX -DCERNLIB_QMGLIBC -DCERNLIB_QMLXIA64
|
||||
|
||||
# endif
|
||||
diff --git a/2006/src/config/linux.cf b/2006/src/config/linux.cf
|
||||
index cc0bee5..a8dd954 100644
|
||||
--- a/2006/src/config/linux.cf
|
||||
+++ b/2006/src/config/linux.cf
|
||||
@@ -258,7 +258,7 @@ endif @@\
|
||||
#define FortranCmd g77
|
||||
#define XargsCmd xargs
|
||||
#define FortranSaveFlags /* */ /* Everything static !? */
|
||||
-#define DefaultFCOptions -fno-automatic -fno-second-underscore -fugly-complex
|
||||
+#define DefaultFCOptions -fno-automatic -fno-second-underscore
|
||||
#define CernlibSystem -DCERNLIB_LINUX -DCERNLIB_UNIX -DCERNLIB_LNX -DCERNLIB_QMGLIBC
|
||||
|
||||
# endif
|
||||
diff --git a/2006/src/packlib/kuip/code_kuip/kkern.c b/2006/src/packlib/kuip/code_kuip/kkern.c
|
||||
index 3a5579f..5f3c352 100644
|
||||
--- a/2006/src/packlib/kuip/code_kuip/kkern.c
|
||||
+++ b/2006/src/packlib/kuip/code_kuip/kkern.c
|
||||
@@ -543,24 +543,6 @@ char *str0dup( const char *str )
|
||||
|
||||
|
||||
/*
|
||||
- * like strdup() but string is n characters long and not terminated
|
||||
- */
|
||||
-char *strndup( const char *str,
|
||||
- size_t len )
|
||||
-{
|
||||
- size_t bytes = len + 1;
|
||||
- char *p;
|
||||
-
|
||||
- if( bytes < ALLOC_MIN_BYTES )
|
||||
- bytes = ALLOC_MIN_BYTES;
|
||||
-
|
||||
- p = strncpy( malloc( bytes ), str, len );
|
||||
- p[len] = '\0';
|
||||
- return p;
|
||||
-}
|
||||
-
|
||||
-
|
||||
-/*
|
||||
* strdup() of character representation of integer n
|
||||
*/
|
||||
char *stridup( int n )
|
||||
diff --git a/2006/src/packlib/kuip/code_kuip/kmenu.c b/2006/src/packlib/kuip/code_kuip/kmenu.c
|
||||
index f135b07..23007a8 100644
|
||||
--- a/2006/src/packlib/kuip/code_kuip/kmenu.c
|
||||
+++ b/2006/src/packlib/kuip/code_kuip/kmenu.c
|
||||
@@ -1404,7 +1404,7 @@ void interactive_find( char *expr, int keym )
|
||||
printf ("See also:\n ");
|
||||
for (i = 0; i < nval; i++) {
|
||||
if (i == ncmd) continue;
|
||||
- printf (flis_name[i]);
|
||||
+ printf ("%s", flis_name[i]);
|
||||
if (i < nval-1)
|
||||
printf (", ");
|
||||
else
|
||||
diff --git a/2006/src/packlib/kuip/kuip/kstring.h b/2006/src/packlib/kuip/kuip/kstring.h
|
||||
index 7811f15..12a1344 100644
|
||||
--- a/2006/src/packlib/kuip/kuip/kstring.h
|
||||
+++ b/2006/src/packlib/kuip/kuip/kstring.h
|
||||
@@ -21,7 +21,6 @@ extern "C" {
|
||||
*/
|
||||
|
||||
#ifndef WIN32
|
||||
-extern void* memmove( void* dst, const void* src, size_t n );
|
||||
#endif
|
||||
|
||||
/* GF. make conform to kkern.c#if !defined(__convexc__)*/
|
||||
@@ -46,7 +45,6 @@ extern char* str4dup( const char* str1, const char* str2, const char* str3,
|
||||
const char* str4 );
|
||||
extern char* str5dup( const char* str1, const char* str2, const char* str3,
|
||||
const char* str4, const char* str5 );
|
||||
-extern char* strndup( const char* buf, size_t n );
|
||||
extern char* stridup( int i );
|
||||
|
||||
extern char* mstrcat( char* ptr, const char* str );
|
||||
diff --git a/2006/src/pawlib/paw/cpaw/bugrep.c b/2006/src/pawlib/paw/cpaw/bugrep.c
|
||||
index d503a45..d26e30f 100644
|
||||
--- a/2006/src/pawlib/paw/cpaw/bugrep.c
|
||||
+++ b/2006/src/pawlib/paw/cpaw/bugrep.c
|
||||
@@ -432,51 +432,7 @@ br_add_config( char * tmp_file )
|
||||
|
||||
static int
|
||||
br_mail_file( char *addr, char *subj, char *file )
|
||||
-#if (defined(CERNLIB_UNIX))&&(!defined(CERNLIB_WINNT))&&(!defined(CERNLIB_MACOSX))
|
||||
-{
|
||||
- FILE *mfp, *fp;
|
||||
- char line[1024], my_addr[L_cuserid];
|
||||
- time_t clock;
|
||||
- struct tm *ts;
|
||||
-
|
||||
- fp = fopen( file, "r" );
|
||||
- if ( fp == NULL ) {
|
||||
- printf( "BUGREPORT: cannot (re)open temporary file\n" );
|
||||
- return MAIL_ERROR;
|
||||
- }
|
||||
-
|
||||
- cuserid( my_addr );
|
||||
-
|
||||
- sprintf( line, "/usr/lib/sendmail -t" );
|
||||
- mfp = popen( line, "w" );
|
||||
-
|
||||
- if ( mfp == NULL ) {
|
||||
- printf( "BUGREPORT: cannot run sendmail\n" );
|
||||
- return MAIL_ERROR;
|
||||
- }
|
||||
-
|
||||
-
|
||||
- clock = time( (time_t *) 0 );
|
||||
- ts = localtime( &clock );
|
||||
- strftime( line, sizeof( line ),
|
||||
- "%a, %d %h %y %H:%M:%S", ts );
|
||||
- fprintf ( mfp, "To: %s\n", addr );
|
||||
- fprintf ( mfp, "Bcc: %s\n", my_addr );
|
||||
- fprintf ( mfp, "Date: %s\n", line );
|
||||
- fprintf ( mfp, "Subject: %s\n", subj );
|
||||
- fprintf ( mfp, "\n" );
|
||||
-
|
||||
- while( fgets( line, sizeof( line ), fp ) != NULL ) {
|
||||
- fputs( line, mfp );
|
||||
- }
|
||||
- fclose( fp );
|
||||
-
|
||||
- pclose( mfp );
|
||||
-
|
||||
- return MAIL_OK;
|
||||
-}
|
||||
-#endif
|
||||
-#if defined(CERNLIB_MACOSX)
|
||||
+#if (defined(CERNLIB_UNIX))&&(!defined(CERNLIB_WINNT))
|
||||
{
|
||||
FILE *mfp, *fp;
|
||||
char line[1024], *my_addr;
|
||||
3
pkgs/development/libraries/physics/cernlib/setup-hook.sh
Normal file
3
pkgs/development/libraries/physics/cernlib/setup-hook.sh
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
export CERN_LEVEL=@version@
|
||||
export CERN=@out@
|
||||
export CERN_ROOT=$CERN/$CERN_LEVEL
|
||||
|
|
@ -0,0 +1,41 @@
|
|||
{ lib, stdenv, fetchurl, fastjet }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "fastjet-contrib";
|
||||
version = "1.048";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://fastjet.hepforge.org/contrib/downloads/fjcontrib-${version}.tar.gz";
|
||||
sha256 = "sha256-+ZidO2rrIoSLz5EJXDBgfwJ9PvJ3pPD3BKjw/C52aYE=";
|
||||
};
|
||||
|
||||
buildInputs = [ fastjet ];
|
||||
|
||||
postPatch = ''
|
||||
for f in Makefile.in */Makefile; do
|
||||
substituteInPlace "$f" --replace "CXX=g++" ""
|
||||
done
|
||||
patchShebangs ./configure ./utils/check.sh ./utils/install-sh
|
||||
'';
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
doCheck = true;
|
||||
|
||||
postBuild = ''
|
||||
make fragile-shared
|
||||
'';
|
||||
|
||||
postInstall = ''
|
||||
make fragile-shared-install
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "Third party extensions for FastJet";
|
||||
homepage = "http://fastjet.fr/";
|
||||
changelog = "https://phab.hepforge.org/source/fastjetsvn/browse/contrib/tags/${version}/NEWS?as=source&blame=off";
|
||||
license = licenses.gpl2Plus;
|
||||
maintainers = with maintainers; [ veprbl ];
|
||||
platforms = platforms.unix;
|
||||
};
|
||||
}
|
||||
32
pkgs/development/libraries/physics/fastjet/default.nix
Normal file
32
pkgs/development/libraries/physics/fastjet/default.nix
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
{ lib
|
||||
, stdenv
|
||||
, fetchurl
|
||||
, python ? null
|
||||
, withPython ? false
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "fastjet";
|
||||
version = "3.4.0";
|
||||
|
||||
src = fetchurl {
|
||||
url = "http://fastjet.fr/repo/fastjet-${version}.tar.gz";
|
||||
hash = "sha256-7gfIdHyOrYbYjeSp5OjR6efXYUlz9WMbqCl/egJHi5E=";
|
||||
};
|
||||
|
||||
buildInputs = lib.optional withPython python;
|
||||
|
||||
configureFlags = [
|
||||
"--enable-allcxxplugins"
|
||||
] ++ lib.optional withPython "--enable-pyext";
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
meta = {
|
||||
description = "A software package for jet finding in pp and e+e− collisions";
|
||||
license = lib.licenses.gpl2Plus;
|
||||
homepage = "http://fastjet.fr/";
|
||||
platforms = lib.platforms.unix;
|
||||
maintainers = with lib.maintainers; [ veprbl ];
|
||||
};
|
||||
}
|
||||
|
|
@ -0,0 +1,81 @@
|
|||
{ lib
|
||||
, stdenv
|
||||
, fetchurl
|
||||
, boost
|
||||
, gfortran
|
||||
, lhapdf
|
||||
, ncurses
|
||||
, perl
|
||||
, python ? null
|
||||
, swig
|
||||
, yoda
|
||||
, zlib
|
||||
, withPython ? false
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "fastnlo_toolkit";
|
||||
version = "2.5.0-2826";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://fastnlo.hepforge.org/code/v25/fastnlo_toolkit-${version}.tar.gz";
|
||||
sha256 = "sha256-7aIMYCOkHC/17CHYiEfrxvtSJxTDivrS7BQ32cGiEy0=";
|
||||
};
|
||||
|
||||
buildInputs = [
|
||||
boost
|
||||
gfortran
|
||||
gfortran.cc.lib
|
||||
lhapdf
|
||||
yoda
|
||||
] ++ lib.optional withPython python
|
||||
++ lib.optional (withPython && python.isPy3k) ncurses;
|
||||
|
||||
propagatedBuildInputs = [
|
||||
zlib
|
||||
] ++ lib.optional withPython swig;
|
||||
|
||||
preConfigure = ''
|
||||
substituteInPlace ./fastnlotoolkit/Makefile.in \
|
||||
--replace "-fext-numeric-literals" ""
|
||||
|
||||
# disable test that fails due to strict floating-point number comparison
|
||||
echo "#!/usr/bin/env perl" > check/fnlo-tk-stattest.pl.in
|
||||
chmod +x check/fnlo-tk-stattest.pl.in
|
||||
'';
|
||||
|
||||
configureFlags = [
|
||||
"--with-yoda=${yoda}"
|
||||
] ++ lib.optional withPython "--enable-pyext";
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
doCheck = true;
|
||||
checkInputs = [
|
||||
perl
|
||||
lhapdf.pdf_sets.CT10nlo
|
||||
];
|
||||
preCheck = ''
|
||||
patchShebangs --build check
|
||||
'';
|
||||
enableParallelChecking = false;
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "http://fastnlo.hepforge.org";
|
||||
description = "Fast pQCD calculations for hadron-induced processes";
|
||||
longDescription = ''
|
||||
The fastNLO project provides computer code to create and evaluate fast
|
||||
interpolation tables of pre-computed coefficients in perturbation theory
|
||||
for observables in hadron-induced processes.
|
||||
|
||||
This allows fast theory predictions of these observables for arbitrary
|
||||
parton distribution functions (of regular shape), renormalization or
|
||||
factorization scale choices, and/or values of alpha_s(Mz) as e.g. needed
|
||||
in PDF fits or in systematic studies. Very time consuming complete
|
||||
recalculations are thus avoided.
|
||||
'';
|
||||
license = licenses.gpl3Plus;
|
||||
maintainers = with maintainers; [ veprbl ];
|
||||
platforms = platforms.unix;
|
||||
};
|
||||
}
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
@name@ () {
|
||||
export G4@envvar@DATA="@datadir@"
|
||||
}
|
||||
|
||||
postHooks+=(@name@)
|
||||
119
pkgs/development/libraries/physics/geant4/datasets.nix
Normal file
119
pkgs/development/libraries/physics/geant4/datasets.nix
Normal file
|
|
@ -0,0 +1,119 @@
|
|||
{ lib, stdenv, fetchurl, geant_version }:
|
||||
|
||||
let
|
||||
mkDataset = { pname, version, sha256, envvar }:
|
||||
stdenv.mkDerivation {
|
||||
inherit pname version;
|
||||
inherit geant_version;
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://cern.ch/geant4-data/datasets/${pname}.${version}.tar.gz";
|
||||
inherit sha256;
|
||||
};
|
||||
|
||||
preferLocalBuild = true;
|
||||
dontBuild = true;
|
||||
dontConfigure = true;
|
||||
|
||||
datadir = "${placeholder "out"}/share/Geant4-${geant_version}/data/${pname}${version}";
|
||||
installPhase = ''
|
||||
mkdir -p $datadir
|
||||
mv ./* $datadir
|
||||
'';
|
||||
|
||||
inherit envvar;
|
||||
setupHook = ./datasets-hook.sh;
|
||||
|
||||
meta = with lib; {
|
||||
description = "Data files for the Geant4 toolkit";
|
||||
homepage = "https://geant4.web.cern.ch/support/download";
|
||||
license = licenses.g4sl;
|
||||
platforms = platforms.all;
|
||||
};
|
||||
};
|
||||
in
|
||||
builtins.listToAttrs (map (a: { name = a.pname; value = mkDataset a; }) [
|
||||
{
|
||||
pname = "G4NDL";
|
||||
version = "4.6";
|
||||
sha256 = "sha256-nSh88q4PuIeirc6AHudPub4hsNFm2rSby+6UCKUUVAg=";
|
||||
envvar = "NEUTRONHP";
|
||||
}
|
||||
|
||||
{
|
||||
pname = "G4EMLOW";
|
||||
version = "8.0";
|
||||
sha256 = "sha256-2Rmo5YOGiCV7kkimE5EOsqdjMFngMMi1DAosKtn9Kzs=";
|
||||
envvar = "LE";
|
||||
}
|
||||
|
||||
{
|
||||
pname = "G4PhotonEvaporation";
|
||||
version = "5.7";
|
||||
sha256 = "sha256-dh5C5W/93j2YOfn52BAmB8a0wDKRUe5Rggb07p535+U=";
|
||||
envvar = "LEVELGAMMA";
|
||||
}
|
||||
|
||||
{
|
||||
pname = "G4RadioactiveDecay";
|
||||
version = "5.6";
|
||||
sha256 = "sha256-OIYHfJyOWph4PmcY4cMlZ4me6y27M+QC1Edrwv5PDfE=";
|
||||
envvar = "RADIOACTIVE";
|
||||
}
|
||||
|
||||
{
|
||||
pname = "G4SAIDDATA";
|
||||
version = "2.0";
|
||||
sha256 = "sha256-HSao55uqceRNV1m59Vpn6Lft4xdRMWqekDfYAJDHLpE=";
|
||||
envvar = "SAIDXS";
|
||||
}
|
||||
|
||||
{
|
||||
pname = "G4PARTICLEXS";
|
||||
version = "4.0";
|
||||
sha256 = "sha256-k4EDlwPD8rD9NqtJmTYqLItP+QgMMi+QtOMZKBEzypU=";
|
||||
envvar = "PARTICLEXS";
|
||||
}
|
||||
|
||||
{
|
||||
pname = "G4ABLA";
|
||||
version = "3.1";
|
||||
sha256 = "sha256-dpiwUrWL8bmIa+rNvWr2B63B4Jn8cwq2shz38JDAJ+0=";
|
||||
envvar = "ABLA";
|
||||
}
|
||||
|
||||
{
|
||||
pname = "G4INCL";
|
||||
version = "1.0";
|
||||
sha256 = "sha256-cWFhghrp89BWX788LPNPTgLj5RnrQZqCI27vIsLENn0=";
|
||||
envvar = "INCL";
|
||||
}
|
||||
|
||||
{
|
||||
pname = "G4PII";
|
||||
version = "1.3";
|
||||
sha256 = "sha256-YiWtkCZ19DgcmMa6JfxaBs6HVJqpeWNNPQNJHWYW6SY=";
|
||||
envvar = "PII";
|
||||
}
|
||||
|
||||
{
|
||||
pname = "G4ENSDFSTATE";
|
||||
version = "2.3";
|
||||
sha256 = "sha256-lETF4IIHkavTzKrOEFsOR3kPrc4obhEUmDTnnEqOkgM=";
|
||||
envvar = "ENSDFSTATE";
|
||||
}
|
||||
|
||||
{
|
||||
pname = "G4RealSurface";
|
||||
version = "2.2";
|
||||
sha256 = "sha256-mVTe4AEvUzEmf3g2kOkS5y21v1Lqm6vs0S6iIoIXaCA=";
|
||||
envvar = "REALSURFACE";
|
||||
}
|
||||
|
||||
{
|
||||
pname = "G4TENDL";
|
||||
version = "1.4";
|
||||
sha256 = "sha256-S3J0AgzItO1Wm4ku8YwuCI7c22tm850lWFzO4l2XIeA=";
|
||||
envvar = "PARTICLEHP";
|
||||
}
|
||||
])
|
||||
134
pkgs/development/libraries/physics/geant4/default.nix
Normal file
134
pkgs/development/libraries/physics/geant4/default.nix
Normal file
|
|
@ -0,0 +1,134 @@
|
|||
{ enableMultiThreading ? true
|
||||
, enableG3toG4 ? false
|
||||
, enableInventor ? false
|
||||
, enableGDML ? false
|
||||
, enableQT ? false
|
||||
, enableXM ? false
|
||||
, enableOpenGLX11 ? true
|
||||
, enablePython ? false
|
||||
, enableRaytracerX11 ? false
|
||||
|
||||
# Standard build environment with cmake.
|
||||
, lib, stdenv, fetchurl, fetchpatch, cmake
|
||||
|
||||
# Optional system packages, otherwise internal GEANT4 packages are used.
|
||||
, clhep ? null # not packaged currently
|
||||
, expat
|
||||
, zlib
|
||||
|
||||
# For enableGDML.
|
||||
, xercesc
|
||||
|
||||
# For enableQT.
|
||||
, qtbase
|
||||
, wrapQtAppsHook
|
||||
|
||||
# For enableXM.
|
||||
, motif
|
||||
|
||||
# For enableInventor
|
||||
, coin3d
|
||||
, soxt
|
||||
, libXpm
|
||||
|
||||
# For enableQT, enableXM, enableOpenGLX11, enableRaytracerX11.
|
||||
, libGLU, libGL
|
||||
, xlibsWrapper
|
||||
, libXmu
|
||||
|
||||
# For enablePython
|
||||
, boost
|
||||
, python3
|
||||
|
||||
# For tests
|
||||
, callPackage
|
||||
}:
|
||||
|
||||
let
|
||||
boost_python = boost.override { enablePython = true; python = python3; };
|
||||
in
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
version = "11.0.0";
|
||||
pname = "geant4";
|
||||
|
||||
src = fetchurl{
|
||||
url = "https://cern.ch/geant4-data/releases/geant4-v${version}.tar.gz";
|
||||
sha256 = "sha256-PMin350/8ceiGmLS6zoQvhX2uxWNOTI78yEzScnvdbk=";
|
||||
};
|
||||
|
||||
cmakeFlags = [
|
||||
"-DGEANT4_INSTALL_DATA=OFF"
|
||||
"-DGEANT4_USE_GDML=${if enableGDML then "ON" else "OFF"}"
|
||||
"-DGEANT4_USE_G3TOG4=${if enableG3toG4 then "ON" else "OFF"}"
|
||||
"-DGEANT4_USE_QT=${if enableQT then "ON" else "OFF"}"
|
||||
"-DGEANT4_USE_XM=${if enableXM then "ON" else "OFF"}"
|
||||
"-DGEANT4_USE_OPENGL_X11=${if enableOpenGLX11 then "ON" else "OFF"}"
|
||||
"-DGEANT4_USE_INVENTOR=${if enableInventor then "ON" else "OFF"}"
|
||||
"-DGEANT4_USE_PYTHON=${if enablePython then "ON" else "OFF"}"
|
||||
"-DGEANT4_USE_RAYTRACER_X11=${if enableRaytracerX11 then "ON" else "OFF"}"
|
||||
"-DGEANT4_USE_SYSTEM_CLHEP=${if clhep != null then "ON" else "OFF"}"
|
||||
"-DGEANT4_USE_SYSTEM_EXPAT=${if expat != null then "ON" else "OFF"}"
|
||||
"-DGEANT4_USE_SYSTEM_ZLIB=${if zlib != null then "ON" else "OFF"}"
|
||||
"-DGEANT4_BUILD_MULTITHREADED=${if enableMultiThreading then "ON" else "OFF"}"
|
||||
] ++ lib.optionals (enableMultiThreading && enablePython) [
|
||||
"-DGEANT4_BUILD_TLS_MODEL=global-dynamic"
|
||||
] ++ lib.optionals enableInventor [
|
||||
"-DINVENTOR_INCLUDE_DIR=${coin3d}/include"
|
||||
"-DINVENTOR_LIBRARY_RELEASE=${coin3d}/lib/libCoin.so"
|
||||
];
|
||||
|
||||
nativeBuildInputs = [
|
||||
cmake
|
||||
] ++ lib.optionals enableQT [
|
||||
wrapQtAppsHook
|
||||
];
|
||||
|
||||
dontWrapQtApps = !enableQT;
|
||||
|
||||
buildInputs = [ libGLU xlibsWrapper libXmu ]
|
||||
++ lib.optionals enableInventor [ libXpm coin3d soxt motif ]
|
||||
++ lib.optionals enablePython [ boost_python python3 ];
|
||||
|
||||
propagatedBuildInputs = [ clhep expat zlib libGL ]
|
||||
++ lib.optionals enableGDML [ xercesc ]
|
||||
++ lib.optionals enableXM [ motif ]
|
||||
++ lib.optionals enableQT [ qtbase ];
|
||||
|
||||
postFixup = ''
|
||||
# Don't try to export invalid environment variables.
|
||||
sed -i 's/export G4\([A-Z]*\)DATA/#export G4\1DATA/' "$out"/bin/geant4.sh
|
||||
'' + lib.optionalString enableQT ''
|
||||
wrapQtAppsHook
|
||||
'';
|
||||
|
||||
setupHook = ./geant4-hook.sh;
|
||||
|
||||
passthru = {
|
||||
data = import ./datasets.nix {
|
||||
inherit lib stdenv fetchurl;
|
||||
geant_version = version;
|
||||
};
|
||||
|
||||
tests = callPackage ./tests.nix {};
|
||||
};
|
||||
|
||||
# Set the myriad of envars required by Geant4 if we use a nix-shell.
|
||||
shellHook = ''
|
||||
source $out/nix-support/setup-hook
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
broken = (stdenv.isLinux && stdenv.isAarch64);
|
||||
description = "A toolkit for the simulation of the passage of particles through matter";
|
||||
longDescription = ''
|
||||
Geant4 is a toolkit for the simulation of the passage of particles through matter.
|
||||
Its areas of application include high energy, nuclear and accelerator physics, as well as studies in medical and space science.
|
||||
The two main reference papers for Geant4 are published in Nuclear Instruments and Methods in Physics Research A 506 (2003) 250-303, and IEEE Transactions on Nuclear Science 53 No. 1 (2006) 270-278.
|
||||
'';
|
||||
homepage = "http://www.geant4.org";
|
||||
license = licenses.g4sl;
|
||||
maintainers = with maintainers; [ omnipotententity ];
|
||||
platforms = platforms.linux;
|
||||
};
|
||||
}
|
||||
1
pkgs/development/libraries/physics/geant4/geant4-hook.sh
Normal file
1
pkgs/development/libraries/physics/geant4/geant4-hook.sh
Normal file
|
|
@ -0,0 +1 @@
|
|||
source @out@/bin/geant4.sh
|
||||
31
pkgs/development/libraries/physics/geant4/tests.nix
Normal file
31
pkgs/development/libraries/physics/geant4/tests.nix
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
{ stdenv, cmake, geant4 }:
|
||||
|
||||
{
|
||||
example_B1 = stdenv.mkDerivation {
|
||||
name = "${geant4.name}-test-example_B1";
|
||||
|
||||
inherit (geant4) src;
|
||||
|
||||
nativeBuildInputs = [ cmake ];
|
||||
buildInputs = [ geant4 ];
|
||||
checkInputs = with geant4.data; [
|
||||
G4EMLOW
|
||||
G4ENSDFSTATE
|
||||
G4PARTICLEXS
|
||||
G4PhotonEvaporation
|
||||
];
|
||||
|
||||
prePatch = ''
|
||||
cd examples/basic/B1
|
||||
'';
|
||||
|
||||
doCheck = true;
|
||||
checkPhase = ''
|
||||
runHook preCheck
|
||||
|
||||
./exampleB1 ../run2.mac
|
||||
|
||||
runHook postCheck
|
||||
'';
|
||||
};
|
||||
}
|
||||
26
pkgs/development/libraries/physics/hepmc2/default.nix
Normal file
26
pkgs/development/libraries/physics/hepmc2/default.nix
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
{ lib, stdenv, fetchurl, cmake }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "hepmc";
|
||||
version = "2.06.11";
|
||||
|
||||
src = fetchurl {
|
||||
url = "http://hepmc.web.cern.ch/hepmc/releases/HepMC-${version}.tar.gz";
|
||||
sha256 = "1pp89bs05nv60wjk1690ndwh4dsd5mk20bzsd4a2lklysdifvb6f";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ cmake ];
|
||||
|
||||
cmakeFlags = [
|
||||
"-Dmomentum:STRING=GEV"
|
||||
"-Dlength:STRING=MM"
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
description = "The HepMC package is an object oriented event record written in C++ for High Energy Physics Monte Carlo Generators";
|
||||
license = licenses.lgpl21;
|
||||
homepage = "http://hepmc.web.cern.ch/hepmc/";
|
||||
platforms = platforms.unix;
|
||||
maintainers = with maintainers; [ veprbl ];
|
||||
};
|
||||
}
|
||||
49
pkgs/development/libraries/physics/hepmc3/default.nix
Normal file
49
pkgs/development/libraries/physics/hepmc3/default.nix
Normal file
|
|
@ -0,0 +1,49 @@
|
|||
{ lib, stdenv, fetchurl, cmake, coreutils, python, root }:
|
||||
|
||||
let
|
||||
pythonVersion = with lib.versions; "${major python.version}${minor python.version}";
|
||||
withPython = python != null;
|
||||
# ensure that root is built with the same python interpreter, as it links against numpy
|
||||
root_py = if withPython then root.override { inherit python; } else root;
|
||||
in
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "hepmc3";
|
||||
version = "3.2.5";
|
||||
|
||||
src = fetchurl {
|
||||
url = "http://hepmc.web.cern.ch/hepmc/releases/HepMC3-${version}.tar.gz";
|
||||
sha256 = "sha256-zQ91yA91VJxZzCqCns52Acd96Xyypat1eQysjh1YUDI=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ cmake ];
|
||||
buildInputs = [ root_py ]
|
||||
++ lib.optional withPython python;
|
||||
|
||||
cmakeFlags = [
|
||||
"-DHEPMC3_ENABLE_PYTHON=${if withPython then "ON" else "OFF"}"
|
||||
] ++ lib.optionals withPython [
|
||||
"-DHEPMC3_PYTHON_VERSIONS=${if python.isPy3k then "3.X" else "2.X"}"
|
||||
"-DHEPMC3_Python_SITEARCH${pythonVersion}=${placeholder "out"}/${python.sitePackages}"
|
||||
];
|
||||
|
||||
postInstall = ''
|
||||
substituteInPlace "$out"/bin/HepMC3-config \
|
||||
--replace 'greadlink' '${coreutils}/bin/readlink' \
|
||||
--replace 'readlink' '${coreutils}/bin/readlink'
|
||||
'';
|
||||
|
||||
doInstallCheck = withPython;
|
||||
# prevent nix from trying to dereference a null python
|
||||
installCheckPhase = lib.optionalString withPython ''
|
||||
PYTHONPATH=${placeholder "out"}/${python.sitePackages} python -c 'import pyHepMC3'
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "The HepMC package is an object oriented, C++ event record for High Energy Physics Monte Carlo generators and simulation";
|
||||
license = licenses.gpl3;
|
||||
homepage = "http://hepmc.web.cern.ch/hepmc/";
|
||||
platforms = platforms.unix;
|
||||
maintainers = with maintainers; [ veprbl ];
|
||||
};
|
||||
}
|
||||
36
pkgs/development/libraries/physics/herwig/default.nix
Normal file
36
pkgs/development/libraries/physics/herwig/default.nix
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
{ lib, stdenv, fetchurl, boost, fastjet, gfortran, gsl, lhapdf, thepeg, zlib, autoconf, automake, libtool }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "herwig";
|
||||
version = "7.2.2";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://www.hepforge.org/archive/herwig/Herwig-${version}.tar.bz2";
|
||||
sha256 = "10y3fb33zsinr0z3hzap9rsbcqhy1yjqnv4b4vz21g7mdlw6pq2k";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ autoconf automake libtool gfortran ];
|
||||
|
||||
buildInputs = [ boost fastjet gsl thepeg zlib ]
|
||||
# There is a bug that requires for default PDF's to be present during the build
|
||||
++ (with lhapdf.pdf_sets; [ CT14lo CT14nlo ]);
|
||||
|
||||
postPatch = ''
|
||||
patchShebangs ./
|
||||
'';
|
||||
|
||||
configureFlags = [
|
||||
"--with-thepeg=${thepeg}"
|
||||
];
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
meta = with lib; {
|
||||
description = "A multi-purpose particle physics event generator";
|
||||
homepage = "https://herwig.hepforge.org/";
|
||||
license = licenses.gpl3Only;
|
||||
maintainers = with maintainers; [ veprbl ];
|
||||
platforms = platforms.unix;
|
||||
broken = stdenv.isAarch64; # doesn't compile: ignoring return value of 'FILE* freopen...
|
||||
};
|
||||
}
|
||||
27
pkgs/development/libraries/physics/hoppet/default.nix
Normal file
27
pkgs/development/libraries/physics/hoppet/default.nix
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
{ lib, stdenv, fetchurl, gfortran, perl }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "hoppet";
|
||||
version = "1.2.0";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://hoppet.hepforge.org/downloads/${pname}-${version}.tgz";
|
||||
sha256 = "0j7437rh4xxbfzmkjr22ry34xm266gijzj6mvrq193fcsfzipzdz";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ perl gfortran ];
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
preConfigure = ''
|
||||
patchShebangs .
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "Higher Order Perturbative Parton Evolution Toolkit";
|
||||
license = licenses.gpl2;
|
||||
homepage = "https://hoppet.hepforge.org";
|
||||
platforms = platforms.unix;
|
||||
maintainers = with maintainers; [ veprbl ];
|
||||
};
|
||||
}
|
||||
45
pkgs/development/libraries/physics/lhapdf/default.nix
Normal file
45
pkgs/development/libraries/physics/lhapdf/default.nix
Normal file
|
|
@ -0,0 +1,45 @@
|
|||
{ lib, stdenv, fetchurl, python, makeWrapper }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "lhapdf";
|
||||
version = "6.5.1";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://www.hepforge.org/archive/lhapdf/LHAPDF-${version}.tar.gz";
|
||||
sha256 = "sha256-ElZBniIn0aT5M4f+HagF5kg1FBfTdV6K9aMKNaamZ1E=";
|
||||
};
|
||||
|
||||
# The Apple SDK only exports locale_t from xlocale.h whereas glibc
|
||||
# had decided that xlocale.h should be a part of locale.h
|
||||
postPatch = lib.optionalString (stdenv.isDarwin && stdenv.cc.isGNU) ''
|
||||
substituteInPlace src/GridPDF.cc --replace '#include <locale>' '#include <xlocale.h>'
|
||||
'';
|
||||
|
||||
nativeBuildInputs = [ makeWrapper ]
|
||||
++ lib.optionals (python != null && lib.versionAtLeast python.version "3.10") [ python.pkgs.cython ];
|
||||
buildInputs = [ python ];
|
||||
|
||||
configureFlags = lib.optionals (python == null) [ "--disable-python" ];
|
||||
|
||||
preBuild = lib.optionalString (python != null && lib.versionAtLeast python.version "3.10") ''
|
||||
rm wrappers/python/lhapdf.cpp
|
||||
'';
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
passthru = {
|
||||
pdf_sets = import ./pdf_sets.nix { inherit lib stdenv fetchurl; };
|
||||
};
|
||||
|
||||
postInstall = ''
|
||||
wrapProgram $out/bin/lhapdf --prefix PYTHONPATH : "$(toPythonPath "$out")"
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "A general purpose interpolator, used for evaluating Parton Distribution Functions from discretised data files";
|
||||
license = licenses.gpl2;
|
||||
homepage = "http://lhapdf.hepforge.org";
|
||||
platforms = platforms.unix;
|
||||
maintainers = with maintainers; [ veprbl ];
|
||||
};
|
||||
}
|
||||
13
pkgs/development/libraries/physics/lhapdf/maintainer.sh
Executable file
13
pkgs/development/libraries/physics/lhapdf/maintainer.sh
Executable file
|
|
@ -0,0 +1,13 @@
|
|||
#!/bin/bash
|
||||
|
||||
set -xe
|
||||
|
||||
: ${SED:="$(nix-build '<nixpkgs>' -A gnused --no-out-link)/bin/sed"}
|
||||
|
||||
BASE_URL="https://lhapdfsets.web.cern.ch/current/"
|
||||
|
||||
for pdf_set in `curl -L $BASE_URL 2>/dev/null | "$SED" -n -e 's/.*<a href=".*\/\([^"/]*\.tar\.gz\)".*/\1/p' | sort -u`; do
|
||||
echo -n " \"${pdf_set%.tar.gz}\" = \""
|
||||
nix-prefetch-url "${BASE_URL}${pdf_set}" 2>/dev/null | tr -d '\n'
|
||||
echo "\";"
|
||||
done
|
||||
1369
pkgs/development/libraries/physics/lhapdf/pdf_sets.nix
Normal file
1369
pkgs/development/libraries/physics/lhapdf/pdf_sets.nix
Normal file
File diff suppressed because it is too large
Load diff
5
pkgs/development/libraries/physics/lhapdf/pdfset-hook.sh
Normal file
5
pkgs/development/libraries/physics/lhapdf/pdfset-hook.sh
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
@name@ () {
|
||||
addToSearchPath LHAPDF_DATA_PATH "@out@"
|
||||
}
|
||||
|
||||
postHooks+=(@name@)
|
||||
25
pkgs/development/libraries/physics/mela/default.nix
Normal file
25
pkgs/development/libraries/physics/mela/default.nix
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
{ lib, stdenv, fetchFromGitHub, gfortran }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "mela";
|
||||
version = "2.0.1";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "vbertone";
|
||||
repo = "MELA";
|
||||
rev = version;
|
||||
sha256 = "01sgd4mwx4n58x95brphp4dskqkkx8434bvsr38r5drg9na5nc9y";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ gfortran ];
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
meta = with lib; {
|
||||
description = "a Mellin Evolution LibrAry";
|
||||
license = licenses.gpl3;
|
||||
homepage = "https://github.com/vbertone/MELA";
|
||||
platforms = platforms.unix;
|
||||
maintainers = with maintainers; [ veprbl ];
|
||||
};
|
||||
}
|
||||
23
pkgs/development/libraries/physics/nlojet/default.nix
Normal file
23
pkgs/development/libraries/physics/nlojet/default.nix
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
{ lib, stdenv, fetchurl }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "nlojet++";
|
||||
version = "4.1.3";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://desy.de/~znagy/hep-programs/nlojet++/nlojet++-${version}.tar.gz";
|
||||
sha256 = "18qfn5kjzvnyh29x40zm2maqzfmrnay9r58n8pfpq5lcphdhhv8p";
|
||||
};
|
||||
|
||||
patches = [
|
||||
./nlojet_clang_fix.patch
|
||||
];
|
||||
|
||||
meta = {
|
||||
homepage = "http://www.desy.de/~znagy/Site/NLOJet++.html";
|
||||
license = lib.licenses.gpl2;
|
||||
description = "Implementation of calculation of the hadron jet cross sections";
|
||||
platforms = lib.platforms.unix;
|
||||
maintainers = with lib.maintainers; [ veprbl ];
|
||||
};
|
||||
}
|
||||
|
|
@ -0,0 +1,30 @@
|
|||
diff -rupN nlojet++-4.1.3-orig/nlo-hep/hep-lorentz/bits/hep-lorentzvector_complex.h nlojet++-4.1.3/nlo-hep/hep-lorentz/bits/hep-lorentzvector_complex.h
|
||||
--- nlojet++-4.1.3-orig/nlo-hep/hep-lorentz/bits/hep-lorentzvector_complex.h 2010-05-11 11:06:00.000000000 -0400
|
||||
+++ nlojet++-4.1.3/nlo-hep/hep-lorentz/bits/hep-lorentzvector_complex.h 2014-08-23 03:22:51.000000000 -0400
|
||||
@@ -26,8 +26,11 @@
|
||||
namespace nlo {
|
||||
|
||||
// Spacializations
|
||||
+ template<>
|
||||
class lorentzvector<std::complex<float> >;
|
||||
+ template<>
|
||||
class lorentzvector<std::complex<double> >;
|
||||
+ template<>
|
||||
class lorentzvector<std::complex<long double> >;
|
||||
|
||||
template<>
|
||||
diff -rupN nlojet++-4.1.3-orig/nlo-hep/hep-lorentz/bits/hep-threevector_complex.h nlojet++-4.1.3/nlo-hep/hep-lorentz/bits/hep-threevector_complex.h
|
||||
--- nlojet++-4.1.3-orig/nlo-hep/hep-lorentz/bits/hep-threevector_complex.h 2010-05-11 11:06:00.000000000 -0400
|
||||
+++ nlojet++-4.1.3/nlo-hep/hep-lorentz/bits/hep-threevector_complex.h 2014-08-23 03:23:09.000000000 -0400
|
||||
@@ -26,8 +26,11 @@
|
||||
namespace nlo {
|
||||
|
||||
// Specializations
|
||||
+ template<>
|
||||
class threevector<std::complex<float> >;
|
||||
+ template<>
|
||||
class threevector<std::complex<double> >;
|
||||
+ template<>
|
||||
class threevector<std::complex<long double> >;
|
||||
|
||||
template<>
|
||||
37
pkgs/development/libraries/physics/pythia/default.nix
Normal file
37
pkgs/development/libraries/physics/pythia/default.nix
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
{ lib, stdenv, fetchurl, boost, fastjet, hepmc, lhapdf, rsync, zlib }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "pythia";
|
||||
version = "8.307";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://pythia.org/download/pythia83/pythia${builtins.replaceStrings ["."] [""] version}.tgz";
|
||||
sha256 = "sha256-5bFNRKpZQzMuMt1d2poY/dGgCFxxmOKNhA4EFn+mAT0=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ rsync ];
|
||||
buildInputs = [ boost fastjet hepmc zlib lhapdf ];
|
||||
|
||||
preConfigure = ''
|
||||
patchShebangs ./configure
|
||||
'';
|
||||
|
||||
configureFlags = [
|
||||
"--enable-shared"
|
||||
"--with-lhapdf6=${lhapdf}"
|
||||
] ++ (if lib.versions.major hepmc.version == "3" then [
|
||||
"--with-hepmc3=${hepmc}"
|
||||
] else [
|
||||
"--with-hepmc2=${hepmc}"
|
||||
]);
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
meta = with lib; {
|
||||
description = "A program for the generation of high-energy physics events";
|
||||
license = licenses.gpl2Only;
|
||||
homepage = "https://pythia.org";
|
||||
platforms = platforms.unix;
|
||||
maintainers = with maintainers; [ veprbl ];
|
||||
};
|
||||
}
|
||||
28
pkgs/development/libraries/physics/qcdnum/default.nix
Normal file
28
pkgs/development/libraries/physics/qcdnum/default.nix
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
{ lib, stdenv, fetchurl, gfortran, zlib }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "QCDNUM";
|
||||
version = "17-01-15";
|
||||
|
||||
src = fetchurl {
|
||||
url = "http://www.nikhef.nl/user/h24/qcdnum-files/download/qcdnum${builtins.replaceStrings ["-"] [""] version}.tar.gz";
|
||||
sha256 = "0ibk1sppss45qh0g8i2c99alkx82xdbss3p55f5367bxjx4iqvvg";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ gfortran ];
|
||||
buildInputs = [ zlib ];
|
||||
|
||||
FFLAGS = [
|
||||
"-std=legacy" # fix build with gfortran 10
|
||||
];
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
meta = {
|
||||
description = "A very fast QCD evolution program written in FORTRAN77";
|
||||
license = lib.licenses.gpl3;
|
||||
homepage = "https://www.nikhef.nl/~h24/qcdnum/index.html";
|
||||
platforms = lib.platforms.unix;
|
||||
maintainers = with lib.maintainers; [ veprbl ];
|
||||
};
|
||||
}
|
||||
81
pkgs/development/libraries/physics/rivet/default.nix
Normal file
81
pkgs/development/libraries/physics/rivet/default.nix
Normal file
|
|
@ -0,0 +1,81 @@
|
|||
{ lib, stdenv, fetchurl, fetchpatch, fastjet, fastjet-contrib, ghostscript, hepmc, imagemagick, less, python3, rsync, texlive, yoda, which, makeWrapper }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "rivet";
|
||||
version = "3.1.6";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://www.hepforge.org/archive/rivet/Rivet-${version}.tar.bz2";
|
||||
hash = "sha256-HPbrtqedGBxEHR0MfG1iPEI4F8YQk/NvIa2q4j5nkJA=";
|
||||
};
|
||||
|
||||
latex = texlive.combine { inherit (texlive)
|
||||
scheme-basic
|
||||
collection-pstricks
|
||||
collection-fontsrecommended
|
||||
l3kernel
|
||||
l3packages
|
||||
mathastext
|
||||
pgf
|
||||
relsize
|
||||
sansmath
|
||||
sfmath
|
||||
siunitx
|
||||
xcolor
|
||||
xkeyval
|
||||
xstring
|
||||
;};
|
||||
|
||||
nativeBuildInputs = [ rsync makeWrapper ];
|
||||
buildInputs = [ hepmc imagemagick python3 latex python3.pkgs.yoda ];
|
||||
propagatedBuildInputs = [ fastjet fastjet-contrib ];
|
||||
|
||||
preConfigure = ''
|
||||
substituteInPlace bin/rivet-build.in \
|
||||
--replace 'num_jobs=$(getconf _NPROCESSORS_ONLN)' 'num_jobs=''${NIX_BUILD_CORES:-$(getconf _NPROCESSORS_ONLN)}' \
|
||||
--replace 'which' '"${which}/bin/which"' \
|
||||
--replace 'mycxx=' 'mycxx=${stdenv.cc}/bin/${if stdenv.cc.isClang or false then "clang++" else "g++"} #' \
|
||||
--replace 'mycxxflags="' "mycxxflags=\"$NIX_CFLAGS_COMPILE $NIX_CXXSTDLIB_COMPILE $NIX_CFLAGS_LINK "
|
||||
'';
|
||||
|
||||
preInstall = ''
|
||||
substituteInPlace bin/make-plots \
|
||||
--replace '"which"' '"${which}/bin/which"' \
|
||||
--replace '"latex"' '"'$latex'/bin/latex"' \
|
||||
--replace '"dvips"' '"'$latex'/bin/dvips"' \
|
||||
--replace '"ps2pdf"' '"${ghostscript}/bin/ps2pdf"' \
|
||||
--replace '"ps2eps"' '"${ghostscript}/bin/ps2eps"' \
|
||||
--replace '"kpsewhich"' '"'$latex'/bin/kpsewhich"' \
|
||||
--replace '"convert"' '"${imagemagick.out}/bin/convert"'
|
||||
substituteInPlace bin/rivet \
|
||||
--replace '"less"' '"${less}/bin/less"'
|
||||
substituteInPlace bin/rivet-mkhtml \
|
||||
--replace '"make-plots"' \"$out/bin/make-plots\" \
|
||||
--replace '"rivet-cmphistos"' \"$out/bin/rivet-cmphistos\"
|
||||
'';
|
||||
|
||||
configureFlags = [
|
||||
"--with-fastjet=${fastjet}"
|
||||
"--with-yoda=${yoda}"
|
||||
] ++ (if lib.versions.major hepmc.version == "3" then [
|
||||
"--with-hepmc3=${hepmc}"
|
||||
] else [
|
||||
"--with-hepmc=${hepmc}"
|
||||
]);
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
postInstall = ''
|
||||
for prog in "$out"/bin/*; do
|
||||
wrapProgram "$prog" --set PYTHONPATH $PYTHONPATH:$(toPythonPath "$out")
|
||||
done
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "A framework for comparison of experimental measurements from high-energy particle colliders to theory predictions";
|
||||
license = licenses.gpl3;
|
||||
homepage = "https://rivet.hepforge.org";
|
||||
platforms = platforms.unix;
|
||||
maintainers = with maintainers; [ veprbl ];
|
||||
};
|
||||
}
|
||||
29
pkgs/development/libraries/physics/thepeg/default.nix
Normal file
29
pkgs/development/libraries/physics/thepeg/default.nix
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
{ lib, stdenv, fetchurl, boost, fastjet, gsl, hepmc2, lhapdf, rivet, zlib }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "thepeg";
|
||||
version = "2.2.2";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://www.hepforge.org/archive/thepeg/ThePEG-${version}.tar.bz2";
|
||||
sha256 = "0gif4vb9lw2px2qdywqm7x0frbv0h5gq9lq36c50f2hv77a5bgwp";
|
||||
};
|
||||
|
||||
buildInputs = [ boost fastjet gsl hepmc2 lhapdf rivet zlib ];
|
||||
|
||||
configureFlags = [
|
||||
"--with-hepmc=${hepmc2}"
|
||||
"--with-rivet=${rivet}"
|
||||
"--without-javagui"
|
||||
];
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
meta = with lib; {
|
||||
description = "Toolkit for High Energy Physics Event Generation";
|
||||
homepage = "https://herwig.hepforge.org/";
|
||||
license = licenses.gpl3Only;
|
||||
maintainers = with maintainers; [ veprbl ];
|
||||
platforms = platforms.unix;
|
||||
};
|
||||
}
|
||||
43
pkgs/development/libraries/physics/yoda/default.nix
Normal file
43
pkgs/development/libraries/physics/yoda/default.nix
Normal file
|
|
@ -0,0 +1,43 @@
|
|||
{ lib, stdenv, fetchurl, fetchpatch, python, root, makeWrapper, zlib, withRootSupport ? false }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "yoda";
|
||||
version = "1.9.5";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://www.hepforge.org/archive/yoda/YODA-${version}.tar.bz2";
|
||||
hash = "sha256-WRkaDpr6jbU/+qIHn4Uy5bE94b5iJwPW9wYNNhBSi2s=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = with python.pkgs; [ cython makeWrapper ];
|
||||
buildInputs = [ python ]
|
||||
++ (with python.pkgs; [ numpy matplotlib ])
|
||||
++ lib.optional withRootSupport root;
|
||||
propagatedBuildInputs = [ zlib ];
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
postPatch = ''
|
||||
touch pyext/yoda/*.{pyx,pxd}
|
||||
patchShebangs .
|
||||
'';
|
||||
|
||||
postInstall = ''
|
||||
for prog in "$out"/bin/*; do
|
||||
wrapProgram "$prog" --set PYTHONPATH $PYTHONPATH:$(toPythonPath "$out")
|
||||
done
|
||||
'';
|
||||
|
||||
hardeningDisable = [ "format" ];
|
||||
|
||||
doInstallCheck = true;
|
||||
installCheckTarget = "check";
|
||||
|
||||
meta = {
|
||||
description = "Provides small set of data analysis (specifically histogramming) classes";
|
||||
license = lib.licenses.gpl3Only;
|
||||
homepage = "https://yoda.hepforge.org";
|
||||
platforms = lib.platforms.unix;
|
||||
maintainers = with lib.maintainers; [ veprbl ];
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue