2023-03-15 16:39:30 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
|
|
|
, pytestCheckHook
|
|
|
|
, pyte
|
|
|
|
, pexpect
|
|
|
|
, ptyprocess
|
|
|
|
, jedi
|
|
|
|
, git
|
|
|
|
, lineedit
|
|
|
|
, prompt-toolkit
|
|
|
|
, pygments
|
|
|
|
, rchitect
|
|
|
|
, six
|
|
|
|
, R
|
|
|
|
, rPackages
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "radian";
|
2023-04-29 16:46:19 +00:00
|
|
|
version = "0.6.5";
|
2023-03-15 16:39:30 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "randy3k";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2023-04-29 16:46:19 +00:00
|
|
|
sha256 = "iuD4EkGZ1GwNxR8Gpg9ANe3lMHJYZ/Q/RyuN6vZZWME=";
|
2023-03-15 16:39:30 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace setup.py --replace '"pytest-runner"' ""
|
|
|
|
'';
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
R # needed at setup time to detect R_HOME
|
|
|
|
];
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
lineedit
|
|
|
|
prompt-toolkit
|
|
|
|
pygments
|
|
|
|
rchitect
|
|
|
|
six
|
|
|
|
] ++ (with rPackages; [
|
|
|
|
reticulate
|
|
|
|
askpass
|
|
|
|
]);
|
|
|
|
|
|
|
|
nativeCheckInputs = [
|
|
|
|
pytestCheckHook
|
|
|
|
pyte
|
|
|
|
pexpect
|
|
|
|
ptyprocess
|
|
|
|
jedi
|
|
|
|
git
|
|
|
|
];
|
|
|
|
|
|
|
|
preCheck = ''
|
|
|
|
export HOME=$TMPDIR
|
|
|
|
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:${R}/lib/R/lib
|
|
|
|
'';
|
|
|
|
|
|
|
|
pythonImportsCheck = [ "radian" ];
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "A 21 century R console";
|
|
|
|
homepage = "https://github.com/randy3k/radian";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ savyajha ];
|
|
|
|
};
|
|
|
|
}
|