pythonPackages.binwalk: refactor move to python-modules

This commit is contained in:
Chris Ostrouchov 2018-10-15 11:47:16 -04:00 committed by Frederik Rietdijk
parent 9d00ad43f5
commit b14225b37b
2 changed files with 41 additions and 26 deletions

View File

@ -0,0 +1,37 @@
{ stdenv
, buildPythonPackage
, fetchFromGitHub
, zlib
, xz
, ncompress
, gzip
, bzip2
, gnutar
, p7zip
, cabextract
, lzma
, pycrypto
, pyqtgraph ? null }:
let visualizationSupport = (pyqtgraph != null);
in
buildPythonPackage rec {
name = "binwalk-${version}";
version = "2.1.1";
src = fetchFromGitHub {
owner = "devttys0";
repo = "binwalk";
rev = "291a03595d17f848c73b74cb6ca508da782cd8f7";
sha256 = "0grid93yz6i6jb2zggrqncp5awdf7qi88j5y2k7dq0k9r6b8zydw";
};
propagatedBuildInputs = [ zlib xz ncompress gzip bzip2 gnutar p7zip cabextract lzma pycrypto ]
++ stdenv.lib.optional visualizationSupport pyqtgraph;
meta = with stdenv.lib; {
homepage = "http://binwalk.org";
description = "A tool for searching a given binary image for embedded files";
maintainers = [ maintainers.koral ];
};
}

View File

@ -1035,33 +1035,11 @@ in {
bibtexparser = callPackage ../development/python-modules/bibtexparser { };
binwalk_fun = { visualizationSupport ? false, pyqtgraph ? null }:
assert visualizationSupport -> pyqtgraph != null;
binwalk = callPackage ../development/python-modules/binwalk { };
buildPythonPackage rec {
name = "binwalk-${version}";
version = "2.1.1";
src = pkgs.fetchFromGitHub {
owner = "devttys0";
repo = "binwalk";
rev = "291a03595d17f848c73b74cb6ca508da782cd8f7";
sha256 = "0grid93yz6i6jb2zggrqncp5awdf7qi88j5y2k7dq0k9r6b8zydw";
};
propagatedBuildInputs = with stdenv.lib; with pkgs; [ zlib xz ncompress gzip bzip2 gnutar p7zip cabextract lzma self.pycrypto ]
++ optional visualizationSupport pyqtgraph;
meta = with stdenv.lib; {
homepage = "http://binwalk.org";
description = "A tool for searching a given binary image for embedded files";
platforms = platforms.all;
maintainers = [ maintainers.koral ];
};
};
binwalk = self.binwalk_fun { };
binwalk-full = self.binwalk_fun { visualizationSupport = true; pyqtgraph = self.pyqtgraph; };
binwalk-full = appendToName "full" (self.binwalk.override {
pyqtgraph = self.pyqtgraph;
});
bitmath = callPackage ../development/python-modules/bitmath { };