2021-04-22 02:08:21 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
|
|
|
, pytestCheckHook
|
2022-03-30 09:31:56 +00:00
|
|
|
, pythonOlder
|
2021-04-22 02:08:21 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "pyxbe";
|
2023-07-15 17:15:38 +00:00
|
|
|
version = "1.0.2";
|
2022-03-30 09:31:56 +00:00
|
|
|
format = "setuptools";
|
|
|
|
|
|
|
|
disabled = pythonOlder "3.7";
|
2021-04-22 02:08:21 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "mborgerson";
|
|
|
|
repo = pname;
|
2022-09-22 12:36:57 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
2023-07-15 17:15:38 +00:00
|
|
|
hash = "sha256-sm8/Lcsk3aL8/MB0cVrKNb8MoQPxGCGpHkEPWv+mPdo=";
|
2021-04-22 02:08:21 +00:00
|
|
|
};
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2021-04-22 02:08:21 +00:00
|
|
|
pytestCheckHook
|
|
|
|
];
|
|
|
|
|
|
|
|
# Update location for run with pytest
|
|
|
|
preCheck = ''
|
|
|
|
substituteInPlace tests/test_load.py \
|
2023-07-15 17:15:38 +00:00
|
|
|
--replace '"xbefiles"' '"tests/xbefiles"'
|
2021-04-22 02:08:21 +00:00
|
|
|
'';
|
|
|
|
|
2022-03-30 09:31:56 +00:00
|
|
|
pythonImportsCheck = [
|
|
|
|
"xbe"
|
|
|
|
];
|
2021-04-22 02:08:21 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Library to work with XBE files";
|
|
|
|
homepage = "https://github.com/mborgerson/pyxbe";
|
|
|
|
license = with licenses; [ mit ];
|
|
|
|
maintainers = with maintainers; [ fab ];
|
|
|
|
};
|
|
|
|
}
|