1{ 2 lib, 3 fetchPypi, 4 stdenvNoCC, 5 buildPythonPackage, 6}: 7let 8 version = "16.7.11"; 9 format = "wheel"; 10 inherit (stdenvNoCC.hostPlatform) system; 11 12 # https://pypi.org/project/frida/#files 13 pypiMeta = 14 { 15 x86_64-linux = { 16 hash = "sha256-aAPVZPz1mn73JuQPGJ/PAOUAtaufeHehSKHzaBmVFF8="; 17 platform = "manylinux1_x86_64"; 18 }; 19 aarch64-linux = { 20 hash = "sha256-mQgfMJ6esH41MXnGZQUwF4j8gDgzfyBDUQo5Kw8TGa4="; 21 platform = "manylinux2014_aarch64"; 22 }; 23 x86_64-darwin = { 24 hash = "sha256-TuWvQ4oDkK5Fn/bp0G3eAhvDLlv0tzIQ8dKtysX36w0="; 25 platform = "macosx_10_13_x86_64"; 26 }; 27 aarch64-darwin = { 28 hash = "sha256-QWfWbGnKeuKiGoD0srnnMsbWPYFcYsbO/Oy68uJIRjI="; 29 platform = "macosx_11_0_arm64"; 30 }; 31 } 32 .${system} or (throw "Unsupported system: ${system}"); 33in 34buildPythonPackage { 35 pname = "frida-python"; 36 inherit version format; 37 38 src = fetchPypi { 39 pname = "frida"; 40 inherit version format; 41 inherit (pypiMeta) hash platform; 42 abi = "abi3"; 43 python = "cp37"; 44 dist = "cp37"; 45 }; 46 47 pythonImportsCheck = [ 48 "frida" 49 "frida._frida" 50 ]; 51 52 meta = { 53 description = "Dynamic instrumentation toolkit for developers, reverse-engineers, and security researchers (Python bindings)"; 54 homepage = "https://www.frida.re"; 55 license = lib.licenses.wxWindows; 56 maintainers = with lib.maintainers; [ s1341 ]; 57 platforms = [ 58 "x86_64-linux" 59 "aarch64-linux" 60 "x86_64-darwin" 61 "aarch64-darwin" 62 ]; 63 }; 64}