summaryrefslogtreecommitdiff
path: root/pkgs/development/python-modules/frida-python
diff options
context:
space:
mode:
authorStepan Stipl <stepan@stipl.net>2024-05-30 15:37:40 +0200
committerStepan Stipl <stepan@stipl.net>2024-06-09 14:01:51 +0200
commit0591be3bcf467bca8fe40249ec3ac5df78efe17f (patch)
tree94d9b8d3e2de3603507b7a8d6a924f17a73dbbab /pkgs/development/python-modules/frida-python
parent442b72ad24e2378a3c9a12c994d2084ae397789c (diff)
frida-python: enable support for aarch64-darwin
Co-authored-by: Anderson Torres <torres.anderson.85@protonmail.com> Co-authored-by: Ryan Hendrickson <ryan.hendrickson@alum.mit.edu>
Diffstat (limited to 'pkgs/development/python-modules/frida-python')
-rw-r--r--pkgs/development/python-modules/frida-python/default.nix27
1 files changed, 22 insertions, 5 deletions
diff --git a/pkgs/development/python-modules/frida-python/default.nix b/pkgs/development/python-modules/frida-python/default.nix
index 0ef08b77d371..d73e5645e517 100644
--- a/pkgs/development/python-modules/frida-python/default.nix
+++ b/pkgs/development/python-modules/frida-python/default.nix
@@ -5,14 +5,25 @@
fetchPypi,
buildPythonPackage,
typing-extensions,
+ darwin,
}:
let
version = "16.0.19";
format = "setuptools";
- devkit = fetchurl {
- url = "https://github.com/frida/frida/releases/download/${version}/frida-core-devkit-${version}-linux-x86_64.tar.xz";
- hash = "sha256-yNXNqv8eCbpdQKFShpAh6rUCEuItrOSNNLOjESimPdk=";
- };
+
+ devkit = {
+ aarch64-darwin = fetchurl {
+ url = "https://github.com/frida/frida/releases/download/${version}/frida-core-devkit-${version}-macos-arm64.tar.xz";
+ hash = "sha256-5VAZnpHQ5wjl7IM96GhIKOfFYHFDKKOoSjN1STna2UA=";
+ };
+
+ x86_64-linux = fetchurl {
+ url = "https://github.com/frida/frida/releases/download/${version}/frida-core-devkit-${version}-linux-x86_64.tar.xz";
+ hash = "sha256-yNXNqv8eCbpdQKFShpAh6rUCEuItrOSNNLOjESimPdk=";
+ };
+ }.${stdenv.hostPlatform.system}
+ or (throw "Unsupported system: ${stdenv.hostPlatform.system}");
+
in
buildPythonPackage rec {
pname = "frida-python";
@@ -32,8 +43,14 @@ buildPythonPackage rec {
popd
'';
+ env.NIX_LDFLAGS = lib.optionalString stdenv.hostPlatform.isDarwin "-framework AppKit";
+
propagatedBuildInputs = [ typing-extensions ];
+ buildInputs = lib.optionals stdenv.isDarwin [
+ darwin.apple_sdk.frameworks.AppKit
+ ];
+
pythonImportsCheck = [ "frida" ];
passthru = {
@@ -45,6 +62,6 @@ buildPythonPackage rec {
homepage = "https://www.frida.re";
license = lib.licenses.wxWindows;
maintainers = with lib.maintainers; [ s1341 ];
- platforms = [ "x86_64-linux" ];
+ platforms = [ "aarch64-darwin" "x86_64-linux" ];
};
}