21 , visualizationSupport ? false }:
23 buildPythonPackage rec {
24 pname = "binwalk${lib.optionalString visualizationSupport "-full"}";
26 format = "setuptools";
28 src = fetchFromGitHub {
32 hash = "sha256-hlPbzqGRSXcIqlI+SNKq37CnnHd1IoMBNSjhyeAM1TE=";
36 # test_firmware_zip fails with 2.3.3 upgrade
37 # https://github.com/ReFirmLabs/binwalk/issues/566
39 url = "https://github.com/ReFirmLabs/binwalk/commit/dd4f2efd275c9dd1001130e82e0f985110cd2754.patch";
40 sha256 = "1707n4nf1d1ay1yn4i8qlrvj2c1120g88hjwyklpsc2s2dcnqj9r";
42 "testing/tests/test_firmware_zip.py"
48 propagatedBuildInputs = [ zlib xz gzip bzip2 gnutar p7zip cabextract squashfsTools xz pycrypto ]
49 ++ lib.optionals visualizationSupport [ matplotlib pyqtgraph ]
50 ++ lib.optionals (!stdenv.isDarwin) [ cramfsprogs cramfsswap sasquatch ];
52 # setup.py only installs version.py during install, not test
54 echo '__version__ = "${version}"' > src/binwalk/core/version.py
57 # binwalk wants to access ~/.config/binwalk/magic
62 nativeCheckInputs = [ nose ];
64 pythonImportsCheck = [ "binwalk" ];
67 homepage = "https://github.com/ReFirmLabs/binwalk";
68 description = "A tool for searching a given binary image for embedded files";
69 mainProgram = "binwalk";
70 maintainers = [ maintainers.koral ];
71 license = licenses.mit;