NixOS / nixpkgs

Nix Packages collection & NixOS
MIT License
18.18k stars 14.19k forks source link

rPackages.r5r breaks as a nix package #319277

Open Chwiggy opened 5 months ago

Chwiggy commented 5 months ago

Describe the bug

The R package r5r requires a Java back end, this however isn't packaged with the R package, but r5r tries to dynamically download the r5 jar to the package root when needed. This inevitably fails when the package root is in the nix store.

Steps To Reproduce

Steps to reproduce the behavior:

  1. install rPackages.r5r within a nix-env or direnv. (Notably this probably isn't reproducible if you have r5r in ~/R already)
  2. try to run r5_setup

Expected behavior

Expected r5r to run.

Additional context

I don't know if this is something that can be patched, or if this should just mean that the package should be marked as broken.

As it's build by the generic R builder, I'm not sure a human actually ever touched this rPackage.

Notify maintainers

As the person who last touched the generic builder @amarshall, but i don't know how much this actually falls in your wheel house.

Metadata

Please run nix-shell -p nix-info --run "nix-info -m" and paste the result.

[user@system:~]$ nix-shell -p nix-info --run "nix-info -m"
 - system: `"x86_64-linux"`
 - host os: `Linux 6.9.3, NixOS, 24.11 (Vicuña), 24.11.20240607.051f920`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.18.2`
 - nixpkgs: `/nix/store/3dr5pyja36lvvrszhzffww1jwyrx6i09-source`

Add a :+1: reaction to issues you find important.

amarshall commented 1 month ago

@jbedo is the general R maintainer, I believe. I don’t have much context here.

jbedo commented 1 month ago

You haven't provided the data_dir argument to the setup_r5() function. Assuming the example given in the documentation (system.file("extdata/poa", package = "r5r")) this fails as setup_r5 seems to expect it to be a writable location. This isn't really a nix issue, global installations typically do not allow users to write into these locations. Suggest you place a copy of the data somewhere your user has write permissions, and potentially report the issue upstream as the documentation is a bit misleading.