depot/third_party/nixpkgs/pkgs/development/python-modules/rchitect/default.nix
Default email c7f94ff3ce Project import generated by Copybara.
GitOrigin-RevId: b85ed9dcbf187b909ef7964774f8847d554fab3b
2023-08-22 22:05:09 +02:00

59 lines
1.1 KiB
Nix

{ lib
, buildPythonPackage
, fetchFromGitHub
, cffi
, pytestCheckHook
, pytest-mock
, pythonOlder
, R
, rPackages
, six
}:
buildPythonPackage rec {
pname = "rchitect";
version = "0.4.1";
format = "setuptools";
disabled = pythonOlder "3.6";
src = fetchFromGitHub {
owner = "randy3k";
repo = pname;
rev = "refs/tags/v${version}";
hash = "sha256-fXL2UX0n9kKAVwMUP0z8V3UtJAy4xbAjnPIggUHllN0=";
};
postPatch = ''
substituteInPlace setup.py \
--replace '"pytest-runner"' ""
'';
propagatedBuildInputs = [
cffi
six
] ++ (with rPackages; [
reticulate
]);
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";
changelog = "https://github.com/randy3k/rchitect/blob/v${version}/CHANGELOG.md";
license = licenses.mit;
maintainers = with maintainers; [ savyajha ];
};
}