push sheeet
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s

This commit is contained in:
Dark Steveneq
2025-10-09 14:15:47 +02:00
commit 646b892680
49168 changed files with 5897842 additions and 0 deletions

View File

@@ -0,0 +1,88 @@
{
lib,
fetchPypi,
buildPythonPackage,
pytestCheckHook,
pkgs,
awkward,
numpy,
pybind11,
python,
setuptools,
setuptools-scm,
vector,
}:
let
fastjet =
(pkgs.fastjet.override {
inherit python;
withPython = true;
}).overrideAttrs
(prev: {
postInstall = (prev.postInstall or "") + ''
mv "$out/${python.sitePackages}/"{fastjet.py,_fastjet_swig.py}
'';
});
fastjet-contrib = pkgs.fastjet-contrib.override {
inherit fastjet;
};
in
buildPythonPackage rec {
pname = "fastjet";
version = "3.5.1.1";
pyproject = true;
src = fetchPypi {
pname = "fastjet";
inherit version;
hash = "sha256-2GG9A+/2rgYpsJo1tu3BprOM7bKwYVV6/qIIMtYSr9o=";
};
# unvendor fastjet/fastjet-contrib
postPatch = ''
substituteInPlace setup.py \
--replace-fail 'cmdclass={"build_ext": FastJetBuild, "install": FastJetInstall},' "" \
--replace-fail 'str(OUTPUT / "include")' "" \
--replace-fail 'str(OUTPUT / "lib")' ""
for file in src/fastjet/*.py; do
substituteInPlace "$file" \
--replace-warn "fastjet._swig" "_fastjet_swig"
done
sed -i src/fastjet/_pyjet.py -e '1iimport _fastjet_swig'
'';
strictDeps = true;
build-system = [
setuptools
setuptools-scm
];
dependencies = [
awkward
fastjet
numpy
vector
];
buildInputs = [
pybind11
fastjet-contrib
];
nativeCheckInputs = [
pytestCheckHook
];
env.SETUPTOOLS_SCM_PRETEND_VERSION = version;
meta = {
description = "Jet-finding in the Scikit-HEP ecosystem";
homepage = "https://github.com/scikit-hep/fastjet";
changelog = "https://github.com/scikit-hep/fastjet/releases/tag/v${version}";
license = lib.licenses.bsd3;
maintainers = with lib.maintainers; [ veprbl ];
};
}