diff --git a/pkgs/development/python-modules/pycangjie/default.nix b/pkgs/development/python-modules/pycangjie/default.nix index 18f400ac2847..a6313eff5f65 100644 --- a/pkgs/development/python-modules/pycangjie/default.nix +++ b/pkgs/development/python-modules/pycangjie/default.nix @@ -25,6 +25,17 @@ buildPythonPackage rec { hash = "sha256-REWX6u3Rc72+e5lIImBwV5uFoBBUTMM5BOfYdKIFL4k="; }; + # `find_installation()` without the `name_or_path` argument uses the + # Python interpreter that Meson was built with, which may not be the + # one we're using to build pycangjie. + # https://mesonbuild.com/Python-module.html#find_installation + postPatch = '' + substituteInPlace meson.build \ + --replace-fail \ + "import('python').find_installation()" \ + "import('python').find_installation('python3')" + ''; + preConfigure = '' ( cd subprojects