Merge pull request #307098 from r-ryantm/auto-update/cilium-cli
[NixPkgs.git] / pkgs / development / python-modules / radian / default.nix
blob09d0c38c41575dcc1e5669e666a067e9d5459838
1 { lib
2 , buildPythonPackage
3 , fetchFromGitHub
4 , pytestCheckHook
5 , pyte
6 , pexpect
7 , ptyprocess
8 , jedi
9 , git
10 , lineedit
11 , prompt-toolkit
12 , pygments
13 , rchitect
14 , R
15 , rPackages
16 , pythonOlder
19 buildPythonPackage rec {
20   pname = "radian";
21   version = "0.6.12";
22   format = "setuptools";
24   disabled = pythonOlder "3.7";
26   src = fetchFromGitHub {
27     owner = "randy3k";
28     repo = pname;
29     rev = "refs/tags/v${version}";
30     hash = "sha256-cojKbDNqcUay5RxvWszQ96eC4jVI4G7iRv/ZYWgidCQ=";
31   };
33   postPatch = ''
34     substituteInPlace setup.py \
35       --replace '"pytest-runner"' ""
36   '';
38   nativeBuildInputs = [
39     R # needed at setup time to detect R_HOME
40   ];
42   propagatedBuildInputs = [
43     lineedit
44     prompt-toolkit
45     pygments
46     rchitect
47   ] ++ (with rPackages; [
48     reticulate
49     askpass
50   ]);
52   nativeCheckInputs = [
53     pytestCheckHook
54     pyte
55     pexpect
56     ptyprocess
57     jedi
58     git
59   ];
61   makeWrapperArgs = [ "--set R_HOME ${R}/lib/R" ];
63   preCheck = ''
64     export HOME=$TMPDIR
65     export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:${R}/lib/R/lib
66   '';
68   pythonImportsCheck = [ "radian" ];
70   meta = with lib; {
71     description = "A 21 century R console";
72     mainProgram = "radian";
73     homepage = "https://github.com/randy3k/radian";
74     changelog = "https://github.com/randy3k/radian/blob/v${version}/CHANGELOG.md";
75     license = licenses.mit;
76     maintainers = with maintainers; [ savyajha ];
77   };