lol
1{ lib
2, buildPythonApplication
3, fetchFromGitHub
4, hatchling
5, hatch-requirements-txt
6, hatch-vcs
7, pyserial
8, importlib-metadata
9}:
10buildPythonApplication rec {
11 pname = "mpremote";
12 version = "1.22.2";
13
14 src = fetchFromGitHub {
15 owner = "micropython";
16 repo = "micropython";
17 rev = "refs/tags/v${version}";
18 hash = "sha256-67CAR34VrMOzvNkukDeGRnUfoOLO66R37wsrRHjpp5E=";
19 };
20 sourceRoot = "${src.name}/tools/mpremote";
21 format = "pyproject";
22
23 nativeBuildInputs = [
24 hatchling
25 hatch-requirements-txt
26 hatch-vcs
27 ];
28 propagatedBuildInputs = [
29 pyserial
30 importlib-metadata
31 ];
32
33 pythonImportsCheck = [ "mpremote" ];
34
35 meta = with lib; {
36 description = "An integrated set of utilities to remotely interact with and automate a MicroPython device over a serial connection";
37 homepage = "https://github.com/micropython/micropython/blob/master/tools/mpremote/README.md";
38 platforms = platforms.unix;
39 license = licenses.mit;
40 maintainers = with maintainers; [ _999eagle ];
41 mainProgram = "mpremote";
42 };
43}