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.4";
15 format = "pyproject";
16
17 disabled = pythonOlder "3.7";
18
19 src = fetchFromGitHub {
20 owner = "omerbenamram";
21 repo = "pyevtx-rs";
22 rev = "refs/tags/${version}";
23 hash = "sha256-s94KCUIJplrkMvFsFxPokTucB5TwVYD1xxcoJyvk5NU=";
24 };
25
26 cargoDeps = rustPlatform.fetchCargoTarball {
27 inherit src;
28 name = "${pname}-${version}";
29 hash = "sha256-i16FNFbYrF2BONahLP7APMi9RPaLGmbnBH4hBPnHWzg=";
30 };
31
32 nativeBuildInputs = with rustPlatform; [
33 cargoSetupHook
34 maturinBuildHook
35 ];
36
37 buildInputs = lib.optionals stdenv.isDarwin [ libiconv ];
38
39 nativeCheckInputs = [ pytestCheckHook ];
40
41 pythonImportsCheck = [ "evtx" ];
42
43 meta = with lib; {
44 description = "Bindings for evtx";
45 homepage = "https://github.com/omerbenamram/pyevtx-rs";
46 changelog = "https://github.com/omerbenamram/pyevtx-rs/releases/tag/${version}";
47 license = with licenses; [ mit ];
48 maintainers = with maintainers; [ fab ];
49 };
50}