1{
2 lib,
3 stdenv,
4 fetchurl,
5 fetchPypi,
6 buildPythonPackage,
7 typing-extensions,
8}:
9let
10 version = "16.0.19";
11 format = "setuptools";
12 devkit = fetchurl {
13 url = "https://github.com/frida/frida/releases/download/${version}/frida-core-devkit-${version}-linux-x86_64.tar.xz";
14 hash = "sha256-yNXNqv8eCbpdQKFShpAh6rUCEuItrOSNNLOjESimPdk=";
15 };
16in
17buildPythonPackage rec {
18 pname = "frida-python";
19 inherit version;
20
21 src = fetchPypi {
22 pname = "frida";
23 inherit version;
24 hash = "sha256-rikIjjn9wA8VL/St/2JJTcueimn+q/URbt9lw/+nalY=";
25 };
26
27 postPatch = ''
28 mkdir assets
29 pushd assets
30 tar xvf ${devkit}
31 export FRIDA_CORE_DEVKIT=$PWD
32 popd
33 '';
34
35 propagatedBuildInputs = [ typing-extensions ];
36
37 pythonImportsCheck = [ "frida" ];
38
39 passthru = {
40 inherit devkit;
41 };
42
43 meta = {
44 description = "Dynamic instrumentation toolkit for developers, reverse-engineers, and security researchers (Python bindings)";
45 homepage = "https://www.frida.re";
46 license = lib.licenses.wxWindows;
47 maintainers = with lib.maintainers; [ s1341 ];
48 platforms = [ "x86_64-linux" ];
49 };
50}