1{
2 stdenv,
3 lib,
4 buildPythonPackage,
5 fetchFromGitHub,
6 pytestCheckHook,
7 pythonOlder,
8 rustPlatform,
9 libiconv,
10}:
11
12buildPythonPackage rec {
13 pname = "evtx";
14 version = "0.8.9";
15 format = "pyproject";
16
17 disabled = pythonOlder "3.7";
18
19 src = fetchFromGitHub {
20 owner = "omerbenamram";
21 repo = "pyevtx-rs";
22 tag = version;
23 hash = "sha256-rxE3Srm+5L9r6uNIeOPBnpQAbS89WCel/U7xgLc2ZDU=";
24 };
25
26 cargoDeps = rustPlatform.fetchCargoVendor {
27 inherit pname version src;
28 hash = "sha256-IqV4BsLE+5Dk3ey4M+h5wxR/SToZTLf8vU0BlWU5e8c=";
29 };
30
31 nativeBuildInputs = with rustPlatform; [
32 cargoSetupHook
33 maturinBuildHook
34 ];
35
36 buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ libiconv ];
37
38 nativeCheckInputs = [ pytestCheckHook ];
39
40 pythonImportsCheck = [ "evtx" ];
41
42 meta = with lib; {
43 description = "Bindings for evtx";
44 homepage = "https://github.com/omerbenamram/pyevtx-rs";
45 changelog = "https://github.com/omerbenamram/pyevtx-rs/releases/tag/${version}";
46 license = with licenses; [ mit ];
47 maintainers = with maintainers; [ fab ];
48 };
49}