Unverified Commit 9241892e authored by Gaétan Lepage's avatar Gaétan Lepage Committed by GitHub
Browse files

frida-python: support aarch64-{darwin,linux}, x86_64-darwin (#371232)

parents 0d6bfc92 ce76a6c4
Loading
Loading
Loading
Loading
+33 −5
Original line number Diff line number Diff line
{
  lib,
  fetchPypi,
  stdenvNoCC,
  buildPythonPackage,
}:

buildPythonPackage rec {
  pname = "frida-python";
let
  version = "16.5.7";
  format = "wheel";
  inherit (stdenvNoCC.hostPlatform) system;

  # https://pypi.org/project/frida/#files
  pypiMeta =
    {
      x86_64-linux = {
        hash = "sha256-+2P+Be7xDWBHesqcGupt6gGdUmda0zIp8HkyJqzGgio=";
        platform = "manylinux1_x86_64";
      };
      aarch64-linux = {
        hash = "sha256-CH7+4ehbrQ4JcRO7CxCVeMLPO57qzAWQPOhywbpmRE8=";
        platform = "manylinux2014_aarch64";
      };
      x86_64-darwin = {
        hash = "sha256-nG/ZDZ8jbClbzn3/raMC2JdqS2QQMEyGN/jnJLZGfWs=";
        platform = "macosx_10_13_x86_64";
      };
      aarch64-darwin = {
        hash = "sha256-6hbIKv3R4deqrZyCGXwpXk84ej8elpPGYvfUi5DCmtM=";
        platform = "macosx_11_0_arm64";
      };
    }
    .${system} or (throw "Unsupported system: ${system}");
in
buildPythonPackage {
  pname = "frida-python";
  inherit version format;

  src = fetchPypi {
    pname = "frida";
    inherit version format;
    hash = "sha256-+2P+Be7xDWBHesqcGupt6gGdUmda0zIp8HkyJqzGgio=";
    platform = "manylinux1_x86_64";
    inherit (pypiMeta) hash platform;
    abi = "abi3";
    python = "cp37";
    dist = "cp37";
@@ -31,6 +56,9 @@ buildPythonPackage rec {
    maintainers = with lib.maintainers; [ s1341 ];
    platforms = [
      "x86_64-linux"
      "aarch64-linux"
      "x86_64-darwin"
      "aarch64-darwin"
    ];
  };
}