Files
nixpkgs/pkgs/development/python-modules/root/default.nix
Wolfgang Walther 90e7159c55 treewide: remove unused rec
Auto-fix by nixf-diagnose.
2025-10-05 10:49:12 +02:00

43 lines
885 B
Nix

{
buildPythonPackage,
python,
root,
}:
let
unwrapped = root.override { python3 = python; };
in
buildPythonPackage {
# ROOT builds the C++ libraries and CPython extensions in one package and
# python versions must never be mixed
passthru = {
inherit unwrapped;
};
inherit (unwrapped) pname version meta;
src = null;
format = "other"; # disables setuptools/pyproject logic
dontUnpack = true;
dontConfigure = true;
dontBuild = true;
installPhase = ''
mkdir -p $out/${python.sitePackages}
rmdir $out/${python.sitePackages}
ln -s ${unwrapped}/lib $out/${python.sitePackages}
'';
# Those namespaces are looked up dynamically via ROOTs CPython extension, so
# these checks cover the most fragile parts of the package
pythonImportsCheck = [
"ROOT"
"ROOT.Experimental"
"ROOT.Math"
"ROOT.RooFit"
"ROOT.std"
];
}