binwalk: 2.4.3 -> 3.1.0 (#357991)

This commit is contained in:
Sandro 2024-11-26 21:50:34 +01:00 committed by GitHub
commit cbe4fa7a64
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
7 changed files with 1449 additions and 94 deletions

View File

@ -22,6 +22,9 @@
<!-- To avoid merge conflicts, consider adding your item at an arbitrary place in the list instead. -->
- `binwalk` was updated to 3.1.0, which has been rewritten in rust. The python module is no longer available.
See the release notes of [3.1.0](https://github.com/ReFirmLabs/binwalk/releases/tag/v3.1.0) for more information.
- `buildGoPackage` has been removed. Use `buildGoModule` instead. See the [Go section in the nixpkgs manual](https://nixos.org/manual/nixpkgs/unstable/#sec-language-go) for details.
- `timescaledb` requires manual upgrade steps.

1394
pkgs/by-name/bi/binwalk/Cargo.lock generated Normal file

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,50 @@
{
lib,
rustPlatform,
fetchFromGitHub,
pkg-config,
fontconfig,
bzip2,
}:
rustPlatform.buildRustPackage rec {
pname = "binwalk";
version = "3.1.0";
src = fetchFromGitHub {
owner = "ReFirmLabs";
repo = "binwalk";
rev = "refs/tags/v${version}";
hash = "sha256-em+jOnhCZH5EEJrhXTHmxiwpMcBr5oNU1+5IJ1H/oco=";
};
cargoLock = {
lockFile = ./Cargo.lock;
};
nativeBuildInputs = [ pkg-config ];
buildInputs = [
fontconfig
bzip2
];
# skip broken tests
checkFlags = [
"--skip=binwalk::Binwalk"
"--skip=binwalk::Binwalk::analyze"
"--skip=binwalk::Binwalk::extract"
"--skip=binwalk::Binwalk::scan"
];
meta = {
description = "Firmware Analysis Tool";
homepage = "https://github.com/ReFirmLabs/binwalk";
changelog = "https://github.com/ReFirmLabs/binwalk/releases/tag/${src.rev}";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [
koral
felbinger
];
};
}

View File

@ -1,87 +0,0 @@
{
lib,
buildPythonPackage,
fetchFromGitHub,
stdenv,
zlib,
xz,
gzip,
bzip2,
gnutar,
p7zip,
cabextract,
cramfsprogs,
cramfsswap,
sasquatch,
setuptools,
squashfsTools,
matplotlib,
pycrypto,
pyqtgraph,
pyqt5,
pytestCheckHook,
yaffshiv,
visualizationSupport ? false,
}:
buildPythonPackage rec {
pname = "binwalk${lib.optionalString visualizationSupport "-full"}";
version = "2.4.3";
pyproject = true;
src = fetchFromGitHub {
owner = "OSPG";
repo = "binwalk";
rev = "refs/tags/v${version}";
hash = "sha256-kabibUMh5HyAJCXOyZo3QSNIVz8fER4Xivuv9E3CfEE=";
};
build-system = [ setuptools ];
propagatedBuildInputs =
[
zlib
xz
gzip
bzip2
gnutar
p7zip
cabextract
squashfsTools
xz
pycrypto
yaffshiv
]
++ lib.optionals visualizationSupport [
matplotlib
pyqtgraph
pyqt5
]
++ lib.optionals (!stdenv.hostPlatform.isDarwin) [
cramfsprogs
cramfsswap
sasquatch
];
# setup.py only installs version.py during install, not test
postPatch = ''
echo '__version__ = "${version}"' > src/binwalk/core/version.py
'';
# binwalk wants to access ~/.config/binwalk/magic
preCheck = ''
HOME=$(mktemp -d)
'';
nativeCheckInputs = [ pytestCheckHook ];
pythonImportsCheck = [ "binwalk" ];
meta = with lib; {
homepage = "https://github.com/OSPG/binwalk";
description = "Tool for searching a given binary image for embedded files";
mainProgram = "binwalk";
maintainers = [ maintainers.koral ];
license = licenses.mit;
};
}

View File

@ -72,6 +72,7 @@
xz,
zip,
zstd,
binwalk,
# updater only
writeScript,
}:
@ -235,10 +236,10 @@ python.pkgs.buildPythonApplication rec {
ubootTools
wabt
xmlbeans
binwalk
]
++ (with python.pkgs; [
androguard
binwalk
guestfs
h5py
pdfminer-six

View File

@ -2033,8 +2033,6 @@ with pkgs;
biliass = with python3.pkgs; toPythonApplication biliass;
binwalk = with python3Packages; toPythonApplication binwalk;
birdtray = libsForQt5.callPackage ../applications/misc/birdtray { };
charles = charles4;

View File

@ -1635,10 +1635,6 @@ self: super: with self; {
binho-host-adapter = callPackage ../development/python-modules/binho-host-adapter { };
binwalk = callPackage ../development/python-modules/binwalk { };
binwalk-full = self.binwalk.override { visualizationSupport = true; };
biom-format = callPackage ../development/python-modules/biom-format { };
biopandas = callPackage ../development/python-modules/biopandas { };