2021-07-03 03:11:41 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
|
|
|
, future
|
|
|
|
, mock
|
|
|
|
, pytestCheckHook
|
|
|
|
, pythonOlder
|
2024-04-21 15:54:59 +00:00
|
|
|
, setuptools
|
2021-07-03 03:11:41 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "python-ipmi";
|
2024-04-21 15:54:59 +00:00
|
|
|
version = "0.5.5";
|
|
|
|
pyproject = true;
|
2023-04-29 16:46:19 +00:00
|
|
|
|
2021-07-03 03:11:41 +00:00
|
|
|
disabled = pythonOlder "3.6";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "kontron";
|
2024-04-21 15:54:59 +00:00
|
|
|
repo = "python-ipmi";
|
2023-04-29 16:46:19 +00:00
|
|
|
rev = "refs/tags/${version}";
|
2024-04-21 15:54:59 +00:00
|
|
|
hash = "sha256-G5FcFHtyN8bXMjj/yfJgzcfmV1mxQ9lu3GM3XMeTWVU=";
|
2021-07-03 03:11:41 +00:00
|
|
|
};
|
|
|
|
|
2023-04-29 16:46:19 +00:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace setup.py \
|
2024-04-21 15:54:59 +00:00
|
|
|
--replace-fail "version=version," "version='${version}',"
|
2023-04-29 16:46:19 +00:00
|
|
|
'';
|
|
|
|
|
2024-04-21 15:54:59 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
setuptools
|
|
|
|
];
|
|
|
|
|
2021-07-03 03:11:41 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
future
|
|
|
|
];
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2021-07-03 03:11:41 +00:00
|
|
|
mock
|
|
|
|
pytestCheckHook
|
|
|
|
];
|
|
|
|
|
2023-04-29 16:46:19 +00:00
|
|
|
pythonImportsCheck = [
|
|
|
|
"pyipmi"
|
|
|
|
];
|
2021-07-03 03:11:41 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Python IPMI Library";
|
2024-04-21 15:54:59 +00:00
|
|
|
mainProgram = "ipmitool.py";
|
2021-07-03 03:11:41 +00:00
|
|
|
homepage = "https://github.com/kontron/python-ipmi";
|
|
|
|
license = with licenses; [ lgpl2Plus ];
|
|
|
|
maintainers = with maintainers; [ fab ];
|
|
|
|
};
|
|
|
|
}
|