2023-03-09 16:51:26 +00:00
|
|
|
{ lib
|
2023-05-18 20:18:17 +00:00
|
|
|
, baseline
|
2023-03-09 16:51:26 +00:00
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitLab
|
|
|
|
, pytestCheckHook
|
2023-05-18 20:18:17 +00:00
|
|
|
, pythonOlder
|
2023-03-09 16:51:26 +00:00
|
|
|
}:
|
2021-03-17 00:02:13 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "plum-py";
|
2023-05-18 20:13:01 +00:00
|
|
|
version = "0.8.6";
|
2023-05-18 20:18:17 +00:00
|
|
|
format = "setuptools";
|
|
|
|
|
|
|
|
disabled = pythonOlder "3.8";
|
2021-03-17 00:02:13 +00:00
|
|
|
|
|
|
|
src = fetchFromGitLab {
|
|
|
|
owner = "dangass";
|
|
|
|
repo = "plum";
|
2023-05-18 20:18:17 +00:00
|
|
|
rev = "refs/tags/${version}";
|
2023-05-18 20:13:01 +00:00
|
|
|
hash = "sha256-gZSRqijKdjqOZe1+4aeycpCPsh6HC5sRbyVjgK+g4wM=";
|
2021-03-17 00:02:13 +00:00
|
|
|
};
|
|
|
|
|
2023-03-09 16:51:26 +00:00
|
|
|
postPatch = ''
|
|
|
|
# Drop broken version specifier
|
|
|
|
sed -i "/python_requires =/d" setup.cfg
|
|
|
|
'';
|
|
|
|
|
|
|
|
nativeCheckInputs = [
|
|
|
|
baseline
|
|
|
|
pytestCheckHook
|
|
|
|
];
|
|
|
|
|
2023-05-18 20:18:17 +00:00
|
|
|
pythonImportsCheck = [
|
|
|
|
"plum"
|
|
|
|
];
|
|
|
|
|
2023-03-09 16:51:26 +00:00
|
|
|
pytestFlagsArray = [
|
|
|
|
"tests"
|
|
|
|
];
|
2021-03-17 00:02:13 +00:00
|
|
|
|
2023-11-22 13:55:02 +00:00
|
|
|
disabledTestPaths = [
|
|
|
|
# tests enum.IntFlag behaviour which has been disallowed in python 3.11.6
|
|
|
|
# https://gitlab.com/dangass/plum/-/issues/150
|
|
|
|
"tests/flag/test_flag_invalid.py"
|
|
|
|
];
|
|
|
|
|
2021-03-17 00:02:13 +00:00
|
|
|
meta = with lib; {
|
|
|
|
description = "Classes and utilities for packing/unpacking bytes";
|
2023-05-18 20:18:17 +00:00
|
|
|
homepage = "https://plum-py.readthedocs.io/";
|
|
|
|
changelog = "https://gitlab.com/dangass/plum/-/blob/${version}/docs/release_notes.rst";
|
2021-03-17 00:02:13 +00:00
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ dnr ];
|
|
|
|
};
|
|
|
|
}
|