From 4c5a1c771c05b337d8f9a3478cddac86478ac1ac Mon Sep 17 00:00:00 2001 From: Florian Warzecha Date: Sun, 15 Oct 2023 10:40:52 +0200 Subject: [PATCH 1/4] maintainers: add liketechnik --- maintainers/maintainer-list.nix | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/maintainers/maintainer-list.nix b/maintainers/maintainer-list.nix index d92d24f883d95..e6fb98b145abe 100644 --- a/maintainers/maintainer-list.nix +++ b/maintainers/maintainer-list.nix @@ -10008,6 +10008,17 @@ githubId = 3696783; name = "Leroy Hopson"; }; + liketechnik = { + name = "Florian Warzecha"; + + email = "liketechnik@disroot.org"; + github = "liketechnik"; + githubId = 24209689; + + keys = [{ + fingerprint = "92D8 A09D 03DD B774 AABD 53B9 E136 2F07 D750 DB5C"; + }]; + }; lillycham = { email = "lillycat332@gmail.com"; github = "lillycat332"; From 5b6b3c0a87f6b8bd3ed3ed3791f1827ba4cac7b6 Mon Sep 17 00:00:00 2001 From: Florian Warzecha Date: Sun, 15 Oct 2023 10:41:27 +0200 Subject: [PATCH 2/4] wb32-dfu-updater: init at 1.0.0 --- pkgs/by-name/wb/wb32-dfu-updater/package.nix | 34 ++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 pkgs/by-name/wb/wb32-dfu-updater/package.nix diff --git a/pkgs/by-name/wb/wb32-dfu-updater/package.nix b/pkgs/by-name/wb/wb32-dfu-updater/package.nix new file mode 100644 index 0000000000000..df040c3a71124 --- /dev/null +++ b/pkgs/by-name/wb/wb32-dfu-updater/package.nix @@ -0,0 +1,34 @@ +{ callPackage +, lib +, stdenv +, fetchFromGitHub +, cmake +, libusb1 +}: + +stdenv.mkDerivation (finalAttrs: { + pname = "wb32-dfu-updater"; + version = "1.0.0"; + + src = fetchFromGitHub { + owner = "WestberryTech"; + repo = finalAttrs.pname; + rev = finalAttrs.version; + sha256 = "sha256-DKsDVO00JFhR9hIZksFVJLRwC6PF9LCRpf++QywFO2w="; + }; + + nativeBuildInputs = [ cmake ]; + buildInputs = [ libusb1 ]; + + meta = with lib; { + description = "USB programmer for downloading and uploading firmware to/from USB devices."; + longDescription = '' + wb32-dfu-updater is a host tool used to download and upload firmware to/from WB32 MCU via USB. (wb32-dfu-updater_cli is the command line version). + ''; + homepage = "https://github.com/WestberryTech/wb32-dfu-updater"; + license = licenses.asl20; + maintainers = [ maintainers.liketechnik ]; + mainProgram = "wb32-dfu-updater_cli"; + platforms = platforms.all; + }; +}) From a56440e9afa68f2d8d4eaa968b29e68cbe59ad0d Mon Sep 17 00:00:00 2001 From: Florian Warzecha Date: Sun, 15 Oct 2023 10:43:05 +0200 Subject: [PATCH 3/4] qmk: add wb32 flash tool --- pkgs/tools/misc/qmk/default.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkgs/tools/misc/qmk/default.nix b/pkgs/tools/misc/qmk/default.nix index 598258d5cf040..ce0a11c10c83a 100644 --- a/pkgs/tools/misc/qmk/default.nix +++ b/pkgs/tools/misc/qmk/default.nix @@ -5,6 +5,7 @@ , avrdude , dfu-programmer , dfu-util +, wb32-dfu-updater , gcc-arm-embedded , gnumake , teensy-loader-cli @@ -38,6 +39,7 @@ python3.pkgs.buildPythonApplication rec { avrdude dfu-programmer dfu-util + wb32-dfu-updater teensy-loader-cli gcc-arm-embedded gnumake From c3528adc2a8bdafe84d047a72c01e25f651f1634 Mon Sep 17 00:00:00 2001 From: Florian Warzecha Date: Wed, 18 Oct 2023 17:10:13 +0200 Subject: [PATCH 4/4] wb32-dfu-updater: apply suggestions from code review Co-authored-by: Weijia Wang <9713184+wegank@users.noreply.github.com> --- pkgs/by-name/wb/wb32-dfu-updater/package.nix | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/pkgs/by-name/wb/wb32-dfu-updater/package.nix b/pkgs/by-name/wb/wb32-dfu-updater/package.nix index df040c3a71124..fb144b7d6e2b7 100644 --- a/pkgs/by-name/wb/wb32-dfu-updater/package.nix +++ b/pkgs/by-name/wb/wb32-dfu-updater/package.nix @@ -1,5 +1,4 @@ -{ callPackage -, lib +{ lib , stdenv , fetchFromGitHub , cmake @@ -14,7 +13,7 @@ stdenv.mkDerivation (finalAttrs: { owner = "WestberryTech"; repo = finalAttrs.pname; rev = finalAttrs.version; - sha256 = "sha256-DKsDVO00JFhR9hIZksFVJLRwC6PF9LCRpf++QywFO2w="; + hash = "sha256-DKsDVO00JFhR9hIZksFVJLRwC6PF9LCRpf++QywFO2w="; }; nativeBuildInputs = [ cmake ];