forked from mirrors/nixpkgs
python310Packages.radian: init at 0.6.4 and provide radianWrapper
This commit is contained in:
parent
73f2d0074a
commit
e730867dc0
71
pkgs/development/python-modules/radian/default.nix
Normal file
71
pkgs/development/python-modules/radian/default.nix
Normal file
|
@ -0,0 +1,71 @@
|
|||
{ lib
|
||||
, buildPythonPackage
|
||||
, fetchFromGitHub
|
||||
, pytestCheckHook
|
||||
, pyte
|
||||
, pexpect
|
||||
, ptyprocess
|
||||
, jedi
|
||||
, git
|
||||
, lineedit
|
||||
, prompt-toolkit
|
||||
, pygments
|
||||
, rchitect
|
||||
, six
|
||||
, R
|
||||
, rPackages
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "radian";
|
||||
version = "0.6.4";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "randy3k";
|
||||
repo = pname;
|
||||
rev = "v${version}";
|
||||
sha256 = "QEHVdyVgsZxvs+d+xeeJqwx531+6e0uPi1J3t+hJ0d0=";
|
||||
};
|
||||
|
||||
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 ];
|
||||
};
|
||||
}
|
37
pkgs/development/r-modules/wrapper-radian.nix
Normal file
37
pkgs/development/r-modules/wrapper-radian.nix
Normal file
|
@ -0,0 +1,37 @@
|
|||
{ lib
|
||||
, runCommand
|
||||
, R
|
||||
, radian
|
||||
, makeWrapper
|
||||
, recommendedPackages
|
||||
, packages
|
||||
, wrapR ? false
|
||||
}:
|
||||
|
||||
runCommand (radian.name + "-wrapper") {
|
||||
preferLocalBuild = true;
|
||||
allowSubstitutes = false;
|
||||
|
||||
buildInputs = [ radian ] ++ recommendedPackages ++ packages
|
||||
++ lib.optional wrapR R;
|
||||
|
||||
nativeBuildInputs = [ makeWrapper ];
|
||||
|
||||
passthru = { inherit recommendedPackages; };
|
||||
|
||||
meta = radian.meta // {
|
||||
# To prevent builds on hydra
|
||||
hydraPlatforms = [ ];
|
||||
# prefer wrapper over the package
|
||||
priority = (radian.meta.priority or 0) - 1;
|
||||
};
|
||||
} (''
|
||||
makeWrapper "${radian}/bin/radian" "$out/bin/radian" \
|
||||
--prefix "R_LIBS_SITE" ":" "$R_LIBS_SITE"
|
||||
'' + lib.optionalString wrapR ''
|
||||
cd ${R}/bin
|
||||
for exe in *; do
|
||||
makeWrapper "${R}/bin/$exe" "$out/bin/$exe" \
|
||||
--prefix "R_LIBS_SITE" ":" "$R_LIBS_SITE"
|
||||
done
|
||||
'')
|
|
@ -24218,6 +24218,19 @@ with pkgs;
|
|||
packages = [];
|
||||
};
|
||||
|
||||
radianWrapper = callPackage ../development/r-modules/wrapper-radian.nix {
|
||||
recommendedPackages = with rPackages; [
|
||||
boot class cluster codetools foreign KernSmooth lattice MASS
|
||||
Matrix mgcv nlme nnet rpart spatial survival
|
||||
];
|
||||
radian = python3Packages.radian;
|
||||
# Override this attribute to register additional libraries.
|
||||
packages = [];
|
||||
# Override this attribute if you want to expose R with the same set of
|
||||
# packages as specified in radian
|
||||
wrapR = false;
|
||||
};
|
||||
|
||||
rstudioWrapper = libsForQt5.callPackage ../development/r-modules/wrapper-rstudio.nix {
|
||||
recommendedPackages = with rPackages; [
|
||||
boot class cluster codetools foreign KernSmooth lattice MASS
|
||||
|
|
|
@ -9841,6 +9841,8 @@ self: super: with self; {
|
|||
radicale = pkgs.radicale.override { python3 = python; };
|
||||
};
|
||||
|
||||
radian = callPackage ../development/python-modules/radian { };
|
||||
|
||||
radio_beam = callPackage ../development/python-modules/radio_beam { };
|
||||
|
||||
radios = callPackage ../development/python-modules/radios { };
|
||||
|
|
Loading…
Reference in a new issue