nixpkgs/pkgs/development/python-modules/rpy2-robjects/default.nix
2026-07-02 23:07:35 +02:00

75 lines
1.6 KiB
Nix

{
lib,
buildPythonPackage,
fetchurl,
fetchpatch2,
isPyPy,
R,
rpy2-rinterface,
ipython,
jinja2,
numpy,
pandas,
setuptools,
tzlocal,
pytestCheckHook,
}:
buildPythonPackage rec {
version = "3.6.5";
pyproject = true;
pname = "rpy2-robjects";
disabled = isPyPy;
src = fetchurl {
url = "mirror://pypi/${builtins.substring 0 1 pname}/${pname}/${
builtins.replaceStrings [ "-" ] [ "_" ] pname
}-${version}.tar.gz";
hash = "sha256-A9CZ9DagGotR+4+L9gJCCpnHzdqMP84OOg9TLja0r+Q=";
};
patches = [
# https://github.com/rpy2/rpy2/pull/1171#issuecomment-3263994962
(fetchpatch2 {
url = "https://github.com/rpy2/rpy2/commit/524546eef9b8f7f3d61aeb76d7e7fa7beeabd2d2.patch?full_index=1";
hash = "sha256-aR44E8wIBlD7UpQKm7B+aMn2p3FQ8dwBwLwkibIpcuM=";
relative = "rpy2-robjects";
revert = true;
})
];
nativeBuildInputs = [
R # needed at setup time to detect R_HOME (alternatively set R_HOME explicitly)
];
build-system = [ setuptools ];
dependencies = [
ipython
jinja2
numpy
pandas
rpy2-rinterface
tzlocal
];
nativeCheckInputs = [ pytestCheckHook ];
pytestFlags = [
# https://github.com/rpy2/rpy2/issues/1218
"-Wignore::pytest.PytestRemovedIn9Warning"
];
disabledTests = [
# panda 3.0 type mismatch
"test_ri2pandas"
];
meta = {
homepage = "https://rpy2.github.io/";
description = "Python interface to R";
license = lib.licenses.gpl2Plus;
platforms = lib.platforms.unix;
maintainers = with lib.maintainers; [ joelmo ];
};
}