From cb51b41ccf84814c5ae45d7a5f219d25ea7bb4d1 Mon Sep 17 00:00:00 2001 From: Andreas Rammhold Date: Wed, 9 Jun 2021 18:49:41 +0200 Subject: [PATCH] llvmPackages_git: fix variable shadowing The first substitution was not passed to the 2nd re.sub call as seems to be the intention of the original change. --- pkgs/development/compilers/llvm/update-git.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/development/compilers/llvm/update-git.py b/pkgs/development/compilers/llvm/update-git.py index 119a050e4701..ec1a30c6b0ff 100755 --- a/pkgs/development/compilers/llvm/update-git.py +++ b/pkgs/development/compilers/llvm/update-git.py @@ -64,7 +64,7 @@ default_nix = os.path.join(os.path.dirname(os.path.abspath(__file__)), 'git/defa with fileinput.FileInput(default_nix, inplace=True) as f: for line in f: result = re.sub(r'^ release_version = ".+";', f' release_version = "{release_version}";', line) - result = re.sub(r'^ version = ".+";', f' version = "{version}";', line) + result = re.sub(r'^ version = ".+";', f' version = "{version}";', result) result = re.sub(r'^ rev = ".*";', f' rev = "{commit["sha"]}";', result) result = re.sub(r'^ sha256 = ".+";', f' sha256 = "{hash}";', result) print(result, end='')