git.iko.soy/typeable/nixpkgs
on master help sign in
pythonPackages.scapy: Add support for the manuf database from Wireshark

This file contains "Ethernet vendor codes, and well-known MAC addresses".

commit90b27d020b962567da659689fae28aa45cca1557 authorMichael Weiss <dev.primeos@gmail.com> dateTue 7 Aug 2018, 19:10 (8 years ago) parentf929188
1 file changed+5
pkgs/development/python-modules/scapy/default.nix+5
pkgs/development/python-modules/scapy/default.nix+5
@@ -6,6 +6,7 @@
66, withVoipSupport ? true, sox
77, withPlottingSupport ? true, matplotlib
88, withGraphicsSupport ? false, pyx, texlive, graphviz, imagemagick
9+, withManufDb ? false, wireshark
910# 2D/3D graphics and graphs TODO: VPython
1011# TODO: nmap, numpy
1112}:
@@ -26,6 +27,10 @@ buildPythonPackage rec {
2627 # TODO: Temporary workaround
2728 patches = [ ./fix-version-1.patch ./fix-version-2.patch ];
2829
30+ postPatch = lib.optionalString withManufDb ''
31+ substituteInPlace scapy/data.py --replace "/opt/wireshark" "${wireshark}"
32+ '';
33+
2934 propagatedBuildInputs = [ pycrypto ecdsa ]
3035 ++ lib.optional withOptionalDeps [ tcpdump ipython ]
3136 ++ lib.optional withCryptography [ cryptography ]