Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)

applgrid: init at 1.4.70

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