diff --git a/pkgs/tools/misc/mpremote/default.nix b/pkgs/tools/misc/mpremote/default.nix new file mode 100644 index 000000000000..aa7b847dfb5a --- /dev/null +++ b/pkgs/tools/misc/mpremote/default.nix @@ -0,0 +1,43 @@ +{ lib +, buildPythonApplication +, fetchFromGitHub +, hatchling +, hatch-requirements-txt +, hatch-vcs +, pyserial +, importlib-metadata +}: +buildPythonApplication rec { + pname = "mpremote"; + version = "1.20.0"; + + src = fetchFromGitHub { + owner = "micropython"; + repo = "micropython"; + rev = "v${version}"; + hash = "sha256-udIyNcRjwwoWju0Qob0CFtMibbVKwc7j2ji83BC1rX0="; + }; + sourceRoot = "source/tools/mpremote"; + format = "pyproject"; + env.SETUPTOOLS_SCM_PRETEND_VERSION = version; + + nativeBuildInputs = [ + hatchling + hatch-requirements-txt + hatch-vcs + ]; + propagatedBuildInputs = [ + pyserial + importlib-metadata + ]; + + pythonImportsCheck = [ "mpremote" ]; + + meta = with lib; { + description = "An integrated set of utilities to remotely interact with and automate a MicroPython device over a serial connection"; + homepage = "https://github.com/micropython/micropython/blob/master/tools/mpremote/README.md"; + platforms = platforms.unix; + license = licenses.mit; + maintainers = with maintainers; [ _999eagle ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index f3a2e7ac1389..83f300da7fe3 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -1850,6 +1850,8 @@ with pkgs; monica = callPackage ../servers/web-apps/monica { }; + mpremote = python3Packages.callPackage ../tools/misc/mpremote { }; + mprocs = callPackage ../tools/misc/mprocs { }; mpy-utils = python3Packages.callPackage ../tools/misc/mpy-utils { };