rubyfmt: add support for macos arm64/x86

This commit is contained in:
Bob van der Linden 2023-02-13 20:19:57 +01:00 committed by Anderson Torres
parent 6f53567aa8
commit c3784eb94b
2 changed files with 25 additions and 1 deletions

View file

@ -1,4 +1,5 @@
{ lib
, stdenv
, rustPlatform
, fetchFromGitHub
, autoconf
@ -6,7 +7,13 @@
, bison
, ruby
, zlib
, readline
, libiconv
, libobjc
, libunwind
, libxcrypt
, Foundation
, Security
}:
rustPlatform.buildRustPackage rec {
@ -31,8 +38,22 @@ rustPlatform.buildRustPackage rec {
buildInputs = [
zlib
libxcrypt
] ++ lib.optionals stdenv.isDarwin [
readline
libiconv
libobjc
libunwind
Foundation
Security
];
preConfigure = ''
pushd librubyfmt/ruby_checkout
autoreconf --install --force --verbose
./configure
popd
'';
cargoPatches = [
# The 0.8.1 release did not have an up-to-date lock file. The rubyfmt
# version in Cargo.toml was bumped, but it wasn't updated in the lock file.

View file

@ -17863,7 +17863,10 @@ with pkgs;
rbenv = callPackage ../development/ruby-modules/rbenv { };
rubyfmt = callPackage ../development/tools/rubyfmt { };
rubyfmt = callPackage ../development/tools/rubyfmt {
inherit (darwin.apple_sdk.frameworks) Foundation Security;
inherit (darwin) libobjc;
};
inherit (callPackage ../development/interpreters/ruby {
inherit (darwin) libobjc libunwind;