From 79d7190c19b89661060102f7f2469b23cc1d46b5 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Fri, 10 Sep 2021 17:53:21 +0200 Subject: [PATCH 1/4] python3Packages.unidecode: 1.2.0 -> 1.3.1 --- pkgs/development/python-modules/unidecode/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/unidecode/default.nix b/pkgs/development/python-modules/unidecode/default.nix index 3ff2e3b981ed..5aeaee9dbf91 100644 --- a/pkgs/development/python-modules/unidecode/default.nix +++ b/pkgs/development/python-modules/unidecode/default.nix @@ -2,11 +2,11 @@ buildPythonPackage rec { pname = "Unidecode"; - version = "1.2.0"; + version = "1.3.1"; src = fetchPypi { inherit pname version; - sha256 = "8d73a97d387a956922344f6b74243c2c6771594659778744b2dbdaad8f6b727d"; + sha256 = "sha256-bvrAkL+PKZcK/JDK9Nquh7FycJt4bLG02i0MBiRDHsw="; }; LC_ALL="en_US.UTF-8"; From c59947fdd16b526b3e7303e86afd30af254e440d Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Fri, 10 Sep 2021 18:04:16 +0200 Subject: [PATCH 2/4] python3Packages.unidecode: enable tests --- .../python-modules/unidecode/default.nix | 27 +++++++++++++------ 1 file changed, 19 insertions(+), 8 deletions(-) diff --git a/pkgs/development/python-modules/unidecode/default.nix b/pkgs/development/python-modules/unidecode/default.nix index 5aeaee9dbf91..694f10ba0875 100644 --- a/pkgs/development/python-modules/unidecode/default.nix +++ b/pkgs/development/python-modules/unidecode/default.nix @@ -1,22 +1,33 @@ -{ lib, buildPythonPackage, fetchPypi, glibcLocales }: +{ lib +, buildPythonPackage +, fetchFromGitHub +, pytestCheckHook +, pythonOlder +}: buildPythonPackage rec { - pname = "Unidecode"; + pname = "unidecode"; version = "1.3.1"; - src = fetchPypi { - inherit pname version; - sha256 = "sha256-bvrAkL+PKZcK/JDK9Nquh7FycJt4bLG02i0MBiRDHsw="; + disabled = pythonOlder "3.5"; + + src = fetchFromGitHub { + owner = "avian2"; + repo = pname; + rev = "${pname}-${version}"; + sha256 = "07789mrq0gjxrg1b9a3ypzzfww224sbj25wl0h9nik22sjwi8qhh"; }; - LC_ALL="en_US.UTF-8"; + checkInputs = [ + pytestCheckHook + ]; - buildInputs = [ glibcLocales ]; + pythonImportsCheck = [ "unidecode" ]; meta = with lib; { homepage = "https://pypi.python.org/pypi/Unidecode/"; description = "ASCII transliterations of Unicode text"; - license = licenses.gpl2; + license = licenses.gpl2Plus; maintainers = with maintainers; [ domenkozar ]; }; } From 6d298ca46b2dbcfc04a7f56448a1151ca55b82f1 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Tue, 14 Sep 2021 12:44:18 +0200 Subject: [PATCH 3/4] octoprint: update override for unidecode --- pkgs/applications/misc/octoprint/default.nix | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/misc/octoprint/default.nix b/pkgs/applications/misc/octoprint/default.nix index bc994bf68233..85ddbdccef7b 100644 --- a/pkgs/applications/misc/octoprint/default.nix +++ b/pkgs/applications/misc/octoprint/default.nix @@ -35,7 +35,6 @@ let (mkOverride "markupsafe" "1.1.1" "29872e92839765e546828bb7754a68c418d927cd064fd4708fab9fe9c8bb116b") (mkOverride "sarge" "0.1.5.post0" "1c1ll7pys9vra5cfi8jxlgrgaql6c27l6inpy15aprgqhc4ck36s") (mkOverride "tornado" "5.1.1" "4e5158d97583502a7e2739951553cbd88a72076f152b4b11b64b9a10c4c49409") - (mkOverride "unidecode" "0.04.21" "280a6ab88e1f2eb5af79edff450021a0d3f0448952847cd79677e55e58bad051") # Requires flask<2, cannot mkOverride because tests need to be disabled ( @@ -65,7 +64,20 @@ let } ) - + # Requires unidecode>=0.04.14,<0.05. Upstream changed the source naming between releases + ( + self: super: { + unidecode = super.unidecode.overridePythonAttrs (oldAttrs: rec { + version = "0.04.21"; + src = fetchFromGitHub { + owner = "avian2"; + repo = "unidecode"; + rev = "release-${version}"; + sha256 = "0p5bkibv0xm1265dlfrz3zq3k9bbx07gl8zyq8mvvb8hi7p5lifg"; + }; + }); + } + ) # Requires websocket-client <1.0, >=0.57. Cannot do mkOverride b/c differing underscore/hyphen in pypi source name ( From 19ee8600029c4810e5cc3b921b244109053833f1 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Tue, 14 Sep 2021 13:39:57 +0200 Subject: [PATCH 4/4] calibre-web: allow later unidecode release --- pkgs/servers/calibre-web/default.nix | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkgs/servers/calibre-web/default.nix b/pkgs/servers/calibre-web/default.nix index b6dd0b987201..32564e326aa9 100644 --- a/pkgs/servers/calibre-web/default.nix +++ b/pkgs/servers/calibre-web/default.nix @@ -20,7 +20,8 @@ python3.pkgs.buildPythonApplication rec { substituteInPlace setup.cfg \ --replace "requests>=2.11.1,<2.25.0" "requests" \ --replace "cps = calibreweb:main" "calibre-web = calibreweb:main" \ - --replace "PyPDF3>=1.0.0,<1.0.4" "PyPDF3>=1.0.0" + --replace "PyPDF3>=1.0.0,<1.0.4" "PyPDF3>=1.0.0" \ + --replace "unidecode>=0.04.19,<1.3.0" "unidecode>=0.04.19" ''; patches = [