From fcc747ffa0afc8699ecfe51b16ba39a98a2e542d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=BCtz?= Date: Sun, 15 Jul 2018 01:14:36 +0200 Subject: [PATCH 1/2] python.pkgs.backports_ssl_match_hostname: move expression --- .../backports_ssl_match_hostname/default.nix | 17 +++++++++++++++++ pkgs/top-level/python-packages.nix | 16 ++-------------- 2 files changed, 19 insertions(+), 14 deletions(-) create mode 100644 pkgs/development/python-modules/backports_ssl_match_hostname/default.nix diff --git a/pkgs/development/python-modules/backports_ssl_match_hostname/default.nix b/pkgs/development/python-modules/backports_ssl_match_hostname/default.nix new file mode 100644 index 000000000000..1dbca3943a9a --- /dev/null +++ b/pkgs/development/python-modules/backports_ssl_match_hostname/default.nix @@ -0,0 +1,17 @@ +{ lib, buildPythonPackage, fetchPypi }: + +buildPythonPackage rec { + pname = "backports.ssl_match_hostname"; + version = "3.5.0.1"; + + src = fetchPypi { + inherit pname version; + sha256 = "1wndipik52cyqy0677zdgp90i435pmvwd89cz98lm7ri0y3xjajh"; + }; + + meta = with lib; { + description = "The Secure Sockets layer is only actually *secure*"; + homepage = https://bitbucket.org/brandon/backports.ssl_match_hostname; + license = licenses.psfl; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index b292bef4f163..0f97de7347f9 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -955,20 +955,8 @@ in { }; }; - backports_ssl_match_hostname = if !(pythonOlder "3.5") then null else self.buildPythonPackage rec { - name = "backports.ssl_match_hostname-${version}"; - version = "3.5.0.1"; - - src = pkgs.fetchurl { - url = "mirror://pypi/b/backports.ssl_match_hostname/${name}.tar.gz"; - sha256 = "1wndipik52cyqy0677zdgp90i435pmvwd89cz98lm7ri0y3xjajh"; - }; - - meta = { - description = "The Secure Sockets layer is only actually *secure*"; - homepage = https://bitbucket.org/brandon/backports.ssl_match_hostname; - }; - }; + backports_ssl_match_hostname = if !(pythonOlder "3.5") then null else + callPackage ../development/python-modules/backports_ssl_match_hostname { }; backports_lzma = callPackage ../development/python-modules/backports_lzma { }; From 18ecdd1e7e20ceba84c28ae6bc9b77e0a2ffd76e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=BCtz?= Date: Sun, 15 Jul 2018 01:19:03 +0200 Subject: [PATCH 2/2] python.pkgs.backports_ssl_match_hostname_3_4_0_2: remove --- pkgs/applications/misc/octoprint/default.nix | 8 +++++++- pkgs/top-level/python-packages.nix | 14 -------------- 2 files changed, 7 insertions(+), 15 deletions(-) diff --git a/pkgs/applications/misc/octoprint/default.nix b/pkgs/applications/misc/octoprint/default.nix index 6b057186eaf3..b3a32d30c39c 100644 --- a/pkgs/applications/misc/octoprint/default.nix +++ b/pkgs/applications/misc/octoprint/default.nix @@ -4,7 +4,13 @@ let pythonPackages = python2.pkgs.override { overrides = self: super: with self; { - backports_ssl_match_hostname = self.backports_ssl_match_hostname_3_4_0_2; + backports_ssl_match_hostname = super.backports_ssl_match_hostname.overridePythonAttrs (oldAttrs: rec { + version = "3.4.0.2"; + src = oldAttrs.src.override { + inherit version; + sha256 = "07410e7fb09aab7bdaf5e618de66c3dac84e2e3d628352814dc4c37de321d6ae"; + }; + }); flask = super.flask.overridePythonAttrs (oldAttrs: rec { version = "0.12.4"; diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 0f97de7347f9..0338ca81d65d 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -941,20 +941,6 @@ in { backports_shutil_get_terminal_size = callPackage ../development/python-modules/backports_shutil_get_terminal_size { }; - backports_ssl_match_hostname_3_4_0_2 = if !(pythonOlder "3.5") then null else self.buildPythonPackage rec { - name = "backports.ssl_match_hostname-3.4.0.2"; - - src = pkgs.fetchurl { - url = "mirror://pypi/b/backports.ssl_match_hostname/backports.ssl_match_hostname-3.4.0.2.tar.gz"; - sha256 = "07410e7fb09aab7bdaf5e618de66c3dac84e2e3d628352814dc4c37de321d6ae"; - }; - - meta = { - description = "The Secure Sockets layer is only actually *secure*"; - homepage = https://bitbucket.org/brandon/backports.ssl_match_hostname; - }; - }; - backports_ssl_match_hostname = if !(pythonOlder "3.5") then null else callPackage ../development/python-modules/backports_ssl_match_hostname { };