diff --git a/pkgs/development/libraries/unicorn/default.nix b/pkgs/development/libraries/unicorn/default.nix index 6b160a852d6c..94e9efeea808 100644 --- a/pkgs/development/libraries/unicorn/default.nix +++ b/pkgs/development/libraries/unicorn/default.nix @@ -1,33 +1,34 @@ -{ lib -, stdenv -, fetchFromGitHub -, pkg-config -, cmake -, IOKit -, cctools +{ + lib, + stdenv, + cctools, + cmake, + fetchFromGitHub, + IOKit, + pkg-config, }: stdenv.mkDerivation rec { pname = "unicorn"; - version = "2.0.1.post1"; + version = "2.1.0"; src = fetchFromGitHub { owner = "unicorn-engine"; - repo = pname; - rev = version; - hash = "sha256-Jz5C35rwnDz0CXcfcvWjkwScGNQO1uijF7JrtZhM7mI="; + repo = "unicorn"; + rev = "refs/tags/${version}"; + hash = "sha256-o2syI3kBmofC9OFkUbUFCMpXGL5JlGviCLum+9Bi0LQ="; }; - nativeBuildInputs = [ - cmake - pkg-config - ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ - cctools - ]; + nativeBuildInputs = + [ + cmake + pkg-config + ] + ++ lib.optionals stdenv.isDarwin [ + cctools + ]; - buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ - IOKit - ]; + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ IOKit ]; # Ensure the linker is using atomic when compiling for RISC-V, otherwise fails NIX_LDFLAGS = lib.optionalString stdenv.hostPlatform.isRiscV "-latomic"; @@ -44,6 +45,9 @@ stdenv.mkDerivation rec { homepage = "https://www.unicorn-engine.org"; license = licenses.gpl2Only; platforms = platforms.unix; - maintainers = with maintainers; [ thoughtpolice luc65r ]; + maintainers = with maintainers; [ + thoughtpolice + luc65r + ]; }; } diff --git a/pkgs/development/python-modules/ailment/default.nix b/pkgs/development/python-modules/ailment/default.nix index 30998bc2ad47..25ed8e73ec10 100644 --- a/pkgs/development/python-modules/ailment/default.nix +++ b/pkgs/development/python-modules/ailment/default.nix @@ -9,7 +9,7 @@ buildPythonPackage rec { pname = "ailment"; - version = "9.2.118"; + version = "9.2.119"; pyproject = true; disabled = pythonOlder "3.11"; @@ -18,7 +18,7 @@ buildPythonPackage rec { owner = "angr"; repo = "ailment"; rev = "refs/tags/v${version}"; - hash = "sha256-wpH3hO5ge6WiUe3DxVMPylzTdTuqrmK4+ky1JkwGBY0="; + hash = "sha256-mVzgwCzCba4xNJMbrDTRRHFUQ48tKihm3VGqpFq6Heo="; }; build-system = [ setuptools ]; diff --git a/pkgs/development/python-modules/angr/default.nix b/pkgs/development/python-modules/angr/default.nix index b1b14da3b607..15663d0e790f 100644 --- a/pkgs/development/python-modules/angr/default.nix +++ b/pkgs/development/python-modules/angr/default.nix @@ -36,7 +36,7 @@ buildPythonPackage rec { pname = "angr"; - version = "9.2.118"; + version = "9.2.119"; pyproject = true; disabled = pythonOlder "3.11"; @@ -45,15 +45,22 @@ buildPythonPackage rec { owner = "angr"; repo = "angr"; rev = "refs/tags/v${version}"; - hash = "sha256-vysSt1YAXjmzhhP6ZYwaxI7K8x844YBSSg9Wp2xH1pI="; + hash = "sha256-GwfQj8KU6M5ylgJPN1Blz8Chz2zEDTZayFdvjXXWoHY="; }; - pythonRelaxDeps = [ "capstone" ]; + postPatch = '' + # unicorn is also part of build-system + substituteInPlace pyproject.toml \ + --replace-fail "unicorn==2.0.1.post1" "unicorn" + ''; - build-system = [ - setuptools + pythonRelaxDeps = [ + "capstone" + "unicorn" ]; + build-system = [ setuptools ]; + dependencies = [ ailment archinfo @@ -110,5 +117,7 @@ buildPythonPackage rec { homepage = "https://angr.io/"; license = with licenses; [ bsd2 ]; maintainers = with maintainers; [ fab ]; + # angr is pining unicorn + broken = versionAtLeast unicorn.version "2.0.1.post1"; }; } diff --git a/pkgs/development/python-modules/archinfo/default.nix b/pkgs/development/python-modules/archinfo/default.nix index 6d64836ee055..c1b6e88ed3c5 100644 --- a/pkgs/development/python-modules/archinfo/default.nix +++ b/pkgs/development/python-modules/archinfo/default.nix @@ -10,7 +10,7 @@ buildPythonPackage rec { pname = "archinfo"; - version = "9.2.118"; + version = "9.2.119"; pyproject = true; disabled = pythonOlder "3.8"; @@ -19,7 +19,7 @@ buildPythonPackage rec { owner = "angr"; repo = "archinfo"; rev = "refs/tags/v${version}"; - hash = "sha256-ravf2/FyPxGw7eThzkVRTLD8zhjX5vUXzb+LVO+KVxU="; + hash = "sha256-81vaHTzRCOw8C/KHwFSEMGOWEwpHVK0HicGVi9j4MqU="; }; build-system = [ setuptools ]; diff --git a/pkgs/development/python-modules/claripy/default.nix b/pkgs/development/python-modules/claripy/default.nix index 618624295907..baaa3200ba31 100644 --- a/pkgs/development/python-modules/claripy/default.nix +++ b/pkgs/development/python-modules/claripy/default.nix @@ -14,7 +14,7 @@ buildPythonPackage rec { pname = "claripy"; - version = "9.2.118"; + version = "9.2.119"; pyproject = true; disabled = pythonOlder "3.11"; @@ -23,7 +23,7 @@ buildPythonPackage rec { owner = "angr"; repo = "claripy"; rev = "refs/tags/v${version}"; - hash = "sha256-1VIWdKQD6wtYd6LHQ7vW1Ol3W+ZGB+xHhSMZ9EiNev8="; + hash = "sha256-dnx5aiZ8ssgC0SFEipYuCXbYbdLt7Ma6xBfN1OlO8Do="; }; # z3 does not provide a dist-info, so python-runtime-deps-check will fail diff --git a/pkgs/development/python-modules/cle/default.nix b/pkgs/development/python-modules/cle/default.nix index 6f7614aa917d..554b36650ef3 100644 --- a/pkgs/development/python-modules/cle/default.nix +++ b/pkgs/development/python-modules/cle/default.nix @@ -18,14 +18,14 @@ let # The binaries are following the argr projects release cycle - version = "9.2.118"; + version = "9.2.119"; # Binary files from https://github.com/angr/binaries (only used for testing and only here) binaries = fetchFromGitHub { owner = "angr"; repo = "binaries"; rev = "refs/tags/v${version}"; - hash = "sha256-3XucYC7FKJ0WQI6fsKxMTCIdROjZcnTKpTi3ZRfiQkU="; + hash = "sha256-cIh8ahJGEVzKSylCBVF1RbNftqADjewuiybPiCWfmhw="; }; in buildPythonPackage rec { @@ -39,7 +39,7 @@ buildPythonPackage rec { owner = "angr"; repo = "cle"; rev = "refs/tags/v${version}"; - hash = "sha256-izDaikc4WR/6fdgrc3TJze+DLe7NOtSNWue9HrTz18Q="; + hash = "sha256-jOqhwSxdHJsNUZqx/ViPDh09Uk+2hqyxm4p8XwyHZ0k="; }; build-system = [ setuptools ]; diff --git a/pkgs/development/python-modules/pyvex/default.nix b/pkgs/development/python-modules/pyvex/default.nix index f57cf0d0bcc3..39f557459674 100644 --- a/pkgs/development/python-modules/pyvex/default.nix +++ b/pkgs/development/python-modules/pyvex/default.nix @@ -12,14 +12,14 @@ buildPythonPackage rec { pname = "pyvex"; - version = "9.2.118"; + version = "9.2.119"; pyproject = true; disabled = pythonOlder "3.11"; src = fetchPypi { inherit pname version; - hash = "sha256-LRJSecKAQAg5Axfi8h//cc3xozOiPUkZD49VJIE6shE="; + hash = "sha256-c9CaftT7VInEMRsWN7FhDHwXJccma5wkUfiN9EpjUTQ="; }; build-system = [ setuptools ]; diff --git a/pkgs/development/python-modules/unicorn/avoid-distutils-python312.patch b/pkgs/development/python-modules/unicorn/avoid-distutils-python312.patch deleted file mode 100644 index 904538880a22..000000000000 --- a/pkgs/development/python-modules/unicorn/avoid-distutils-python312.patch +++ /dev/null @@ -1,29 +0,0 @@ -From bcc65c0be18fc6ea6ec39da89d0de77544fa18c7 Mon Sep 17 00:00:00 2001 -From: Mrmaxmeier -Date: Tue, 9 Jul 2024 17:41:08 +0200 -Subject: [PATCH] Drop removed `distutils` import in favor of `sysconfig` - -This patch is available online as https://github.com/unicorn-engine/unicorn/pull/1973 - -diff --git a/unicorn/unicorn.py b/unicorn/unicorn.py -index 2e6a938f43..7204b8215f 100644 ---- a/unicorn/unicorn.py -+++ b/unicorn/unicorn.py -@@ -2,7 +2,7 @@ - from __future__ import annotations - import ctypes - import ctypes.util --import distutils.sysconfig -+import sysconfig - from functools import wraps - from typing import Any, Callable, List, Tuple, Union - import pkg_resources -@@ -85,7 +85,7 @@ def _load_lib(path, lib_name): - pkg_resources.resource_filename(__name__, 'lib'), - os.path.join(os.path.split(__file__)[0], 'lib'), - '', -- distutils.sysconfig.get_python_lib(), -+ sysconfig.get_path('platlib'), - "/usr/local/lib/" if sys.platform == 'darwin' else '/usr/lib64', - os.getenv('PATH', '')] - diff --git a/pkgs/development/python-modules/unicorn/default.nix b/pkgs/development/python-modules/unicorn/default.nix index 0814b63ef41b..6ce310bfb5d1 100644 --- a/pkgs/development/python-modules/unicorn/default.nix +++ b/pkgs/development/python-modules/unicorn/default.nix @@ -9,22 +9,17 @@ buildPythonPackage rec { pname = "unicorn"; version = lib.getVersion unicorn-emu; - format = "setuptools"; + pyproject = true; src = unicorn-emu.src; sourceRoot = "${src.name}/bindings/python"; - patches = [ - # Python 3.12 compatibility: Drop removed `distutils` import in favor of `sysconfig` - ./avoid-distutils-python312.patch - ]; - prePatch = '' ln -s ${unicorn-emu}/lib/libunicorn.* prebuilt/ ''; - # needed on non-x86 linux + # Needed on non-x86 linux setupPyBuildFlags = lib.optionals stdenv.hostPlatform.isLinux [ "--plat-name" @@ -37,7 +32,7 @@ buildPythonPackage rec { "macosx_11_0" ]; - propagatedBuildInputs = [ setuptools ]; + build-system = [ setuptools ]; checkPhase = '' runHook preCheck