Unverified Commit d59c7900 authored by dotlambda's avatar dotlambda Committed by GitHub
Browse files

python3Packages.pycangjie: fix build with non-default python versions (#501944)

parents bc9d484b d0034cbb
Loading
Loading
Loading
Loading
+11 −0
Original line number Diff line number Diff line
@@ -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