From 062899d7255fe613fbf8b024481a0f627359af0b Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Tue, 18 Jan 2022 21:42:55 +0100 Subject: [PATCH] python3Packages.pyvex: 9.1.10913 -> 9.1.11508 --- .../python-modules/pyvex/default.nix | 32 +++++++++++++------ 1 file changed, 22 insertions(+), 10 deletions(-) diff --git a/pkgs/development/python-modules/pyvex/default.nix b/pkgs/development/python-modules/pyvex/default.nix index 211ba18ae612..7b8aef7ec30d 100644 --- a/pkgs/development/python-modules/pyvex/default.nix +++ b/pkgs/development/python-modules/pyvex/default.nix @@ -7,23 +7,21 @@ , fetchPypi , future , pycparser +, pythonOlder }: buildPythonPackage rec { pname = "pyvex"; - version = "9.1.10913"; + version = "9.1.11508"; + format = "setuptools"; + + disabled = pythonOlder "3.6"; src = fetchPypi { inherit pname version; - sha256 = "sha256-EUgCyjD5ia5KQMvZWVAsXeKRjmSVE7tRRYH5u/Ozug0="; + hash = "sha256-FNCAvag0ErVjzgXqiwDnX80WnjUdnWHtcLYuanlj0ME="; }; - postPatch = lib.optionalString stdenv.isDarwin '' - substituteInPlace vex/Makefile-gcc --replace '/usr/bin/ar' 'ar' - ''; - - setupPyBuildFlags = lib.optionals stdenv.isLinux [ "--plat-name" "linux" ]; - propagatedBuildInputs = [ archinfo bitstring @@ -32,15 +30,29 @@ buildPythonPackage rec { pycparser ]; + postPatch = lib.optionalString stdenv.isDarwin '' + substituteInPlace vex/Makefile-gcc \ + --replace '/usr/bin/ar' 'ar' + ''; + + setupPyBuildFlags = lib.optionals stdenv.isLinux [ + "--plat-name" + "linux" + ]; + preBuild = '' export CC=${stdenv.cc.targetPrefix}cc - substituteInPlace pyvex_c/Makefile --replace 'AR=ar' 'AR=${stdenv.cc.targetPrefix}ar' + substituteInPlace pyvex_c/Makefile \ + --replace 'AR=ar' 'AR=${stdenv.cc.targetPrefix}ar' ''; # No tests are available on PyPI, GitHub release has tests # Switch to GitHub release after all angr parts are present doCheck = false; - pythonImportsCheck = [ "pyvex" ]; + + pythonImportsCheck = [ + "pyvex" + ]; meta = with lib; { description = "Python interface to libVEX and VEX IR";