2021-01-24 20:07:19 +00:00
|
|
|
{ ansicolors
|
|
|
|
, attrs
|
|
|
|
, autobahn
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
|
|
|
, jinja2
|
|
|
|
, lib
|
|
|
|
, mock
|
|
|
|
, pexpect
|
|
|
|
, psutil
|
|
|
|
, pyserial
|
|
|
|
, pytestCheckHook
|
|
|
|
, pytest-dependency
|
|
|
|
, pytest-mock
|
|
|
|
, pyudev
|
|
|
|
, pyusb
|
|
|
|
, pyyaml
|
|
|
|
, requests
|
|
|
|
, setuptools-scm
|
|
|
|
, xmodem
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "labgrid";
|
2021-03-14 18:53:11 +00:00
|
|
|
version = "0.3.2";
|
2021-01-24 20:07:19 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "labgrid-project";
|
|
|
|
repo = "labgrid";
|
|
|
|
rev = "v${version}";
|
2021-03-14 18:53:11 +00:00
|
|
|
sha256 = "sha256-wMYsgZXNP8kTt/x8c4e96BXrbjIZZ6RsH04BfD0zGwo=";
|
2021-01-24 20:07:19 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
patches = [
|
2021-03-14 18:53:11 +00:00
|
|
|
# Pyserial within Nixpkgs already includes the necessary fix, remove the
|
|
|
|
# pyserial version check from labgrid.
|
2021-01-24 20:07:19 +00:00
|
|
|
./0001-serialdriver-remove-pyserial-version-check.patch
|
|
|
|
];
|
|
|
|
|
|
|
|
nativeBuildInputs = [ setuptools-scm ];
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
ansicolors
|
|
|
|
attrs
|
|
|
|
autobahn
|
|
|
|
jinja2
|
|
|
|
pexpect
|
|
|
|
pyserial
|
|
|
|
pyudev
|
|
|
|
pyusb
|
|
|
|
pyyaml
|
|
|
|
requests
|
|
|
|
xmodem
|
|
|
|
];
|
|
|
|
|
|
|
|
preBuild = ''
|
|
|
|
export SETUPTOOLS_SCM_PRETEND_VERSION="${version}"
|
|
|
|
'';
|
|
|
|
|
|
|
|
checkInputs = [
|
|
|
|
mock
|
|
|
|
psutil
|
|
|
|
pytestCheckHook
|
|
|
|
pytest-mock
|
|
|
|
pytest-dependency
|
|
|
|
];
|
|
|
|
|
|
|
|
disabledTests = [
|
|
|
|
"docker"
|
|
|
|
"sshmanager"
|
|
|
|
];
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Embedded control & testing library";
|
|
|
|
homepage = "https://labgrid.org";
|
|
|
|
license = licenses.lgpl21Plus;
|
|
|
|
maintainers = with maintainers; [ emantor ];
|
|
|
|
platforms = with platforms; linux;
|
|
|
|
};
|
|
|
|
}
|