From 1880157ac18be8a1a7106691660fe7d5d6a11d70 Mon Sep 17 00:00:00 2001 From: Arnout Engelen Date: Sat, 28 May 2022 11:32:21 +0200 Subject: [PATCH] gbl: fix darwin-aarch64 build Compilation failed due to an old transitive dependency on 'ring', https://github.com/briansmith/ring/issues/1063. --- pkgs/tools/archivers/gbl/default.nix | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/pkgs/tools/archivers/gbl/default.nix b/pkgs/tools/archivers/gbl/default.nix index b46d30a323e7..90c66e8ac7c5 100644 --- a/pkgs/tools/archivers/gbl/default.nix +++ b/pkgs/tools/archivers/gbl/default.nix @@ -22,15 +22,20 @@ rustPlatform.buildRustPackage rec { }; cargoPatches = [ - # Upstream does not include Cargo.lock, even though this is recommended for applications. - # This patch adds it. https://github.com/dac-gmbh/gbl/pull/62 + # update ring to fix building on Mac M1 + # https://github.com/dac-gmbh/gbl/pull/64 (fetchpatch { - url = "https://github.com/raboof/gbl/commit/99078da334c6e1ffd8189c691bbc711281fae5cc.patch"; - sha256 = "sha256-sAKkn4//8P87ZJ6NTHm2NUJH1sAFFwfrybv2QtQ3nnM="; + url = "https://github.com/raboof/gbl/commit/17e154d66932af59abe8677309792606b7f64c7d.patch"; + sha256 = "sha256-5Itoi86Q+9FzSTtnggODKPwwYPp5BpIVgR2vYMLHBts="; + }) + # Upstream does not include Cargo.lock, even though this is recommended for applications. + (fetchpatch { + url = "https://github.com/raboof/gbl/commit/9423d36ee3168bca8db7a7cb65611dc7ddc2daf0.patch"; + sha256 = "sha256-zwHXgUVkAYiQs/AT/pINnZoECoXzh+9astWMYENGTL8="; }) ]; - cargoSha256 = "sha256-RUZ6wswRtV8chq3+bY9LTRf6IYMbZ9/GPl2X5UcF7d8="; + cargoSha256 = "sha256-CeGLSseKUe2XudRqZm5Y7o7ZLDtDBg/MFunOGqxFZGM="; nativeBuildInputs = [ pkg-config ]; buildInputs = [ openssl ] ++ lib.optionals stdenv.isDarwin [ Security ]; @@ -44,10 +49,8 @@ rustPlatform.buildRustPackage rec { Utility to read, create and manipulate `.gbl` firmware update files targeting the Silicon Labs Gecko Bootloader. ''; - homepage = "https://github.com/dac-gmbh/gbl"; + homepage = "https://github.com/jonas-schievink/gbl"; license = licenses.mit; maintainers = [ maintainers.raboof ]; - # never built on aarch64-darwin since first introduction in nixpkgs - broken = stdenv.isDarwin && stdenv.isAarch64; }; }