python3Packages.binwalk: fix build on darwin

This commit is contained in:
Pavol Rusnak 2021-02-06 15:00:36 +01:00
parent 671fd3a3c1
commit dfb4af02a1
No known key found for this signature in database
GPG Key ID: 91F3B339B9A02A3D

View File

@ -1,6 +1,7 @@
{ lib { lib
, buildPythonPackage , buildPythonPackage
, fetchFromGitHub , fetchFromGitHub
, stdenv
, zlib , zlib
, xz , xz
, ncompress , ncompress
@ -20,22 +21,20 @@
, pyqtgraph , pyqtgraph
, visualizationSupport ? false }: , visualizationSupport ? false }:
let buildPythonPackage rec {
version = "2.2.0";
in
buildPythonPackage {
pname = "binwalk"; pname = "binwalk";
inherit version; version = "2.2.0";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "devttys0"; owner = "ReFirmLabs";
repo = "binwalk"; repo = "binwalk";
rev = "be738a52e09b0da2a6e21470e0dbcd5beb42ed1b"; rev = "v${version}";
sha256 = "1bxgj569fzwv6jhcbl864nmlsi9x1k1r20aywjxc8b9b1zgqrlvc"; sha256 = "1bxgj569fzwv6jhcbl864nmlsi9x1k1r20aywjxc8b9b1zgqrlvc";
}; };
propagatedBuildInputs = [ zlib xz ncompress gzip bzip2 gnutar p7zip cabextract cramfsswap cramfsprogs sasquatch squashfsTools lzma pycrypto ] propagatedBuildInputs = [ zlib xz ncompress gzip bzip2 gnutar p7zip cabextract squashfsTools lzma pycrypto ]
++ lib.optionals visualizationSupport [ matplotlib pyqtgraph ]; ++ lib.optionals visualizationSupport [ matplotlib pyqtgraph ]
++ lib.optionals (!stdenv.isDarwin) [ cramfsprogs cramfsswap sasquatch ];
# setup.py only installs version.py during install, not test # setup.py only installs version.py during install, not test
postPatch = '' postPatch = ''
@ -49,6 +48,8 @@ buildPythonPackage {
checkInputs = [ nose ]; checkInputs = [ nose ];
pythonImportsCheck = [ "binwalk" ];
meta = with lib; { meta = with lib; {
homepage = "https://github.com/ReFirmLabs/binwalk"; homepage = "https://github.com/ReFirmLabs/binwalk";
description = "A tool for searching a given binary image for embedded files"; description = "A tool for searching a given binary image for embedded files";