1{ stdenv
2, lib
3, buildPythonPackage
4, fetchFromGitHub
5, pytestCheckHook
6, pythonOlder
7, rustPlatform
8}:
9
10buildPythonPackage rec {
11 pname = "evtx";
12 version = "0.8.1";
13 format = "pyproject";
14
15 disabled = pythonOlder "3.6";
16
17 src = fetchFromGitHub {
18 owner = "omerbenamram";
19 repo = "pyevtx-rs";
20 rev = version;
21 sha256 = "sha256-MSQYp/qkntFcnGqGhJ+0i4eMGzcDJcSZ44qFARMYM2I=";
22 };
23
24 cargoDeps = rustPlatform.fetchCargoTarball {
25 inherit src;
26 name = "${pname}-${version}";
27 sha256 = "sha256-kzv2ppRjkmXgMxJviBwRVXMiGWBlhBqLXEmmRvwlw98=";
28 };
29
30 nativeBuildInputs = with rustPlatform; [
31 cargoSetupHook
32 maturinBuildHook
33 ];
34
35 checkInputs = [
36 pytestCheckHook
37 ];
38
39 pythonImportsCheck = [
40 "evtx"
41 ];
42
43 meta = with lib; {
44 broken = stdenv.isDarwin;
45 description = "Bindings for evtx";
46 homepage = "https://github.com/omerbenamram/pyevtx-rs";
47 license = with licenses; [ mit ];
48 maintainers = with maintainers; [ fab ];
49 };
50}