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

rPackages.vegan: removed from packagesRequiringX list #319204

Conversation

juliendiot42
Copy link
Contributor

Dear @jbedo,

It seems that this vegan package do not actually require X.

As mentioned in #319189, R-packages requiring X are broken on darwin platform. It is therefore good to keep this list up-to-date to let MacOS users being able to install them if they do not actually require X.

Best regards,
@juliendiot42

Description of changes

vegan have been removed from packagesRequiringX

Things done

This package builds successfully without X with the command:

nix build .\#pkgs.rPackages.vegan
  • 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

It seems so:

Console log, click to expand
nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD"
these 2 paths will be fetched (0.11 MiB download, 0.63 MiB unpacked):
  /nix/store/rx6laqr63fhb15sysy8z4magbijb8g0i-nixpkgs-review-2.10.4
  /nix/store/abnch2ab1jfh3kvlrf1fshnx4i2p7kdf-python3.11-argcomplete-3.3.0
copying path '/nix/store/abnch2ab1jfh3kvlrf1fshnx4i2p7kdf-python3.11-argcomplete-3.3.0' from 'https://cache.nixos.org'...
copying path '/nix/store/rx6laqr63fhb15sysy8z4magbijb8g0i-nixpkgs-review-2.10.4' from 'https://cache.nixos.org'...
$ git -c fetch.prune=false fetch --no-tags --force https://github.com/NixOS/nixpkgs master:refs/nixpkgs-review/0
remote: Enumerating objects: 47280, done.
remote: Counting objects: 100% (16339/16339), done.
remote: Compressing objects: 100% (622/622), done.
remote: Total 47280 (delta 15901), reused 15984 (delta 15674), pack-reused 30941
Receiving objects: 100% (47280/47280), 23.03 MiB | 3.43 MiB/s, done.
Resolving deltas: 100% (24784/24784), completed with 5450 local objects.
From https://github.com/NixOS/nixpkgs
 * [new branch]                master     -> refs/nixpkgs-review/0
$ git worktree add /home/julien/.cache/nixpkgs-review/rev-149f81c8d00e5053308b5f225cf6bbabaeee79e7/nixpkgs 698c1d1aeb6a1dc2d86f2fc1e9c418379e90a2e8
Preparing worktree (detached HEAD 698c1d1aeb6a)
Updating files: 100% (41584/41584), done.
HEAD is now at 698c1d1aeb6a Merge pull request #319039 from 0x4A6F/master-atuin
$ nix-env --extra-experimental-features no-url-literals --option system x86_64-linux -f <nixpkgs> --nix-path nixpkgs=/home/julien/.cache/nixpkgs-review/rev-149f81c8d00e5053308b5f225cf6bbabaeee79e7/nixpkgs nixpkgs-overlays=/run/user/1000/tmppu_kgl_o -qaP --xml --out-path --show-trace --no-allow-import-from-derivation
$ git merge --no-commit --no-ff 149f81c8d00e5053308b5f225cf6bbabaeee79e7
Automatic merge went well; stopped before committing as requested
$ nix-env --extra-experimental-features no-url-literals --option system x86_64-linux -f <nixpkgs> --nix-path nixpkgs=/home/julien/.cache/nixpkgs-review/rev-149f81c8d00e5053308b5f225cf6bbabaeee79e7/nixpkgs nixpkgs-overlays=/run/user/1000/tmppu_kgl_o -qaP --xml --out-path --show-trace --no-allow-import-from-derivation --meta
Nothing to be built.
$ /nix/store/j7rp0y3ii1w3dlbflbxlv4g7hbaaz3bs-nix-2.18.2/bin/nix-shell --argstr system x86_64-linux --argstr nixpkgs-path /home/julien/.cache/nixpkgs-review/rev-149f81c8d00e5053308b5f225cf6bbabaeee79e7/nixpkgs --argstr nixpkgs-config-path /run/user/1000/tmpbkjqupmg.nix --argstr attrs-path /home/julien/.cache/nixpkgs-review/rev-149f81c8d00e5053308b5f225cf6bbabaeee79e7/attrs.nix --nix-path nixpkgs=/home/julien/.cache/nixpkgs-review/rev-149f81c8d00e5053308b5f225cf6bbabaeee79e7/nixpkgs nixpkgs-overlays=/run/user/1000/tmppu_kgl_o /nix/store/rx6laqr63fhb15sysy8z4magbijb8g0i-nixpkgs-review-2.10.4/lib/python3.11/site-packages/nixpkgs_review/nix/review-shell.nix

[nix-shell:~/.cache/nixpkgs-review/rev-149f81c8d00e5053308b5f225cf6bbabaeee79e7]$

But I am not sure this apply for r-packages.

  • Tested basic functionality of all binary files (usually in ./result/bin/)
library('vegan')

Works.

I used this flake to test it:

`flake.nix`, click to expand
{
  description = "Flake for a R environment";
  inputs = {
    nixpkgs.url = "github:juliendiot42/nixpkgs?ref=rpackages-vegan_doesnt_requireX";
    flake-utils.url = "github:numtide/flake-utils";
  };

  outputs = {
    self,
    nixpkgs,
    flake-utils,
  }:
    flake-utils.lib.eachDefaultSystem (
      system: let
        pkgs = import nixpkgs {inherit system;};
        R-with-my-packages = pkgs.rWrapper.override {
          packages = with pkgs.rPackages; [
            vegan
          ];
        };
      in rec {
        devShells.default = pkgs.mkShell {
          LOCALE_ARCHIVE =
            if "${system}" == "x86_64-linux"
            then "${pkgs.glibcLocalesUtf8}/lib/locale/locale-archive"
            else "";
          R_LIBS_USER = "''"; # to no use users' installed R packages
          R_PROFILE_USER = "''"; # to disable`.Rprofile` files (eg. when the project already use `renv`)
          nativeBuildInputs = [pkgs.bashInteractive];
          buildInputs = [
            R-with-my-packages
          ];
        };
        apps = {
          simpleTest = let
            simpleTest = pkgs.writeShellApplication {
              name = "simpleTest";
              text = ''
                Rscript --vanilla -e "library('vegan'); q()"
              '';
            };
          in {
            type = "app";
            program = "${simpleTest}/bin/simpleTest";
          };
        };
      }
    );
}

and

nix run .\#simpleTest

Output:

nix-shell-env ❯ nix run .\#simpleTest
Loading required package: permute
Loading required package: lattice
This is vegan 2.6-4

Add a 👍 reaction to pull requests you find important.

R-packages requiring X are broken on darwin platform. It is therefore
relatively important to keep this list up-to-date to let MacOS users
being able to install them.
@juliendiot42 juliendiot42 requested a review from jbedo as a code owner June 12, 2024 02:27
@juliendiot42
Copy link
Contributor Author

juliendiot42 commented Jun 12, 2024

By the way, @jbedo, this is the origin of the PR #316086 I opened previously that let me think that it would be ok to bypass require X on MacOS. I just encountered this particular package that seems to not require X.

@b-rodrigues
Copy link
Contributor

b-rodrigues commented Jun 17, 2024

Can confirm it works, we are in the process of bumping the rPackages set, could you re-open this PR against r-updates? See for example this one: #319389

@jbedo
Copy link
Contributor

jbedo commented Jun 17, 2024

Resolved as part of 29a69eb

@jbedo jbedo closed this Jun 17, 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

3 participants