lol

Merge pull request #245527 from arcz/capstone-5.0

capstone: 4.0.2 -> 5.0.1

authored by

Jörg Thalheim and committed by
GitHub
72a365b6 c740c98f

+91 -8
+35
pkgs/development/libraries/capstone/4.nix
··· 1 + { lib 2 + , stdenv 3 + , cmake 4 + , fetchFromGitHub 5 + , fixDarwinDylibNames 6 + }: 7 + 8 + stdenv.mkDerivation rec { 9 + pname = "capstone"; 10 + version = "4.0.2"; 11 + 12 + src = fetchFromGitHub { 13 + owner = "capstone-engine"; 14 + repo = "capstone"; 15 + rev = version; 16 + sha256 = "sha256-XMwQ7UaPC8YYu4yxsE4bbR3leYPfBHu5iixSLz05r3g="; 17 + }; 18 + 19 + nativeBuildInputs = [ 20 + cmake 21 + ] ++ lib.optionals stdenv.isDarwin [ 22 + fixDarwinDylibNames 23 + ]; 24 + 25 + doCheck = true; 26 + 27 + meta = { 28 + description = "Advanced disassembly library"; 29 + homepage = "http://www.capstone-engine.org"; 30 + license = lib.licenses.bsd3; 31 + maintainers = with lib.maintainers; [ thoughtpolice ris ]; 32 + mainProgram = "cstool"; 33 + platforms = lib.platforms.unix; 34 + }; 35 + }
+5 -3
pkgs/development/libraries/capstone/default.nix
··· 7 7 8 8 stdenv.mkDerivation rec { 9 9 pname = "capstone"; 10 - version = "4.0.2"; 10 + version = "5.0.1"; 11 11 12 12 src = fetchFromGitHub { 13 - owner = "aquynh"; 13 + owner = "capstone-engine"; 14 14 repo = "capstone"; 15 15 rev = version; 16 - sha256 = "sha256-XMwQ7UaPC8YYu4yxsE4bbR3leYPfBHu5iixSLz05r3g="; 16 + sha256 = "sha256-kKmL5sae9ruWGu1gas1mel9qM52qQOD+zLj8cRE3isg="; 17 17 }; 18 + 19 + cmakeFlags = [ "-DBUILD_SHARED_LIBS=ON" ]; 18 20 19 21 nativeBuildInputs = [ 20 22 cmake
+40
pkgs/development/python-modules/capstone/4.nix
··· 1 + { lib 2 + , buildPythonPackage 3 + , capstone_4 4 + , stdenv 5 + , setuptools 6 + , pythonAtLeast 7 + }: 8 + 9 + buildPythonPackage { 10 + pname = "capstone"; 11 + inherit (capstone_4) version src; 12 + 13 + sourceRoot = "source/bindings/python"; 14 + 15 + postPatch = '' 16 + ln -s ${capstone_4}/lib/libcapstone${stdenv.targetPlatform.extensions.sharedLibrary} prebuilt/ 17 + ln -s ${capstone_4}/lib/libcapstone${stdenv.targetPlatform.extensions.staticLibrary} prebuilt/ 18 + substituteInPlace setup.py --replace manylinux1 manylinux2014 19 + ''; 20 + 21 + # aarch64 only available from MacOS SDK 11 onwards, so fix the version tag. 22 + # otherwise, bdist_wheel may detect "macosx_10_6_arm64" which doesn't make sense. 23 + setupPyBuildFlags = lib.optionals (stdenv.isDarwin && stdenv.isAarch64) [ "--plat-name" "macosx_11_0" ]; 24 + 25 + propagatedBuildInputs = [ setuptools ]; 26 + 27 + checkPhase = '' 28 + mv capstone capstone.hidden 29 + patchShebangs test_* 30 + make check 31 + ''; 32 + 33 + meta = with lib; { 34 + homepage = "http://www.capstone-engine.org/"; 35 + license = licenses.bsdOriginal; 36 + description = "Python bindings for Capstone disassembly engine"; 37 + maintainers = with maintainers; [ bennofs ris ]; 38 + broken = pythonAtLeast "3.12"; # uses distutils 39 + }; 40 + }
+3 -1
pkgs/development/python-modules/capstone/default.nix
··· 17 17 src = capstone.src; 18 18 sourceRoot = "${src.name}/bindings/python"; 19 19 20 + # libcapstone.a is not built with BUILD_SHARED_LIBS. For some reason setup.py 21 + # checks if it exists but it is not really needed. Most likely a bug in setup.py. 20 22 postPatch = '' 21 23 ln -s ${capstone}/lib/libcapstone${stdenv.targetPlatform.extensions.sharedLibrary} prebuilt/ 22 - ln -s ${capstone}/lib/libcapstone.a prebuilt/ 24 + touch prebuilt/libcapstone${stdenv.targetPlatform.extensions.staticLibrary} 23 25 substituteInPlace setup.py --replace manylinux1 manylinux2014 24 26 ''; 25 27
+2 -2
pkgs/development/python-modules/pyocd/default.nix
··· 2 2 , buildPythonPackage 3 3 , fetchPypi 4 4 , fetchpatch 5 - , capstone 5 + , capstone_4 6 6 , cmsis-pack-manager 7 7 , colorama 8 8 , importlib-metadata ··· 54 54 ]; 55 55 56 56 propagatedBuildInputs = [ 57 - capstone 57 + capstone_4 58 58 cmsis-pack-manager 59 59 colorama 60 60 importlib-metadata
+2 -2
pkgs/development/tools/misc/edb/default.nix
··· 1 - { lib, mkDerivation, fetchFromGitHub, cmake, pkg-config, boost, capstone 1 + { lib, mkDerivation, fetchFromGitHub, cmake, pkg-config, boost, capstone_4 2 2 , double-conversion, graphviz, qtxmlpatterns }: 3 3 4 4 mkDerivation rec { ··· 15 15 16 16 nativeBuildInputs = [ cmake pkg-config ]; 17 17 18 - buildInputs = [ boost.dev capstone double-conversion graphviz qtxmlpatterns ]; 18 + buildInputs = [ boost.dev capstone_4 double-conversion graphviz qtxmlpatterns ]; 19 19 20 20 postPatch = '' 21 21 # Remove CMAKE_INSTALL_PREFIX from DEFAULT_PLUGIN_PATH otherwise the nix store path will appear twice.
+1
pkgs/top-level/all-packages.nix
··· 4553 4553 candle = libsForQt5.callPackage ../applications/misc/candle { }; 4554 4554 4555 4555 capstone = callPackage ../development/libraries/capstone { }; 4556 + capstone_4 = callPackage ../development/libraries/capstone/4.nix { }; 4556 4557 4557 4558 keystone = callPackage ../development/libraries/keystone { }; 4558 4559
+3
pkgs/top-level/python-packages.nix
··· 1887 1887 capstone = callPackage ../development/python-modules/capstone { 1888 1888 inherit (pkgs) capstone; 1889 1889 }; 1890 + capstone_4 = callPackage ../development/python-modules/capstone/4.nix { 1891 + inherit (pkgs) capstone_4; 1892 + }; 1890 1893 1891 1894 captcha = callPackage ../development/python-modules/captcha { }; 1892 1895