From 8b24638d4d411cb0a8e2df082a212e4c5d5e5f98 Mon Sep 17 00:00:00 2001 From: emaryn <197520219+emaryn@users.noreply.github.com> Date: Sun, 2 Mar 2025 02:50:55 +0800 Subject: [PATCH] sherpa: 2.2.16 -> 3.0.1 (#385906) Co-authored-by: emaryn --- pkgs/by-name/sh/sherpa/package.nix | 47 +++++++++++++++--------------- 1 file changed, 23 insertions(+), 24 deletions(-) diff --git a/pkgs/by-name/sh/sherpa/package.nix b/pkgs/by-name/sh/sherpa/package.nix index 883ae291fb14..21d69093ec48 100644 --- a/pkgs/by-name/sh/sherpa/package.nix +++ b/pkgs/by-name/sh/sherpa/package.nix @@ -1,23 +1,25 @@ { lib, stdenv, - fetchurl, + fetchFromGitLab, autoconf, gfortran, - hepmc3, - fastjet, + cmake, + libzip, + pkg-config, lhapdf, - rivet, - sqlite, + autoPatchelfHook, }: stdenv.mkDerivation rec { pname = "sherpa"; - version = "2.2.16"; + version = "3.0.1"; - src = fetchurl { - url = "https://www.hepforge.org/archive/sherpa/SHERPA-MC-${version}.tar.gz"; - sha256 = "sha256-AntSN5BhtJFuDBoOFvrzoCr/W4SnX5CeAXiTcz9MjUs="; + src = fetchFromGitLab { + owner = "sherpa-team"; + repo = "sherpa"; + tag = "v${version}"; + hash = "sha256-zrtu4LJIzNdUGmnQlvZytYgzESo8eYQIdfxBABgUbzs="; }; postPatch = lib.optionalString (stdenv.hostPlatform.libc == "glibc") '' @@ -27,31 +29,28 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ autoconf gfortran + cmake + pkg-config + autoPatchelfHook ]; buildInputs = [ - sqlite + libzip lhapdf - rivet ]; enableParallelBuilding = true; - configureFlags = [ - "--with-sqlite3=${sqlite.dev}" - "--enable-hepmc3=${hepmc3}" - "--enable-fastjet=${fastjet}" - "--enable-lhapdf=${lhapdf}" - "--enable-rivet=${rivet}" - "--enable-pythia" - ]; + preFixup = '' + patchelf --add-rpath $out/lib/SHERPA-MC $out/bin/Sherpa + ''; - meta = with lib; { - description = "Simulation of High-Energy Reactions of PArticles in lepton-lepton, lepton-photon, photon-photon, lepton-hadron and hadron-hadron collisions"; - license = licenses.gpl2; + meta = { + description = "Monte Carlo event generator for the Simulation of High-Energy Reactions of PArticles"; + license = lib.licenses.gpl3Plus; homepage = "https://gitlab.com/sherpa-team/sherpa"; - platforms = platforms.unix; - maintainers = with maintainers; [ veprbl ]; + platforms = lib.platforms.unix; + maintainers = with lib.maintainers; [ veprbl ]; # never built on aarch64-darwin since first introduction in nixpkgs broken = stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isAarch64; };