2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchFromGitHub,
|
|
|
|
cffi,
|
|
|
|
pytestCheckHook,
|
|
|
|
pytest-mock,
|
|
|
|
pythonOlder,
|
|
|
|
R,
|
|
|
|
rPackages,
|
|
|
|
six,
|
|
|
|
packaging,
|
2023-08-22 20:05:09 +00:00
|
|
|
}:
|
2023-03-15 16:39:30 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "rchitect";
|
2024-04-21 15:54:59 +00:00
|
|
|
version = "0.4.6";
|
2023-08-22 20:05:09 +00:00
|
|
|
format = "setuptools";
|
|
|
|
|
2024-04-21 15:54:59 +00:00
|
|
|
disabled = pythonOlder "3.7";
|
2023-03-15 16:39:30 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "randy3k";
|
|
|
|
repo = pname;
|
2023-08-22 20:05:09 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
2024-04-21 15:54:59 +00:00
|
|
|
hash = "sha256-IVyYzf433m03RRfL5SmUOdaXFy0NHf/QuAdtUeUjIz0=";
|
2023-03-15 16:39:30 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
postPatch = ''
|
2023-08-22 20:05:09 +00:00
|
|
|
substituteInPlace setup.py \
|
|
|
|
--replace '"pytest-runner"' ""
|
2023-03-15 16:39:30 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
cffi
|
|
|
|
six
|
2024-04-21 15:54:59 +00:00
|
|
|
packaging
|
2024-06-05 15:53:02 +00:00
|
|
|
] ++ (with rPackages; [ reticulate ]);
|
2023-03-15 16:39:30 +00:00
|
|
|
|
|
|
|
nativeCheckInputs = [
|
|
|
|
pytestCheckHook
|
|
|
|
pytest-mock
|
|
|
|
R
|
|
|
|
];
|
|
|
|
|
|
|
|
preCheck = ''
|
|
|
|
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:${R}/lib/R/lib
|
|
|
|
cd $TMPDIR
|
|
|
|
'';
|
|
|
|
|
|
|
|
pythonImportsCheck = [ "rchitect" ];
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Interoperate R with Python";
|
|
|
|
homepage = "https://github.com/randy3k/rchitect";
|
2023-08-22 20:05:09 +00:00
|
|
|
changelog = "https://github.com/randy3k/rchitect/blob/v${version}/CHANGELOG.md";
|
2023-03-15 16:39:30 +00:00
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ savyajha ];
|
|
|
|
};
|
|
|
|
}
|