tangled
alpha
login
or
join now
tjh.dev
/
nixpkgs
Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
0
fork
atom
overview
issues
pulls
pipelines
applgrid: init at 1.4.70
Dmitry Kalinkin
7 years ago
4f80119b
3187db6e
+83
3 changed files
expand all
collapse all
unified
split
pkgs
development
libraries
physics
applgrid
bad_code.patch
default.nix
top-level
all-packages.nix
+39
pkgs/development/libraries/physics/applgrid/bad_code.patch
···
1
1
+
diff --git a/appl_grid/appl_grid.h b/appl_grid/appl_grid.h
2
2
+
index 5059622..a0651c9 100644
3
3
+
--- a/appl_grid/appl_grid.h
4
4
+
+++ b/appl_grid/appl_grid.h
5
5
+
@@ -56,7 +56,7 @@ public:
6
6
+
class exception : public std::exception {
7
7
+
public:
8
8
+
exception(const std::string& s) { std::cerr << what() << " " << s << std::endl; };
9
9
+
- exception(std::ostream& s) { std::cerr << what() << " " << s << std::endl; };
10
10
+
+ exception(std::ostream& s) { s << what() << " " << std::endl; };
11
11
+
virtual const char* what() const throw() { return "appl::grid::exception"; }
12
12
+
};
13
13
+
14
14
+
diff --git a/appl_grid/appl_pdf.h b/appl_grid/appl_pdf.h
15
15
+
index c71fd84..2525527 100644
16
16
+
--- a/appl_grid/appl_pdf.h
17
17
+
+++ b/appl_grid/appl_pdf.h
18
18
+
@@ -51,7 +51,7 @@ public:
19
19
+
class exception : public std::exception {
20
20
+
public:
21
21
+
exception(const std::string& s="") { std::cerr << what() << " " << s << std::endl; };
22
22
+
- exception(std::ostream& s) { std::cerr << what() << " " << s << std::endl; };
23
23
+
+ exception(std::ostream& s) { s << " " << std::endl; };
24
24
+
const char* what() const throw() { return "appl::appl_pdf::exception "; }
25
25
+
};
26
26
+
27
27
+
diff --git a/src/appl_igrid.h b/src/appl_igrid.h
28
28
+
index d25288e..be354df 100644
29
29
+
--- a/src/appl_igrid.h
30
30
+
+++ b/src/appl_igrid.h
31
31
+
@@ -52,7 +52,7 @@ private:
32
32
+
class exception {
33
33
+
public:
34
34
+
exception(const std::string& s) { std::cerr << s << std::endl; };
35
35
+
- exception(std::ostream& s) { std::cerr << s << std::endl; };
36
36
+
+ exception(std::ostream& s) { s << std::endl; };
37
37
+
};
38
38
+
39
39
+
typedef double (igrid::*transform_t)(double) const;
+42
pkgs/development/libraries/physics/applgrid/default.nix
···
1
1
+
{ stdenv, fetchurl, gfortran, hoppet, lhapdf, root5 }:
2
2
+
3
3
+
stdenv.mkDerivation rec {
4
4
+
name = "applgrid-${version}";
5
5
+
version = "1.4.70";
6
6
+
7
7
+
src = fetchurl {
8
8
+
url = "https://www.hepforge.org/archive/applgrid/${name}.tgz";
9
9
+
sha256 = "1yw9wrk3vjv84kd3j4s1scfhinirknwk6xq0hvj7x2srx3h93q9p";
10
10
+
};
11
11
+
12
12
+
buildInputs = [ gfortran hoppet lhapdf root5 ];
13
13
+
14
14
+
patches = [
15
15
+
./bad_code.patch
16
16
+
];
17
17
+
18
18
+
preConfigure = ''
19
19
+
substituteInPlace src/Makefile.in \
20
20
+
--replace "-L\$(subst /libgfortran.a, ,\$(FRTLIB) )" "-L${gfortran.cc.lib}/lib"
21
21
+
'' + (if stdenv.isDarwin then ''
22
22
+
substituteInPlace src/Makefile.in \
23
23
+
--replace "gfortran -print-file-name=libgfortran.a" "gfortran -print-file-name=libgfortran.dylib"
24
24
+
'' else "");
25
25
+
26
26
+
enableParallelBuilding = false; # broken
27
27
+
28
28
+
# Install private headers required by APFELgrid
29
29
+
postInstall = ''
30
30
+
for header in src/*.h; do
31
31
+
install -Dm644 "$header" "$out"/include/appl_grid/"`basename $header`"
32
32
+
done
33
33
+
'';
34
34
+
35
35
+
meta = with stdenv.lib; {
36
36
+
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";
37
37
+
license = licenses.gpl3;
38
38
+
homepage = http://applgrid.hepforge.org;
39
39
+
platforms = platforms.unix;
40
40
+
maintainers = with maintainers; [ veprbl ];
41
41
+
};
42
42
+
}
+2
pkgs/top-level/all-packages.nix
···
21405
21405
21406
21406
### SCIENCE / PHYSICS
21407
21407
21408
21408
+
applgrid = callPackage ../development/libraries/physics/applgrid { };
21409
21409
+
21408
21410
hoppet = callPackage ../development/libraries/physics/hoppet { };
21409
21411
21410
21412
fastjet = callPackage ../development/libraries/physics/fastjet { };