biome: 1.9.2 -> 1.9.3 (#349335)
[NixPkgs.git] / pkgs / development / python-modules / radian / default.nix
blobe42e16f307c2e6132cfd1f8adef0faab9cd3f414
2   lib,
3   buildPythonPackage,
4   fetchFromGitHub,
5   pytestCheckHook,
6   pyte,
7   pexpect,
8   ptyprocess,
9   pythonOlder,
10   jedi,
11   git,
12   lineedit,
13   prompt-toolkit,
14   pygments,
15   rchitect,
16   R,
17   rPackages,
18   setuptools,
19   setuptools-scm,
22 buildPythonPackage rec {
23   pname = "radian";
24   version = "0.6.13";
25   pyproject = true;
27   disabled = pythonOlder "3.9";
29   src = fetchFromGitHub {
30     owner = "randy3k";
31     repo = pname;
32     rev = "refs/tags/v${version}";
33     hash = "sha256-gz2VczAgVbvISzvY/v0GvZ/Erv6ipZwPU61r6OJ+3Fo=";
34   };
36   postPatch = ''
37     substituteInPlace setup.py \
38       --replace '"pytest-runner"' ""
39   '';
41   build-system = [
42     setuptools
43     setuptools-scm
44   ];
46   nativeBuildInputs = [
47     R # needed at setup time to detect R_HOME
48   ];
50   propagatedBuildInputs =
51     [
52       lineedit
53       prompt-toolkit
54       pygments
55       rchitect
56     ]
57     ++ (with rPackages; [
58       reticulate
59       askpass
60     ]);
62   nativeCheckInputs = [
63     pytestCheckHook
64     pyte
65     pexpect
66     ptyprocess
67     jedi
68     git
69   ];
71   makeWrapperArgs = [ "--set R_HOME ${R}/lib/R" ];
73   preCheck = ''
74     export HOME=$TMPDIR
75     export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:${R}/lib/R/lib
76   '';
78   pythonImportsCheck = [ "radian" ];
80   meta = with lib; {
81     description = "21 century R console";
82     mainProgram = "radian";
83     homepage = "https://github.com/randy3k/radian";
84     changelog = "https://github.com/randy3k/radian/blob/v${version}/CHANGELOG.md";
85     license = licenses.mit;
86     maintainers = with maintainers; [ savyajha ];
87   };