Unverified Commit a899d358 authored by Weijia Wang's avatar Weijia Wang Committed by GitHub
Browse files

Merge pull request #242570 from fortuneteller2k/elf2uf2-darwin

elf2uf2-rs: support darwin
parents d2da80ca 62b322de
Loading
Loading
Loading
Loading
+9 −6
Original line number Diff line number Diff line
{ lib, stdenv, rustPlatform, fetchCrate, pkg-config, udev }:
{ lib, stdenv, rustPlatform, fetchCrate, pkg-config, udev, CoreFoundation, DiskArbitration, Foundation }:

rustPlatform.buildRustPackage rec {
  pname = "elf2uf2-rs";
@@ -13,8 +13,11 @@ rustPlatform.buildRustPackage rec {
    pkg-config
  ];

  buildInputs = [
    udev
  buildInputs = lib.optional stdenv.isLinux udev
    ++ lib.optionals stdenv.isDarwin [
      CoreFoundation
      DiskArbitration
      Foundation
    ];

  cargoSha256 = "sha256-+3Rqlzkrw9XfM3PelGNbnRGaWQLbzVJ7iJgvGgVt5FE=";
@@ -23,7 +26,7 @@ rustPlatform.buildRustPackage rec {
    description = "Convert ELF files to UF2 for USB Flashing Bootloaders";
    homepage = "https://github.com/JoNil/elf2uf2-rs";
    license = with licenses; [ bsd0 ];
    platforms = platforms.linux;
    maintainers = with maintainers; [ polygon ];
    platforms = platforms.linux ++ platforms.darwin;
    maintainers = with maintainers; [ polygon fortuneteller2k ];
  };
}
+3 −1
Original line number Diff line number Diff line
@@ -18966,7 +18966,9 @@ with pkgs;
  electron-fiddle = callPackage ../development/tools/electron-fiddle { };
  elf2uf2-rs = callPackage ../development/embedded/elf2uf2-rs { };
  elf2uf2-rs = darwin.apple_sdk_11_0.callPackage ../development/embedded/elf2uf2-rs {
    inherit (darwin.apple_sdk_11_0.frameworks) CoreFoundation DiskArbitration Foundation;
  };
  elfinfo = callPackage ../development/tools/misc/elfinfo { };