From 63fa75e34c12a296f2468e533407bca7c726b034 Mon Sep 17 00:00:00 2001 From: Michael Weiss Date: Wed, 7 Aug 2019 13:48:26 +0200 Subject: [PATCH] pythonPackages.scapy: 2.4.2 -> 2.4.3 --- .../python-modules/scapy/default.nix | 7 ++-- .../python-modules/scapy/fix-version.patch | 33 ++++++------------- 2 files changed, 13 insertions(+), 27 deletions(-) diff --git a/pkgs/development/python-modules/scapy/default.nix b/pkgs/development/python-modules/scapy/default.nix index 7ca3fc0f94be..8f51b1eda212 100644 --- a/pkgs/development/python-modules/scapy/default.nix +++ b/pkgs/development/python-modules/scapy/default.nix @@ -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}" ''; diff --git a/pkgs/development/python-modules/scapy/fix-version.patch b/pkgs/development/python-modules/scapy/fix-version.patch index 7ecb16c3b7c7..c39458e9feac 100644 --- a/pkgs/development/python-modules/scapy/fix-version.patch +++ b/pkgs/development/python-modules/scapy/fix-version.patch @@ -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__":