From 86b171da65ed22dccd71f0bccc021270d9029ea7 Mon Sep 17 00:00:00 2001 From: Michael Daniels Date: Thu, 10 Sep 2026 19:26:18 -0400 Subject: [PATCH] Revert "meson: don't set postPatch at all if not using PyPy" This reverts commit ef3d7e646a5c29ddfbbcadf7137f46977174c39f. --- pkgs/by-name/me/meson/package.nix | 28 ++++++++++++++++------------ 1 file changed, 16 insertions(+), 12 deletions(-) diff --git a/pkgs/by-name/me/meson/package.nix b/pkgs/by-name/me/meson/package.nix index 30727c12b71b..f0d0dd59e535 100644 --- a/pkgs/by-name/me/meson/package.nix +++ b/pkgs/by-name/me/meson/package.nix @@ -70,18 +70,22 @@ python3.pkgs.buildPythonApplication (finalAttrs: { ./007-freebsd-pkgconfig-path.patch ]; - ${if python3.isPyPy then "postPatch" else null} = '' - substituteInPlace mesonbuild/modules/python.py \ - --replace-fail "PythonExternalProgram('python3', mesonlib.python_command" \ - "PythonExternalProgram('${python3.meta.mainProgram}', mesonlib.python_command" - substituteInPlace mesonbuild/modules/python3.py \ - --replace-fail "state.environment.lookup_binary_entry(mesonlib.MachineChoice.HOST, 'python3'" \ - "state.environment.lookup_binary_entry(mesonlib.MachineChoice.HOST, '${python3.meta.mainProgram}'" - substituteInPlace "test cases"/*/*/*.py "test cases"/*/*/*/*.py \ - --replace-quiet '#!/usr/bin/env python3' '#!/usr/bin/env pypy3' \ - --replace-quiet '#! /usr/bin/env python3' '#!/usr/bin/env pypy3' - chmod +x "test cases"/*/*/*.py "test cases"/*/*/*/*.py - ''; + postPatch = + if python3.isPyPy then + '' + substituteInPlace mesonbuild/modules/python.py \ + --replace-fail "PythonExternalProgram('python3', mesonlib.python_command" \ + "PythonExternalProgram('${python3.meta.mainProgram}', mesonlib.python_command" + substituteInPlace mesonbuild/modules/python3.py \ + --replace-fail "state.environment.lookup_binary_entry(mesonlib.MachineChoice.HOST, 'python3'" \ + "state.environment.lookup_binary_entry(mesonlib.MachineChoice.HOST, '${python3.meta.mainProgram}'" + substituteInPlace "test cases"/*/*/*.py "test cases"/*/*/*/*.py \ + --replace-quiet '#!/usr/bin/env python3' '#!/usr/bin/env pypy3' \ + --replace-quiet '#! /usr/bin/env python3' '#!/usr/bin/env pypy3' + chmod +x "test cases"/*/*/*.py "test cases"/*/*/*/*.py + '' + else + null; build-system = [ python3.pkgs.setuptools ];