From 95fbdb370c174904d4abbd2f8ac694545f0e2d68 Mon Sep 17 00:00:00 2001 From: Alex Martens Date: Tue, 19 Dec 2023 12:15:23 -0800 Subject: [PATCH] espflash: init at 2.1.0 --- .../development/embedded/espflash/default.nix | 39 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 4 ++ 2 files changed, 43 insertions(+) create mode 100644 pkgs/development/embedded/espflash/default.nix diff --git a/pkgs/development/embedded/espflash/default.nix b/pkgs/development/embedded/espflash/default.nix new file mode 100644 index 000000000000..8b3540111a71 --- /dev/null +++ b/pkgs/development/embedded/espflash/default.nix @@ -0,0 +1,39 @@ +{ lib +, rustPlatform +, fetchCrate +, pkg-config +, stdenv +, udev +, Security +, SystemConfiguration +}: + +rustPlatform.buildRustPackage rec { + pname = "espflash"; + version = "2.1.0"; + + src = fetchCrate { + inherit pname version; + hash = "sha256-Gd+8pA36mO+BCA0EFshboBi0etNjsiQFQU1wBYf/o6I="; + }; + + nativeBuildInputs = [ pkg-config ]; + + buildInputs = lib.optionals stdenv.isLinux [ + udev + ] ++ lib.optionals stdenv.isDarwin [ + Security + SystemConfiguration + ]; + + cargoHash = "sha256-IObAbsyrVBXt5zldirRezU7vS3R3aUihMFy2yIRWIlk="; + + meta = with lib; { + description = "Serial flasher utility for Espressif SoCs and modules"; + homepage = "https://github.com/esp-rs/espflash"; + changelog = "https://github.com/esp-rs/espflash/blob/v${version}/CHANGELOG.md"; + mainProgram = "espflash"; + license = with licenses; [ asl20 /* or */ mit ]; + maintainers = with maintainers; [ newam ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 60b5802a02a5..980e60e628bb 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -31445,6 +31445,10 @@ with pkgs; espeakup = callPackage ../applications/accessibility/espeakup { }; + espflash = callPackage ../development/embedded/espflash { + inherit (darwin.apple_sdk.frameworks) Security SystemConfiguration; + }; + etebase-server = with python3Packages; toPythonApplication etebase-server; etesync-dav = callPackage ../applications/misc/etesync-dav { };