From 6425011efe079f34bb795a1bc192cc0db3590155 Mon Sep 17 00:00:00 2001 From: Alyssa Ross Date: Sun, 9 Oct 2022 16:12:02 +0000 Subject: [PATCH] update-python-libraries: remove old Nix fallback Since c0972c16dcb ("update-python-libraries: add missing dependency nix"), Nix will be provided as a dependency, so we know we'll always be using a modern version and no longer need the fallback. --- .../update-python-libraries/update-python-libraries.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/pkgs/development/interpreters/python/update-python-libraries/update-python-libraries.py b/pkgs/development/interpreters/python/update-python-libraries/update-python-libraries.py index 3843497d94e5..ea8af4241cf6 100755 --- a/pkgs/development/interpreters/python/update-python-libraries/update-python-libraries.py +++ b/pkgs/development/interpreters/python/update-python-libraries/update-python-libraries.py @@ -342,11 +342,7 @@ def _update_package(path, target): text = _replace_value('version', new_version, text) # hashes from pypi are 16-bit encoded sha256's, normalize it to sri to avoid merge conflicts # sri hashes have been the default format since nix 2.4+ - try: - sri_hash = subprocess.check_output(["nix", "hash", "to-sri", "--type", "sha256", new_sha256]).decode('utf-8').strip() - except subprocess.CalledProcessError: - # nix<2.4 compat - sri_hash = subprocess.check_output(["nix", "to-sri", "--type", "sha256", new_sha256]).decode('utf-8').strip() + sri_hash = subprocess.check_output(["nix", "hash", "to-sri", "--type", "sha256", new_sha256]).decode('utf-8').strip() # fetchers can specify a sha256, or a sri hash