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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

buildRubyGem: Include platform in suffix for non-Ruby platforms #299909

Merged
merged 1 commit into from
Jun 1, 2024

Conversation

amarshall
Copy link
Member

Description of changes

This adheres to how Bundler handles such gems. We must also adjust the generated URL to use this full suffix.

Things done

Result of nixpkgs-review run on x86_64-linux 1 (nothing built).

I have tested this with this by applying this patch and nix-build -A rubyPackages.sorbet-static. Before this change, building non-ruby-platform gems was not trivially possible.

diff --git a/pkgs/top-level/ruby-packages.nix b/pkgs/top-level/ruby-packages.nix
index 232c48c739b1..4ffe6db90665 100644
--- a/pkgs/top-level/ruby-packages.nix
+++ b/pkgs/top-level/ruby-packages.nix
@@ -10,6 +10,18 @@
     };
     version = "7.1.3.2";
   };
+  sorbet-static = {
+    dependencies = [ ];
+    groups = [ "default" ];
+    platform = "x86_64-linux";
+    platforms = [ ];
+    source = {
+      remotes = ["https://rubygems.org"];
+      type = "gem";
+      sha256 = "5f6aaa02f28ceed4bf43dd40fdbe9a47c8d3589ccb9917bb1f9da90ee546ee8d";
+    };
+    version = "0.5.11294";
+  };
   actionmailbox = {
     dependencies = ["actionpack" "activejob" "activerecord" "activestorage" "activesupport" "mail" "net-imap" "net-pop" "net-smtp"];
     groups = ["default"];
  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)
    • sandbox = relaxed
    • sandbox = true
  • 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/)
  • 24.05 Release Notes (or backporting 23.05 and 23.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
  • Fits CONTRIBUTING.md.

Add a 馃憤 reaction to pull requests you find important.

This adheres to how Bundler handles such gems. We must also adjust the
generated URL to use this full suffix.
@amarshall amarshall requested a review from marsam as a code owner March 29, 2024 04:40
@amarshall amarshall requested review from zimbatm and manveru and removed request for marsam April 29, 2024 04:52
@zimbatm zimbatm merged commit 90f6359 into NixOS:master Jun 1, 2024
20 checks passed
@amarshall amarshall deleted the buildrubygem-platform branch June 3, 2024 16:45
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

2 participants