Skip to content

Insufficient identifier for ruby #160103

@viraptor

Description

@viraptor

Describe the bug

When building ruby, the platform identifier does not become part of the package. That means you can end up with non-runnable packages which don't rebuild automatically.

Steps To Reproduce

Steps to reproduce the behavior:

  1. Install ruby-2.7.5 and bundler on darwin-20 (or earlier) platform (check with uname -r or Gem::Platform.local)
  2. Upgrade system to latest (darwin-21)
  3. Attempt to use bundle exec ... in the built environment
  4. Get: (in this case the system upgrade was 17 -> 21)
Your bundle only supports platforms ["arm64-darwin-21", "x86_64-darwin-19", "x86_64-darwin-20", "x86_64-darwin-21", "x86_64-linux"] but your local platform is x86_64-darwin-17. Add the current platform to the lockfile with `bundle lock --add-platform x86_64-darwin-17` and try again. (Bundler::ProductionError)
  1. Trying to nix develop the project after the upgrade does not see the problem and does not rebuild the dependencies.

Expected behavior

Depending on ruby should cause an automatic rebuild, if the current ruby derivation was built on previous darwin version.

Additional context

Does this actually warrant making the ruby package ruby-2.7.5-darwin-21 that's also visible as ruby-2.7.5?

Notify maintainers

@vrthra @manveru @marsam

Metadata

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

 - system: `"x86_64-darwin"`
 - host os: `Darwin 21.3.0, macOS 10.16`
 - multi-user?: `yes`
 - sandbox: `no`
 - version: `nix-env (Nix) 2.6.0`
 - channels(viraptor): `"home-manager-21.11.tar.gz"`
 - channels(root): `"nixpkgs"`
 - nixpkgs: `/nix/var/nix/profiles/per-user/root/channels/nixpkgs

Metadata

Metadata

Assignees

No one assigned

    Labels

    0.kind: bugSomething is broken2.status: stalehttps://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions