diff --git a/pkgs/tools/misc/binwalk/default.nix b/pkgs/tools/misc/binwalk/default.nix deleted file mode 100644 index 6e16957aac26..000000000000 --- a/pkgs/tools/misc/binwalk/default.nix +++ /dev/null @@ -1,32 +0,0 @@ -{ stdenv, fetchFromGitHub, python, wrapPython, curses, zlib, xz, ncompress, gzip, bzip2, gnutar, p7zip, cabextract -, pyqtgraph ? null -, visualizationSupport ? false }: - -assert visualizationSupport -> pyqtgraph != null; - -stdenv.mkDerivation rec { - version = "2.0.1"; - name = "binwalk-${version}"; - - src = fetchFromGitHub { - owner = "devttys0"; - repo = "binwalk"; - rev = "v${version}"; - sha256 = "1r5389lk3gk8y4ksrfljyb97l6pwnwvv8g1slbgr20avkzgw8zmn"; - }; - - pythonPath = with stdenv.lib; [ curses ] - ++ optional visualizationSupport [ pyqtgraph ]; - - propagatedBuildInputs = with stdenv.lib; [ python wrapPython curses zlib xz ncompress gzip bzip2 gnutar p7zip cabextract ] - ++ optional visualizationSupport [ pyqtgraph ]; - - postInstall = "wrapPythonPrograms"; - - 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 ]; - }; -} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index de8ccae1f77a..2d998e348f84 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -576,20 +576,6 @@ in bins = callPackage ../tools/graphics/bins { }; - binwalk = callPackage ../tools/misc/binwalk { - python = pythonFull; - wrapPython = pythonPackages.wrapPython; - curses = pythonPackages.curses; - }; - - binwalk-full = callPackage ../tools/misc/binwalk { - python = pythonFull; - wrapPython = pythonPackages.wrapPython; - curses = pythonPackages.curses; - visualizationSupport = true; - pyqtgraph = pythonPackages.pyqtgraph; - }; - bitbucket-cli = pythonPackages.bitbucket-cli; blink = callPackage ../applications/networking/instant-messengers/blink { diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 66604ea3b570..32b8b52b4a51 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -1874,6 +1874,34 @@ in modules // { }; }; + binwalk_fun = { visualizationSupport ? false, pyqtgraph ? null }: + assert visualizationSupport -> pyqtgraph != null; + + 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; [ modules.curses zlib xz ncompress gzip bzip2 gnutar p7zip cabextract lzma 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; }; + caldavclientlibrary-asynk = buildPythonPackage rec { version = "asynkdev"; name = "caldavclientlibrary-asynk-${version}";