13 rustPlatform.buildRustPackage rec {
17 src = fetchFromGitHub {
21 sha256 = "sha256-Xzx14fvYWTZYM9Pnowf1M3D0PTPRLwsXHUj/PJskRWw=";
25 # update ring to fix building on Mac M1
26 # https://github.com/dac-gmbh/gbl/pull/64
28 url = "https://github.com/raboof/gbl/commit/17e154d66932af59abe8677309792606b7f64c7d.patch";
29 sha256 = "sha256-5Itoi86Q+9FzSTtnggODKPwwYPp5BpIVgR2vYMLHBts=";
31 # Upstream does not include Cargo.lock, even though this is recommended for applications.
33 url = "https://github.com/raboof/gbl/commit/9423d36ee3168bca8db7a7cb65611dc7ddc2daf0.patch";
34 sha256 = "sha256-zwHXgUVkAYiQs/AT/pINnZoECoXzh+9astWMYENGTL8=";
38 cargoHash = "sha256-CeGLSseKUe2XudRqZm5Y7o7ZLDtDBg/MFunOGqxFZGM=";
40 nativeBuildInputs = [ pkg-config ];
41 buildInputs = [ openssl ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ Security ];
43 passthru.tests.version =
44 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 ];