nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at devShellTools-shell 69 lines 1.6 kB view raw
1{ 2 lib, 3 stdenv, 4 fetchurl, 5 boost, 6 hepmc2, 7 lhapdf, 8 pythia, 9 makeWrapper, 10}: 11 12stdenv.mkDerivation { 13 pname = "sacrifice"; 14 version = "1.0.0"; 15 16 src = fetchurl { 17 url = "https://www.hepforge.org/archive/agile/Sacrifice-1.0.0.tar.gz"; 18 sha256 = "10bvpq63kmszy1habydwncm0j1dgvam0fkrmvkgbkvf804dcjp6g"; 19 }; 20 21 buildInputs = [ 22 boost 23 hepmc2 24 lhapdf 25 pythia 26 ]; 27 nativeBuildInputs = [ makeWrapper ]; 28 29 patches = [ 30 ./compat.patch 31 ./pythia83xx.patch 32 ]; 33 34 preConfigure = '' 35 substituteInPlace configure --replace HAVE_LCG=yes HAVE_LCG=no 36 '' 37 + lib.optionalString stdenv.hostPlatform.isDarwin '' 38 substituteInPlace configure --replace LIB_SUFFIX=\"so\" LIB_SUFFIX=\"dylib\" 39 ''; 40 41 configureFlags = [ 42 "--with-HepMC=${hepmc2}" 43 "--with-pythia=${pythia}" 44 ]; 45 46 postInstall = 47 if stdenv.hostPlatform.isDarwin then 48 '' 49 install_name_tool -add_rpath ${pythia}/lib "$out"/bin/run-pythia 50 '' 51 else 52 '' 53 wrapProgram $out/bin/run-pythia \ 54 --prefix LD_LIBRARY_PATH : "${pythia}/lib" 55 ''; 56 57 enableParallelBuilding = true; 58 59 meta = { 60 description = "Standalone contribution to AGILe for steering Pythia 8"; 61 mainProgram = "run-pythia"; 62 license = lib.licenses.gpl2; 63 homepage = "https://agile.hepforge.org/trac/wiki/Sacrifice"; 64 platforms = lib.platforms.unix; 65 maintainers = with lib.maintainers; [ veprbl ]; 66 # never built on aarch64-darwin since first introduction in nixpkgs 67 broken = stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isAarch64; 68 }; 69}