10 buildPythonPackage rec {
15 r2lib = "${lib.getOutput "lib" radare2}/lib";
16 libr_core = "${r2lib}/libr_core${stdenv.hostPlatform.extensions.sharedLibrary}";
19 # Fix find_library, can be removed after
20 # https://github.com/NixOS/nixpkgs/issues/7307 is resolved.
21 substituteInPlace r2pipe/native.py --replace 'find_library("r_core")' "'${libr_core}'"
23 # Fix the default r2 executable
24 substituteInPlace r2pipe/open_sync.py --replace 'r2e = "radare2"' "r2e = '${radare2}/bin/radare2'"
25 substituteInPlace r2pipe/open_base.py --replace 'which("radare2")' "'${radare2}/bin/radare2'"
29 inherit pname version;
30 sha256 = "8f3708195c8a6e91c5753940fd348cd821df1389d23b889b01b3e88acf407485";
33 # Tiny sanity check to make sure r2pipe finds radare2 (since r2pipe doesn't
34 # provide its own tests):
35 # Analyze ls with the fastest analysis and do nothing with the result.
37 ${python.interpreter} <<EOF
39 r2 = r2pipe.open('${coreutils}/bin/ls')
46 description = "Interact with radare2";
47 homepage = "https://github.com/radare/radare2-r2pipe";
48 license = licenses.mit;
49 maintainers = with maintainers; [ timokau ];