mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-11-18 02:05:51 +03:00
pythonPackages.scapy: Add optional dependencies
This commit is contained in:
parent
25f4a12bc4
commit
f9291887af
@ -1,6 +1,13 @@
|
||||
{ stdenv, lib, buildPythonPackage, fetchFromGitHub, isPyPy, isPy3k, pythonOlder
|
||||
, matplotlib, pycrypto, ecdsa
|
||||
{ buildPythonPackage, fetchFromGitHub, lib, isPyPy, isPy3k, pythonOlder
|
||||
, pycrypto, ecdsa # TODO
|
||||
, enum34, mock
|
||||
, withOptionalDeps ? true, tcpdump, ipython
|
||||
, withCryptography ? true, cryptography
|
||||
, withVoipSupport ? true, sox
|
||||
, withPlottingSupport ? true, matplotlib
|
||||
, withGraphicsSupport ? false, pyx, texlive, graphviz, imagemagick
|
||||
# 2D/3D graphics and graphs TODO: VPython
|
||||
# TODO: nmap, numpy
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
@ -19,15 +26,19 @@ buildPythonPackage rec {
|
||||
# TODO: Temporary workaround
|
||||
patches = [ ./fix-version-1.patch ./fix-version-2.patch ];
|
||||
|
||||
propagatedBuildInputs =
|
||||
[ matplotlib pycrypto ecdsa ]
|
||||
propagatedBuildInputs = [ pycrypto ecdsa ]
|
||||
++ lib.optional withOptionalDeps [ tcpdump ipython ]
|
||||
++ lib.optional withCryptography [ cryptography ]
|
||||
++ lib.optional withVoipSupport [ sox ]
|
||||
++ lib.optional withPlottingSupport [ matplotlib ]
|
||||
++ lib.optional withGraphicsSupport [ pyx texlive.combined.scheme-minimal graphviz imagemagick ]
|
||||
++ lib.optional (isPy3k && pythonOlder "3.4") [ enum34 ]
|
||||
++ lib.optional doCheck [ mock ];
|
||||
|
||||
# Tests fail with Python 3.6 (seems to be an upstream bug, I'll investigate)
|
||||
doCheck = if isPy3k then false else true;
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
meta = with lib; {
|
||||
description = "Powerful interactive network packet manipulation program";
|
||||
homepage = https://scapy.net/;
|
||||
license = licenses.gpl2;
|
||||
|
Loading…
Reference in New Issue
Block a user