about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/python-modules/binwalk/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/development/python-modules/binwalk/default.nix')
-rw-r--r--nixpkgs/pkgs/development/python-modules/binwalk/default.nix25
1 files changed, 13 insertions, 12 deletions
diff --git a/nixpkgs/pkgs/development/python-modules/binwalk/default.nix b/nixpkgs/pkgs/development/python-modules/binwalk/default.nix
index c2f059dd93dc..b9120d412cb0 100644
--- a/nixpkgs/pkgs/development/python-modules/binwalk/default.nix
+++ b/nixpkgs/pkgs/development/python-modules/binwalk/default.nix
@@ -1,6 +1,7 @@
-{ lib, stdenv
+{ lib
 , buildPythonPackage
 , fetchFromGitHub
+, stdenv
 , zlib
 , xz
 , ncompress
@@ -17,25 +18,23 @@
 , matplotlib
 , nose
 , pycrypto
-, pyqtgraph ? null }:
+, pyqtgraph
+, visualizationSupport ? false }:
 
-let
-  visualizationSupport = (pyqtgraph != null) && (matplotlib != null);
-  version = "2.2.0";
-in
-buildPythonPackage {
+buildPythonPackage rec {
   pname = "binwalk";
-  inherit version;
+  version = "2.2.0";
 
   src = fetchFromGitHub {
-    owner = "devttys0";
+    owner = "ReFirmLabs";
     repo = "binwalk";
-    rev = "be738a52e09b0da2a6e21470e0dbcd5beb42ed1b";
+    rev = "v${version}";
     sha256 = "1bxgj569fzwv6jhcbl864nmlsi9x1k1r20aywjxc8b9b1zgqrlvc";
   };
 
-  propagatedBuildInputs = [ zlib xz ncompress gzip bzip2 gnutar p7zip cabextract cramfsswap cramfsprogs sasquatch squashfsTools lzma pycrypto ]
-  ++ lib.optionals visualizationSupport [ matplotlib pyqtgraph ];
+  propagatedBuildInputs = [ zlib xz ncompress gzip bzip2 gnutar p7zip cabextract squashfsTools lzma pycrypto ]
+  ++ lib.optionals visualizationSupport [ matplotlib pyqtgraph ]
+  ++ lib.optionals (!stdenv.isDarwin) [ cramfsprogs cramfsswap sasquatch ];
 
   # setup.py only installs version.py during install, not test
   postPatch = ''
@@ -49,6 +48,8 @@ buildPythonPackage {
 
   checkInputs = [ nose ];
 
+  pythonImportsCheck = [ "binwalk" ];
+
   meta = with lib; {
     homepage = "https://github.com/ReFirmLabs/binwalk";
     description = "A tool for searching a given binary image for embedded files";