From bfaf956e9c0e9ef4acbb3a7f6c09e18c2798c815 Mon Sep 17 00:00:00 2001 From: eyjhb Date: Tue, 9 Jun 2026 12:42:27 +0200 Subject: [PATCH 1/2] python3Packages.frida-python: add eyjhb as maintainer --- pkgs/development/python-modules/frida-python/default.nix | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pkgs/development/python-modules/frida-python/default.nix b/pkgs/development/python-modules/frida-python/default.nix index cc992c53d6f0..c3a19f1c6fa2 100644 --- a/pkgs/development/python-modules/frida-python/default.nix +++ b/pkgs/development/python-modules/frida-python/default.nix @@ -56,7 +56,10 @@ buildPythonPackage { lgpl2Plus wxWindowsException31 ]; - maintainers = with lib.maintainers; [ s1341 ]; + maintainers = with lib.maintainers; [ + s1341 + eyjhb + ]; platforms = [ "x86_64-linux" "aarch64-linux" From 3d1a45bdebf00f270d8eb3b6af8b1c147b73c776 Mon Sep 17 00:00:00 2001 From: eyjhb Date: Tue, 9 Jun 2026 12:42:35 +0200 Subject: [PATCH 2/2] python3Packages.frida-python: add passthru.updateScript --- .../python-modules/frida-python/default.nix | 2 ++ .../python-modules/frida-python/update.sh | 26 +++++++++++++++++++ 2 files changed, 28 insertions(+) create mode 100755 pkgs/development/python-modules/frida-python/update.sh diff --git a/pkgs/development/python-modules/frida-python/default.nix b/pkgs/development/python-modules/frida-python/default.nix index c3a19f1c6fa2..4407b2a21441 100644 --- a/pkgs/development/python-modules/frida-python/default.nix +++ b/pkgs/development/python-modules/frida-python/default.nix @@ -49,6 +49,8 @@ buildPythonPackage { "frida._frida" ]; + passthru.updateScript = ./update.sh; + meta = { description = "Dynamic instrumentation toolkit for developers, reverse-engineers, and security researchers (Python bindings)"; homepage = "https://www.frida.re"; diff --git a/pkgs/development/python-modules/frida-python/update.sh b/pkgs/development/python-modules/frida-python/update.sh new file mode 100755 index 000000000000..2dde81527470 --- /dev/null +++ b/pkgs/development/python-modules/frida-python/update.sh @@ -0,0 +1,26 @@ +#!/usr/bin/env nix-shell +#! nix-shell -i bash -p curl jq nix + +set -euox pipefail + +dir="$(dirname "$0")" +latest=$(curl -s https://pypi.org/pypi/frida/json | jq -r '.info.version') + +sed -i "s/version = \".*\"/version = \"$latest\"/" "$dir/default.nix" + +for system_platform in \ + "x86_64-linux|manylinux1_x86_64" \ + "aarch64-linux|manylinux2014_aarch64" \ + "x86_64-darwin|macosx_10_13_x86_64" \ + "aarch64-darwin|macosx_11_0_arm64" +do + system="${system_platform%%|*}" + platform="${system_platform##*|}" + url=$(curl -s "https://pypi.org/pypi/frida/${latest}/json" | \ + jq -r ".urls[] | select(.filename | test(\"${platform}\")) | .url") + hash=$(nix-prefetch-url --type sha256 "$url" 2>/dev/null | tail -1) + sri=$(nix hash to-sri --type sha256 "$hash") + + old_sri=$(grep -A1 "${system} = {" "$dir/default.nix" | grep -o 'sha256-[^"]*') + sed -i "s|${old_sri}|${sri}|" "$dir/default.nix" +done