diff options
author | Michael Weiss <dev.primeos@gmail.com> | 2019-02-23 17:32:05 +0100 |
---|---|---|
committer | Michael Weiss <dev.primeos@gmail.com> | 2019-02-23 17:38:39 +0100 |
commit | ce019e775fd412d1522d3f0b232766ab1bd8dd7d (patch) | |
tree | 1184ea71646a8431f1a9b1526cc2a6b2cfba90c3 /pkgs/applications/networking/gns3 | |
parent | c193b9c158022eb74adc91e01ffc8b26e05139d1 (diff) | |
download | nixlib-ce019e775fd412d1522d3f0b232766ab1bd8dd7d.tar nixlib-ce019e775fd412d1522d3f0b232766ab1bd8dd7d.tar.gz nixlib-ce019e775fd412d1522d3f0b232766ab1bd8dd7d.tar.bz2 nixlib-ce019e775fd412d1522d3f0b232766ab1bd8dd7d.tar.lz nixlib-ce019e775fd412d1522d3f0b232766ab1bd8dd7d.tar.xz nixlib-ce019e775fd412d1522d3f0b232766ab1bd8dd7d.tar.zst nixlib-ce019e775fd412d1522d3f0b232766ab1bd8dd7d.zip |
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/
Diffstat (limited to 'pkgs/applications/networking/gns3')
-rw-r--r-- | pkgs/applications/networking/gns3/server.nix | 13 |
1 files changed, 9 insertions, 4 deletions
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; |