2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchFromGitHub,
|
|
|
|
cffi,
|
2024-09-19 14:19:46 +00:00
|
|
|
packaging,
|
2024-06-05 15:53:02 +00:00
|
|
|
pytestCheckHook,
|
|
|
|
pytest-mock,
|
|
|
|
pythonOlder,
|
|
|
|
R,
|
|
|
|
rPackages,
|
2024-09-19 14:19:46 +00:00
|
|
|
setuptools,
|
|
|
|
setuptools-scm,
|
2024-06-05 15:53:02 +00:00
|
|
|
six,
|
2023-08-22 20:05:09 +00:00
|
|
|
}:
|
2023-03-15 16:39:30 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "rchitect";
|
2024-09-19 14:19:46 +00:00
|
|
|
version = "0.4.7";
|
|
|
|
pyproject = true;
|
2023-08-22 20:05:09 +00:00
|
|
|
|
2024-09-19 14:19:46 +00:00
|
|
|
disabled = pythonOlder "3.9";
|
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-09-19 14:19:46 +00:00
|
|
|
hash = "sha256-M7OWDo3mEEOYtjIpzPIpzPMBtv2TZJKJkSfHczZYS8Y=";
|
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
|
|
|
'';
|
|
|
|
|
2024-09-19 14:19:46 +00:00
|
|
|
build-system = [
|
|
|
|
setuptools
|
|
|
|
setuptools-scm
|
|
|
|
];
|
|
|
|
|
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 ];
|
|
|
|
};
|
|
|
|
}
|