Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at devShellTools-shell 43 lines 893 B view raw
1{ 2 lib, 3 stdenv, 4 fetchurl, 5 cmake, 6 gfortran, 7 lhapdf, 8}: 9 10stdenv.mkDerivation rec { 11 pname = "MCFM"; 12 version = "10.0.1"; 13 14 src = fetchurl { 15 url = "https://mcfm.fnal.gov/downloads/${pname}-${version}.tar.gz"; 16 sha256 = "sha256-3Dg4KoILb0XhgGkzItDh/1opCtYrrIvtbuALYqPUvE8="; 17 }; 18 19 postPatch = '' 20 substituteInPlace CMakeLists.txt \ 21 --replace 'target_link_libraries(mcfm lhapdf_lib)' \ 22 'target_link_libraries(mcfm ''${lhapdf_lib})' 23 ''; 24 25 nativeBuildInputs = [ 26 cmake 27 gfortran 28 ]; 29 buildInputs = [ lhapdf ]; 30 31 cmakeFlags = [ 32 "-Duse_external_lhapdf=ON" 33 "-Duse_internal_lhapdf=OFF" 34 ]; 35 36 meta = with lib; { 37 description = "Monte Carlo for FeMtobarn processes"; 38 homepage = "https://mcfm.fnal.gov"; 39 license = licenses.gpl3Plus; 40 maintainers = with maintainers; [ veprbl ]; 41 platforms = lib.platforms.x86_64; 42 }; 43}