Merge pull request #307098 from r-ryantm/auto-update/cilium-cli
[NixPkgs.git] / pkgs / development / python-modules / pylddwrap / replace_env_with_placeholder.patch
blob676b0c10b4a9db2c018d89079bbfdd7658ae0b05
1 diff --git a/lddwrap/__init__.py b/lddwrap/__init__.py
2 index 1222c97..db8a735 100644
3 --- a/lddwrap/__init__.py
4 +++ b/lddwrap/__init__.py
5 @@ -190,10 +190,8 @@ def list_dependencies(path: pathlib.Path,
6 Otherwise specified env is used.
7 :return: list of dependencies
8 """
9 - # We need to use /usr/bin/env since Popen ignores the PATH,
10 - # see https://stackoverflow.com/questions/5658622
11 proc = subprocess.Popen(
12 - ["/usr/bin/env", "ldd", path.as_posix()],
13 + ["@ldd_bin@", path.as_posix()],
14 stdout=subprocess.PIPE,
15 stderr=subprocess.PIPE,
16 universal_newlines=True,
17 @@ -209,7 +207,7 @@ def list_dependencies(path: pathlib.Path,
19 if unused:
20 proc_unused = subprocess.Popen(
21 - ["/usr/bin/env", "ldd", "--unused",
22 + ["@ldd_bin@", "--unused",
23 path.as_posix()],
24 stdout=subprocess.PIPE,
25 stderr=subprocess.PIPE,