at 24.05-pre 1.1 kB view raw
1{ stdenv 2, lib 3, buildPythonPackage 4, fetchFromGitHub 5, pytestCheckHook 6, pythonOlder 7, rustPlatform 8, libiconv 9}: 10 11buildPythonPackage rec { 12 pname = "evtx"; 13 version = "0.8.2"; 14 format = "pyproject"; 15 16 disabled = pythonOlder "3.7"; 17 18 src = fetchFromGitHub { 19 owner = "omerbenamram"; 20 repo = "pyevtx-rs"; 21 rev = "refs/tags/${version}"; 22 hash = "sha256-t//oNvD+7wnv5KkriKBX4xgGS8pQpZgCsKxAEXsj0X8="; 23 }; 24 25 cargoDeps = rustPlatform.fetchCargoTarball { 26 inherit src; 27 name = "${pname}-${version}"; 28 hash = "sha256-DPEL36cYNV5v4iW3+Fg1eEeuBuK9S7Qe78xOzZs8aJw="; 29 }; 30 31 nativeBuildInputs = with rustPlatform; [ 32 cargoSetupHook 33 maturinBuildHook 34 ]; 35 36 buildInputs = lib.optionals stdenv.isDarwin [ 37 libiconv 38 ]; 39 40 nativeCheckInputs = [ 41 pytestCheckHook 42 ]; 43 44 pythonImportsCheck = [ 45 "evtx" 46 ]; 47 48 meta = with lib; { 49 description = "Bindings for evtx"; 50 homepage = "https://github.com/omerbenamram/pyevtx-rs"; 51 changelog = "https://github.com/omerbenamram/pyevtx-rs/releases/tag/${version}"; 52 license = with licenses; [ mit ]; 53 maintainers = with maintainers; [ fab ]; 54 }; 55}