14 rustPlatform.buildRustPackage rec {
18 src = fetchFromGitHub {
22 sha256 = "sha256-Xzx14fvYWTZYM9Pnowf1M3D0PTPRLwsXHUj/PJskRWw=";
26 # update ring to fix building on Mac M1
27 # https://github.com/dac-gmbh/gbl/pull/64
29 url = "https://github.com/raboof/gbl/commit/17e154d66932af59abe8677309792606b7f64c7d.patch";
30 sha256 = "sha256-5Itoi86Q+9FzSTtnggODKPwwYPp5BpIVgR2vYMLHBts=";
32 # Upstream does not include Cargo.lock, even though this is recommended for applications.
34 url = "https://github.com/raboof/gbl/commit/9423d36ee3168bca8db7a7cb65611dc7ddc2daf0.patch";
35 sha256 = "sha256-zwHXgUVkAYiQs/AT/pINnZoECoXzh+9astWMYENGTL8=";
39 cargoHash = "sha256-CeGLSseKUe2XudRqZm5Y7o7ZLDtDBg/MFunOGqxFZGM=";
41 nativeBuildInputs = [ pkg-config ];
42 buildInputs = [ openssl ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ Security ];
44 passthru.tests.version = testers.testVersion { package = gbl; };
47 description = "GBL Firmware file manipulation";
49 Utility to read, create and manipulate `.gbl` firmware update
50 files targeting the Silicon Labs Gecko Bootloader.
52 homepage = "https://github.com/jonas-schievink/gbl";
53 license = licenses.mit;
54 maintainers = [ maintainers.raboof ];