Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rstudioServerWrapper: inherit meta from rstudio #205122

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

teto
Copy link
Member

@teto teto commented Dec 8, 2022

Description of changes

I was trying to do
lib.getExe pkgs.rstudioServerWrapper
but this would not get the correct binary because the wrapping erases
rstudio meta.mainProgram 's entry.

This change fixes that.

@cfhammill

Things done
  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandbox = true set in nix.conf? (See Nix manual)
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 23.05 Release Notes (or backporting 22.11 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
    • (Release notes changes) Ran nixos/doc/manual/md-to-db.sh to update generated release notes
  • Fits CONTRIBUTING.md.

@teto
Copy link
Member Author

teto commented Dec 8, 2022

seems like not ready yet

nix run .\#rstudioServerWrapper 
error: unable to execute '/nix/store/ykzzr4a6gz711qwymqvl17szj1qc1hnz-RStudio-2022.07.1+554-wrapper/bin/rstudio-server': No such file or directory
nixpkgs on  nixos-unstable via 🐍 took 2m30s 
✖1 ❯ ls /nix/store/ykzzr4a6gz711qwymqvl17szj1qc1hnz-RStudio-2022.07.1+554-wrapper/bin/rstudio
ls: cannot access '/nix/store/ykzzr4a6gz711qwymqvl17szj1qc1hnz-RStudio-2022.07.1+554-wrapper/bin/rstudio': No such file or directory

@teto teto marked this pull request as draft December 8, 2022 16:39
@teto
Copy link
Member Author

teto commented Dec 8, 2022

when building rstudio-server the binary is called rstudio-server :
lrwxrwxrwx 1 root root 33 1970-01-01 rstudio-server -> ../lib/rstudio/bin/rstudio-server
but building rstudioServerWrapper, we get:
rserver and rsession executables, which ones are correct

@teto
Copy link
Member Author

teto commented Dec 8, 2022

In the rocker image it's apparently rserver so we should probably use that everywhere I will update the PR
docker exec -it rocker/rstudio sh

@nixos-discourse
Copy link

This pull request has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/adding-rstudio-server-r/8644/8

@cfhammill
Copy link
Contributor

Hi @teto, sorry this took me a while to get to. I went back through the notes on the original PR:

#95831 (comment)

it looks like you're correct in determining that rserver is the correct program to run, if I remember correctly the rstudio-server program is just a shell script to communicate with rstudio-server running as a service. @bcdarwin do you remember if the nixos module uses rstudio-server?

@cfhammill
Copy link
Contributor

It looks here like it's using rserver too, not the rstudio-server script: https://github.com/NixOS/nixpkgs/blob/master/nixos/modules/services/development/rstudio-server/default.nix#L82

I was trying to do
lib.getExe pkgs.rstudioServerWrapper
but this would not get the correct binary because the wrapping erases
rstudio meta.mainProgram 's entry.

Also the wrapper-rstudio wouldn't copy the rstudio-server executable.
This change fixes that.
@teto teto force-pushed the fix-rstudio-wrapper-meta branch from 7c6e71f to 6469465 Compare June 1, 2023 09:27
@wegank wegank added the 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md label Mar 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants