pythonPackages.scapy: 2.4.2 -> 2.4.3

This commit is contained in:
Michael Weiss 2019-08-07 13:48:26 +02:00
parent d94667d50d
commit 63fa75e34c
No known key found for this signature in database
GPG Key ID: 5BE487C4D4771D83
2 changed files with 13 additions and 27 deletions

View File

@ -13,7 +13,7 @@
buildPythonPackage rec {
pname = "scapy";
version = "2.4.2";
version = "2.4.3";
disabled = isPyPy;
@ -21,15 +21,14 @@ buildPythonPackage rec {
owner = "secdev";
repo = "scapy";
rev = "v${version}";
sha256 = "03xzjklvc6y4d87k0rqpx5h112ld5nvgfldrbd8c4mx6f9mmd11n";
sha256 = "08ypdzp0p3gvmz3pwi0i9q5f7hz9cq8yn6gawia49ynallwnv4zy";
};
# TODO: Temporary workaround
patches = [ ./fix-version.patch ];
postPatch = ''
sed -i "s/NIXPKGS_SCAPY_VERSION/${version}/" \
setup.py scapy/__init__.py
sed -i "s/NIXPKGS_SCAPY_VERSION/${version}/" scapy/__init__.py
'' + lib.optionalString withManufDb ''
substituteInPlace scapy/data.py --replace "/opt/wireshark" "${wireshark}"
'';

View File

@ -1,26 +1,13 @@
--- a/setup.py 2018-02-15 22:14:08.531591678 +0100
+++ b/setup.py 2018-03-27 17:15:38.617315539 +0200
@@ -47,7 +47,7 @@
diff --git a/scapy/__init__.py b/scapy/__init__.py
index d5ad6164..245ce2fb 100644
--- a/scapy/__init__.py
+++ b/scapy/__init__.py
@@ -90,7 +90,7 @@ def _version():
return 'unknown.version'
setup(
name='scapy',
- version=__import__('scapy').VERSION,
+ version='NIXPKGS_SCAPY_VERSION',
packages=[
'scapy',
'scapy/arch',
--- a/scapy/__init__.py 2018-03-27 17:38:52.706481269 +0200
+++ b/scapy/__init__.py 2018-03-27 17:39:56.576688890 +0200
@@ -82,9 +82,10 @@
if match:
return "git-archive.dev" + match.group(1)
elif sha1:
- return "git-archive.dev" + sha1
+ return 'NIXPKGS_SCAPY_VERSION'
else:
- return 'unknown.version'
+ return 'NIXPKGS_SCAPY_VERSION'
+
VERSION = _version()
-VERSION = __version__ = _version()
+VERSION = __version__ = "NIXPKGS_SCAPY_VERSION"
VERSION_MAIN = re.search(r"[0-9.]+", VERSION).group()
if __name__ == "__main__":