21 , visualizationSupport ? false }:
23 buildPythonPackage rec {
24 pname = "binwalk${lib.optionalString visualizationSupport "-full"}";
27 src = fetchFromGitHub {
31 sha256 = "0phqyqv34vhh80dgipiggs4n3iq2vfjk9ywx2c5d8g61vzgbd2g8";
35 # test_firmware_zip fails with 2.3.3 upgrade
36 # https://github.com/ReFirmLabs/binwalk/issues/566
38 url = "https://github.com/ReFirmLabs/binwalk/commit/dd4f2efd275c9dd1001130e82e0f985110cd2754.patch";
39 sha256 = "1707n4nf1d1ay1yn4i8qlrvj2c1120g88hjwyklpsc2s2dcnqj9r";
41 "testing/tests/test_firmware_zip.py"
47 propagatedBuildInputs = [ zlib xz gzip bzip2 gnutar p7zip cabextract squashfsTools xz pycrypto ]
48 ++ lib.optionals visualizationSupport [ matplotlib pyqtgraph ]
49 ++ lib.optionals (!stdenv.isDarwin) [ cramfsprogs cramfsswap sasquatch ];
51 # setup.py only installs version.py during install, not test
53 echo '__version__ = "${version}"' > src/binwalk/core/version.py
56 # binwalk wants to access ~/.config/binwalk/magic
61 checkInputs = [ nose ];
63 pythonImportsCheck = [ "binwalk" ];
66 homepage = "https://github.com/ReFirmLabs/binwalk";
67 description = "A tool for searching a given binary image for embedded files";
68 maintainers = [ maintainers.koral ];
69 license = licenses.mit;