diff --git a/pkgs/development/arduino/platformio/chrootenv.nix b/pkgs/development/arduino/platformio/chrootenv.nix index 8f93a0b3772..182f8fbefab 100644 --- a/pkgs/development/arduino/platformio/chrootenv.nix +++ b/pkgs/development/arduino/platformio/chrootenv.nix @@ -13,7 +13,7 @@ let inherit version; sha256 = "678c98275431fad324275dec63791e4a17558b40e5a110e20a82866139a85a5a"; }; - patches = []; + postPatch = ""; }); platformio = self.callPackage ./core.nix { }; diff --git a/pkgs/development/python-modules/click/default.nix b/pkgs/development/python-modules/click/default.nix index 561c47069cb..1ae0cba4844 100644 --- a/pkgs/development/python-modules/click/default.nix +++ b/pkgs/development/python-modules/click/default.nix @@ -1,4 +1,4 @@ -{ stdenv, buildPythonPackage, fetchPypi, substituteAll, locale, pytest }: +{ lib, buildPythonPackage, fetchPypi, substituteAll, locale, pytest }: buildPythonPackage rec { pname = "click"; @@ -10,10 +10,10 @@ buildPythonPackage rec { sha256 = "5b94b49521f6456670fdb30cd82a4eca9412788a93fa6dd6df72c94d5a8ff2d7"; }; - patches = stdenv.lib.optional (stdenv.lib.versionAtLeast version "6.7") (substituteAll { - src = ./fix-paths.patch; - locale = "${locale}/bin/locale"; - }); + postPatch = '' + substituteInPlace click/_unicodefun.py \ + --replace "'locale'" "'${locale}/bin/locale'" + ''; buildInputs = [ pytest ]; @@ -24,7 +24,7 @@ buildPythonPackage rec { # https://github.com/pallets/click/issues/823 doCheck = false; - meta = with stdenv.lib; { + meta = with lib; { homepage = http://click.pocoo.org/; description = "Create beautiful command line interfaces in Python"; longDescription = '' diff --git a/pkgs/development/python-modules/click/fix-paths.patch b/pkgs/development/python-modules/click/fix-paths.patch deleted file mode 100644 index b44a08e591e..00000000000 --- a/pkgs/development/python-modules/click/fix-paths.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/click/_unicodefun.py b/click/_unicodefun.py -index 620edff..85a3c98 100644 ---- a/click/_unicodefun.py -+++ b/click/_unicodefun.py -@@ -63,7 +63,7 @@ def _verify_python3_env(): - if os.name == 'posix': - import subprocess - try: -- rv = subprocess.Popen(['locale', '-a'], stdout=subprocess.PIPE, -+ rv = subprocess.Popen(['@locale@', '-a'], stdout=subprocess.PIPE, - stderr=subprocess.PIPE).communicate()[0] - except OSError: - rv = b''