Merge pull request #253013 from marsam/update-rubyfmt

rubyfmt: 0.8.1 -> 0.10.0
This commit is contained in:
Mario Rodas 2023-09-03 13:16:03 -05:00 committed by GitHub
commit 81ea527215
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 14 additions and 34 deletions

View File

@ -1,25 +0,0 @@
From d9df7aaaaf9c758499f569376a041045d99e4015 Mon Sep 17 00:00:00 2001
From: Bob van der Linden <bobvanderlinden@gmail.com>
Date: Thu, 9 Feb 2023 16:17:46 +0100
Subject: [PATCH 1/2] cargo: lock: update version
---
Cargo.lock | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Cargo.lock b/Cargo.lock
index 79a81d1..374c10a 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -642,7 +642,7 @@ dependencies = [
[[package]]
name = "rubyfmt-main"
-version = "0.8.0-pre"
+version = "0.8.1"
dependencies = [
"atty",
"clap",
--
2.39.1

View File

@ -12,19 +12,20 @@
, libobjc
, libunwind
, libxcrypt
, libyaml
, Foundation
, Security
}:
rustPlatform.buildRustPackage rec {
pname = "rubyfmt";
version = "0.8.1";
version = "0.10.0";
src = fetchFromGitHub {
owner = "fables-tales";
repo = "rubyfmt";
rev = "v${version}";
hash = "sha256-lHq9lcLMp6HUHMonEe3T2YGwMYW1W131H1jo1cy6kyc=";
hash = "sha256-IIHPU6iwFwQ5cOAtOULpMSjexFtTelSd/LGLuazdmUo=";
fetchSubmodules = true;
};
@ -38,6 +39,7 @@ rustPlatform.buildRustPackage rec {
buildInputs = [
zlib
libxcrypt
libyaml
] ++ lib.optionals stdenv.isDarwin [
readline
libiconv
@ -55,15 +57,13 @@ rustPlatform.buildRustPackage rec {
'';
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.
./0001-cargo-lock-update-version.patch
# Avoid checking whether ruby gitsubmodule is up-to-date.
./0002-remove-dependency-on-git.patch
];
cargoHash = "sha256-keeIonGNgE0U0IVi8DeXAy6ygTXVXH+WDjob36epUDI=";
cargoHash = "sha256-QZ26GmsKyENkzdCGg2peie/aJhEt7KQAF/lwsibonDk=";
env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.isDarwin "-fdeclspec";
preFixup = ''
mv $out/bin/rubyfmt{-main,}
@ -74,5 +74,10 @@ rustPlatform.buildRustPackage rec {
homepage = "https://github.com/fables-tales/rubyfmt";
license = licenses.mit;
maintainers = with maintainers; [ bobvanderlinden ];
# = note: Undefined symbols for architecture x86_64:
# "_utimensat", referenced from:
# _utime_internal in librubyfmt-3c969812b3b27083.rlib(file.o)
broken = stdenv.isDarwin && stdenv.isx86_64;
mainProgram = "rubyfmt";
};
}

View File

@ -18198,8 +18198,8 @@ with pkgs;
rbenv = callPackage ../development/ruby-modules/rbenv { };
rubyfmt = callPackage ../development/tools/rubyfmt {
inherit (darwin.apple_sdk.frameworks) Foundation Security;
rubyfmt = darwin.apple_sdk_11_0.callPackage ../development/tools/rubyfmt {
inherit (darwin.apple_sdk_11_0.frameworks) Foundation Security;
inherit (darwin) libobjc;
};