From ce019e775fd412d1522d3f0b232766ab1bd8dd7d Mon Sep 17 00:00:00 2001 From: Michael Weiss Date: Sat, 23 Feb 2019 17:32:05 +0100 Subject: gns3-server: Switch to Python 3.7 This will finally make the builds reproducible. Python 3.6 stored timestamps in the .pyc files but Python 3.7 implements PEP 552 [0]. [0]: https://www.python.org/dev/peps/pep-0552/ --- pkgs/applications/networking/gns3/server.nix | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'pkgs/applications/networking') diff --git a/pkgs/applications/networking/gns3/server.nix b/pkgs/applications/networking/gns3/server.nix index 8daa5d166c52..8207c2cecfa4 100644 --- a/pkgs/applications/networking/gns3/server.nix +++ b/pkgs/applications/networking/gns3/server.nix @@ -1,9 +1,9 @@ { stable, branch, version, sha256Hash }: -{ stdenv, python36, fetchFromGitHub }: +{ stdenv, python3, fetchFromGitHub, fetchpatch }: let - python = if stable then python36.override { + python = if stable then python3.override { packageOverrides = self: super: { async-timeout = super.async-timeout.overridePythonAttrs (oldAttrs: rec { version = "2.0.1"; @@ -31,7 +31,7 @@ let ++ stdenv.lib.optional (pythonOlder "3.5") typing; }); }; - } else python36; + } else python3; in python.pkgs.buildPythonPackage { pname = "gns3-server"; @@ -44,9 +44,14 @@ in python.pkgs.buildPythonPackage { sha256 = sha256Hash; }; + postPatch = '' + # "typing" is only required for Python 3.4 and breaks Python 3.7: + sed -iE "s/.*typing.*//" requirements.txt + ''; + propagatedBuildInputs = with python.pkgs; [ aiohttp-cors yarl aiohttp multidict - jinja2 psutil zipstream raven jsonschema typing + jinja2 psutil zipstream raven jsonschema (python.pkgs.callPackage ../../../development/python-modules/prompt_toolkit/1.nix {}) ] ++ stdenv.lib.optional (!stable) python.pkgs.distro; -- cgit 1.4.1