mirror of
https://github.com/SebastianWendel/nixpkgs.git
synced 2024-09-26 23:20:18 +02:00
Merge pull request #30226 from geistesk/pypcap-1.1.6
pypcap: init at 1.1.6
This commit is contained in:
commit
959a5b24b5
42
pkgs/development/python-modules/pypcap/default.nix
Normal file
42
pkgs/development/python-modules/pypcap/default.nix
Normal file
|
@ -0,0 +1,42 @@
|
||||||
|
{ stdenv, lib, writeText, buildPythonPackage, fetchPypi, isPy3k, libpcap, dpkt }:
|
||||||
|
|
||||||
|
buildPythonPackage rec {
|
||||||
|
pname = "pypcap";
|
||||||
|
version = "1.1.6";
|
||||||
|
name = "${pname}-${version}";
|
||||||
|
disabled = isPy3k;
|
||||||
|
|
||||||
|
src = fetchPypi {
|
||||||
|
inherit pname version;
|
||||||
|
sha256 = "1cx7qm0w2a91g5z8k3kmlwz0b8dkr0h8dlb64rwgyhp2laa33syi";
|
||||||
|
};
|
||||||
|
|
||||||
|
patches = [
|
||||||
|
# The default setup.py searchs for pcap.h in a static list of default
|
||||||
|
# folders. So we have to add the path to libpcap in the nix-store.
|
||||||
|
(writeText "libpcap-path.patch"
|
||||||
|
''
|
||||||
|
--- a/setup.py
|
||||||
|
+++ b/setup.py
|
||||||
|
@@ -27,7 +27,8 @@ def recursive_search(path, target_files):
|
||||||
|
|
||||||
|
def get_extension():
|
||||||
|
# A list of all the possible search directories
|
||||||
|
- dirs = ['/usr', sys.prefix] + glob.glob('/opt/libpcap*') + \
|
||||||
|
+ dirs = ['${libpcap}', '/usr', sys.prefix] + \
|
||||||
|
+ glob.glob('/opt/libpcap*') + \
|
||||||
|
glob.glob('../libpcap*') + glob.glob('../wpdpack*') + \
|
||||||
|
glob.glob('/Applications/Xcode.app/Contents/Developer/Platforms/' +
|
||||||
|
'MacOSX.platform/Developer/SDKs/*')
|
||||||
|
'')
|
||||||
|
];
|
||||||
|
|
||||||
|
buildInputs = [ libpcap dpkt ];
|
||||||
|
|
||||||
|
meta = {
|
||||||
|
homepage = https://github.com/pynetwork/pypcap;
|
||||||
|
description = "Simplified object-oriented Python wrapper for libpcap";
|
||||||
|
license = lib.licenses.bsd3;
|
||||||
|
maintainers = with lib.maintainers; [ geistesk ];
|
||||||
|
};
|
||||||
|
}
|
|
@ -17596,6 +17596,8 @@ in {
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
pypcap = callPackage ../development/python-modules/pypcap {};
|
||||||
|
|
||||||
pyplatec = buildPythonPackage rec {
|
pyplatec = buildPythonPackage rec {
|
||||||
name = "PyPlatec-${version}";
|
name = "PyPlatec-${version}";
|
||||||
version = "1.4.0";
|
version = "1.4.0";
|
||||||
|
|
Loading…
Reference in a new issue