git.iko.soy/typeable/nixpkgs
on master help sign in
pythonPackages.scapy: 2.3.3 -> 2.4.0
commitfb1f35424e7dc10d83830ec7a1177f413e7e622c authorMichael Weiss <dev.primeos@gmail.com> dateTue 27 Mar 2018, 18:26 (9 years ago) parentc91c503
3 files changed+28−18
pkgs/development/python-modules/scapy/default.nix+14−8 pkgs/development/python-modules/scapy/fix-version-1.patch+2−2 pkgs/development/python-modules/scapy/fix-version-2.patch+12−8
pkgs/development/python-modules/scapy/default.nix+14−8
@@ -1,30 +1,36 @@
1−{ stdenv, buildPythonPackage, fetchFromGitHub, isPy3k, isPyPy
1+{ stdenv, lib, buildPythonPackage, fetchFromGitHub, isPyPy, isPy3k, pythonOlder
22, matplotlib, pycrypto, ecdsa
3−# Python3: pyx
3+, enum34, mock
44}:
55
66buildPythonPackage rec {
77 pname = "scapy";
8− version = "2.3.3";
8+ version = "2.4.0";
99 name = pname + "-" + version;
1010
11− disabled = isPy3k || isPyPy;
11+ disabled = isPyPy;
1212
1313 src = fetchFromGitHub {
1414 owner = "secdev";
1515 repo = "scapy";
1616 rev = "v${version}";
17− sha256 = "1c22407vhksnhc0rwrslnp9zy05qmk2zmdm2imm3iw7g6kx7gak1";
17+ sha256 = "0dw6kl1qi9bf3rbm79gb1h40ms8y0b5dbmpip841p2905d5r2isj";
1818 };
1919
20− # Temporary workaround, only needed for 2.3.3
20+ # TODO: Temporary workaround
2121 patches = [ ./fix-version-1.patch ./fix-version-2.patch ];
2222
23− propagatedBuildInputs = [ matplotlib pycrypto ecdsa ];
23+ propagatedBuildInputs =
24+ [ matplotlib pycrypto ecdsa ]
25+ ++ lib.optional (isPy3k && pythonOlder "3.4") [ enum34 ]
26+ ++ lib.optional doCheck [ mock ];
27+
28+ # Tests fail with Python 3.6 (seems to be an upstream bug, I'll investigate)
29+ doCheck = if isPy3k then false else true;
2430
2531 meta = with stdenv.lib; {
2632 description = "Powerful interactive network packet manipulation program";
27− homepage = http://www.secdev.org/projects/scapy/;
33+ homepage = https://scapy.net/;
2834 license = licenses.gpl2;
2935 platforms = platforms.linux;
3036 maintainers = with maintainers; [ primeos bjornfor ];
pkgs/development/python-modules/scapy/fix-version-1.patch+2−2
@@ -1,11 +1,11 @@
11--- a/setup.py 2018-02-15 22:14:08.531591678 +0100
2−+++ b/setup.py 2018-02-15 22:14:57.947703737 +0100
2++++ b/setup.py 2018-03-27 17:15:38.617315539 +0200
33@@ -47,7 +47,7 @@
44
55 setup(
66 name='scapy',
77- version=__import__('scapy').VERSION,
8−+ version='2.3.3',
8++ version='2.4.0',
99 packages=[
1010 'scapy',
1111 'scapy/arch',
pkgs/development/python-modules/scapy/fix-version-2.patch+12−8
@@ -1,11 +1,15 @@
1−--- a/scapy/__init__.py 2017-12-29 18:57:35.315472160 +0100
2−+++ b/scapy/__init__.py 2018-02-15 22:36:43.102132489 +0100
3−@@ -73,7 +73,7 @@
4− tag = f.read()
5− return tag
6− except:
7−- return 'unknown.version'
8−+ return '2.3.3'
1+--- a/scapy/__init__.py 2018-03-27 17:38:52.706481269 +0200
2++++ b/scapy/__init__.py 2018-03-27 17:39:56.576688890 +0200
3+@@ -82,9 +82,10 @@
4+ if match:
5+ return "git-archive.dev" + match.group(1)
6+ elif sha1:
7+- return "git-archive.dev" + sha1
8++ return '2.4.0'
9+ else:
10+- return 'unknown.version'
11++ return '2.4.0'
12++
913
1014 VERSION = _version()
1115