Merge pull request #93927 from kristoff3r/pwntools-update

This commit is contained in:
Jörg Thalheim 2020-07-30 05:18:46 +01:00 committed by GitHub
commit 16a63d0207
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 63 additions and 14 deletions

View File

@ -1,17 +1,25 @@
{ stdenv, fetchurl, pkgconfig, python }:
{ stdenv, fetchurl, pkgconfig, python, cmocka, hexdump, writeScriptBin, binutils-unwrapped }:
stdenv.mkDerivation rec {
pname = "unicorn-emulator";
version = "1.0.1";
version = "1.0.2-rc4";
src = fetchurl {
url = "https://github.com/unicorn-engine/unicorn/archive/${version}.tar.gz";
sha256 = "0z01apwmvhvdldm372ww9pjfn45awkw3m90c0h4v0nj0ihmlysis";
sha256 = "05w43jq3r97l3c8ggc745ai8m5l93p1b6q6cfp1zwzz6hl5kifiv";
};
configurePhase = '' patchShebangs make.sh '';
buildPhase = '' ./make.sh '' + stdenv.lib.optionalString stdenv.isDarwin "macos-universal-no";
installPhase = '' env PREFIX=$out ./make.sh install '';
PREFIX = placeholder "out";
MACOS_UNIVERSAL = stdenv.lib.optionalString stdenv.isDarwin "no";
NIX_CFLAGS_COMPILE = "-Wno-error";
doCheck = !stdenv.isDarwin;
checkInputs = [
cmocka
hexdump
python.pkgs.setuptools
];
nativeBuildInputs = [ pkgconfig python ];
enableParallelBuilding = true;

View File

@ -1,19 +1,60 @@
{ stdenv, buildPythonPackage, fetchPypi, isPy3k
, Mako, packaging, pysocks, pygments, ROPGadget
, capstone, paramiko, pip, psutil
, pyelftools, pyserial, dateutil
, requests, tox, unicorn, intervaltree, fetchpatch }:
{ stdenv
, buildPythonPackage
, fetchPypi
, isPy3k
, Mako
, packaging
, pysocks
, pygments
, ROPGadget
, capstone
, paramiko
, pip
, psutil
, pyelftools
, pyserial
, dateutil
, requests
, tox
, unicorn
, intervaltree
, fetchpatch
}:
buildPythonPackage rec {
version = "4.1.1";
version = "4.2.1";
pname = "pwntools";
src = fetchPypi {
inherit pname version;
sha256 = "694ce7a6cfca0ad40eae36c1d2663c44eb953f84785c63daa9752b4dfa7f39d8";
sha256 = "1fh7sq9wrcfvn44qryln9cyg99pilvyq9bp80758lgdd6ss6hdqd";
};
propagatedBuildInputs = [ Mako packaging pysocks pygments ROPGadget capstone paramiko pip psutil pyelftools pyserial dateutil requests tox unicorn intervaltree ];
# Upstream has set an upper bound on unicorn because of https://github.com/Gallopsled/pwntools/issues/1538,
# but since that is a niche use case and it requires extra work to get unicorn 1.0.2rc3 to work we relax
# the bound here. Check if this is still necessary when updating!
postPatch = ''
sed -i 's/unicorn>=1.0.2rc1,<1.0.2rc4/unicorn>=1.0.2rc1/' setup.py
'';
propagatedBuildInputs = [
Mako
packaging
pysocks
pygments
ROPGadget
capstone
paramiko
pip
psutil
pyelftools
pyserial
dateutil
requests
tox
unicorn
intervaltree
];
doCheck = false; # no setuptools tests for the package