From 2aafbfb61874339d9eebe169ea5e3c4e5fbb614a Mon Sep 17 00:00:00 2001 From: Dmitry Kalinkin Date: Thu, 18 Oct 2018 13:28:02 -0400 Subject: [PATCH] mcfm: init at 10.0.1 --- .../science/physics/MCFM/default.nix | 33 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 5 +++ 2 files changed, 38 insertions(+) create mode 100644 pkgs/applications/science/physics/MCFM/default.nix diff --git a/pkgs/applications/science/physics/MCFM/default.nix b/pkgs/applications/science/physics/MCFM/default.nix new file mode 100644 index 000000000000..7b6000dfea8d --- /dev/null +++ b/pkgs/applications/science/physics/MCFM/default.nix @@ -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; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 5f8cf1fd4f2c..b1d9aee02e6c 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -29879,6 +29879,11 @@ in elmerfem = callPackage ../applications/science/physics/elmerfem {}; + mcfm = callPackage ../applications/science/physics/MCFM { + stdenv = gccStdenv; + lhapdf = lhapdf.override { stdenv = gccStdenv; }; + }; + professor = callPackage ../applications/science/physics/professor { }; sacrifice = callPackage ../applications/science/physics/sacrifice {};