depot/third_party/nixpkgs/pkgs/tools/misc/mpremote/default.nix
Default email c7f94ff3ce Project import generated by Copybara.
GitOrigin-RevId: b85ed9dcbf187b909ef7964774f8847d554fab3b
2023-08-22 22:05:09 +02:00

43 lines
1 KiB
Nix

{ 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 ];
};
}