1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 pytestCheckHook,
6 pythonOlder,
7}:
8
9buildPythonPackage rec {
10 pname = "pyxbe";
11 version = "1.0.3";
12 format = "setuptools";
13
14 disabled = pythonOlder "3.7";
15
16 src = fetchFromGitHub {
17 owner = "mborgerson";
18 repo = "pyxbe";
19 tag = "v${version}";
20 hash = "sha256-iLzGGgizUbaEG1xrNq4WDaWrGtcaLwAYgn4NGYiSDBo=";
21 };
22
23 nativeCheckInputs = [ pytestCheckHook ];
24
25 # Update location for run with pytest
26 preCheck = ''
27 substituteInPlace tests/test_load.py \
28 --replace '"xbefiles"' '"tests/xbefiles"'
29 '';
30
31 pythonImportsCheck = [ "xbe" ];
32
33 meta = with lib; {
34 description = "Library to work with XBE files";
35 homepage = "https://github.com/mborgerson/pyxbe";
36 license = with licenses; [ mit ];
37 maintainers = with maintainers; [ fab ];
38 };
39}